»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
rindolf Hi all. 00:00
Hmmm... fglock's not here.
Sucks to be me.
timotimo _nadim: i don't know if i understand you right, but you may want .chomp 00:04
00:05 firstdayonthejob left
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:07
00:09 virtualsue left 00:14 [Tux] left 00:18 AndyDee left 00:20 daotoad left
AlexDaniel m: once once once once { say ‘hello’ }; 00:21
camelia rakudo-moar 5ed58f: OUTPUT«hello␤»
00:22 llfourn joined 00:24 spider-mario left 00:26 [Tux] joined 00:27 llfourn left 00:38 lnrdo left, rodi joined 00:39 espadrine left 00:42 rodi left 00:47 rurban1 left, rurban joined
tadzik El_Che: alright, will look at it tomorrow, if I don't please remind me :) 00:51
00:55 yeahnoob joined 00:59 helloworldlang joined 01:00 pierre-vigier left 01:02 pierre-vigier joined 01:03 ribasushi joined 01:05 kaare_ joined
pierre-vigier hi 01:08
i have an OOP question again, let's say i have a class A with a private attribute class A { has $!private; } 01:09
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
but i do not want to create a public accessor
is there a way to do that?
01:12 Actualeyes joined 01:16 cdg left
AlexDaniel pierre-vigier: ok, well, I know one way 01:16
pierre-vigier: create a private method and use that
01:16 cdg joined
pierre-vigier but i will not be able to call the private method of another instance, will i ? 01:17
let me try
AlexDaniel pierre-vigier: as long as it is in the same class it should be fine
01:19 lokien_ left, _nadim left
pierre-vigier hum, it is working 01:20
thanks
01:20 _nadim joined
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
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
AlexDaniel really, why?
01:21 cdg left
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:
===SORRY!=== Error while compiling class.pl 01:23
No such private method 'private' for invocant of type 'A'
at class.pl:16
so it is trying to find a method, thank you
01:23 llfourn joined
AlexDaniel pierre-vigier: well, thank you for asking this question 01:23
perhaps it should have a private method by default 01:24
pierre-vigier: how often do you need that?
pierre-vigier in fact, i'm working on a module for matrices 01:25
the internal structure is an array of array, will be switch to shaped array later
when adding matrices, comparing equlity, ...
those kind of things between 2 instances 01:26
AlexDaniel pierre-vigier: maybe you can create a trait to make it less annoying
pierre-vigier i want to access the internal storage form
a trait that create a private accessor?
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:28 llfourn left 01:31 kaare_ left
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␤»
pierre-vigier call2 is crashing 01:33
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();
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␤␤»
pierre-vigier so it should be ok
self! for method , $! for attribute
thank you 01:34
i'll do that
01:37 pierre-vigier left 01:38 pierre-vigier joined 01:40 pierre-vigier left, pierre-vigier joined 01:41 Guest86427 left 01:43 zengargoyle left, jack_rabbit left, jack_rabbit joined 01:44 skids joined, zengargoyle joined 01:48 pierre-vigier left, cpage_ left 01:49 pierre-vigier joined, alber left 01:51 rurban1 joined
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:52
(note that A is a joke before anyone gets up in arms ;) 01:53
01:53 rurban left 01:54 pierre-vigier left 01:55 rurban1 left 01:57 yurivish joined 01:58 yurivish left 02:04 domm_ left
flussence
.oO( Cool Kids Don't Read READMEs )
02:07
milwen I tried getting all up in arms once, but then I..... 02:08
spent all day looking for a whetstone.
02:08 domm_ joined
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:11
02:12 atweiden left
autarch I don't see anything about a CLA in there 02:13
02:14 peter__ joined
autarch ah, it's for a commit bit - somewhat annoying but less annoying if patches and PRs can be accepted without one 02:14
ugh, it requires sending snail mail? that's ... is insane too strong a word?
02:14 helloworldlang left
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:15
02:21 peter__ left 02:22 llfourn joined 02:24 xpen joined 02:27 llfourn left
dalek kudo-star-daily: bfdc358 | coke++ | log/ (6 files):
today (automated commit)
02:27
02:36 leont left 02:44 ilbot3 left 02:47 ilbot3 joined, AlexDaniel left 02:48 AlexDaniel joined 02:49 zengargoyle left, zwu joined 02:50 pierre-vigier joined, zengargoyle joined 02:55 pierre-vigier left 02:56 molaf_ joined 02:58 zhi joined 02:59 molaf left 03:00 psy_ left 03:04 zwu left 03:05 linuxuser9000 left, kid51 left 03:06 rindolf left 03:23 llfourn joined 03:28 llfourn left 03:30 psy_ joined, psy_ left 03:34 linuxuser9000 joined 03:48 zhi left 03:50 cpage_ joined 03:52 kubrat left 03:54 kubrat joined 03:55 noganex_ joined 03:58 noganex left 04:01 dj_goku left 04:18 perlawhirl joined 04:20 pierre-vigier joined 04:23 perlawhirl left 04:24 cpage_ left, llfourn joined, linuxuser9000 left 04:25 cpage_ joined, zwu joined 04:27 lsm joined 04:28 Timbus left, kubrat left 04:29 llfourn left
zwu can someone please point me where the relative code is in rakudo for the module loading, especially for the require functionality? 04:29
I tried EVAL function and basically works, while the require is broker in export sub
04:30 dj_goku joined 04:35 jeek left 04:36 Timbus joined, kubrat joined 04:43 jeek joined 04:45 jeek left 04:49 jeek joined 04:52 AlexDaniel left 04:54 raiph left 05:02 revhippie left, aenaxi left 05:09 llfourn joined 05:14 cpage_ left 05:20 pierre-vigier left 05:26 adu joined 05:30 milwen left 05:31 vendethiel joined, pierre-vigier joined
pierre-vigier HI, facing some issues with trait :( 05:32
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();
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␤»
pierre-vigier i can't find the class that "owns" an attribute
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();
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:33 zwu left
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␤»
pierre-vigier something strange as well, the doc states about a method has_accessor, i can call it 05:36
but i do not see it with ^methods
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␤»
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();
camelia rakudo-moar 5ed58f: OUTPUT«False␤»
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();
camelia rakudo-moar 5ed58f: OUTPUT«False␤»
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))␤»
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␤»
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();
camelia rakudo-moar 5ed58f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uenUoTMKPc␤Cannot invoke this object␤at /tmp/uenUoTMKPc:1␤»
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 khw left
pierre-vigier oh, ok 05:42
problem what not the package call 05:43
but it was the say something
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«()␤»
pierre-vigier hum ...
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 ";
camelia rakudo-moar 5ed58f: OUTPUT« A ␤»
pierre-vigier i want to create a method in A if an attribute has that trait 05:46
dalek osystem: ed9e2dd | (Wenzel P. P. Peppmeyer)++ | META.list:
dd Typesafe::HTML
pierre-vigier that's why i am trying to get to the package
hum with our, it means it would not be built fully yet at "compile time" apparently 05:49
05:49 peter__ joined 05:51 peter__ left 05:52 cpage_ joined
sortiz The .new is at runtime, when $!private is created. 05:53
05:53 molaf_ left 05:54 vendethiel left, Cabanossi left, pierre-vigier left 05:57 Cabanossi joined 05:58 peter__ joined, peter__ left 06:02 sortiz left 06:13 daotoad joined, peter__ joined 06:26 peter__ left 06:28 daotoad left 06:34 pierre-vigier joined 06:35 lokien_ joined 06:39 pierre-vigier left 06:46 virtualsue joined 06:47 daotoad joined
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
and there's something that gets every intermediate value from such a sum
it's called scan in haskell and reductions in clojure
so for [1 2 3 4] it's [1 3 6 10] or alternately [3 6 10] 06:57
depending on implementation
IIRC it was something like [\] appended to + or something 06:58
uruwi_ m: say [+] (1, 2, 3, 4); say [\+] (1, 2, 3, 4); 06:59
camelia rakudo-moar 5ed58f: OUTPUT«10␤(1 3 6 10)␤»
TEttinger thanks uruwi_ 07:00
grondilu it's called the triangular reduction metaoperator 07:04
07:05 virtualsue left 07:06 virtualsue joined, virtualsue left 07:09 _nadim left 07:11 domidumont joined 07:14 daotoad left, _nadim joined
[Tux] csv-ip5xs 50000 17.971 12.465 07:16
test 50000 22.753 22.120
test-t 50000 12.443 11.582
csv-parser 50000 49.473 -0.731
07:16 domidumont left
[Tux] looks like they all got a little speedup :) 07:16
07:17 domidumont joined 07:25 CIAvash joined 07:31 _nadim left 07:33 adu left
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 07:41 pat_js joined
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 08:02 pierre-vigier joined, _Gustaf_ joined, sena_kun joined 08:06 Ven joined 08:08 RabidGravy joined, FROGGS joined
RabidGravy morning! 08:12
08:15 Ven left, Ven joined
sena_kun RabidGravy, hi. 08:15
RabidGravy eh up 08:16
08:17 bjz joined 08:20 pierre-vigier left 08:22 pierre-vigier joined 08:24 pierre-vigier left 08:26 pierre-vigier joined 08:33 pierre-vigier left 08:37 sena_kun left, zakharyas joined
pat_js where can I find documentation for the FALLBACK method? 08:37
08:37 firstdayonthejob left 08:38 sena_kun joined 08:39 rurban joined
nine pat_js: design.perl6.org/S12.html#FALLBACK_methods 08:39
It's not much however
pat_js: github.com/niner/Inline-Perl5/blob...5.pm6#L759 for a real world example 08:40
08:42 ELBeavers left
pat_js thanks, so it doesn't update the method cache, in contrast to the add_fallback in ClassHOW? 08:43
08:43 pierre-vigier joined 08:45 Actualeyes left 08:46 abraxxa joined, ELBeavers joined
FROGGS autarch: can you create a PR for the README.md changes? (alternatively you can send a patch to [email@hidden.address] :P) 08:47
08:49 lokien_ left 08:50 rimad joined
FROGGS nine: that might be of interest: github.com/FROGGS/p6-if 08:50
grondilu: ^^ also, remember the backend specific bits in a base64 module? that could be a nice solution to the problems we had 08:51
RabidGravy pat_js, you can add the method in the FALLBACK if you want though 08:52
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;
camelia rakudo-moar 5ed58f: OUTPUT«FALLBACK blah␤name␤name␤»
pat_js RabidGravy: thanks, but I especially don't want to mess with the method cache. 08:59
09:00 Actualeyes joined
RabidGravy that's fine then, the FALLBACK will get called every time if you don't arrange to have the method provided 09:01
09:03 zakharyas left
nine FROGGS: great! Then we just need a way to query the supported Perl versions 09:03
RabidGravy: when you go the add_method route, you may as well just use add_fallback directly :) 09:04
09:04 domm_ left
RabidGravy indeed 09:05
but y'know, in the spirit of TIMTOWTDI and all ;-)
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:07
09:09 domm_ joined
RabidGravy I find myself wanting a thing that is like a mashup between a Supply and a Promise 09:21
09:21 lokien joined 09:22 dakkar_ joined
arnsholt I'm not sure that makes sense. What is it you want? 09:26
lokien what is better - panda or zef? I don't know which one to download 09:27
09:27 leont joined
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:29
like a bunch of callbacks that return a result 09:30
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:31
09:33 FROGGS left 09:38 TheFox21 joined 09:42 rurban1 joined 09:44 sjoshi joined, domm_ left, leont left, rurban left 09:45 sena_kun left 09:50 domm_ joined 09:54 domm_ left
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, pierre-vigier left
RabidGravy boom! 09:58
gfldex recursive type capture is recursive! 09:59
RabidGravy gfldex, stubbing the C first works though ;-)
gfldex m: role R[::T1, ::T2] {}; class C { ... }; class C does R[C, Str] {} 10:00
camelia ( no output )
gfldex it does!
10:02 domm_ left 10:03 rurban joined, rurban1 left 10:06 domm_ joined
moritz this is scary. 10:06
10:07 Celelibi left
moritz RabidGravy: doesn't Supply.map roughly do what you want? 10:07
RabidGravy: instead of using taps
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 10:09 pecastro joined 10:11 espadrine joined 10:12 rindolf joined 10:13 bjz left, brrt joined 10:14 lnrdo joined, lnrdo left 10:15 lnrdo joined, kjs_ joined
dalek kudo/nom: deabe62 | (Dave Rolsky)++ | lib/Test.pm6:
Add a subtest multi that takes the name first
10:15
kudo/nom: 7049d71 | (Dave Rolsky)++ | lib/Test.pm6:
Output the subtest name via diag before running the subtest

