Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 rindolf Hi all.
00:00 rindolf Hmmm... fglock's not here.
00:00 rindolf Sucks to be me.
00:04 timotimo _nadim: i don't know if i understand you right, but you may want .chomp
00:07 El_Che tadzik: just send a small PR for Config::INI for #comments next to ;comments. Maybe less strict ini, but pretty much the default in Unix-like oses
00:21 AlexDaniel m: once once once once { say ‘hello’ };
00:21 camelia rakudo-moar 5ed58f: OUTPUT«hello␤»
00:22 llfourn joined #perl6
00:26 [Tux] joined #perl6
00:38 rodi joined #perl6
00:47 rurban joined #perl6
00:51 tadzik El_Che: alright, will look at it tomorrow, if I don't please remind me :)
00:55 yeahnoob joined #perl6
00:59 helloworldlang joined #perl6
01:02 pierre-vigier joined #perl6
01:03 ribasushi joined #perl6
01:05 kaare_ joined #perl6
01:08 pierre-vigier hi
01:09 pierre-vigier i have an OOP question again, let's say i have a class A with a private attribute class A { has $!private; }
01:10 pierre-vigier then i want to create a method equal in A that take another A instance, and return True if both the private attribute private of the 2 instances are equals
01:10 pierre-vigier but i do not want to create a public accessor
01:10 pierre-vigier is there a way to do that?
01:12 Actualeyes joined #perl6
01:16 AlexDaniel pierre-vigier: ok, well, I know one way
01:16 AlexDaniel pierre-vigier: create a private method and use that
01:16 cdg joined #perl6
01:17 pierre-vigier but i will not be able to call the private method of another instance, will i ?
01:17 pierre-vigier let me try
01:17 AlexDaniel pierre-vigier: as long as it is in the same class it should be fine
01:20 pierre-vigier hum, it is working
01:20 pierre-vigier thanks
01:20 _nadim joined #perl6
01:20 pierre-vigier still, i do not get why i can access private methods, but not private attributes
01:20 AlexDaniel pierre-vigier: private attributes have no accessors
01:21 AlexDaniel why can't they have a private accessor is a good question…
01:21 pierre-vigier yes, but inside your class you can access them through $!private
01:21 AlexDaniel really, why?
01:22 leont Yeah, I've hit this too
01:22 pierre-vigier but, indeed, when trying to access a private attribute of another instance, i have the following message:
01:23 pierre-vigier ===SORRY!=== Error while compiling class.pl
01:23 pierre-vigier No such private method 'private' for invocant of type 'A'
01:23 pierre-vigier at class.pl:16
01:23 pierre-vigier so it is trying to find a method, thank you
01:23 llfourn joined #perl6
01:23 AlexDaniel pierre-vigier: well, thank you for asking this question
01:24 AlexDaniel perhaps it should have a private method by default
01:24 AlexDaniel pierre-vigier: how often do you need that?
01:25 pierre-vigier in fact, i'm working on a module for matrices
01:25 pierre-vigier the internal structure is an array of array, will be switch to shaped array later
01:25 pierre-vigier when adding matrices, comparing equlity, ...
01:26 pierre-vigier those kind of things between 2 instances
01:26 AlexDaniel pierre-vigier: maybe you can create a trait to make it less annoying
01:26 pierre-vigier i want to access the internal storage form
01:26 pierre-vigier a trait that create a private accessor?
01:27 AlexDaniel yes
01:27 pierre-vigier i need to check what happens, if i have a private attribute and a private method with the same name
01:32 pierre-vigier p6: my class A { has $!private = 2; method !private() { "plop"}; method call { say $!private}; method call2 {say $!private()}; method call3() {say self!private;} }; my $a = A.new(); $a.call();$a.call3();
01:32 camelia rakudo-moar 5ed58f: OUTPUT«2␤plop␤»
01:33 pierre-vigier call2 is crashing
01:33 pierre-vigier p6: my class A { has $!private = 2; method !private() { "plop"}; method call { say $!private}; method call2 {say $!private()}; method call3() {say self!private;} }; my $a = A.new(); $a.call2();
01:33 camelia rakudo-moar 5ed58f: OUTPUT«Cannot find method 'CALL-ME'␤  in method call2 at /tmp/tmpfile line 1␤  in block <unit> at /tmp/tmpfile line 1␤␤»
01:33 pierre-vigier so it should be ok
01:33 pierre-vigier self! for method , $! for attribute
01:34 pierre-vigier thank you
01:34 pierre-vigier i'll do that
01:38 pierre-vigier joined #perl6
01:40 pierre-vigier joined #perl6
01:43 jack_rabbit joined #perl6
01:44 skids joined #perl6
01:44 zengargoyle joined #perl6
01:49 pierre-vigier joined #perl6
01:51 rurban1 joined #perl6
01:52 autarch the rakudo README.md currently asks people to send patches via rakudobug - is there any reason not to change this to asking for a PR? a PR is A) what all the cool kids are doing; B) easier for many folks; C) runs through Travis, which is really nice
01:53 autarch (note that A is a joke before anyone gets up in arms ;)
01:57 yurivish joined #perl6
02:07 flussence .oO( Cool Kids Don't Read READMEs )
02:08 milwen I tried getting all up in arms once, but then I.....
02:08 milwen spent all day looking for a whetstone.
02:08 domm_ joined #perl6
02:11 flussence but my guess is it's an intentional roadbump, because rakudo came from an era when putting roadbumps everywhere was the norm (it still has Parrot's CLA requirement, which can't be changed)
02:13 autarch I don't see anything about a CLA in there
02:14 peter__ joined #perl6
02:14 autarch ah, it's for a commit bit - somewhat annoying but less annoying if patches and PRs can be accepted without one
02:14 autarch ugh, it requires sending snail mail? that's ... is insane too strong a word?
02:15 autarch facebook does this pretty nicely - if you submit a PR for one of their project, they have a bot that checks if you've signed their agreement and it prompts you to do so (by going to a website because this is not the 90s)
02:22 llfourn joined #perl6
02:24 xpen joined #perl6
02:27 dalek rakudo-star-daily: bfdc358 | coke++ | log/ (6 files):
02:27 dalek rakudo-star-daily: today (automated commit)
02:27 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/bfdc358797
02:47 ilbot3 joined #perl6
02: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!
02:48 AlexDaniel joined #perl6
02:49 zwu joined #perl6
02:50 pierre-vigier joined #perl6
02:50 zengargoyle joined #perl6
02:56 molaf_ joined #perl6
02:58 zhi joined #perl6
03:23 llfourn joined #perl6
03:30 psy_ joined #perl6
03:34 linuxuser9000 joined #perl6
03:49 cpage_ joined #perl6
03:54 kubrat joined #perl6
03:55 noganex_ joined #perl6
04:18 perlawhirl joined #perl6
04:20 pierre-vigier joined #perl6
04:23 perlawhirl left #perl6
04:24 llfourn joined #perl6
04:25 cpage_ joined #perl6
04:25 zwu joined #perl6
04:27 lsm joined #perl6
04:29 zwu can someone please point me where the relative code is in rakudo for the module loading, especially for the require functionality?
04:29 zwu I tried EVAL function and basically works, while the require is broker in export sub
04:30 dj_goku joined #perl6
04:36 Timbus joined #perl6
04:36 kubrat joined #perl6
04:43 jeek joined #perl6
04:49 jeek joined #perl6
05:02 revhippie left #perl6
05:09 llfourn joined #perl6
05:26 adu joined #perl6
05:31 vendethiel joined #perl6
05:31 pierre-vigier joined #perl6
05:32 pierre-vigier HI, facing some issues with trait :(
05:32 pierre-vigier m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say $attr.package; }; my class A { has $!private is test; }; my $i = A.new();
05:32 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ylF7PP8fhd␤Method 'gist' not found for invocant of class 'A'␤at /tmp/ylF7PP8fhd:1␤»
05:32 pierre-vigier i can't find the class that "owns" an attribute
05:32 pierre-vigier m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say $attr.^methods; }; my class A { has $!private is test; }; my $i = A.new();
05:32 camelia rakudo-moar 5ed58f: OUTPUT«(<anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> compose apply_handles get_value set_value container readonly package inlined WHY set_why Str gist)␤»
05:35 gfldex m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { dd $attr.package; }; my class A { has $!private is test; }; my $i = A.new();
05:35 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jfwGdDm6DV␤Method 'dispatch:<.?>' not found for invocant of class 'A'␤at /tmp/jfwGdDm6DV:1␤»
05:36 pierre-vigier something strange as well, the doc states about a method has_accessor, i can call it
05:36 pierre-vigier but i do not see it with ^methods
05:37 gfldex m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say so $attr.package ~~ Mu; }; my class A { has $!private is test; }; my $i = A.new();
05:37 camelia rakudo-moar 5ed58f: OUTPUT«False␤»
05:37 gfldex m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say so $attr.package ~~ Cool; }; my class A { has $!private is test; }; my $i = A.new();
05:37 camelia rakudo-moar 5ed58f: OUTPUT«False␤»
05:37 gfldex m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say so $attr.package ~~ Any; }; my class A { has $!private is test; }; my $i = A.new();
05:37 camelia rakudo-moar 5ed58f: OUTPUT«False␤»
05:38 gfldex m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say $attr.package.^mro; }; my class A is Cool { has $!private is test; }; my $i = A.new();
05:38 camelia rakudo-moar 5ed58f: OUTPUT«((A) (Cool) (Any) (Mu))␤»
05:39 gfldex m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say so $attr.package === A; }; my class A { has $!private is test; }; my $i = A.new();
05:39 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7KbBT6zUGm␤Cannot invoke this object␤at /tmp/7KbBT6zUGm:1␤»
05:39 gfldex m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say so $attr.package ~~ A; }; my class A { has $!private is test; }; my $i = A.new();
05:39 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uenUoTMKPc␤Cannot invoke this object␤at /tmp/uenUoTMKPc:1␤»
05:41 sortiz m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { say $attr.package.WHO; }; my class A { has $!private is test; }; my $i = A.new();
05:41 camelia rakudo-moar 5ed58f: OUTPUT«A␤»
05:42 pierre-vigier oh, ok
05:43 pierre-vigier problem what not the package call
05:43 pierre-vigier but it was the say something
05:45 pierre-vigier m: multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { my $package = $attr.package; say $package.^methods; }; my class A { has $!private is test; }; my $i = A.new();
05:45 camelia rakudo-moar 5ed58f: OUTPUT«()␤»
05:45 pierre-vigier hum ...
05:45 sortiz m: our $b; multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export { $b = $attr.package.WHO; }; my class A { has $!private is test; }; my $i = A.new(); say "  $b  ";
05:45 camelia rakudo-moar 5ed58f: OUTPUT«  A  ␤»
05:46 pierre-vigier i want to create a method in A if an attribute has that trait
05:46 dalek ecosystem: ed9e2dd | (Wenzel P. P. Peppmeyer)++ | META.list:
05:46 dalek ecosystem: dd Typesafe::HTML
05:46 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/ed9e2dd3af
05:46 pierre-vigier that's why i am trying to get to the package
05:49 pierre-vigier hum with our, it means it would not be built fully yet at "compile time" apparently
05:49 peter__ joined #perl6
05:52 cpage_ joined #perl6
05:53 sortiz The .new is at runtime, when $!private is created.
05:57 Cabanossi joined #perl6
05:58 peter__ joined #perl6
06:13 daotoad joined #perl6
06:13 peter__ joined #perl6
06:34 pierre-vigier joined #perl6
06:35 lokien_ joined #perl6
06:46 virtualsue joined #perl6
06:47 daotoad joined #perl6
06:56 TEttinger I'm trying to explain a feature I am fairly sure perl 6 has but I don't know the syntax for. if I want to add every number in an array, there's a... meta-operator? is that the term? to change + for 2 args into "sum all items"
06:56 TEttinger and there's something that gets every intermediate value from such a sum
06:56 TEttinger it's called scan in haskell and reductions in clojure
06:57 TEttinger so for [1 2 3 4] it's [1 3 6 10] or alternately [3 6 10]
06:57 TEttinger depending on implementation
06:58 TEttinger IIRC it was something like [\] appended to + or something
06:59 uruwi_ m: say [+] (1, 2, 3, 4); say [\+] (1, 2, 3, 4);
06:59 camelia rakudo-moar 5ed58f: OUTPUT«10␤(1 3 6 10)␤»
07:00 TEttinger thanks uruwi_
07:04 grondilu it's called the triangular reduction metaoperator
07:06 virtualsue joined #perl6
07:11 domidumont joined #perl6
07:14 _nadim joined #perl6
07:16 [Tux] csv-ip5xs            50000    17.971    12.465
07:16 [Tux] test                 50000    22.753    22.120
07:16 [Tux] test-t               50000    12.443    11.582
07:16 [Tux] csv-parser           50000    49.473    -0.731
07:16 [Tux] looks like they all got a little speedup :)
07:17 domidumont joined #perl6
07:24 CIAvash joined #perl6
07:37 nine .tell zwu You'll find require in src/Perl/Actions.nqp, look for sym<require>. The rest is in src/core/CompUnit*
07:37 yoleaux nine: I'll pass your message to zwu.
07:38 firstdayonthejob joined #perl6
07:41 pat_js joined #perl6
07:55 nine .tell PerlJam I'd like to know more about those CPAN modules that don't work with Inline::Perl5
07:55 yoleaux nine: I'll pass your message to PerlJam.
07:58 darutoko joined #perl6
08:02 pierre-vigier joined #perl6
08:02 _Gustaf_ joined #perl6
08:02 sena_kun joined #perl6
08:06 Ven joined #perl6
08:08 RabidGravy joined #perl6
08:08 FROGGS joined #perl6
08:12 RabidGravy morning!
08:15 Ven joined #perl6
08:15 sena_kun RabidGravy, hi.
08:16 RabidGravy eh up
08:17 bjz joined #perl6
08:22 pierre-vigier joined #perl6
08:26 pierre-vigier joined #perl6
08:37 zakharyas joined #perl6
08:37 pat_js where can I find documentation for the FALLBACK method?
08:38 sena_kun joined #perl6
08:39 rurban joined #perl6
08:39 nine pat_js: http://design.perl6.org/S12.html#FALLBACK_methods
08:39 nine It's not much however
08:40 nine pat_js: https://github.com/niner/Inline-Perl5/​blob/master/lib/Inline/Perl5.pm6#L759 for a real world example
08:43 pat_js thanks, so it doesn't update the method cache, in contrast to the add_fallback in ClassHOW?
08:43 pierre-vigier joined #perl6
08:46 abraxxa joined #perl6
08:46 ELBeavers joined #perl6
08:47 FROGGS autarch: can you create a PR for the README.md changes? (alternatively you can send a patch to rakudobug@perl.org :P)
08:50 rimad joined #perl6
08:50 FROGGS nine: that might be of interest: https://github.com/FROGGS/p6-if
08:51 FROGGS grondilu: ^^ also, remember the backend specific bits in a base64 module? that could be a nice solution to the problems we had
08:52 RabidGravy pat_js, you can add the method in the FALLBACK if you want though
08:52 RabidGravy m: class F { method FALLBACK($name) { say "FALLBACK $name"; self.^add_method($name, method { say "name" }); self."$name"(); } }; my $a = F.new; $a.blah; $a.blah;
08:52 camelia rakudo-moar 5ed58f: OUTPUT«FALLBACK blah␤name␤name␤»
08:59 pat_js RabidGravy: thanks, but I especially don't want to mess with the method cache.
09:00 Actualeyes joined #perl6
09:01 RabidGravy that's fine then, the FALLBACK will get called every time if you don't arrange to have the method provided
09:03 nine FROGGS: great! Then we just need a way to query the supported Perl versions
09:04 nine RabidGravy: when you go the add_method route, you may as well just use add_fallback directly :)
09:05 RabidGravy indeed
09:05 RabidGravy but y'know, in the spirit of TIMTOWTDI and all ;-)
09:07 RabidGravy also adding the method has the drawback that if you close over instance data then you may get the wrong result in another instance
09:09 domm_ joined #perl6
09:21 RabidGravy I find myself wanting a thing that is like a mashup between a Supply and a Promise
09:21 lokien joined #perl6
09:22 dakkar_ joined #perl6
09:26 arnsholt I'm not sure that makes sense. What is it you want?
09:27 lokien what is better - panda or zef? I don't know which one to download
09:27 leont joined #perl6
09:29 RabidGravy I know it doesn't make sense,  what I think I want is something like a Supply but when you emit to it you get a Promise back which is like Promise.allof of the results of the taps
09:30 RabidGravy like a bunch of callbacks that return a result
09:31 RabidGravy e.g. "I'm just about about to do something, if you care enough to register, let me know if you think I should"
09:38 TheFox21 joined #perl6
09:42 rurban1 joined #perl6
09:44 sjoshi joined #perl6
09:50 domm_ joined #perl6
09:57 gfldex m: role R[::T1, ::T2] {}; class C does R[C, Str] {}
09:57 camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/S9GC8mHNLl␤An exception occurred while parameterizing R␤at /tmp/S9GC8mHNLl:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Cannot invoke this object␤  at :␤»
09:58 domm_ joined #perl6
09:58 RabidGravy boom!
09:59 gfldex recursive type capture is recursive!
09:59 RabidGravy gfldex, stubbing the C first works though ;-)
10:00 gfldex m: role R[::T1, ::T2] {}; class C { ... }; class C does R[C, Str] {}
10:00 camelia rakudo-moar 5ed58f: ( no output )
10:00 gfldex it does!
10:03 rurban joined #perl6
10:06 domm_ joined #perl6
10:06 moritz this is scary.
10:07 moritz RabidGravy: doesn't Supply.map roughly do what you want?
10:07 moritz RabidGravy: instead of using taps
10:08 timotimo o/
10:08 lokien I'm not able to install zef from rakudobrew, panda install Readline/Linenoise also crashes. is it common or am I a special case here?
10:08 pierre-vigier joined #perl6
10:09 pecastro joined #perl6
10:11 espadrine joined #perl6
10:12 rindolf joined #perl6
10:13 brrt joined #perl6
10:14 lnrdo joined #perl6
10:15 lnrdo joined #perl6
10:15 kjs_ joined #perl6
10:15 dalek rakudo/nom: deabe62 | (Dave Rolsky)++ | lib/Test.pm6:
10:15 dalek rakudo/nom: Add a subtest multi that takes the name first
10:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/deabe62b08
10:15 dalek rakudo/nom: 7049d71 | (Dave Rolsky)++ | lib/Test.pm6:
10:15 dalek rakudo/nom: Output the subtest name via diag before running the subtest
10:15 dalek rakudo/nom:
10:15 dalek rakudo/nom: This matches p5, and makes the output a little easier to follow as you go
10:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7049d71148
10:15 dalek rakudo/nom: a192ec5 | lizmat++ | lib/Test.pm6:
10:15 dalek rakudo/nom: Merge pull request #684 from autarch/autarch/test.pm-tweaks
10:15 dalek rakudo/nom:
10:15 dalek rakudo/nom: A few small tweaks for Test.pm6
10:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a192ec52a9
10:15 timotimo lokien: i don't know at the moment; can you paste your output?
10:16 Celelibi joined #perl6
10:18 lokien timotimo: http://lpaste.net/3252764945862885376
10:18 timotimo looks like your rakudo is vastly out of date
10:18 timotimo since it doesn't have $*REPO, which was created before christmas
10:18 lokien I've installed it today, duh
10:18 timotimo what's your perl6 --version?
10:19 timotimo perhaps it's something very recent that broke $*REPO
10:19 lokien This is Rakudo version 2015.12-199-g5ed58f6 built on MoarVM version 2015.12-29-g8079ca5 implementing Perl 6.c.
10:20 timotimo what does "perl6 -e 'say $*REPO'" give you?
10:20 lokien I've uninstalled rakudo from ubuntu repos, now I'm getting different error
10:20 timotimo ah, yeah
10:20 timotimo that makes sense
10:20 lokien inst#/home/ghost/.perl6/2015.12-199-g5ed58f6
10:20 timotimo yeah, panda somehow seems to ended up using the older version
10:20 timotimo have ended up*
10:20 lokien http://lpaste.net/1131229359961538560 new error
10:20 DrForr Incidentally 'rakudobrew build-panda' just gave me the warning 'rebootstrap is obsolete...'.
10:21 lokien and panda install x results in "/usr/bin/env: perl6: No such file or directory"
10:21 nine DrForr: upgrade your rakudobrew
10:22 timotimo lokien: so did you add ~/.rakudobrew/bin to your $PATH variable?
10:22 DrForr Just did this morning, but I'll do so again.
10:22 lokien timotimo: yeah, "perl6" in the terminal will give me a repl
10:22 timotimo rakudobrew self-upgrade
10:23 lokien "Already up-to-date."
10:23 timotimo sorry, that was for DrForr
10:23 lokien welp, it's good to know I'm up to date
10:23 timotimo :)
10:23 lokien what am I supposed to do though?
10:23 timotimo i find it weird that the Shell::Prove thingie doesn't tell us more about the failure. why doesn't it output anything at all?
10:24 timotimo but perhaps you'll have more success with panda now?
10:24 lokien panda install dasnidnsaidnsaid -> /usr/bin/env: perl6: No such file or directory
10:25 timotimo did rakudobrew build-panda work this time, though?
10:25 lokien panda -> /usr/bin/env: perl6: No such file or directory
10:25 lokien maybe I'll uninstall it?
10:25 timotimo perhaps that'd be the right thing to do; i don't know why it wouldn't find a perl6 in your $PATH there
10:26 lokien I'm running rakudobrew build-panda now
10:26 lokien panda -> /usr/bin/env: perl6: No such file or directory
10:26 timotimo wtf
10:26 lokien I'll rm -rf and do this from scratch
10:27 timotimo i hope that'll help
10:27 timotimo sorry you're having so much trouble :(
10:27 lokien that's pretty discouraging, yeah
10:28 lokien but rakudobrew readme says "It's quick and dirty, and may be broken on your system.", fair enough
10:28 timotimo yeah, tadzik didn't really expect rakudobrew to get recommended for installing stuff
10:28 lokien rakudobrew build moar?
10:28 lokien or moar "version"
10:28 timotimo i recommend build moar
10:29 timotimo someone the other day had made the very unfortunate decision to symlink rakudobrew's bin folder to his system's bin folder
10:29 nine Then why do we recommend rakudobrew?
10:29 timotimo when rakudobrew ran, something told him to run it again as root because "you can't do that unless you're root"
10:29 timotimo and what "that" referred to was apparently to delete everything inside bin/ except for the rakudobrew script
10:29 brrt ohhai #perl6
10:29 lokien darn, that's funny
10:29 timotimo because rakudobrew expects the bin folder to be its own to do with as it pleases
10:30 timotimo and rakudobrew doesn't even want to be run as root
10:30 lokien nine: we doesn't have anything better than this, I suppose
10:30 lokien s/doesn't/don't
10:30 timotimo well, just git clone rakudo and perl Configure.pl --gen-moar is quite good already
10:30 brrt aye, that's probably the easiest way to get a current version
10:31 lokien but I
10:31 lokien I'd have to upgrade manually each time, right?
10:31 nine lokien: oh we do: git clone https://github.com/rakudo/rakudo.git && cd rakudo && perl Configure.pl --gen-nqp --gen-moar && make install
10:31 lokien early enters are the worst
10:31 * lokien removes rakudobrew
10:31 nine lokien: upgrades are just git pull && sh config.status && make install
10:32 nine put that line into an "up" script and it's as easy as it can be
10:33 lokien I'm installing it that way right now
10:33 gfldex m: module P { sub EXPORT(){ C=>Str } }; import P; dd C;
10:33 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g9PDdHdfc9␤Undeclared name:␤    C used at line 1␤␤»
10:33 lokien by the way, despite all that perl ugliness.. it's more logical than python
10:35 gfldex lokien: really? http://i.imgur.com/44hnn.png
10:36 lokien gfldex: is this entire community polish?
10:37 gfldex well, i do have polish relatives
10:37 nine I wonder what fixes are actually required to make rakudobrew more usefull. Or if it can be fixed in rakudobrew at all. Most issues seem to be weird PATH settings or conflicts with system installed versions.
10:37 nine lokien: we're spread pretty much around Europe, North America and Asia.
10:38 lokien oh, well. tadzik is polish, sentence on the picture was polish
10:38 lokien I thought it
10:38 lokien 's like china and golang
10:38 lokien screw my enter
10:39 timotimo what does the sentence in the bottom actually mean?
10:40 RabidGravy no I'm definitely British
10:40 lokien "Python - pick readability."
10:40 timotimo ah
10:40 lokien and "tadzik" is like "stevie", but funnier
10:41 timotimo i don't understand that :)
10:41 lokien nine: ran these commands, what now?
10:41 huf what *is* tadzik in polish?
10:42 timotimo lokien: now you have an install/bin folder in your rakudo folder that's good to have in your PATH
10:42 nine lokien: add the rakudo/install/bin and rakudo/install/share/perl6/site/bin to your PATH
10:42 pmurias joined #perl6
10:42 nine For panda: git clone https://github.com/tadzik/panda.git && cd panda && perl6 bootstrap.pl
10:43 nine Then you're good to go :)
10:43 lokien full name is "tadeusz", "tadzik" is a funny "pet name" (in terms of urban dictionary, not actual animal)
10:43 lokien diminutive? don't know how's that in english
10:44 lokien like margaret -> peggy
10:44 huf oh. Tádé
10:47 lokien also, .pl is a domain name for polish websites
10:47 lokien do you recommend .pl6 for perl6, or just .pl?
10:49 RabidGravy m: subset Callback of Callable where { $_.signature ~~ :(Int) }; my Callback $foo = -> { say "NARGS!" }
10:49 camelia rakudo-moar a192ec: OUTPUT«Cannot call 'shift' on an immutable 'List'␤  in block <unit> at /tmp/5Qbwby2M8R line 1␤␤»
10:49 RabidGravy is that RTable? and if so has it already been?
10:50 lokien what the hell, perl6: No such file or directory again
10:50 pmurias joined #perl6
10:50 gfldex m: module P { sub EXPORT(){ '&s'=>sub {} }; sub b () is export {} }; import P; dd &b; dd &s
10:50 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RvFx40ftK7␤Undeclared routine:␤    s used at line 1␤␤»
10:51 gfldex m: module P { sub EXPORT(){ note "welp!"; '&s'=>sub {} }; sub b () is export {} }; import P; dd &b; dd &s
10:51 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Q6z97Bptoi␤Undeclared routine:␤    s used at line 1␤␤»
10:51 gfldex should it execte EXPORT in that case?
10:52 gfldex i'm trying to golf something that produces «When invoking cuid_16_1452682351.13938 '', provided outer frame 0x4cbc7b0 (cuid_18_1452682351.13938 'EXPORT') does not match expected static frame 0x4cbc8e0 (cuid_17_1452682351.13938 '')»
10:53 nine lokien: but starting perl6 from the command line works?
10:53 lokien nine: yeah
10:54 lokien nine: and I can't install zef
10:54 nine lokien: what system are you on?
10:54 lokien nine: ubuntu
10:54 nine lokien: have you closed your terminal and reopened it in the mean time?
10:55 lokien nine: yeah, but I'll do it again
10:55 lokien nine: nothing changed
10:55 nine If you run env perl6 manually, does it work?
10:56 lokien no
10:56 nine What does which perl6 print?
10:56 nine What does echo $PATH print?
10:56 RabidGravy so either the location of "perl6" isn't in PATH or the "perl6" isn't where it should be
10:57 RabidGravy (or more unlikely the "perl6" isn't executable )
10:57 bjz joined #perl6
10:58 lokien which perl6 - nothing
10:58 nine WTF?
10:58 lokien ~/rakudo/install/share/perl6/s​ite/bin:~/rakudo/install/bin:
10:58 tadzik Haha, so much me in the backlog :)
10:58 lokien and other stuff
10:58 nine Then how can you start it from the command line? You're just typing "perl6\n"?
10:58 lokien hello tadzik
10:59 lokien perl6 <enter>
10:59 timotimo what shell is that you're running?
10:59 grondilu I'm buying a windows computer.  Any advice on which terminal to use for using perl6 either locally or through ssh?
10:59 lokien bash
10:59 timotimo ... WTF? :(
10:59 tadzik gfldex++ for digging out that old picture; I remember making it, but I thought it lost somewhere in the internet :)
10:59 lokien my laptop is special
11:00 timotimo i am not aware of anyway you can have "perl6" work, but "which perl6" not work
11:00 timotimo wait
11:00 timotimo "alias perl6"?
11:00 tadzik Hello lokien
11:00 DrForr grondilu: I actually use VirtualBox on Windows.
11:00 gfldex m: https://gist.github.com/gf​ldex/87e6af28194e5389a8f2
11:00 camelia rakudo-moar a192ec: OUTPUT«===SORRY!===␤Could not find the-lib in:␤    /home/camelia␤    /home/camelia/.perl6/2015.12-202-ga192ec5␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/sh…»
11:00 stmuk_ grondilu: putty.exe for ssh
11:00 lokien timotimo: you mean.. check if perl6 is in my aliases? it isn't
11:01 timotimo ... weird!
11:01 gfldex m: say "camelia please learn how to handle multi file gists"
11:01 camelia rakudo-moar a192ec: OUTPUT«camelia please learn how to handle multi file gists␤»
11:01 timotimo ... is perl6 +x ?
11:01 RabidGravy timotimo, which bash "which" will show the alias (and resolve it)
11:01 timotimo hm, ok
11:01 gfldex would be nice if someone could see if the following fails not only for me: https://gist.github.com/gf​ldex/87e6af28194e5389a8f2
11:01 RabidGravy [jonathan@coriolanus Tinky]$ alias foo=perl6
11:01 RabidGravy [jonathan@coriolanus Tinky]$ which foo
11:01 RabidGravy alias foo='perl6'
11:01 RabidGravy ~/.rakudobrew/bin/perl6
11:01 grondilu not familiar with putty.  I used cygwin long time ago.  Would you recommend putty other cygwin?
11:01 nine RabidGravy: it doesn't here
11:01 nine nine@sunshine:~> which ll
11:02 nine which: no ll in (
11:02 lokien -rwxr-xr-x
11:02 stmuk_ putty is just an ssh client .. you could also use cygwin's ssh
11:02 stmuk_ if you use cygwin I'd also recommend apt-cyg
11:02 El_Che grondilu: i use cygwin as a console when in windows. Now they have a good console instead of cmd.com
11:03 El_Che grondilu: i ssh from there
11:03 RabidGravy nine, weird
11:03 lokien timotimo: -rwxr-xr-x in case I got buried by this wild chat
11:03 timotimo lokien: if you *ever* figure out what the hell's wrong with your linux setup, please tell us, because i'm absolutely stumped here.
11:03 nine lokien: strace perl6?
11:03 lokien timotimo: I just added few lines to vimrc, it's vanilla ubuntu besides that
11:03 RabidGravy I have GNU bash, version 4.3.42(1)-release (x86_64-redhat-linux-gnu) for reference
11:03 El_Che grondilu: on the other hand I am a casual windows use, ymmv
11:04 lokien nine: strace: Can't stat 'perl6': No such file or directory
11:05 RabidGravy if you do "alias" is there an entry for "perl6" there?
11:05 lokien nope. alert, egrep, fgrep, grep, l, la, ls.
11:05 RabidGravy so where is your "perl6" installed?
11:06 lokien ~/rakudo
11:06 RabidGravy no, the actually "perl6" file which should be in a sub-directory thereof
11:07 lokien ~/rakudo/install/bin/perl6
11:07 nine Does ~ in $PATH actually work?
11:08 RabidGravy it depends
11:08 lokien umm, I'll switch that
11:08 RabidGravy but putting the full path can't hurt
11:09 lokien "panda" halts now instead of crashing, so it's qui- IT WORKS
11:09 nine yeah!
11:10 nine panda's first startup is just a little slow
11:10 tadzik \o/
11:10 lokien Readline failed to install, I wonder what will happen to Linenoise
11:10 lokien ew, success
11:10 fluca1978 joined #perl6
11:10 tadzik Eww
11:11 lokien screw shortcuts, I won't use them again
11:11 nine Finally we're moving into the right direction
11:11 DrForr What did I break re: readline?
11:11 RabidGravy break all the things
11:11 DrForr Actually there was an issue report, /me goes digging.
11:12 lokien time to write my JAPH now
11:12 ribasushi joined #perl6
11:13 timotimo damn, i need to remember the ~ thing
11:13 lokien m: say 'Just another Perl hacker,' #obfuscation#@#$*@*(@
11:13 camelia rakudo-moar a192ec: OUTPUT«Just another Perl hacker,␤»
11:13 salva joined #perl6
11:13 lokien good enough?
11:13 raydiak joined #perl6
11:14 timotimo m: say 'JAPH', #tdurnoedrtuniatdrnuiaeotdrs
11:14 camelia rakudo-moar a192ec: OUTPUT«JAPH␤»
11:14 timotimo you can even put the comma outside, looks like
11:15 lokien I like repl saying "sorry" every time
11:15 timotimo m: say ‘’ ,‚JAPH‘, #&do_execute_to_stdout#
11:15 camelia rakudo-moar a192ec: OUTPUT«JAPH␤»
11:16 lokien m: (print "I'm a lisper, actually")
11:16 camelia rakudo-moar a192ec: OUTPUT«I'm a lisper, actually»
11:16 lokien whaaaa
11:17 bjz joined #perl6
11:18 RabidGravy moritz, Hmm I don't think that is quite what I'm thinking, I'm trying to think of a more sixish way of de-coupling "run a bunch of boolean returning callbacks and get all(@responsies)"
11:19 nine m: (say <I'm a lisper, actually>)
11:19 camelia rakudo-moar a192ec: OUTPUT«(I'm a lisper, actually)␤»
11:19 lokien :O
11:20 RabidGravy I think I'm just going to go with the callbacks, start { } them all and return a Promise.alloff
11:21 kaare_ joined #perl6
11:21 RabidGravy allof
11:21 lokien nine: how does that work?
11:21 nine m: dd <this is a list containting a couple of words>
11:21 camelia rakudo-moar a192ec: OUTPUT«("this", "is", "a", "list", "containting", "a", "couple", "of", "words")␤»
11:22 lokien bu-ut
11:22 lokien m: (say "these parens")
11:22 camelia rakudo-moar a192ec: OUTPUT«these parens␤»
11:22 nine m: say (1, 2, 3);
11:22 camelia rakudo-moar a192ec: OUTPUT«(1 2 3)␤»
11:23 lokien m: (((say "these parens")))
11:23 camelia rakudo-moar a192ec: OUTPUT«these parens␤»
11:23 lokien perl is wonderful
11:23 pmurias joined #perl6
11:23 nine That's the beauty :) < > create a list of words split by white space and say will enclose this list in ( )
11:24 lokien can I use my quirky functional style here? I don't like oop too much
11:24 RabidGravy the outer brackets round the say part just listify the return of say
11:24 RabidGravy m: dd (say "these parens")
11:24 camelia rakudo-moar a192ec: OUTPUT«these parens␤Bool::True␤»
11:24 RabidGravy m: dd (say "these parens",)
11:24 camelia rakudo-moar a192ec: OUTPUT«these parens␤Bool::True␤»
11:24 RabidGravy or maybe not
11:24 nine the say gobbles the ,
11:25 nine m: dd (say("these parens"),)
11:25 camelia rakudo-moar a192ec: OUTPUT«these parens␤(Bool::True,)␤»
11:25 RabidGravy yaw
11:26 lokien m: my @tbl[3;2];
11:26 camelia rakudo-moar a192ec: ( no output )
11:26 lokien m: yours @tbl[3;2];
11:26 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nBY4OkQqik␤Variable '@tbl' is not declared␤at /tmp/nBY4OkQqik:1␤------> 3yours 7⏏5@tbl[3;2];␤»
11:27 lokien why :(
11:27 dalek ecosystem: e576292 | (Wenzel P. P. Peppmeyer)++ | META.list:
11:27 dalek ecosystem: add Typesafe::XHTML::Writer
11:27 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e576292341
11:27 RabidGravy because "yours" isn't a declarator
11:27 lokien so I have to prefix all my declarations with "my"?
11:27 lokien cute
11:27 lokien and scary
11:28 nine lokien: my makes it a lexically scoped variable (it actually works for subs, classes and other things, too)
11:28 RabidGravy my, our, temp, constant, state or (in classes) has
11:28 lokien o-kay
11:29 timotimo we've found that explicitly declaring variables is a good thing
11:29 timotimo and you can build a slang that allows you to write "yours" or "your" instead of "my"
11:29 nine I like how this is again a case where Python violates one of it's "Zen" rules: "Explicit is better than implicit.", while Perl adheres to it
11:30 lokien timotimo: like, communist dsl. everything "our"
11:30 timotimo no, not "our"
11:30 lokien nine: python's broken imo, I don't like it
11:30 timotimo that's already taken and you shouldn't change what that means
11:30 timotimo that'll confuse people
11:30 awwaiid m: dd: (say "these parens",)
11:30 camelia rakudo-moar a192ec: OUTPUT«these parens␤»
11:31 lokien timotimo: :(
11:33 xpen joined #perl6
11:34 AlexDaniel joined #perl6
11:34 fluca1978 left #perl6
11:35 timotimo you *can* do it. it'll just be very confusing for readers of your code
11:35 sjoshi joined #perl6
11:35 timotimo when "our" suddenly means "my" scoped
11:35 adhoc joined #perl6
11:35 brrt why not make it
11:36 brrt 'thepeoples $foo;'
11:36 brrt or
11:36 brrt 'shared $foo;'
11:36 timotimo hoipolloi?
11:36 brrt 'the-people's $foo;'
11:36 brrt i think you can do that one :-)
11:37 timotimo Our Great Emperor's $bar
11:37 lokien :D
11:37 nine I'm also not sure if "not confising people" is an essential property of a communist dsl ;)
11:37 lokien by the way, is perl6 really in development since 2000?
11:37 nine actually, yes
11:37 lokien nine: you thinks it's yours, but it's ours
11:38 lokien nine: and after all this time.. it hasn't been optimized for speed? and is still pretty much "experimental"?
11:38 awwaiid joined #perl6
11:38 timotimo there hasn't been any code for a few years, actually
11:38 brrt lokien: perl6 is a quite complex language
11:39 brrt much of those 15 years have been spent on finding 'the right thing', which is difficult
11:39 timotimo we've also adherred to the "throw one away" principle
11:39 DrForr In *design* for 16, in *code* several times.
11:39 nine lokien: rakudo (which is the usefull Perl 6 compiler) started in 2009
11:39 ilmari the current primary VM is less than 3 years old
11:39 brrt considering we've tried to find it by consensus.... well, 15 years is not a long time
11:39 bpmedley joined #perl6
11:39 brrt throw a few ones away, in fact :-P
11:39 timotimo well, yeah
11:39 ilmari MoarVM (which is the primary backend for rakudo) started in 2012 and was announced in 2013
11:39 timotimo "throw one away" doesn't mean "throw only one away"
11:40 lokien welp, now you have chance to catch python, since people don't want to switch to python3
11:40 gfldex m: my $type = Int; sub f($type $t){};
11:40 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/D35mhGiLd7␤Malformed parameter␤at /tmp/D35mhGiLd7:1␤------> 3my $type = Int; sub f($type7⏏5 $t){};␤    expecting any of:␤        constraint␤»
11:40 RabidGravy I mean parrot was sorta-kinda working in 2002/3 but there was no Perl 6 to run on it :)
11:40 gfldex is there any way to make that typeobject stick?
11:40 nine Another one of those ironies, that you can still use your Python 2 code in Perl 6, but not in Python 3 :)
11:41 lokien nine: really? how?
11:41 nine lokien: https://github.com/niner/Inline-Python
11:41 RabidGravy gfldex, I think you need to do "constant Type = ..."
11:42 timotimo yeah, constant Type will do it, because that's compile-time
11:42 nine Oh my, Inline::Python's documentation seems to be almost non-existing.
11:42 lokien nine: oh. python3 *has* to be backwards-incompatible though
11:42 nine It really could use a more active maintainer :(
11:42 lokien nine: because of how it handles strings and bytes and such
11:42 nine lokien: no it doesn't
11:42 gfldex m: constant Type = Int; sub f(Type $t){ say $t.WHAT }; f(1);
11:42 camelia rakudo-moar a192ec: OUTPUT«(Int)␤»
11:43 nine lokien: they could have made it backwards compatible. They just chose not to as it simplified things and because it made upgrading code from Python 2 to Python 3 supposedly easier.
11:43 lokien nine: that's what I heard from python folks, I dunno, maybe, actually
11:44 FROGGS joined #perl6
11:44 nine In a way, Perl 6's complete separation from Perl 5 is what makes it easier to provide full backwards compatibility.
11:44 awwaiid hah. s/Perl 5/<Ruby Python Postscript ...>/
11:45 lokien now, let's make it faster than c
11:45 lokien :^)
11:45 nine It's still possible to write a bridge between Python 2 and 3, even today.
11:46 timotimo lokien: we're working towards much better speed than what we have today. the coming year will give us plenty of opportunity to go for speed
11:46 awwaiid nine: I'm hoping this weekend to add some more to Inline::Ruby. Next two major things are callbacks ruby->p6 and maybe p6 class inherit from rb
11:46 timotimo we've been "making it work", especially in order to get the 6.c release out of the door
11:47 timotimo which is a major milestone because it guarantees that user code that's written for 6.c will keep running for a long time
11:47 awwaiid nine: we should make a "language integration HOWTO" :)
11:47 lokien ohh, I forgot that perl is The Glue Language
11:48 lokien let's make a game in it :^)
11:48 nine awwaiid: inheritance will be fun :)
11:48 zakharyas joined #perl6
11:48 DrForr Been done :) Look at the ecosystem :)
11:48 timotimo lokien: we lack an OpenGL binding. would you be willing to write some code to generate a NativeCall-based library from the opengl API description xml file?
11:48 AlexDaniel hmmm OpenGL module is not there yet?
11:48 RabidGravy are there any graphical games ?
11:48 awwaiid nine: did you get it working for p5? I haven't tried at all
11:49 brrt in python news, did anybody read that article about how not to break your code on python4? that stuff was hilarious, and it wasn't even serious
11:49 brrt eh, it wasn't even a joke
11:49 AlexDaniel Not in the module directory yet: https://github.com/bartschuller/perl6-OpenGL
11:50 RabidGravy yay!
11:50 lokien brrt: I did
11:50 ilmari brrt: linky?
11:50 nine awwaiid: yes, in a way. I'm still not sure what the best way is. Looks like creating a wrapper class in Perl 6 and inheriting from that is the best way.
11:50 AlexDaniel brrt: yeah, that article was indeed weird…
11:50 brrt ilmari: http://astrofrog.github.io/blog/2016/01/12​/stop-writing-python-4-incompatible-code/
11:50 lokien so we have something like ncurses? I believe perl will handle text beautifully :^)
11:51 brrt language is not announced nor usable. however, we should worry about being compatible
11:51 lokien brrt: "No problem! I've already fixed it so that all my code is forward compatible with Python 7000, despite not knowing what any of the syntax or library changes are going to look like." :D
11:51 RabidGravy lokien, yes there is an NCurses library, works really well
11:51 brrt anyway, lunch&
11:51 nine brrt: and after all the useless pain, they really want people to fix 300000 issues
11:52 tadzik RabidGravy: I wrote a few
11:52 lokien RabidGravy: really? I'm so excited
11:52 gfldex m: sub outer($T) { constant T = $T; dd $T; sub (T $t){ $t } }; dd outer(Str)(1);
11:52 camelia rakudo-moar a192ec: OUTPUT«Str $T = Str␤Int $t = 1␤»
11:52 ilmari is there a tickit library?
11:52 lokien tadzik: but your blog is a ghost town :(
11:52 gfldex is that type check valid?
11:53 RabidGravy tadzik++
11:53 tadzik lokien: yeah, I know :/ I don't really write Perl these days
11:53 lokien tadzik: why? and what do you write?
11:53 xpen joined #perl6
11:53 timotimo RabidGravy: i haven't tried if it's any faster yet, but i wrote a little vertical-scrolling spacy shooty game with Cairo
11:54 RabidGravy cool
11:54 tadzik Well, I do little programming in general, and when I do it's some C/Seeples, some QML, some typescript
11:55 gfldex i want to hand over a typeobject via 'use Lib Type;' to an EXPORT sub in that Lib. The type makes it in there but when it's assigned to the constant the type changes to Mu (because that's likely the compile time value). Any ideas how to get this done?
11:55 AlexDaniel on a completely serious note, how can I check if my program is running on Perl 7 ?
11:55 gfldex use v7;
11:56 AlexDaniel gfldex: no-no-no, it is not compatible!
11:56 gfldex m: try { use v7; }
11:56 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CVGQzbhWKa␤No compiler available for Perl v7␤at /tmp/CVGQzbhWKa:1␤------> 3try { use v77⏏5; }␤»
11:56 AlexDaniel gfldex: I want the same code to run on 6 and 7!
11:56 lokien tadzik: that's a shame
11:56 lokien what about perl 10?
11:57 nine gfldex: what is the actual high level problem you're trying to solve?
11:57 gfldex m: sub outer($T) { constant T = $T; dd $T; sub (Mu $t){ $t } }; dd outer(Str)(1);
11:57 camelia rakudo-moar a192ec: OUTPUT«Str $T = Str␤Int $t = 1␤»
11:57 pmurias joined #perl6
11:57 timotimo RabidGravy: https://github.com/timo/gtk_cairo_shooter
11:57 timotimo the code ain't too bad
11:58 pmurias re compatibility with Python 4 the valid point is that just a version change to 4 will break code
11:58 rurban joined #perl6
11:58 AlexDaniel pmurias: wouldn't it break it anyway?
11:59 tadzik lokien: Perl is still my go-to language for solving some immediate programming problems, but these thing are neither reusable nor worth blogging about :)
12:00 gfldex nine: i got module A that provides class B in lib1 and module C that provides class D in lib2, what in turn uses class B (via parametric role). I would like to allow the use to provide a replacement of class B when loading lib2.
12:00 timotimo RabidGravy: last time i run that code, it spent a significant chunk of time just rendering with cairo
12:00 timotimo RabidGravy: sadly, our NativeCall ought to get a little re-write before it can really become as Blazing Fast as it could
12:00 gfldex nine: and it has to be types, delegation is no good
12:00 AlexDaniel m: if $*PERL ~~ /Perl\s6/ { say ‘I am checking this because I am a fucking idiot’ } else { say ‘What are you doing?’ }
12:00 camelia rakudo-moar a192ec: OUTPUT«I am checking this because I am a fucking idiot␤»
12:01 lokien tadzik: I guess it's time for something big then :^)
12:01 gfldex nine: as a complication there are also operators that can't be declared inside a role (no our scope in a role)
12:01 tadzik :)
12:02 El_Che grondilu: on the other hand I am a casual windows use, ymmv
12:02 El_Che oops
12:02 El_Che ignore
12:02 gfldex nine: this is how far I got: https://gist.github.com/2a9a24c64110da844d7e
12:03 timotimo gfldex: you have a duplicate key in your Stash there
12:04 timotimo (lines 32 to 36 is what i'm refering to)
12:04 gfldex timotimo: that's because anonymous subs can't be multies and not really the problem
12:05 gfldex timotimo: the problem is that constant T = $T can never work because T is filled with a compile time value and that is Mu
12:05 cgfbee joined #perl6
12:05 timotimo seems like what you want is to have a type capture
12:05 timotimo sub EXPORT(::T = Str) { .. }
12:06 gfldex i may want a macro
12:06 gfldex when is the type capture resolved?
12:06 timotimo at call time
12:07 gfldex i'm gonna try that
12:09 gfldex Type check failed in assignment to $!attr; expected T but got Str in method new at /home/dex/projekte/perl6/tmp/import/lib/Lib.pm line 24
12:10 gfldex bingo!
12:10 gfldex https://gist.github.com/d69c79e516b0cf4d1d88
12:11 gfldex i had to story the T in a variable to hand that over to the role
12:17 cgfbee joined #perl6
12:22 gfldex next problem, this sends rakudo into an infinite loop: https://gist.github.com/gf​ldex/d69c79e516b0cf4d1d88
12:23 Skarsnik joined #perl6
12:23 Skarsnik hello
12:25 adu joined #perl6
12:26 jnthn gfldex: multi sub infix:<~>(Example \l, T \r){ note "op1"; l ~ r }; # that's surely an infinite recursion, no?
12:27 gfldex jnthn: i will try to change that
12:27 jnthn CORE::<~>(l, r) # maybe
12:27 jnthn uh
12:28 jnthn CORE::{'&infix:<~>'}(l, r) more like
12:29 gfldex jnthn: that was the problem
12:30 moritz or nextsame
12:31 gfldex gist updated and I think I should blog about that
12:37 gfldex m: role R[::T] { has T $.attr; }; sub f(::TT){ class :: does R[TT] { } }; say f(Str).new.attr.^name
12:37 camelia rakudo-moar a192ec: OUTPUT«T␤»
12:39 jnthn That's not going to do anything useful...role composition happens at compile time, and the sub call at runtime.
12:39 jnthn (So the sub returns a constant type object, which was computed at compile time)
12:40 rindolf Skarsnik: hi, sup?
12:40 jnthn sub foo(::TT) { Any but R[TT] } # may do it
12:41 gfldex m: role R[::T] { has T $.attr; }; sub f(::TT){ Any but R[TT] }; say f(Str).new.attr.^name
12:41 camelia rakudo-moar a192ec: OUTPUT«T␤»
12:44 gfldex m: role R[::T] { has T $.attr = 42; }; sub f(::TT){ Any but R[TT] }; say f(Str).new.attr.^name
12:44 camelia rakudo-moar a192ec: OUTPUT«Type check failed in assignment to $!attr; expected TT but got Int␤  in block <unit> at /tmp/mnv9BBUNyd line 1␤␤»
12:44 gfldex m: role R[::T] { has T $.attr = 42; }; sub f(::TT){ Any but R[TT] }; say f(Int).new.attr.^name
12:44 camelia rakudo-moar a192ec: OUTPUT«Type check failed in assignment to $!attr; expected TT but got Int␤  in block <unit> at /tmp/1X54iXa89Z line 1␤␤»
12:45 Skarsnik rindolf, a bit tired today
12:46 Skarsnik hm, there is no fork?
12:46 gfldex m: role R {}; sub f(::T){ Any but T }; dd f(R)
12:46 camelia rakudo-moar a192ec: OUTPUT«Any+{R}␤»
12:47 jnthn m: role R[:TT] {}; sub f(::T){ Any but R[T] }; dd f(R)
12:47 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mmvTxKMZsV␤Unable to parse role definition␤at /tmp/mmvTxKMZsV:1␤------> 3role R[:7⏏5TT] {}; sub f(::T){ Any but R[T] }; dd f␤»
12:47 jnthn m: role R[::TT] {}; sub f(::T){ Any but R[T] }; dd f(R)
12:47 camelia rakudo-moar a192ec: OUTPUT«Any+{R[T]}␤»
12:47 jnthn m: role R[::TT] {}; sub f(::T){ Any but R.^parameterize(T) }; dd f(R)
12:47 camelia rakudo-moar a192ec: OUTPUT«Any+{R[R]}␤»
12:47 jnthn m: role R[::TT] {}; sub f(::T){ Any but R.^parameterize(T) }; dd f(Int)
12:47 camelia rakudo-moar a192ec: OUTPUT«Any+{R[Int]}␤»
12:47 jnthn For now looks like you'll have to force the runtime interpretation
12:48 gfldex shall I rakudobug?
12:48 jnthn Arguably we should realize that type vars on sub/method parameters are different from those on roles.
12:48 jnthn (e.g. late bound)
12:49 rindolf Skarsnik: ah.
12:49 Skarsnik oh fork is not in the doc x)
12:49 lizmat .oO( there is no fork )
12:50 nine We really should add fork
12:50 jnthn Probably belongs in a POSIX module.
12:50 jnthn We're so not going to be trying to emulate it on Windows :P
12:50 nine Oh come on :)
12:51 nine So this hypothetical POSIX module would just use NativeCall?
12:51 jnthn nine: Yeah
12:51 timotimo i randomly wonder if unicody ops are bad for braille-terminal users or other users of assistive technology
12:51 Skarsnik m: fork();
12:51 camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kFx4vBCsz5␤Undeclared routine:␤    fork used at line 1␤␤»
12:51 jnthn We had a working fork example in the nativecall repo, iirc
12:52 Skarsnik Oh I need to use NC to have fork
12:52 Skarsnik I need a fork like because some code are leaking
12:52 jnthn That's a rather roundabout solution to a leak :P
12:52 RabidGravy there that's the puppy:
12:52 RabidGravy m: https://gist.github.com/jonat​hanstowe/5c731a2daf1df24b1b5f
12:52 camelia rakudo-moar a192ec: OUTPUT«Doing one␤One␤Doing two␤Two␤»
12:53 Skarsnik The issue the leak make no sense, it's either in XML or because of NC that screw the Str class
12:55 arnsholt Could be NativeCall dupping strings
12:56 ilmari m: use NativeCall; sub fork() returns long is native(Str) { * }; say fork
12:56 camelia rakudo-moar a192ec: OUTPUT«21541␤0␤»
12:56 dalek doc: 80deb58 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Mu.pod:
12:56 dalek doc: fix link
12:56 dalek doc: review: https://github.com/perl6/doc/commit/80deb58e14
12:56 dalek doc: 2e7d8de | (Wenzel P. P. Peppmeyer)++ | doc/Language/modules.pod:
12:56 dalek doc: EXPORT can take arguments
12:56 dalek doc: review: https://github.com/perl6/doc/commit/2e7d8de25d
12:56 dalek doc: a7aa693 | (Wenzel P. P. Peppmeyer)++ | doc/ (2 files):
12:56 dalek doc: Merge pull request #346 from gfldex/master
12:56 dalek doc:
12:56 dalek doc: EXPORT can take arguments |  fix link
12:56 dalek doc: review: https://github.com/perl6/doc/commit/a7aa693c2b
12:57 Skarsnik https://gist.github.com/Ska​rsnik/7f2fee97d56c5acc1587 The Expected data are a manually entered data (this is not datas given my a NC call). Why did the Str have the explicitymanaged role of NC
12:58 lokien joined #perl6
12:58 Skarsnik The GOT are from some NC call (DBIish
12:59 Skarsnik It's an issue because they will never get freed x)
13:00 FROGGS awww, so they're upset?
13:00 jnthn iirc, expicitlymanaged was more intended for when you pass a string into C-land and the C code receiving it will take ownership of it and free it as needed
13:01 ilmari jnthn: how about if C code returns a pointer to a string that it retains ownership of? e.g. getenv
13:02 arnsholt The whole string handling story in NativeCall is pretty bad, IMO (in no small part my fault, actually =)
13:03 Skarsnik It's not the issue here. the "Mild fish taco".Str+{NativeCall::ExplicitlyManagedString}, is originaly a regular Perl 6 String. https://github.com/perl6/DBIish/​blob/master/t/99-common.pl6#L169
13:03 ilmari mm, fish taco
13:03 arnsholt Yeah, it's a string with a role mixed
13:04 Skarsnik it's an anonyme Str that receive the NC Role for no reason
13:04 Skarsnik so that will leak xD
13:04 jnthn ilmari: I think you'd use explicitlymanaged for that also
13:05 jnthn It generally means "Moar/JVM should not be cleaning up the C string"
13:05 arnsholt Skarsnik: The marshalled string frequently can't be freed immediately after being passed to the DB library
13:05 Skarsnik arnsholt, you miss the issue. This String HAS NOTHING to do with NC
13:05 jnthn Does explicitly manage return a copy of the string with the role mixed in, or do it in-place?
13:05 jnthn If the latter, we may be seeing action at a distance...
13:06 Skarsnik It's a reference String used to compare against what I will get from NC
13:06 arnsholt Skarsnik: PResumably the tests reuse the same string objects as was passed to the DB library when the data was inserted into the DB
13:06 ilmari jnthn: the example in the http://doc.perl6.org/language/nativecall implies it modifies the variable in-place
13:06 jnthn Ah. And d'oh.
13:06 Skarsnik arnsholt, look the code liked
13:06 cosarara joined #perl6
13:06 Skarsnik It's NOT data from NC
13:07 jnthn Though if it's "is rw" then we could still do it correctly in place... :)
13:07 arnsholt Skarsnik: It's test output from the DBIish tests, no?
13:08 Skarsnik The expected is the reference Data that are entered manually in the test
13:08 Skarsnik like my %reference = (stuff manually defined)
13:10 arnsholt 's odd. It's being touched by NativeCall somehow, at any rate
13:10 ilmari jnthn: it would be nice to have a parameter and return type trait to automatically mark strings as ro and explicitly-managed
13:11 Skarsnik but if randomly every Str created get the EM role, they are lost memory
13:11 timotimo .o( lost in memoization )
13:11 jnthn multi explicitly-manage(Str $x, :$encoding = 'utf8') is export(:DEFAULT,
13:11 jnthn :utils) { $x does ExplicitlyManagedString;
13:11 arnsholt Yeah, I know. NativeCall and strings is just terrible
13:11 jnthn yeah, it's using does. D'oh.
13:12 jnthn We may wish to try:
13:12 jnthn multi explicitly-manage(Str $x is rw, :$encoding = 'utf8') is export(:DEFAULT,
13:12 jnthn :utils) { $x = $x but ExplicitlyManagedString;
13:12 arnsholt I'm tempted to propose a redesign that basically only supports Str as being converted on call and freed after the call returns
13:12 arnsholt If you need anything more fancy, encode into a CArray
13:14 ilmari arnsholt: libpq has lots of functions that return pointers to strings owned by the PGresult struct
13:14 arnsholt ilmari: Oh, and if you have ideas about what a better string handling story would look like, I'm all ears =)
13:15 _Vi joined #perl6
13:15 arnsholt don't have time to actually implement much of anything for a while yet, but it's high on my list of things I'd like to get done
13:15 pmurias joined #perl6
13:15 arnsholt ilmari: Yeah, DBIish shenanigans is what occasioned the whole explicitly managed debacle
13:15 arnsholt I'm *really* regretting coming up with that idea
13:15 ilmari arnsholt: one problem with the pg strings is that they become invalid when you call PQclear(PGresult)
13:16 arnsholt Yeah, ownership of memory is a really core part of dealing with C. And we just don't have a way of dealing with that, currently
13:16 Skarsnik I need a way to tell the GC to not free/move data too soon in one of my module using NC
13:17 jnthn The GC never moves the parts that are passed to C-land
13:17 pmurias nqp-m: sub foo(*%slurpy, :$required) {say(%slurpy<required>);say($required)}; foo(:required("hi"));
13:17 camelia nqp-moarvm: OUTPUT«hi␤hi␤»
13:17 jnthn So it's "only" when to free that needs care
13:17 timotimo how do we hanlde changes to NativeCall with regards to 6.c and 6.d?
13:17 arnsholt NativeCall is not part of 6.c, AFAIK
13:18 jnthn m: sub foo(*%slurpy, :$required) { }
13:18 camelia rakudo-moar a192ec: ( no output )
13:18 jnthn Hm, I thought that'd be an error...
13:18 pmurias jnthn: it is locally for Perl 6
13:18 jnthn Oh...why not on camelia, I wonder...
13:18 Skarsnik Not really, I have to use explicitly-managed on a String I was passing to a C call, so It does not move and the pointer on the content of this Str the C lib give me on his struct are not garbade
13:19 Skarsnik *garbage
13:19 awwaiid m: "foo" ~~ 7 # somewhat annoying error rather than just telling me False
13:19 camelia rakudo-moar a192ec: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5foo' (indicated by ⏏)␤  in block <unit> at /tmp/Msy7WzfI5T line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/Msy7WzfI5T line 1␤␤»
13:19 RabidGravy I think Promise.allof may not be working as per the docs
13:19 jnthn pmurias: Oddly, not an error locally for me
13:20 jnthn RabidGravy: See Rakudo commit bcf63ef43da11 perhaps
13:20 arnsholt Skarsnik: It doesn't get moved, it gets freed after the native function returns, unless the Str has been marked with explicitly-manage, in which case it's never freed
13:20 arnsholt Which sucks, I know
13:21 Skarsnik The code was like this sub parse-html($html) {my $stuff = C_call($html); play with stuff;} The $html string was free before the end of parse-html
13:21 RabidGravy m: say await Promise.allof( start { sleep 1; die "GOATS!" },)
13:21 camelia rakudo-moar a192ec: OUTPUT«True␤»
13:21 Skarsnik so in my play with stuff I get garbage data on some part
13:22 pierre-vigier joined #perl6
13:22 travis-ci joined #perl6
13:22 travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'Merge pull request #346 from gfldex/master
13:22 travis-ci https://travis-ci.org/perl6/doc/builds/102091919 https://github.com/perl6/doc/com​pare/c4076e859e1a...a7aa693c2b88
13:22 travis-ci left #perl6
13:22 Skarsnik I don't get why it freed $html earlier
13:22 arnsholt Skarsnik: Yeah. It's freed after the *native* function returns
13:24 pierre-vigier joined #perl6
13:24 Skarsnik I don't get why it free the $html so early, I am still in a block where the $html variable exist. Really all I needed in this case was to tell the GC to not free before the end of the sub
13:25 Skarsnik I am not sure if you can implement this kind of control over the GC on the code
13:25 ilmari jnthn: so it changed from needs_all to wait_all in Future.pm speak (except it doesn't return the component futures)
13:25 RabidGravy jnthn, yeah that seems to remove the '.break' for some reason
13:25 arnsholt Skarsnik: Because the code implementing the marshalling knows *absolutely nothing* about the rest of your code
13:26 arnsholt That code handles the invocation of the C function, and only that
13:26 arnsholt It lives, literally, inside the C_call
13:27 Skarsnik the string get copied in memory before being passed to C?
13:27 arnsholt Yep
13:27 Skarsnik I should add this the NC doc them x)
13:28 domidumont Hmm, rakudo 2015.12 tries to create '/usr/share/perl6/vendor/dist' with mode '0o777' during test. That's not allowed. Did I do something wrong ?
13:28 domidumont
13:28 RabidGravy jnthn, ah reading the commit message I see
13:29 ilmari jnthn: it might be useful to add needs_[all|any]of as well?
13:29 domidumont (that's on Debian with pre-installed moarvm and nqp)
13:29 jnthn ilmari: The list form of await already handles need_all
13:29 Skarsnik domidumont, erf preinstalled moar/nqp are probably too old on debian
13:29 ilmari jnthn: except needs_all returns a future which yields alist of the component futures
13:30 ilmari rather than awaiting
13:30 ilmari https://metacpan.org/pod/Future#CONVERGENT-FUTURES
13:30 domidumont Skarsnik: I've re-built and installed moar and nqp 2015.12
13:30 jnthn ilmari: Given await will eventually be non-blocking, that's less of an issue.
13:31 jnthn (As in, there's less reason to want a derived Promise back)
13:31 ilmari ah, okay
13:31 * ilmari lunches
13:31 domidumont Skarsnik: but rakudo is not installed, so the directory '/usr/share/perl6/vendor/dist' does not exists
13:32 Skarsnik How did you install everything and wisch version exactly? the xmas release is not really good at being installed x)
13:32 jnthn RabidGravy: Yeah, much of what prompted it was realizing a bunch of things I happily do with WhenAny and WhenAll in C# would be more annoying in Perl 6 due to the exceptions.
13:33 jnthn RabidGravy: And that the list form of await covers the common case of wanting all the results or an exception more nicely.
13:34 domidumont Skarsnik: As debian package for moar, nqp and rakudo, I've used debian source repo, updated source code for moar nqp and rakudo from github to version 2015.12. Then built and installed moar, same for nqp
13:35 domidumont rakudo builds fine, but some tests fails.
13:35 domidumont So I've tried to build rakudo out of Debian source package (git clone rakudo; git checkout 2015.12). tests fail at the same point.
13:36 RabidGravy yeah, it's just for my particular use case right now the old behaviour would be ideal, i.e a method that runs a bunch of callbacks and returns a promise for them all giving the thumbs up :)
13:36 RabidGravy not particularly difficult to implement however
13:37 domidumont in vanilla rakudo, I've run: perl Configure.pl --backends=moar --prefix=/usr ; make ; make test
13:39 dalek rakudo/nom: 7f592ce | lizmat++ | src/core/Rakudo/Internals.pm:
13:39 dalek rakudo/nom: Streamline handling compiling options
13:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7f592ce0b7
13:39 dalek rakudo/nom: 1785ab7 | lizmat++ | src/core/Rakudo/Internals.pm:
13:39 dalek rakudo/nom: Add Rakudo::Internals.PROFILE
13:39 dalek rakudo/nom:
13:39 dalek rakudo/nom: Intended to be passing on --profile to subprocesses, to profile
13:39 dalek rakudo/nom: pre-comping
13:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1785ab72ec
13:39 jnthn RabidGravy: Promise.allof(@foo).then({ @foo>>.result }) or so
13:39 Skarsnik I think 2015.12 is not really distrib friendly. sadly I can't help you more, aside from trying to get the last nqp/moar/rakudo :(
13:39 RabidGravy I'll fix the doc :)
13:39 Skarsnik Not sure we have a release that fix xmas yet
13:40 RabidGravy yeah, something like that I guess
13:40 domidumont Skarsnik: ok. Then. I'll wait for next release. Fortunately, 2015.11 is fine on Debian and is now available on testing
13:40 moritz \o/
13:41 jnthn RabidGravy: When we have the real non-blocking await then it can just be `start await @foo`
13:41 RabidGravy :)
13:41 domidumont rakudo-star is still stuck in NEW queue though
13:42 AlexDaniel joined #perl6
13:42 pierre-vigier joined #perl6
13:43 adu joined #perl6
13:43 RabidGravy actually it makes it somewhat simpler, thinging about it
13:44 molaf joined #perl6
13:44 RabidGravy why did I want to make a stupidly complicated state machine thingy anyway?
13:45 hankache joined #perl6
13:45 Skarsnik For fun?
13:46 FROGGS and profit?
13:46 RabidGravy It's one of those "I guess I'll need one in the future" kind of things
13:47 RabidGravy and fun an profit
13:47 FROGGS domidumont++
13:48 FROGGS domidumont: btw, I've not forgotten about https://rt.perl.org/Ticket/Display.html?id=126894
13:49 Skarsnik The memory of a thread is free when it ends? Or do I really a fork in my case? (to run code that leak)
13:50 ingve left #perl6
13:52 domidumont FROGGS: I should have updated the bug: I can build rakudo-star modules with a pre-installed rakudo (with a fair number of patches)
13:53 FROGGS domidumont: star now has a release branch, but that only works with a current rakudo, not with 2015.12
13:53 FROGGS domidumont: and this branch uses panda to build modules
13:54 FROGGS domidumont: so the way to got might be to use the rakudo debian package, and package the modules build by panda
13:55 FROGGS domidumont: or to invent a debianesque repository type we can attach to rakudo, but we don't know yet how such a thing would look like
13:55 raiph joined #perl6
13:56 domidumont FROGGS: using panda to build packages is fine if panda can be packaged beforehand
13:57 FROGGS domidumont: it can
13:57 Ven joined #perl6
13:57 FROGGS domidumont: perl6 bootstrap.pl in its git checkout
13:59 Skarsnik maybe you want rakudo & Task::Star, since Rakudo Star provide its own rakudo
13:59 domidumont FROGGS: ok, then. That's the next step: build a panda package using https://github.com/tadzik/panda
13:59 prammer joined #perl6
13:59 bjz joined #perl6
14:01 Skarsnik FROGGS, does sub foo is native (int32 is rw) works like a int* ?
14:01 domidumont Skarsnik: I tried that, but rakudo-star build system wants to install in /usr during the build. That's not possible during a package build see https://rt.perl.org/Ticket/Display.html?id=126894
14:01 moritz domidumont: with fakeroot maybe?
14:01 moritz oh, probably also needs a chroot or similar
14:01 moritz hrmpf
14:02 domidumont yeah ... :-/
14:02 pmurias how is versioning of methods across various versions of the setting (6.c/6.d/etc.) is supposed to work?
14:02 dalek rakudo/nom: e867471 | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm:
14:02 dalek rakudo/nom: Pass on --profile as well when pre-compiling
14:02 dalek rakudo/nom:
14:02 dalek rakudo/nom: Unfortunately, precomping and profiling appear to be mutually
14:02 dalek rakudo/nom: exclusive apparently
14:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e867471c44
14:03 nine arnsholt: NativeCall may not be part of Perl 6.c but we still have to figure out how to stay backwards compatible.
14:03 Skarsnik domidumont, I mean, don't build the rakudo in rakudo star, but only the modules
14:03 nine arnsholt: because no user is going to say "ah, it's not part of 6.c, so it's ok that you broke my modules"
14:03 Skarsnik NC is not complete
14:04 Skarsnik and does not have enought tests
14:05 Skarsnik I think people using NC will not care if stuff are broken to make NC better
14:05 domidumont Skarsnik: yes. that works. rakudo-star 2015.11 is ready for Debian, but stuck in review: https://ftp-master.debian.org/​new/rakudo-star_2015.11-1.html
14:05 dalek perl6-roast-data: 04ea9c0 | coke++ | / (6 files):
14:05 dalek perl6-roast-data: today (automated commit)
14:05 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/04ea9c0188
14:06 sftf joined #perl6
14:06 El_Che hello
14:06 FROGGS Skarsnik: yes
14:07 Skarsnik I think you should not bother providing a 2015 rakudo (star or not) and focus on a 2016 release. since 2015.11 is not 6.c and 2015.12 is not distrib friendly
14:07 El_Che completely missing the backlog probably, but no software should have hardcoded (besides /usr/local defaults) non-overwritable paths
14:07 DrForr (Terry Riley)++_
14:08 RabidGravy Ooooh
14:08 domidumont Skarsnik: that's fine with me
14:08 DrForr (yes, I know, the 'net is fawning over David Bowie, but the man still deserves props.)
14:08 FROGGS domidumont: I think the same btw... the release after 2015.12 will be the one we're satisfied with
14:09 RabidGravy DrForr, when I have some MIDI thing going I'm planning on making a program that improvises "In C" ;-)
14:09 DrForr I can play a few of the phrases on 'ukulele :)
14:09 Skarsnik Like play with the current git version and repport when something is blocking
14:10 domidumont FROGGS: ok. Thanks for the input. That will give me more time to hack on cme ;-)
14:10 DrForr That actually pisses me off a wee bit because I missed out on the chance to play with the Ukulele Orchestra of Great Britain doing 'In C'.
14:11 FROGGS domidumont: well, then I wish a lot of fun doing so :o)
14:12 domidumont FROGGS: thanks :-)
14:13 nine domidumont: there's a #perl6-toolchain channel exclusively for discussing issues like packaging
14:14 domidumont nine: ah ok. thanks. I'll subscribe to this channel
14:14 cdg joined #perl6
14:14 nine pmurias: docs/language_versions.md
14:14 cdg joined #perl6
14:15 RabidGravy so, thanks to jnthn++'s suggestion I wound up with "Promise.allof(@promises).then({ so all(@promises>>.result) });" which is altogether more lovely for the purpose
14:17 dalek nqp: da7532a | (Pawel Murias)++ | src/vm/js/ (2 files):
14:17 dalek nqp: [js] Implement nqp::replace.
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/da7532a5ea
14:17 dalek nqp: 037d934 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
14:17 dalek nqp: Test nqp::replace.
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/037d934b83
14:17 dalek nqp: 9cb2383 | (Pawel Murias)++ | t/nqp/37-slurpy.t:
14:17 dalek nqp: Use &ok instead of manually printing TAP.
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/9cb2383b37
14:17 dalek nqp: 10218d3 | (Pawel Murias)++ | src/vm/js/ (2 files):
14:17 dalek nqp: [js] Implement nqp::capturenamedshash.
14:17 dalek nqp:
14:17 dalek nqp: Also stop declared named parameters from getting into the slurpy named hash.
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/10218d3448
14:17 dalek nqp: ab04407 | (Pawel Murias)++ | t/nqp/76-capture.t:
14:17 dalek nqp: Test nqp::capturenamedshash
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/ab0440700e
14:17 dalek nqp: f8146e0 | (Pawel Murias)++ | t/nqp/37-slurpy.t:
14:17 dalek nqp: Test that declared named arguments don't end up as part of the slurpy nameds
14:17 dalek nqp: review: https://github.com/perl6/nqp/commit/f8146e0bc8
14:18 FROGGS pmurias++
14:19 Skarsnik damn, I get not backtrace for 'This type cannot unbox to a native integer' error
14:19 xyf joined #perl6
14:20 skids joined #perl6
14:21 lizmat Skarsnik: --ll-exception ?
14:22 Skarsnik I mean, I only get the general block, not the precise line
14:23 xyf hello
14:23 xyf I have a question about class creation
14:23 lizmat and it is ?
14:23 xyf can I do some work in new method?
14:24 xyf class Human {
14:24 xyf #my $.counter=0;
14:24 xyf has $.name;
14:24 xyf has $.age;
14:24 xyf has $.sex;
14:24 xyf has $.nationality;
14:24 xyf has $.eligible;
14:24 xyf my $.counter = 0;
14:24 xyf method  assess-eligibility {
14:24 xyf if self.age < 21 {
14:24 xyf $!eligible = 'NO'
14:24 Skarsnik You probably want to do stuff in BUILD, not new
14:24 xyf } else {
14:24 xyf $!eligible = 'YES'
14:24 xyf }
14:24 xyf }
14:24 xyf method new ($age,$name,$sex,$nationality){
14:24 xyf self.bless(:$name,:$age,:$sex,:$nationality);
14:25 xyf #self.eligible='NO';
14:25 xyf Human.counter++;
14:25 xyf #   self.assess-eligibility;  # here you can't invoke a method ,maybe the object not exist yet
14:25 xyf }
14:25 xyf }
14:25 xyf but why I can't do it in new?
14:25 Skarsnik In new the object is still not created
14:26 lizmat xyf: please don't paste code like that, please use something like gist.github.com and post the link for people to see
14:26 brrt xyf: you might want to use the BUILD method instead
14:26 brrt submethod
14:27 lizmat xyf: .new is supposed to rteurn the instantiated object
14:27 lizmat xyf: if you move the increment to *before* the self.bless, you should be in business
14:28 awwaiid m: ([0, 1].all != 0).say
14:28 camelia rakudo-moar e86747: OUTPUT«True␤»
14:28 PerlJam xyf: Also, why store $!eligible instead of just computing it when needed?
14:28 yoleaux 07:55Z <nine> PerlJam: I'd like to know more about those CPAN modules that don't work with Inline::Perl5
14:29 moritz xyf: .bless returns the new object; you can call methods on it if you want
14:30 * [Coke] needs more coffee.
14:30 zwu joined #perl6
14:32 * xyf faint?
14:32 xyf sorry, I don't use irc much.....
14:33 zwu yoleaux, nine: thanks. Got your message and thanks!
14:33 yoleaux 07:37Z <nine> zwu: You'll find require in src/Perl/Actions.nqp, look for sym<require>. The rest is in src/core/CompUnit*
14:39 nine xyf: see "new" as a low level construction method. submethod BUILD is a high level interface that's there to make easy things easy.
14:39 Skarsnik Look like using fork/wait inside reac/whenever does not work well x)
14:40 moritz looks like cutting fingernails with a hammer is a bit tedious :-)
14:40 nine who'd have thought?
14:41 hippie1 joined #perl6
14:43 DrForr ISTR Tom Hukins lurking around here, though I forget the nick he used.
14:44 jnthn afaik, fork does not actually clone all the threads
14:45 stmuk_ DrForr: tomboh on magnet
14:45 pierre-vigier I have a little problem/question about MOP
14:46 pierre-vigier if i access a private attribute in a class method, i have no issue
14:46 pierre-vigier p6: my class A { has $!at = 42; method answer(A:D:) { say $!at;} }; A.new().answer();
14:46 camelia rakudo-moar e86747: OUTPUT«42␤»
14:46 DrForr Ah, thanks.
14:46 pierre-vigier however, i can't figure out to access a private attribute when using ^add_method
14:46 pierre-vigier p6:  my class B { has $!at = 42; }; B.^add_method( 'answer', method (B:D:) { say $!at;} );
14:46 camelia rakudo-moar e86747: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Cannot understand $!at in this context␤at /tmp/tmpfile:1␤------> 3thod( 'answer', method (B:D:) { say $!at7⏏5;} );␤»
14:47 jnthn pierre-vigier: You'll need to get the meta-attribute (Attribute instance) for the attribute in question
14:47 moritz pierre-vigier: call add_method from inside the class
14:47 jnthn pierre-vigier: And then use its get_value method
14:47 pierre-vigier ok,
14:47 jnthn Or what moritz said if you have that possibility
14:47 pierre-vigier that was my "only solution"
14:47 jnthn Depends on your use case :)
14:47 moritz m: my class B { has $!at = 42; B.^add_method( 'answer', method (B:D:) { say $!at;} )}; say B.new.answer
14:47 camelia rakudo-moar e86747: OUTPUT«42␤True␤»
14:47 pierre-vigier i wanted to try to avoid to use get_value
14:48 jnthn Also, I highly recommend only doing add_method in a BEGIN block
14:48 moritz and .^compose the class afterwards
14:48 jnthn Modules that do it at load time tend to be incompatible with precompilation.
14:48 pierre-vigier in fact, i am facing a problem which might be a design issue in my module
14:49 pierre-vigier i'm working on a Matrix module
14:49 pierre-vigier internally, i store  the cells in an array of arrya
14:49 pierre-vigier public as for now
14:49 muraiki joined #perl6
14:49 pierre-vigier WHy public, to do that:
14:50 pierre-vigier method equal( Matrix $b ) {
14:50 pierre-vigier if $!.cells = $b.cells
14:50 lnrdo joined #perl6
14:50 pierre-vigier in the concept
14:50 pierre-vigier however, having my internal storage public seems really bad
14:50 jnthn pierre-vigier: You can do it with a private method
14:51 pierre-vigier exaclty
14:51 pierre-vigier so i wanted to create an internal trait
14:51 pierre-vigier is providing-private-accessor
14:51 pierre-vigier to declare
14:51 pierre-vigier has $!cells is providing-private-accessor;
14:52 pierre-vigier and to play with trait and MOP at the same time
14:52 pierre-vigier my trait, in substance would have been:
14:52 keix joined #perl6
14:52 Skarsnik Oh nvm, it's gumbo that does not like working in a fork or something xD
14:52 jnthn You'd need add_private_method rather than add_method
14:52 pierre-vigier multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export {
14:52 pierre-vigier my $class = $attr.package;
14:52 pierre-vigier my $name = $attr.name.substr(2); #drop the initial $!
14:52 pierre-vigier if $name ~~ $class.^private_method_table {
14:52 pierre-vigier die "A private method with attribute name already exists, can't create private accessor";
14:52 pierre-vigier } else {
14:52 pierre-vigier $class.^add_private_method($name, method (Mu:D:) {
14:52 pierre-vigier #return $name;
14:52 pierre-vigier #$!($name)
14:52 pierre-vigier return $!private;
14:52 pierre-vigier });
14:52 pierre-vigier }
14:52 pierre-vigier }
14:53 jnthn A gist woulda been better ;-)
14:53 pierre-vigier yes, jsut wanted to avoid the explanation, if the solution was trivial :D
14:53 pmurias_ joined #perl6
14:53 nine pierre-vigier: please: gist.github.com
14:53 pierre-vigier indeed
14:53 jnthn pierre-vigier: But you have $attr right there, so $attr.get-value(self) is all that method needs to be :)
14:54 jnthn uh, get_value 'cus it's MOP :)
14:54 Skarsnik Can I use threads for my issue? (running code that leak in a separate thing)
14:54 pierre-vigier thanks, and in a BEGIN BLOCK ?
14:54 jnthn Skarsnik: No, because threads aren't about memory isolation
14:54 moritz and that's actually one of the few legit use cases for get_value
14:54 jnthn pierre-vigier: No, because you're writing it in a trait mod
14:54 moritz traits already run at compile time
14:54 jnthn pierre-vigier: So you're already getting BEGIN time for free :)
14:55 Skarsnik damn
14:55 Skarsnik what can I use them in this case?
14:55 pierre-vigier jnthn: thanks a lot
14:55 Skarsnik This code grows to 900mb in 24h and it supposed to always run x)
14:56 geekosaur what is gumbo here?
14:56 geekosaur also threads wouldn't help with that
14:56 Skarsnik a lib c that parse html
14:56 geekosaur but lots of things won't work with fork unless you work with them only in the child
14:56 pjscott joined #perl6
14:56 Skarsnik well I fork and wait in the parent
14:56 geekosaur (this does not sound like one)
14:56 Skarsnik I don't do fancy stuff
14:56 m_ joined #perl6
14:57 jnthn Skarsnik: Really, we need to hunt down the memory leak.
14:57 jnthn Skarsnik: Did you see if my suggested patch to NativeCall earlier on today might help?
14:57 domidumont joined #perl6
14:58 jnthn https://gist.github.com/jnthn/0a4ca61523d3fb4aa9b5 if you want something to easily apply
14:58 jnthn (didn't test it)
14:58 Skarsnik hm, let's try find NC.pm without rebuilding rakudo
15:00 Skarsnik jnthn, if you want a 'small' case, this leak in the for loop: https://gist.github.com/Ska​rsnik/5dfb0dce3b517f13d767
15:01 pmurias_ do we support chown?
15:01 Skarsnik m: say IO::Path.^can('chown');
15:01 camelia rakudo-moar e86747: OUTPUT«()␤»
15:02 Skarsnik hm camelia has an empty IO::Path class I think?
15:02 ilmari pmurias: nqp doesn't have a chown op
15:02 muraiki pmurias_: I think not, unless something changed in the past 2 or 3 months
15:02 pierre-vigier i'm doing sonething wrong apparently, https://gist.github.com/pierr​e-vigier/3da087040fddd8f0449b
15:02 pierre-vigier Method 'get-value' not found for invocant of class 'Attribute' in method <anon> at class.pl line 10 in method test at class.pl line 18 in block <unit> at class.pl line 27
15:02 jnthn pierre-vigier: It's get_value, sorry
15:02 * jnthn typo'd it earlier
15:02 pierre-vigier oh, i should have check that, sorry for the bother :(
15:03 jnthn No problem :)
15:03 muraiki I think the problem with chown is that it's not terribly portable to the windows side, right?
15:06 pierre-vigier with a few more addition, would be providing such a functionality on modules.perl6.com a benefit or draw back? I can't avoid to think that my design is at cause
15:06 pierre-vigier BTW, working perfectly now :)
15:06 geekosaur chown is sometimes not very portable on the unix side either (_POSIX_CHOWN_RESTRICTED)
15:07 hippie1 For submitting typo pull requests to perl6/doc, is it preferable to submit separate PR for each typo?  How about separate branches?
15:08 moritz hippie1: for fixing typos, please push directly; if you don't have the necessary permissions, tell me your github username, and I'll make it happen
15:08 RabidGravy pierre-vigier, someone, possibly autarch, may have sent a PR to rakudo to implement something similar
15:08 hippie1 moritz: It's 'revhippie' -- thanks!
15:08 moritz hippie1: invitation sent; have fun!
15:08 RabidGravy but it could be a useful thing in the ecosystem
15:09 pierre-vigier I can make a module with a disclaimer that it might come with s for sure better implementation in perl6 core
15:09 pierre-vigier thank you all
15:11 Skarsnik jnthn, that does not fix my leak because I don't use explicitly manage :)
15:11 bpmedley joined #perl6
15:11 dalek doc: 6bee7f2 | (Jim Davis)++ | doc/Language/ (2 files):
15:11 dalek doc: One typo and one angle-bracket doubling
15:11 dalek doc: review: https://github.com/perl6/doc/commit/6bee7f2044
15:16 bpmedley joined #perl6
15:16 dalek doc: b333245 | (Jim Davis)++ | doc/Language/5to6-perlsyn.pod:
15:16 dalek doc: C<...> to C<<...>> for example containing single <
15:16 dalek doc: review: https://github.com/perl6/doc/commit/b333245f41
15:17 sena_kun joined #perl6
15:19 jnthn Skarsnik: I thought your issue was something else using it causing action at a distance?
15:20 Skarsnik My issue is something leak (I will blame the XML module), and it's like 5-20Mb leak each call, so it grow quickly
15:21 Skarsnik The XML module is perl 6 code (no NC)
15:21 Skarsnik I though the issue I encounter in DBIish (where anonymous perl 6 Str receive the NC::EM role for no reason) was the cause
15:22 keix joined #perl6
15:25 Skarsnik my code look at some a html page every 2 min to find something new. The html parsing is done with a C lib, but the look up for data use XML methods. and the process grow in emmory overtime. It's not some data in the C lib that are not free. since if you look at my gist. it grow in a loop just calling a XML method over and over
15:25 _nadim joined #perl6
15:25 _nadim Good Day!
15:25 Skarsnik Hello
15:28 _nadim how does one take all the arguments passed to a sub and forward them to another sub? preferably without signature as the the forwarding sub knows nothing about the forwarded-to sub nor does it know about the arguments.
15:29 virtualsue joined #perl6
15:29 Skarsnik sub foo(*@arg) {bar(|@args)} ?
15:29 pmax joined #perl6
15:31 moritz sub foo(
15:31 moritz sub foo(|c) { bar |c }
15:31 RabidGravy m: sub bar(*@args) { say @args }; sub foo(|c) { bar(|c); };  foo('baz","boom")
15:31 camelia rakudo-moar e86747: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Iq607oMhRv␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/Iq607oMhRv:1␤------> 3foo(|c) { bar(|c); };  foo('baz","boom")7⏏5<EOL>␤    expecting any of:␤        argu…»
15:31 moritz Skarsnik: *@arg flattens, and only takes positionals into account
15:31 RabidGravy m: sub bar(*@args) { say @args }; sub foo(|c) { bar(|c); };  foo('baz',"boom")
15:31 camelia rakudo-moar e86747: OUTPUT«[baz boom]␤»
15:32 RabidGravy was just doing something like that right now
15:32 _nadim The incremental answers are becoming a fashion; and for once I like new fashions :)
15:32 _nadim thanks all
15:33 Skarsnik oh yeah the |c x)
15:33 _nadim what's the |c? or where is that documented?
15:33 Skarsnik Magic!
15:33 Skarsnik No idea x)
15:33 _nadim hehe
15:33 RabidGravy it gives you a single Capture object
15:34 moritz probably in the docs for Parameter or Signature
15:35 [Coke] http://doc.perl6.org/syntax/%7C
15:35 [Coke] last item.
15:35 [Coke] a search for "|" will find it.
15:36 mbracht joined #perl6
15:38 RabidGravy that needs the other case for arguments as well
15:42 domm_ joined #perl6
15:45 pmurias_ joined #perl6
15:46 cfedde joined #perl6
15:47 cfedde should I expect comand line editing to work in a newly installed perl6 2015.12 using rakudobrew? I followed the instructions at "Installing from source" on the downloads page.
15:48 nine cfedde: you still need to install the Readline or Linenoise module
15:48 El_Che cfedde: what doe you mean by command line editing? The repl? panda install Linenoise
15:49 cfedde El_Che: yes. in the repl.
15:49 cfedde nine: thanks!
15:50 cfedde panda install Readline leads to an error.  panda install Linenoise seems to work.
15:51 cfedde and the repl has history.  Yay!
15:54 dalek rakudo/nom: 35f5821 | lizmat++ | lib/Test.pm6:
15:54 dalek rakudo/nom: Revert PR #684
15:54 dalek rakudo/nom:
15:54 dalek rakudo/nom: Somehow it's breaking test 59 of S06-advanced/wrap.t
15:54 dalek rakudo/nom:
15:54 dalek rakudo/nom:     1..2
15:54 dalek rakudo/nom:     ok 1 - '{nextsame}()' died
15:54 dalek rakudo/nom:     not ok 2 - right exception type (X::NoDispatcher)
15:54 dalek rakudo/nom:     # Expected: X::NoDispatcher
15:54 dalek rakudo/nom:     # Got:      X::ControlFlow::Return
15:54 dalek rakudo/nom:     # Exception message: Attempt to return outside of any Routine
15:54 dalek rakudo/nom:
15:54 dalek rakudo/nom: Since I have *no* idea on how the patch can have this effect, and
15:54 dalek rakudo/nom: we cannot change the spectest just for that, I felt I had to revert.
15:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/35f5821cfd
15:54 DrForr cfedde: What error are you getting when installing Readline? I've asked people twice and not gotten an answer :)
15:55 cfedde DrForr: Failure Summary
15:55 cfedde ----------------
15:55 cfedde Readline( *resolve stage failed for Readline: Project Readline not found in the ecosystem)
15:55 cfedde shall I pm the long messages?
15:55 DrForr Aha.
15:55 bpmedley joined #perl6
15:56 DrForr No, that's fine. I thought it was something in the module instead of not being able to find the name.
15:56 cfedde is there some glue that is needed?  I should probably read up on how panda works.
15:56 * DrForr looks at the ecosystem to see what I should change the name to.
15:58 DrForr No difference in META.list...
15:58 DrForr So I'm doing something wrong in my META.info.
15:59 sena_kun Where can I find a profiler for perl6 code?
16:00 moritz sena_kun: perl6 --profile $yourprog
16:00 moritz sena_kun: though only works well if the runtime is pretty short
16:00 aenaxi joined #perl6
16:00 sena_kun moritz, thank you. Are 10-15 seconds short enough?
16:01 DrForr I don't see a substantial difference, and the "name" tag matches.
16:01 DrForr Can anyone tell me what I'm doing wrong elsewhere?
16:01 DrForr (re: cfedde's error)
16:02 Skarsnik aside from "perl"          : "v6", and maybe the version string it look file
16:03 Skarsnik DrForr, did you try using Test::Meta?
16:03 DrForr Wasn't aware of its existence.
16:04 Skarsnik I was trying to add a page about some modules that help when writing modules but I stopped when I could not figure how to have L<> in table x)
16:05 _nadim is there an equivalent to P5 "#line 123"?
16:05 Skarsnik ?
16:05 lizmat _nadim: no, not yet
16:05 lizmat :-(
16:05 Skarsnik what does that do?
16:05 lizmat we could use that for the setting
16:06 _nadim Skarsnik: that change the line number.
16:06 lizmat Skarsnik: set the line number
16:06 lizmat (and optionally the file name)
16:07 _nadim Skarsnik: very practical when generating code from templates or when squirelling in code somewhere and still have error line "synched" with the original code
16:07 lizmat the settings are already generated with them, but alas, still ignored  :-(
16:08 _nadim lizmat: we can't have everything now :) but I look forward to that. Just wrote a P6 Text::Template but the error message (I generate an exception), is of by the amount of code I add.
16:09 |Tux| is it possible to have a function/method return a Supply from a local Supplier that already called done after all emits? (and still be able to read from the supply)
16:10 zakharyas joined #perl6
16:11 _nadim lizmat: what would happen if $?LINE was not read only?
16:12 lizmat internally, it isn't anyway
16:12 RabidGravy |Tux|, a Supplier::Preserving will do that for it's supplys
16:12 geekosaur I think it'd need to be $*LINE or some such
16:12 lizmat it's more that the grammar will probably need to be adapted
16:15 _nadim hmm, the construct doesn't have to look as P5's. I don't mind just assigning to a special variable. Wouldn't that avoid the grammar change?
16:15 RabidGravy m: my $a = Supplier::Preserving.new;  $a.emit($_) for <a b c d>; $a.done;  $a.Supply.tap({ say $_}); # |Tux|
16:15 camelia rakudo-moar 35f582: OUTPUT«a␤b␤c␤d␤»
16:16 |Tux| RabidGravy, I was already testing, but tests take longer than 1 minute :)
16:16 |Tux| thanks
16:16 DrForr Ah, broken JSON; fixed, pushed.
16:16 geekosaur only reason p5's looks like that is -P
16:16 lizmat m: BEGIN $?LINE = 42   # _nadim
16:16 camelia rakudo-moar 35f582: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iweBI3l8Ik␤An exception occurred while evaluating a BEGIN␤at /tmp/iweBI3l8Ik:1␤Exception details:␤  Cannot modify an immutable Int␤    in code  at /tmp/iweBI3l8Ik line 1␤␤»
16:17 _nadim I met this a bit earlier :)
16:17 geekosaur and -P died
16:17 dalek rakudo/nom: 9463bd9 | lizmat++ | lib/Pod/To/Text.pm6:
16:17 dalek rakudo/nom: Remove some superfluous returns for performance
16:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9463bd9c82
16:18 nine m: BEGIN $?LINE := 43; die;
16:18 camelia rakudo-moar 35f582: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0lnmZAw1bM␤Cannot use bind operator with this left-hand side␤at /tmp/0lnmZAw1bM:1␤------> 3BEGIN $?LINE := 437⏏5; die;␤»
16:18 geekosaur (it used to be possible to make perl feed the script through cpp before running it; cpp outputs those annotations)
16:18 lizmat jnthn: any thoughts on Supply.Promise doing a Promise on the Supplier, instead of creating another tap ?
16:19 jnthn lizmat: I answered that before... :)
16:19 lizmat ah?
16:19 jnthn Is it a hot path?
16:19 _nadim lizmat: about your commit which removes returns, what kind of performance hit are we talking about?
16:20 jnthn lizmat: I'm not quite sure it'd be a huge improvement
16:20 lizmat well, for one, you wouldn't need to ignore all the values coming down the tap
16:21 jnthn Well, *something* does
16:21 |Tux| RabidGravy++ https://github.com/Tux/CSV/commit/9fb​32f0b3e067207068c01001787a4b1a148b57d
16:21 jnthn 'cus we have to keep the latest one somewhere
16:21 lizmat well, if multiple threads would be waiting on the same supply ?
16:21 mspo can I compile a perl6 app into some kind of single unit that includes its dependencies?
16:22 nine mspo: not yet
16:22 mspo a PAR file in perl5, right?
16:22 RabidGravy yay!
16:22 mspo nine: I'm glad it's on the list
16:22 nine lizmat: one thought: autarch's patch changed a sub into a multi which means that the proto will be in the callstack, too. May break some test that's not expecting that.
16:22 mspo the old way is just bad news ;)
16:23 jnthn lizmat: Would they be waiting on the same Promise?
16:23 lizmat no
16:23 autarch nine: should rakudo travis be running roast too?
16:23 zakharyas joined #perl6
16:23 jnthn lizmat: I think I need to understand the problem you're trying to solve here, 'cus I think I'm missing something
16:23 autarch it seems weird that rakudo has a fairly minimal test suite of its own
16:23 lizmat jnthn: they wouldn't be waiting on the same promise
16:23 nine autarch: more tests can only be better
16:23 jnthn autarch: Not really weird
16:23 autarch I just don't know if roast is expected to pass on every rakudo commit or not
16:24 lizmat jnthn: now that I've seen your answer, I understand your opint
16:24 lizmat *point
16:24 autarch maybe rakudo needs a submodule for roast so that people can coordinate changes between the two?
16:24 nine autarch: yes it is expected to pass
16:24 Skarsnik Do we have a class to express size in bytes? (like you easily have convertion to M/K/G?)
16:24 lizmat jnthn: also, I'm not backlogging anymore, if you want me to read something you said, please .tell me
16:24 autarch what about the case where someone is patching roast & rakudo for the same thing? this is why a submodule is probably needed
16:24 nine Skarsnik: there's a general module for units in the ecosystem
16:24 jnthn lizmat: I thought I had .tell'd, but I was just off a very long trip, so... :)
16:25 jnthn lizmat: I'm not backlogging here either, fwiw :)
16:25 jnthn Given up; too much traffic :)
16:25 jnthn "Nice problem to have" I guess
16:25 lizmat yeah :-(
16:25 khw joined #perl6
16:26 jnthn autarch: In reality, we've got by without solving that "problem" for quite a few years, and submodules bring their own kind of pain.
16:26 Skarsnik nine, hm, I can't find it x)
16:26 ZoffixW joined #perl6
16:26 autarch jnthn: I think this is a potential growing pain - as more people hack on rakudo, they're more likely to produce breaking PRs, and if those PRs don't test roast, they'll probably get merged
16:27 jnthn autarch: btw, the Rakudo simple "make test" is sanity tests that serve us when doing more involved refactors that even bust being able to use Test.pm :)
16:27 autarch jnthn: yeah, that makes sense
16:27 autarch although it'd be nice to test the stuff in lib/ too
16:28 jnthn Well, NativeCall is covered quite well
16:28 jnthn But others maybe not
16:28 autarch Test.pm6 isn't covered at all, AFAICT
16:29 awwaiid flawless
16:29 Skarsnik travis does not run make test x)
16:29 jnthn autarch: 01-sanity/99-test-basic.t does, I thought?
16:30 abraxxa jnthn: welcome back! enjoyed the time off?
16:31 autarch jnthn: ah, i hadn't seen that - unfortunately it doesn't test the actual TAP output, which is probably the most important thing to test
16:31 jnthn I'm not quite sure the "remember to update the submodule" scaling problem won't end up being a worse one than what we're trying to solve, but if we start getting a lot of problems in that area I'm happy to explore various options.
16:32 jnthn autarch: (doesn't test actual TAP output) yes, good point...it kinda relies on the harness exploding if we mess up :)
16:32 autarch I'll leave that up to core devs, obviously
16:32 autarch jnthn: there are many ways that could go wrong since the harness can just get things wrong, causing false positives, for example
16:32 autarch I guess it's yet another thing TBD ;)
16:33 jnthn Good point :)
16:33 |Tux| note: there are no hits for Supplier::Preserving on doc.perl6.org
16:33 jnthn I think that setting $*OUT/$*ERR to something that captures output might let us test that we're doing sensible TAP output.
16:33 awwaiid maybe a specific tag to check out from roast?
16:33 autarch anyway, maybe making rakudo's travis run roast for now might be a good enough change?
16:34 ZoffixW Is it correct that "sudo port install rakudo" installs Rakudo *Star* on MacPorts?
16:34 ZoffixW Setting $*OUT/$*ERR to something that captures output, you say? Well, I have a module just for that! :P (IO::MiddleMan)
16:35 lnrdo joined #perl6
16:35 jnthn autarch: Yes, sounds like something worthwhile
16:35 petercommand joined #perl6
16:36 ugexe https://github.com/sergot/IO-Capture-Si​mple/blob/master/lib/Test/IO/Capture.pm also this
16:36 geekosaur ZoffixW, are you up to date? it doesn't look like star to me
16:36 geekosaur I think the old port was Star
16:36 geekosaur but a new one was done after 6.c
16:37 ZoffixW geekosaur, I don't even know what "MacPorts" is, but I'm updating http://rakudo.org/how-to-get-rakudo/ and I see "sudo port install rakudo" is listed as the instruction to install R* on MacPorts
16:37 ZoffixW geekosaur, so what is it now? Just regular Rakudo?
16:38 mls joined #perl6
16:39 ZoffixW .seen jdv79
16:39 yoleaux I saw jdv79 3 Jan 2016 21:28Z in #perl6: <jdv79> otherwise spaghetti code:(
16:39 geekosaur sudo port selfupdate
16:39 geekosaur which updates the ports tree
16:39 ZoffixW I don't have a MacOS or OSX
16:40 geekosaur it's regular rakudo, from a patch shortly after 2015.12. doesn't install Task::Star or even Panda (separate port for the latter)
16:40 ZoffixW Thanks.
16:41 geekosaur basically [Coke] did the original Portfiles based on Star, mojca redid them after 6.c / 2015.12 to be regular rakudo
16:42 lokien_ joined #perl6
16:42 geekosaur since Star hadn't (and iirc still hasn't) been released for it yet
16:44 |Tux| *almost* under 12!
16:44 |Tux| csv-ip5xs            50000    17.451    11.962
16:44 |Tux| test                 50000    22.322    21.707
16:44 |Tux| test-t               50000    12.059    11.202
16:44 |Tux| csv-parser           50000    49.979     0.530
16:45 ZoffixW \o/
16:45 dwarring joined #perl6
16:46 ZoffixW |Tux|, for how long have you been pasting those here?
16:46 * ZoffixW contemplates having a chart that shows the progression as months roll by
16:47 znpy joined #perl6
16:49 adu joined #perl6
16:49 nine ZoffixW: |Tux|++ already does such charts
16:50 ZoffixW Sweet...
16:50 * ZoffixW waits for someone to drop a link
16:50 nine http://tux.nl/Talks/CSV6/speed4.html
16:50 lokien_ shh, is perl getting faster?
16:50 * lokien_ is a pleb
16:51 ZoffixW Cool. I wonder what happened around New Years 2015 that there was such an increase after a steady decline
16:51 masak yep, faster, more featureful, and more fun
16:52 lokien_ masak: even more fun?!
16:53 pmqs joined #perl6
16:54 Ulti |Tux|: what are the difference categories? as in whats the difference between test, test-t and csv-parser I assum the first one is the fastest Perl 5 implementation?
16:54 Ulti *difference between
16:55 psy_ joined #perl6
16:57 psy_ joined #perl6
16:57 pmurias joined #perl6
16:58 pmurias jnthn: as I'm going through the MoarVM oplist to find missing/untested ops I'm finding things that are not used anymore
16:58 pmurias jnthn: do we want to eventually remove them from moarvm?
16:59 dalek ecosystem: dc340ae | (Sylvain Colinet)++ | META.list:
16:59 dalek ecosystem: Add Linux::Proc::Statm, a module to get /proc/pid/statm info
16:59 dalek ecosystem:
16:59 dalek ecosystem: See https://github.com/Skarsnik/p6-linux-proc-statm
16:59 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/dc340aed57
16:59 [Coke] (remove return for perf)  - is there a hope that eventually the optimizer will handle this?
16:59 Skarsnik my smallest module x)
17:01 hahainternet m: say Inf != NaN
17:01 camelia rakudo-moar 9463bd: OUTPUT«True␤»
17:01 ZoffixW m: say v6 before v6.c
17:01 camelia rakudo-moar 9463bd: OUTPUT«False␤»
17:02 hahainternet i wonder if that's 'correct'
17:02 lizmat [Coke]: I would think so  :)
17:02 ZoffixW Skarsnik, ^ not 100 sure, but "perl": "6" in your META might be problematic if things that actually care about that key surface :)
17:02 randomguy joined #perl6
17:02 ZoffixW hahainternet, sure, why not?
17:03 hahainternet ZoffixW: infinity is not a number, sorta
17:03 hahainternet i'm not a mathematician!
17:03 ZoffixW hahainternet, I believe this more has to do with IEEE standard than rules of mathematics
17:03 moritz sena_kun: yes, should be short enough
17:03 hahainternet oh indeed, i don't doubt it
17:03 hahainternet i was just messing around and it struck me as a little bit of a wat
17:04 Skarsnik ZoffixW, I am not even sure what I should put?
17:04 hahainternet i can't think where you'd possibly rely on that in real code
17:04 Skarsnik I mean it's like "whatever version of perl6)
17:04 SCHAAP137 joined #perl6
17:05 ZoffixW Skarsnik, whatever version would be the WhateverStar: "*"
17:05 [Coke] geekosaur: I did not do the original portfiles based on star
17:06 geekosaur hm. so where'd the idea that they were based on star come from? misdocumented?
17:06 geekosaur [13 16:37] <ZoffixW> geekosaur, I don't even know what "MacPorts" is, but I'm updating http://rakudo.org/how-to-get-rakudo/ and I see "sudo port install rakudo" is listed as the instruction to install R* on MacPorts
17:06 sena_kun moritz, it's a bit late:) I wrote something really unwise since decompression of 1mb file takes about two minutes and trying to profile it now.
17:06 geekosaur actually that sounds like a doc bug
17:07 [Coke] I only did one portfile originally, and that was moarvm's monthlies. I had started on nqp months ago, never got it into macports. mojca independently did everything and then realized I already had moarvm in macports.
17:07 geekosaur ... "remove return for perf" it's perl4/early 5 all over again /o\
17:07 [Coke] sudo port install rakudo is to install rakudo's compiler. not R*
17:08 ZoffixW I'll fix that in the docs
17:08 [Coke] (perl4/5) geekosaur: it's fine for internal stuff. externally, we'll get the optimizations working hopefully this year so people don't have to worry about it.
17:09 Praise joined #perl6
17:10 dalek rakudo/nom: 007f027 | lizmat++ | src/core/ (2 files):
17:10 dalek rakudo/nom: Abstract -I logic into Rakudo::Internals
17:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/007f027fc1
17:10 * ZoffixW just registered getperl6.com
17:10 zakharyas joined #perl6
17:10 Skarsnik huhu
17:11 Skarsnik getalltheperl.org
17:11 pmurias Skarsnik: that installs a Perl6+Perl6+Inline::Perl5 combo package?
17:13 dalek ecosystem: b739306 | (Zoffix Znet)++ | META.list:
17:13 dalek ecosystem: Add Finance::CompoundInterest to ecosystem
17:13 dalek ecosystem:
17:13 dalek ecosystem: Compound Interest calculations for fun and profit. See https://github.com/peelle/Finance-CompoundInterest (Closes #121)
17:13 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/b739306ba5
17:14 ZoffixW Neat. We're getting so many modules into the ecosystem there was a merge conflict :P
17:15 RabidGravy cool
17:18 lokien_ how would you check if string contains two (or more) letters next to each other?
17:18 lokien_ "hskabb" -> true
17:18 lokien_ "jsbaj" -> false
17:19 Skarsnik timotimo will probably stop adding the news modules in the weekly post x)
17:19 Skarsnik It start growing a lot
17:20 moritz m: for <hskabb jsbaj> { say so /(.)$0/ }
17:20 camelia rakudo-moar 9463bd: OUTPUT«True␤False␤»
17:20 moritz lokien_: ^^
17:20 RabidGravy +28 since I last added one
17:20 ZoffixW :o
17:21 Juerd m: "hskabb" ~~ /$<letter> = (.)  $<letter>/
17:21 camelia rakudo-moar 9463bd: ( no output )
17:21 Juerd m: so "hskabb" ~~ /$<letter> = (.)  $<letter>/
17:21 camelia rakudo-moar 9463bd: OUTPUT«WARNINGS for /tmp/MO7fD3cXhN:␤Useless use of "so " in expression "so \"hskabb\" ~~" in sink context (line 1)␤»
17:21 sena_kun It's time to optimise. Are there any docs about sink-all method(except http://doc.perl6.org/routine/sink-all)? I want to know what in code can call it(for loop?) and how can I replace it with something faster(because this method calls taked 99% of time).
17:21 Juerd m: say so "hskabb" ~~ /$<letter> = (.)  $<letter>/
17:21 camelia rakudo-moar 9463bd: OUTPUT«True␤»
17:21 lokien_ moritz: it's.. one line.. :o
17:21 Juerd (Why doesn't camelia auto-say, like the repl does?)
17:21 ZoffixW Juerd, because sometimes she's used for debugging thinks like sink warnings and auto-say would make that impossible.
17:22 ZoffixW s/thinks/things/;
17:22 Juerd ZoffixW: Ah. Good point.
17:23 lokien_ Juerd: thanks, also
17:24 Juerd lokien_: Note that the regex is effectively the same. I just wrote an overly verbose one for fun :)
17:24 Juerd In practice I'd use / (.) $0 / instead.
17:24 [Coke] if you want to see what's calling it on  your code, you can use "--profile"
17:24 ZoffixW lokien_, also note, it checks for a character, not a letter :)
17:24 ZoffixW m: for '   ' { say so /(.)$0/ }
17:24 camelia rakudo-moar 9463bd: OUTPUT«True␤»
17:24 lokien_ Juerd: yeah, it looks weird
17:24 Juerd You'll get used to that :)
17:25 lokien_ ZoffixW: what's the difference?
17:25 [Coke] profile: say so "hskabb" ~~ /$<letter> = (.)  $<letter>/
17:25 sena_kun Okay, it's copying with "$some[$_] = $else[$_] for $length" calls sink-all. How can I copy from carray to buf faster(much faster)?
17:25 Juerd I've gotten so used to it, that it doesn't look weird at all anymore.
17:25 [Coke] prof-m: say so "hskabb" ~~ /$<letter> = (.)  $<letter>/
17:25 camelia prof-m 273e89: OUTPUT«True␤Writing profiler output to /tmp/mprof.html␤»
17:25 camelia .. Prof: http://p.p6c.org/1f20894
17:26 ZoffixW lokien_, well, an English letter would be [A-Za-z]. So a space or, say "\" aren't letters, but characters.
17:26 ZoffixW Δ is also a letter, but not an English one.
17:26 lokien_ Juerd: it's like that weird girl from your school you find wonderful, but you don't know why
17:26 drrho joined #perl6
17:27 lokien_ ZoffixW: as I thought, thanks :)
17:27 sena_kun [Coke], I already profiled code, now I want to replace bottleneck with something better.
17:27 Juerd lokien_: I have no experience with that :)
17:27 Skarsnik sena_kun, You probably can't speed this ~~
17:27 masak lokien_: I don't think it's like that ;)
17:27 lokien_ Juerd: that's a shame :D
17:27 lokien_ masak: so, it's like what?
17:28 sena_kun Skarsnik, oh wow.
17:28 ugexe C:\Users\Nick\Documents\GitHub\rakudobrew\moar-​nom\install/include/moar\platform/inttypes.h(2) : fatal error C1083: Cannot open include file: 'msinttypes/inttypes.h': No such file or directory
17:28 ugexe NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_amd64\cl.EXE"' : return code '0x2'
17:28 ugexe this is a newish error when installing on windows
17:28 moritz ugexe: I think jnthn++ mentioned that too
17:28 Juerd lokien_: Nah, I'm just not very interested in girls :)
17:28 alpha123 does perl6 make me more attractive?
17:29 lokien_ Juerd: oh, well.
17:29 Skarsnik sena_kun, hm, maybe you can try something using memcpy
17:29 lokien_ alpha123: absolutely
17:29 ZoffixW alpha123, yes!
17:29 moritz alpha123: my then girlfriend married me after I started Perl 6, so that's a data point
17:29 alpha123 lol
17:29 Skarsnik sena_kun, or whatever C call alow you to copy mem location
17:29 * TimToady is a character...
17:30 ZoffixW heh
17:30 lokien_ larry? :o
17:30 ZoffixW lokien_, yeah, that's Larry
17:30 geekosaur ugexe, how recent is your moarvm?
17:30 lokien_ Hey Larry!
17:30 * TimToady used to be able to keep that a sekrit
17:30 masak lokien_: what's some syntax that doesn't look weird anymore like? um, I'm not sure that's such a well-founded question ;)
17:30 ZoffixW heh
17:30 ugexe geekosaur: thats from a nuke then build, so most recent
17:30 geekosaur 2016 Jan 12 19:52:14 <dalek>MoarVM: 940850e | jnthn++ | Configure.pl:
17:30 geekosaur 2016 Jan 12 19:52:14 <dalek>MoarVM: Correct installation of msinttypes header test.
17:30 sena_kun Skarsnik, I'll look firstly at zlib library source code. If I will understood nothing I will try memcpy.
17:31 geekosaur which may mean the bug is still there, I guess
17:31 ugexe ah, must need a version bump somewhere?
17:31 geekosaur (that is the fix may not have been all of what was needed)
17:31 sena_kun s/understood/understand/
17:31 geekosaur maybe
17:31 moritz ugexe: maybe try --gen-moar=master ?
17:31 masak lokien_: though I guess it's kind of like getting used to the peculiarities of any written language.
17:31 kyclark joined #perl6
17:31 flussence jnthn++ # fixing my stupid patch
17:32 lokien_ masak: I'll ask haskell guys about a proper metaphor
17:32 sena_kun lokien_, haskellish guy in the chat, any questions here?
17:32 lokien_ sena_kun: what is love?
17:33 moritz maybe don't hurt me, don't hurt me, no more
17:33 alpha123 lokien_: love is dependent types, it's probably undecidable in the general case
17:33 sena_kun lokien_, love is an uncountable and an infinite monad. A Cartesian closed category if you like it will.
17:33 lokien_ alpha123: so idris = pure love
17:34 alpha123 EXACTLY
17:34 sena_kun *if you will
17:34 * alpha123 does have a bit of a love affair with Idris at the moment
17:34 masak love is linear types.
17:34 masak love is Gödel numbering.
17:35 TimToady love is bad at tennis
17:35 masak :P
17:35 kyclark I'd like to get going with Perl6 grammars, so I started with a simple FASTA parser.  I need help making this work.  Here's a broken start that I hope gets across the idea of what I'm after.  http://pastie.org/10687726
17:36 * cfedde giggles
17:36 lokien_ TimToady: I want a t-shirt with that quote
17:37 TimToady Just cuz I made a pun doesn't make it a good pun. :)
17:37 alpha123 I dunno, I like that one
17:38 TimToady love is pretty good at golf though
17:38 lokien_ was it a pun? it was a life-changing sentence
17:38 JimmyZ kyclark: you may like https://github.com/jnthn/grammar-debugger
17:38 jnthn .tell abraxxa Sorry, had to disappear for a bit... Yes, time off was useful, thanks for asking. :)
17:38 yoleaux jnthn: I'll pass your message to abraxxa.
17:38 TimToady the two are not mutually exclusive
17:39 jnthn pmurias: Well, I'm aware of at least one case where we don't use it yet, but should be...so it's not so simple :)
17:39 alpha123 on-topic, has anyone here any experience with using perl6 as a jupyter kernel? I found https://github.com/timo/iperl6kernel but that looks very unfinished
17:39 lokien_ is immutability good in perl world? I'd prefer most of my vars immutable, but I dunno
17:39 ugexe --gen-moar=master doesn't seem to affect the error once i nmake install
17:39 rindolf Yay! The Perl 5 program I compiled to JavaScript using Perlito has passed its first test case - after a lot of work and many hacks on my part.
17:40 jnthn ugexe: I patched the msinttypes thing in MoarVM, but guess MOAR_REVISION/NQP_REVISION weren't yet bumped
17:40 TimToady kyclark: .* \n matches to the end of file, use \N* \n
17:40 leont joined #perl6
17:41 cfedde rindolf: do you see perlito as a way of getting out of a perl code base? or as a way of runnign perl on other runtimes?
17:42 cfedde or somethign else I have not thought of yet.
17:45 lokien_ people respond when I offtop, but when I ask a question about perl.. meh :^(
17:45 flussence immutability is good when you have tons of RAM
17:46 lokien_ flussence: so, no stm here? too bad
17:47 alpha123 flussence: well, you can share immutable data structures easily, so it's not really that memory-hungry
17:47 jnthn Plenty of things in Perl 6 are immutable
17:47 alpha123 also GC can do fun tricks with immutability (if it knows an object is immutable)
17:48 Hotkeys is immutability immutable
17:48 lokien_ that's a good question
17:48 jnthn There's also the my \foo = ... notation for a single static assignment var
17:48 flussence well by "tons", maybe I meant as in the amount you'd have back when computers literally weighed tons :)
17:48 Hotkeys can you do something like
17:48 * TimToady pushes the mute button so he can backlog...
17:48 Hotkeys my $foo is r = ...
17:49 Hotkeys or is that only for things in classes
17:49 jnthn Hotkeys: You can have variable traits, if that's what you mean.
17:49 Hotkeys (or does that go on the other side of the assignment I cant remember)
17:49 rindolf cfedde: well, right now I'm investigating ways of making the codebase run faster.
17:50 jnthn Though my $foo is SomeType is setting the container type
17:50 jnthn Less useful with scalars, but
17:51 jnthn m: my %h is BagHash; %h<a>++; %h<b>++; say %h; %h<a>--; say %h;
17:51 camelia rakudo-moar 007f02: OUTPUT«BagHash.new(a, b)␤BagHash.new(b)␤»
17:51 cfedde rindolf: has it made any progress?
17:51 jnthn Useful for things where you want a different container type
17:52 rindolf cfedde: it's still too early to tell.
17:52 * jnthn should be preparing noms :)
17:52 jnthn bbl
17:52 nine mmmh...noms
17:52 rindolf cfedde: I'm still working on it.
17:52 rindolf cfedde: I have yet to benchmark it.
17:54 cfedde Ah yes. the scientific method.  Here we substutute HPPO for evidence.
17:55 alpha123 Is there any way to run Perl6 as a jupyter/ipython) kernel?
17:56 alpha123 s/Perl6/Rakudo//
17:59 kyclark This parser works better: http://pastie.org/10687763.  It's very naive.  I'd like to be able to handle bad data like empty lines or comments (e.g., starting with "#").  How do I add that, i.e., I'm thinking TOP would be either a <record> or a <bad_input> (which is anything not a header/seq record).
18:00 alpha123 kyclark: perhaps lookup parser expression grammars (PEG)
18:00 alpha123 since that is what Perl6 uses
18:02 virtualsue joined #perl6
18:04 geekosaur alpha123, 2015 Dec 31 00:38:25 <cygx>disturbingly_rea: there's some initial work on a Jupyter kernel: https://github.com/timo/iperl6kernel
18:04 geekosaur preliminary only
18:04 alpha123 geekosaur: I've seen that, but does it even work? It looks very unfinished and has about no instructions on how to actually use it
18:05 geekosaur "preliminary only"
18:05 moritz kyclark: you can use non-capturing groups for that: token TOP { ^ [ <.comment> | <record> ]* $ }
18:05 flussence explicit ^ and $ aren't necessary in TOP either
18:05 moritz kyclark: or define a custom 'ws' rule (for whitespace), and use 'rule' instead of 'token', which will insert it automatically for you
18:05 geekosaur if you are looking for something ready to run right now then the answer is "not yet"
18:06 peter__ joined #perl6
18:06 alpha123 geekosaur: Well, I don't mind doing a little hacking
18:06 TimToady wasn't there a blog about FASTA parsing somewhere already?
18:07 mspo kyclark: you can use something like this token TOP { ^[<comment>+||<record>+]+ $ }
18:07 mspo kyclark: I found using *'s in TOP led to a lot of infinite loops
18:07 Hotkeys TimToady: pasta?
18:08 kjs_ joined #perl6
18:08 drrho joined #perl6
18:08 Hotkeys ....
18:08 Hotkeys uhh
18:08 Hotkeys Why so many klines
18:09 lnrdo joined #perl6
18:10 lokien_ joined #perl6
18:10 TimToady kyclark: googling for "perl6 fasta" gives lots of prior art
18:10 geekosaur someone accidentally klined the (or a) web gateway
18:10 ZoffixW :o
18:10 Hotkeys lol
18:10 kyclark TimToady: Ah!  Very helpful.  <slaps-forehead>
18:11 pmurias rindolf: fglock doesn't hang out on #perl6 often anymore
18:11 lokien_ I got "you are banned from this server" message :o
18:11 DrParis joined #perl6
18:11 rindolf pmurias: ah. :-(
18:11 lokien_ turns out irccloud isn't so nice
18:11 rindolf pmurias: well, I managed on my own.
18:11 mort96 joined #perl6
18:11 ZoffixW lokien_, heh, there was a massing K-Line just now :)
18:11 ZoffixW massive too :P
18:12 * ZoffixW rings an announcement bell
18:12 lokien_ ZoffixW: what is it? I'm an irc noob
18:12 TimToady maybe it's run by a pythonista
18:12 Hotkeys yeah
18:12 Hotkeys it was irccloud kline
18:12 lokien_ I'm sure it is
18:12 ZoffixW lokien_, umm... I think that means a user can't connect to any IRC server
18:12 geekosaur ircops tried to kline a user, didn't notice they were on irccloud, ended up kline-ing everyone on irccloud
18:12 geekosaur well, kline-ing one of irccloud's gateway servers
18:12 Hotkeys lol
18:13 alpha123 lol
18:13 Hotkeys I'm glad I use a personal bouncer
18:13 virtualsue joined #perl6
18:13 ZoffixW FYI: I created a "User Experience" repo: https://github.com/perl6/user-experience whose aim is to address all sorts of Perl 6 user experience.
18:13 Hotkeys if I get banned only I get banned :p
18:13 ZoffixW If you notice someone grumpy about Perl 6, it could be useful to direct them to open an Issue on https://github.com/perl6/user-experience/issues
18:13 lokien_ let's write hexchat in perl, it will be finally good enough
18:13 BuildTheRobots joined #perl6
18:14 Hotkeys I agree lokien
18:14 pmurias rindolf: you can always email him ;)
18:14 Hotkeys I was thinking of trying to trick hexchat into letting me script in p6
18:14 alpha123 ZoffixW: Won't that result in a rather low signal-to-noise ratio
18:14 ZoffixW I'm gonna try to tackle the whole "confusion with what to install" issue by getting a GetPerl6.com website that would interactively guide a user through a particular installation they want to achieve.
18:14 lokien_ Hotkeys: we should start a company
18:14 jnap joined #perl6
18:14 Hotkeys a company?
18:15 Hotkeys for hwat
18:15 rindolf pmurias: OK, email is less real time, and more formal.
18:15 ZoffixW alpha123, there's only one way to find out. My wild guess would be the people who have nothing better to do than bitch about everything under the sun won't even bother creating Issues anywhere.
18:15 TimToady .oO(P6's killer app: how to install P6...)
18:15 Hotkeys TimToady++
18:15 lokien_ Hotkeys: for our handicapped hexchat
18:15 Hotkeys 6Chat
18:16 TimToady I suppose it's possible a distributed attack was coming in via irccloud...
18:16 Hotkeys I call dibs on the name
18:16 Hotkeys dibs are definitely a legal thing
18:16 firstdayonthejob joined #perl6
18:16 geekosaur sadly that would not fix its utf8 problems unless you also rewrite pango another support libs in perl6
18:16 geekosaur (not simply bind to it)
18:16 geekosaur *and other
18:16 alpha123 7chat sounds way hipper, why didnt perl skip a version
18:17 geekosaur we left that one to php >.>
18:17 jnap I'm biased I guess but a killer app would be 'run my existing catalyst stuff but faster and I can write new code using sane Async'.  First step is getting my Cat apps running :)
18:17 mspo agreed; six is a bad luck number in tech
18:17 Hotkeys is it?
18:17 mspo see: ipv6, perl6 (or right)
18:17 lokien_ we mustn't forget to keep our code perl 7 compatible
18:17 Hotkeys trie
18:17 alpha123 Hotkeys: remember IPv6, PHP 6, and... uh, Perl6
18:17 ZoffixW huggable, user experience :is: Identifying issues in and improving the Perl 6 user experience: https://github.com/perl6/user-experience
18:17 huggable ZoffixW, Added user experience as Identifying issues in and improving the Perl 6 user experience: https://github.com/perl6/user-experience
18:17 Hotkeys if it was ipv7 then maybe my ISp would actually give me an IP in the standard
18:18 clkao joined #perl6
18:18 mindos joined #perl6
18:18 Spot__ joined #perl6
18:18 * Hotkeys stares annoyed at Rogers
18:18 alpha123 ip7 sounds cool, ipv6 sounds lame
18:18 alpha123 that is totally the problem
18:18 Hotkeys Rogers has been apparently rolling out ipv6 to residential users for years now
18:18 Hotkeys I AM YET TO GET MY IP
18:18 moritz today they're all striving for IP=
18:19 moritz how to botch a joke
18:19 moritz today they're all striving for IPO
18:19 chansen_ joined #perl6
18:19 Lucas_One joined #perl6
18:19 * alpha123 is relatively sure his ISP is entirely unaware of the existence of IPv6
18:19 corbyhaas joined #perl6
18:19 pnu joined #perl6
18:19 * flussence lost all faith in the local ISPs being clueful years ago and hacked together a 6to4 tunnel by hand
18:19 mspo I have ipv6 but i turn it off on my router
18:20 lokien_ mspo: you sick hacker
18:20 mspo too bad getaddressbyname does that AAAA first
18:20 mspo what a bunch of nonsense
18:20 SmokeMachine___ joined #perl6
18:21 olinkl joined #perl6
18:21 pmurias jnap: re 'run my existing stuff', the deliberate break in backward makes that complicated
18:22 flussence just have the old and new code talk over HTTP :)
18:23 pmurias flussence: it was 'run my existing stuff... but faster...'
18:24 kjs_ joined #perl6
18:26 zakharyas joined #perl6
18:26 M-matthew joined #perl6
18:26 kipd joined #perl6
18:28 peter__ joined #perl6
18:30 PotatoGim joined #perl6
18:30 mrsolo joined #perl6
18:31 _Vi joined #perl6
18:34 pdcawley joined #perl6
18:34 jnap flussence: true, you could do this with a front end server or proxy with rules to direct the request first to the new Perl6 stuff, and if not handled, then to the old Perl5 stuff
18:34 jnap however I could use (and have used) this technique to port code away from Perl totally...
18:35 jnap there's some value in being able to mix and match, like write some new stuff in Perl6 but be able to use all the DBIx::Class stuff I have, which is really the meat of my application.
18:36 kjs_ joined #perl6
18:36 ggherdov joined #perl6
18:36 jnap I heard there was a presentation where someone showed using Inline::Perl5 to port a Catalyst application, but I'e having trouble finding it, if anyone knows would be most appreciated.
18:37 spider-mario joined #perl6
18:38 moritz jnap: I'm pretty sure it was a presentation by nine
18:38 moritz aka stefan seifert
18:39 pyrimidine kyclark: if you're still around, there are a few FASTA grammars floating about, including bioperl6 and BioInfo.  e.g. https://github.com/cjfields/bioperl6/​blob/master/lib/Bio/Grammar/Fasta.pm6
18:39 jnap nine:  ^^ if so I'd be very appreciative if there was a git repo or similar I could see, thank you.
18:40 nine jnap: http://niner.name/talks
18:40 uruwi_ joined #perl6
18:42 pyrimidine kyclark: there are also a few other BI-related grammars in there as well, including a basic GFF3 and the completely-broken painful starts of one for GenBank (shudders)
18:43 PerlJam jnap: I hope your experience using Inline::Perl5 with a Catalyst app is good.  I ran a couple of simple ones when I realized Inline::Perl5 could do it and from what I remember of the experience, there were no major problems and things just worked.
18:43 PerlJam jnap: but, like I said, they were simple cat apps.
18:44 mspo what's FASTA?
18:44 lichtkind joined #perl6
18:45 mspo nm google got it
18:45 Hotkeys It's an italian food
18:45 PerlJam quick italian food
18:45 skids FASTA than WAT?
18:45 moritz jnap: http://niner.name/talks/Leapfrogging%20the%20​bootstrap/Leapfrogging%20the%20bootstrap.pdf
18:45 jnap PerlJam: the challenge here is dealing with arbitrary attributes.  but is a start.
18:46 jnap moritz: thanks!
18:46 pyrimidine mspo: simple format used in bioinformatics for sequence data: https://en.wikipedia.org/wiki/FASTA_format
18:46 lostinfog joined #perl6
18:47 jnap even if its slower, as long as its not orders of magnitude slower its probably ok.  Moose was slow at first, but useful enough we were willing to pay the price.  The key bit is 'useful enough and low enough barrier to entry'
18:47 * moritz must write a SLOWA format one day
18:47 pyrimidine moritz: it can't be worse than FASTA :)
18:47 mspo moritz: I think it's called xml
18:47 pyrimidine heh
18:47 rindolf cfedde: I've benchmarked it now and the JS version takes 32 seconds instead of 7 seconds for the /usr/bin/perl version. :-(
18:50 dalek nqp: 03c396b | (Pawel Murias)++ | src/vm/js/ (4 files):
18:50 dalek nqp: [js] Implement nqp::getcodecuid.
18:50 dalek nqp: review: https://github.com/perl6/nqp/commit/03c396bd81
18:50 dalek nqp: 3abb3c4 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
18:50 dalek nqp: [js] Implement a bunch of _n list ops.
18:50 dalek nqp: review: https://github.com/perl6/nqp/commit/3abb3c493e
18:50 dalek nqp: abd74b2 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
18:50 dalek nqp: Test _n list ops and an extra (js backend regression) test for the return value of bindpos_s.
18:50 dalek nqp: review: https://github.com/perl6/nqp/commit/abd74b2907
18:51 kyclark pyrimidine: Thanks for the pointers.  I just got myself added to the bioperl6 Github repo.  I've written a GenBank parser with Parse::RecDescent, so maybe I can port over some of those ideas.
18:51 pmurias rindolf: emitting performant javascript is really tricky
18:53 lokien_ we can enforce a function to work as a mutator (.=). can we do it the other way? enforce mutator to work like a function?
18:58 PerlJam enforce?  you must be thinking of a different language :)
18:58 lokien_ I don't know a better word for that..
18:59 PerlJam allow?  provide?  afford?
18:59 lokien_ allow? how do you know this function wants to behave like a mutator?
18:59 PerlJam kyclark: Do you know much about Parse::RecDescent?
18:59 lokien_ it wants to be a function, man
19:00 lokien_ anyway. can we do that?
19:00 PerlJam kyclark: If so, it would be neat to have a P::RD -> Perl 6 translator even if it didn't do everything
19:09 yurivish joined #perl6
19:10 kjs_ joined #perl6
19:11 pmurias lokien_: create a temporary variable and pass it?
19:12 pmurias lokien_: ah, you mean a method not a function
19:12 lokien_ pmurias: but it doesn't sound too bad
19:12 lokien_ so bad*, duh
19:15 pmurias my $foo = Foo.new; my $result := do {my $copy := $foo.clone; $copy.mutator; $copy }
19:16 pmurias lokien_: if the mutator method is chaining (returns the object itself) you can just do $foo.clone.chaining_mutator
19:17 lokien_ pmurias: ookay
19:20 yurivish joined #perl6
19:24 awwaiid I'm interested in adding annotations to Roast that would allow us to deep-link to it from documentation (and maybe other things); comments appreciated at https://github.com/perl6/roast/pull/97
19:25 cfedde rindolf: that is not moving in the desired direction.  I suspect pretty bloated and "safe" js.
19:26 pmurias awwaiid: you mean smart links?
19:27 rindolf cfedde: yes, quite.
19:28 pmurias cfedde: what do you mean by "safe" js?
19:29 cfedde pmurias: A human might write tight code by hand. A compiler tends to use blocks that have lots of edge case checking that a human might avoid.
19:30 pi1 joined #perl6
19:31 cfedde iirc something similar was observed whe the first perl 5 to c crosscompilers were done. The result code was pretty much just as fast as the perl code.
19:31 pmurias cfedde: in my experience when mapping semantics onto js you end up having to handle a lot of the differences
19:32 pmurias and pay a hefty performance price unless you add special tricky ways for common cases
19:34 cfedde pmurias: yup.
19:36 cdg joined #perl6
19:37 pmurias getting peak on js performance for Perl 6 should be easier then for Perl 5, as the language is less dynamic
19:52 cfedde of course perlito is more a perl5 to X thing right now.
19:55 lichtkind what is the most efficient way to calculat permutations in perl 6?
19:55 awwaiid pmurias: smart links?
19:56 awwaiid pmurias: I mean that in doc I can do something that links to a specific block of tests on a particular language concept/feature
19:56 alpha123 pmurias: i wouldnt say perl6 is less dynamic, but it might be easier to optimize the common cases
19:57 jnthn lichtkind: I suspect the built-in permutations method/sub
19:57 awwaiid pmurias: and we can use it as a checklist for all of the named concepts in roast that are NOT documented (linked to) in doc
19:57 lichtkind jnthn, i suspected there is something but i didnt knew them thanks
19:58 pmurias alpha123: less dynamic is the wrong word, more things are lexically scoped
19:58 Skarsnik_ joined #perl6
19:59 pmurias awwaiid: it was possible in the past to render the synopsis with embedded tests
20:00 dha joined #perl6
20:00 pmurias it seems to be also the case currently
20:00 awwaiid pmurias: orly. I wonder if that was based on the file names or maybe links the other way (there are a hand-full of links in roast -> synopsis)
20:01 azawawi joined #perl6
20:01 awwaiid pmurias: hmm! link me?
20:01 azawawi hi
20:01 azawawi :)
20:01 awwaiid greetings azawawi
20:01 azawawi greetings awwaiid
20:01 azawawi :)
20:01 awwaiid I should add your nick as a hilight for when people auto-complete us wrong
20:02 pmurias awwaiid: design.perl6.org/S04.pod - the embedded test fragments were changed to github links for if I remember correctly performance reasons
20:02 awwaiid er... 404 not found :(
20:03 azawawi how is c++ nativecall on latest vs 2015.12... anything changed?
20:03 awwaiid pmurias: ohhh right. I've seen those
20:03 pmurias https://design.perl6.org/S04.html
20:04 pmurias there even used to be markers which showed the tests pugs passed
20:04 pmurias https://metacpan.org/pod/Text::SmartLinks - the code that used to handle that
20:05 awwaiid pmurias: yep -- those are reverse links. I want to go the other way around -- make the synopsis/doc have a link TO the roast instead of the other way around
20:05 RabidGravy How can I test the signature of a method?
20:06 pmurias RabidGravy: you can call it?
20:07 lichtkind jnthn++ thanks i now reall use perl 6 :)
20:07 pmurias RabidGravy: or do you want to check if a signature is generated correctly?
20:07 RabidGravy sure, but I want to make a trait that only applies to methods of a certain signature
20:07 lichtkind hai azawawi
20:09 azawawi https://github.com/azawawi/scri​pts/blob/master/opencv_test.p6  # playing with opencv... c API worked... c++ API failing :)
20:09 RabidGravy for reasons that I want a sub-class to be able to define methods with a trait which I want to be able to identify and then use as "callbacks" from a parent class method
20:10 RabidGravy and it would be better to check that they are at least sensible as early as possible
20:10 * jnthn tries not to parrot the "prefer composition over inheritance" line... :)
20:10 lokien joined #perl6
20:11 RabidGravy well, it could be composed - it doesn't really matter in this case
20:11 jnthn RabidGravy: Does smart-matching against the sig not work?
20:11 awwaiid m: ((10) ~~ :(Int $x where $x > 5)).say
20:11 camelia rakudo-moar 007f02: OUTPUT«False␤»
20:12 ab6tract joined #perl6
20:12 jnthn m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(C, Int)
20:12 camelia rakudo-moar 007f02: OUTPUT«False␤»
20:12 jnthn m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(C: Int)
20:12 camelia rakudo-moar 007f02: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UnDhik4Vd1␤Can only use the : invocant marker in the signature for a method␤at /tmp/UnDhik4Vd1:1␤------> 3a) { } }; say C.^lookup('m') ~~ :(C: Int7⏏5)␤    expecting any of:␤        constraint␤…»
20:12 jnthn hm :)
20:12 RabidGravy yeah, that was part of the problem
20:13 TimToady I don't see any reason to prohibit : there
20:13 jnthn m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(C: Int, *%_)
20:13 camelia rakudo-moar 007f02: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KFA_utXm0V␤Can only use the : invocant marker in the signature for a method␤at /tmp/KFA_utXm0V:1␤------> 3} }; say C.^lookup('m') ~~ :(C: Int, *%_7⏏5)␤    expecting any of:␤        constraint␤»
20:13 awwaiid m: sub foo(Int $x where $x > 5) { ... } ; ((5) ~~ &foo.signature).say # I thought this would work
20:13 camelia rakudo-moar 007f02: OUTPUT«False␤»
20:13 jnthn m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(C, Int, *%_)
20:13 camelia rakudo-moar 007f02: OUTPUT«False␤»
20:13 RabidGravy but, even if I do
20:13 RabidGravy m:  class C { method m(Int $a) { } }; say C.^lookup('m') ~~ (method (C: Int) { }).signature
20:13 camelia rakudo-moar 007f02: OUTPUT«False␤»
20:13 RabidGravy m:  class C { method m(Int $a) { } }; say C.^lookup('m').signature ~~ (method (C: Int) { }).signature
20:13 camelia rakudo-moar 007f02: OUTPUT«True␤»
20:14 RabidGravy oh wait
20:14 jnthn Aha...so wonder what the difference is...
20:14 RabidGravy m:  class C { method m(Int $a) returns Str { } }; say C.^lookup('m').signature ~~ (method (C: Int) returns Str { }).signature
20:14 camelia rakudo-moar 007f02: OUTPUT«True␤»
20:14 kyclark joined #perl6
20:15 TimToady m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(Int)  # this isn't the difference
20:15 camelia rakudo-moar 007f02: OUTPUT«False␤»
20:17 TimToady m: class C { method m(Int $a) { } }; say C.^lookup('m').signature ~~ :(C, Int)
20:17 camelia rakudo-moar 007f02: OUTPUT«Method 'type' not found for invocant of class 'Any'␤  in block <unit> at /tmp/z2vebG09Kb line 1␤␤»
20:17 TimToady o_O
20:17 awwaiid m: class C { method m(Int $a) { } }; say C.^lookup('m').signature
20:17 camelia rakudo-moar 007f02: OUTPUT«(C $: Int $a, *%_)␤»
20:17 TimToady m: class C { method m(Int $a) { } }; say C.^lookup('m').signature ~~ :(C, Int, *%)
20:17 camelia rakudo-moar 007f02: OUTPUT«True␤»
20:18 TimToady awwaiid++
20:18 RabidGravy m:  class C { method m(Int $a) returns Str { } }; say C.^lookup('m').signature ~~ (method (Mu: Int) returns Str { }).signature
20:18 camelia rakudo-moar 007f02: OUTPUT«True␤»
20:18 [Tux] Ulti, Inline::Perl5 + Text::CSV_XS, Unfeatured unoptimized reference perl6, Full featured perl6 Text::CSV_XS, perl6 CSV::Parser
20:18 [Tux] Ulti, Inline::Perl5 + Text::CSV_XS, Unfeatured unoptimized reference perl6, Full featured perl6 Text::CSV, perl6 CSV::Parser
20:18 RabidGravy okay, that's weird, it doesn't seem to work in a trait properly for me
20:19 * TimToady wonders if :(C: Int) should automatically add in the *%
20:21 RabidGravy multi sub trait_mod:<is> ( Method $m, :$enter-validator! ) { say $m.signature ~~ ( method (Mu: Int) returns Bool { }).signature; }; class Foo { method foo(Int $blob) returns Bool is enter-validator { } }
20:21 RabidGravy m: multi sub trait_mod:<is> ( Method $m, :$enter-validator! ) { say $m.signature ~~ ( method (Mu: Int) returns Bool { }).signature; }; class Foo { method foo(Int $blob) returns Bool is enter-validator { } }
20:21 camelia rakudo-moar 007f02: OUTPUT«False␤»
20:23 [Coke] is cjfields on #perl6?
20:26 peter__ joined #perl6
20:27 RabidGravy yeah so the identical, identical thing doesn't work in a method trait
20:28 dalek rakudo/language_versions: f6ea655 | (Stefan Seifert)++ | / (8 files):
20:28 dalek rakudo/language_versions: First attempt at adding a CORE.d setting
20:28 dalek rakudo/language_versions: review: https://github.com/rakudo/rakudo/commit/f6ea6553af
20:28 dalek rakudo/language_versions: 8c162c8 | (Stefan Seifert)++ | / (7 files):
20:28 dalek rakudo/language_versions: Bring back IO::CatPath and IO::CatHandle in 6.d
20:28 dalek rakudo/language_versions:
20:28 dalek rakudo/language_versions: nine@sphinx:~> perl6 -e 'IO::ArgFiles.new;'
20:28 dalek rakudo/language_versions: nine@sphinx:~> perl6 -e 'use v6.d; IO::ArgFiles.new;'
20:28 dalek rakudo/language_versions: Could not find symbol '&ArgFiles'
20:28 dalek rakudo/language_versions: review: https://github.com/rakudo/rakudo/commit/8c162c82da
20:30 RabidGravy is the method not quite "finished enough" when it hits the trait_mod ?
20:31 dalek rakudo/nom: 1d413e4 | lizmat++ | src/core/JSON/Pretty.pm:
20:31 dalek rakudo/nom: Simplify to-json proto sig
20:31 dalek rakudo/nom:
20:31 dalek rakudo/nom: Since each of the candidates has the same handling of the possible
20:31 dalek rakudo/nom: named variables, it would seem to me that the specificity of the
20:31 dalek rakudo/nom: proto sig would keep it from getting optimized away.
20:31 dalek rakudo/nom:
20:31 dalek rakudo/nom: The sig was part of the original addition to the repo, so no other
20:31 dalek rakudo/nom: information could be gleaned as to why this specific sig was used.
20:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d413e433b
20:32 jnthn RabidGravy: iirc, it should at least have its signature...
20:33 RabidGravy m: multi sub trait_mod:<is> ( Method $m, :$enter-validator! ) { say $m.signature ~~ :(Mu, Int, *%) }; class Foo { method foo(Int $blob) is enter-validator { } }; say  Foo.^lookup('foo').signature ~~ :(Mu, Int, *%);
20:33 camelia rakudo-moar 007f02: OUTPUT«False␤True␤»
20:35 RabidGravy so something's going weird there
20:42 azawawi Can NativeCall handle a function inside a C++ namespace?
20:42 RabidGravy yes
20:42 RabidGravy 'ang on
20:42 azawawi something like this https://github.com/rakudo/rakudo/blob/n​om/t/04-nativecall/13-cpp-mangling.cpp ?
20:44 RabidGravy https://github.com/jonathanstowe/Audio-Soundt​ouch/blob/master/lib/Audio/SoundTouch.pm#L11
20:44 RabidGravy yeah, but it will get the name wrong if there's a namespace
20:45 RabidGravy so, you need to specify the fully qualified symbol
20:48 azawawi RabidGravy: cool... thx
20:49 dalek rakudo/nom: 5410113 | lizmat++ | src/core/JSON/Pretty.pm:
20:49 dalek rakudo/nom: Use low level escapes lookup
20:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5410113c94
20:50 RabidGravy so the name e.g. is soundtouch::SoundTouch::getVersionStr, but without qualifying it will guess Audio::SoundTouch::SoundTouch::getVersiomStr
20:51 RabidGravy of course you could just make ugly class names
20:52 RabidGravy as most people seem to do lower case namespaces in c++
20:52 pmurias_ joined #perl6
20:54 azawawi yup
20:54 azawawi cv::imread
20:54 azawawi _ZN2cv6imreadERKSsi
20:54 azawawi cv::imread(std::string const&, int)
20:56 cognominal joined #perl6
20:59 xenu i don't really recommend creating bindings for c++ libs, it's just too painful
20:59 xenu you know, templates, name-mangling
20:59 xenu and stuff
20:59 xenu it's better to create c api wrapper in c++
20:59 xenu and *then* create bindings in something more high-level
21:00 xenu uh, i meant "wrap c++ api in c api"
21:01 firstdayonthejob joined #perl6
21:01 sftp joined #perl6
21:01 lnrdo joined #perl6
21:03 * masak liked http://jeffreykegler.github.io/Ocean-of-Awa​reness-blog/individual/2015/12/topdown.html -- "Top-down parsing is guessing"
21:05 hoelzro that's what I did for my Xapian bindings (wrap C++ in C library)
21:05 hoelzro I thought OpenCV had a C-compatible interface?
21:07 azawawi hoelzro: true but it is deprecated
21:07 hoelzro ahhhh
21:07 azawawi hoelzro: you could use cvLoadImage, but the preferred way is cv::imread
21:07 masak 'night, #perl6
21:07 hoelzro o/ masak
21:07 hankache joined #perl6
21:08 azawawi hoelzro: opencv c api already works with nativecall so far... i was trying to bind to c++ api
21:08 hoelzro *nod*
21:08 hankache hello #perl6
21:08 hoelzro o/ hankache
21:09 azawawi RabidGravy: worked like a charm... thx .... RabidGravy++
21:09 andrewalker joined #perl6
21:10 RabidGravy yay!
21:10 yurivish joined #perl6
21:11 azawawi "nm -C opencvlibname | grep cpp-function" is my fastest way of doing things atm... maybe i will automate it later
21:16 timotimo soon it'll be time for speed4.html to gain another zoomed view for everything close to what it is after 2016
21:16 timotimo [Tux]: ^  :)
21:18 dalek rakudo/nom: 919a3ed | lizmat++ | src/core/IO/Path.pm:
21:18 dalek rakudo/nom: .starts-with is faster than .substr(0,1)
21:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/919a3ed243
21:22 lokien how to process a text file one line at a time? or do I have to slurp it all into memory?
21:22 timotimo there's a .lines method for that
21:23 lizmat for "filrname".IO.lines { ... }
21:23 awwaiid yeah -- .lines is lazy ya?
21:23 timotimo yes
21:23 lizmat this will read in line by line
21:23 awwaiid all sorts of fancy
21:23 RabidGravy gwooviness
21:23 lokien thanks
21:24 lizmat lokien: also, they're auto-chomped
21:24 RabidGravy boo to .assuming losing the typeconstraints on the remaing signature
21:24 telex joined #perl6
21:25 lizmat rakudobug?
21:25 mspo why doesn't file io have a seek?
21:25 lizmat it doesn't ?
21:25 mspo http://doc.perl6.org/language/io ?
21:26 RabidGravy it does
21:26 lizmat m: $*IN.seek(300); .say for $*IN.lines
21:26 camelia rakudo-moar 541011: OUTPUT«aisteal dom amach trí chnoic Ghleann Domhain ’s an Mucais ar mo chúl␤Ní miste dom ’ rá le brón ’s le crá gur frasach a shíl mise siúl;␤Go Meiriceá siar a bhí mo thriall i bhfad thar an fharraige mhór;␤D’fhág mé slán ar feadh sea…»
21:26 mspo ah ha: http://doc.perl6.org/type/IO::Handle
21:26 lizmat m: .say for $*IN.lines
21:26 camelia rakudo-moar 541011: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
21:26 mspo I was on the wrong page
21:26 mspo sorry for the fud
21:26 lizmat mspo: no pb
21:27 RabidGravy I know it's there 'cause I rewrite it a few months ago :)
21:28 mspo should have been looking here http://doc.perl6.org/type/IO::Handle
21:31 dalek rakudo/nom: 3259ba3 | lizmat++ | src/core/Parameter.pm:
21:31 dalek rakudo/nom: Another .substr(0,1) -> .starts-with
21:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3259ba3e2a
21:32 captain-adequate Just curious... Is anyone working on a new Camel Book?
21:33 captain-adequate You know the Orielly book... But for perl6?
21:34 RabidGravy dunno
21:35 captain-adequate Sure would be spiffy.
21:36 * TimToady has a start on something like that, but it's a long haul
21:37 RabidGravy there are people who have been approached by various publishers to make a Perl 6 book, but don't know any actually doing it
21:37 mspo pocket reference are the only books worth buying these days :)
21:37 dha Well, since the official release of Perl 6 was less than a month ago, it will probably take a *little* while for actual books to come out. :-)
21:38 captain-adequate Makes sense...
21:38 harpactocrates joined #perl6
21:39 hoelzro m
21:39 hoelzro oops
21:41 rindolf joined #perl6
21:49 vendethiel joined #perl6
21:50 keix joined #perl6
21:51 pecastro joined #perl6
21:55 saaki butterfly book?
21:56 saaki taken :(
21:57 raiph joined #perl6
22:08 azawawi RabidGravy: ping
22:09 azawawi found a bug in cpp mangler :)
22:11 azawawi it should give "_ZN2cv6imreadERKSsi" but instead it gives "_ZN2cv6imreadEPcj" for "class cv { method imread(Str $filename, uint64 $flags) returns Pointer is native(LIB) }"
22:13 timotimo so it doesn't understand signed/unsigned?
22:13 azawawi so basically it should be "cv::imread(std::string const&, int)" but it is now "cv::imread(char*, unsigned int)"
22:13 timotimo or what's going on there?
22:13 timotimo then why do you define it to take an uint64 rather than an int64?
22:14 azawawi im trying everything :)
22:14 timotimo oh
22:15 azawawi i guess the problem is mainly in the std::string const& for Str
22:15 azawawi how can i make nativecall do that?
22:18 timotimo oh
22:18 timotimo well, we claim we support c++, but we don't do std::string
22:18 timotimo that's ... not so good
22:19 azawawi timotimo: it is clearly stated that it is not tested in the docs... im testing it now with opencv :)
22:20 timotimo people who were advertising rakudo sometimes said we have C/C++ interop, though
22:20 timotimo without qualifying it sufficiently
22:20 azawawi timotimo: if opencv is fully wrapped in perl6, then i guess you could say we then support c++ mangling :)
22:20 timotimo hm. perhaps
22:20 azawawi http://doc.perl6.org/languag​e/nativecall#C%2B%2B_Support
22:21 * azawawi is going to get his "arduino uno kit" tomorrow hopefully :)
22:22 timotimo is arduino uno in the raspberry pi class of embedded machines, or in the arduino class?
22:23 timotimo ah, that seems to be the original arduino
22:24 timotimo i thought the name sounds so amazing that it must be something new, clearly
22:24 azawawi nope it is not in the same class... rpi = sbc, arduino = microcontroller
22:26 leont joined #perl6
22:28 linuxuser9000 joined #perl6
22:28 Skarsnik_ RabidGravy, don't know if that help but I noticed that method have 2 extra param comparing to a sub
22:31 virtualsue joined #perl6
22:35 azawawi http://d.fuqu.jp/c++filtjs/    # try _ZN2cv6imreadERKSsi
22:36 azawawi "RKSs" => std::string const&
22:36 azawawi and the last "i" => int
22:42 azawawi timotimo: i guess we need to support all this http://mentorembedded.github.​io/cxx-abi/abi.html#mangling
22:43 azawawi so basically... opencv c++ wrapper API cannot be done in 2015.12 or latest
22:44 zakharyas joined #perl6
22:45 azawawi http://answers.opencv.org/question/1754​6/opencv-will-drop-c-api-support-soon/   # so basically perl6 opencv c wrapper is all the old stuff in 2.4 but nothing of the new stuff in 3.x
22:46 Skarsnik azawawi, probably something to add in https://github.com/rakudo/rakudo/blob​/nom/lib/NativeCall/Compiler/GNU.pm6
22:48 azawawi i know... i was hoping someone will do it for me :)
22:48 Skarsnik The issue we will need some nc type to disting like std::string fro char *
22:49 azawawi we also need a new Str type to cover that special case
22:51 RabidGravy m: https://gist.github.com/jonat​hanstowe/c00b7a9a7709d502b404
22:51 camelia rakudo-moar 3259ba: OUTPUT«running one␤any␤one␤running two␤any␤two␤»
22:51 RabidGravy Skarsnik, hacked something together for my exact requirement
22:52 mspo nice
22:53 mspo the m to a url, I mean
22:53 jameslenz joined #perl6
22:53 RabidGravy yeah, the code isn't particularly nice but it works
22:55 leont Skarsnik: sounds like a use-case for "but" ;-)
22:55 Skarsnik This aweful workaround x) https://github.com/rakudo/rakudo/​blob/nom/lib/NativeCall.pm6#L205
22:55 Skarsnik what but does?
22:56 RabidGravy applies a role to a copy of a value
22:57 Skarsnik Oh ok
22:59 cooper joined #perl6
23:03 yqt joined #perl6
23:07 grondilu joined #perl6
23:09 edo joined #perl6
23:09 edo good evening guys
23:09 edo good evening form Uk
23:09 edo I have a question for PERL6 community
23:10 edo I am new PERL5 user
23:10 Skarsnik It's Perl
23:10 edo and after 5 months of training
23:10 Skarsnik but feel free to ask questions ^^
23:10 edo I am finishing to complete
23:11 edo my code
23:11 grondilu jeez man don't press Return that much
23:11 edo I would like to build up
23:11 edo a GUI TK
23:11 edo in PERL 6
23:11 edo is it  possible?
23:12 grondilu https://github.com/perl6/gtk-simple
23:12 timotimo it's not the same as Tk, but it's still somewhat usable
23:13 edo is it stable?
23:13 timotimo gtk-simple isn't finished, but things that are already there are unlikely to change
23:13 grondilu I actually don't know.  Just looked for "tk" in the modules repo :P
23:14 edo and what about QT...Is there any PERL6 QT ready???
23:14 grondilu worst case scenario you can use a C library with nativecall
23:14 flussence Well volunteered!
23:15 timotimo edo: you can use PyQt via Inline::Python, that works
23:15 timotimo dinner time! AFK
23:15 Skarsnik Perl6 Qt will probably be made by someone that understand smoke xD
23:16 edo the thing is that i am trying to develop a tool that matches with Patran
23:16 TEttinger joined #perl6
23:16 edo and patran interface  is written in PERL TK
23:17 edo ok i will take in the consideration the otion in Python QT
23:18 skids joined #perl6
23:18 Skarsnik what is Patran?
23:18 edo FEA tool
23:19 edo Finite Element Analysis tool
23:22 leont Qt through NativeCall sounds like a nightmare, but that may also be because its signal/slot system uses a preprocessor (though less now than it used to)
23:22 edo so
23:23 RabidGravy yeah you'd have to write a wrapper I think
23:23 edo I should desume that it is better start thinking about Python
23:23 leont GTK actually has a reflection system (forgot that name, but Vala also uses it), it may actually be possible to have native GTK objects. It's much more aimed at being wrappable, at the expense of being hard to use in its native language
23:23 inokenty joined #perl6
23:24 Skarsnik One of my project is write the glibc binding with gptrixie and later gstreamer x)
23:26 edo thank you for your time guys
23:26 edo and good night
23:26 flussence .oO( I thought it was spelled PYTHON... )
23:26 edo from UK
23:28 yqt joined #perl6
23:28 arnsholt leont: I'd wash my hands completely of any attempt to wrap Qt without non-trivial amounts of C++ code, TBH
23:29 arnsholt I think I'd actually prefer NativeCall not to support C++ at all, even
23:30 leont As a C++ programmer, I'm skeptical too, even without the moc
23:30 sjn \o
23:31 BenGoldberg joined #perl6
23:33 dalek rakudo-star-daily: ce18af0 | coke++ | log/ (6 files):
23:33 dalek rakudo-star-daily: today (automated commit)
23:33 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/ce18af0442
23:35 Skarsnik there is smoke that generate stuff to put between c++ and your binding code
23:35 Skarsnik *Qt not c++
23:35 adu joined #perl6
23:38 leont GIR is the name I was looking for earlier: https://wiki.gnome.org/action/sh​ow/Projects/GObjectIntrospection
23:39 sivoais Gtk3 in Perl 5 uses GIR. It's quite neat being able to create a wrapper around a library by just pointing to a single file.
23:39 Celelibi joined #perl6
23:45 _Vi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo