Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-20

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 addison_ joined #perl6
00:03 Hotkeys is there a way to do this without having to get the value from the hash twice? http://i.imgur.com/Yufa7tJ.png
00:05 AlexDaniel m: my %h = x => 25; sub foo { return $_ with %h<x>; return 69 }; say foo
00:05 camelia rakudo-moar e401ee: OUTPUT«25␤»
00:05 AlexDaniel m: my %h = x => 25; sub foo { return $_ with %h<y>; return 69 }; say foo
00:05 camelia rakudo-moar e401ee: OUTPUT«69␤»
00:06 Hotkeys oh
00:06 AlexDaniel m: my %h = x => 25; sub foo { .return with %h<x>; return 69 }; say foo
00:06 camelia rakudo-moar e401ee: OUTPUT«25␤»
00:06 Hotkeys so if it doesn't exist it just won't return
00:06 Hotkeys because that part never actually runs
00:06 kurahaupo joined #perl6
00:06 AlexDaniel hmmm it's not 100% right though
00:07 Hotkeys hmm
00:07 AlexDaniel m: my %h = x => Any; sub foo { .return with %h<x>; return 69 }; say foo
00:07 camelia rakudo-moar e401ee: OUTPUT«69␤»
00:07 AlexDaniel Hotkeys: ↑ here it actually exists
00:07 Hotkeys I'm just not sure if doing it my way has any like
00:07 Hotkeys unnecessary overhead
00:07 Hotkeys or if that's the 'proper' way to do it
00:07 synopsebot6 joined #perl6
00:07 AlexDaniel Hotkeys: it has a lot of overhead for my eyes. But besides that not so much
00:08 AlexDaniel I don't think that you should care about hash access time
00:08 rudi_s Hi. Is it possible to get access to C macros with NativeCall without using a compatibility C library?
00:08 AlexDaniel m: my %h = x => Any; sub foo { .return given %h<x>; return 69 }; say foo
00:08 camelia rakudo-moar e401ee: OUTPUT«(Any)␤»
00:08 AlexDaniel Hotkeys: ↑ ok, this one is right
00:09 AlexDaniel nope, it's not
00:09 AlexDaniel damn :)
00:10 timotimo rudi_s: only if you build your own C compiler
00:11 Herby_ joined #perl6
00:11 Herby_ Evening, everyone!
00:11 rudi_s timotimo: Ouch. Well, Perl5 has Inline::C which I could use for this.
00:13 Hotkeys for my pluralizing
00:13 Hotkeys should I have two subs pluralize-noun and pluralize-adj
00:13 Hotkeys or should I take noun/adj as named bools
00:13 Hotkeys and have the sub just be "pluralize"
00:14 AlexDaniel Hotkeys: so it seems like you *have* to use :exists if you really want to store some Any-s
00:14 AlexDaniel Hotkeys: otherwise you can get away with 「with」
00:14 eternaleye joined #perl6
00:15 AlexDaniel m: my %h = x => Any; say %h<x>:exists:kv
00:15 camelia rakudo-moar e401ee: OUTPUT«(x True)␤»
00:15 AlexDaniel Hotkeys: ↑ this looked very promising but it does not do what we want…
00:15 Hotkeys m: my %h = x => Any; say %h<x>:exists:k
00:15 camelia rakudo-moar e401ee: OUTPUT«Unsupported combination of adverbs (exists k) passed to slice on %h␤  in block <unit> at /tmp/N0O8Ow53Do line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/N0O8Ow53Do line 1␤␤»
00:15 Hotkeys oh that's angry
00:16 Hotkeys m: my %h = x => Any; %h<x>:exists.perl
00:16 camelia rakudo-moar e401ee: ( no output )
00:16 Hotkeys m: my %h = x => Any; %h<x>:exists.perl.say
00:16 camelia rakudo-moar e401ee: OUTPUT«Bool::True␤»
00:16 Hotkeys m: my %h = x => Any; %h<x>:exists:v
00:16 camelia rakudo-moar e401ee: OUTPUT«Unsupported combination of adverbs (exists v) passed to slice on %h␤  in block <unit> at /tmp/QJMTGO7z_f line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/QJMTGO7z_f line 1␤␤»
00:17 AlexDaniel Hotkeys: well, what are you expecting to receive? :)
00:17 Hotkeys idk
00:17 kurahaupo joined #perl6
00:23 Hotkeys I've got this dirty little script for turning yaml into latex qtree format that makes writing syntax trees easier (made it for my linguistics class homework) https://gist.github.com/johnspurr/31b253362bef7ca834ba
00:23 Hotkeys would anybody be interested in a proper module for this?
00:23 kurahaupo_ joined #perl6
00:23 AlexDaniel Herby_: it seems like grammar solution is not as good as I've initially thought :/
00:24 AlexDaniel Herby_: it has to take newlines into account. Otherwise it is buggy
00:25 Herby_ the grammar solution Juerd submitted?
00:25 AlexDaniel yeah
00:25 Herby_ ah
00:25 AlexDaniel Herby_: try running it with X------O on one of the lines
00:26 Herby_ k
00:26 AlexDaniel Herby_: the question, however, is how can we fix it? :)
00:27 Herby_ and it looks like today's puzzle is around Bioinformatics: https://www.reddit.com/r/dailyprogrammer/comments/46km7n/20160219_challenge_254_hard_dna_shotgun_sequencing/
00:27 synopsebot6 joined #perl6
00:27 Herby_ AlexDaniel: any ideas on a possible fix?
00:30 autarch1 joined #perl6
00:31 AlexDaniel <cellws>**6 should probably be changed to something like (<cellws>**6) { $0.contains(“\n”) } … but actually I have no idea :)
00:32 AlexDaniel oh geez
00:32 Herby_ how does that new puzzle look to you?  its this week's [HARD] puzzle, no perl solutions yet
00:32 AlexDaniel Herby_: I found another bug…
00:33 AlexDaniel except that this time I have no idea what is happening
00:33 AlexDaniel --O-----
00:33 AlexDaniel -X------
00:33 Hotkeys Herby_: reminds me of a Debruijn sequence
00:33 AlexDaniel Herby_: ↑ it does not find the solution here
00:33 Hotkeys except with specific subsequences
00:35 Herby_ Hotkeys: my math base isn't that strong but I'll take a look at the De Bruijn sequence
00:36 Hotkeys a debruijn sequence is different
00:36 Herby_ oh
00:36 Hotkeys it's a sequence of *all* subsequences with a given alphabet and a given length
00:39 ZoffixWin joined #perl6
00:42 Herby_ ZoffixWin: o/
00:42 ZoffixWin \o
00:45 pyrimidi_ joined #perl6
00:46 pyrimidi_ Hotkeys: https://en.wikipedia.org/wiki/De_Bruijn_graph#Uses
00:46 pyrimidi_ Note the third one :)
00:47 Hotkeys oh
00:47 Hotkeys neat
00:47 synopsebot6 joined #perl6
00:50 timotimo rudi_s: Perl6 has Inline::C which you could also use for this
00:51 timotimo rudi_s: your trust in our ecosystem seems weak :)
00:52 rudi_s timotimo: Nice. Still new, still need to learn more about the good stuff ;-)
00:55 ZoffixWin left #perl6
01:03 Hotkeys timotimo: it's actually just "Inline" I believe for C
01:03 Hotkeys (although it should be "Inline::C" IMO)
01:03 timotimo it should ,e.
01:03 timotimo be*
01:03 Hotkeys oh strange
01:03 Hotkeys the Inline module actually contains Inline::C
01:04 wamba joined #perl6
01:04 timotimo it also contains a role for Inline stuff in general, iirc
01:06 sortiz joined #perl6
01:06 sortiz \o
01:06 Hotkeys yeah it does
01:06 Hotkeys o/ sortiz
01:07 synopsebot6 joined #perl6
01:09 rudi_s The code doesn't look good though. Contains at least an arbitrary file overwrite :-/
01:09 rudi_s Perl6 defineately needs a safe tempfile in core.
01:09 rudi_s Does spurt have an :exclusive?
01:10 rudi_s Ah, :createonly
01:12 rudi_s :-( File::Temp is broken too, no sane defaults (see issues on githubs).
01:15 skids .oO(Am I the only one who just can't get tinfoil to tear off straight at the box blade.  If not, why do they even have the box blade.)
01:17 rudi_s ?
01:27 synopsebot6 joined #perl6
01:30 timotimo skids: yeah, seems like a common problem :(
01:30 timotimo with clingwrap, too >:(
01:31 BenGoldberg joined #perl6
01:44 Actualeyes joined #perl6
01:47 synopsebot6 joined #perl6
01:55 rudi_s How can I convert a string to a number with the given format? e.g x("ff",16) to 255?
01:57 rudi_s Ah, found it. :16("ff")
01:57 rudi_s Is this documented on docs.perl6.org?
01:57 abaugher joined #perl6
02:05 geraud joined #perl6
02:07 synopsebot6 joined #perl6
02:09 ryan__ joined #perl6
02:11 ugexe rudi_s: no
02:12 ugexe m: say UNBASE(16, "FF"); # this is what thats short for
02:12 camelia rakudo-moar e401ee: OUTPUT«255␤»
02:12 awwaiid skids: I think the blade is there to give you small but not overly painful cuts and dissapointment
02:12 ugexe https://github.com/rakudo/rakudo/blob/edac531c6c11934760e81905cc5c5bf12625ea01/src/core/Str.pm#L2070
02:13 rudi_s ugexe: Any idea where it would fit? Then I'd write a patch.
02:13 ugexe rudi_s: i imagine under `Str`... but im not sure what you would put as its header
02:13 rudi_s (Is UNBASE rakudo or perl6 specific?)
02:13 ugexe UNBASE is probably meant to be internal, and :16() doesnt really fit the template
02:13 rudi_s Hm.
02:14 rudi_s Maybe in the introduction without a header?
02:14 skids awwaiid: I knew it had to be something like that.
02:15 ugexe it would help if there was just .unbase i think
02:15 ugexe so if you are looking up .base you could also easily find how to go the other way
02:16 telex joined #perl6
02:17 rudi_s ugexe: Add it to .base so it's at least documented somewhere? I actually looked at .base while searching for this, so it might help.
02:17 ugexe rudi_s: that might be helpful. the source references it as well via `# the opposite of Real.base, used for :16($hex_str)`
02:18 molaf_ joined #perl6
02:19 rudi_s Does this also work with a base in a variable?
02:24 ugexe sure, if its a string
02:27 rudi_s Ah.
02:27 synopsebot6 joined #perl6
02:28 rudi_s ugexe: What is the correct syntax? :"$base"("string") doesn't work.
02:29 ugexe oh that way... probably need to use UNBASE
02:30 rudi_s ugexe: Ok. Should I document that as well (even if it's probably rakudo internal) or just skip it?
02:31 ugexe eh personally i would say yes
02:32 rudi_s k
02:35 rudi_s ugexe: https://github.com/perl6/doc/pull/404
02:39 rudi_s (I'd also take the commit access mori<tab> offered a few days ago.)
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:58 Herby_ is Camelia written in Perl 6?
02:58 timotimo not yet
02:58 timotimo dalek is also a perl5 bot still
02:58 timotimo S99:LTA
02:58 synopsebot6 Link: http://design.perl6.org/S99.html#LTA
02:59 Herby_ :)
02:59 timotimo wow. i just turned off the intelligent filter and synopsebot6 is reconnecting rather often
02:59 timotimo i must look into the systemd unit file tomorrow, and figure out if that's what causes the trouble
02:59 timotimo but now: bedtime
02:59 Herby_ night!
03:01 Herby_ if someone wanted to try their hand at a "Hello, World" version of a perl 6 IRC bot
03:01 Herby_ where would one start...
03:06 synopsebot6 joined #perl6
03:10 dalek roast: 653b200 | LLFourn++ | S11-modules/ (2 files):
03:10 dalek roast: Test for require module under core namepsace
03:10 dalek roast:
03:10 dalek roast: So the following doesn't happen accidentally to IO::Socket::SSL again
03:10 dalek roast: https://github.com/rakudo/rakudo/pull/714
03:10 dalek roast: review: https://github.com/perl6/roast/commit/653b200bf5
03:26 synopsebot6 joined #perl6
03:36 sortiz llfourn ping
03:37 sortiz .seen llfourn
03:37 yoleaux I saw llfourn 19 Feb 2016 10:41Z in #perl6: <llfourn> (I have figured most of it out, by copying stuff that happens in CompUnit::Loader)
03:37 llfourn I'm here :)
03:37 sortiz Hi
03:37 llfourn o/
03:40 sortiz Thought that the test you added imply that after a successful require, Cool::{'Utils'}:exists === True, no?
03:41 llfourn well it's mostly testing the return value from require
03:42 sortiz Yes, but the above is true, and that can be tested also.
03:43 llfourn But I did test it also?
03:43 llfourn nok ::('Cool::Utils') ~~ Failure,'Cool::Utils has been merged';
03:44 ilbelkyr joined #perl6
03:45 sortiz Yes, via a search, but the other test directly in the target Package. It's only a suggestion :)
03:45 rudi_s Can I access a private attribute of a super class?
03:46 llfourn ::('Cool::Utils') does test directly in the package via indirect lookup afaik
03:46 synopsebot6 joined #perl6
03:46 llfourn rudi_s: I think so...
03:48 rudi_s llfourn: Actually describe doesn't describe it correctly. I want to change the default value of a member variable when I'm in the subclass. has $.foo = X in both base and sub-class seems to work, but $!foo doesn't (and still returns the value from the super-class).
03:48 llfourn ahhhhhh
03:48 llfourn from my memory that is a little tricky
03:49 llfourn I'm suprised the non-private version worked
03:49 rudi_s What did you expect instead?
03:49 ugexe m: use nqp; class Foo { has $!bar = 420; }; class Baz is Foo { method xxx { say nqp::getattr(nqp::decont(self), Foo, q|$!bar|); }; }; Baz.new.xxx
03:49 camelia rakudo-moar e401ee: OUTPUT«420␤»
03:49 llfourn rudi_s: last time for me I think it didn't work byt I might be crazy
03:50 rudi_s Is it non-standard behavior or can I count on it to work the same in the future?
03:50 llfourn rudi_s: give BUILDALL or BUILD a shot.
03:51 llfourn rudi_s: it should be standard and tested. I can't attest to the mechanics for redeclaring attributes in a subclass is well tested or not.
03:52 rudi_s llfourn: Thanks. One issue with BUILD is that I have to repeat all the parameters again.
03:53 ugexe m: use nqp; class Foo { has $!bar = 420; }; class Baz is Foo { method xxx { say nqp::getattr(nqp::decont(self), Foo, q|$!bar|); }; method yyy { nqp::bindattr(nqp::decont(self), Foo, q|$!bar|, 666) }; }; my $b = Baz.new; $b.yyy; $b.xxx
03:53 camelia rakudo-moar e401ee: OUTPUT«666␤»
03:53 rudi_s llfourn: I guess there's no hook for post-instatiation I can override?
03:53 rudi_s (To just set a value.)
03:54 * llfourn is working on an example
03:54 ugexe BUILDALL you dont need to set all the values
03:54 ugexe https://github.com/ugexe/zef/blob/master/lib/Zef/Distribution.pm6#L21
03:55 llfourn class S { has $!a = "foo"; }; class C is S { method BUILDALLL(*%args) { if not %args<a>:exists { $!a ="bar" } };
03:55 llfourn rudi_s: something like that
03:55 llfourn wait
03:55 ugexe the tricky party is when to use callsame and what ot return
03:55 llfourn right I goofed that one
03:56 llfourn nvm %args thing
03:56 llfourn just do my $tmp = callsame; $!a = "whatever"; return $tmp; # or something
03:56 noganex joined #perl6
03:59 ugexe i think you have to use nqp to access the private attributes of another class though
03:59 ugexe see the above camelias ^
03:59 llfourn ahh yeah you might be right... you can access role private attributes though
04:00 rudi_s So I'll have to make the attribute public?
04:00 llfourn rudi_s: apologies for sending you on a wild goose chase
04:00 AlexDaniel Herby_: this: https://github.com/zoffixznet/perl6-IRC-Client
04:00 llfourn rudi_s: yes.
04:00 rudi_s Hm. No protected or similar in Perl6?
04:00 skids m: class A { has $!bar = $?CLASS.say }; class B is A { }; B.new # :/
04:00 camelia rakudo-moar e401ee: OUTPUT«(A)␤»
04:01 llfourn rudi_s: there some kind of 'trusts' trait which lets you see them I think, never used em.
04:01 Herby_ AlexDaniel: Thanks, I'll give it a read
04:01 ugexe or create a rw method to access the private attribute
04:01 llfourn skids: $?CLASS is the currently compiling class so that look right?
04:02 rudi_s Ok, thanks. I'll use a public member for now.
04:02 AlexDaniel Herby_: there is also https://github.com/TiMBuS/Net--IRC but I think that the one that was written by Zoffix++ is probably better
04:02 skids llfourn: I guess I'm used to working from roles.
04:03 AlexDaniel Herby_: partly because I used Net::IRC::Bot myself and I found it a little bit limited
04:04 AlexDaniel Herby_: I think that Zoffix considered my feedback and made other mistakes in IRC::Client, so that's what you should probably try :)
04:04 llfourn skids: have you tried self.WHAT?
04:04 skids Was just doing that.
04:04 llfourn \o/
04:05 skids m: class A { has $!bar = self.WHAT.default_bar; submethod default_bar (Any:U:) { 42 }; method b { $!bar.say } }; class B is A { submethod default_bar (Any:U:) { 43 } }; B.new.b; B.new.default_bar.say;
04:05 camelia rakudo-moar e401ee: OUTPUT«43␤Invocant requires a type object of type B, but an object instance was passed.  Did you forget a 'multi'?␤  in submethod default_bar at /tmp/rtSAVzYsJY line 1␤  in block <unit> at /tmp/rtSAVzYsJY line 1␤␤»
04:05 sevvie joined #perl6
04:06 synopsebot6 joined #perl6
04:06 skids Wonder if there's a better way to hide that default_bar.
04:06 skids Anyway that's another way to deal with it.
04:06 rudi_s Hm. WHen I try to use BUILDALL I get Too many positionals passed; expected 1 argument got 3. My BUILDALL is just method BUILDALL { my $x = callsame; $x.foo = 'whatever'; return $x; }
04:07 rudi_s ugexe: What exactly is the (|) in your BUILDALL signature?
04:07 llfourn skids: why didn't it work?
04:07 skids It did work.
04:07 ugexe (|) is any signature
04:07 llfourn oh. the error?
04:08 llfourn rudi_s: |, an anonymous capture, it capture all the args and does nothing with them.
04:08 llfourn if you just have BUILDALL { } you've said that BUILDALL takes no arguments for that class
04:08 ugexe i dont think you need to do $x.foo, just $.foo = 'whatever'
04:08 llfourn correct
04:10 skids llfourn: the error is just showing that you can keep the default_bar from being called from the object.  Would be better if there was an invisible way.
04:10 rudi_s Thanks, that (BUILDALL (|) { $.foo .. }) seems to work. Just one issue, I need to mark has $.foo as rw so I can overwrite it in build. But I'd prefer to keep it read-only for the rest of the program as the subclass just needs to set its value once. Is this possible.
04:11 rudi_s Also the $.foo = .. confuses me. What exactly is the $tmp object I created with callsame doing then if I'm not modifying it?
04:11 ugexe because you are returning it
04:11 llfourn skids: ah I see. I wonder if a private submethod would work. It probably wouldn't.
04:11 ugexe callsame lets it build further up the chain
04:12 ugexe then you set your values which are now initiated
04:12 rudi_s ugexe: Yeah, but what exactly am I modifying when I return $tmp and $.foo doesn't change $tmp.
04:12 llfourn rudi_s: that's a could point you could just return self. callsame; $.foo = ..; self;
04:12 llfourn good*
04:12 AlexDaniel Hotkeys: eh! No more golfing? :)
04:13 llfourn rudi_s: http://docs.perl6.org/type/Metamodel::Trusting#trusts check it out. I've never used b4.
04:13 ugexe $.foo is an attribute of $tmp
04:14 Hotkeys AlexDaniel: I've had some school stuff lately and I'm trying to do some module stuff
04:14 Hotkeys not stopping golfing forever though
04:15 AlexDaniel Hotkeys: module stuff! Great
04:15 rudi_s ugexe: What exactly does $.foo alias to? Is this only special in BUILDALL or everywhere?
04:15 AlexDaniel Hotkeys: that's much better than these golfing tasks :D
04:15 ugexe it aliases to self.foo
04:16 rudi_s And in BUILDALL self and the result of callsame are the same?
04:16 llfourn rudi_s: well....hopefully :P
04:16 ugexe i dont know. seems like it should be but it seems like i wrote that code like that for some reason
04:17 pierrot joined #perl6
04:17 ugexe it was used in some role punning shit though so it might have been that
04:18 llfourn rudi_s: it depends if the superclasses are doing something weird.
04:18 rudi_s It seems just BUILDALL(|) { callsame; $.foo = 'bla'; return self } works too. Is this sane?
04:18 llfourn probably if it doesn't return self, it's not meant to be superclassed anyway.
04:19 llfourn for me it's fine :)
04:19 llfourn subclassed*
04:19 rudi_s Good, thanks. - Just the other issue left. Can I somehow keep the $.foo as read-only but still assign it once in the subclass?
04:20 llfourn rudi_s: well, yeah if you've made it public?
04:20 rudi_s It's public. I just don't want to add the "is rw" to it so nobody can change it in the future lifetime of the objcet.
04:21 llfourn BUILDALL(*%args) { %args{a} //= "default"; callwith(|%args); self } #soemthing like this.
04:21 llfourn so set it at init time
04:21 llfourn but keep the attr ro.
04:21 llfourn ie pretend it came as a user arg to .new
04:22 ugexe wonder if you couuldu do like BUILDALL(|c) { callwith(:$foo, |c);
04:23 llfourn yeah, but maybe, |c, :$foo
04:24 llfourn ugexe's
04:24 sevvie I occasionally lose faith in humanity. coming here has proven a cure for that.
04:24 llfourn rudi_s: ugexe's way seems better
04:24 llfourn sevvie: \o/
04:25 rudi_s Wow, that seems to work fine. Could you explain to me what it does? I don't understand the |c syntax.
04:25 ugexe its like *@_ and *%_ combined
04:26 llfourn m: my \c = \("some","args"); say |c;
04:26 camelia rakudo-moar e401ee: OUTPUT«someargs␤»
04:26 synopsebot6 joined #perl6
04:26 llfourn m: say \("some","args").^name;
04:26 camelia rakudo-moar e401ee: OUTPUT«Capture␤»
04:26 rudi_s Ah, nice. What exactly is the different between callwith and callsame?
04:26 ugexe callsame calls with the same arguments
04:26 llfourn rudi_s: callwith takes arguments
04:27 rudi_s Ah. That sounds logical ;-) Thank you both!
04:27 llfourn no probs. Enjoy :)
04:28 rudi_s Hm. It doesn't work .. maybe I'm using it incorrectly.
04:28 rudi_s method BUILDALL(|c) { callwith(:foo('BAR'), |c); }
04:28 rudi_s *in the subclass and has $.foo = 'Foo'; in the superclass.
04:29 ugexe i wasnt sure if it would work
04:29 llfourn rudi_s: try with the :foo after the |c,
04:29 rudi_s But $.foo isn't changed in the subclass.
04:29 rudi_s No change.
04:30 llfourn hmm but it should work...
04:30 llfourn if you don't include the |c does it work?
04:30 llfourn (at least for that attribute)
04:31 rudi_s Then I get the "missing 3 arguments" again. Is it possible that my new function which I defined for the superclass is causing conflicts?
04:31 rudi_s (My new takes 3 arguments.)
04:32 llfourn rudi_s: keep the |c in BUILDALL just don't put it in callwith
04:32 llfourn is .new taking named arguments?
04:32 rudi_s Yes.
04:33 llfourn it shouldn't really matter.
04:33 rudi_s Actually I have A -> B -> C and new is in A and $.foo is in B and I'd like to overwrite it in C.
04:34 llfourn rudi_s: if you pass foo => "something" to .new does $.foo end up as "something"?
04:34 llfourn remove BUILDALL etc
04:35 rudi_s llfourn: No because new is only in A which doesn't now about $.foo. Do I have to overwrite new in B?
04:35 rudi_s s/now/know/
04:36 ugexe if A is B is C then A should know about $.foo
04:37 llfourn rudi_s: can you make a gist. My brain is a bit hurting from imagining what this looks like.
04:42 diakopter hey, back up to positive territory on modulecounts.com
04:42 llfourn diakopter: what does this mean?
04:43 diakopter well, it was zero or negative for a while
04:43 llfourn oh like number per day?
04:43 llfourn negative??
04:43 diakopter some modules were removed for whatever reason
04:43 llfourn heh
04:44 llfourn were almost beating PEAR!
04:45 llfourn and then lua becomes next target -- now that's a real language.
04:46 synopsebot6 joined #perl6
04:46 sevvie I think Hackage is a good milestone.
04:46 sevvie In fact, I'll start porting now
04:46 diakopter porting..?
04:47 diakopter what to what
04:47 rudi_s llfourn: https://pbot.rmdir.de/dVQ9uy66nNPef9QhIPGLvQ (I removed the new parts because they don't seem to be relevant to the current problem).
04:47 sevvie haskell to p6. monad all the things.
04:47 llfourn npm: 398 per day... ( who needs that many js modules)
04:48 llfourn rudi_s: thanks takjign a look now
04:51 Hotkeys What modules do you even make with 240k already in the ecosystem
04:51 Hotkeys I would be so intimidated
04:51 llfourn there's got to be one for every person that has installed nodejs
04:52 ugexe they sure love their dependency chains
04:53 diakopter llfourn: LOLOL
04:54 diakopter I mean, it's funny if you're joking
04:54 llfourn I think I am
04:54 diakopter lol
04:56 llfourn rudi_s: apparently I didn't know how BUILDALL works
04:57 llfourn rudi_s: you can't do |c, you have to do BUILDALL(@args,%args) { %args<foo> //= "whatever"; callsame; };
04:57 llfourn or rather BUILDALL(@,%args) { }
04:58 llfourn I thought buildall had flat arguments but I was wrong that's why you have that expected three arguments but got one.
05:00 rudi_s llfourn: Awesome, that works fine. Thank you very much!
05:00 rudi_s (Still a little confused how callsame works and why modifyng %args works, but I'm happy that it works.)
05:01 llfourn rudi_s: setting a hash key doesn't change the identity of the hash itself if that makes sense
05:01 llfourn if it was *%args, it wouldn't work.
05:02 rudi_s Ah, so I'm practically modifying the argument hash itself. - But I thought paramaters are read-only by default - or does that only apply to "scalars"?
05:02 llfourn rudi_s: the containers are read only
05:03 llfourn you can still change the state of the values themselves
05:03 rudi_s Ah, that makes sense. Thank you.
05:04 llfourn but strings are immuteable to so yeah your gonna need to make it 'is rw' or usually preferable 'is copy'. if you wanna do something like $arg ~= "foo"; or $arg ~~ s/foo/bar/;
05:06 synopsebot6 joined #perl6
05:26 synopsebot6 joined #perl6
05:38 Cabanossi joined #perl6
05:46 synopsebot6 joined #perl6
05:46 spider-mario joined #perl6
06:06 synopsebot6 joined #perl6
06:07 kurahaupo joined #perl6
06:11 kurahaupo_ joined #perl6
06:18 TEttinger joined #perl6
06:23 chetak joined #perl6
06:23 chetak left #perl6
06:25 mspo joined #perl6
06:26 synopsebot6 joined #perl6
06:30 kurahaupo joined #perl6
06:33 kurahaupo_ joined #perl6
06:44 jack_rabbit joined #perl6
06:46 synopsebot6 joined #perl6
07:04 kaare_ joined #perl6
07:05 davido_ joined #perl6
07:06 synopsebot6 joined #perl6
07:06 kurahaupo joined #perl6
07:19 CIAvash joined #perl6
07:20 jack_rabbit joined #perl6
07:26 synopsebot6 joined #perl6
07:41 kd` joined #perl6
07:45 RabidGravy joined #perl6
07:46 synopsebot6 joined #perl6
07:47 RabidGravy HARR!
07:57 sortiz o/
08:03 Hotkeys You always enter so aggressively RabidGravy
08:03 Hotkeys :p
08:06 synopsebot6 joined #perl6
08:10 FROGGS joined #perl6
08:11 RabidGravy it's a morning thing
08:16 sevvie <3 aggressive entry.
08:17 sortiz :)
08:17 sevvie ... can one call phrasing on themself? >.>
08:22 dalek doc: 24b25db | (Simon Ruderich)++ | doc/Type/Real.pod:
08:22 dalek doc: Real: document how to convert string to number
08:22 dalek doc: review: https://github.com/perl6/doc/commit/24b25dbbcc
08:22 dalek doc: d9293e9 | RabidGravy++ | doc/Type/Real.pod:
08:22 dalek doc: Merge pull request #404 from rudis/master
08:22 dalek doc:
08:22 dalek doc: Real: document how to convert string to number
08:22 dalek doc: review: https://github.com/perl6/doc/commit/d9293e9537
08:23 darutoko joined #perl6
08:26 synopsebot6 joined #perl6
08:26 Hotkeys sevvie: phrasing :)
08:27 sevvie ty ;)
08:28 maybekoo5 joined #perl6
08:31 Hotkeys what terminal emulator does everyone use on the linoox
08:32 Hotkeys I haven't linuxed in a while and put a fresh fedora install on my laptop a couple days ago
08:32 Hotkeys and haven't done anything with it since (I mostly use my laptop at school)
08:32 RabidGravy the default gnome terminal works fine for me
08:33 Hotkeys pff
08:34 sortiz I also use gnome-terminal
08:34 sevvie my linux box is a cheap android tablet at the moment. my term emulator is connectbot.
08:34 sevvie arm7 ftw.
08:35 RabidGravy yeah, I use connectbot on tablets but I find it so hard to type I hardly use it
08:35 sevvie bluetooth keyboard.
08:35 sevvie it's the only way to do it, in my mind.
08:38 sevvie perl6 on arm7 debian chroot works amazingly, btw. <3 <3
08:39 sevvie armhf.
08:43 RabidGravy now if you could just fix the JIT and a small bug related to byte ordering in nativecall we'll be golden :)
08:44 sevvie on it!
08:46 synopsebot6 joined #perl6
08:46 _dolmen_ joined #perl6
08:50 firstdayonthejob joined #perl6
09:00 rindolf joined #perl6
09:06 synopsebot6 joined #perl6
09:26 synopsebot6 joined #perl6
09:35 _mg_ joined #perl6
09:39 donaldh joined #perl6
09:40 adu joined #perl6
09:42 Amendil joined #perl6
09:46 synopsebot6 joined #perl6
09:48 nine Hotkeys: KDE's konsole
09:55 RabidGravy I think we all mean "the default terminal program of whichever GUI environment you prefer"
10:06 synopsebot6 joined #perl6
10:10 RabidGravy right, haven't been further than the supermarket all week, TO THE SEASIDE!
10:10 RabidGravy toodles
10:18 FROGGS o/
10:20 ocbtec joined #perl6
10:26 synopsebot6 joined #perl6
10:29 ggherdov_ joined #perl6
10:29 ggherdov_ joined #perl6
10:30 lizmat good *, #perl6!
10:30 lizmat did we somehow lose the capability of running a single test file with make ?
10:30 lizmat $ make t/spec/S32-Str/split.t
10:30 lizmat make: Nothing to be done for `t/spec/S32-Str/split.t'
10:32 Skarsnik joined #perl6
10:33 nine lizmat: works here?
10:33 lizmat hmmm...
10:33 nine nine@sphinx:~/rakudo (nom *=)> make t/spec/S32-str/split.t
10:35 dalek roast: 10b2d6b | lizmat++ | S32-str/split.t:
10:35 dalek roast: Add test for overlapping needles
10:35 dalek roast: review: https://github.com/perl6/roast/commit/10b2d6b215
10:36 nine Oh my...buying hardware is tedious. It's hard to even find some SSD review that measures heavy write loads.
10:38 TEttinger nine: is this for work?
10:39 donaldh joined #perl6
10:40 nine Sort of. It's for my desktop, but I'd like to replace my SSD by a more enterprisy model as running our software's test suite brings my system to its knees. Test setup involves copying a lot of data.
10:41 nine I mean, having time for laundry as my system becomes totally unresponsive is a nice side effect, but I'd rather do this by choice :)
10:42 dbrunton joined #perl6
10:43 kurahaupo left #perl6
10:44 nine OTOH maybe I should instead invest some time into testing cp --reflink as I am running btrfs and this should improve performance tremendously...
10:46 synopsebot6 joined #perl6
10:56 avar joined #perl6
11:02 _dolmen_ joined #perl6
11:05 wamba joined #perl6
11:06 synopsebot6 joined #perl6
11:17 apiw joined #perl6
11:25 lizmat joined #perl6
11:26 synopsebot6 joined #perl6
11:30 apiw joined #perl6
11:40 donaldh joined #perl6
11:42 firstdayonthejob joined #perl6
11:44 dalek roast: 47dfb03 | lizmat++ | S32-str/split.t:
11:44 dalek roast: Fix test of overlapping needles
11:44 dalek roast: review: https://github.com/perl6/roast/commit/47dfb03ae9
11:44 dalek roast: a41c9f5 | lizmat++ | S03-operators/buf.t:
11:44 dalek roast: Add some Buf.append|push|prepend|unshift tests
11:44 dalek roast: review: https://github.com/perl6/roast/commit/a41c9f5301
11:45 dalek roast: 4a6ba55 | lizmat++ | S03-operators/buf.t:
11:45 dalek roast: Fix test descriptions Buf.prepend|unshift
11:45 dalek roast: review: https://github.com/perl6/roast/commit/4a6ba55504
11:46 synopsebot6 joined #perl6
11:58 dalek roast: f5993d1 | lizmat++ | S02-types/set (2 files):
11:58 dalek roast: Test that Set(Hash).Hash returns an object hash
11:58 dalek roast: review: https://github.com/perl6/roast/commit/f5993d1cf9
12:03 spider-mario joined #perl6
12:04 lizmat hmmm... looks like we have *no* tests for Map whatsoever
12:06 synopsebot6 joined #perl6
12:14 lizmat m: my $m = Map.new("a",42); $m<a> = 666; dd $m   # isn't Map, like List, supposed to be immutable ?
12:14 camelia rakudo-moar e401ee: OUTPUT«Map $m = Map.new((:a(666)))␤»
12:15 Skarsnik m: my Map $m = Map.new("a",42); $m<a> = 666; dd $m
12:15 camelia rakudo-moar e401ee: OUTPUT«Map $m = Map.new((:a(666)))␤»
12:18 _mg_ joined #perl6
12:26 iH2O joined #perl6
12:26 synopsebot6 joined #perl6
12:27 iH2O left #perl6
12:32 lizmat I guess fixing that will have to wait until after the release
12:33 lizmat also: am not sure how this should be fixed
12:33 musiKk joined #perl6
12:33 xiaomiao hrm. I'm trying to figure out how to install modules system-wide. What's the expected naming convention for directories?
12:34 xiaomiao e.g. panda bundles Shell::Command as Shell__Command, and moving that to /usr/share/perl6/site doesn't work directly
12:34 Skarsnik I think the short answer is you 'can't' really
12:35 Skarsnik I mean it work, but precomp will be done per user
12:35 xiaomiao well, there must be a canonical way for modules to be named so that they can be used
12:35 xiaomiao *that* is the part that interests me
12:35 Skarsnik source file are mangled by sha sum
12:35 Skarsnik for the name
12:37 xiaomiao o_O
12:37 Gothmog joined #perl6
12:39 xiaomiao Skarsnik: so you expect /usr/share/perl6/site/${SHA1} as 'package name' ? that sounds very silly to me
12:46 synopsebot6 joined #perl6
12:53 kid51 joined #perl6
13:03 colomon_ joined #perl6
13:06 synopsebot6 joined #perl6
13:06 Skarsnik xiaomiao, well, it's like that currently, panda copy the source file to a name like this
13:07 xiaomiao and there seems to be random json involved
13:07 xiaomiao I think I need more alcohol to understand ;)
13:08 DrPete left #perl6
13:13 Skarsnik hm, compunit on doc, lead to the module page with nothing about them
13:15 xiaomiao I'm trying to figure out if 'alacryd' makes sense
13:16 xiaomiao but it requires File::Find to be installed
13:16 xiaomiao somehow there's a non-obvious middleware layer involved :(
13:19 _mg_ joined #perl6
13:26 synopsebot6 joined #perl6
13:27 autarch1 joined #perl6
13:35 zpmorgan joined #perl6
13:40 Skarsnik alacryd?
13:42 xinming joined #perl6
13:44 rudi_s Why is Perl6 using Str to represent paths? Str is a decoded representation of a byte array, however Paths might contain either not decodable bytes or multiple encodings with the same decoded representation (e.g. a" vs. ä). I'm not sure how to handle that correctly with the current representation in Perl6.
13:46 synopsebot6 joined #perl6
13:48 xiaomiao eek. rakudo-star is madly in love with not being human-readable, I can't even reverse-engineer how it creates randomized filenames without going insane
13:48 xiaomiao not sure how this is reasonable yet ...
13:51 Psyche^_ joined #perl6
13:52 rburkholder joined #perl6
13:56 _dolmen_ joined #perl6
13:59 donaldh joined #perl6
14:01 flussence nine: you might want to try a BFQ-patched kernel first. It can actually be a silver bullet for IO pain in a lot of cases.
14:06 synopsebot6 joined #perl6
14:06 xiaomiao I'd start by not using btrfs ;)
14:07 xiaomiao so, ahem ... why on earth are modules by default referenced by what looks like a sha1sum read from a JSON file in non-obvious locations?
14:07 xiaomiao I must be missing some fundamental design ideas that didn't involve a bottle of absinthe
14:26 synopsebot6 joined #perl6
14:28 dalek doc: 60ea17c | moritz++ | doc/Type/Real.pod:
14:28 dalek doc: Improve example in type conversion
14:28 dalek doc:
14:28 dalek doc: also undocument UNBASE, since it is internal. We should
14:28 dalek doc: rather think about a better API for that.
14:28 dalek doc: review: https://github.com/perl6/doc/commit/60ea17cb86
14:28 vendethiel joined #perl6
14:30 moritz xiaomiao: for one thing, it must deal with Unicode characters in the module name that the file system can't represent
14:30 xiaomiao moritz: that is an interesting idea, but makes *importing* units/modules quite special
14:30 xiaomiao how do I even write the module name? ;)
14:31 moritz xiaomiao: and then it must deal with multiple authorities and version of the same module name
14:31 moritz well, depends on your input method :-)
14:32 musca joined #perl6
14:34 xiaomiao well, uhm, maybe restricting the valid names makes sense, sometimes
14:34 moritz sometimes, yes
14:34 moritz not always
14:34 xiaomiao the current setup is not quite human-readable
14:35 moritz you're not supposed to manually read the module database
14:37 rudi_s Is there a quoting method where I can write \\0 and I get just the three chars \ \ 0 ? Preferable in a way I can use it in <a b \\0c\\0>?
14:38 rudi_s (At the moment I have to write <a b \\\\0\\\\0> which is really ugly.)
14:41 rudi_s Ah, Q'...' works fine for that.
14:44 Ven joined #perl6
14:46 synopsebot6 joined #perl6
14:50 ocbtec joined #perl6
14:58 colomon joined #perl6
15:01 sjoshi joined #perl6
15:06 synopsebot6 joined #perl6
15:13 ugexe <> is single quoting
15:13 ugexe m: my $x; say <$x \\0 a>
15:13 camelia rakudo-moar e401ee: OUTPUT«($x \0 a)␤»
15:13 ugexe m: my $x; say <$x \\0 a>.perl
15:13 camelia rakudo-moar e401ee: OUTPUT«("\$x", "\\0", "a")␤»
15:14 rudi_s ugexe: single quoting as in '..'? Yeah. I'd need Q'..', but using $x = Q'...' and then <<a b c $x>> works fine in my case ($x has no spaces).
15:14 rudi_s What I'd also like is <..> which doesn't interpolate on whitespace.
15:18 ugexe interpolate on white space? so like if $x *did* have a space it would be treated as a single item?
15:19 _mg_ joined #perl6
15:20 rudi_s Yes.
15:22 Juerd rudi_s: <<a b c "$x">>
15:22 Juerd m: my $x = "1 2 3"; say <<a b c "$x" d>>
15:22 camelia rakudo-moar e401ee: OUTPUT«(a b c 1 2 3 d)␤»
15:23 Juerd m: my $x = "1 2 3"; say <<a b c "$x" d>>.perl
15:23 camelia rakudo-moar e401ee: OUTPUT«("a", "b", "c", "1 2 3", "d")␤»
15:23 rudi_s Juerd: Ah, nice. Thank you.
15:24 Juerd m: my $x = "1 2 3"; say <<a b c $x d>>.perl
15:24 camelia rakudo-moar e401ee: OUTPUT«("a", "b", "c", IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), "d")␤»
15:24 Juerd Heh, IntStr.
15:26 synopsebot6 joined #perl6
15:27 ugexe m: my $x = "a b c"; say flat <a b c>, $x; # a less ideal alternative
15:28 camelia rakudo-moar e401ee: OUTPUT«(a b c a b c)␤»
15:28 iH2O joined #perl6
15:28 ugexe m: my $x = "a b c"; say flat <a b c>, $x.perl; # a less ideal alternative
15:28 camelia rakudo-moar e401ee: OUTPUT«(a b c "a b c")␤»
15:32 vendethiel joined #perl6
15:43 iH2O left #perl6
15:45 pierrot joined #perl6
15:45 pierrot joined #perl6
15:46 synopsebot6 joined #perl6
15:47 Skarsnik xiaomiao, you probably want to try to find compUnit doc stuff
15:47 Skarsnik or the gist that nine implemented
15:47 khw joined #perl6
15:49 Ven joined #perl6
15:49 dalek nqp: 1eb9b97 | jnthn++ | tools/build/MOAR_REVISION:
15:49 dalek nqp: Bump MOAR_REVISION to 2016.02 release.
15:49 dalek nqp: review: https://github.com/perl6/nqp/commit/1eb9b971a5
15:49 wbill joined #perl6
15:51 [TuxCM] test            22.571
15:51 [TuxCM] test-t          12.298
15:51 [TuxCM] csv-parser      50.767
15:56 maybekoo5 joined #perl6
15:59 colomon joined #perl6
16:00 [Tux] joined #perl6
16:01 ugexe whats the difference between categorize and classify? (I know what classify does, but I can't tell from the roast what categorize does different)
16:02 ugexe ah its documented better under perl6/specs
16:06 synopsebot6 joined #perl6
16:07 RabidGravy joined #perl6
16:15 [Tux] joined #perl6
16:15 RabidGravy BOOM
16:19 crime joined #perl6
16:26 synopsebot6 joined #perl6
16:38 timotimo moritz: i haven't a clue what this could mean: Feb 20 16:37:44 hack systemd[1]: [/etc/systemd/system/cron.service:11] Failed to load slice unit cron. Ignoring.
16:40 RabidGravy serviced being fun
16:41 skids joined #perl6
16:41 RabidGravy "systemctl status cron" may help
16:46 synopsebot6 joined #perl6
16:46 timotimo .tell Herby_ seems like nobody pointed this out to you, but there's already an irc bot framework in the ecosystem :) it's what synopsebot is written with
16:46 yoleaux timotimo: I'll pass your message to Herby_.
16:47 Skarsnik synopsebot6 restart a lot dang
16:47 Skarsnik There is two actually x)
16:51 moritz timotimo: I have no idea either
17:09 adu joined #perl6
17:10 Woodi https://www.freedesktop.org/software/systemd/man/systemd.slice.html
17:11 Woodi ...but this is not a direct explanation, I know :)
17:23 autarch1 joined #perl6
17:23 Juerd Meh, ~~ in regexes is NYI :(
17:29 rburkholder joined #perl6
17:30 Juerd Oh well, instead of [foo] ~~ bar, I guess I can do (foo) <?{ $0 ~~ /bar/ }>
17:30 Juerd A bit uglier but it works
17:30 Ven joined #perl6
17:43 firstdayonthejob joined #perl6
17:46 sjoshi joined #perl6
17:47 Actualeyes left #perl6
18:09 vendethiel joined #perl6
18:22 rindolf joined #perl6
18:36 MadcapJake anyone used HTTP::Server::Async? I'm getting «Unhandled exception: cannot close a closed socket»
18:37 cdg joined #perl6
18:38 firstdayonthejob joined #perl6
18:39 TreyHarris MadcapJake: oh, good lord, I thouht I was on another channel and just got excited that people were actually using Perl 6 :)
18:39 MadcapJake haha, well people are, but mostly in this channel ;)
18:40 hacst joined #perl6
18:40 TreyHarris there aren't people here. just us camels.
18:40 MadcapJake i've never used perl 5 so i'm more butterfly than camel :P
18:41 TreyHarris MadcapJake: interesting, what language(s) did you come from?
18:42 MadcapJake mostly JavaScript and Python
18:44 mst if you've not already done Moo/Moose in perl5 then I bet perl6's OO is an amazing improvement over everything else you've tried
18:46 _mg_ joined #perl6
18:48 MadcapJake yeah it's great compared to JS prototypes especially, feels a lot like Ruby's object model except a little less magical (in a good way)
18:52 MadcapJake the 'cannot close' bug seems to happen if i send a bunch of requests in a row for the same file
18:54 mst Moo/Moose/perl6 OO feels a lot like Ruby's object model except without the training wheels and with the bike
18:55 mst (I have to write my own constructor when I already declared the attributes? really?)
18:57 MadcapJake i recently translated some ruby code to P6 and I got tripped up around Ruby's `module` construct, especially that you can place them inside other modules and you can instantiate them.
18:57 MadcapJake I also had a tought time translating Ruby's ability to replace methods after instantiation
18:58 mst modules are best converted to roles, I think; I've never tried to instantiate one because what
18:58 * mst thinks that 'replace methods after instantiation' would basically be handled by 'create an anonymous role with those methods and apply it to the object' ?
18:58 MadcapJake yeah turns out modules can act just like classes in ruby
18:59 mst (that would certainly work in M* OO, though it's fairly strongly discouraged)
18:59 mst (we prefer 'make an anonymous class with the role already composed, then instantiate that')
18:59 MadcapJake yeah that sort of covers it, except in ruby you can instantiate a class, and then change that super
18:59 MadcapJake 's methods and the instatiated class will automatically get those new methods
18:59 mst oh, you mean modify the *class* after the object's been instantiated
19:00 MadcapJake right
19:00 mst rather than modifying it just for the object?
19:00 MadcapJake yep, it's possible in ruby, only really came up in testing so it's not a huge deal
19:00 mst you can absolutely do that in M* OO, and I absolutely would not let it pass code review if you did ;)
19:02 MadcapJake but that was one area that was tough to translate, in ruby, classes are just another object type that you can edit, in perl 6, it seems they are little more guarded from being treated as just another object
19:03 timotimo not quite. you just have to go through the HOW
19:04 MadcapJake that's what i mean by guarded :P
19:05 MadcapJake in ruby there's no extra step to change something, in p6 you have to use ^ or HOW (iiuc)
19:05 mst yeah, perl6 prefers you to actively point the gun at your foot
19:07 MadcapJake in the ruby code i translated it also had the constructor build a subclass instead of the class itself, this was also difficult to translate, currently i have `new` as `!!!` so subclasses *must* create a new method, i wish there was a better way
19:08 MadcapJake i.e., https://github.com/MadcapJake/Test-Lab/blob/master/lib/Test/Lab/Experiment.pm6#L125-L129
19:08 timotimo you can require a method to be implemented with a role, but i think that doesn't apply here
19:09 timotimo well, you can have a submethod "new"
19:09 mst er. so, there's two ways I tend to solve this under M*
19:09 timotimo that won't be derived to subclasses
19:09 ugexe yea, i use submethod new to do that
19:09 mst (1) screw this, I'll have a new_foo method instead (usually simplest but I think in this case might not work)
19:09 MadcapJake what i wish it would do is, if called from the base class, instantiate the default derived, if called from some other custom class, just do the normal thing
19:09 mst (2) have a basically empty class with a custom new method that returns something else
19:09 timotimo you can just inspect the exact type of self
19:10 MadcapJake timotimo, i'm currently checking self.WHICH.Str
19:10 timotimo that sounds terrible :)
19:10 MadcapJake lol
19:10 MadcapJake that way it's only the class and not some derived object
19:10 timotimo why not just self.WHAT eqv something
19:11 MadcapJake because i wanted to make sure it was only the class itself
19:11 timotimo yeah, but eqv does that, too
19:11 timotimo m: say Cool eqv Str
19:11 camelia rakudo-moar e401ee: OUTPUT«False␤»
19:11 timotimo m: say Cool ~~ Str
19:11 camelia rakudo-moar e401ee: OUTPUT«False␤»
19:11 timotimo er, wrong way around, of course
19:11 timotimo m: say Str ~~ Cool
19:11 camelia rakudo-moar e401ee: OUTPUT«True␤»
19:11 timotimo m: say Str eqv Cool
19:11 camelia rakudo-moar e401ee: OUTPUT«False␤»
19:11 timotimo there we go.
19:12 timotimo also, you can override method WHICH to return something evil :P
19:12 MadcapJake so you're saying i should avoid WHICH for fear of evildoers? :P
19:13 MadcapJake I didn't know that eqv would differentiate between class and derived objects
19:13 timotimo really, i think you should avoid WHICH because string comparison is more expensive than comparing pointers
19:13 alpha123 joined #perl6
19:13 alpha123 j #idris
19:14 timotimo and spesh knows better about nqp::what than it does about method WHICH. or at least i assume that
19:14 MadcapJake timotimo, cool, good to know
19:14 timotimo if it inlines the WHICH method based on "known target", it'll actually completely constant-fold the if away
19:14 timotimo but it's still simpler to use WHAT
19:15 MadcapJake how is WHAT simpler than eqv?
19:15 timotimo you use WHAT with eqv, not instead of :)
19:15 MadcapJake oh :P
19:15 cdg joined #perl6
19:17 ryan__ joined #perl6
19:22 nowan joined #perl6
19:26 ugexe just make it a role with submethod new to pun itself into a class and apply a copy of itself as a role to the parent class
19:26 timotimo aaw, no GSoC from TPF this year :(
19:33 pmurias joined #perl6
19:33 ocbtec joined #perl6
19:33 mst timotimo: I think we got messed about enough people got bored of trying
19:33 pmurias MadcapJake: re Test::Lab/scientist .new method isn't that intended to be monkey patched?
19:34 ocbtec joined #perl6
19:34 MadcapJake pmurias, what do you mean?
19:34 timotimo mst: hm?
19:35 MadcapJake timotimo, i got a replu from Karen Pauley, she said that they were rejected last year so not much interest in doing it again this year
19:36 ugexe tons of projects were rejected last year
19:36 mst the selection process was changed and the new one was ... inscrutable
19:36 timotimo oh
19:36 rindolf joined #perl6
19:36 timotimo i didn't know about that
19:36 mst the real problem is that it's impossible for us to know why we were rejected
19:36 timotimo ugh, that really sucks
19:36 pmurias MadcapJake: in ruby the interface is to just monkey patch Scientist::Experiment
19:37 mst it's hard for people to be motivated to try again this year when so far as we can tell you have to put in the same level of effort as previously except then the decision is made by RNG
19:37 MadcapJake mst, really it's random?
19:38 mst it's *inscrutable*
19:38 timotimo it might as well be
19:39 pmurias MadcapJake: the way Test::Lab does it seems a bit weird, wouldn't it be better to just set $experiment-class and keep the standard new
19:39 mst right. it's basically indistinguishable from an RNG from outside, due to the complete opacity of the process, is my point
19:39 mst I mean, I presume they do something other than roll percentile dice
19:39 MadcapJake pmurias, the intended effect is that if you just leave experiment-class alone, it will instantiate a Default subclass
19:39 mst but since they won't tell us what ...
19:40 MadcapJake but if you are making your own custom class it will give an error if that class doesn't have a `new` method
19:40 xiaomiao hrm. Lots of 404 on design.perl6.org - e.g. http://design.perl6.org/S19.html links to nonexistant http://design.perl6.org/CompUnitRepo%3A%3ALocal%3A%3AFile.html
19:40 xiaomiao who to inform of this malfunction?
19:40 moritz xiaomiao: open an issue on the perl6/specs repo
19:41 xiaomiao moritz: where's that?
19:41 timotimo xiaomiao: where do you find links there?
19:41 timotimo oh
19:41 timotimo i didn't read that right, sorry
19:41 pmurias MadcapJake: wouldn't just setting experiment-class to Test::Lab::Default and having the subclass use the default Perl6 new be better?
19:41 moritz timotimo: on github
19:41 moritz sorry, meant xiaomiao
19:42 xiaomiao moritz: :(
19:42 MadcapJake pmurias, but if i use the default new then it won't utilize experiment-class
19:42 xiaomiao I only interact with it while paid, gotta have some sanity in life
19:42 moritz too bad
19:42 xiaomiao yar.
19:43 Hotkeys MOIN MOIN
19:43 xiaomiao oh well, at least you now know of the broken links
19:44 pmurias MadcapJake: why do we want to do that?
19:45 lichtkind joined #perl6
19:45 MadcapJake pmurias, i'm not following xD if i leave the default new then no Test::Lab::Default class will ever be instantiated except by direct access
19:48 pmurias MadcapJake: should I make a pull request which demonstrates how I think it makes sense to change the API (to make it less rubyish)
19:50 MadcapJake pmurias, sure!
19:50 pmurias (github search)--
19:52 pmurias it would be great to have metacpan6 instead of github being the face of our module ecosystem
19:52 MadcapJake yeah definitely, i don't understand why github search gives you commits instead of master in the results either
19:53 MadcapJake pmurias, i updated the new method based on timotimo's advice: https://github.com/MadcapJake/Test-Lab/blob/master/lib/Test/Lab/Experiment.pm6#L125-L129
19:53 MadcapJake also, the experiment-class variable is only available to the Test::Lab module, not to the Test::Lab::Experiment class
19:57 pmurias if I type panda-test are the modules precompiled?
19:58 ugexe if they aren't already precompiled in lib/.precomp
19:58 ugexe rakudo will do it then
19:59 Khisanth joined #perl6
20:03 pmurias if I run 'perl6 t/x.t' with x.t being http://paste.debian.net/401757
20:03 pmurias where are the precompiled files supposed to be?
20:04 ugexe ah in that case i dont think so. let me clarify: they go to wherever the first -I points to
20:04 ugexe usually thats -Ilib, so lib/.precomp, but it doesnt have to be
20:06 ugexe directly using `use lib 'lib'` im not sure
20:07 mst joined #perl6
20:09 pmurias is having that ugly "5AEF.." filename in sub run-and-gather-output at /home/pawel/new_order/rakudobrew/moar-nom/install/share/perl6/site/sources/5AEF9DA5AE15E5AB5CB2ADB58A455E007FA7839E expected?
20:09 ugexe yes, its a sha1 so it will work on file systems that may not allow the original characters
20:11 pmurias it makes for utterly horribly ugly stacktraces
20:12 ugexe true. but there is no better solution yet
20:12 MadcapJake pmurias, https://rt.perl.org/Ticket/Display.html?id=126908
20:13 MadcapJake ugexe, yes there is, just show the relative path and name
20:13 ugexe how do you show the relative path for module Text::<poop emoji>
20:14 MadcapJake module-name/[submodule/]module-file.pm6
20:14 Hotkeys Just do it yo
20:14 Hotkeys People should get with the unicode times
20:14 MadcapJake e.g., Text::????/Poop.pom6
20:14 ugexe again, module-name can contain characters the file system does not allow
20:15 MadcapJake but all terminals support printing unicode
20:15 ugexe so you cannot just map a module name directly to the file system
20:15 MadcapJake i'm not saying *store* them as such, i'm saying print them normally
20:15 ugexe to what? a non existent "normal" name path?
20:15 MadcapJake have the stacktrace map to what the file and module path is, not the actual on-system path
20:15 Hotkeys m: "????".uniname.say
20:15 camelia rakudo-moar e401ee: OUTPUT«PILE OF POO␤»
20:16 timotimo we ought to make the original filename visible, yeah
20:16 Hotkeys Just have Text::PILE-OF-POO
20:16 Hotkeys As the storage location
20:16 ugexe uh, what if someone has an actual Text::PILE-OF-POO
20:16 Hotkeys What if someone has any existing module?
20:16 MadcapJake all terminals can print unicode, there is no issue printing it out that way
20:16 MadcapJake as unicode
20:16 ugexe existing modules are fine because of authority/version
20:17 ugexe but you still have have to map stuff
20:17 MadcapJake e.g., in method render at Template::????/Poop.pm line 140
20:18 pmurias we could just print the module name without the horrible path
20:18 MadcapJake the stacktrace should just print the files and paths given in each module's META6.json
20:19 ugexe that doesnt help you locate where the module actually is, only the source of the problem. so just the module name suffices in that scenario
20:20 timotimo the thing is, the stack trace gives you the actual source file on the filesystem
20:20 hippie joined #perl6
20:20 pmurias which might be pretty useful if you want to open the file with an editor
20:20 timotimo if you just use the name of the module and a relative path to its source files, you can't just copy-paste the name and open that in your editor
20:20 pmurias can't we use symlinks on the unixy systems?
20:20 ugexe i mean show the sha1 path, but also the module name somewhere
20:21 timotimo and if you have to add a flag to perl6 or set an env var, you have to be able to reproduce a problem/stacktrace to get the actual files
20:21 timotimo otherwise, a tool could be built to give the actual file path
20:22 MadcapJake ugexe, why do you need to locate the module? we already know that's impossibly difficult, i'd rather know the file and look on github
20:22 ugexe if it shows me a file path that is causing a problem, i want to open that file path on my own system and possibly edit that file (because thats the file that will be rerun)
20:23 MadcapJake ugexe, i would like that too but i thought that precomp made that not possible? is my assumption wrong?
20:23 ugexe precomp makes $?FILE difficult
20:23 timotimo are those source file names stable across systems?
20:24 dalek rakudo/nom: 8fdaada | lizmat++ | / (2 files):
20:24 dalek rakudo/nom: Fix iterable.first(:end) on uncached iterators
20:24 dalek rakudo/nom:
20:24 dalek rakudo/nom: .elems determines number of elements on an iterator without caching.
20:24 dalek rakudo/nom: Prefix + caches the iterator.  The use of .elems caused:
20:24 dalek rakudo/nom:
20:24 dalek rakudo/nom:   say "㊤".uniname.words.first(:end)
20:24 dalek rakudo/nom:
20:24 dalek rakudo/nom: to fail.  ZoffixW++ for spotting
20:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8fdaada43f
20:24 ugexe they should be yes
20:24 timotimo i'm not sure what stuff goes into the hashsum's source
20:24 MadcapJake this is the one area I really miss Node's packaging model, I like having downloaded modules right in my project's dir that i can tweak on a per-project basis
20:24 ugexe originally it used the full path but now it uses the relative path (in the sha1)
20:24 timotimo for example, does the meta info file go in?
20:25 lizmat .tell [Coke] I fixed one more bug in .first(:end).  Hope it's still good to include in release. If not, revert/exclude 8fdaada
20:25 yoleaux lizmat: I'll pass your message to [Coke].
20:25 ugexe no, Distribution.id() goes in site/dists, site/short is sha1(module-short-name), and site/sources is something like sha1($dist.rel-path, $dist.id)
20:26 ugexe Distribution.id is sha1(Module::Name:ver<>:auth<>:api<>)
20:29 ugexe sha1 is not applied to the contents of any file. only to attributes of a Distribution
20:32 ugexe CURI was similar to this before the CU refactor, except it used an incrementing number instead of a sha1 for the file names (which would not be stable between systems)
20:40 jameslenz joined #perl6
20:49 Roamer` joined #perl6
20:51 BenGoldberg joined #perl6
20:52 dalek roast: e1449d6 | lizmat++ | S32-temporal/Date.t:
20:52 dalek roast: Add some Date subclassing tests
20:52 dalek roast: review: https://github.com/perl6/roast/commit/e1449d6f3e
20:53 nine ugexe: the real issue of using incrementing numbers was that it necessitates factoring in the current state of the repo when assigning a new id. Something which you have to avoid when creating distro packages for modules.
20:53 nine Predictability is a nice side effect
20:57 dalek roast: edaa353 | lizmat++ | S32-temporal/DateTime.t:
20:57 dalek roast: Add some DateTime subclassing tests
20:57 dalek roast: review: https://github.com/perl6/roast/commit/edaa353f95
20:57 yqt joined #perl6
21:04 pmurias MadcapJake: see https://github.com/pmurias/Test-Lab for how I would change the API
21:05 pmurias isn't $Test::Lab::experiment-class more natural then Test::Lab::<$experiment-class>?
21:06 MadcapJake they're the same, i just haven't yet implemented packaged variables in perl6fe syntax highlighter :P
21:10 Ben_Goldberg joined #perl6
21:12 pmurias MadcapJake: have use seen my API change?
21:12 Ben_Goldberg joined #perl6
21:12 MadcapJake pmurias, you're right, my initial attempt at this kind of has it's feet in perl6 and ruby waters at the same time, the whole point of the ruby style was that you could just overwrite the main Experiment class `new` method anytime
21:13 pmurias it's possible to that in Perl6 but it's considered really ugly
21:13 pmurias * to do
21:13 MadcapJake ok, part of me doesn't like having to reference `Default` all over the place, but the only point of that class is for the lab helper so it makes sense to just do it as such
21:14 pmurias we could get rid of the ::Default and just use Test::Experiment as the default ;)
21:14 MadcapJake pmurias, yeah i was thinking the same thing, there's really not much to the class in the end
21:14 MadcapJake it seems an unneeded abstraction
21:15 pmurias I would also change the positional taking constructor to the default Perl 6 one
21:15 MadcapJake yeah i've been reading more and more perl6 code and was thinking that I wanted to change to a proper adverbial form
21:16 pmurias last commit in my fork does the change
21:17 MadcapJake sweet! thanks pmurias ! wanna submit a PR?
21:17 pmurias clicked that button
21:18 MadcapJake also, is it possible to get rid of the comma after the experiment name for the lab helper?
21:19 MadcapJake also would be cool to make the topical variable set to the experiment so you wouldn't even need the $e
21:20 pmurias not sure if we can get rid of the comma
21:20 MadcapJake like as in a for loop
21:20 pmurias we could create a slang but it seems serious overkill
21:21 MadcapJake ok, how would i set the topic variable?
21:21 cdg_ joined #perl6
21:23 MadcapJake (would be sweet to write «lab 'name' { .use: { ... }; .try: { ... }; }» but is the only way to do that via a slang? I thought there was some kind of statement:<lab> kind of thing)
21:25 pmurias maybe we could get rid of the DSL?
21:25 jnthn It'd be a slang to get rid of the comma, yeah...
21:25 musiKk joined #perl6
21:25 * pmurias playing around with a DSL-free lab
21:25 jnthn m: sub foo($a, &b) { b($a) }; foo 42, { .say };
21:25 camelia rakudo-moar 8fdaad: OUTPUT«42␤»
21:25 jnthn Setting $_ is just passing an arg to the block :)
21:27 moritz pmurias: is it also gluten free? :-)
21:28 MadcapJake jnthn, sweet! i'm already doing that lol
21:29 MadcapJake ok, i really gotta go. real world social engagement ... lame! ;)
21:30 Ben_Goldberg joined #perl6
21:30 pmurias MadcapJake: lab name=>"foo", try => {...}, try => {...}, use => {...};
21:31 pmurias MadcapJake: we could replace the DSL with something like that
21:32 Ben_Goldberg joined #perl6
21:32 MadcapJake that would work great, but each try needs a name (if there is more than one), so how would you do that?
21:33 MadcapJake i really gotta go though! .tell me or on github or whatevs!
21:33 pmurias MadcapJake: ok, I'll sent a PR if I figure something cool out
21:34 Hotkeys I think I may have convinced someone to try perl 6
21:34 Hotkeys go me
21:34 Hotkeys are there any good intros to the language yet?
21:34 moritz Hotkeys: http://perl6intro.com/
21:35 DrForr Well, I know what I'm writing next )
21:35 lizmat Hotkeys: http://de.perl6intro.com if you prefer Deutsch
21:35 Hotkeys Nice
21:36 Hotkeys I prefer english but I like that the option is there :p
21:39 Gothmog joined #perl6
21:42 pmurias moritz: not sure ;), the &lab interfance will be maximally tasty
21:44 moritz :-)
21:45 pmurias .tell MadcapJake lab name => "common case", try => {...}; lab name => "complex case", try => {variant1 => {...}, variant2 => {...}}
21:45 yoleaux pmurias: I'll pass your message to MadcapJake.
21:46 arnsholt Thesis milestone reached: Manuscript clocks in at 100 pages \o/
21:47 arnsholt That's including references and front matter and crap, so the actual text is only some 80-odd pages, but still =D
21:47 zpmorgan joined #perl6
21:47 pmurias arnsholt: a phd thesis?
21:48 lizmat arnsholt++
21:48 Hotkeys <Jarcode> Hotkeys, yeah this is really interesting
21:48 Hotkeys <Jarcode> how's perl6 performance?
21:48 arnsholt Yeah. I'm hoping I'll be able to push the main text to something like 120 pages
21:48 Hotkeys I don't really know how to answer
21:48 Hotkeys what
21:49 Hotkeys what's the performance like relative to other languages
21:49 arnsholt With a little help from my friends^Wsupervisors, I'm hoping that's within reach, as much less is going to feel a bit scrawny as far as PhD theses go =)
21:49 Jarcode joined #perl6
21:49 pmurias Hotkeys: not where we want it but improving
21:50 _dolmen_ joined #perl6
21:53 Skarsnik joined #perl6
21:54 AlexDaniel joined #perl6
21:55 vendethiel joined #perl6
21:57 * lizmat started working on implementing p5's pack/unpack in module space
22:01 dalek rakudo-star-daily: 7cf4298 | coke++ | log/ (9 files):
22:01 dalek rakudo-star-daily: today (automated commit)
22:01 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/7cf429888b
22:02 Juerd lizmat: That's great, because I have no idea how to approach implementing my design :)
22:03 Juerd lizmat: Worst case: I'll just translate things classic unpack/pack templates ;)
22:03 lizmat perhaps, we'll see
22:04 lizmat for one, I'm going to extract the template parsing code, so repeated calls wouldn't have to do that every time
22:04 lizmat feels a bit funny not being able to use nqp magic though  :-)
22:06 BenGoldberg joined #perl6
22:07 AlexDaniel Juerd: oh you fixed it! Great!
22:09 arnsholt pmurias: And if you're contemplating a PhD, research is great fun, but writing the thesis is a sloooooog =)
22:11 AlexDaniel Juerd: meh, it is still kinda broken
22:11 Juerd AlexDaniel: Aw, damn
22:11 Juerd These daily challenges don't come with good test suites
22:11 AlexDaniel yup :(
22:11 AlexDaniel Juerd: try this
22:11 AlexDaniel --O-----
22:11 AlexDaniel -X------
22:11 ely-se joined #perl6
22:11 AlexDaniel Juerd: it wont find a solution
22:12 AlexDaniel O's turn
22:12 dalek rakudo/repo_v1: 9c0f96f | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
22:12 dalek rakudo/repo_v1: Turn short-name lookup files into directories
22:12 dalek rakudo/repo_v1:
22:12 dalek rakudo/repo_v1: This may become part of CompUnit::Repository::Installation format v1.
22:12 dalek rakudo/repo_v1: Having to change any already existing files on installation of a module makes
22:12 dalek rakudo/repo_v1: it more difficult to package modules for Linux distributions. So we replace
22:12 dalek rakudo/repo_v1: the short-name lookup files in a repo's short/ directory by directories.
22:12 dalek rakudo/repo_v1:
22:12 dalek rakudo/repo_v1: The files there are named after the dist's hash and contain the version,
22:12 dalek rakudo/repo_v1: auth and api fields so we can find the one true candidate without having
22:12 dalek rakudo/repo_v1: to parse any JSON at all. Only the winner dist's JSON will even be read.
22:12 dalek rakudo/repo_v1:
22:12 dalek rakudo/repo_v1: As version, auth and api are separated by newlines without any escaping,
22:12 dalek rakudo/repo_v1: those values themselves may no longer contain newlines. This should be a
22:12 dalek rakudo/repo_v1: very reasonable restriction in any case.
22:12 dalek rakudo/repo_v1: review: https://github.com/rakudo/rakudo/commit/9c0f96f768
22:12 AlexDaniel Juerd: but yeah, it seems like the \n issue is solved
22:12 nine Comments on ^^^ appreciated. Both regarding the repo format change and the way upgrades to the repo format are handled.
22:14 yurivish_ joined #perl6
22:15 AlexDaniel Juerd: yeah, it loos like you have to use 「*」 somewhere instead of 「+」
22:16 rudi_s Why is Perl6 using Str to represent paths? Str is a decoded representation of a byte array, however Paths might contain either not decodable bytes or multiple encodings with the same decoded representation (e.g. a" vs. ä). I'm not sure how to handle that correctly with the current representation in Perl6.
22:16 Vitrifur joined #perl6
22:16 AlexDaniel rudi_s: ooooh…
22:16 jnthn rudi_s: The things that are undecodable are represented as synthetic codepoints.
22:17 jnthn So round-trip so far as the OS goes.
22:18 rudi_s jnthn: Interesting. I'd expect a decoding error on invalid UTF-8.
22:18 AlexDaniel jnthn: what if it has combining characters? It sounds like normalization will fuck up the paths?
22:18 jnthn rudi_s: Yes, we don't decode env vars, filesystem entries, etc. using a UTF-8 decoder, but rather UTF-8-C8
22:18 jnthn AlexDaniel: Tough luck, at the moment. That's on the todo list.
22:19 jnthn I've seen lots of speculating and yet to see it in the real world, so it's not a huge priority yet.
22:19 jnthn Will try and deal with it before the next major lang version though.
22:19 Juerd AlexDaniel: I don't understand why it doesn't work...
22:19 jnthn nine: It sounds sane at first glance :)
22:20 kid51 joined #perl6
22:20 jnthn nine: Can see how the current design would make "fun" for distibution stuff.
22:20 AlexDaniel Juerd: are you implying that I do? :D
22:20 AlexDaniel Juerd: what I know is that the whole left edge is broken
22:20 Juerd AlexDaniel: Not implying. Hoping.
22:20 Juerd AlexDaniel: Hmmm
22:21 rudi_s jnthn: What exactly is UTF-8-C8. Can you point me to some docs?
22:21 AlexDaniel Juerd: and only when the solution is going from top-right to bottom-left direction
22:21 Juerd AlexDaniel: Not broken for horizontal
22:21 rudi_s jnthn: I'm just asking because I had a lot of fun with a program which decided to store the path names it uses in its data files, which breaks horribly when the file system and the file encoding doesn't agree.
22:21 AlexDaniel Juerd: it is also broken for the right edge too
22:22 AlexDaniel Juerd: though this time bottom-left→top-right direction
22:22 Jarcode hey, someone who knows nothing about perl: how are the native/ffi bindings for perl (performance/ease of use wise)?
22:22 rudi_s But if undecodable bytes are not touched by the file -> perl6 -> file conversion and combining characters are also not modified (not sure if that's guaranteed) then it's fine.
22:22 Jarcode looking to use a new language closely with native code
22:22 jnthn rudi_s: https://github.com/MoarVM/MoarVM/blob/master/src/strings/utf8_c8.c#L3
22:22 rudi_s Especially the later part is interesting. Does perl6 (or utf-8-c8) guarantee the same byte sequence for an arbitrary input when it's decoded and later encoded?
22:23 jnthn rudi_s: That's the *goal* of it. There are some edge cases around normalization that it doesn't get right yet.
22:23 jnthn rudi_s: But if your issue is that you have filenames in, say, latin-1, or whatever other encoding, it should roundtrip the bytes
22:23 Skarsnik Jarcode, not sure to understand your question
22:24 rudi_s jnthn: Thanks. I'm relieved that somebody thought about this issue when they decided to use Str for path names ;-) - bugs can always be fixed.
22:25 jnthn rudi_s: Note that this encoding is only used by default on things like environment variables and so on. You need to opt into it for reading normal files (pass :enc<utf8-c8> to open)
22:25 Jarcode Skarsnik, using perl very closely with C/C++ code, how well do the bindings work? having worked with languages like lua for writing code that jumps in and out of native calls often
22:26 rudi_s jnthn: Sure. I was just worried about file names.
22:26 AlexDaniel just realized I have no ↖↗↘↙ arrows on my keyboard… meh
22:26 DrForr Jarcode: There are plenty of language bindings already, look at the Inline:: namespace on modules.perl6.org.
22:26 mst people seem to be really enjoying the native call stuff
22:26 AlexDaniel mst: YES!!!
22:26 Jarcode DrForr, I know they exist, asking about performance in particular
22:26 cfedde joined #perl6
22:26 Skarsnik hm, you can't use NativeCall to use perl6 from C, but for perf, it's hard to tell, since p6 is rather slow comparing to C
22:26 Jarcode no point in using the bindings in the first place if there's a significant overhead to them (for say, implementing a function in C)
22:26 jnthn Jarcode: Call performance isn't too great yet.
22:27 AlexDaniel Skarsnik: huh? What about callbacks?
22:27 Jarcode jnthn, thanks, that's what I wanted to know
22:27 Skarsnik Yes, but you can't expose like object/function like if you embeded Lua for example
22:27 AlexDaniel ah yes, sure.
22:27 Jarcode Lua is pretty much as good as it gets for closely integrating with C code, I just hate the lack of an OO model and would love to have features that perl has :(
22:28 Jarcode was curious
22:28 lizmat Jarcode: I believe there;s an Inline::Lua in the ecosystem, perhaps you *can* have the best of both worlds ?
22:28 * lizmat hasn't looked at it erself
22:28 lizmat *herself
22:28 Jarcode that would be calling into Lua to call into C
22:28 Jarcode which... would be even more overhead :P
22:29 lizmat ah, ok  :-)
22:29 Jarcode (the point being, jumping into native functions and out very frequently where the call overhead is very relevant)
22:29 jnthn Jarcode: We've a reasonable plan for how to get it to perform well, and given Perl 5/Perl 6 interop and a load of other modules use it, a good incentive to speed it up in the not too distance future. :)
22:29 jnthn Jarcode: But right now, if you're making lots of small calls, yeah, you'll probably bottleneck on it, tbh.
22:29 DrForr Jarcode: There's going to be overhead any time you call from Perl to C, but the C-compiled library will be faster than Perl 6 raw. Think of amortization.
22:29 Jarcode jnthn, thanks. I'll keep an eye on the language.
22:30 Jarcode DrForr, I'm well aware of the benefits of C versus other languages, the call overhead kills it if you're dealing with a lot of calls though
22:31 Jarcode eg. JNI calls w/ java are a great example of native calls being completely pointless due to overhead
22:31 Skarsnik jnthn, hm, do you think it will be possible to have std::string -> Str support (for binding C++) if moar was linked with the stl?
22:31 Juerd AlexDaniel: Needed an extra \s*
22:32 Zero_Dogg joined #perl6
22:32 Zero_Dogg joined #perl6
22:32 DrForr Same with any other language, you can always create a glue library if you need to work around the calling overhead though.
22:32 Jarcode DrForr, yeah, that's what I end up doing with Java (buffering a bunch of calls before pushing it to the native side)
22:33 Jarcode it's a pain though, and some cases you need to work with the result of function A to do something with function B or C, etc. Doesn't always work.
22:34 Jarcode (.. unless the call buffer has some functionality to push the results of one function to another, and then you're starting to complicate things)
22:35 jnthn Skarsnik: No idea; I'm the wrong person to ask about C++ things. :)
22:35 zpmorgan joined #perl6
22:36 Skarsnik It's a question I had when thinking of adding C++ support in gptrixie. it will probably be not that useful
22:36 Skarsnik Everything using a stl type will not work x)
22:38 vendethiel joined #perl6
22:38 skids https://gist.github.com/skids/7f3e8613857a9f6ca9da # who was it that was asking for an inverted "when" statement?
22:39 AlexDaniel me
22:39 Hotkeys this is dark magic skids
22:40 mst MadcapJake: heh, @PerlDaily just plagiarised your Test::Lab tweet
22:40 * skids is but an acolyte
22:41 skids (It comes without some of the syntax niceness since there are some hardcoded keyword lists it is not in)
22:41 jnthn Are they hardcoded or proto tokens?
22:41 skids let me find one
22:42 jnthn terminator is protoregex, iirc
22:42 jnthn The word never doesn't really read right for that...
22:42 skids in eat_terminator is one
22:43 AlexDaniel Juerd: found another bug…
22:43 skids (That might be the only one)
22:44 AlexDaniel Juerd: don't get me wrong, I love your solution. I just can't stop myself when it comes to reporting bugs
22:44 AlexDaniel Juerd: hold on I'll try to isolate it…
22:45 AlexDaniel O-------
22:45 AlexDaniel -X------
22:45 AlexDaniel Juerd: put this in the middle of the field
22:46 jnthn skids: Ah, yeah, I see it.
22:47 jnthn Hm, it's surprisingly hard to find an "inverse" of when. "absent" is the best I came up with so far.
22:48 Ben_Goldberg joined #perl6
22:48 cpage_ joined #perl6
22:48 Hotkeys nwhen
22:48 AlexDaniel .oO( newh )
22:48 AlexDaniel .oO( nehw ? )
22:49 Hotkeys I'd say 'unless' but we already use that
22:51 Hotkeys what about lest
22:51 Hotkeys nah not quite
22:52 skids break open the unabridged thesaurus :-)
22:52 jscripter joined #perl6
22:52 skids There hath got to be-eth something.
22:52 geekosaur lacking?
22:52 Hotkeys nisi
22:52 geekosaur (...not real fond of, actually)
22:52 Hotkeys https://en.wiktionary.org/wiki/nisi
22:53 Hotkeys It's latin but who cares
22:55 jnthn :)
22:55 * jnthn goes to try and sleep away his cold-y thing...
22:55 jnthn 'night o/
22:55 Hotkeys night
22:57 lizmat night, jnthn
22:57 BenGoldberg_ joined #perl6
23:03 TEttinger joined #perl6
23:03 hippie1 joined #perl6
23:09 sdh joined #perl6
23:13 sdh I've been looking at Rakudo's JVM backend and generating a jarfile with --target=jar.  It seems like I should be able to package in any runtimes/modules' jars and run it with only a JVM - am I missing something?
23:17 alpha123 joined #perl6
23:20 sdh (i.e. is there any way to package up a Perl 6 program so that it can be run by someone who hasn't installed Perl 6?)
23:38 zpmorgan joined #perl6
23:42 timotimo we don't have anything that does that yet, sdh
23:45 sdh Ah, thanks.  Is it in the works?  I was digging around the runtimes to see what I could hack together, but didn't have any luck.
23:46 yqt joined #perl6
23:47 Juerd AlexDaniel: Say... could you write some unit tests instead? I find it hard to decypher things like 2 lines and "put this in the middle"... :)
23:48 AlexDaniel Juerd: I mean this: https://gist.github.com/AlexDaniel/7c78cefa3a96707c39e5
23:48 AlexDaniel Juerd: not enough time for a proper test suite though, sorry :)
23:49 Juerd AlexDaniel: This works too
23:49 AlexDaniel Juerd: I've attached the result
23:50 Juerd AlexDaniel: Fixed with     token cellws($n)  { ( [ \n? <cell> \n? ]**{$n} ) <?{ $0.comb("\n") == 1 }> }
23:54 AlexDaniel Juerd: found another bug
23:54 AlexDaniel ah, it actually the same one, I guess
23:55 Juerd AlexDaniel: Test with the new code please :)
23:55 AlexDaniel it is with the new code
23:56 Juerd gist?
23:56 AlexDaniel Juerd: https://gist.github.com/AlexDaniel/e3575a78ee8614da336b
23:59 Juerd token cellws($n)  { ( [ \n? <cell> ]**{$n} ) <?{ $0.comb("\n") == 1 }> }

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

Perl 6 | Reference Documentation | Rakudo