This matches p5, and makes the output a little easier to follow as you go
kudo/nom: a192ec5 | lizmat++ | lib/Test.pm6:
Merge pull request #684 from autarch/autarch/test.pm-tweaks

A few small tweaks for Test.pm6
timotimo lokien: i don't know at the moment; can you paste your output?
10:16 Celelibi joined
lokien timotimo: lpaste.net/3252764945862885376 10:18
10:18 TheFox21 left
timotimo looks like your rakudo is vastly out of date 10:18
since it doesn't have $*REPO, which was created before christmas
lokien I've installed it today, duh
timotimo what's your perl6 --version?
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.
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
timotimo ah, yeah
that makes sense
lokien inst#/home/ghost/.perl6/2015.12-199-g5ed58f6
timotimo yeah, panda somehow seems to ended up using the older version
have ended up*
lokien lpaste.net/1131229359961538560 new error
DrForr Incidentally 'rakudobrew build-panda' just gave me the warning 'rebootstrap is obsolete...'.
lokien and panda install x results in "/usr/bin/env: perl6: No such file or directory" 10:21
nine DrForr: upgrade your rakudobrew
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.
lokien timotimo: yeah, "perl6" in the terminal will give me a repl
timotimo rakudobrew self-upgrade
lokien "Already up-to-date." 10:23
timotimo sorry, that was for DrForr
lokien welp, it's good to know I'm up to date
timotimo :)
lokien what am I supposed to do though?
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
but perhaps you'll have more success with panda now?
lokien panda install dasnidnsaidnsaid -> /usr/bin/env: perl6: No such file or directory
timotimo did rakudobrew build-panda work this time, though? 10:25
lokien panda -> /usr/bin/env: perl6: No such file or directory
maybe I'll uninstall it?
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
lokien I'm running rakudobrew build-panda now 10:26
panda -> /usr/bin/env: perl6: No such file or directory
timotimo wtf
lokien I'll rm -rf and do this from scratch
timotimo i hope that'll help 10:27
sorry you're having so much trouble :(
lokien that's pretty discouraging, yeah
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
lokien rakudobrew build moar?
or moar "version"
timotimo i recommend build moar
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?
timotimo when rakudobrew ran, something told him to run it again as root because "you can't do that unless you're root"
and what "that" referred to was apparently to delete everything inside bin/ except for the rakudobrew script
brrt ohhai #perl6
lokien darn, that's funny
timotimo because rakudobrew expects the bin folder to be its own to do with as it pleases
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
s/doesn't/don't
timotimo well, just git clone rakudo and perl Configure.pl --gen-moar is quite good already
brrt aye, that's probably the easiest way to get a current version
lokien but I 10:31
I'd have to upgrade manually each time, right?
nine lokien: oh we do: git clone github.com/rakudo/rakudo.git && cd rakudo && perl Configure.pl --gen-nqp --gen-moar && make install
lokien early enters are the worst
lokien removes rakudobrew
nine lokien: upgrades are just git pull && sh config.status && make install
put that line into an "up" script and it's as easy as it can be 10:32
lokien I'm installing it that way right now 10:33
gfldex m: module P { sub EXPORT(){ C=>Str } }; import P; dd C;
camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/g9PDdHdfc9␤Undeclared name:␤ C used at line 1␤␤»
lokien by the way, despite all that perl ugliness.. it's more logical than python
gfldex lokien: really? i.imgur.com/44hnn.png 10:35
lokien gfldex: is this entire community polish? 10:36
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.
lokien: we're spread pretty much around Europe, North America and Asia.
lokien oh, well. tadzik is polish, sentence on the picture was polish 10:38
I thought it
's like china and golang
screw my enter
timotimo what does the sentence in the bottom actually mean? 10:39
RabidGravy no I'm definitely British 10:40
lokien "Python - pick readability."
timotimo ah
lokien and "tadzik" is like "stevie", but funnier
timotimo i don't understand that :) 10:41
lokien nine: ran these commands, what now?
huf what *is* tadzik in polish?
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
nine For panda: git clone github.com/tadzik/panda.git && cd panda && perl6 bootstrap.pl 10:42
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)
diminutive? don't know how's that in english
like margaret -> peggy 10:44
huf oh. Tádé
lokien also, .pl is a domain name for polish websites 10:47
do you recommend .pl6 for perl6, or just .pl? 10:48
10:49 pmurias left
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␤␤»
RabidGravy is that RTable? and if so has it already been?
lokien what the hell, perl6: No such file or directory again 10:50
10:50 pmurias joined
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␤␤»
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␤␤»
gfldex should it execte EXPORT in that case?
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?
lokien nine: yeah
10:53 pecastro left
lokien nine: and I can't install zef 10:54
nine lokien: what system are you on?
lokien nine: ubuntu
10:54 PlugMyDuck left
nine lokien: have you closed your terminal and reopened it in the mean time? 10:54
lokien nine: yeah, but I'll do it again 10:55
nine: nothing changed
nine If you run env perl6 manually, does it work?
lokien no 10:56
nine What does which perl6 print?
What does echo $PATH print?
RabidGravy so either the location of "perl6" isn't in PATH or the "perl6" isn't where it should be
(or more unlikely the "perl6" isn't executable ) 10:57
10:57 bjz joined
lokien which perl6 - nothing 10:58
nine WTF?
lokien ~/rakudo/install/share/perl6/site/bin:~/rakudo/install/bin:
tadzik Haha, so much me in the backlog :)
lokien and other stuff
nine Then how can you start it from the command line? You're just typing "perl6\n"?
lokien hello tadzik
perl6 <enter> 10:59
timotimo what shell is that you're running?
grondilu I'm buying a windows computer. Any advice on which terminal to use for using perl6 either locally or through ssh?
lokien bash
timotimo ... WTF? :(
tadzik gfldex++ for digging out that old picture; I remember making it, but I thought it lost somewhere in the internet :)
lokien my laptop is special
timotimo i am not aware of anyway you can have "perl6" work, but "which perl6" not work 11:00
wait
"alias perl6"?
tadzik Hello lokien
DrForr grondilu: I actually use VirtualBox on Windows.
gfldex m: gist.github.com/gfldex/87e6af28194e5389a8f2
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…»
stmuk_ grondilu: putty.exe for ssh
lokien timotimo: you mean.. check if perl6 is in my aliases? it isn't
timotimo ... weird! 11:01
gfldex m: say "camelia please learn how to handle multi file gists"
camelia rakudo-moar a192ec: OUTPUT«camelia please learn how to handle multi file gists␤»
timotimo ... is perl6 +x ?
RabidGravy timotimo, which bash "which" will show the alias (and resolve it)
timotimo hm, ok
gfldex would be nice if someone could see if the following fails not only for me: gist.github.com/gfldex/87e6af28194e5389a8f2
RabidGravy [jonathan@coriolanus Tinky]$ alias foo=perl6
[jonathan@coriolanus Tinky]$ which foo
alias foo='perl6'
~/.rakudobrew/bin/perl6
grondilu not familiar with putty. I used cygwin long time ago. Would you recommend putty other cygwin?
nine RabidGravy: it doesn't here
nine@sunshine:~> which ll
which: no ll in ( 11:02
lokien -rwxr-xr-x
stmuk_ putty is just an ssh client .. you could also use cygwin's ssh
if you use cygwin I'd also recommend apt-cyg
El_Che grondilu: i use cygwin as a console when in windows. Now they have a good console instead of cmd.com
grondilu: i ssh from there 11:03
RabidGravy nine, weird
lokien timotimo: -rwxr-xr-x in case I got buried by this wild chat
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.
nine lokien: strace perl6?
lokien timotimo: I just added few lines to vimrc, it's vanilla ubuntu besides that
RabidGravy I have GNU bash, version 4.3.42(1)-release (x86_64-redhat-linux-gnu) for reference
El_Che grondilu: on the other hand I am a casual windows use, ymmv
lokien nine: strace: Can't stat 'perl6': No such file or directory 11:04
RabidGravy if you do "alias" is there an entry for "perl6" there? 11:05
lokien nope. alert, egrep, fgrep, grep, l, la, ls.
RabidGravy so where is your "perl6" installed?
lokien ~/rakudo 11:06
RabidGravy no, the actually "perl6" file which should be in a sub-directory thereof
lokien ~/rakudo/install/bin/perl6 11:07
11:07 bjz left
nine Does ~ in $PATH actually work? 11:07
RabidGravy it depends 11:08
11:08 ribasushi left
lokien umm, I'll switch that 11:08
RabidGravy but putting the full path can't hurt
lokien "panda" halts now instead of crashing, so it's qui- IT WORKS 11:09
nine yeah!
11:10 salva left, raydiak left
nine panda's first startup is just a little slow 11:10
tadzik \o/
lokien Readline failed to install, I wonder what will happen to Linenoise
ew, success
11:10 fluca1978 joined
tadzik Eww 11:10
lokien screw shortcuts, I won't use them again 11:11
nine Finally we're moving into the right direction
11:11 pmurias left
DrForr What did I break re: readline? 11:11
RabidGravy break all the things
DrForr Actually there was an issue report, /me goes digging.
lokien time to write my JAPH now 11:12
11:12 ribasushi joined
timotimo damn, i need to remember the ~ thing 11:13
lokien m: say 'Just another Perl hacker,' #obfuscation#@#$*@*(@
camelia rakudo-moar a192ec: OUTPUT«Just another Perl hacker,␤»
11:13 salva joined
lokien good enough? 11:13
11:13 raydiak joined
timotimo m: say 'JAPH', #tdurnoedrtuniatdrnuiaeotdrs 11:14
camelia rakudo-moar a192ec: OUTPUT«JAPH␤»
timotimo you can even put the comma outside, looks like
11:15 Ven left
lokien I like repl saying "sorry" every time 11:15
timotimo m: say ‘’ ,‚JAPH‘, #&do_execute_to_stdout#
camelia rakudo-moar a192ec: OUTPUT«JAPH␤»
lokien m: (print "I'm a lisper, actually") 11:16
camelia rakudo-moar a192ec: OUTPUT«I'm a lisper, actually»
lokien whaaaa
11:17 bjz joined
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:18
nine m: (say <I'm a lisper, actually>) 11:19
camelia rakudo-moar a192ec: OUTPUT«(I'm a lisper, actually)␤»
lokien :O
RabidGravy I think I'm just going to go with the callbacks, start { } them all and return a Promise.alloff 11:20
11:21 kaare_ joined
RabidGravy allof 11:21
lokien nine: how does that work?
nine m: dd <this is a list containting a couple of words>
camelia rakudo-moar a192ec: OUTPUT«("this", "is", "a", "list", "containting", "a", "couple", "of", "words")␤»
lokien bu-ut 11:22
m: (say "these parens")
camelia rakudo-moar a192ec: OUTPUT«these parens␤»
nine m: say (1, 2, 3);
camelia rakudo-moar a192ec: OUTPUT«(1 2 3)␤»
lokien m: (((say "these parens"))) 11:23
camelia rakudo-moar a192ec: OUTPUT«these parens␤»
lokien perl is wonderful
11:23 pmurias joined
nine That's the beauty :) < > create a list of words split by white space and say will enclose this list in ( ) 11:23
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
m: dd (say "these parens")
camelia rakudo-moar a192ec: OUTPUT«these parens␤Bool::True␤»
RabidGravy m: dd (say "these parens",)
camelia rakudo-moar a192ec: OUTPUT«these parens␤Bool::True␤»
RabidGravy or maybe not
nine the say gobbles the ,
11:25 keix left
nine m: dd (say("these parens"),) 11:25
camelia rakudo-moar a192ec: OUTPUT«these parens␤(Bool::True,)␤»
RabidGravy yaw
lokien m: my @tbl[3;2]; 11:26
camelia ( no output )
lokien m: yours @tbl[3;2];
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];␤»
lokien why :( 11:27
dalek osystem: e576292 | (Wenzel P. P. Peppmeyer)++ | META.list:
add Typesafe::XHTML::Writer
RabidGravy because "yours" isn't a declarator
lokien so I have to prefix all my declarations with "my"?
cute
and scary
nine lokien: my makes it a lexically scoped variable (it actually works for subs, classes and other things, too) 11:28
11:28 sjoshi left
RabidGravy my, our, temp, constant, state or (in classes) has 11:28
lokien o-kay
timotimo we've found that explicitly declaring variables is a good thing 11:29
and you can build a slang that allows you to write "yours" or "your" instead of "my"
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
lokien timotimo: like, communist dsl. everything "our" 11:30
timotimo no, not "our"
lokien nine: python's broken imo, I don't like it
timotimo that's already taken and you shouldn't change what that means
that'll confuse people
awwaiid m: dd: (say "these parens",)
camelia rakudo-moar a192ec: OUTPUT«these parens␤»
lokien timotimo: :( 11:31
11:31 xpen left 11:32 cgfbee left 11:33 bpmedley left, xpen joined 11:34 adhoc left, AlexDaniel joined, fluca1978 left
timotimo you *can* do it. it'll just be very confusing for readers of your code 11:35
11:35 sjoshi joined
timotimo when "our" suddenly means "my" scoped 11:35
11:35 adhoc joined
brrt why not make it 11:35
'thepeoples $foo;' 11:36
or
'shared $foo;'
timotimo hoipolloi?
brrt 'the-people's $foo;'
i think you can do that one :-)
timotimo Our Great Emperor's $bar 11:37
lokien :D
11:37 awwaiid left
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?
nine actually, yes
lokien nine: you thinks it's yours, but it's ours
nine: and after all this time.. it hasn't been optimized for speed? and is still pretty much "experimental"? 11:38
11:38 awwaiid joined
timotimo there hasn't been any code for a few years, actually 11:38
brrt lokien: perl6 is a quite complex language
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
DrForr In *design* for 16, in *code* several times.
nine lokien: rakudo (which is the usefull Perl 6 compiler) started in 2009
ilmari the current primary VM is less than 3 years old
brrt considering we've tried to find it by consensus.... well, 15 years is not a long time
11:39 bpmedley joined
brrt throw a few ones away, in fact :-P 11:39
timotimo well, yeah
ilmari MoarVM (which is the primary backend for rakudo) started in 2012 and was announced in 2013
timotimo "throw one away" doesn't mean "throw only one away"
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){};
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␤»
RabidGravy I mean parrot was sorta-kinda working in 2002/3 but there was no Perl 6 to run on it :)
gfldex is there any way to make that typeobject stick?
nine Another one of those ironies, that you can still use your Python 2 code in Perl 6, but not in Python 3 :)
lokien nine: really? how? 11:41
nine lokien: github.com/niner/Inline-Python
RabidGravy gfldex, I think you need to do "constant Type = ..."
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.
lokien nine: oh. python3 *has* to be backwards-incompatible though
nine It really could use a more active maintainer :(
lokien nine: because of how it handles strings and bytes and such
nine lokien: no it doesn't
gfldex m: constant Type = Int; sub f(Type $t){ say $t.WHAT }; f(1);
camelia rakudo-moar a192ec: OUTPUT«(Int)␤»
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
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 ...>/
lokien now, let's make it faster than c 11:45
:^)
nine It's still possible to write a bridge between Python 2 and 3, even today.
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
timotimo we've been "making it work", especially in order to get the 6.c release out of the door
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 xpen left
lokien ohh, I forgot that perl is The Glue Language 11:47
let's make a game in it :^) 11:48
nine awwaiid: inheritance will be fun :)
11:48 zakharyas joined
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?
AlexDaniel hmmm OpenGL module is not there yet?
RabidGravy are there any graphical games ?
awwaiid nine: did you get it working for p5? I haven't tried at all
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
eh, it wasn't even a joke
AlexDaniel Not in the module directory yet: github.com/bartschuller/perl6-OpenGL
RabidGravy yay! 11:50
lokien brrt: I did
ilmari brrt: linky?
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.
AlexDaniel brrt: yeah, that article was indeed weird…
brrt ilmari: astrofrog.github.io/blog/2016/01/12...ible-code/
lokien so we have something like ncurses? I believe perl will handle text beautifully :^)
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
RabidGravy lokien, yes there is an NCurses library, works really well
brrt anyway, lunch&
nine brrt: and after all the useless pain, they really want people to fix 300000 issues
tadzik RabidGravy: I wrote a few 11:52
lokien RabidGravy: really? I'm so excited
gfldex m: sub outer($T) { constant T = $T; dd $T; sub (T $t){ $t } }; dd outer(Str)(1);
camelia rakudo-moar a192ec: OUTPUT«Str $T = Str␤Int $t = 1␤»
ilmari is there a tickit library?
lokien tadzik: but your blog is a ghost town :(
11:52 pmurias left
gfldex is that type check valid? 11:52
RabidGravy tadzik++ 11:53
tadzik lokien: yeah, I know :/ I don't really write Perl these days
lokien tadzik: why? and what do you write?
11:53 xpen joined
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:53
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 rurban left
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 ?
gfldex use v7;
AlexDaniel gfldex: no-no-no, it is not compatible! 11:56
gfldex m: try { use v7; }
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; }␤»
AlexDaniel gfldex: I want the same code to run on 6 and 7!
lokien tadzik: that's a shame
what about perl 10?
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);
camelia rakudo-moar a192ec: OUTPUT«Str $T = Str␤Int $t = 1␤»
11:57 pmurias joined
timotimo RabidGravy: github.com/timo/gtk_cairo_shooter 11:57
the code ain't too bad
pmurias re compatibility with Python 4 the valid point is that just a version change to 4 will break code 11:58
11:58 rurban joined
AlexDaniel pmurias: wouldn't it break it anyway? 11:58
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 :) 11:59
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 ZoffixWin left
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
AlexDaniel m: if $*PERL ~~ /Perl\s6/ { say ‘I am checking this because I am a fucking idiot’ } else { say ‘What are you doing?’ }
camelia rakudo-moar a192ec: OUTPUT«I am checking this because I am a fucking idiot␤»
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)
tadzik :)
12:02 TEttinger left
El_Che grondilu: on the other hand I am a casual windows use, ymmv 12:02
oops
ignore
gfldex nine: this is how far I got: gist.github.com/2a9a24c64110da844d7e
timotimo gfldex: you have a duplicate key in your Stash there 12:03
(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
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
12:05 cgfbee joined
timotimo seems like what you want is to have a type capture 12:05
sub EXPORT(::T = Str) { .. }
gfldex i may want a macro 12:06
when is the type capture resolved?
timotimo at call time
gfldex i'm gonna try that 12:07
12:08 _Vi left
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:09
bingo! 12:10
gist.github.com/d69c79e516b0cf4d1d88
12:10 cgfbee left
gfldex i had to story the T in a variable to hand that over to the role 12:11
12:16 lokien left 12:17 xpen left, cgfbee joined
gfldex next problem, this sends rakudo into an infinite loop: gist.github.com/gfldex/d69c79e516b0cf4d1d88 12:23
12:23 Skarsnik joined
Skarsnik hello 12:23
12:25 adu joined
jnthn gfldex: multi sub infix:<~>(Example \l, T \r){ note "op1"; l ~ r }; # that's surely an infinite recursion, no? 12:26
gfldex jnthn: i will try to change that 12:27
jnthn CORE::<~>(l, r) # maybe
uh
CORE::{'&infix:<~>'}(l, r) more like 12:28
gfldex jnthn: that was the problem 12:29
12:30 uruwi_ left
moritz or nextsame 12:30
gfldex gist updated and I think I should blog about that 12:31
12:35 yeahnoob left
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 adu left
jnthn That's not going to do anything useful...role composition happens at compile time, and the sub call at runtime. 12:39
(So the sub returns a constant type object, which was computed at compile time)
12:40 AlexDaniel left
rindolf Skarsnik: hi, sup? 12:40
jnthn sub foo(::TT) { Any but R[TT] } # may do it
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:41 pmurias left 12:43 rurban left
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␤␤»
gfldex m: role R[::T] { has T $.attr = 42; }; sub f(::TT){ Any but R[TT] }; say f(Int).new.attr.^name
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␤␤»
Skarsnik rindolf, a bit tired today 12:45
hm, there is no fork? 12:46
gfldex m: role R {}; sub f(::T){ Any but T }; dd f(R)
camelia rakudo-moar a192ec: OUTPUT«Any+{R}␤»
12:47 skids left
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␤»
jnthn m: role R[::TT] {}; sub f(::T){ Any but R[T] }; dd f(R)
camelia rakudo-moar a192ec: OUTPUT«Any+{R[T]}␤»
jnthn m: role R[::TT] {}; sub f(::T){ Any but R.^parameterize(T) }; dd f(R)
camelia rakudo-moar a192ec: OUTPUT«Any+{R[R]}␤»
jnthn m: role R[::TT] {}; sub f(::T){ Any but R.^parameterize(T) }; dd f(Int)
camelia rakudo-moar a192ec: OUTPUT«Any+{R[Int]}␤»
jnthn For now looks like you'll have to force the runtime interpretation 12:48
gfldex shall I rakudobug?
jnthn Arguably we should realize that type vars on sub/method parameters are different from those on roles.
(e.g. late bound)
rindolf Skarsnik: ah. 12:49
Skarsnik oh fork is not in the doc x)
lizmat
.oO( there is no fork )
nine We really should add fork 12:50
jnthn Probably belongs in a POSIX module.
We're so not going to be trying to emulate it on Windows :P
nine Oh come on :)
So this hypothetical POSIX module would just use NativeCall? 12:51
jnthn nine: Yeah
timotimo i randomly wonder if unicody ops are bad for braille-terminal users or other users of assistive technology
Skarsnik m: fork();
camelia rakudo-moar a192ec: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kFx4vBCsz5␤Undeclared routine:␤ fork used at line 1␤␤»
jnthn We had a working fork example in the nativecall repo, iirc
Skarsnik Oh I need to use NC to have fork 12:52
I need a fork like because some code are leaking
jnthn That's a rather roundabout solution to a leak :P
RabidGravy there that's the puppy:
m: gist.github.com/jonathanstowe/5c73...1df24b1b5f
camelia rakudo-moar a192ec: OUTPUT«Doing one␤One␤Doing two␤Two␤»
Skarsnik The issue the leak make no sense, it's either in XML or because of NC that screw the Str class 12:53
arnsholt Could be NativeCall dupping strings 12:55
ilmari m: use NativeCall; sub fork() returns long is native(Str) { * }; say fork 12:56
camelia rakudo-moar a192ec: OUTPUT«21541␤0␤»
dalek c: 80deb58 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Mu.pod:
fix link
c: 2e7d8de | (Wenzel P. P. Peppmeyer)++ | doc/Language/modules.pod:
EXPORT can take arguments
c: a7aa693 | (Wenzel P. P. Peppmeyer)++ | doc/ (2 files):
Merge pull request #346 from gfldex/master

