Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-08

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:10 j_p_r joined #perl6
00:11 dalek doc: a60d289 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
00:11 dalek doc: - make examples compile
00:11 dalek doc: - fix a few examples
00:11 dalek doc: - improve loop
00:11 dalek doc: review: https://github.com/perl6/doc/commit/a60d2893ab
00:42 zacts joined #perl6
00:44 PotatoGim joined #perl6
00:48 pierre_ joined #perl6
00:58 djbkd joined #perl6
01:05 AlexDaniel gfldex++ # I love your work on compilable examples
01:09 itaipu joined #perl6
01:11 pierre_ joined #perl6
01:11 PerlJam joined #perl6
01:11 pierre_ joined #perl6
01:15 labster joined #perl6
01:17 dalek whateverable: 0499e2c | (Daniel Green)++ | Committable.p6:
01:17 dalek whateverable: Add the total run time limit to the Perl 6 version of committable
01:17 dalek whateverable: review: https://github.com/perl6/whateverable/commit/0499e2c719
01:26 benjikins joined #perl6
01:26 tailgate How can i convert a string of single char to it's ascii value as a number?
01:27 benjikins are there any modules for using AES in perl6
01:30 MasterDuke m: say "3".Int
01:30 camelia rakudo-moar c8c27e: OUTPUT«3␤»
01:31 MasterDuke tailgate: ^^^ is that what you meant?
01:31 MasterDuke m: say ord("3")
01:31 camelia rakudo-moar c8c27e: OUTPUT«51␤»
01:31 MasterDuke ^^^ or that?
01:32 tailgate MasterDuke: the latter thanks
01:36 webstrand joined #perl6
01:46 benjikins Is rakudo ever going to be able to build a standalone executable?
01:46 benjikins is there a way to do that lol
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 geekosaur if it's talking about parrot, it's quite a bit out of date...
01:48 geekosaur currently you can't do it and there isn't a lot of effort being put into doing that with moarvm. and the jvm backend isn't quite up to snuff yet
01:49 benjikins alright, thanks for answering
01:59 mr-foobar joined #perl6
02:05 BenGoldberg m: https://gist.github.com/BenGoldberg1/7a4527bc27f7a75fa403e6d6f4a59677
02:05 camelia rakudo-moar c8c27e: OUTPUT«[14 2 7 28 5 15 16 13 3 12 19 21 11 26 25 29 17 1 4 23 24 0 9 8 20 18 22 6 10 27]␤»
02:05 wamba joined #perl6
02:06 BenGoldberg ^ My favorite shuffling algorithm, which terminates almost surely.
02:07 dalek whateverable: 7c4fd06 | (Daniel Green)++ | / (2 files):
02:07 dalek whateverable: Don't need the timeout method anymore
02:07 dalek whateverable: review: https://github.com/perl6/whateverable/commit/7c4fd06c7a
02:20 pierre_ joined #perl6
02:24 _28_ria joined #perl6
02:25 noganex joined #perl6
02:26 dalek whateverable: 5c8b82f | (Daniel Green)++ | / (2 files):
02:26 dalek whateverable: Fix %.additional_files and also rename to kebab case
02:26 dalek whateverable: review: https://github.com/perl6/whateverable/commit/5c8b82f4bd
02:49 cibs joined #perl6
03:01 aborazmeh joined #perl6
03:01 aborazmeh joined #perl6
03:07 AlexDaniel OK, here is the question: I started something using using Proc::Async, how can I kill it with the whole process group?
03:08 AlexDaniel $proc.kill(‘KILL’) does not kill the group, but it is kinda expected
03:08 AlexDaniel and it does not support “negative” signal numbers, as some might expect
03:08 AlexDaniel so I thought, well, I can probably just take the pid and pass it to 「kill」 routine, right?
03:09 AlexDaniel but there's no kill routine?
03:09 AlexDaniel OK, well, I can run(‘kill’, …), maybe
03:09 AlexDaniel but how can I get the pid?
03:12 Xliff .seen FROGGS
03:12 yoleaux I saw FROGGS 31 Jul 2016 18:32Z in #perl6: <FROGGS> if you click on the Perl 6 caption you can look at other examples
03:15 cpage_ joined #perl6
03:17 Actualeyes joined #perl6
03:18 Xliff AlexDaniel, I'm not well read on Promise, but the docs say that start() returns a Promise that is kept by a Proc object.
03:18 Xliff Proc has a pid() method;
03:18 Xliff The trick will be getting the Proc from the Promise.
03:18 AlexDaniel how can I get something from a Promise when it is not kept yet?
03:22 lucs Question: http://paste.scsys.co.uk/530090
03:22 gfldex m: say now.DateTime.week
03:22 camelia rakudo-moar c8c27e: OUTPUT«(2016 32)␤»
03:25 MasterDuke lucs: why are you using $!tu ? if you make it $.tu you get an automatic getter/setter
03:25 lucs MasterDuke: It's just an example abstracted from more involved stuff.
03:26 pierre_ joined #perl6
03:27 MasterDuke m: class Foo { has $.tu; method glorp($a) { $.tu = $a.uc } }; my $f = Foo.new; $f.tu = 'hi'; say $f.tu; $f.glorp('world'); say $f.tu
03:27 camelia rakudo-moar c8c27e: OUTPUT«Cannot modify an immutable Any␤  in block <unit> at <tmp> line 1␤␤»
03:27 MasterDuke m: class Foo { has $.tu is rw; method glorp($a) { $.tu = $a.uc } }; my $f = Foo.new; $f.tu = 'hi'; say $f.tu; $f.glorp('world'); say $f.tu
03:27 camelia rakudo-moar c8c27e: OUTPUT«hi␤WORLD␤»
03:27 lucs I don't want the user to be able to call $foo.tu.
03:27 AlexDaniel MasterDuke: interestingly, paste.scsys does support raw links if you add ?tx=on but it does not mark it as utf8 so it's broken
03:29 lucs MasterDuke: Instead of get-tu(), imagine I want transmogrigy-tu(), and $foo can't touch or see $!tu.
03:30 lucs s/$foo can't/$foo shouldn't be allowed to/
03:36 lucs Put another way: how do I set a private (has $!foo) attribute using  self.bless(...)?
03:36 lucs (um,  has $!tu  in my initial example)
03:39 gfldex lucs: set it in the submethod BUILD, see: http://stackoverflow.com/questions/38816496/override-attribute-of-a-role
03:39 BenGoldberg AlexDaniel, Have you considered starting the process by using class Proc directly, instead of Proc::Async?
03:39 lucs gfldex: I'll read that, thanks.
03:39 MasterDuke m: class Foo { has $!tu; submethod BUILD(:$tu) { $!tu = $tu }; method glorp($a) { return Foo.new(tu => $a.uc) }; method get-tu { return $!tu }; }; my $f = Foo.glorp("world"); dd $f; say $f.get-tu
03:39 camelia rakudo-moar c8c27e: OUTPUT«Foo $f = Foo.new␤WORLD␤»
03:40 AlexDaniel BenGoldberg: perhaps that's a good idea
03:40 lucs MasterDuke: Thanks :)
03:40 AlexDaniel BenGoldberg: but then why do we have Proc::Async, right?
03:40 TimToady lucs: we frown on attributes that are both part of and not part of the public interface, which is why we make that a little harder
03:42 lucs TimToady: I think my abstract example is a bit shoddy. I'll try to make a better one.
03:44 BenGoldberg Proc::Async is useful if you need to deal with the input and output of a process in an asynchronous manner.
03:45 BenGoldberg Whereas Proc gives you IO::Handles.
03:48 BenGoldberg So if you've got a large amount of data to feed to an external process, and that process is reading things very slowly, Proc::Async might be better, since .write and .print return promises which will be kept when the data is done being written.
03:49 BenGoldberg OTOH, in that same situation, if you used Proc directly, $proc.in.print($lots-of-data) is going to block your main process.
03:51 BenGoldberg Oddly, I notice that, according to the docs, Proc has a .pid method, but no .wait or .waitpid method.
03:52 labster m: 3++
03:52 camelia rakudo-moar c8c27e: OUTPUT«Cannot resolve caller postfix:<++>(Int); none of these signatures match:␤    (Mu:D $a is rw)␤    (Mu:U $a is rw)␤    (Int:D $a is rw)␤    (int $a is rw)␤    (Bool:U $a is rw)␤    (Bool:D $a is rw)␤    (Num:D $a is rw)␤    (Num:U $a is rw)…»
03:53 labster I'd argue that the Perl 5 message is clearer, "Can't modify constant item in postincrement (++)"
03:55 dalek doc: c4bbda1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
03:55 dalek doc: doc private attributes
03:55 dalek doc: review: https://github.com/perl6/doc/commit/c4bbda1050
03:56 lucs Clearer (maybe) example: http://paste.scsys.co.uk/530091
03:57 lucs Or maybe I need a different approach...
03:59 lucs Oh, I didn't read gfldex's link yet, doing that now...
04:06 * lucs does not see/understand how BUILD helps his example :(
04:06 gfldex m: class C { has $.attr; submethod BUILD (:$attr = 42) { $!attr = $attr } }; C.new.say; C.new(:attr('answer')).say;
04:06 camelia rakudo-moar c8c27e: OUTPUT«C.new(attr => 42)␤C.new(attr => "answer")␤»
04:08 gfldex m: class C { has $.attr; submethod BUILD (:$attr = 42) { $!attr = $attr }; method new($positional) { self.bless(:attr($positional))} }; C.new.say; C.new('answer').say;
04:08 camelia rakudo-moar c8c27e: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method new at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:11 gfldex m: class C { has $.attr; submethod BUILD (:$attr = 42) { $!attr = $attr }; multi method new($positional) { self.bless(:attr($positional))} }; C.new.say; C.new('answer').say;
04:11 camelia rakudo-moar c8c27e: OUTPUT«C.new(attr => 42)␤C.new(attr => "answer")␤»
04:11 canopus joined #perl6
04:13 lucs gfldex: The problem is that a new instance has access (read only, but still) to $.attr, which I'd like to avoid.
04:13 gfldex m: class C { has $!attr; submethod BUILD (:$attr = 42) { $!attr = $attr }; multi method new($positional) { self.bless(:attr($positional))} }; C.new.say; C.new('answer').say;
04:13 camelia rakudo-moar c8c27e: OUTPUT«C.new␤C.new␤»
04:13 gfldex m: class C { has $!attr; submethod BUILD (:$attr = 42) { $!attr = $attr }; multi method new($positional) { self.bless(:attr($positional), |%_)} }; C.new.say; C.new('answer').say;
04:13 camelia rakudo-moar c8c27e: OUTPUT«C.new␤C.new␤»
04:14 rand12418093821 joined #perl6
04:15 gfldex m: class C { method new { self.CREATE } }; dd C.new;
04:15 camelia rakudo-moar c8c27e: OUTPUT«C.new␤»
04:19 BenGoldberg m: class C { has $!d; method foo(:U, $e) { self } };
04:19 camelia rakudo-moar c8c27e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class C { has $!d; method foo(:7⏏5U, $e) { self } };␤»
04:19 BenGoldberg m: class C { has $!d; method foo($e) { self } };
04:19 camelia rakudo-moar c8c27e: ( no output )
04:20 BenGoldberg m: class C { has $!d; method foo($d) { self.new($:d) } }; dd C.foo("x");
04:20 camelia rakudo-moar c8c27e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol $:d as a placeholder parameter␤at <tmp>:1␤------> 3{ has $!d; method foo($d) { self.new($:d7⏏5) } }; dd C.foo("x");␤»
04:20 BenGoldberg m: class C { has $!d; method foo($d) { self.new(:$d) } }; dd C.foo("x");
04:20 camelia rakudo-moar c8c27e: OUTPUT«C.new␤»
04:20 BenGoldberg m: class C { has $!d; method foo($d) { self.new(:$d) } }; dd C.foo("x").d;
04:20 camelia rakudo-moar c8c27e: OUTPUT«Method 'd' not found for invocant of class 'C'␤  in block <unit> at <tmp> line 1␤␤»
04:20 BenGoldberg m: class C { has $.d; method foo($d) { self.new(:$d) } }; dd C.foo("x").d;
04:20 camelia rakudo-moar c8c27e: OUTPUT«"x"␤»
04:22 BenGoldberg m: class C { has $.d; method foo($e) { my $d = $e ~ "y"; self.new(:$d) } }; dd C.foo("x").d;
04:22 camelia rakudo-moar c8c27e: OUTPUT«"xy"␤»
04:23 BenGoldberg You don't need to mess with BUILD or .bless; you can just use .new
04:28 lucs Oh well, I'll just use $.attr ($.tu).
04:28 * lucs puts away the shotgun.
04:28 dalek doc: c273e33 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
04:28 dalek doc: name twigils for private attributes
04:28 dalek doc: review: https://github.com/perl6/doc/commit/c273e33cef
04:28 dalek doc: b6e83d5 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
04:28 dalek doc: doc submethod BUILD
04:28 dalek doc: review: https://github.com/perl6/doc/commit/b6e83d5fa6
04:33 Cabanossi joined #perl6
04:38 dalek doc: a4b4101 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
04:38 dalek doc: BUILDALL is not a submethod
04:38 dalek doc: review: https://github.com/perl6/doc/commit/a4b4101127
04:39 dalek doc: c8691de | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
04:39 dalek doc: fix typo in example
04:39 dalek doc: review: https://github.com/perl6/doc/commit/c8691de0f8
05:13 committable6 joined #perl6
05:18 Tonik joined #perl6
05:25 movl joined #perl6
05:39 djbkd_ joined #perl6
05:43 rindolf joined #perl6
06:00 movl joined #perl6
06:00 pierre_ joined #perl6
06:08 avalenn joined #perl6
06:08 CIAvash joined #perl6
06:19 pierre_ joined #perl6
06:20 AlexDaniel m: my @a; await start loop { @a.push: rand }, start loop { @a.push: rand }
06:20 camelia rakudo-moar c8c27e: OUTPUT«(timeout)*** Error in `/home/camelia/rakudo-m-inst-1/bin/moar': double free or corruption (!prev): 0x00007fafc0040b00 ***␤»
06:21 AlexDaniel while I do understand that it is a bad idea, should it actually segfault?
06:25 firstdayonthejob joined #perl6
06:28 pierre_ joined #perl6
06:35 darutoko joined #perl6
06:41 anaeem1_ joined #perl6
06:43 dalek Inline-Perl5: fdeea91 | niner++ | p5helper.c:
06:43 dalek Inline-Perl5: Hopefully fix compilation on Windows by changing order of includes in p5herlper.c
06:43 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/fdeea9160c
06:48 bob777 joined #perl6
06:49 pierre_ joined #perl6
06:58 RabidGravy joined #perl6
07:05 bjz joined #perl6
07:07 gfldex AlexDaniel: it should never segfault because that means exceptions handlers are not executed, what may result in left behind temp files or worse.
07:12 mwal_atikon joined #perl6
07:12 dalek doc: af96a4a | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
07:12 dalek doc: more links to Mu
07:12 dalek doc: review: https://github.com/perl6/doc/commit/af96a4ad1e
07:13 bjz joined #perl6
07:13 mwal_atikon left #perl6
07:15 rindolf joined #perl6
07:16 movl joined #perl6
07:24 zakharyas joined #perl6
07:27 Actualeyes left #perl6
07:38 dalek doc: 0809d2f | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
07:38 dalek doc: doc definition of a type
07:38 dalek doc: review: https://github.com/perl6/doc/commit/0809d2f02c
07:38 dalek doc: 31f5beb | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
07:38 dalek doc: define type declarators
07:38 dalek doc: review: https://github.com/perl6/doc/commit/31f5beb691
07:40 pdcawley joined #perl6
07:43 bob777 joined #perl6
07:53 Sgeo_ joined #perl6
08:03 dakkar joined #perl6
08:03 jonas1 joined #perl6
08:05 dalek doc: 31cd5ad | (Wenzel P. P. Peppmeyer)++ | doc/ (2 files):
08:05 dalek doc: tell about Rat literals
08:05 dalek doc: review: https://github.com/perl6/doc/commit/31cd5ad64c
08:06 bob777 joined #perl6
08:09 bjz joined #perl6
08:12 jsimonet joined #perl6
08:14 AlexDaniel gfldex++
08:27 dalek doc: ac60df0 | (Wenzel P. P. Peppmeyer)++ | doc/Language/unicode_entry.pod6:
08:27 dalek doc: fix for #755
08:27 dalek doc: review: https://github.com/perl6/doc/commit/ac60df05f8
08:31 sno joined #perl6
08:32 vytas joined #perl6
08:33 pmurias joined #perl6
08:36 bob777 joined #perl6
08:46 dalek doc: 8c1b577 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Callable.pod6:
08:46 dalek doc: fix arity requirements for function combinator
08:46 dalek doc: review: https://github.com/perl6/doc/commit/8c1b577279
08:46 trnh joined #perl6
08:46 trnh joined #perl6
08:54 khw joined #perl6
08:59 labster joined #perl6
09:03 MorayJ joined #perl6
09:03 dalek doc: ed896ce | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod6:
09:03 dalek doc: doc all precedence traits
09:03 dalek doc: review: https://github.com/perl6/doc/commit/ed896ceaa8
09:09 dalek doc: 3d3455d | (Wenzel P. P. Peppmeyer)++ | doc/Language/concurrency.pod6:
09:09 dalek doc: index supply {}
09:09 dalek doc: review: https://github.com/perl6/doc/commit/3d3455ddf0
09:18 Actualeyes joined #perl6
09:21 nine gfldex, AlexDaniel: actually, I think segfaults are completely ok in that case. Array access is just not thread safe and if it were, it'd be too slow to be useful. We have Supplies and Channels which are explicitly there to be accessed concurrently from multiple threads.
09:22 timotimo right. but we still don't want to allow people to segfault the VM
09:23 nine timotimo: but how could you avoid that without adding overhead?
09:23 timotimo i haven't a clue.
09:24 nine I dare say it's just not possible.
09:24 timotimo actually, i'm surprised realloc would let us concurrently use it and F up the allocator
09:24 timotimo i thought malloc and friends all had a lock
09:25 harrison_ joined #perl6
09:26 AlexDaniel nine: yeah, I agree. But I submitted a ticket anyway. Feel free to leave a comment there (#128870)
09:26 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128870
09:27 nine timotimo: no, that would slow down each and every program :)
09:27 timotimo hmm
09:27 timotimo i think jnthn once said he's got a plan to make the reallocing safe
09:27 nine timotimo: but I may also be wrong
09:29 nine So don't listen to me, but to malloc's man page: "To  avoid  corruption  in  multithreaded  applications, mutexes are used internally to protect the memory-management data structures employed by these functions."
09:30 timotimo right. but then how do we asploded?
09:31 timotimo oh maybe another thread was accessing the data and wrote over the edge or something
09:31 Woodi problem is: my @a not being lexical for start blocks; this is use-locks situation. if we want magical DWIM then a) @a need to be converted into something safe; b) detect and disallow...
09:31 dalek doc: ee4169c | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/5to6-nutshell.pod6:
09:31 dalek doc: Do not add a sigil.
09:31 dalek doc:
09:31 dalek doc: Because the example below has no sigil.
09:31 dalek doc: review: https://github.com/perl6/doc/commit/ee4169c645
09:32 w4and0er96 joined #perl6
09:35 w4and0er96 Hi, I'm new for perl6.
09:35 nine w4and0er96: welcome!
09:35 Woodi hi w4and0er96 :)
09:35 timotimo greetings
09:35 AlexDaniel … “I'm looking for a perl friend” ;)
09:36 DrForr Afternoon.
09:36 Hotkeys Morning
09:43 araujo joined #perl6
09:44 araujo joined #perl6
09:46 araujo joined #perl6
09:49 araujo joined #perl6
09:51 araujo joined #perl6
09:57 dalek doc: 908f18c | (Wenzel P. P. Peppmeyer)++ | doc/Language/exceptions.pod6:
09:57 dalek doc: explain control exceptions
09:57 dalek doc: review: https://github.com/perl6/doc/commit/908f18cb32
10:01 dalek doc: a38088a | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
10:01 dalek doc: index method declarator
10:01 dalek doc: review: https://github.com/perl6/doc/commit/a38088abed
10:05 dalek doc: 856ad77 | (Claudio Ramirez)++ | doc/Language/modules.pod6:
10:05 dalek doc: Remove $ from constant
10:05 dalek doc: review: https://github.com/perl6/doc/commit/856ad7791c
10:05 dalek doc: 9fb0ac3 | nxadm++ | doc/Language/modules.pod6:
10:05 dalek doc: Merge pull request #823 from nxadm/master
10:05 dalek doc:
10:05 dalek doc: Remove $ from constant
10:05 dalek doc: review: https://github.com/perl6/doc/commit/9fb0ac3bc9
10:06 dalek doc: 5e11ee9 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
10:06 dalek doc: link to Attribute
10:06 dalek doc: review: https://github.com/perl6/doc/commit/5e11ee977b
10:21 itaipu joined #perl6
10:30 kid51 joined #perl6
10:32 nebg joined #perl6
10:32 nebg hello everyone... why i read in a lot of code people doing this... "use MyModule::RandomThings qw(my_function);" why couldn't they simply do "use MyModule::RandomThings 'my_function'; ?
10:33 nebg left #perl6
10:36 kaare_ joined #perl6
10:40 inokenty joined #perl6
10:53 AlexDaniel you are welcome
11:30 canopus joined #perl6
11:30 harrison_ :nebg for my case, when I use "use Example::Module qw(func)" it is very easy to add more imports in future i.e "use Example::Module qw(func another_func)"
11:31 AlexDaniel yeah, in a hope that you will import more stuff!
11:34 sena_kun joined #perl6
11:36 dalek doc: c683675 | (Wenzel P. P. Peppmeyer)++ | / (2 files):
11:36 dalek doc: add some spacing to ToC entries to improve deep heading structures
11:36 dalek doc: review: https://github.com/perl6/doc/commit/c683675905
11:37 AlexDaniel harrison_: but that's not the case in perl 6, isn't it?
11:38 AlexDaniel can you even use 「use … qw()」 in Perl 6?
11:38 gfldex you can but it wont do what you think it does :)
11:39 gfldex sub IMPORT will take positionals, so you provide a list of Str as it's first positional
11:40 gfldex s/IMPORT/EXPORT/
11:40 harrison_ For module developers I think there is a way of specifying functions that are exported by default? I am a beginner in Perl 6 :)
11:41 jkramer Is there a good (working) standalone HTTP server module? I can't find find anything that's actually standalone *and* working.
11:42 DrForr Crust has a server.
11:42 gfldex HTTP::Server::Async should work
11:43 jkramer gfldex: I've been using that before but then I updated it and it doesn't build anymore.
11:43 lizmat harrison_: add "is export" as a trait to the function you want to export by default
11:44 lizmat m: sub a() is export { }
11:44 jkramer "HTTP::Response is not composable, so HTTP::Server::Async::Response cannot compose it"
11:44 camelia rakudo-moar c8c27e: ( no output )
11:44 harrison_ :lizmat thanks!
11:50 gfldex jkramer: try panda --force install HTTP::Server
11:51 jkramer Found the problem: https://github.com/tony-o/perl6-http-server-async/pull/23/commits/7fb92a097e3338a7e0d7aa1bb0e2abd476df8e0c
11:51 jkramer The fix isn't merged yet though
11:52 bjz_ joined #perl6
11:52 gfldex jkramer: version in META.info wasn't bumped
11:53 nine A dist called HTTP::Server::Async should simply not contain a module called HTTP::Request. And support for :auth should be no substitute for collaboration.
11:54 AlexDaniel m: sub foo { say ‘start’; { LEAVE { say ‘block left’ }; return 42; }; say ‘end’ }; say foo
11:54 camelia rakudo-moar c8c27e: OUTPUT«start␤block left␤42␤»
11:54 AlexDaniel m: sub foo { { LEAVE { say ‘block left’ }; return 42; }; say ‘end’ }; say foo
11:54 camelia rakudo-moar c8c27e: OUTPUT«block left␤0␤»
11:54 AlexDaniel why 0?
11:55 itaipu joined #perl6
11:56 lizmat AlexDaniel: feels like a bug to me
11:56 jkramer Can I uninstall modules with panda somehow?
11:58 sena_kun AlexDaniel, your code gives me 42, not 0.
11:58 gfldex jkramer: no, zef can
11:58 AlexDaniel nice
11:58 lizmat m: sub foo() { { LEAVE { say ‘block left’ }; return 42; }; say ‘end’ }; say foo.^name   # it actually leaks out internals
11:58 camelia rakudo-moar c8c27e: OUTPUT«block left␤BOOTInt␤»
11:58 AlexDaniel committable: releases sub foo { { LEAVE { say ‘block left’ }; return 42; }; say ‘end’ }; say foo
11:58 committable AlexDaniel: ¦«2015.10,2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.07,HEAD»: block left␤42␤|«2016.06»: block left␤0
11:58 AlexDaniel that is wrong probably ↑
11:58 AlexDaniel bisect: sub foo { { LEAVE { say ‘block left’ }; return 42; }; say ‘end’ }; say foo
11:59 bisectable AlexDaniel: Exit code is 0 on both starting points (good=2015.12 bad=c8c27e9), bisecting by using the output
11:59 bisectable AlexDaniel: bisect log: https://gist.github.com/bff288f53af83bbb02d666e581a6ce68
11:59 bisectable AlexDaniel: 'bisect run' failure
11:59 lizmat tssskk
12:01 AlexDaniel well, it did give a list of commits
12:01 AlexDaniel there are just some commits that you cannot build, for whatever reason
12:02 AlexDaniel anyway, submitting a ticket now
12:06 [Coke] .
12:10 pierre_ joined #perl6
12:11 Sgeo_ joined #perl6
12:16 AlexDaniel ok: #128872
12:16 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128872
12:18 kid51 joined #perl6
12:18 dalek doc: 6e541f7 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
12:18 dalek doc: doc only method
12:18 dalek doc: review: https://github.com/perl6/doc/commit/6e541f7913
12:20 izz_ joined #perl6
12:20 izz_ .
12:22 DrForr izz_: Hi, welcome to the more active channel :)
12:27 ggoebel joined #perl6
12:30 dalek doc: 93e61dd | (Zoffix Znet)++ | doc/Language/typesystem.pod6:
12:30 dalek doc: Fix typo/omission
12:30 dalek doc: review: https://github.com/perl6/doc/commit/93e61dd025
12:31 unmatched} joined #perl6
12:32 trnh joined #perl6
12:32 trnh joined #perl6
12:32 dalek doc: 6ae400b | coke++ | doc/Language/typesystem.pod6:
12:32 dalek doc: whitespace
12:32 dalek doc: review: https://github.com/perl6/doc/commit/6ae400b225
12:35 kurahaupo joined #perl6
12:36 sena_kun What is the most normal(i.e. not override) behavior of .ACCEPTS?
12:38 masak sena_kun: probably ===
12:39 sena_kun masak, hm, okay. Thanks.
12:39 kurahaupo_ joined #perl6
12:40 jnthn On a type object, type test. https://github.com/rakudo/rakudo/blob/nom/src/core/Mu.pm#L12 Otherwise === https://github.com/rakudo/rakudo/blob/nom/src/core/Any.pm#L20
12:41 sena_kun jnthn, hence, as an good example of behavior we can use just simple ints?
12:42 jnthn Well, Int overrides it
12:43 jnthn To do ==
12:43 sena_kun Eh.
12:45 masak m: my $x = Int.new(5); my $y = Int.new(5); say $x ~~ $y; say $x.WHERE; say $y.WHERE
12:45 camelia rakudo-moar c8c27e: OUTPUT«True␤140567058855160␤140567058855160␤»
12:45 masak hm, .WHERE is like a memory location, no?
12:45 masak do those Ints get interned somehow?
12:47 kurahaupo joined #perl6
12:48 gfldex m: my $x = Int.new(5000); my $y = Int.new(5000); say $x ~~ $y; say $x.WHERE; say $y.WHERE
12:48 camelia rakudo-moar c8c27e: OUTPUT«True␤139942761218216␤139942761218400␤»
12:48 gfldex smallish Ints are cached
12:49 gfldex or better preallocated
12:50 sufrostico joined #perl6
12:54 unmatched} m: my @a = ^5000; for ^5000 { next if $_.WHERE == @a[$_].WHERE; say "Starts to differ on $_"; last}
12:54 camelia rakudo-moar c8c27e: OUTPUT«Starts to differ on 15␤»
13:03 mcmillhj joined #perl6
13:10 lizmat .
13:13 wamba joined #perl6
13:17 unmatched} "Cannot locate symbol 'sqlite3_libversion_number' in native library ''  in method setup" :/
13:20 huggable joined #perl6
13:21 unmatched} huggable: dunno
13:21 unmatched} "Cannot locate symbol 'sqlite3_libversion_number' in native library ''  in method setup at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 306"
13:21 unmatched} I wonder what that's all about.
13:21 unmatched} I'm using DBIish
13:22 mst perhaps it's not managed to find libsqlite3.so
13:23 mst if you strace it, you should be able to see it searching for the bugger
13:23 unmatched} Looks like it has code for those cases: https://github.com/perl6/DBIish/blob/master/lib/DBIish.pm6#L33
13:23 * unmatched} doesn't know how to strace stuff ...
13:28 unmatched} No errors if I use DBIish from command line :/ I wonder if it's due to all that threads stuff in new IRC::Client
13:29 huggable joined #perl6
13:32 w4and0er96 is there sth. in perl6 that support list-comprehension like [ x | x <- 1..10 if x % 2 eq 0] ?
13:32 cibs joined #perl6
13:34 huggable joined #perl6
13:34 jnthn [$_ if %_ %% 2 for 1..10] or so
13:35 jnthn Though I'd probably just write that as 1..10 .grep(* %% 2) :)
13:36 huggable joined #perl6
13:36 lizmat m: say 2,4...10   # or use magic  :-)
13:36 camelia rakudo-moar c8c27e: OUTPUT«(2 4 6 8 10)␤»
13:36 unmatched} left #perl6
13:37 unmatched} joined #perl6
13:37 w4and0er96 THX. I know a little about Perl(both 5 and 6)
13:37 unmatched} joined #perl6
13:38 tadzik I'm sure we can fix that :)
13:38 pmurias joined #perl6
13:38 pmurias jnthn: ping
13:38 huggable joined #perl6
13:42 jnthn pmurias: pong
13:44 lizmat jnthn: do you have any opinions on adding around 30 Array.splice candidates ?
13:44 unmatched} :o
13:46 AlexDaniel jnthn: not sure if you have seen it or not (you probably did, but I'll mention it just in case), you may be interested in #128872. A quick look at bisect log points to return-without-lexotic changes (which kinda makes sense), so you probably know better.
13:46 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128872
13:46 pmurias jnthn: rakudo doesn't use cursor_type at all?
13:46 MilkmanDan joined #perl6
13:47 jnthn lizmat: Ummm...that sounds excessive? :P
13:47 jnthn lizmat: Why? :)
13:47 AlexDaniel performance!!
13:48 jnthn Yeah, but we already have an optimizer that specializes, and I find it highly unlikely that there's 30 different use cases that all are widely used enough to justify a special-case implementation...
13:48 skids joined #perl6
13:49 huggable joined #perl6
13:50 jnthn pmurias: Hmmm...seems not, though looks kinda like it could...
13:52 pmurias I don't know how big of a performance difference it would make on moar
13:52 pmurias cursor_type also seems like it doesn't get marked everywhere it could in NQP
13:53 pmurias <before ...> does use it
13:54 jnthn Yeah, it may well be an under-used optimization...
13:55 jnthn It may well be worthwhile on Moar
13:55 jnthn And will probably become more worthwhile as Moar becomes multi-stage.
13:55 pmurias multi-stage?
13:56 jnthn Having a baseline JIT prior to specialization
13:56 lizmat jnthn: this would create different candidates for splice(Int,Int), splice(Int,Callable), splice(Int,Whetever), etc
13:56 pmurias jnthn: is something like that planned soon?
13:56 cdg joined #perl6
13:57 pmurias (...) seems to turn of cursor_type too
13:57 jnthn pmurias: Relatively... I'm planning to overhaul spesh in a number of ways.
13:57 lizmat jnthn: the use case being that things like @a.splice(1,*-5)  could get optimized at compile time ?
13:57 jnthn pmurias: Including getting to do its work on a background thread
13:57 jnthn lizmat: Could it? Method calls are always late bound.
13:57 pmurias jnthn: I'll work on getting cursor_type used more in NQP
13:58 jnthn pmurias: Will be interested to know if you find it makes an interesting perf difference :)
13:58 unmatched} :/ I'm stumped. If I do perl6 -MIRC::Client::Plugin::Factoid -e 'my $p = IRC::Client::Plugin::Factoid.new; $p.started; say $p.handle: "source"' it works fine, but if I run it inside IRC::Client, I get Cannot locate symbol 'sqlite3_libversion_number' in native library ''  in method setup (NativeCall line 306) error. If I change this line to use 'sqlite3' instead of Str
13:58 unmatched} (https://github.com/perl6/DBIish/blob/master/lib/DBDish/SQLite/Native.pm6#L48), then the previous error goes away, but I then I get "Cannot look up attributes in a type object  in method prepare"
13:58 pmurias jnthn: it makes a few percent difference in nqp-js
13:58 lizmat jnthn: true, but doesn't spesh then optimize that ?
13:59 jnthn lizmat: Yes, but spesh also can optimize out if nqp::istype($foo, WhateverCode) like branches too :)
14:00 pmurias jnthn: because it turn obj.$$getattr(classHandle, "$!foo") into obj.attr123, the latter is something that v8 likes optimizing
14:00 jnthn pmurias: Nice :)
14:01 jnthn lizmat: If a few of the variants can become really tiny multi-methods as a result of splitting them out, then they'd fall below the inlining limit, and get optimized sooner also, which could be worthwhile.
14:01 freezerburnv_ joined #perl6
14:01 lizmat well, yes that's also the idea  :-)
14:02 lizmat that was responsible for the 40x speed improv on @a.splice($offset) I think  :-)
14:03 sena_kun m: my &f:(Int) = sub bar(Int) {};
14:03 camelia rakudo-moar c8c27e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤You can't adverb &f␤at <tmp>:1␤------> 3my &f:(Int)7⏏5 = sub bar(Int) {};␤»
14:03 sena_kun This feature was removed?
14:03 jnthn Well, more like never yet implemented
14:04 jnthn lizmat: Yeah...which is probably a common case. But I don't think there are 30 common cases :)
14:04 gnull joined #perl6
14:05 sena_kun jnthn, ah, okay.
14:05 huggable joined #perl6
14:07 kurahaupo joined #perl6
14:08 gnull joined #perl6
14:11 lizmat jnthn: we have this meme in the core that if you pass a :SINK to a method, it should not bother to create a return value and instead return Nil
14:11 lizmat e.g. on Array.splice
14:12 lizmat but also on postcircumfix{}
14:13 lizmat jnthn: but apparently this is never actually activated during parsing
14:13 gnull left #perl6
14:13 lizmat so I'm wondering, maybe we should forget about it at this point
14:14 lizmat and perhaps, in the case of method calls, just postfix "-nil" to the name of the method to be executed ?
14:15 lizmat anyways, in the case of Array,splice, the handling of :SINK would be half of the candidates  :-)
14:16 huggable joined #perl6
14:16 jnthn Well, we've also talked about "this is in sink context" being something we can propagate...
14:16 huggable jnthn, nothing found
14:16 unmatched} sorry
14:16 jnthn huggable: Was I talkin' to you, bro? :P
14:17 jnthn And then introspect in a caller
14:17 unmatched} But good news, I fixed my problem. Seems irc-started was triggered after the first connection was made and the plugin was triggered before DB connection was established and that apparently was messing everything up
14:18 lizmat jnthn: not sure I follow you: how would that look in code ?
14:19 itaipu joined #perl6
14:20 huggable joined #perl6
14:20 unmatched} test
14:20 unmatched} huggable: source
14:20 huggable unmatched}, See https://github.com/zoffixznet/huggable
14:20 unmatched} huggable: hug me
14:20 * huggable hugs unmatched}
14:20 unmatched} :(
14:20 jnthn lizmat: Dunno; Pm and I discussed it as an nqp:: op link nqp::sunk() that is 1 if called in sink context and 0 otherwise.
14:21 jnthn s/link/like/
14:22 lizmat jnthn: perhaps we could do something with the new node flags bitmap and TimToady's work on sink warnings ?
14:23 xinming joined #perl6
14:24 jnthn lizmat: Maybe, though that's a static analysis, while I was looking at it as a dynamic property
14:25 timotimo will the "called in sink context" thing be part of the arguments buffer or something?
14:25 huggable joined #perl6
14:25 unmatched} huggable: hug me
14:25 huggable unmatched}, nothing found
14:26 huggable joined #perl6
14:26 jnthn timotimo: Potentially, or it just looks at the return_type to see if it's void... :)
14:26 unmatched} huggable: hug me
14:26 * huggable hugs unmatched}
14:26 unmatched} \o/
14:27 unmatched} That's it. huggable has been migrated to IRC::Client v3, so hopefully she won't be going AWOL all the time.
14:27 bpmedley joined #perl6
14:28 timotimo jnthn: ah, ok ... we already do DCE for return_type being void, right?
14:29 timotimo but of course the DCE can't do everything we could do if we generate code for sink vs non-sink
14:29 ptolemarch joined #perl6
14:29 danaj joined #perl6
14:30 jnthn timotimo: Yeah, it's a bit hard for spesh to see "deeply enough" in all cases
14:30 jnthn I'm not sure we nail the DCE as well as we should at the moment, either.
14:31 timotimo could very well be
14:31 niko :10
14:34 timotimo jnthn: was there some plan you had in mind for making concurrent pushes to VMArray safe?
14:35 jnthn timotimo: Yeah, though in the "won't crash the VM" sense only
14:35 jnthn (You can still lose data)
14:35 timotimo right
14:35 timotimo what was it based on?
14:35 jnthn But basically, you just move the ssize, count, elems etc. into the dynamically allocated portion
14:35 jnthn And manage the memory of that using the fixed size allocator
14:36 jnthn Which has a free-at-safepoint operation
14:36 jnthn ssize then becomes immutable for the lifetime of that chunk
14:36 timotimo ah
14:36 timotimo but that also forces it behind a lock that a thread has to acquire before doing stuff to it
14:37 jnthn And then you do the classic persistent data structure trick: only ever read the head once
14:37 jnthn There's no locking needed inside of VMArray for this
14:37 jnthn And the FSA will, eventually, be smart enough to not need to look in all cases
14:37 timotimo ah, that's the missing piece, then :)
14:39 mcmillhj joined #perl6
14:42 jnthn So. Much. To. Do. :)
14:43 Woodi that sink business - is it standard in-compiler or something is invented ? becouse looks like very hand-optimized in not-automatic sense... Pascal had functions and procedures and procedures wasn't returning a result; combined with C void it could be known/propagated automatically, maybe ?
14:45 Woodi and every method/functions checking for sink is scary...
14:46 Woodi reading about Lisp makes one wants to return/generate functions on demand :)
14:48 nebg joined #perl6
14:51 jnthn Woodi: We're not talking about every method/function, we're talking about the cases where the method can very usefully return something about the operation it just did, but that isn't always needed, and where it's tricky for the compiler to see it's pure.
14:51 jnthn Which isn't the common case.
14:52 nebg left #perl6
14:54 harmil_wk joined #perl6
14:55 harmil_wk m: my %items = a => 1, b => 2, Mu => 3; say %items.keys.map: {.defined}
14:55 camelia rakudo-moar c8c27e: OUTPUT«(True True True)␤»
14:55 harmil_wk There's a poem is "Mu is a key that's True"
14:56 harmil_wk Anyway, anyone know why that isn't True, True, False?
14:56 jnthn Because foo => ... is always taken as a literal key
14:56 harmil_wk Oh, duh! Thanks
14:56 jnthn Further, hashes coerce their keys to strings :)
14:56 jnthn So you'd need an object hash
14:57 jnthn my %items{Mu} = a => 1, b => 2, (Mu) => 3; say %items.keys.map: *.defined
14:57 jnthn m: my %items{Mu} = a => 1, b => 2, (Mu) => 3; say %items.keys.map: *.defined
14:57 camelia rakudo-moar c8c27e: OUTPUT«(True True False)␤»
14:58 harmil_wk Nifty. Thanks. I'm trying to unpeel an example someone who doesn't know Perl 6 found, and it's really hard to have a proxy conversation like that.
15:06 gregf_ m: 1.^mro
15:06 camelia rakudo-moar c8c27e: ( no output )
15:06 gregf_ m: say 1.^mro
15:06 camelia rakudo-moar c8c27e: OUTPUT«((Int) (Cool) (Any) (Mu))␤»
15:06 cdg joined #perl6
15:06 nebg joined #perl6
15:06 nebg left #perl6
15:09 Nex6 joined #perl6
15:13 dalek doc: 3a68dbb | titsuki++ | doc/Language/operators.pod6:
15:13 dalek doc: Fix typo from assoc<none> to assoc<non>
15:13 dalek doc: review: https://github.com/perl6/doc/commit/3a68dbb1f5
15:13 dalek doc: 4553283 | (Itsuki Toyota)++ | doc/Language/operators.pod6:
15:13 dalek doc: Merge pull request #825 from titsuki/fix-typo
15:13 dalek doc:
15:13 dalek doc: Fix typo from assoc<none> to assoc<non>
15:13 dalek doc: review: https://github.com/perl6/doc/commit/4553283892
15:13 timotimo jnthn: is there a gotcha for nqp::issink()? like, do i have to make extra sure the voidness is actually spesh-time-known? because i don't see anything difficult and i could probably whip up a prototype tonight
15:16 timotimo .o( maybe we should call it nqp::insink() instead. or just go all the way and call it nqp::nsync() )
15:21 perlpilot .oO( nqp::sinking? )
15:22 harmil_wk timotimo: you take that back!
15:23 timotimo so tell me what to do now. cause i take that back!
15:23 timotimo cue intricate boyband dance routine
15:30 cdg joined #perl6
15:33 harmil_wk Is there a long-term plan for Rats being upgraded to FatRats on overflow? I can't recall the previous discussion.
15:33 timotimo i think Rats will only overflow into Num, but when you have one FatRat, it'll infect all arithmetic
15:33 harmil_wk If so, then this doesn't matter. But if not, I really think overflow should give a warning or outright fail.
15:34 harmil_wk m: say 1/10**308 == 0
15:34 camelia rakudo-moar a44a13: OUTPUT«True␤»
15:34 zakharyas joined #perl6
15:34 harmil_wk m: say 1/10**307 == 0
15:34 camelia rakudo-moar a44a13: OUTPUT«False␤»
15:43 TimToady m: say 1e0/10**308 == 0
15:43 camelia rakudo-moar a44a13: OUTPUT«False␤»
15:44 TimToady m: say 1e0/10**308
15:44 camelia rakudo-moar a44a13: OUTPUT«1e-308␤»
15:44 TimToady m: say 1e0/10**309 == 0
15:44 camelia rakudo-moar a44a13: OUTPUT«True␤»
15:47 zacts joined #perl6
15:48 autarch joined #perl6
15:54 TEttinger joined #perl6
15:54 gregf_ m: say 1/10**308 =~= 0
15:54 camelia rakudo-moar 44a90a: OUTPUT«True␤»
15:54 josred00 joined #perl6
15:55 josred00 hello everyone !
15:55 unmatched} \o
15:56 timotimo greetings
15:56 TimToady o/
15:56 josred00 TimToady: hellO !
15:56 josred00 \o/
15:56 TimToady uhoh :)
15:56 josred00 why this community is soooo much better than perl5  ?
15:56 TimToady smaller, mostly
15:57 josred00 TimToady: and relaaaxed...
15:59 unmatched} josred00: what's wrong with Perl 5's community?
15:59 josred00 unmatched}: they are soo arrogant...
16:00 buggable joined #perl6
16:00 josred00 and freedom of expression or ideas it not possible
16:00 josred00 a user just got banned by an admin which starts with "m" and finishes with "t"
16:00 unmatched} josred00: are you sure it's not just one or two individuals and not "the community"?
16:01 josred00 unmatched}: yeah you are right
16:01 josred00 but these indiviuals are the admins
16:01 josred00 and a user got banned
16:01 josred00 today and another one yesterday
16:01 TimToady well, sometimes people need to be banned, at least temporarily
16:01 buggable joined #perl6
16:01 josred00 TimToady: i was banned permanently
16:02 TimToady so of course you're an impartial observer :P
16:02 josred00 just for having a different point of view...
16:02 josred00 TimToady: yeah you are right
16:03 TimToady in general, it's not usually just for having a different point of view, but expressing it odiously, though of course sometime intentions are misread
16:03 unmatched} josred00: so you got banned by one admin, you feel it was done unfairly, and so you said entire Perl 5 community is arroangt? :P c'mon
16:03 TEttinger joined #perl6
16:04 josred00 unmatched}: yeah you are right... but it's not the first time
16:06 [Coke] not the first time you've been banned? I'm sensing a pattern. :)
16:06 unmatched} :D
16:06 TimToady ENOTHERE
16:06 [Coke] anyway, ranting about getting banned on p5 here isn't really a great intro for you to the community. Do you ahve some perl 6 questions we can help with?
16:06 mst he already quit
16:07 * [Coke] ponders re-enabling the event notifications for join/quit
16:07 TimToady it's easy enough to ignore if it comes out a different color
16:07 mst I tempbanned him for calling all mac users stupid, his ban became permanent when his response was "rename the channel to #north-korea if you don't like opinions" followed by threatening to evade
16:07 mst then he evaded and I dropped a couple k-lines on him
16:08 unmatched} :}
16:08 [Coke]
16:08 [Coke] joined #perl6
16:09 TimToady oh no!  [Coke] has quit and joined!
16:09 * [Coke] has a hard time making sure his irssi options save properly, so he did it old school.
16:09 vcv well he wasnt lying. that is a "different point of view" and he was banned for it ;)
16:10 timotimo and it was by an admin starting with m and ending in t
16:11 TimToady Why are people who engage in cultural warfare always so surprised when culture shoots back?
16:12 mst TimToady: quotefiled :D
16:12 TimToady that's why I capitalized it :)
16:12 huf now is the time to capitalize on it
16:12 TimToady not if you're british
16:13 dj_goku is ?%hash{'key'} the correct way to say if key exists in hash?
16:13 unmatched} dj_goku: no, because that'll also give False for when the key is 0 or ''
16:13 unmatched} *when value is
16:13 unmatched} dj_goku: %hash<key>:exists
16:14 dj_goku m: my %hash = ('test', 1, 'test2', 2); say %hash<test3>:exists
16:14 camelia rakudo-moar 44a90a: OUTPUT«False␤»
16:15 dj_goku m: my %hash = ('test', 1, 'test2', 2); say %hash{'test3'}:exists
16:15 camelia rakudo-moar 44a90a: OUTPUT«False␤»
16:15 dj_goku unmatched}: thanks!
16:15 TimToady occasionally you'll have to put parens around it
16:15 TimToady if :exists attaches to the wrong verb
16:16 unmatched} m: my %hash = ('test', 1, 'test2', 2); say %hash<test test3 test2 test4>:v
16:16 camelia rakudo-moar 44a90a: OUTPUT«(1 2)␤»
16:16 TimToady that's another approach
16:17 TimToady m: my %hash = ('test', 1, 'test2', 2); say %hash<test test3 test2 test4>:k
16:17 camelia rakudo-moar 44a90a: OUTPUT«(test test2)␤»
16:19 gnull joined #perl6
16:21 mst oh, also, if he appears in here again then suddenly disappears, that'll be because he evaded him ban in #perl again, at which point I'll be dropping his IP address
16:22 timotimo but what if he has more than one IP address?
16:23 mst then we'll play the traditional game, known as "you're going to get bored before I run out of popcorn"
16:23 awwaiid timotimo: there's an algorithm for that
16:23 timotimo hehe.
16:25 freezerburnv_ joined #perl6
16:26 kurahaupo joined #perl6
16:28 dj_goku m: my %hash = ('test', 1, 'test2', 2); say %hash{'test3'}<test>:exists
16:28 camelia rakudo-moar 44a90a: OUTPUT«False␤»
16:29 dj_goku m: my %hash = ('test', 1, 'test2', 2); say %hash{'test3'}<test>:exists; %hash{'test'}<test> = 1; say %hash{'test3'}<test>:exists;
16:29 camelia rakudo-moar 44a90a: OUTPUT«False␤Type Int does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:29 pierre_ joined #perl6
16:29 buggable joined #perl6
16:30 unmatched} m: my %hash = ('test', { foo => "bar }, 'test2', 2); say %hash{'test'}<foo>:exists;
16:30 camelia rakudo-moar 44a90a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3st2', 2); say %hash{'test'}<foo>:exists;7⏏5<EOL>␤    expecting any of:␤        postfix␤        statem…»
16:30 unmatched} m: my %hash = ('test', { foo => "bar" }, 'test2', 2); say %hash{'test'}<foo>:exists;
16:30 camelia rakudo-moar 44a90a: OUTPUT«True␤»
16:30 smls joined #perl6
16:31 bob777 joined #perl6
16:31 dj_goku m: my %hash = ('test', 1, 'test2', 2); say %hash{'test3'}<test>:exists; %hash{'test'}<test> = 1;
16:31 camelia rakudo-moar 44a90a: OUTPUT«False␤Type Int does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:32 dj_goku oh
16:32 dj_goku m: my %hash = ('test', 1, 'test2', 2); say %hash{'test3'}<test>:exists; %hash{'test3'}<test> = 1; say %hash{'test3'}<test>:exists;
16:32 camelia rakudo-moar 44a90a: OUTPUT«False␤True␤»
16:32 dj_goku :D
16:33 dj_goku %hash{'test'} was already created and I was trying to switch it over to a nested hash to 1.
16:38 dalek doc: d3d1bb6 | Altai-man++ | doc/Type/ (21 files):
16:38 dalek doc: Many changes were done. In particular:
16:38 dalek doc: - Many of obsolete due to https://github.com/perl6/doc/issues/794 "Usage" sections were removed or updated with examples(not for all files for now, but for about a half).
16:38 dalek doc: - Usage sections of Cool and Channel pages were replaced with examples.
16:38 dalek doc: - Examples for the Cool documentation page were updated and expanded.
16:38 dalek doc: - Type documentation files that start with a 'C' letter are compilable now.
16:38 dalek doc: review: https://github.com/perl6/doc/commit/d3d1bb6e74
16:40 sena_kun afk for an hour&
16:41 setty1 joined #perl6
16:58 dalek doc: 63c721b | titsuki++ | doc/Type/Hash.pod6:
16:58 dalek doc: Add a missing sharp symbol
16:58 dalek doc: review: https://github.com/perl6/doc/commit/63c721bfcf
16:58 dalek doc: b86422c | (Itsuki Toyota)++ | doc/Type/Hash.pod6:
16:58 dalek doc: Merge pull request #826 from titsuki/add-sharp
16:58 dalek doc:
16:58 dalek doc: Add a missing sharp symbol
16:58 dalek doc: review: https://github.com/perl6/doc/commit/b86422c578
17:02 dalek doc: 92840d9 | titsuki++ | doc/Type/Hash.pod6:
17:02 dalek doc: Add a missing semicolon
17:02 dalek doc: review: https://github.com/perl6/doc/commit/92840d9d01
17:02 dalek doc: 5bc1a46 | (Itsuki Toyota)++ | doc/Type/Hash.pod6:
17:02 dalek doc: Merge pull request #827 from titsuki/add-semicolon
17:02 dalek doc:
17:02 dalek doc: Add a missing semicolon
17:02 dalek doc: review: https://github.com/perl6/doc/commit/5bc1a4631d
17:03 sufrostico joined #perl6
17:05 cibs joined #perl6
17:08 harmil_wk TimToady: it's true that using an explicit Num gets you consistency, but it also defeats the inherent Rattiness of Perl6 integer division.
17:09 harmil_wk I was just saying that if you're working with Rats e.g. 1/10 and you keep multiplying by 1/10 308 times, then you should probably get at least a warning that you've dropped down into a Num and thrown away your precision.
17:11 harmil_wk Nummy, Ratty Perl 6. Sounds like a good book title.
17:16 sufrostico joined #perl6
17:22 grondilu m: say +combinations(1e10, 1);
17:22 camelia rakudo-moar 44a90a: OUTPUT«First parameter out of range. Is: 10000000000, should be in 1..2147483647␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:23 grondilu seems lta
17:24 grondilu I mean since we have a count-only method we should accept large values.
17:26 grondilu maybe the fail calls should be in the pull-one method of the Seq?
17:27 mcmillhj joined #perl6
17:27 grondilu m: say 2147483647.base(2)
17:27 camelia rakudo-moar 44a90a: OUTPUT«1111111111111111111111111111111␤»
17:27 grondilu m: say 2147483647.log/log(2)
17:27 camelia rakudo-moar 44a90a: OUTPUT«30.9999999993282␤»
17:28 grondilu m: say 2147483647.base(16)
17:28 camelia rakudo-moar 44a90a: OUTPUT«7FFFFFFF␤»
17:29 TimToady m: say 2147483647.base(32)
17:29 camelia rakudo-moar 44a90a: OUTPUT«1VVVVVV␤»
17:29 grondilu also, shouldn't large literal integers in the code be noted in hexadecimal for readability?
17:31 grondilu m: say 2147483648.base(16)
17:31 camelia rakudo-moar 44a90a: OUTPUT«80000000␤»
17:33 TimToady I dunno, when I see hex I feel compelled to count 0s or Fs, but when I see 2147483647 I just assume it's 2**31-1
17:36 mcmillhj joined #perl6
17:37 spider-mario joined #perl6
17:39 spider-mario joined #perl6
17:43 grondilu m: say 0x7F_FF_FF_FF
17:43 camelia rakudo-moar 44a90a: OUTPUT«2147483647␤»
17:43 grondilu m: say 0x7FFF_FFFF
17:43 camelia rakudo-moar 44a90a: OUTPUT«2147483647␤»
17:44 firstdayonthejob joined #perl6
17:44 grondilu m: say 0b0100_0000_0000_0000
17:44 camelia rakudo-moar 44a90a: OUTPUT«16384␤»
17:44 grondilu oops
17:44 grondilu oh yeah
17:44 grondilu fine, decimal it is.
17:53 pdcawley joined #perl6
17:54 TEttinger joined #perl6
17:57 gnull joined #perl6
18:09 silug joined #perl6
18:11 cpage_ joined #perl6
18:13 labster joined #perl6
18:16 itaipu joined #perl6
18:25 TEttinger joined #perl6
18:25 Sqirrel joined #perl6
18:32 TEttinger joined #perl6
18:35 mst hrm. what's a good way to test my terminal + editor setup are able to handle the unicode stuff?
18:35 mst I think I need an idiot's guide to getting a sufficiently working setup to be able to take advantage of perl6
18:36 mst and I'm not sure where to look for one :/
18:36 mspo «can you see the arrow-quotes?»
18:37 unmatched} All of Perl 6's fancy pants Unicode stuff is on this page: https://docs.perl6.org/language/unicode_texas.html
18:37 mspo mst: https://docs.perl6.org/language/unicode_entry
18:37 masak since I switched to irc.p6c.org I haven't been able to see Unicode stuff :/
18:37 masak haven't bothered to figure out where the problem lies yet
18:37 masak my LANG envvar seems fine
18:37 Hotkeys Is that a web chat
18:37 Hotkeys Or an irc server
18:37 mst mspo: ooooo
18:38 masak Hotkeys: just an ssh server for people who don't want their `screen` to die so often
18:38 mspo mst: I'm using screen + vim and after a few hints from here it worked
18:39 masak oh, cool. that "Unix shell" entry works here in irssi! :D
18:39 masak except I can't see the result :P :/
18:39 mspo mst: defutf8 on
18:39 dalek doc: cf3a79e | (Zoffix Znet)++ | doc/Language/unicode_texas.pod6:
18:39 dalek doc: Mention « and » are also fancy versions of regex word boundaries
18:39 dalek doc: review: https://github.com/perl6/doc/commit/cf3a79e362
18:39 mspo in .screenrc
18:40 mspo also the -U option
18:40 mspo set LANG=en_US.UTF-8  (or whatever for you)
18:40 mspo mst: what kind of computer are you on?
18:40 mspo I can help with osx
18:40 unmatched} .oO( white one... )
18:41 mst unmatched}: actually, it's more a dark grey
18:41 mst I hear mauve has the most RAM, though
18:41 unmatched} :)
18:41 mst mspo: debian here
18:45 cdg joined #perl6
18:49 jnthn_ joined #perl6
18:49 kshannon_ joined #perl6
18:50 mls_ joined #perl6
18:50 gypsydav15 joined #perl6
18:50 revdiablo joined #perl6
18:50 broquain1 joined #perl6
18:50 mst welp. I think I typed a lambda.
18:50 Kaffe_ joined #perl6
18:50 sjohnsen- joined #perl6
18:50 ChoHag_ joined #perl6
18:50 ponbiki_ joined #perl6
18:50 mst my terminal ... does not know how to display one
18:50 sivoais_ joined #perl6
18:50 yossarian joined #perl6
18:50 kst` joined #perl6
18:50 unmatched} weeeeeeeeeeeeeeeeeeeee
18:50 Psy-Q_ joined #perl6
18:50 sjohnson joined #perl6
18:50 unmatched} .u lambda
18:50 yoleaux U+019B LATIN SMALL LETTER LAMBDA WITH STROKE [Ll] (ƛ)
18:50 yoleaux U+039B GREEK CAPITAL LETTER LAMDA [Lu] (Λ)
18:50 yoleaux U+03BB GREEK SMALL LETTER LAMDA [Ll] (λ)
18:50 emdashcomma joined #perl6
18:50 woodruffw joined #perl6
18:50 vike joined #perl6
18:52 jnap_ joined #perl6
18:52 protium joined #perl6
18:52 itaipu joined #perl6
18:52 [ptc] joined #perl6
19:00 TimToady ooh, it made the B optional
19:02 unmatched} TIL it's "lamda" and not "lambda" :o
19:02 * [Coke] thinks lamda is a weird spelling.
19:02 unmatched} Oh, both exist...
19:11 harovali joined #perl6
19:12 webstrand joined #perl6
19:13 dalek doc: 8a2bc96 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
19:13 dalek doc: doc is required
19:13 dalek doc: review: https://github.com/perl6/doc/commit/8a2bc96aa7
19:20 dalek doc: 84469b4 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
19:20 dalek doc: better example
19:20 dalek doc: review: https://github.com/perl6/doc/commit/84469b489f
19:20 dalek doc: 845097f | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
19:20 dalek doc: tell that BUILD don't got access to public accessors
19:20 dalek doc: review: https://github.com/perl6/doc/commit/845097f20a
19:32 chienjo joined #perl6
19:33 michiamodiego joined #perl6
19:35 sno joined #perl6
19:36 rindolf joined #perl6
19:38 SmokeMachine____ joined #perl6
19:46 cdg joined #perl6
19:47 mls_ joined #perl6
19:47 jnap_ joined #perl6
19:47 SmokeMachine____ joined #perl6
19:58 lizmat And another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/08/08/2016-32-a-quiet-week/
19:59 timotimo cool, lizmat++ :)
20:01 dalek doc: d2b4042 | coke++ | doc/Language/typesystem.pod6:
20:01 dalek doc: whitespace
20:01 dalek doc: review: https://github.com/perl6/doc/commit/d2b40425ea
20:02 sena_kun lizmat++
20:04 canopus joined #perl6
20:04 timotimo Writing heap snapshot to heap-snapshot-1470686645.4345
20:04 timotimo ===SORRY!===
20:04 timotimo SC not yet resolved; lookup failed
20:05 timotimo jnthn: ^ this seems new?
20:05 skids joined #perl6
20:05 freezerburnv_ joined #perl6
20:06 timotimo i wonder when this b0rked? it's not really something i can use bisectable for ...
20:06 timotimo hmm. maybe ...
20:10 gfldex lizmat: the weekly link to YAPC::Europe seams to be broken
20:10 timotimo on my desktop at home the heap profiler seems to still work
20:11 lizmat gfldex++   # fixed
20:21 awwaiid joined #perl6
20:25 jnthn timotimo: Not seen that before, no. :S
20:25 timotimo This is Rakudo version 2016.07.1-126-g02fdcf9 built on MoarVM version 2016.07-16-g85b6537
20:25 timotimo ^- good revision
20:26 timotimo This is Rakudo version 2016.07.1-141-gfb42520 built on MoarVM version 2016.07-16-g85b6537
20:26 timotimo ^- bad revision
20:26 timotimo should make it bisectable enough
20:28 awwaiid joined #perl6
20:30 rightfold joined #perl6
20:30 rightfold .botsnack
20:30 synopsebot6 om nom nom
20:30 yoleaux :D
20:30 timotimo greetings rightfold
20:30 timotimo nice to see you again :)
20:30 rightfold hola
20:30 rightfold thanks!
20:31 rightfold I should retry Perl 6 after all these months
20:31 rightfold oh still 6.c :v
20:33 lizmat rightfold: but significantly faster!
20:33 rightfold yay
20:35 lizmat the test-t canary (from Text::CSV) has gone from 12.5 seconds on Jan 1st, to 7.5 seconds today
20:36 lizmat of which only .5 seconds can be attributed to changes in Text::CSV itself
20:36 lizmat hmmm... actually, it was 7.3 today  :-)
20:39 acrussell joined #perl6
20:40 japanoise joined #perl6
20:53 dalek doc: d09b99c | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
20:53 dalek doc: remove extra indentation
20:53 dalek doc: review: https://github.com/perl6/doc/commit/d09b99c160
20:54 sena_kun m: &(X::Does::TypeObject.new.type).signature;
20:54 camelia rakudo-moar fb4252: OUTPUT«Method 'signature' not found for invocant of class 'Mu'␤  in block <unit> at <tmp> line 1␤␤»
20:55 sena_kun Hmm...
20:57 kid51 joined #perl6
20:59 hankache joined #perl6
21:00 sena_kun m: X::Does::TypeObject.new.^methods()[1].signature;
21:00 camelia rakudo-moar fb4252: ( no output )
21:02 timotimo you need to "say" it
21:03 lichtkind_ joined #perl6
21:03 ZoffixMobile joined #perl6
21:04 sena_kun timotimo, yes, I know. I just showed that I found a way to do what I needed, so nobody should worry about this mysterious messages. (:
21:05 ZoffixMobile rightfold, 6.c is the language version and isn't going to be changing much. There's also the compiler version that increases every month.
21:05 timotimo ah, ok
21:05 rightfold oh I see
21:05 rightfold coolio
21:18 trnh joined #perl6
21:21 sivoais joined #perl6
21:30 mcmillhj joined #perl6
21:38 sena_kun How can I get X::TypeCheck::Splice exception?
21:38 sena_kun m: use experimental :macros; macro a { 'foo' }; say a;
21:38 camelia rakudo-moar fb4252: OUTPUT«===SORRY!===␤Too few positionals passed; expected 3 arguments but got 2␤»
21:39 ZoffixMobile Other than throwing it directly?
21:39 sena_kun ZoffixMobile, other than.
21:39 ZoffixMobile m: X::TypeCheck::Splice.new.throw
21:39 camelia rakudo-moar fb4252: OUTPUT«Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.  in block <unit> at <tmp> line 1␤Type check failed in ; expected Any but got Any␤  in block <unit> at…»
21:39 sena_kun It's an example for documentation, so it'd be strange to throw it directly. :)
21:40 ZoffixMobile Maybe grep rakudo's source to see where it's being thrown?
21:40 sena_kun Old example now throws another thing...
21:40 sena_kun I'll try to do it now. Thanks, ZoffixMobile.
21:42 dalek doc: 5cb96bd | coke++ | doc/Language/experimental.pod6:
21:42 dalek doc: slight reword; add explicit example; add macros
21:42 dalek doc: review: https://github.com/perl6/doc/commit/5cb96bd472
21:44 freezerburnv_ joined #perl6
21:45 ZoffixMobile m: my @a of Int; try { @a.splice: 0, 1, 'a'; CATCH { default { warn .^name}}}
21:45 camelia rakudo-moar fb4252: OUTPUT«X::TypeCheck::Splice  in block  at <tmp> line 1␤»
21:46 ZoffixMobile sena_kun, seems to be when you try to splice a replacement that doesn't match the type of elems in array
21:48 sena_kun ZoffixMobile, it's strange. Judging by https://github.com/rakudo/rakudo/blob/8cbb1efd1d84fd57298e0e0813b64d8dd37140ba/src/core/AST.pm it definetely has connection to AST/quasi-quoting.
21:49 ZoffixMobile sena_kun, yeah there's that macro stuff too that I know nothing about
21:49 sena_kun ZoffixMobile, I'm checking https://docs.perl6.org/type/X$COLON$COLONTypeCheck$COLON$COLONSplice currently(you can guess that, of course) and it seems to be quite outdated.
21:50 timotimo maybe we should have a $DBLCOLON
21:50 timotimo since $COLON$COLON is going to be in a lot of urls ...
21:50 sena_kun Probably, tomorrow it would be better to ask someone who knows better this type.
21:52 mcmillhj joined #perl6
21:52 sena_kun timotimo, yep, we have such issue. See https://github.com/perl6/doc/issues/698
21:52 timotimo OK :)
21:55 ZoffixMobile .oO( power the docs by a thin web app... )
21:55 timotimo hard drive with HTTPS ports
21:57 dalek doc: f4127b8 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
21:57 dalek doc: explain undefined values
21:57 dalek doc: review: https://github.com/perl6/doc/commit/f4127b8454
22:01 rightfold left #perl6
22:04 mcmillhj joined #perl6
22:06 [Coke] dumb docker question - given https://hub.docker.com/_/rakudo-star/, how can I run a container that will stay up so I can connect to it and run multiple perl 6 commands in the shell inside, (rather than having it start a perl 6 interpreter on startup and then go away when the perl6 instance exits?
22:07 jnthn Maybe something like `docker run rakudo-star /bin/sh`?
22:07 timotimo start a tmux in it? :)
22:08 jnthn Or alternatively docker run -d rakudo-star
22:08 jnthn And then docker exec to run commands in it
22:09 jnthn You can docker run -d --name foo rakudo-start
22:09 [Coke] right, -d -t; danke.
22:09 [Coke] see, it was a dumb question. :)
22:09 jnthn So that you've a convenient name to use with exec
22:10 [Coke] eventually putting a bailador app in there, but need something to play with momentarily.
22:10 jnthn Hmm, that reminds me I planned to implement a Docker::Client for Perl 6 at some point :)
22:10 jnthn That's a bit more work than my existing Docker::File though :)
22:11 jnthn And I've already got 2 started modules to finish :)
22:12 jnthn Talking of finishing things...time to finish the day. 'night o/
22:13 timotimo you got 2 start modules? :P
22:20 Sgeo_ joined #perl6
22:24 mcmillhj joined #perl6
22:26 dalek doc: 73f71b8 | (Wenzel P. P. Peppmeyer)++ | doc/Language/typesystem.pod6:
22:26 dalek doc: add comma
22:26 dalek doc: review: https://github.com/perl6/doc/commit/73f71b8c14
22:27 ribasushi joined #perl6
22:27 RabidGravy 2 started modules? pah! I've got eight right now ;-)
22:28 timotimo hey mister gravy!
22:28 timotimo i'm going to be walking around now, so can't type, but i'd like to chat with you a bit again :)
22:28 RabidGravy rarr!
22:36 gfldex timotimo: the idea behind $COLON is that they are uninames for the chars in question. So one can translate them back automatically if there is need be.
22:37 mcmillhj joined #perl6
22:37 gfldex timotimo: see https://github.com/perl6/doc/blob/master/lib/Pod/Htmlify.pm6#L17
22:38 timotimo oh ok
22:50 japanoise joined #perl6
22:56 mcmillhj joined #perl6
23:06 _28_ria joined #perl6
23:06 freezerburnv_ joined #perl6
23:09 mcmillhj joined #perl6
23:12 timotimo 2/me returns
23:12 * timotimo returns
23:22 mcmillhj joined #perl6
23:24 pierre_ joined #perl6
23:25 dalek doc: f61a94d | Altai-man++ | doc/Type/X/ (80 files):
23:25 dalek doc: Make examples for all exception types compile.
23:25 dalek doc: review: https://github.com/perl6/doc/commit/f61a94d9a4
23:42 mcmillhj joined #perl6
23:56 zacts joined #perl6
23:58 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo