»ö« 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.
00:00 addison_ joined
Hotkeys is there a way to do this without having to get the value from the hash twice? i.imgur.com/Yufa7tJ.png 00:03
AlexDaniel m: my %h = x => 25; sub foo { return $_ with %h<x>; return 69 }; say foo 00:05
camelia rakudo-moar e401ee: OUTPUT«25␤»
AlexDaniel m: my %h = x => 25; sub foo { return $_ with %h<y>; return 69 }; say foo
camelia rakudo-moar e401ee: OUTPUT«69␤»
Hotkeys oh 00:06
AlexDaniel m: my %h = x => 25; sub foo { .return with %h<x>; return 69 }; say foo
camelia rakudo-moar e401ee: OUTPUT«25␤»
Hotkeys so if it doesn't exist it just won't return
00:06 kurahaupo joined
Hotkeys because that part never actually runs 00:06
AlexDaniel hmmm it's not 100% right though
Hotkeys hmm 00:07
AlexDaniel m: my %h = x => Any; sub foo { .return with %h<x>; return 69 }; say foo
camelia rakudo-moar e401ee: OUTPUT«69␤»
AlexDaniel Hotkeys: ↑ here it actually exists
Hotkeys I'm just not sure if doing it my way has any like
unnecessary overhead
00:07 synopsebot6 left
Hotkeys or if that's the 'proper' way to do it 00:07
00:07 synopsebot6 joined
AlexDaniel Hotkeys: it has a lot of overhead for my eyes. But besides that not so much 00:07
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?
AlexDaniel m: my %h = x => Any; sub foo { .return given %h<x>; return 69 }; say foo
camelia rakudo-moar e401ee: OUTPUT«(Any)␤»
AlexDaniel Hotkeys: ↑ ok, this one is right
nope, it's not 00:09
damn :)
timotimo rudi_s: only if you build your own C compiler 00:10
00:11 Herby_ joined
Herby_ Evening, everyone! 00:11
rudi_s timotimo: Ouch. Well, Perl5 has Inline::C which I could use for this.
Hotkeys for my pluralizing 00:13
should I have two subs pluralize-noun and pluralize-adj
or should I take noun/adj as named bools
and have the sub just be "pluralize"
AlexDaniel Hotkeys: so it seems like you *have* to use :exists if you really want to store some Any-s 00:14
Hotkeys: otherwise you can get away with 「with」
00:14 eternaleye joined
AlexDaniel m: my %h = x => Any; say %h<x>:exists:kv 00:15
camelia rakudo-moar e401ee: OUTPUT«(x True)␤»
00:15 Skarsnik left
AlexDaniel Hotkeys: ↑ this looked very promising but it does not do what we want… 00:15
00:15 kurahaupo left
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␤␤»
Hotkeys oh that's angry
m: my %h = x => Any; %h<x>:exists.perl 00:16
camelia ( no output )
Hotkeys m: my %h = x => Any; %h<x>:exists.perl.say
camelia rakudo-moar e401ee: OUTPUT«Bool::True␤»
Hotkeys m: my %h = x => Any; %h<x>:exists:v
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␤␤»
AlexDaniel Hotkeys: well, what are you expecting to receive? :) 00:17
Hotkeys idk
00:17 firstdayonthejob left, kurahaupo joined
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) gist.github.com/johnspurr/31b253362bef7ca834ba 00:23
would anybody be interested in a proper module for this?
00:23 kurahaupo_ joined
AlexDaniel Herby_: it seems like grammar solution is not as good as I've initially thought :/ 00:23
00:24 kurahaupo left
AlexDaniel Herby_: it has to take newlines into account. Otherwise it is buggy 00:24
Herby_ the grammar solution Juerd submitted? 00:25
AlexDaniel yeah
Herby_ ah
AlexDaniel Herby_: try running it with X------O on one of the lines
Herby_ k 00:26
AlexDaniel Herby_: the question, however, is how can we fix it? :)
Herby_ and it looks like today's puzzle is around Bioinformatics: www.reddit.com/r/dailyprogrammer/c...equencing/ 00:27
00:27 synopsebot6 left, synopsebot6 joined
Herby_ AlexDaniel: any ideas on a possible fix? 00:27
00:30 autarch1 joined, kurahaupo_ left
AlexDaniel <cellws>**6 should probably be changed to something like (<cellws>**6) { $0.contains(“\n”) } … but actually I have no idea :) 00:31
oh geez 00:32
Herby_ how does that new puzzle look to you? its this week's [HARD] puzzle, no perl solutions yet
AlexDaniel Herby_: I found another bug…
except that this time I have no idea what is happening 00:33
--O-----
-X------
Hotkeys Herby_: reminds me of a Debruijn sequence
AlexDaniel Herby_: ↑ it does not find the solution here
Hotkeys except with specific subsequences
00:34 cdg left
Herby_ Hotkeys: my math base isn't that strong but I'll take a look at the De Bruijn sequence 00:35
Hotkeys a debruijn sequence is different 00:36
Herby_ oh
Hotkeys it's a sequence of *all* subsequences with a given alphabet and a given length
00:39 ZoffixWin joined
Herby_ ZoffixWin: o/ 00:42
ZoffixWin \o
00:45 pyrimidi_ joined
pyrimidi_ Hotkeys: en.wikipedia.org/wiki/De_Bruijn_graph#Uses 00:46
Note the third one :)
Hotkeys oh 00:47
neat
00:47 synopsebot6 left, synopsebot6 joined
timotimo rudi_s: Perl6 has Inline::C which you could also use for this 00:50
rudi_s: your trust in our ecosystem seems weak :) 00:51
00:51 pyrimidi_ left
rudi_s timotimo: Nice. Still new, still need to learn more about the good stuff ;-) 00:52
00:55 ZoffixWin left
Hotkeys timotimo: it's actually just "Inline" I believe for C 01:03
(although it should be "Inline::C" IMO)
timotimo it should ,e.
be*
Hotkeys oh strange
the Inline module actually contains Inline::C
01:04 wamba joined
timotimo it also contains a role for Inline stuff in general, iirc 01:04
01:06 sortiz joined
sortiz \o 01:06
Hotkeys yeah it does
o/ sortiz
01:07 synopsebot6 left, synopsebot6 joined
rudi_s The code doesn't look good though. Contains at least an arbitrary file overwrite :-/ 01:09
Perl6 defineately needs a safe tempfile in core.
Does spurt have an :exclusive?
Ah, :createonly 01:10
:-( File::Temp is broken too, no sane defaults (see issues on githubs). 01:12
01:14 maybekoo5 left
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:15
rudi_s ? 01:17
01:27 synopsebot6 left, synopsebot6 joined
timotimo skids: yeah, seems like a common problem :( 01:30
with clingwrap, too >:(
01:31 BenGoldberg joined 01:34 alpha123 left 01:44 Actualeyes joined 01:47 synopsebot6 left, synopsebot6 joined 01:52 kid51 left
rudi_s How can I convert a string to a number with the given format? e.g x("ff",16) to 255? 01:55
01:56 lichtkind left, abaugher left
rudi_s Ah, found it. :16("ff") 01:57
Is this documented on docs.perl6.org?
01:57 abaugher joined 02:05 geraud joined 02:07 synopsebot6 left, synopsebot6 joined 02:09 ryan__ joined
ugexe rudi_s: no 02:11
m: say UNBASE(16, "FF"); # this is what thats short for 02:12
camelia rakudo-moar e401ee: OUTPUT«255␤»
awwaiid skids: I think the blade is there to give you small but not overly painful cuts and dissapointment
ugexe github.com/rakudo/rakudo/blob/edac...r.pm#L2070
02:12 TEttinger left
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
rudi_s (Is UNBASE rakudo or perl6 specific?)
ugexe UNBASE is probably meant to be internal, and :16() doesnt really fit the template
rudi_s Hm.
Maybe in the introduction without a header? 02:14
skids awwaiid: I knew it had to be something like that.
ugexe it would help if there was just .unbase i think 02:15
02:15 telex left
ugexe so if you are looking up .base you could also easily find how to go the other way 02:15
02:16 telex joined
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
rudi_s Does this also work with a base in a variable? 02:19
02:22 molaf left
ugexe sure, if its a string 02:24
02:25 wamba left 02:27 synopsebot6 left
rudi_s Ah. 02:27
02:27 synopsebot6 joined, ryan__ left
rudi_s ugexe: What is the correct syntax? :"$base"("string") doesn't work. 02:28
ugexe oh that way... probably need to use UNBASE 02:29
rudi_s ugexe: Ok. Should I document that as well (even if it's probably rakudo internal) or just skip it? 02:30
ugexe eh personally i would say yes 02:31
rudi_s k 02:32
02:34 jameslenz left
rudi_s ugexe: github.com/perl6/doc/pull/404 02:35
(I'd also take the commit access mori<tab> offered a few days ago.) 02:39
02:40 Guest5704 is now known as masak 02:45 ilbot3 left 02:47 Ben_Goldberg joined, synopsebot6 left, synopsebot6 joined, ilbot3 joined 02:49 BenGoldberg left 02:54 addison_ left
Herby_ is Camelia written in Perl 6? 02:58
timotimo not yet
dalek is also a perl5 bot still
S99:LTA
synopsebot6 Link: design.perl6.org/S99.html#LTA
Herby_ :) 02:59
timotimo wow. i just turned off the intelligent filter and synopsebot6 is reconnecting rather often
i must look into the systemd unit file tomorrow, and figure out if that's what causes the trouble
but now: bedtime
Herby_ night!
if someone wanted to try their hand at a "Hello, World" version of a perl 6 IRC bot 03:01
where would one start...
03:05 synopsebot6 left 03:06 synopsebot6 joined
dalek ast: 653b200 | LLFourn++ | S11-modules/ (2 files):
Test for require module under core namepsace

So the following doesn't happen accidentally to IO::Socket::SSL again
  github.com/rakudo/rakudo/pull/714
03:10
03:12 pmurias left 03:25 synopsebot6 left 03:26 synopsebot6 joined
sortiz llfourn ping 03:36
.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)
llfourn I'm here :)
sortiz Hi
llfourn o/
sortiz Thought that the test you added imply that after a successful require, Cool::{'Utils'}:exists === True, no? 03:40
llfourn well it's mostly testing the return value from require 03:41
sortiz Yes, but the above is true, and that can be tested also. 03:42
llfourn But I did test it also? 03:43
nok ::('Cool::Utils') ~~ Failure,'Cool::Utils has been merged';
03:44 ilbelkyr joined
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:45 synopsebot6 left
llfourn ::('Cool::Utils') does test directly in the package via indirect lookup afaik 03:46
03:46 synopsebot6 joined
llfourn rudi_s: I think so... 03:46
03:47 yqt left
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
from my memory that is a little tricky
I'm suprised the non-private version worked 03:49
rudi_s What did you expect instead?
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
camelia rakudo-moar e401ee: OUTPUT«420␤»
llfourn rudi_s: last time for me I think it didn't work byt I might be crazy
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.
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:51
rudi_s llfourn: Thanks. One issue with BUILD is that I have to repeat all the parameters again. 03:52
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␤»
rudi_s llfourn: I guess there's no hook for post-instatiation I can override?
(To just set a value.)
llfourn is working on an example 03:54
ugexe BUILDALL you dont need to set all the values
github.com/ugexe/zef/blob/master/l...on.pm6#L21
llfourn class S { has $!a = "foo"; }; class C is S { method BUILDALLL(*%args) { if not %args<a>:exists { $!a ="bar" } }; 03:55
rudi_s: something like that
wait
ugexe the tricky party is when to use callsame and what ot return
llfourn right I goofed that one
nvm %args thing 03:56
just do my $tmp = callsame; $!a = "whatever"; return $tmp; # or something
03:56 noganex joined
ugexe i think you have to use nqp to access the private attributes of another class though 03:59
see the above camelias ^
llfourn ahh yeah you might be right... you can access role private attributes though
04:00 noganex_ left
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
AlexDaniel Herby_: this: github.com/zoffixznet/perl6-IRC-Client
llfourn rudi_s: yes.
rudi_s Hm. No protected or similar in Perl6?
skids m: class A { has $!bar = $?CLASS.say }; class B is A { }; B.new # :/
camelia rakudo-moar e401ee: OUTPUT«(A)␤»
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
ugexe or create a rw method to access the private attribute
llfourn skids: $?CLASS is the currently compiling class so that look right?
rudi_s Ok, thanks. I'll use a public member for now. 04:02
AlexDaniel Herby_: there is also github.com/TiMBuS/Net--IRC but I think that the one that was written by Zoffix++ is probably better
skids llfourn: I guess I'm used to working from roles.
AlexDaniel Herby_: partly because I used Net::IRC::Bot myself and I found it a little bit limited 04:03
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
04:04 Ben_Goldberg left
llfourn skids: have you tried self.WHAT? 04:04
skids Was just doing that.
llfourn \o/
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, synopsebot6 left 04:06 synopsebot6 joined
skids Wonder if there's a better way to hide that default_bar. 04:06
Anyway that's another way to deal with it.
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; }
ugexe: What exactly is the (|) in your BUILDALL signature? 04:07
llfourn skids: why didn't it work?
skids It did work.
ugexe (|) is any signature
llfourn oh. the error?
rudi_s: |, an anonymous capture, it capture all the args and does nothing with them. 04:08
if you just have BUILDALL { } you've said that BUILDALL takes no arguments for that class
ugexe i dont think you need to do $x.foo, just $.foo = 'whatever'
llfourn correct
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.
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
llfourn skids: ah I see. I wonder if a private submethod would work. It probably wouldn't.
ugexe callsame lets it build further up the chain
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.
llfourn rudi_s: that's a could point you could just return self. callsame; $.foo = ..; self;
good*
AlexDaniel Hotkeys: eh! No more golfing? :)
llfourn rudi_s: docs.perl6.org/type/Metamodel::Trusting#trusts check it out. I've never used b4. 04:13
ugexe $.foo is an attribute of $tmp
Hotkeys AlexDaniel: I've had some school stuff lately and I'm trying to do some module stuff 04:14
not stopping golfing forever though
AlexDaniel Hotkeys: module stuff! Great 04:15
rudi_s ugexe: What exactly does $.foo alias to? Is this only special in BUILDALL or everywhere?
AlexDaniel Hotkeys: that's much better than these golfing tasks :D
ugexe it aliases to self.foo
rudi_s And in BUILDALL self and the result of callsame are the same? 04:16
04:16 pierrot left
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
ugexe it was used in some role punning shit though so it might have been that 04:17
04:17 pierrot is now known as Guest82528
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?
llfourn probably if it doesn't return self, it's not meant to be superclassed anyway.
for me it's fine :) 04:19
subclassed*
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?
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.
llfourn BUILDALL(*%args) { %args{a} //= "default"; callwith(|%args); self } #soemthing like this. 04:21
so set it at init time
but keep the attr ro.
ie pretend it came as a user arg to .new
ugexe wonder if you couuldu do like BUILDALL(|c) { callwith(:$foo, |c); 04:22
llfourn yeah, but maybe, |c, :$foo 04:23
ugexe's 04:24
sevvie I occasionally lose faith in humanity. coming here has proven a cure for that.
llfourn rudi_s: ugexe's way seems better
sevvie: \o/
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:25 synopsebot6 left
llfourn m: my \c = \("some","args"); say |c; 04:26
camelia rakudo-moar e401ee: OUTPUT«someargs␤»
04:26 synopsebot6 joined
llfourn m: say \("some","args").^name; 04:26
camelia rakudo-moar e401ee: OUTPUT«Capture␤»
rudi_s Ah, nice. What exactly is the different between callwith and callsame?
ugexe callsame calls with the same arguments
llfourn rudi_s: callwith takes arguments
rudi_s Ah. That sounds logical ;-) Thank you both! 04:27
llfourn no probs. Enjoy :)
rudi_s Hm. It doesn't work .. maybe I'm using it incorrectly. 04:28
method BUILDALL(|c) { callwith(:foo('BAR'), |c); }
*in the subclass and has $.foo = 'Foo'; in the superclass.
ugexe i wasnt sure if it would work 04:29
llfourn rudi_s: try with the :foo after the |c,
rudi_s But $.foo isn't changed in the subclass.
No change.
llfourn hmm but it should work... 04:30
if you don't include the |c does it work?
(at least for that attribute)
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
(My new takes 3 arguments.)
llfourn rudi_s: keep the |c in BUILDALL just don't put it in callwith 04:32
is .new taking named arguments?
rudi_s Yes.
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.
llfourn rudi_s: if you pass foo => "something" to .new does $.foo end up as "something"? 04:34
remove BUILDALL etc
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
s/now/know/
04:35 khw left
ugexe if A is B is C then A should know about $.foo 04:36
llfourn rudi_s: can you make a gist. My brain is a bit hurting from imagining what this looks like. 04:37
diakopter hey, back up to positive territory on modulecounts.com 04:42
llfourn diakopter: what does this mean?
diakopter well, it was zero or negative for a while 04:43
llfourn oh like number per day?
negative??
diakopter some modules were removed for whatever reason
llfourn heh
were almost beating PEAR! 04:44
and then lua becomes next target -- now that's a real language. 04:45
04:45 synopsebot6 left 04:46 synopsebot6 joined
sevvie I think Hackage is a good milestone. 04:46
In fact, I'll start porting now
diakopter porting..?
what to what 04:47
rudi_s llfourn: pbot.rmdir.de/dVQ9uy66nNPef9QhIPGLvQ (I removed the new parts because they don't seem to be relevant to the current problem).
sevvie haskell to p6. monad all the things.
llfourn npm: 398 per day... ( who needs that many js modules)
rudi_s: thanks takjign a look now 04:48
04:51 skids left
Hotkeys What modules do you even make with 240k already in the ecosystem 04:51
I would be so intimidated
llfourn there's got to be one for every person that has installed nodejs
ugexe they sure love their dependency chains 04:52
04:53 autarch1 left
diakopter llfourn: LOLOL 04:53
I mean, it's funny if you're joking 04:54
llfourn I think I am
diakopter lol
llfourn rudi_s: apparently I didn't know how BUILDALL works 04:56
rudi_s: you can't do |c, you have to do BUILDALL(@args,%args) { %args<foo> //= "whatever"; callsame; }; 04:57
or rather BUILDALL(@,%args) { }
I thought buildall had flat arguments but I was wrong that's why you have that expected three arguments but got one. 04:58
rudi_s llfourn: Awesome, that works fine. Thank you very much! 05:00
(Still a little confused how callsame works and why modifyng %args works, but I'm happy that it works.)
llfourn rudi_s: setting a hash key doesn't change the identity of the hash itself if that makes sense 05:01
if it was *%args, it wouldn't work.
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
you can still change the state of the values themselves 05:03
rudi_s Ah, that makes sense. Thank you.
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:04
05:05 synopsebot6 left 05:06 synopsebot6 joined 05:26 synopsebot6 left, synopsebot6 joined 05:35 Cabanossi left 05:38 Cabanossi joined 05:45 synopsebot6 left 05:46 synopsebot6 joined, spider-mario joined 05:51 Herby_ left 05:53 klapperl left 06:05 synopsebot6 left 06:06 synopsebot6 joined 06:07 kurahaupo joined 06:11 kurahaupo_ joined, kurahaupo_ left 06:12 kurahaupo left 06:17 mspo left 06:18 TEttinger joined 06:23 chetak joined, chetak left 06:25 mspo joined, synopsebot6 left 06:26 synopsebot6 joined 06:30 kurahaupo joined 06:33 kurahaupo_ joined 06:34 kurahaupo_ left 06:37 kurahaupo left 06:44 jack_rabbit joined 06:45 synopsebot6 left 06:46 synopsebot6 joined 07:04 kaare_ joined 07:05 davido_ joined, synopsebot6 left 07:06 synopsebot6 joined, kurahaupo joined 07:18 jack_rabbit left 07:19 CIAvash joined 07:20 jack_rabbit joined 07:25 synopsebot6 left 07:26 synopsebot6 joined 07:32 AlexDaniel left 07:36 jack_rabbit left 07:40 kd` left 07:41 kd` joined 07:45 RabidGravy joined, synopsebot6 left 07:46 synopsebot6 joined
RabidGravy HARR! 07:47
07:50 davido_ left
sortiz o/ 07:57
Hotkeys You always enter so aggressively RabidGravy 08:03
:p
08:05 synopsebot6 left 08:06 synopsebot6 joined 08:10 FROGGS joined
RabidGravy it's a morning thing 08:11
sevvie <3 aggressive entry. 08:16
sortiz :) 08:17
sevvie ... can one call phrasing on themself? >.>
dalek c: 24b25db | (Simon Ruderich)++ | doc/Type/Real.pod:
Real: document how to convert string to number
08:22
c: d9293e9 | RabidGravy++ | doc/Type/Real.pod:
Merge pull request #404 from rudis/master

Real: document how to convert string to number
08:23 darutoko joined 08:25 synopsebot6 left 08:26 synopsebot6 joined
Hotkeys sevvie: phrasing :) 08:26
08:26 zpmorgan left
sevvie ty ;) 08:27
08:28 maybekoo5 joined
Hotkeys what terminal emulator does everyone use on the linoox 08:31
I haven't linuxed in a while and put a fresh fedora install on my laptop a couple days ago 08:32
and haven't done anything with it since (I mostly use my laptop at school)
RabidGravy the default gnome terminal works fine for me
Hotkeys pff 08:33
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.
arm7 ftw.
RabidGravy yeah, I use connectbot on tablets but I find it so hard to type I hardly use it 08:35
sevvie bluetooth keyboard.
it's the only way to do it, in my mind.
08:35 wwwbukolaycom left
sevvie perl6 on arm7 debian chroot works amazingly, btw. <3 <3 08:38
armhf. 08:39
RabidGravy now if you could just fix the JIT and a small bug related to byte ordering in nativecall we'll be golden :) 08:43
sevvie on it! 08:44
08:45 synopsebot6 left 08:46 synopsebot6 joined, _dolmen_ joined 08:50 firstdayonthejob joined 09:00 rindolf joined 09:05 synopsebot6 left 09:06 synopsebot6 joined 09:09 geraud left 09:25 synopsebot6 left 09:26 synopsebot6 joined, _dolmen_ left 09:35 _mg_ joined 09:39 donaldh joined 09:40 adu joined 09:42 Amendil joined 09:45 synopsebot6 left 09:46 synopsebot6 joined
nine Hotkeys: KDE's konsole 09:48
RabidGravy I think we all mean "the default terminal program of whichever GUI environment you prefer" 09:55
10:05 synopsebot6 left 10:06 synopsebot6 joined
RabidGravy right, haven't been further than the supermarket all week, TO THE SEASIDE! 10:10
toodles
10:11 _mg_ left 10:14 RabidGravy left 10:15 donaldh left, sortiz left
FROGGS o/ 10:18
10:20 ocbtec joined 10:24 adu left 10:25 synopsebot6 left 10:26 synopsebot6 joined 10:29 ggherdov_ left, ggherdov_ joined, ggherdov_ left, ggherdov_ joined, ggherdov_ is now known as ggherdov
lizmat good *, #perl6! 10:30
did we somehow lose the capability of running a single test file with make ?
$ make t/spec/S32-Str/split.t
make: Nothing to be done for `t/spec/S32-Str/split.t'
10:32 Skarsnik joined
nine lizmat: works here? 10:33
lizmat hmmm...
nine nine@sphinx:~/rakudo (nom *=)> make t/spec/S32-str/split.t
dalek ast: 10b2d6b | lizmat++ | S32-str/split.t:
Add test for overlapping needles
10:35
nine Oh my...buying hardware is tedious. It's hard to even find some SSD review that measures heavy write loads. 10:36
TEttinger nine: is this for work? 10:38
10:39 donaldh joined
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:40
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:41
10:42 dbrunton joined 10:43 kurahaupo left
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:44
10:45 synopsebot6 left 10:46 synopsebot6 joined 10:49 ocbtec left 10:54 donaldh left 10:56 avar joined 10:59 dbrunton left 11:02 _dolmen_ joined 11:05 wamba joined, synopsebot6 left 11:06 synopsebot6 joined 11:17 apiw joined 11:21 firstdayonthejob left 11:23 apiw left 11:24 lizmat left 11:25 lizmat joined, synopsebot6 left 11:26 synopsebot6 joined 11:29 _dolmen_ left 11:30 apiw joined 11:34 apiw left 11:40 donaldh joined 11:42 firstdayonthejob joined 11:43 eternaleye left
dalek ast: 47dfb03 | lizmat++ | S32-str/split.t:
Fix test of overlapping needles
11:44
ast: a41c9f5 | lizmat++ | S03-operators/buf.t:
Add some Buf.append|push|prepend|unshift tests
ast: 4a6ba55 | lizmat++ | S03-operators/buf.t:
Fix test descriptions Buf.prepend|unshift
11:45
11:45 synopsebot6 left 11:46 synopsebot6 joined
dalek ast: f5993d1 | lizmat++ | S02-types/set (2 files):
Test that Set(Hash).Hash returns an object hash
11:58
12:02 spider-mario left 12:03 spider-mario joined
lizmat hmmm... looks like we have *no* tests for Map whatsoever 12:04
12:05 synopsebot6 left 12:06 synopsebot6 joined
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)))␤»
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 12:25 synopsebot6 left 12:26 iH2O joined, synopsebot6 joined, donaldh left, TEttinger left 12:27 iH2O left
lizmat I guess fixing that will have to wait until after the release 12:32
also: am not sure how this should be fixed 12:33
12:33 musiKk joined
xiaomiao hrm. I'm trying to figure out how to install modules system-wide. What's the expected naming convention for directories? 12:33
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
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
*that* is the part that interests me
Skarsnik source file are mangled by sha sum
for the name
xiaomiao o_O 12:37
12:37 Gothmog joined 12:38 Gothmog is now known as Gothmog_
xiaomiao Skarsnik: so you expect /usr/share/perl6/site/${SHA1} as 'package name' ? that sounds very silly to me 12:39
12:45 synopsebot6 left 12:46 synopsebot6 joined 12:53 kid51 joined 12:57 kid51 left 13:03 colomon_ joined 13:04 colomon left, colomon_ is now known as colomon 13:05 synopsebot6 left 13:06 synopsebot6 joined
Skarsnik xiaomiao, well, it's like that currently, panda copy the source file to a name like this 13:06
xiaomiao and there seems to be random json involved 13:07
13:07 Gothmog_ left
xiaomiao I think I need more alcohol to understand ;) 13:07
13:08 DrPete left
Skarsnik hm, compunit on doc, lead to the module page with nothing about them 13:13
xiaomiao I'm trying to figure out if 'alacryd' makes sense 13:15
but it requires File::Find to be installed 13:16
somehow there's a non-obvious middleware layer involved :(
13:19 _mg_ left, _mg_ joined 13:25 synopsebot6 left 13:26 synopsebot6 joined 13:27 autarch1 joined 13:35 zpmorgan joined
Skarsnik alacryd? 13:40
13:41 xinming left 13:42 xinming joined
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:44
13:45 synopsebot6 left 13:46 synopsebot6 joined
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
not sure how this is reasonable yet ...
13:50 colomon left 13:51 Psyche^_ joined 13:52 rburkholder joined 13:55 Psyche^ left 13:56 _dolmen_ joined 13:59 donaldh joined
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:01
14:05 synopsebot6 left 14:06 synopsebot6 joined
xiaomiao I'd start by not using btrfs ;) 14:06
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
I must be missing some fundamental design ideas that didn't involve a bottle of absinthe
14:15 cpage_ left 14:25 synopsebot6 left 14:26 synopsebot6 joined 14:27 _mg_ left
dalek c: 60ea17c | moritz++ | doc/Type/Real.pod:
Improve example in type conversion

also undocument UNBASE, since it is internal. We should rather think about a better API for that.
14:28
14:28 vendethiel joined
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
how do I even write the module name? ;)
moritz xiaomiao: and then it must deal with multiple authorities and version of the same module name 14:31
well, depends on your input method :-)
14:32 musca joined
xiaomiao well, uhm, maybe restricting the valid names makes sense, sometimes 14:34
moritz sometimes, yes
not always
xiaomiao the current setup is not quite human-readable
moritz you're not supposed to manually read the module database 14:35
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:37
(At the moment I have to write <a b \\\\0\\\\0> which is really ugly.) 14:38
Ah, Q'...' works fine for that. 14:41
14:44 Ven joined 14:45 zpmorgan left, synopsebot6 left 14:46 synopsebot6 joined, Ven left 14:50 ocbtec joined 14:52 ocbtec left 14:58 colomon joined 15:01 sjoshi joined 15:02 maybekoo5 left 15:05 synopsebot6 left 15:06 synopsebot6 joined
ugexe <> is single quoting 15:13
m: my $x; say <$x \\0 a>
camelia rakudo-moar e401ee: OUTPUT«($x \0 a)␤»
ugexe m: my $x; say <$x \\0 a>.perl
camelia rakudo-moar e401ee: OUTPUT«("\$x", "\\0", "a")␤»
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
What I'd also like is <..> which doesn't interpolate on whitespace.
ugexe interpolate on white space? so like if $x *did* have a space it would be treated as a single item? 15:18
15:19 _mg_ joined
rudi_s Yes. 15:20
15:21 musiKk left
Juerd rudi_s: <<a b c "$x">> 15:22
m: my $x = "1 2 3"; say <<a b c "$x" d>>
camelia rakudo-moar e401ee: OUTPUT«(a b c 1 2 3 d)␤»
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")␤»
rudi_s Juerd: Ah, nice. Thank you.
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")␤»
Juerd Heh, IntStr.
15:25 vendethiel left, synopsebot6 left 15:26 synopsebot6 joined
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
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:30 Amendil left 15:32 vendethiel joined 15:43 iH2O left 15:44 Guest82528 is now known as pierrot 15:45 pierrot left, pierrot joined, pierrot left, pierrot joined, synopsebot6 left 15:46 synopsebot6 joined, colomon left
Skarsnik xiaomiao, you probably want to try to find compUnit doc stuff 15:47
or the gist that nine implemented
15:47 khw joined 15:49 Ven joined
dalek p: 1eb9b97 | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION to 2016.02 release.
15:49
15:49 wbill joined
[TuxCM] test 22.571 15:51
test-t 12.298
csv-parser 50.767
15:54 autarch1 left 15:56 maybekoo5 joined 15:59 colomon joined 16:00 [Tux] joined
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:01
ah its documented better under perl6/specs 16:02
16:04 colomon left, [TuxCM] left 16:05 synopsebot6 left 16:06 synopsebot6 joined 16:07 RabidGravy joined 16:14 [Tux] left 16:15 [Tux] joined
RabidGravy BOOM 16:15
16:19 crime joined 16:25 synopsebot6 left 16:26 synopsebot6 joined 16:27 wbill left 16:33 _mg_ left
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:38
RabidGravy serviced being fun 16:40
16:41 skids joined
RabidGravy "systemctl status cron" may help 16:41
16:45 synopsebot6 left 16:46 synopsebot6 joined
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_.
Skarsnik synopsebot6 restart a lot dang 16:47
There is two actually x)
moritz timotimo: I have no idea either 16:51
16:54 rindolf left 17:01 rburkholder left 17:09 adu joined 17:10 Ven left
Woodi www.freedesktop.org/software/syste...slice.html 17:10
...but this is not a direct explanation, I know :) 17:11
17:23 autarch1 joined
Juerd Meh, ~~ in regexes is NYI :( 17:23
17:25 sjoshi left, adu left 17:29 rburkholder joined
Juerd Oh well, instead of [foo] ~~ bar, I guess I can do (foo) <?{ $0 ~~ /bar/ }> 17:30
A bit uglier but it works
17:30 Ven joined 17:35 Ven left 17:36 salva left 17:42 firstdayonthejob left 17:43 firstdayonthejob joined 17:46 sjoshi joined 17:47 Actualeyes left 17:49 autarch left 18:01 vendethiel left 18:03 crime left 18:09 vendethiel joined 18:22 rindolf joined 18:28 FROGGS left 18:34 vendethiel left 18:35 firstdayonthejob left
MadcapJake anyone used HTTP::Server::Async? I'm getting «Unhandled exception: cannot close a closed socket» 18:36
18:37 cdg joined 18:38 firstdayonthejob joined
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
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
TreyHarris MadcapJake: interesting, what language(s) did you come from? 18:41
MadcapJake mostly JavaScript and Python 18:42
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:44
18:46 _mg_ joined
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:48
the 'cannot close' bug seems to happen if i send a bunch of requests in a row for the same file 18:52
mst Moo/Moose/perl6 OO feels a lot like Ruby's object model except without the training wheels and with the bike 18:54
(I have to write my own constructor when I already declared the attributes? really?) 18:55
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
I also had a tought time translating Ruby's ability to replace methods after instantiation
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' ?
MadcapJake yeah turns out modules can act just like classes in ruby
mst (that would certainly work in M* OO, though it's fairly strongly discouraged) 18:59
(we prefer 'make an anonymous class with the role already composed, then instantiate that')
MadcapJake yeah that sort of covers it, except in ruby you can instantiate a class, and then change that super
's methods and the instatiated class will automatically get those new methods
mst oh, you mean modify the *class* after the object's been instantiated
MadcapJake right 19:00
mst rather than modifying it just for the object?
MadcapJake yep, it's possible in ruby, only really came up in testing so it's not a huge deal
mst you can absolutely do that in M* OO, and I absolutely would not let it pass code review if you did ;)
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:02
19:02 cdg left
timotimo not quite. you just have to go through the HOW 19:03
MadcapJake that's what i mean by guarded :P 19:04
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
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:07
i.e., github.com/MadcapJake/Test-Lab/blo...#L125-L129 19:08
timotimo you can require a method to be implemented with a role, but i think that doesn't apply here
well, you can have a submethod "new" 19:09
mst er. so, there's two ways I tend to solve this under M*
timotimo that won't be derived to subclasses
ugexe yea, i use submethod new to do that
mst (1) screw this, I'll have a new_foo method instead (usually simplest but I think in this case might not work)
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
mst (2) have a basically empty class with a custom new method that returns something else
timotimo you can just inspect the exact type of self 19:10
MadcapJake timotimo, i'm currently checking self.WHICH.Str
timotimo that sounds terrible :)
MadcapJake lol
that way it's only the class and not some derived object
timotimo why not just self.WHAT eqv something
MadcapJake because i wanted to make sure it was only the class itself 19:11
timotimo yeah, but eqv does that, too
m: say Cool eqv Str
camelia rakudo-moar e401ee: OUTPUT«False␤»
timotimo m: say Cool ~~ Str
camelia rakudo-moar e401ee: OUTPUT«False␤»
timotimo er, wrong way around, of course
m: say Str ~~ Cool
camelia rakudo-moar e401ee: OUTPUT«True␤»
timotimo m: say Str eqv Cool
camelia rakudo-moar e401ee: OUTPUT«False␤»
timotimo there we go.
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
I didn't know that eqv would differentiate between class and derived objects
timotimo really, i think you should avoid WHICH because string comparison is more expensive than comparing pointers
19:13 alpha123 joined
alpha123 j #idris 19:13
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
timotimo if it inlines the WHICH method based on "known target", it'll actually completely constant-fold the if away
but it's still simpler to use WHAT
MadcapJake how is WHAT simpler than eqv? 19:15
timotimo you use WHAT with eqv, not instead of :)
MadcapJake oh :P
19:15 cdg joined 19:17 ryan__ joined 19:18 _dolmen_ left 19:20 nowan left 19:21 ryan__ left 19:22 nowan joined 19:23 maybekoo5 left 19:25 Skarsnik left
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:31 Khisanth left 19:33 rindolf left, pmurias joined, ocbtec joined
mst timotimo: I think we got messed about enough people got bored of trying 19:33
19:33 ocbtec left
pmurias MadcapJake: re Test::Lab/scientist .new method isn't that intended to be monkey patched? 19:33
19:34 ocbtec joined
MadcapJake pmurias, what do you mean? 19:34
timotimo mst: hm?
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:35
ugexe tons of projects were rejected last year 19:36
mst the selection process was changed and the new one was ... inscrutable
timotimo oh
19:36 rindolf joined
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
timotimo ugh, that really sucks
pmurias MadcapJake: in ruby the interface is to just monkey patch Scientist::Experiment
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?
mst it's *inscrutable* 19:38
timotimo it might as well be
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
I mean, I presume they do something other than roll percentile dice
MadcapJake pmurias, the intended effect is that if you just leave experiment-class alone, it will instantiate a Default subclass
mst but since they won't tell us what ...
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. design.perl6.org/S19.html links to nonexistant design.perl6.org/CompUnitRepo%3A%3A...AFile.html
who to inform of this malfunction?
moritz xiaomiao: open an issue on the perl6/specs repo
xiaomiao moritz: where's that? 19:41
timotimo xiaomiao: where do you find links there?
oh
i didn't read that right, sorry
pmurias MadcapJake: wouldn't just setting experiment-class to Test::Lab::Default and having the subclass use the default Perl6 new be better?
moritz timotimo: on github
sorry, meant xiaomiao
xiaomiao moritz: :( 19:42
MadcapJake pmurias, but if i use the default new then it won't utilize experiment-class
xiaomiao I only interact with it while paid, gotta have some sanity in life
moritz too bad
xiaomiao yar.
Hotkeys MOIN MOIN 19:43
xiaomiao oh well, at least you now know of the broken links
pmurias MadcapJake: why do we want to do that? 19:44
19:45 lichtkind joined
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:45
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:48
MadcapJake pmurias, sure! 19:50
pmurias (github search)--
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
pmurias, i updated the new method based on timotimo's advice: github.com/MadcapJake/Test-Lab/blo...#L125-L129 19:53
also, the experiment-class variable is only available to the Test::Lab module, not to the Test::Lab::Experiment class
pmurias if I type panda-test are the modules precompiled? 19:57
ugexe if they aren't already precompiled in lib/.precomp 19:58
rakudo will do it then
19:59 Khisanth joined
pmurias if I run 'perl6 t/x.t' with x.t being paste.debian.net/401757 20:03
where are the precompiled files supposed to be?
ugexe ah in that case i dont think so. let me clarify: they go to wherever the first -I points to 20:04
usually thats -Ilib, so lib/.precomp, but it doesnt have to be
directly using `use lib 'lib'` im not sure 20:06
20:07 mst left, mst joined
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
pmurias it makes for utterly horribly ugly stacktraces 20:11
ugexe true. but there is no better solution yet 20:12
MadcapJake pmurias, rt.perl.org/Ticket/Display.html?id=126908
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>
MadcapJake module-name/[submodule/]module-file.pm6 20:14
Hotkeys Just do it yo
People should get with the unicode times
MadcapJake e.g., Text::💩/Poop.pom6
ugexe again, module-name can contain characters the file system does not allow
20:15 sjoshi left
MadcapJake but all terminals support printing unicode 20:15
ugexe so you cannot just map a module name directly to the file system
MadcapJake i'm not saying *store* them as such, i'm saying print them normally
ugexe to what? a non existent "normal" name path?
MadcapJake have the stacktrace map to what the file and module path is, not the actual on-system path
Hotkeys m: "💩".uniname.say
camelia rakudo-moar e401ee: OUTPUT«PILE OF POO␤»
timotimo we ought to make the original filename visible, yeah 20:16
Hotkeys Just have Text::PILE-OF-POO
As the storage location
ugexe uh, what if someone has an actual Text::PILE-OF-POO
Hotkeys What if someone has any existing module?
MadcapJake all terminals can print unicode, there is no issue printing it out that way
as unicode
ugexe existing modules are fine because of authority/version 20:17
but you still have have to map stuff
MadcapJake e.g., in method render at Template::💩/Poop.pm line 140
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:18 ocbtec left
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:19
20:19 darutoko left
timotimo the thing is, the stack trace gives you the actual source file on the filesystem 20:20
20:20 hippie joined
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
pmurias can't we use symlinks on the unixy systems?
ugexe i mean show the sha1 path, but also the module name somewhere
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
20:21 hippie1 left
timotimo otherwise, a tool could be built to give the actual file path 20:21
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)
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
timotimo are those source file names stable across systems?
dalek kudo/nom: 8fdaada | lizmat++ | / (2 files):
Fix iterable.first(:end) on uncached iterators

  .elems determines number of elements on an iterator without caching.
Prefix + caches the iterator. The use of .elems caused:
   say "㊤".uniname.words.first(:end)
to fail. ZoffixW++ for spotting
20:24
ugexe they should be yes
timotimo i'm not sure what stuff goes into the hashsum's source
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
ugexe originally it used the full path but now it uses the relative path (in the sha1)
timotimo for example, does the meta info file go in?
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].
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)
Distribution.id is sha1(Module::Name:ver<>:auth<>:api<>) 20:26
sha1 is not applied to the contents of any file. only to attributes of a Distribution 20:29
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:32
20:37 kd` left 20:39 mattp__ left 20:40 jameslenz joined, CIAvash left 20:43 _mg_ left 20:48 Roamer` left 20:49 Roamer` joined 20:51 BenGoldberg joined
dalek ast: e1449d6 | lizmat++ | S32-temporal/Date.t:
Add some Date subclassing tests
20:52
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
Predictability is a nice side effect
dalek ast: edaa353 | lizmat++ | S32-temporal/DateTime.t:
Add some DateTime subclassing tests
20:57
20:57 yqt joined 21:00 advwp left
pmurias MadcapJake: see github.com/pmurias/Test-Lab for how I would change the API 21:04
isn't $Test::Lab::experiment-class more natural then Test::Lab::<$experiment-class>? 21:05
MadcapJake they're the same, i just haven't yet implemented packaged variables in perl6fe syntax highlighter :P 21:06
21:10 Ben_Goldberg joined 21:11 Ben_Goldberg left, BenGoldberg left
pmurias MadcapJake: have use seen my API change? 21:12
21:12 Ben_Goldberg joined
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:12
pmurias it's possible to that in Perl6 but it's considered really ugly 21:13
* to do
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
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
it seems an unneeded abstraction 21:15
pmurias I would also change the positional taking constructor to the default Perl 6 one
MadcapJake yeah i've been reading more and more perl6 code and was thinking that I wanted to change to a proper adverbial form
pmurias last commit in my fork does the change 21:16
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?
also would be cool to make the topical variable set to the experiment so you wouldn't even need the $e 21:19
pmurias not sure if we can get rid of the comma 21:20
MadcapJake like as in a for loop
pmurias we could create a slang but it seems serious overkill
21:21 kaare_ left
MadcapJake ok, how would i set the topic variable? 21:21
21:21 cdg_ joined
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:23
21:23 cdg left
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
pmurias playing around with a DSL-free lab 21:25
jnthn m: sub foo($a, &b) { b($a) }; foo 42, { .say };
camelia rakudo-moar 8fdaad: OUTPUT«42␤»
jnthn Setting $_ is just passing an arg to the block :)
moritz pmurias: is it also gluten free? :-) 21:27
MadcapJake jnthn, sweet! i'm already doing that lol 21:28
21:28 Ben_Goldberg left
MadcapJake ok, i really gotta go. real world social engagement ... lame! ;) 21:29
21:30 Ben_Goldberg joined, Ben_Goldberg left
pmurias MadcapJake: lab name=>"foo", try => {...}, try => {...}, use => {...}; 21:30
MadcapJake: we could replace the DSL with something like that 21:31
21:32 Ben_Goldberg joined
MadcapJake that would work great, but each try needs a name (if there is more than one), so how would you do that? 21:32
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
Hotkeys I think I may have convinced someone to try perl 6 21:34
go me
are there any good intros to the language yet?
moritz Hotkeys: perl6intro.com/ 21:35
DrForr Well, I know what I'm writing next )
lizmat Hotkeys: de.perl6intro.com if you prefer Deutsch
Hotkeys Nice
I prefer english but I like that the option is there :p 21:36
21:39 Gothmog joined, Gothmog is now known as Gothmog_
pmurias moritz: not sure ;), the &lab interfance will be maximally tasty 21:42
moritz :-) 21:44
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.
arnsholt Thesis milestone reached: Manuscript clocks in at 100 pages \o/ 21:46
That's including references and front matter and crap, so the actual text is only some 80-odd pages, but still =D 21:47
21:47 zpmorgan joined
pmurias arnsholt: a phd thesis? 21:47
lizmat arnsholt++ 21:48
Hotkeys <Jarcode> Hotkeys, yeah this is really interesting
<Jarcode> how's perl6 performance?
arnsholt Yeah. I'm hoping I'll be able to push the main text to something like 120 pages
Hotkeys I don't really know how to answer
what
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
pmurias Hotkeys: not where we want it but improving 21:49
21:50 _dolmen_ joined 21:53 Skarsnik joined 21:54 AlexDaniel joined 21:55 vendethiel joined
lizmat started working on implementing p5's pack/unpack in module space 21:57
dalek kudo-star-daily: 7cf4298 | coke++ | log/ (9 files):
today (automated commit)
22:01
22:02 Ben_Goldberg left
Juerd lizmat: That's great, because I have no idea how to approach implementing my design :) 22:02
lizmat: Worst case: I'll just translate things classic unpack/pack templates ;) 22:03
lizmat perhaps, we'll see
for one, I'm going to extract the template parsing code, so repeated calls wouldn't have to do that every time 22:04
feels a bit funny not being able to use nqp magic though :-)
22:06 BenGoldberg joined, rindolf left
AlexDaniel Juerd: oh you fixed it! Great! 22:07
arnsholt pmurias: And if you're contemplating a PhD, research is great fun, but writing the thesis is a sloooooog =) 22:09
AlexDaniel Juerd: meh, it is still kinda broken 22:11
Juerd AlexDaniel: Aw, damn
These daily challenges don't come with good test suites
AlexDaniel yup :(
Juerd: try this
--O-----
-X------
22:11 ely-se joined
AlexDaniel Juerd: it wont find a solution 22:11
O's turn 22:12
dalek kudo/repo_v1: 9c0f96f | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Turn short-name lookup files into directories

This may become part of CompUnit::Repository::Installation format v1. Having to change any already existing files on installation of a module makes it more difficult to package modules for Linux distributions. So we replace the short-name lookup files in a repo's short/ directory by directories.
The files there are named after the dist's hash and contain the version, auth and api fields so we can find the one true candidate without having to parse any JSON at all. Only the winner dist's JSON will even be read.
As version, auth and api are separated by newlines without any escaping, those values themselves may no longer contain newlines. This should be a very reasonable restriction in any case.
AlexDaniel Juerd: but yeah, it seems like the \n issue is solved
nine Comments on ^^^ appreciated. Both regarding the repo format change and the way upgrades to the repo format are handled. 22:13
22:14 cfedde left, yurivish_ joined
AlexDaniel Juerd: yeah, it loos like you have to use 「*」 somewhere instead of 「+」 22:15
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
22:16 Vitrifur joined
AlexDaniel rudi_s: ooooh… 22:16
jnthn rudi_s: The things that are undecodable are represented as synthetic codepoints.
22:17 zpmorgan left
jnthn So round-trip so far as the OS goes. 22:17
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?
jnthn rudi_s: Yes, we don't decode env vars, filesystem entries, etc. using a UTF-8 decoder, but rather UTF-8-C8
AlexDaniel: Tough luck, at the moment. That's on the todo list.
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
Will try and deal with it before the next major lang version though.
22:19 vendethiel left
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
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
Juerd: what I know is that the whole left edge is broken
Juerd AlexDaniel: Not implying. Hoping.
AlexDaniel: Hmmm
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
Juerd AlexDaniel: Not broken for horizontal
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.
AlexDaniel Juerd: it is also broken for the right edge too
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)?
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.
Jarcode looking to use a new language closely with native code
jnthn rudi_s: github.com/MoarVM/MoarVM/blob/mast...f8_c8.c#L3
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?
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
rudi_s: But if your issue is that you have filenames in, say, latin-1, or whatever other encoding, it should roundtrip the bytes
Skarsnik Jarcode, not sure to understand your question
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:24
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
rudi_s jnthn: Sure. I was just worried about file names. 22:26
AlexDaniel just realized I have no ↖↗↘↙ arrows on my keyboard… meh
DrForr Jarcode: There are plenty of language bindings already, look at the Inline:: namespace on modules.perl6.org.
mst people seem to be really enjoying the native call stuff
AlexDaniel mst: YES!!!
Jarcode DrForr, I know they exist, asking about performance in particular
22:26 cfedde joined
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)
jnthn Jarcode: Call performance isn't too great yet.
AlexDaniel Skarsnik: huh? What about callbacks? 22:27
Jarcode jnthn, thanks, that's what I wanted to know
Skarsnik Yes, but you can't expose like object/function like if you embeded Lua for example
AlexDaniel ah yes, sure.
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
was curious
lizmat Jarcode: I believe there;s an Inline::Lua in the ecosystem, perhaps you *can* have the best of both worlds ?
lizmat hasn't looked at it erself
*herself
Jarcode that would be calling into Lua to call into C
which... would be even more overhead :P
lizmat ah, ok :-) 22:29
Jarcode (the point being, jumping into native functions and out very frequently where the call overhead is very relevant)
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. :)
Jarcode: But right now, if you're making lots of small calls, yeah, you'll probably bottleneck on it, tbh.
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.
Jarcode jnthn, thanks. I'll keep an eye on the language.
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:30
22:31 cdg_ left
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 Zero_Dogg left
Juerd AlexDaniel: Needed an extra \s* 22:31
22:32 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined
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)
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:33
(.. 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:34
jnthn Skarsnik: No idea; I'm the wrong person to ask about C++ things. :) 22:35
22:35 zpmorgan joined
Skarsnik It's a question I had when thinking of adding C++ support in gptrixie. it will probably be not that useful 22:36
Everything using a stl type will not work x)
22:38 vendethiel joined
skids gist.github.com/skids/7f3e8613857a9f6ca9da # who was it that was asking for an inverted "when" statement? 22:38
AlexDaniel me 22:39
Hotkeys this is dark magic skids
mst MadcapJake: heh, @PerlDaily just plagiarised your Test::Lab tweet 22:40
skids is but an acolyte
(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?
skids let me find one
jnthn terminator is protoregex, iirc 22:42
The word never doesn't really read right for that...
skids in eat_terminator is one
AlexDaniel Juerd: found another bug… 22:43
skids (That might be the only one)
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
Juerd: hold on I'll try to isolate it…
O------- 22:45
-X------
Juerd: put this in the middle of the field
jnthn skids: Ah, yeah, I see it. 22:46
Hm, it's surprisingly hard to find an "inverse" of when. "absent" is the best I came up with so far. 22:47
22:48 Ben_Goldberg joined, cpage_ joined
Hotkeys nwhen 22:48
AlexDaniel
.oO( newh )
.oO( nehw ? )
Hotkeys I'd say 'unless' but we already use that 22:49
22:50 BenGoldberg left
Hotkeys what about lest 22:51
nah not quite
skids break open the unabridged thesaurus :-) 22:52
22:52 jscripter joined, _dolmen_ left, jscripter left
skids There hath got to be-eth something. 22:52
geekosaur lacking?
Hotkeys nisi
geekosaur (...not real fond of, actually)
Hotkeys en.wiktionary.org/wiki/nisi
It's latin but who cares 22:53
jnthn :) 22:55
jnthn goes to try and sleep away his cold-y thing...
'night o/
Hotkeys night
lizmat night, jnthn 22:57
22:57 BenGoldberg_ joined 22:59 yurivish_ left 23:00 vendethiel left, Ben_Goldberg left, spider-mario left 23:01 zpmorgan left 23:02 Skarsnik left 23:03 TEttinger joined, hippie1 joined 23:05 hippie left, alpha123 left 23:07 kid51 left 23:09 sdh joined
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:13
23:15 pmurias left 23:16 RabidGravy left 23:17 alpha123 joined 23:20 wamba left
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:20
23:38 zpmorgan joined
timotimo we don't have anything that does that yet, sdh 23:42
23:43 yqt left 23:44 molaf_ left
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:45
23:46 yqt joined
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:47
AlexDaniel Juerd: I mean this: gist.github.com/AlexDaniel/7c78cefa3a96707c39e5 23:48
Juerd: not enough time for a proper test suite though, sorry :)
Juerd AlexDaniel: This works too 23:49
AlexDaniel Juerd: I've attached the result
Juerd AlexDaniel: Fixed with token cellws($n) { ( [ \n? <cell> \n? ]**{$n} ) <?{ $0.comb("\n") == 1 }> } 23:50
AlexDaniel Juerd: found another bug 23:54
ah, it actually the same one, I guess
Juerd AlexDaniel: Test with the new code please :) 23:55
AlexDaniel it is with the new code
Juerd gist? 23:56
AlexDaniel Juerd: gist.github.com/AlexDaniel/e3575a78ee8614da336b
Juerd token cellws($n) { ( [ \n? <cell> ]**{$n} ) <?{ $0.comb("\n") == 1 }> } 23:59