EXPORT can take arguments | fix link
Skarsnik gist.github.com/Skarsnik/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:57
12:58 lokien joined
Skarsnik The GOT are from some NC call (DBIish 12:58
12:59 cosarara left
Skarsnik It's an issue because they will never get freed x) 12:59
13:00 znpy left
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
ilmari jnthn: how about if C code returns a pointer to a string that it retains ownership of? e.g. getenv 13:01
arnsholt The whole string handling story in NativeCall is pretty bad, IMO (in no small part my fault, actually =) 13:02
Skarsnik It's not the issue here. the "Mild fish taco".Str+{NativeCall::ExplicitlyManagedString}, is originaly a regular Perl 6 String. github.com/perl6/DBIish/blob/maste...n.pl6#L169 13:03
ilmari mm, fish taco
arnsholt Yeah, it's a string with a role mixed
Skarsnik it's an anonyme Str that receive the NC Role for no reason 13:04
so that will leak xD
jnthn ilmari: I think you'd use explicitlymanaged for that also
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
Skarsnik arnsholt, you miss the issue. This String HAS NOTHING to do with NC
jnthn Does explicitly manage return a copy of the string with the role mixed in, or do it in-place?
If the latter, we may be seeing action at a distance...
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
ilmari jnthn: the example in the doc.perl6.org/language/nativecall implies it modifies the variable in-place
jnthn Ah. And d'oh.
Skarsnik arnsholt, look the code liked
13:06 cosarara joined
Skarsnik It's NOT data from NC 13:06
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?
Skarsnik The expected is the reference Data that are entered manually in the test 13:08
like my %reference = (stuff manually defined)
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
Skarsnik but if randomly every Str created get the EM role, they are lost memory 13:11
timotimo .o( lost in memoization )
jnthn multi explicitly-manage(Str $x, :$encoding = 'utf8') is export(:DEFAULT,
:utils) { $x does ExplicitlyManagedString;
arnsholt Yeah, I know. NativeCall and strings is just terrible
jnthn yeah, it's using does. D'oh.
We may wish to try: 13:12
multi explicitly-manage(Str $x is rw, :$encoding = 'utf8') is export(:DEFAULT,
:utils) { $x = $x but ExplicitlyManagedString;
arnsholt I'm tempted to propose a redesign that basically only supports Str as being converted on call and freed after the call returns
If you need anything more fancy, encode into a CArray
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
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
13:15 pmurias joined
arnsholt ilmari: Yeah, DBIish shenanigans is what occasioned the whole explicitly managed debacle 13:15
I'm *really* regretting coming up with that idea
ilmari arnsholt: one problem with the pg strings is that they become invalid when you call PQclear(PGresult)
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
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"));
camelia nqp-moarvm: OUTPUT«hi␤hi␤»
jnthn So it's "only" when to free that needs care
timotimo how do we hanlde changes to NativeCall with regards to 6.c and 6.d?
arnsholt NativeCall is not part of 6.c, AFAIK
jnthn m: sub foo(*%slurpy, :$required) { } 13:18
camelia ( no output )
jnthn Hm, I thought that'd be an error...
pmurias jnthn: it is locally for Perl 6
jnthn Oh...why not on camelia, I wonder...
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
*garbage 13:19
awwaiid m: "foo" ~~ 7 # somewhat annoying error rather than just telling me False
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␤␤»
RabidGravy I think Promise.allof may not be working as per the docs
jnthn pmurias: Oddly, not an error locally for me
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 pierre-vigier left
arnsholt Which sucks, I know 13:20
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!" },)
camelia rakudo-moar a192ec: OUTPUT«True␤»
Skarsnik so in my play with stuff I get garbage data on some part
13:22 pierre-vigier joined, travis-ci joined
travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'Merge pull request #346 from gfldex/master 13:22
travis-ci.org/perl6/doc/builds/102091919 github.com/perl6/doc/compare/c4076...aa693c2b88
13:22 travis-ci left
Skarsnik I don't get why it freed $html earlier 13:22
arnsholt Skarsnik: Yeah. It's freed after the *native* function returns
13:23 pierre-vigier left 13:24 pierre-vigier joined, Penguiniator left
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:24
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)
RabidGravy jnthn, yeah that seems to remove the '.break' for some reason
arnsholt Skarsnik: Because the code implementing the marshalling knows *absolutely nothing* about the rest of your code
13:26 kjs_ left
arnsholt That code handles the invocation of the C function, and only that 13:26
It lives, literally, inside the C_call
Skarsnik the string get copied in memory before being passed to C? 13:27
arnsholt Yep
Skarsnik I should add this the NC doc them x)
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
RabidGravy jnthn, ah reading the commit message I see
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)
jnthn ilmari: The list form of await already handles need_all
Skarsnik domidumont, erf preinstalled moar/nqp are probably too old on debian
ilmari jnthn: except needs_all returns a future which yields alist of the component futures
rather than awaiting 13:30
metacpan.org/pod/Future#CONVERGENT-FUTURES
domidumont Skarsnik: I've re-built and installed moar and nqp 2015.12
jnthn ilmari: Given await will eventually be non-blocking, that's less of an issue.
(As in, there's less reason to want a derived Promise back) 13:31
ilmari ah, okay
ilmari lunches
domidumont Skarsnik: but rakudo is not installed, so the directory '/usr/share/perl6/vendor/dist' does not exists
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.
RabidGravy: And that the list form of await covers the common case of wanting all the results or an exception more nicely. 13:33
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:34
rakudo builds fine, but some tests fails. 13:35
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.
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
13:36 pierre-vigier left
RabidGravy not particularly difficult to implement however 13:36
domidumont in vanilla rakudo, I've run: perl Configure.pl --backends=moar --prefix=/usr ; make ; make test 13:37
dalek kudo/nom: 7f592ce | lizmat++ | src/core/Rakudo/Internals.pm:
Streamline handling compiling options
13:39
kudo/nom: 1785ab7 | lizmat++ | src/core/Rakudo/Internals.pm:
Add Rakudo::Internals.PROFILE

Intended to be passing on --profile to subprocesses, to profile pre-comping
jnthn RabidGravy: Promise.allof(@foo).then({ @foo>>.result }) or so
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 :(
RabidGravy I'll fix the doc :)
Skarsnik Not sure we have a release that fix xmas yet
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
moritz \o/
jnthn RabidGravy: When we have the real non-blocking await then it can just be `start await @foo` 13:41
RabidGravy :)
domidumont rakudo-star is still stuck in NEW queue though
13:42 AlexDaniel joined, pierre-vigier joined 13:43 adu joined, lokien left
RabidGravy actually it makes it somewhat simpler, thinging about it 13:43
13:44 molaf joined
RabidGravy why did I want to make a stupidly complicated state machine thingy anyway? 13:44
13:45 hankache joined
Skarsnik For fun? 13:45
FROGGS and profit? 13:46
RabidGravy It's one of those "I guess I'll need one in the future" kind of things
and fun an profit 13:47
FROGGS domidumont++
domidumont: btw, I've not forgotten about rt.perl.org/Ticket/Display.html?id=126894 13:48
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:49
13:50 oftl left, hankache left, ingve left
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:52
FROGGS domidumont: star now has a release branch, but that only works with a current rakudo, not with 2015.12 13:53
domidumont: and this branch uses panda to build modules
domidumont: so the way to got might be to use the rakudo debian package, and package the modules build by panda 13:54
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
13:55 raiph joined
domidumont FROGGS: using panda to build packages is fine if panda can be packaged beforehand 13:56
FROGGS domidumont: it can 13:57
13:57 Ven joined
FROGGS domidumont: perl6 bootstrap.pl in its git checkout 13:57
13:59 bjz left
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 github.com/tadzik/panda
13:59 prammer joined, bjz joined
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 rt.perl.org/Ticket/Display.html?id=126894
moritz domidumont: with fakeroot maybe?
oh, probably also needs a chroot or similar
hrmpf
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?
dalek kudo/nom: e867471 | lizmat++ | src/core/CompUnit/PrecompilationRepository.pm:
Pass on --profile as well when pre-compiling

Unfortunately, precomping and profiling appear to be mutually exclusive apparently
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
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"
Skarsnik NC is not complete
and does not have enought tests 14:04
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: ftp-master.debian.org/new/rakudo-s....11-1.html
dalek rl6-roast-data: 04ea9c0 | coke++ | / (6 files):
today (automated commit)
14:06 sftf joined
El_Che hello 14:06
FROGGS Skarsnik: yes
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
DrForr (Terry Riley)++_
RabidGravy Ooooh 14:08
domidumont Skarsnik: that's fine with me
DrForr (yes, I know, the 'net is fawning over David Bowie, but the man still deserves props.)
FROGGS domidumont: I think the same btw... the release after 2015.12 will be the one we're satisfied with
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 :)
Skarsnik Like play with the current git version and repport when something is blocking
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'.
FROGGS domidumont: well, then I wish a lot of fun doing so :o) 14:11
domidumont FROGGS: thanks :-) 14:12
nine domidumont: there's a #perl6-toolchain channel exclusively for discussing issues like packaging 14:13
domidumont nine: ah ok. thanks. I'll subscribe to this channel 14:14
14:14 cdg joined, cdg left
nine pmurias: docs/language_versions.md 14:14
14:14 cdg joined
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:15
dalek p: da7532a | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Implement nqp::replace.
14:17
p: 037d934 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Test nqp::replace.
p: 9cb2383 | (Pawel Murias)++ | t/nqp/37-slurpy.t:
Use &ok instead of manually printing TAP.
p: 10218d3 | (Pawel Murias)++ | src/vm/js/ (2 files):
[js] Implement nqp::capturenamedshash.

Also stop declared named parameters from getting into the slurpy named hash.
p: ab04407 | (Pawel Murias)++ | t/nqp/76-capture.t:
Test nqp::capturenamedshash
p: f8146e0 | (Pawel Murias)++ | t/nqp/37-slurpy.t:
Test that declared named arguments don't end up as part of the slurpy nameds
FROGGS pmurias++ 14:18
Skarsnik damn, I get not backtrace for 'This type cannot unbox to a native integer' error 14:19
14:19 xyf joined 14:20 skids joined
lizmat Skarsnik: --ll-exception ? 14:21
Skarsnik I mean, I only get the general block, not the precise line 14:22
xyf hello 14:23
I have a question about class creation
lizmat and it is ?
xyf can I do some work in new method?
class Human { 14:24
#my $.counter=0;
has $.name;
has $.age;
has $.sex;
has $.nationality;
has $.eligible;
my $.counter = 0;
method assess-eligibility {
if self.age < 21 {
$!eligible = 'NO'
Skarsnik You probably want to do stuff in BUILD, not new
xyf } else {
$!eligible = 'YES'
}
}
method new ($age,$name,$sex,$nationality){
self.bless(:$name,:$age,:$sex,:$nationality);
#self.eligible='NO'; 14:25
Human.counter++;
# self.assess-eligibility; # here you can't invoke a method ,maybe the object not exist yet
}
}
but why I can't do it in new?
Skarsnik In new the object is still not created
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
submethod 14:27
lizmat xyf: .new is supposed to rteurn the instantiated object
xyf: if you move the increment to *before* the self.bless, you should be in business
awwaiid m: ([0, 1].all != 0).say 14:28
camelia rakudo-moar e86747: OUTPUT«True␤»
PerlJam xyf: Also, why store $!eligible instead of just computing it when needed? 14:29
yoleaux 07:55Z <nine> PerlJam: I'd like to know more about those CPAN modules that don't work with Inline::Perl5
moritz xyf: .bless returns the new object; you can call methods on it if you want
[Coke] needs more coffee. 14:30
14:30 zwu joined
xyf faint? 14:32
sorry, I don't use irc much.....
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*
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)
moritz looks like cutting fingernails with a hammer is a bit tedious :-) 14:40
nine who'd have thought?
14:41 hippie1 joined 14:42 Ven left
DrForr ISTR Tom Hukins lurking around here, though I forget the nick he used. 14:43
jnthn afaik, fork does not actually clone all the threads 14:44
stmuk_ DrForr: tomboh on magnet 14:45
pierre-vigier I have a little problem/question about MOP
if i access a private attribute in a class method, i have no issue 14:46
p6: my class A { has $!at = 42; method answer(A:D:) { say $!at;} }; A.new().answer();
camelia rakudo-moar e86747: OUTPUT«42␤»
DrForr Ah, thanks.
pierre-vigier however, i can't figure out to access a private attribute when using ^add_method
p6: my class B { has $!at = 42; }; B.^add_method( 'answer', method (B:D:) { say $!at;} );
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;} );␤»
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
jnthn pierre-vigier: And then use its get_value method
pierre-vigier ok,
jnthn Or what moritz said if you have that possibility
pierre-vigier that was my "only solution"
jnthn Depends on your use case :)
moritz m: my class B { has $!at = 42; B.^add_method( 'answer', method (B:D:) { say $!at;} )}; say B.new.answer
camelia rakudo-moar e86747: OUTPUT«42␤True␤»
pierre-vigier i wanted to try to avoid to use get_value
jnthn Also, I highly recommend only doing add_method in a BEGIN block 14:48
moritz and .^compose the class afterwards
jnthn Modules that do it at load time tend to be incompatible with precompilation.
pierre-vigier in fact, i am facing a problem which might be a design issue in my module
i'm working on a Matrix module 14:49
internally, i store the cells in an array of arrya
public as for now
14:49 muraiki joined
pierre-vigier WHy public, to do that: 14:49
14:50 lnrdo left
pierre-vigier method equal( Matrix $b ) { 14:50
if $!.cells = $b.cells
14:50 lnrdo joined
pierre-vigier in the concept 14:50
however, having my internal storage public seems really bad
jnthn pierre-vigier: You can do it with a private method
pierre-vigier exaclty 14:51
so i wanted to create an internal trait
is providing-private-accessor
to declare
has $!cells is providing-private-accessor;
14:51 sjoshi left
pierre-vigier and to play with trait and MOP at the same time 14:52
my trait, in substance would have been:
14:52 keix joined
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
pierre-vigier multi trait_mod:<is>(Attribute:D $attr, :$test! ) is export {
my $class = $attr.package;
my $name = $attr.name.substr(2); #drop the initial $!
if $name ~~ $class.^private_method_table {
die "A private method with attribute name already exists, can't create private accessor";
} else {
$class.^add_private_method($name, method (Mu:D:) {
#return $name;
#$!($name)
return $!private;
});
}
} 14:53
jnthn A gist woulda been better ;-)
pierre-vigier yes, jsut wanted to avoid the explanation, if the solution was trivial :D
14:53 pmurias_ joined
nine pierre-vigier: please: gist.github.com 14:53
pierre-vigier indeed
jnthn pierre-vigier: But you have $attr right there, so $attr.get-value(self) is all that method needs to be :)
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)
pierre-vigier thanks, and in a BEGIN BLOCK ?
jnthn Skarsnik: No, because threads aren't about memory isolation
moritz and that's actually one of the few legit use cases for get_value
jnthn pierre-vigier: No, because you're writing it in a trait mod
moritz traits already run at compile time
jnthn pierre-vigier: So you're already getting BEGIN time for free :)
Skarsnik damn 14:55
what can I use them in this case?
pierre-vigier jnthn: thanks a lot
Skarsnik This code grows to 900mb in 24h and it supposed to always run x)
geekosaur what is gumbo here? 14:56
also threads wouldn't help with that
Skarsnik a lib c that parse html
14:56 domidumont left, pmurias left
geekosaur but lots of things won't work with fork unless you work with them only in the child 14:56
14:56 pjscott joined
Skarsnik well I fork and wait in the parent 14:56
geekosaur (this does not sound like one)
Skarsnik I don't do fancy stuff
14:56 m_ joined
jnthn Skarsnik: Really, we need to hunt down the memory leak. 14:57
14:57 m_ left
jnthn Skarsnik: Did you see if my suggested patch to NativeCall earlier on today might help? 14:57
14:57 domidumont joined, keix left
jnthn gist.github.com/jnthn/0a4ca61523d3fb4aa9b5 if you want something to easily apply 14:58
(didn't test it)
Skarsnik hm, let's try find NC.pm without rebuilding rakudo
jnthn, if you want a 'small' case, this leak in the for loop: gist.github.com/Skarsnik/5dfb0dce3b517f13d767 15:00
pmurias_ do we support chown? 15:01
15:01 pmurias_ is now known as pmurias, zakharyas left
Skarsnik m: say IO::Path.^can('chown'); 15:01
camelia rakudo-moar e86747: OUTPUT«()␤»
Skarsnik hm camelia has an empty IO::Path class I think? 15:02
ilmari pmurias: nqp doesn't have a chown op
muraiki pmurias_: I think not, unless something changed in the past 2 or 3 months
pierre-vigier i'm doing sonething wrong apparently, gist.github.com/pierre-vigier/3da0...ddd8f0449b
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
jnthn pierre-vigier: It's get_value, sorry
jnthn typo'd it earlier
pierre-vigier oh, i should have check that, sorry for the bother :(
jnthn No problem :) 15:03
muraiki I think the problem with chown is that it's not terribly portable to the windows side, right?
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
BTW, working perfectly now :)
geekosaur chown is sometimes not very portable on the unix side either (_POSIX_CHOWN_RESTRICTED)
hippie1 For submitting typo pull requests to perl6/doc, is it preferable to submit separate PR for each typo? How about separate branches? 15:07
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
hippie1 moritz: It's 'revhippie' -- thanks!
15:08 adu left
moritz hippie1: invitation sent; have fun! 15:08
RabidGravy but it could be a useful thing in the ecosystem
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
thank you all
15:10 bpmedley left
Skarsnik jnthn, that does not fix my leak because I don't use explicitly manage :) 15:11
15:11 bpmedley joined
dalek c: 6bee7f2 | (Jim Davis)++ | doc/Language/ (2 files):
One typo and one angle-bracket doubling
15:11
15:12 bpmedley left 15:15 xyf left 15:16 bpmedley joined
dalek c: b333245 | (Jim Davis)++ | doc/Language/5to6-perlsyn.pod:
C<...> to C<<...>> for example containing single <
15:16
15:17 bpmedley left, sena_kun joined
jnthn Skarsnik: I thought your issue was something else using it causing action at a distance? 15:19
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:20
The XML module is perl 6 code (no NC) 15:21
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
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
15:25 _nadim joined
_nadim Good Day! 15:25
Skarsnik Hello
15:28 pjscott left
_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:28
15:29 virtualsue joined
Skarsnik sub foo(*@arg) {bar(|@args)} ? 15:29
15:29 pmax joined
moritz sub foo( 15:31
sub foo(|c) { bar |c }
RabidGravy m: sub bar(*@args) { say @args }; sub foo(|c) { bar(|c); }; foo('baz","boom")
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…»
moritz Skarsnik: *@arg flattens, and only takes positionals into account
RabidGravy m: sub bar(*@args) { say @args }; sub foo(|c) { bar(|c); }; foo('baz',"boom")
camelia rakudo-moar e86747: OUTPUT«[baz boom]␤»
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 :)
thanks all
Skarsnik oh yeah the |c x) 15:33
_nadim what's the |c? or where is that documented?
Skarsnik Magic!
No idea x)
_nadim hehe
RabidGravy it gives you a single Capture object
moritz probably in the docs for Parameter or Signature 15:34
[Coke] doc.perl6.org/syntax/%7C 15:35
last item.
a search for "|" will find it.
15:36 mbracht joined
RabidGravy that needs the other case for arguments as well 15:38
15:38 domm_ left 15:41 mbracht left 15:42 AlexDaniel left, domm_ joined 15:45 pmurias_ joined 15:46 cfedde joined
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:47
nine cfedde: you still need to install the Readline or Linenoise module 15:48
15:48 pmurias left
El_Che cfedde: what doe you mean by command line editing? The repl? panda install Linenoise 15:48
15:49 pmurias_ is now known as pmurias
cfedde El_Che: yes. in the repl. 15:49
nine: thanks!
panda install Readline leads to an error. panda install Linenoise seems to work. 15:50
and the repl has history. Yay! 15:51
15:52 FROGGS left
dalek kudo/nom: 35f5821 | lizmat++ | lib/Test.pm6:
Revert PR #684

Somehow it's breaking test 59 of S06-advanced/wrap.t
   1..2
   ok 1 - '{nextsame}()' died
   not ok 2 - right exception type (X::NoDispatcher)
   # Expected: X::NoDispatcher
   # Got: X::ControlFlow::Return
   # Exception message: Attempt to return outside of any Routine
Since I have *no* idea on how the patch can have this effect, and we cannot change the spectest just for that, I felt I had to revert.
15:54
DrForr cfedde: What error are you getting when installing Readline? I've asked people twice and not gotten an answer :)
cfedde DrForr: Failure Summary 15:55
----------------
Readline( *resolve stage failed for Readline: Project Readline not found in the ecosystem)
shall I pm the long messages?
DrForr Aha.
15:55 bpmedley joined
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.
DrForr looks at the ecosystem to see what I should change the name to.
No difference in META.list... 15:58
So I'm doing something wrong in my META.info.
sena_kun Where can I find a profiler for perl6 code? 15:59
moritz sena_kun: perl6 --profile $yourprog 16:00
sena_kun: though only works well if the runtime is pretty short
16:00 aenaxi joined
sena_kun moritz, thank you. Are 10-15 seconds short enough? 16:00
DrForr I don't see a substantial difference, and the "name" tag matches. 16:01
Can anyone tell me what I'm doing wrong elsewhere?
(re: cfedde's error)
Skarsnik aside from "perl" : "v6", and maybe the version string it look file 16:02
DrForr, did you try using Test::Meta? 16:03
DrForr Wasn't aware of its existence.
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:04
_nadim is there an equivalent to P5 "#line 123"? 16:05
Skarsnik ?
lizmat _nadim: no, not yet
:-(
Skarsnik what does that do?
lizmat we could use that for the setting
_nadim Skarsnik: that change the line number. 16:06
lizmat Skarsnik: set the line number
(and optionally the file name)
_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 :-(
_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:08
|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:09
16:10 zakharyas joined 16:11 pierre-vigier left
_nadim lizmat: what would happen if $?LINE was not read only? 16:11
lizmat internally, it isn't anyway 16:12
RabidGravy |Tux|, a Supplier::Preserving will do that for it's supplys
geekosaur I think it'd need to be $*LINE or some such
lizmat it's more that the grammar will probably need to be adapted
_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|
camelia rakudo-moar 35f582: OUTPUT«a␤b␤c␤d␤»
16:16 muraiki left
|Tux| RabidGravy, I was already testing, but tests take longer than 1 minute :) 16:16
thanks
DrForr Ah, broken JSON; fixed, pushed.
geekosaur only reason p5's looks like that is -P
lizmat m: BEGIN $?LINE = 42 # _nadim
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␤␤»
_nadim I met this a bit earlier :) 16:17
geekosaur and -P died
dalek kudo/nom: 9463bd9 | lizmat++ | lib/Pod/To/Text.pm6:
Remove some superfluous returns for performance
16:17 lnrdo left
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;␤»
geekosaur (it used to be possible to make perl feed the script through cpp before running it; cpp outputs those annotations)
lizmat jnthn: any thoughts on Supply.Promise doing a Promise on the Supplier, instead of creating another tap ?
jnthn lizmat: I answered that before... :) 16:19
lizmat ah?
jnthn Is it a hot path?
_nadim lizmat: about your commit which removes returns, what kind of performance hit are we talking about?
16:19 mls left
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
jnthn Well, *something* does 16:21
|Tux| RabidGravy++ github.com/Tux/CSV/commit/9fb32f0b...b1a148b57d
jnthn 'cus we have to keep the latest one somewhere
lizmat well, if multiple threads would be waiting on the same supply ?
mspo can I compile a perl6 app into some kind of single unit that includes its dependencies?
nine mspo: not yet 16:22
mspo a PAR file in perl5, right?
RabidGravy yay!
mspo nine: I'm glad it's on the list
the old way is just bad news ;)
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 zakharyas left
jnthn lizmat: Would they be waiting on the same Promise? 16:23
lizmat no
autarch nine: should rakudo travis be running roast too?
16:23 zakharyas joined
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
lizmat jnthn: they wouldn't be waiting on the same promise
nine autarch: more tests can only be better
jnthn autarch: Not really weird
autarch I just don't know if roast is expected to pass on every rakudo commit or not
lizmat jnthn: now that I've seen your answer, I understand your opint 16:24
*point
autarch maybe rakudo needs a submodule for roast so that people can coordinate changes between the two?
nine autarch: yes it is expected to pass
Skarsnik Do we have a class to express size in bytes? (like you easily have convertion to M/K/G?)
lizmat jnthn: also, I'm not backlogging anymore, if you want me to read something you said, please .tell me
autarch what about the case where someone is patching roast & rakudo for the same thing? this is why a submodule is probably needed
nine Skarsnik: there's a general module for units in the ecosystem
jnthn lizmat: I thought I had .tell'd, but I was just off a very long trip, so... :)
lizmat: I'm not backlogging here either, fwiw :) 16:25
Given up; too much traffic :)
16:25 pmurias left
jnthn "Nice problem to have" I guess 16:25
lizmat yeah :-(
16:25 khw joined, zwu left
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
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:26
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
although it'd be nice to test the stuff in lib/ too
jnthn Well, NativeCall is covered quite well 16:28
But others maybe not
autarch Test.pm6 isn't covered at all, AFAICT
awwaiid flawless 16:29
Skarsnik travis does not run make test x)
jnthn autarch: 01-sanity/99-test-basic.t does, I thought?
16:30 brrt left
abraxxa jnthn: welcome back! enjoyed the time off? 16:30
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.
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
jnthn: there are many ways that could go wrong since the harness can just get things wrong, causing false positives, for example
I guess it's yet another thing TBD ;)
jnthn Good point :) 16:33
|Tux| note: there are no hits for Supplier::Preserving on doc.perl6.org
jnthn I think that setting $*OUT/$*ERR to something that captures output might let us test that we're doing sensible TAP output.
awwaiid maybe a specific tag to check out from roast?
autarch anyway, maybe making rakudo's travis run roast for now might be a good enough change?
ZoffixW Is it correct that "sudo port install rakudo" installs Rakudo *Star* on MacPorts? 16:34
16:34 petercommand left
ZoffixW Setting $*OUT/$*ERR to something that captures output, you say? Well, I have a module just for that! :P (IO::MiddleMan) 16:34
16:35 lnrdo joined
jnthn autarch: Yes, sounds like something worthwhile 16:35
16:35 petercommand joined
ugexe github.com/sergot/IO-Capture-Simpl...Capture.pm also this 16:36
geekosaur ZoffixW, are you up to date? it doesn't look like star to me
I think the old port was Star
but a new one was done after 6.c
ZoffixW geekosaur, I don't even know what "MacPorts" is, but I'm updating 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
geekosaur, so what is it now? Just regular Rakudo?
16:38 mls joined
ZoffixW .seen jdv79 16:39
yoleaux I saw jdv79 3 Jan 2016 21:28Z in #perl6: <jdv79> otherwise spaghetti code:(
geekosaur sudo port selfupdate
which updates the ports tree
ZoffixW I don't have a MacOS or OSX
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 domidumont left
geekosaur basically [Coke] did the original Portfiles based on Star, mojca redid them after 6.c / 2015.12 to be regular rakudo 16:41
16:42 lokien_ joined
geekosaur since Star hadn't (and iirc still hasn't) been released for it yet 16:42
|Tux| *almost* under 12! 16:44
csv-ip5xs 50000 17.451 11.962
test 50000 22.322 21.707
test-t 50000 12.059 11.202
csv-parser 50000 49.979 0.530
ZoffixW \o/ 16:45
16:45 dwarring joined
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 16:49 adu joined
nine ZoffixW: |Tux|++ already does such charts 16:49
16:49 znpy left
ZoffixW Sweet... 16:50
ZoffixW waits for someone to drop a link
nine tux.nl/Talks/CSV6/speed4.html
lokien_ shh, is perl getting faster?
lokien_ is a pleb
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
lokien_ masak: even more fun?! 16:52
16:52 pmqs left 16:53 pmqs joined, zakharyas left
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
*difference between
16:55 abraxxa left, psy_ joined, psy_ left 16:57 psy_ joined, pmurias joined
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
jnthn: do we want to eventually remove them from moarvm?
16:59 lnrdo left
dalek osystem: dc340ae | (Sylvain Colinet)++ | META.list:
Add Linux::Proc::Statm, a module to get /proc/pid/statm info

See github.com/Skarsnik/p6-linux-proc-statm
16:59
[Coke] (remove return for perf) - is there a hope that eventually the optimizer will handle this?
Skarsnik my smallest module x)
hahainternet m: say Inf != NaN 17:01
camelia rakudo-moar 9463bd: OUTPUT«True␤»
ZoffixW m: say v6 before v6.c
camelia rakudo-moar 9463bd: OUTPUT«False␤»
hahainternet i wonder if that's 'correct'
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
ZoffixW hahainternet, sure, why not? 17:02
hahainternet ZoffixW: infinity is not a number, sorta 17:03
i'm not a mathematician!
ZoffixW hahainternet, I believe this more has to do with IEEE standard than rules of mathematics
17:03 _Vi left
moritz sena_kun: yes, should be short enough 17:03
hahainternet oh indeed, i don't doubt it
i was just messing around and it struck me as a little bit of a wat
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
Skarsnik I mean it's like "whatever version of perl6)
17:04 SCHAAP137 joined
ZoffixW Skarsnik, whatever version would be the WhateverStar: "*" 17:05
[Coke] geekosaur: I did not do the original portfiles based on star
17:05 Praise left
geekosaur hm. so where'd the idea that they were based on star come from? misdocumented? 17:06
[13 16:37] <ZoffixW> geekosaur, I don't even know what "MacPorts" is, but I'm updating rakudo.org/how-to-get-rakudo/ and I see "sudo port install rakudo" is listed as the instruction to install R* on MacPorts
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.
geekosaur actually that sounds like a doc bug
[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\
[Coke] sudo port install rakudo is to install rakudo's compiler. not R*
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, Praise left, Praise joined
dalek kudo/nom: 007f027 | lizmat++ | src/core/ (2 files):
Abstract -I logic into Rakudo::Internals
17:10
ZoffixW just registered getperl6.com
17:10 zakharyas joined
Skarsnik huhu 17:10
getalltheperl.org 17:11
pmurias Skarsnik: that installs a Perl6+Perl6+Inline::Perl5 combo package?
dalek osystem: b739306 | (Zoffix Znet)++ | META.list:
Add Finance::CompoundInterest to ecosystem

Compound Interest calculations for fun and profit. See github.com/peelle/Finance-CompoundInterest (Closes #121)
17:13
ZoffixW Neat. We're getting so many modules into the ecosystem there was a merge conflict :P 17:14
RabidGravy cool 17:15
lokien_ how would you check if string contains two (or more) letters next to each other? 17:18
"hskabb" -> true
"jsbaj" -> false
Skarsnik timotimo will probably stop adding the news modules in the weekly post x) 17:19
It start growing a lot
moritz m: for <hskabb jsbaj> { say so /(.)$0/ } 17:20
camelia rakudo-moar 9463bd: OUTPUT«True␤False␤»
moritz lokien_: ^^
RabidGravy +28 since I last added one
ZoffixW :o
Juerd m: "hskabb" ~~ /$<letter> = (.) $<letter>/ 17:21
camelia ( no output )
Juerd m: so "hskabb" ~~ /$<letter> = (.) $<letter>/
camelia rakudo-moar 9463bd: OUTPUT«WARNINGS for /tmp/MO7fD3cXhN:␤Useless use of "so " in expression "so \"hskabb\" ~~" in sink context (line 1)␤»
sena_kun It's time to optimise. Are there any docs about sink-all method(except 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).
Juerd m: say so "hskabb" ~~ /$<letter> = (.) $<letter>/
camelia rakudo-moar 9463bd: OUTPUT«True␤»
lokien_ moritz: it's.. one line.. :o
Juerd (Why doesn't camelia auto-say, like the repl does?)
ZoffixW Juerd, because sometimes she's used for debugging thinks like sink warnings and auto-say would make that impossible.
s/thinks/things/; 17:22
Juerd ZoffixW: Ah. Good point.
17:22 pmax left 17:23 zakharyas left
lokien_ Juerd: thanks, also 17:23
Juerd lokien_: Note that the regex is effectively the same. I just wrote an overly verbose one for fun :) 17:24
In practice I'd use / (.) $0 / instead.
[Coke] if you want to see what's calling it on your code, you can use "--profile"
ZoffixW lokien_, also note, it checks for a character, not a letter :)
m: for ' ' { say so /(.)$0/ }
camelia rakudo-moar 9463bd: OUTPUT«True␤»
lokien_ Juerd: yeah, it looks weird
Juerd You'll get used to that :)
lokien_ ZoffixW: what's the difference? 17:25
[Coke] profile: say so "hskabb" ~~ /$<letter> = (.) $<letter>/
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)?
Juerd I've gotten so used to it, that it doesn't look weird at all anymore.
[Coke] prof-m: say so "hskabb" ~~ /$<letter> = (.) $<letter>/
camelia prof-m 273e89: OUTPUT«True␤Writing profiler output to /tmp/mprof.html␤»
.. Prof: p.p6c.org/1f20894
ZoffixW lokien_, well, an English letter would be [A-Za-z]. So a space or, say "\" aren't letters, but characters. 17:26
Δ is also a letter, but not an English one.
lokien_ Juerd: it's like that weird girl from your school you find wonderful, but you don't know why
17:26 drrho joined
lokien_ ZoffixW: as I thought, thanks :) 17:27
sena_kun [Coke], I already profiled code, now I want to replace bottleneck with something better.
Juerd lokien_: I have no experience with that :)
Skarsnik sena_kun, You probably can't speed this ~~
masak lokien_: I don't think it's like that ;)
lokien_ Juerd: that's a shame :D
masak: so, it's like what?
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
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_amd64\cl.EXE"' : return code '0x2'
this is a newish error when installing on windows
moritz ugexe: I think jnthn++ mentioned that too
Juerd lokien_: Nah, I'm just not very interested in girls :)
alpha123 does perl6 make me more attractive?
lokien_ Juerd: oh, well. 17:29
Skarsnik sena_kun, hm, maybe you can try something using memcpy
lokien_ alpha123: absolutely
ZoffixW alpha123, yes!
moritz alpha123: my then girlfriend married me after I started Perl 6, so that's a data point
alpha123 lol
Skarsnik sena_kun, or whatever C call alow you to copy mem location
TimToady is a character...
ZoffixW heh 17:30
lokien_ larry? :o
ZoffixW lokien_, yeah, that's Larry
geekosaur ugexe, how recent is your moarvm?
lokien_ Hey Larry!
TimToady used to be able to keep that a sekrit
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 ;)
ZoffixW heh
ugexe geekosaur: thats from a nuke then build, so most recent
geekosaur 2016 Jan 12 19:52:14 <dalek>MoarVM: 940850e | jnthn++ | Configure.pl:
2016 Jan 12 19:52:14 <dalek>MoarVM: Correct installation of msinttypes header test.
sena_kun Skarsnik, I'll look firstly at zlib library source code. If I will understood nothing I will try memcpy.
geekosaur which may mean the bug is still there, I guess 17:31
ugexe ah, must need a version bump somewhere?
geekosaur (that is the fix may not have been all of what was needed)
sena_kun s/understood/understand/
geekosaur maybe
moritz ugexe: maybe try --gen-moar=master ?
masak lokien_: though I guess it's kind of like getting used to the peculiarities of any written language.
17:31 kyclark joined
flussence jnthn++ # fixing my stupid patch 17:31
lokien_ masak: I'll ask haskell guys about a proper metaphor 17:32
sena_kun lokien_, haskellish guy in the chat, any questions here?
lokien_ sena_kun: what is love?
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
sena_kun lokien_, love is an uncountable and an infinite monad. A Cartesian closed category if you like it will.
lokien_ alpha123: so idris = pure love
alpha123 EXACTLY 17:34
sena_kun *if you will
alpha123 does have a bit of a love affair with Idris at the moment
masak love is linear types.
love is Gödel numbering.
TimToady love is bad at tennis 17:35
masak :P
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. pastie.org/10687726
cfedde giggles 17:36
lokien_ TimToady: I want a t-shirt with that quote
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 randomguy left
TimToady love is pretty good at golf though 17:38
lokien_ was it a pun? it was a life-changing sentence
JimmyZ kyclark: you may like github.com/jnthn/grammar-debugger
jnthn .tell abraxxa Sorry, had to disappear for a bit... Yes, time off was useful, thanks for asking. :)
yoleaux jnthn: I'll pass your message to abraxxa.
TimToady the two are not mutually exclusive
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 github.com/timo/iperl6kernel but that looks very unfinished
lokien_ is immutability good in perl world? I'd prefer most of my vars immutable, but I dunno
ugexe --gen-moar=master doesn't seem to affect the error once i nmake install
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.
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
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:41
17:42 DrForr left
cfedde or somethign else I have not thought of yet. 17:42
17:42 raiph left
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
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
alpha123 also GC can do fun tricks with immutability (if it knows an object is immutable)
Hotkeys is immutability immutable 17:48
lokien_ that's a good question
jnthn There's also the my \foo = ... notation for a single static assignment var
flussence well by "tons", maybe I meant as in the amount you'd have back when computers literally weighed tons :)
Hotkeys can you do something like
TimToady pushes the mute button so he can backlog...
Hotkeys my $foo is r = ...
or is that only for things in classes 17:49
jnthn Hotkeys: You can have variable traits, if that's what you mean.
Hotkeys (or does that go on the other side of the assignment I cant remember)
rindolf cfedde: well, right now I'm investigating ways of making the codebase run faster.
jnthn Though my $foo is SomeType is setting the container type 17:50
Less useful with scalars, but
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)␤»
cfedde rindolf: has it made any progress?
jnthn Useful for things where you want a different container type
rindolf cfedde: it's still too early to tell. 17:52
jnthn should be preparing noms :)
bbl
nine mmmh...noms
rindolf cfedde: I'm still working on it.
cfedde: I have yet to benchmark it.
17:53 pdcawley left
cfedde Ah yes. the scientific method. Here we substutute HPPO for evidence. 17:54
17:55 dakkar_ left
alpha123 Is there any way to run Perl6 as a jupyter/ipython) kernel? 17:55
s/Perl6/Rakudo// 17:56
17:59 virtualsue left, drrho left
kyclark This parser works better: 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). 17:59
18:00 leont left
alpha123 kyclark: perhaps lookup parser expression grammars (PEG) 18:00
since that is what Perl6 uses
18:00 sftf left 18:02 virtualsue joined
geekosaur alpha123, 2015 Dec 31 00:38:25 <cygx>disturbingly_rea: there's some initial work on a Jupyter kernel: github.com/timo/iperl6kernel 18:04
preliminary only
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
geekosaur "preliminary only" 18:05
moritz kyclark: you can use non-capturing groups for that: token TOP { ^ [ <.comment> | <record> ]* $ }
flussence explicit ^ and $ aren't necessary in TOP either
moritz kyclark: or define a custom 'ws' rule (for whitespace), and use 'rule' instead of 'token', which will insert it automatically for you
geekosaur if you are looking for something ready to run right now then the answer is "not yet"
18:06 peter__ joined
alpha123 geekosaur: Well, I don't mind doing a little hacking 18:06
TimToady wasn't there a blog about FASTA parsing somewhere already?
mspo kyclark: you can use something like this token TOP { ^[<comment>+||<record>+]+ $ } 18:07
kyclark: I found using *'s in TOP led to a lot of infinite loops
18:07 virtualsue left
Hotkeys TimToady: pasta? 18:07
18:08 kjs_ joined, drrho joined, lokien_ left, mindos left, pnu left, jnap left, mort96 left, DrParis left, corbyhaas left, clkao left, olinkl left, ggherdov left, SmokeMachine___ left, BuildTheRobots left, PotatoGim left, mrsolo left, kipd left, Lucas_One left, Spot__ left, chansen_ left
Hotkeys .... 18:09
18:09 espadrine left
Hotkeys uhh 18:09
Why so many klines
18:09 lnrdo joined 18:10 lokien_ joined
TimToady kyclark: googling for "perl6 fasta" gives lots of prior art 18:10
geekosaur someone accidentally klined the (or a) web gateway
ZoffixW :o
Hotkeys lol
kyclark TimToady: Ah! Very helpful. <slaps-forehead>
pmurias rindolf: fglock doesn't hang out on #perl6 often anymore 18:11
18:11 peter__ left
lokien_ I got "you are banned from this server" message :o 18:11
18:11 DrParis joined
rindolf pmurias: ah. :-( 18:11
pmurias: well, I managed on my own.
lokien_ turns out irccloud isn't so nice
18:11 DrParis is now known as Guest35143, mort96 joined, M-matthew left
ZoffixW lokien_, heh, there was a massing K-Line just now :) 18:11
massive too :P
ZoffixW rings an announcement bell 18:12
lokien_ ZoffixW: what is it? I'm an irc noob
TimToady maybe it's run by a pythonista
Hotkeys yeah
it was irccloud kline
lokien_ I'm sure it is
ZoffixW lokien_, umm... I think that means a user can't connect to any IRC server
geekosaur ircops tried to kline a user, didn't notice they were on irccloud, ended up kline-ing everyone on irccloud
well, kline-ing one of irccloud's gateway servers
Hotkeys lol
alpha123 lol 18:13
Hotkeys I'm glad I use a personal bouncer
18:13 virtualsue joined, Guest35143 is now known as parisba_
ZoffixW FYI: I created a "User Experience" repo: 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
ZoffixW If you notice someone grumpy about Perl 6, it could be useful to direct them to open an Issue on github.com/perl6/user-experience/issues
lokien_ let's write hexchat in perl, it will be finally good enough
18:13 BuildTheRobots joined
Hotkeys I agree lokien 18:14
pmurias rindolf: you can always email him ;)
Hotkeys I was thinking of trying to trick hexchat into letting me script in p6
alpha123 ZoffixW: Won't that result in a rather low signal-to-noise ratio
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.
lokien_ Hotkeys: we should start a company
18:14 jnap joined
Hotkeys a company? 18:14
for hwat 18:15
rindolf pmurias: OK, email is less real time, and more formal.
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.
TimToady
.oO(P6's killer app: how to install P6...)
Hotkeys TimToady++
lokien_ Hotkeys: for our handicapped hexchat
Hotkeys 6Chat
TimToady I suppose it's possible a distributed attack was coming in via irccloud... 18:16
Hotkeys I call dibs on the name
dibs are definitely a legal thing
18:16 firstdayonthejob joined
geekosaur sadly that would not fix its utf8 problems unless you also rewrite pango another support libs in perl6 18:16
(not simply bind to it)
*and other
alpha123 7chat sounds way hipper, why didnt perl skip a version
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 :)
mspo agreed; six is a bad luck number in tech
Hotkeys is it?
mspo see: ipv6, perl6 (or right)
lokien_ we mustn't forget to keep our code perl 7 compatible
Hotkeys trie
alpha123 Hotkeys: remember IPv6, PHP 6, and... uh, Perl6
18:17 sena_kun left
ZoffixW huggable, user experience :is: Identifying issues in and improving the Perl 6 user experience: github.com/perl6/user-experience 18:17
huggable ZoffixW, Added user experience as Identifying issues in and improving the Perl 6 user experience: github.com/perl6/user-experience
Hotkeys if it was ipv7 then maybe my ISp would actually give me an IP in the standard
18:18 clkao joined, mindos joined, Spot__ joined
Hotkeys stares annoyed at Rogers 18:18
alpha123 ip7 sounds cool, ipv6 sounds lame
that is totally the problem
Hotkeys Rogers has been apparently rolling out ipv6 to residential users for years now
I AM YET TO GET MY IP
moritz today they're all striving for IP=
how to botch a joke 18:19
today they're all striving for IPO
18:19 chansen_ joined, Lucas_One joined
alpha123 is relatively sure his ISP is entirely unaware of the existence of IPv6 18:19
18:19 corbyhaas joined, pnu joined
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
lokien_ mspo: you sick hacker 18:20
mspo too bad getaddressbyname does that AAAA first
what a bunch of nonsense
18:20 SmokeMachine___ joined 18:21 olinkl joined
pmurias jnap: re 'run my existing stuff', the deliberate break in backward makes that complicated 18:21
18:22 ZoffixW left, kjs_ left
flussence just have the old and new code talk over HTTP :) 18:22
pmurias flussence: it was 'run my existing stuff... but faster...' 18:23
18:24 kjs_ joined 18:26 zakharyas joined, M-matthew joined, kipd joined 18:29 peter__ joined 18:30 PotatoGim joined, mrsolo joined 18:31 kjs_ left, _Vi joined 18:34 pdcawley joined, peter__ left
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
however I could use (and have used) this technique to port code away from Perl totally...
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:35
18:36 kjs_ joined, ggherdov joined, virtualsue left
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:36
18:37 spider-mario joined
moritz jnap: I'm pretty sure it was a presentation by nine 18:38
aka stefan seifert
pyrimidine kyclark: if you're still around, there are a few FASTA grammars floating about, including bioperl6 and BioInfo. e.g. github.com/cjfields/bioperl6/blob/.../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.
nine jnap: niner.name/talks 18:40
18:40 uruwi_ joined
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:42
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
jnap: but, like I said, they were simple cat apps.
mspo what's FASTA? 18:44
18:44 lichtkind joined
mspo nm google got it 18:45
Hotkeys It's an italian food
PerlJam quick italian food
skids FASTA than WAT?
moritz jnap: niner.name/talks/Leapfrogging%20the...tstrap.pdf
jnap PerlJam: the challenge here is dealing with arbitrary attributes. but is a start.
moritz: thanks! 18:46
pyrimidine mspo: simple format used in bioinformatics for sequence data: en.wikipedia.org/wiki/FASTA_format
18:46 lostinfog joined
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
pyrimidine moritz: it can't be worse than FASTA :)
mspo moritz: I think it's called xml
pyrimidine heh
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:48 cognominal_ left 18:49 pdcawley left
dalek p: 03c396b | (Pawel Murias)++ | src/vm/js/ (4 files):
[js] Implement nqp::getcodecuid.
18:50
p: 3abb3c4 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
[js] Implement a bunch of _n list ops.
p: abd74b2 | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Test _n list ops and an extra (js backend regression) test for the return value of bindpos_s.
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
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:53
PerlJam enforce? you must be thinking of a different language :) 18:58
lokien_ I don't know a better word for that..
PerlJam allow? provide? afford? 18:59
lokien_ allow? how do you know this function wants to behave like a mutator?
PerlJam kyclark: Do you know much about Parse::RecDescent?
lokien_ it wants to be a function, man
anyway. can we do that? 19:00
19:00 lnrdo left
PerlJam kyclark: If so, it would be neat to have a P::RD -> Perl 6 translator even if it didn't do everything 19:00
19:07 kyclark left 19:08 kjs_ left 19:09 yurivish joined 19:10 kjs_ joined
pmurias lokien_: create a temporary variable and pass it? 19:11
lokien_: ah, you mean a method not a function 19:12
lokien_ pmurias: but it doesn't sound too bad
so bad*, duh
19:13 yurivish left
pmurias my $foo = Foo.new; my $result := do {my $copy := $foo.clone; $copy.mutator; $copy } 19:15
lokien_: if the mutator method is chaining (returns the object itself) you can just do $foo.clone.chaining_mutator 19:16
lokien_ pmurias: ookay 19:17
19:20 yurivish joined
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 github.com/perl6/roast/pull/97 19:24
cfedde rindolf: that is not moving in the desired direction. I suspect pretty bloated and "safe" js. 19:25
pmurias awwaiid: you mean smart links? 19:26
rindolf cfedde: yes, quite. 19:27
pmurias cfedde: what do you mean by "safe" js? 19:28
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:29
19:30 pi4 left, pi1 joined
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 zakharyas left
pmurias and pay a hefty performance price unless you add special tricky ways for common cases 19:32
cfedde pmurias: yup. 19:34
19:34 kjs_ left 19:35 cdg left 19:36 cdg joined
pmurias getting peak on js performance for Perl 6 should be easier then for Perl 5, as the language is less dynamic 19:37
19:40 cdg left
cfedde of course perlito is more a perl5 to X thing right now. 19:52
19:53 M-Illandan left
lichtkind what is the most efficient way to calculat permutations in perl 6? 19:55
awwaiid pmurias: smart links?
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:56 gtodd left
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
lichtkind jnthn, i suspected there is something but i didnt knew them thanks
pmurias alpha123: less dynamic is the wrong word, more things are lexically scoped 19:58
19:58 Skarsnik_ joined
pmurias awwaiid: it was possible in the past to render the synopsis with embedded tests 19:59
20:00 dha joined
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
awwaiid pmurias: hmm! link me? 20:01
azawawi hi
:)
awwaiid greetings azawawi
azawawi greetings awwaiid
:)
awwaiid I should add your nick as a hilight for when people auto-complete us wrong
20:02 Skarsnik left
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 :(
azawawi how is c++ nativecall on latest vs 2015.12... anything changed? 20:03
awwaiid pmurias: ohhh right. I've seen those
pmurias design.perl6.org/S04.html
there even used to be markers which showed the tests pugs passed 20:04
metacpan.org/pod/Text::SmartLinks - the code that used to handle that
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?
pmurias RabidGravy: you can call it? 20:06
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?
RabidGravy sure, but I want to make a trait that only applies to methods of a certain signature
lichtkind hai azawawi
azawawi github.com/azawawi/scripts/blob/ma...cv_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
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
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?
awwaiid m: ((10) ~~ :(Int $x where $x > 5)).say
camelia rakudo-moar 007f02: OUTPUT«False␤»
20:12 ab6tract joined
jnthn m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(C, Int) 20:12
camelia rakudo-moar 007f02: OUTPUT«False␤»
jnthn m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(C: Int)
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␤…»
jnthn hm :)
RabidGravy yeah, that was part of the problem
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, *%_)
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␤»
awwaiid m: sub foo(Int $x where $x > 5) { ... } ; ((5) ~~ &foo.signature).say # I thought this would work
camelia rakudo-moar 007f02: OUTPUT«False␤»
jnthn m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ :(C, Int, *%_)
camelia rakudo-moar 007f02: OUTPUT«False␤»
RabidGravy but, even if I do
m: class C { method m(Int $a) { } }; say C.^lookup('m') ~~ (method (C: Int) { }).signature
camelia rakudo-moar 007f02: OUTPUT«False␤»
RabidGravy m: class C { method m(Int $a) { } }; say C.^lookup('m').signature ~~ (method (C: Int) { }).signature
camelia rakudo-moar 007f02: OUTPUT«True␤»
RabidGravy oh wait 20:14
jnthn Aha...so wonder what the difference is...
RabidGravy m: class C { method m(Int $a) returns Str { } }; say C.^lookup('m').signature ~~ (method (C: Int) returns Str { }).signature
camelia rakudo-moar 007f02: OUTPUT«True␤»
20:14 kyclark joined
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␤»
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␤␤»
TimToady o_O
awwaiid m: class C { method m(Int $a) { } }; say C.^lookup('m').signature
camelia rakudo-moar 007f02: OUTPUT«(C $: Int $a, *%_)␤»
TimToady m: class C { method m(Int $a) { } }; say C.^lookup('m').signature ~~ :(C, Int, *%)
camelia rakudo-moar 007f02: OUTPUT«True␤»
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
camelia rakudo-moar 007f02: OUTPUT«True␤»
[Tux] Ulti, Inline::Perl5 + Text::CSV_XS, Unfeatured unoptimized reference perl6, Full featured perl6 Text::CSV_XS, perl6 CSV::Parser
Ulti, Inline::Perl5 + Text::CSV_XS, Unfeatured unoptimized reference perl6, Full featured perl6 Text::CSV, perl6 CSV::Parser
RabidGravy okay, that's weird, it doesn't seem to work in a trait properly for me
TimToady wonders if :(C: Int) should automatically add in the *% 20:19
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
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 { } }
camelia rakudo-moar 007f02: OUTPUT«False␤»
[Coke] is cjfields on #perl6? 20:23
20:25 CIAvash left 20:26 peter__ joined
RabidGravy yeah so the identical, identical thing doesn't work in a method trait 20:27
20:28 darutoko left
dalek kudo/language_versions: f6ea655 | (Stefan Seifert)++ | / (8 files):
First attempt at adding a CORE.d setting
20:28
kudo/language_versions: 8c162c8 | (Stefan Seifert)++ | / (7 files):
Bring back IO::CatPath and IO::CatHandle in 6.d

nine@sphinx:~> perl6 -e 'IO::ArgFiles.new;' nine@sphinx:~> perl6 -e 'use v6.d; IO::ArgFiles.new;' Could not find symbol '&ArgFiles'
20:30 peter__ left
RabidGravy is the method not quite "finished enough" when it hits the trait_mod ? 20:30
dalek kudo/nom: 1d413e4 | lizmat++ | src/core/JSON/Pretty.pm:
Simplify to-json proto sig

Since each of the candidates has the same handling of the possible named variables, it would seem to me that the specificity of the proto sig would keep it from getting optimized away.
The sig was part of the original addition to the repo, so no other information could be gleaned as to why this specific sig was used.
20:31
jnthn RabidGravy: iirc, it should at least have its signature... 20:32
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␤»
RabidGravy so something's going weird there 20:35
20:41 yurivish left
azawawi Can NativeCall handle a function inside a C++ namespace? 20:42
RabidGravy yes
'ang on
azawawi something like this github.com/rakudo/rakudo/blob/nom/...ngling.cpp ?
20:43 jameslenz left
RabidGravy github.com/jonathanstowe/Audio-Sou...uch.pm#L11 20:44
yeah, but it will get the name wrong if there's a namespace
so, you need to specify the fully qualified symbol 20:45
20:46 rindolf left
azawawi RabidGravy: cool... thx 20:48
20:49 colomon left
dalek kudo/nom: 5410113 | lizmat++ | src/core/JSON/Pretty.pm:
Use low level escapes lookup
20:49
RabidGravy so the name e.g. is soundtouch::SoundTouch::getVersionStr, but without qualifying it will guess Audio::SoundTouch::SoundTouch::getVersiomStr 20:50
of course you could just make ugly class names 20:51
as most people seem to do lower case namespaces in c++ 20:52
20:52 pmurias_ joined
azawawi yup 20:54
cv::imread
_ZN2cv6imreadERKSsi
cv::imread(std::string const&, int)
20:56 pmurias left, cognominal joined 20:57 firstdayonthejob left
xenu i don't really recommend creating bindings for c++ libs, it's just too painful 20:59
you know, templates, name-mangling
and stuff
it's better to create c api wrapper in c++
and *then* create bindings in something more high-level
uh, i meant "wrap c++ api in c api" 21:00
21:00 ab6tract left 21:01 firstdayonthejob joined, sftp joined, lnrdo joined 21:03 andrewalker left
masak liked jeffreykegler.github.io/Ocean-of-Aw...pdown.html -- "Top-down parsing is guessing" 21:03
hoelzro that's what I did for my Xapian bindings (wrap C++ in C library) 21:05
I thought OpenCV had a C-compatible interface? 21:06
21:06 kyclark left
azawawi hoelzro: true but it is deprecated 21:07
hoelzro ahhhh
azawawi hoelzro: you could use cvLoadImage, but the preferred way is cv::imread
masak 'night, #perl6
hoelzro o/ masak
21:07 hankache joined
azawawi hoelzro: opencv c api already works with nativecall so far... i was trying to bind to c++ api 21:08
hoelzro *nod*
hankache hello #perl6
hoelzro o/ hankache
azawawi RabidGravy: worked like a charm... thx .... RabidGravy++ 21:09
21:09 andrewalker joined
RabidGravy yay! 21:10
21:10 yurivish joined 21:11 ELBeavers left
azawawi "nm -C opencvlibname | grep cpp-function" is my fastest way of doing things atm... maybe i will automate it later 21:11
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
[Tux]: ^ :)
21:17 kaare_ left
dalek kudo/nom: 919a3ed | lizmat++ | src/core/IO/Path.pm:
.starts-with is faster than .substr(0,1)
21:18
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
lizmat for "filrname".IO.lines { ... } 21:23
awwaiid yeah -- .lines is lazy ya?
timotimo yes
lizmat this will read in line by line
awwaiid all sorts of fancy
21:23 telex left
RabidGravy gwooviness 21:23
lokien thanks
lizmat lokien: also, they're auto-chomped 21:24
RabidGravy boo to .assuming losing the typeconstraints on the remaing signature
21:24 telex joined
lizmat rakudobug? 21:25
mspo why doesn't file io have a seek?
lizmat it doesn't ?
mspo doc.perl6.org/language/io ?
RabidGravy it does 21:26
lizmat m: $*IN.seek(300); .say for $*IN.lines
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…»
mspo ah ha: doc.perl6.org/type/IO::Handle
lizmat m: .say for $*IN.lines
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…»
mspo I was on the wrong page
sorry for the fud
lizmat mspo: no pb
RabidGravy I know it's there 'cause I rewrite it a few months ago :) 21:27
mspo should have been looking here doc.perl6.org/type/IO::Handle 21:28
dalek kudo/nom: 3259ba3 | lizmat++ | src/core/Parameter.pm:
Another .substr(0,1) -> .starts-with
21:31
captain-adequate Just curious... Is anyone working on a new Camel Book? 21:33
You know the Orielly book... But for perl6?
RabidGravy dunno 21:34
captain-adequate Sure would be spiffy. 21:35
TimToady has a start on something like that, but it's a long haul 21:36
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 :)
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. :-)
captain-adequate Makes sense... 21:38
21:38 harpactocrates joined
hoelzro m 21:39
oops
21:42 rindolf joined 21:44 keix left 21:49 vendethiel joined 21:50 keix joined 21:51 pecastro joined
saaki butterfly book? 21:55
21:55 hankache left
saaki taken :( 21:56
21:57 raiph joined, skids left 21:58 pecastro left 22:02 rindolf left
azawawi RabidGravy: ping 22:08
found a bug in cpp mangler :) 22:09
22:10 lizmat left
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:11
22:11 adu left
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)"
timotimo or what's going on there?
then why do you define it to take an uint64 rather than an int64?
azawawi im trying everything :) 22:14
22:14 bjz left
timotimo oh 22:14
azawawi i guess the problem is mainly in the std::string const& for Str 22:15
how can i make nativecall do that?
22:17 lokien left
timotimo oh 22:18
well, we claim we support c++, but we don't do std::string
that's ... not so good
azawawi timotimo: it is clearly stated that it is not tested in the docs... im testing it now with opencv :) 22:19
timotimo people who were advertising rakudo sometimes said we have C/C++ interop, though 22:20
without qualifying it sufficiently
azawawi timotimo: if opencv is fully wrapped in perl6, then i guess you could say we then support c++ mangling :)
timotimo hm. perhaps
azawawi doc.perl6.org/language/nativecall#C...2B_Support
azawawi is going to get his "arduino uno kit" tomorrow hopefully :) 22:21
22:22 raiph left
timotimo is arduino uno in the raspberry pi class of embedded machines, or in the arduino class? 22:22
ah, that seems to be the original arduino 22:23
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, grondilu left 22:28 lostinfog left, linuxuser9000 joined
Skarsnik_ RabidGravy, don't know if that help but I noticed that method have 2 extra param comparing to a sub 22:28
22:28 Skarsnik_ is now known as Skarsnik 22:31 virtualsue joined
azawawi d.fuqu.jp/c++filtjs/ # try _ZN2cv6imreadERKSsi 22:35
"RKSs" => std::string const& 22:36
and the last "i" => int
timotimo: i guess we need to support all this mentorembedded.github.io/cxx-abi/ab...l#mangling 22:42
so basically... opencv c++ wrapper API cannot be done in 2015.12 or latest 22:43
22:44 zakharyas joined
azawawi answers.opencv.org/question/17546/o...port-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:45
Skarsnik azawawi, probably something to add in github.com/rakudo/rakudo/blob/nom/...er/GNU.pm6 22:46
azawawi i know... i was hoping someone will do it for me :) 22:48
22:48 jameslen_ left
Skarsnik The issue we will need some nc type to disting like std::string fro char * 22:48
azawawi we also need a new Str type to cover that special case 22:49
RabidGravy m: gist.github.com/jonathanstowe/c00b...09d502b404 22:51
camelia rakudo-moar 3259ba: OUTPUT«running one␤any␤one␤running two␤any␤two␤»
RabidGravy Skarsnik, hacked something together for my exact requirement
mspo nice 22:52
the m to a url, I mean 22:53
22:53 jameslenz joined
RabidGravy yeah, the code isn't particularly nice but it works 22:53
leont Skarsnik: sounds like a use-case for "but" ;-) 22:55
22:55 dha left
Skarsnik This aweful workaround x) github.com/rakudo/rakudo/blob/nom/...l.pm6#L205 22:55
what but does?
22:56 virtualsue left
RabidGravy applies a role to a copy of a value 22:56
22:56 zakharyas left
Skarsnik Oh ok 22:57
22:58 cooper left 22:59 cooper joined, cooper left, cooper joined 23:03 yqt joined 23:07 grondilu joined 23:09 edo joined
edo good evening guys 23:09
good evening form Uk
23:09 inokenty left
edo I have a question for PERL6 community 23:09
I am new PERL5 user 23:10
Skarsnik It's Perl
edo and after 5 months of training
Skarsnik but feel free to ask questions ^^
edo I am finishing to complete
my code 23:11
grondilu jeez man don't press Return that much
edo I would like to build up
a GUI TK
in PERL 6
is it possible?
grondilu github.com/perl6/gtk-simple 23:12
timotimo it's not the same as Tk, but it's still somewhat usable
edo is it stable? 23:13
timotimo gtk-simple isn't finished, but things that are already there are unlikely to change
grondilu I actually don't know. Just looked for "tk" in the modules repo :P
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 SCHAAP137 left
flussence Well volunteered! 23:14
timotimo edo: you can use PyQt via Inline::Python, that works 23:15
dinner time! AFK
Skarsnik Perl6 Qt will probably be made by someone that understand smoke xD
23:15 azawawi left
edo the thing is that i am trying to develop a tool that matches with Patran 23:16
23:16 TEttinger joined
edo and patran interface is written in PERL TK 23:16
23:16 yqt left
edo ok i will take in the consideration the otion in Python QT 23:17
23:18 skids joined
Skarsnik what is Patran? 23:18
edo FEA tool
Finite Element Analysis tool 23:19
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
23:22 vendethiel left
edo so 23:22
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
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
Skarsnik One of my project is write the glibc binding with gptrixie and later gstreamer x) 23:24
edo thank you for your time guys 23:26
and good night
flussence
.oO( I thought it was spelled PYTHON... )
edo from UK
23:26 edo left 23:28 _Vi left, yqt joined
arnsholt leont: I'd wash my hands completely of any attempt to wrap Qt without non-trivial amounts of C++ code, TBH 23:28
23:29 Peter_R left
arnsholt I think I'd actually prefer NativeCall not to support C++ at all, even 23:29
leont As a C++ programmer, I'm skeptical too, even without the moc 23:30
sjn \o
23:31 BenGoldberg joined
dalek kudo-star-daily: ce18af0 | coke++ | log/ (6 files):
today (automated commit)
23:33
23:34 Celelibi left, Actualeyes left
Skarsnik there is smoke that generate stuff to put between c++ and your binding code 23:35
*Qt not c++
23:35 adu joined
leont GIR is the name I was looking for earlier: wiki.gnome.org/action/show/Project...rospection 23:38
23:39 spider-mario left
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:40
23:40 Celelibi joined 23:45 _Vi joined 23:52 firstdayonthejob left 23:56 lnrdo left 23:58 prammer left