»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
raydiak J-L: : so instead of $b ~= chr(66) you'll want $b[+*] = 66, or $b ~= Blob.new(66), (Blob is just immutable Buf) or if you're really intent on looking at bytes as characters, you could do $b ~= chr(66).decode 00:02
jercos m: say chr(0x2603).encode 00:03
camelia rakudo-moar 1b74e4: OUTPUT«utf8:0x<e2 98 83>␤»
jercos ;)
00:03 integral left
raydiak erm, right, encode not decode...I do that a lot 00:04
and jercos++ for demonstrating why you *shouldn't* :)
jercos I probably wouldn't have noticed that at all if not for my own habits of making the same mistake :) 00:05
I suppose the question of if you *should* do that comes down to what you want to happen when something non-ASCII shows up...
I uh, believe...
m: say chr(0xAA).encode
camelia rakudo-moar 1b74e4: OUTPUT«utf8:0x<c2 aa>␤»
retupmoca m: say chr(0xAA).encode('latin-1') 00:06
camelia rakudo-moar 1b74e4: OUTPUT«Blob[uint8]:0x<aa>␤»
jercos m: say chr(0xF7).encode('latin-1')
camelia rakudo-moar 1b74e4: OUTPUT«Blob[uint8]:0x<f7>␤»
raydiak J-L: so, the point of treating binary as binary instead of strings, is that you don't get ^^^^^^ all that kinda stuff 00:08
jercos m: say chr(0xBA).encode('latin-1')
camelia rakudo-moar 1b74e4: OUTPUT«Blob[uint8]:0x<ba>␤»
TimToady you are supposed to be able to mixed string/buf ops as long as you limit yourself to ASCII, but we're not there yet
00:09 donaldh left
TimToady "abc" should know that it is allomorphically both a Str and an ascii blob 00:09
japhb .ask jnthn I've got a user of one of my very-concurrent r-j apps who is getting the "Unhandled exception in code scheduled on thread" error from src/core/Scheduler.pm. How should I be starting my threads so that I can arrange to last-chance catch the exception?
yoleaux japhb: I'll pass your message to jnthn.
timotimo hmm 00:10
in the start { ... } you could have a CATCH?
but then there's a catch :P
japhb timotimo: That was going to be my fallback technique if there was no better option
timotimo mhm 00:11
hm, there's no catch thingie you cna put in?
J-L How do I encode a Str to Buf as just straight raw bytes? And vice-versa? (How do decode a Buf to Str as just straight bytes?)
I tried using :raw, but I found anything works.
raydiak J-L: why are you intent on putting Str into this workflow? 00:12
japhb timotimo: Some of my 'start { }' expressions are in modules, and some are in the mainline. If I end up having to add catch blocks all over, I would have to figure out some generic way for them to handle the error that will work for *all* of my concurrent programs, and integrate with whatever I do in each mainline.
timotimo in the scheduler there's an &.uncaught_handler 00:13
(is rw)
japhb But if there's some standard way to pass along a handler function, I can probably do that
Hmmm, just replace that is what you're suggesting?
jercos CATCH { when 22 { say "Damned if you do..."; } }
J-L I'm used to reading in complicated binary files as one long string in Perl5, then picking apart that string and reporting what the data means. (I do it often, despite the fact that I've been told you can't do that in Perl.) However, I'm having trouble doing that in Perl6 with the differences between Str and Buf.
raydiak japhb: long story short, 'latin-1' encoding likely does what you're asking for, but what you're asking for is *not* what you want in P6 00:14
s/japhb/J-L/ :)
japhb
.oO( Oh no! I'm changing! )
retupmoca J-L: you probably just want to read in the complicated binary file as one large Buf
J-L In this script that I'm porting from p5 to p6, I'm composing one large string of binary data, then writing out to file. 00:15
raydiak J-L: b/c in P6 you can read, manipulate, and write, entirely on the level of bytes and numbers, no Str nor chr nor ord anywhere to be found unless you really *want* that
J-L raydiak: Is there any sample code that does that? My former p5 knowledge doesn't seem to translate very well. 00:16
raydiak J-L: just read in the whole thing with :bin so it gives you a buf instead of str, manipulate it like an array, and pass the buf back when writing
m: ~«".".IO.dir 00:21
camelia ( no output )
raydiak m: say ~«".".IO.dir
camelia rakudo-moar 1b74e4: OUTPUT«nqp-js rakudo-inst-2 ugexe-was-here evalbot test .viminfo rakudo-inst-1 rakudo-star-2015.01 .bashrc .ssh std mbox niecza p2 rakudo-star-2014.12.tar.gz .cpanm rakudo-inst bin rakudo2 rakudo-star-2015.02 perl5 rakudo-star-2014.12 p1 .local .perlbrew rakudo1 …»
raydiak m: say ~«".".IO.dir.grep: *.f
camelia rakudo-moar 1b74e4: OUTPUT«test .viminfo .bashrc mbox rakudo-star-2014.12.tar.gz rakudo-star-2015.01.tar.gz .bash_history rakudo-star-2015.02.tar.gz evalbot.log␤»
raydiak m: my $b = "test".IO.slurp: :bin; say $b[^5]; $b[2] = 0; say $b[^5]; # could write or spurt or whatever here, just using the $b directly 00:23
camelia rakudo-moar 1b74e4: OUTPUT«␤0 0 0␤»
J-L I'd like to look into that, Right now I gotta go, so I'll log off. Thanks for all your help, everyone!
raydiak you're welcome! later J-L
m: my $b = "test".IO.slurp: :bin; say $b[^5]; $b[2] = 123; say $b[^5];
camelia rakudo-moar 1b74e4: OUTPUT«␤0 0 123␤»
J-L Wait... what does the ^ in $b[^5] do?
raydiak it's a range constructor
in this case it means 0..4 00:24
aka 0..^5
J-L How would writing out a Buf work?
raydiak same way you write anything 00:25
e.g. spurt "filename", $b
J-L Is $b a Buf, though, or is it a Str?
raydiak it's a Buf
timotimo why can you slurp and IO? camelia is supposed to use the restricted setting ... 00:26
raydiak timotimo: maybe it's read-only? idk
nativecall works too, which could be bad to worse
timotimo hum
raydiak m: spurt "baz", Buf.new(^8) 00:27
camelia rakudo-moar 1b74e4: OUTPUT«spurt is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in sub spurt at src/RESTRICTED.setting:17␤ in block <unit> at /tmp/6vKKzweQvu:1␤␤»
J-L Okay, now I'm off for reals. ;) Again, thanks for all the help!
timotimo bye J-L
raydiak \o J-L 00:28
00:28 J-L left
japhb m: sub uncaught_handler($exception) { say "Oops!" }; PROCESS::<$SCHEDULER> = ThreadPoolScheduler.new(:&uncaught_handler); say $*SCHEDULER.uncaught_handler.defined; 00:40
camelia rakudo-moar 1b74e4: OUTPUT«False␤»
japhb Wait, what? ^^^
timotimo i believe $*SCHEDULER gets initialized with PROCESS::<$SCHEDULER> 00:41
but if it's already created (maybe?) it wouldn't carry over
japhb It should *be* PROCESS::<$SCHEDULER>.
timotimo you can just $*SCHEDULER.uncaught_handler = ...
japhb Here, I can prove it:
m: sub uncaught_handler($exception) { say "Oops!" }; PROCESS::<$SCHEDULER> = ThreadPoolScheduler.new(:&uncaught_handler, :max_threads(42)); say $*SCHEDULER.uncaught_handler.defined; say $*SCHEDULER.max_threads; 00:42
camelia rakudo-moar 1b74e4: OUTPUT«False␤42␤»
japhb m: sub uncaught_handler($exception) { say "Oops!" }; say ThreadPoolScheduler.new(:&uncaught_handler).uncaught_handler.defined; 00:44
camelia rakudo-moar 1b74e4: OUTPUT«False␤»
japhb m: sub uncaught_handler($exception) { say "Oops!" }; say Scheduler.new(:&uncaught_handler).uncaught_handler.defined;
camelia rakudo-moar 1b74e4: OUTPUT«Method 'cue' must be implemented by Scheduler because it is required by a role␤ in any compose_method_table at src/gen/m-Metamodel.nqp:2585␤ in any apply at src/gen/m-Metamodel.nqp:2595␤ in any compose at src/gen/m-Metamodel.nqp:2743␤ in any ma…»
japhb m: sub uncaught_handler($exception) { say "Oops!" }; class MyScheduler does Scheduler { method cue { say "Cued." }; method loads { 0 } }; say MyScheduler.new(:&uncaught_handler).uncaught_handler.defined; 00:45
camelia rakudo-moar 1b74e4: OUTPUT«True␤»
japhb m: sub uncaught_handler($exception) { say "Oops!" }; class MyScheduler does Scheduler { method cue { say "Cued." }; method loads { 0 }; submethod BUILD() { } }; say MyScheduler.new(:&uncaught_handler).uncaught_handler.defined;
camelia rakudo-moar 1b74e4: OUTPUT«False␤»
japhb Ah-ha!
m: sub uncaught_handler($exception) { say "Oops!" }; class MyScheduler is Scheduler { method cue { say "Cued." }; method loads { 0 }; submethod BUILD() { } }; say MyScheduler.new(:&uncaught_handler).uncaught_handler.defined; 00:46
camelia rakudo-moar 1b74e4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4uhSJpjv89␤Method 'cue' must be implemented by Scheduler because it is required by a role␤at /tmp/4uhSJpjv89:1␤------> ␤»
japhb OK, so no workaround there.
But it's clearly the BUILD that's breaking it, though *why* I can't tell.
00:46 eli-se left
timotimo hmm 00:54
it has a custom BUILD, so perhaps it's not inheriting one from the role Scheduler that's mixed in?
raydiak it is the empty BUILD 00:55
timotimo so the BUILDALLPLAN should just put its &uncaught_handler in there? 00:56
00:56 laouji joined
timotimo well, i gotta go see my bed from aclose 00:56
raydiak g'night timotimo
01:00 laouji left
japhb I would think it a rather bad thing if a class containing a BUILD fails to initialize attributes declared in roles it composes, but that seems to be what happens here. :-( 01:00
raydiak japhb: remember if you define a BUILD, it disables all the default constructor argument processing...which is usually not usually a problem for your parents, because BUILDALL calls all of them in the inheritance chain...but it's a role, there is no inheritance chain...the empty BUILD in MyScheduler (which only inherits from Any and Mu) fails to initialize any of the attributes it composed into itself from 01:01
Schedular
iow a class can only have one BUILD *after* composition
01:02 skids left
japhb raydiak: I'm not arguing the current reality. I'm saying that submethods, by their very nature, should be independent in roles as well as classes. (They shouldn't be handled like methods, where the class method masks the role method, but rather role submethods should be essentially transparent to composing classes.) 01:05
01:05 skids joined
skids m: for qw(Bab Babb Babby Bbbbb) { $_ ~~ / <?before Bab <?!before <[ a b ]> > > || B <[ a b ]>* <?!after b> /; $/.gist.say } 01:06
camelia rakudo-moar 1b74e4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/64_n7U_zCx␤Undeclared names:␤ Bab used at line 1. Did you mean 'Bag'?␤ Babb used at line 1␤ Babby used at line 1␤ Bbbbb used at line 1␤Undeclared routine:␤ qw used at line 1␤␤»
japhb skids: < >, not qw()
skids m: for <Bab Babb Babby Bbbbb> { $_ ~~ / <?before Bab <?!before <[ a b ]> > > || B <[ a b ]>* <?!after b> /; $/.gist.say }
camelia rakudo-moar 1b74e4: OUTPUT«「Ba」␤「Ba」␤「Ba」␤「B」␤»
raydiak japhb: I'd like that too, in some form...I was more answering the "though *why* I can't tell" 01:07
japhb Oh, I was in a philosophical way (why does it work this way?), not literally (what is going on?) 01:09
I can't English, sheesh.
raydiak ah, got it :)
as to how it *should* work precisely...not sure...I mean, how it works now if I understand, all the methods are copied into the class at compose time, far before any object's construction 01:10
geekosaur (is that like "...in a family way"? :p ) 01:11
japhb Right. I just think submethods should work more like chaining them or doing them in series, rather than just overwrite. 01:12
geekosaur: :-)
.oO( Pregnant with conception )
01:14 laouji joined
raydiak so I guess we could just walk the roles as well as the classes when calling BUILDs but isn't that kinda a bastardization of the idea of composition? 01:15
01:15 spider-mario left
japhb submethods are kindof a bastardization (or special case, if you prefer) already .... 01:16
raydiak true, but it's by *limiting* them...*extending* roles to have ref-like semantics instead of just copying...idk, seems like it'd run into far more serious issues 01:17
though I'm not familiar enough with those internals to really have much intelligent to say about the implementation, I'm more trying to goad smarter people into joining the conversation :) 01:18
unfortunately, I gotta run for now... o/ 01:19
01:20 bayprogrammer joined
ab5tract ciao raydiak 01:21
01:26 bayprogrammer left, ruoso joined 01:33 bayprogrammer joined
skids github.com/skids/perl6sum/blob/mas...HA.pm6#L97 Shows how to work around the role+BUILD limitations in a whacky hacky way, until some spec fairy comes andresolves them. 01:33
japhb skids: OH GOD THE HACK 01:36
skids Yeah.
Also my hacks around the crony problem are pretty ugly. 01:37
I would so like them to go away.
japhb crony problem? 01:38
skids When you diamond-compose a role, it's methods conflict with itself. 01:39
japhb ewww
skids github.com/skids/perl6sum/blob/mas...m.pm6#L578 ...which results in an even uglier set of hacks 01:42
b2gills m: say FatRat.new(1,3).base-repeating(10) 01:43
camelia rakudo-moar 1b74e4: OUTPUT«0. ???␤»
japhb m: await start { die "foo" } # If this isn't an uncaught exception in a thread, what is? 01:46
camelia rakudo-moar 1b74e4: OUTPUT«===SORRY!===␤foo␤»
japhb The problem now is that I can't figure out what circumstances may have brought on the uncaught exception in the first place, nor how to test that my installed uncaught_handler actually does anything. 01:48
01:49 laouji left 01:50 molaf left
japhb decides to work on something completely different, then gets stuck trying to decide which task to pull off the giant pile 01:51
01:51 coffee` left 01:57 laouji joined 02:07 ostomachion joined
raydiak is extending Inline::Lua to repsect metatables wrt being able to call non-functions, index into non-tables, etc 02:08
tempted to eventually write a class which respects *all* the metatable stuff, like overloading math and comparison ops 02:09
02:10 ostomachion left
raydiak is thankful that the diamond composition thing came up right before he ran into the same issue 02:14
02:20 Osto joined 02:21 Osto left, laouji left 02:32 kaare__ joined 02:33 kaare_ left 02:57 raiph left 03:05 bayprogrammer left
raydiak did not realize that invoke is another magical name we've taken, to back postcircumfix:<( )> 03:06
raydiak is having difficulties with all these method names you have to expose for rakudo to treat your objects in certain ways, and still provide a user-oriented interface which has it's own set of short well-named methods 03:09
I guess that's what you get when you want an object to act like a hash, array, object, and sub, simultaneously 03:10
not to mention wanting to expose all of the methods on the object it's actually wrapping, if any 03:11
sorta wish there was a way to expose one API to rakudo's internals, and another to the rest of the world, or something...like a namespace of sorts, but for methods 03:12
though I guess we cuold just do it with obnoxious method names if we wanted...like "method RAKUDO-at_pos" 03:13
03:18 Patterner joined 03:21 yeahnoob joined 03:22 laouji joined 03:23 Psyche^ left 03:24 yeahnoob left 03:26 laouji left 03:28 laouji joined, kaare__ left 03:29 noganex_ joined 03:32 noganex left 03:34 kaare__ joined 03:37 raiph joined 03:42 laouji left
raydiak dunno if anyone is around, but...need 2 words for Inline::Lua's public API, 1 for calling a method and the other for calling a function; if "invoke" is one of them, it must go to the function...but calling a method with "call" and a function with "invoke" has the opposite english connotation at least to me 03:45
also would like to avoid just plain nouns like "method" and "function" as method names unless it's a getter, which this isn't (at least not necessarily) 03:46
could use .dispatch for a method call I guess
assuming that doesn't have internal rakudo magicalness too :P 03:47
03:51 FROGGS[mobile] left 04:00 laouji joined 04:03 Sqirrel left
raydiak heh just called inline::lua -> rakudo -> nqp -> moar -> nativecall -> luajit -> ffi -> printf :) 04:18
and with that, I'll stop talking to myself in public again... 04:19
04:39 MilkmanDan left, MilkmanDan joined, MilkmanDan left, MilkmanDan joined 04:49 aborazmeh joined, aborazmeh left, aborazmeh joined 05:13 rhr left 05:14 rhr joined 05:15 laouji left 05:22 lsm01 left
Mouq m: say Cool.^methods(:all)».name.grep(/dispatch/) # raydiak :P 05:28
camelia rakudo-moar 1b74e4: OUTPUT«dispatch:<var> dispatch:<::> dispatch:<!> dispatch:<.^> dispatch:<.=> dispatch:<.?> dispatch:<.+> dispatch:<.*> dispatch:<hyper>␤»
Mouq I think there was a motion by TimToady++ to have at_pos/at_key/invoke et al. become AT_POS/AT_KEY/INVOKE ET AL. 05:29
I kind of feel that we should have a general get_pos/get_key method that covers all of {at,assign,bind}_pos/_key… although that effect can be accomplished (AFAIK) by adding a multi postcircumfix:<[ ]>(MyClass $, Int $pos, \assignee?, *%keys) 05:33
05:34 lsm01 joined
Mouq Also, I really like the "method @.[@pos] { }", "method &.(|call) { }", "method %.{$key} { }" sugar we had planned before the subifying of the various postcircumfixes… perhaps they could either be reimplemented as sugars for subs or implemented as sugars for invoke and *_pos/key 05:36
m: class Don'tUseThisYet { method &.(|args) { say args.perl } }; Don'tUseThisYet(15, "foo"); say Don'tUseThisYet.^methods 05:38
camelia rakudo-moar 1b74e4: OUTPUT«Capture.new(list => (15, "foo",))␤postcircumfix:<( )>␤»
Mouq We really need to deprecate postcircumfix:<( )>
I wasn't really sure how 05:39
raydiak oh please PLEASE all-caps the rakudo-facing methods! :P maybe with the lowercase ones pointing to the uppercase ones unless you override them 05:48
and thanks Mouq++, you mentioned a few things I didn't know
I remembered there was another syntax for it, but couldn't find it in the design docs
but I don't think a "dispatch" sub conflitcs with the dispatch syntactic category, does it? 05:49
s/sub/method/
but yeah supporting array, hash, function, object, all on one class is leaving me with fewer and fewer method names to the point where I allow a couple ways just around that problem 05:51
and am planning another one in the form of a slang or something similar 05:53
05:55 davido_ joined 05:56 davido___ left, aborazmeh left
raydiak maybe just export a special postfix for lua method call 05:56
06:01 davido__ joined 06:06 Ben_Goldberg left
Mouq raydiak: Nah, dispatch on it's own should be fine. dispatch and dispatch:foo are different names 06:07
m: sub infix($, $) { say "ok" }; infix 1, 2 06:08
camelia rakudo-moar 1b74e4: OUTPUT«ok␤»
raydiak good cuz I already pushed :) seemed to pass the few tests, so... 06:09
Mouq is happily surprised that doesn't wrongly blow up
raydiak postfix:<£> would be neat for a lua method call 06:10
06:10 gfldex joined
raydiak or...infix? or...maybe I do need a slang to do that 06:11
anyway, I don't know so much about those things, so that can wait until it's more functionally complete 06:12
06:14 davido_ left 06:15 laouji joined 06:17 robinsmidsrod left 06:19 mr-fooba_ joined, laouji left 06:21 mr-foobar left, robinsmidsrod joined 06:30 krish_ joined 06:32 krish_ left, robinsmidsrod left 06:44 aborazmeh joined, aborazmeh left, aborazmeh joined 06:51 wicope joined 06:52 mr-fooba_ left 06:57 telex left 06:58 robinsmidsrod joined, telex joined 07:00 rindolf joined 07:07 xfix joined 07:16 laouji joined 07:21 laouji left 07:23 raiph left
moritz \o 07:27
.tell azawawi your modules ncurses and net-curl declare a dependency on NativeCall, but that is now shipped with rakudo. Please remove it from the deps 07:28
yoleaux moritz: I'll pass your message to azawawi.
moritz .tell dagurval your module perl6-gd-raw declares a dependency on NativeCall, but that is now shipped with rakudo. Please remove it from the deps 07:29
yoleaux moritz: I'll pass your message to dagurval.
moritz .tell grondiulu your module openssl declares a dependency on NativeCall, but that is now shipped with rakudo. Please remove it from the deps
yoleaux moritz: I'll pass your message to grondiulu.
07:38 Ven joined 07:43 aborazmeh left 08:00 integral joined
raydiak morning moritz 08:02
08:04 prime left 08:10 prime joined, prime left, prime joined 08:13 isBEKaml joined 08:14 darutoko joined 08:15 pmurias joined
pmurias re dependency on NativeCall wouldn't it have been better if we just made panda recognize rakudo ships NativeCall instead of removing it as a dependency? 08:15
it's propably too late for that
(keeping the dependency) 08:16
raydiak is there a way to get a list of modules which the running rakudo provides internally? 08:20
it probably is too late for NativeCall, but there's no reason to think we won't have other module move in or even out of core over the years 08:22
*modules
08:25 Cpiral joined 08:26 Cpiral left 08:27 Sqirrel joined 08:28 Rounin joined 08:36 Cpiral joined
pmurias we should try to make coreness easily reversable 08:38
Cpiral :ju 08:40
08:41 Cpiral left
pmurias vim? 08:41
08:43 MadcapJake left
raydiak m: say @*INC[0].candidates: "NativeCall" # a check along these lines in panda? 08:49
camelia rakudo-moar 1b74e4: OUTPUT«NativeCall:/home/camelia/rakudo-inst-1/languages/perl6/lib/NativeCall.pm␤»
08:50 isBEKaml left
raydiak g'night #perl6 09:00
09:00 Woodi joined 09:05 laouji joined 09:10 laouji left
nine_ .tell PerlJam muraiki's segfault was caused by PERLINC pointing to modules for a different perl version. I guess your case is different? 09:17
yoleaux nine_: I'll pass your message to PerlJam.
09:18 coffee` joined 09:27 virtualsue joined 09:47 laouji joined 09:53 virtualsue left 09:55 diana_olhovik_ joined 09:59 eli-se joined 10:04 espadrine joined
eli-se hi 10:09
10:10 espadrine left, espadrine_ joined 10:12 virtualsue joined
timotimo o/ 10:12
10:13 [Sno] left 10:16 virtualsue left 10:18 [Sno] joined
[Tux] nine_, need further help or info? 10:21
on Inline::Perl5 with Text::CSV_XS that is
masak antenoon, #perl6 10:26
10:30 Ven left 10:33 perl6_newbee joined
jnthn o/ 10:38
yoleaux 00:09Z <japhb> jnthn: I've got a user of one of my very-concurrent r-j apps who is getting the "Unhandled exception in code scheduled on thread" error from src/core/Scheduler.pm. How should I be starting my threads so that I can arrange to last-chance catch the exception?
jnthn .tell japhb $*SCHEDULER.uncaught_handler = -> $ex { #`( do something ) } 10:39
yoleaux jnthn: I'll pass your message to japhb.
timotimo i tried to tell him that, but there's another problem ... 10:40
10:42 rurban joined 10:58 virtualsue joined 11:08 diana_olhovik_ left 11:10 spider-mario joined 11:21 Ven joined 11:25 Ven left
dalek kudo/nom: b497d41 | lizmat++ | src/Perl6/Actions.nqp:
Unbreak build on JVM

Apparently, you cannot nqp::bool a null on JVM
11:28
jnthn lizmat++ 11:29
11:29 amaliapomian joined
lizmat .tell donaldh seems like I fixed the JVM build 11:31
yoleaux lizmat: I'll pass your message to donaldh.
11:44 kjs_ joined 11:46 Ven joined 11:51 aborazmeh joined, aborazmeh left, aborazmeh joined 11:52 prime left 11:55 cognominal joined 11:56 aborazmeh left, anaeem1 joined 11:57 sqirrel_ joined 12:01 virtualsue left 12:02 aborazmeh joined, aborazmeh left, aborazmeh joined 12:06 eli-se left 12:07 aborazmeh left 12:13 FROGGS joined
FROGGS o/ 12:15
12:15 kjs_ left 12:25 Ugator joined 12:28 anaeem1 left
Ugator Hi perl6 12:30
I try to build perl6 on an IBM-system. I downloaded everything via «git clone git://github.com/rakudo/rakudo.git» then I tried «perl Configure.pl --gen-moar --backends=moar» but it says:
ATTENTION: no --prefix supplied, building and installing to /pf/b/b380272/perl6/rakudo/install
sh: /pf/b/b380272/perl6/rakudo/install/bin/nqp-m: not found.
Initialized empty Git repository in /pf/b/b380272/perl6/rakudo/nqp/.git/
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing github.com/perl6/nqp.git/info/refs
fatal: HTTP request failed
Command failed (status 32768): git clone github.com/perl6/nqp.git nqp
any pointers?
timotimo you can "git clone git://github.com/perl6/nqp.git" and also "git clone git://github.com/moarvm/moarvm.git" 12:32
Ugator so I create a .../rakudo/nqp and try "git clone git://github.com/perl6/nqp.git"? 12:34
12:34 anaeem1 joined
moritz Ugator: git clone will create the nqp/ dir for you 12:34
Ugator ah ok :) Ill try that
12:35 cognominal left 12:49 anaeem1 left 12:50 anaeem1 joined, eli-se joined
eli-se hi 12:53
12:55 eli-se left 13:01 diana_olhovik_ joined 13:02 sqirrel_ left
Ugator somehow the configured git-commands wont work here :( I try to build moarvm and it fails: 13:03
Updating submodules .................................... FAIL
git error: error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing github.com/MoarVM/dynasm.git/info/refs
fatal: HTTP request failed
Initialized empty Git repository in /pf/b/b380272/perl6/rakudo/moarvm/3rdparty/dynasm/.git/
Clone of 'github.com/MoarVM/dynasm.git' into submodule path '3rdparty/dynasm' failed
git has version 1.6.4 here, is that too old maybe? when I try to access with my browser github...dynasm.git I get a deprecated warning :/
so is there an offline version of perl6? 13:04
moritz Ugator: you can download the rakudo star tarball
Ugator okay... I'll try that 13:05
moritz just a sec
rakudo.org/downloads/star/
Ugator thanks (-: 13:07
13:14 anaeem1 left
skids Possible alternative idea for role BUILD problem: instead of keeping/calling all submethods a) don't allow identical proto submethods to conflict so roles can force other submethods to multis and b) call all multi candidates of submethod BUILD in some composition-defined order. Then roles just define 'multi submethod build'. 13:20
*BUILD 13:21
timotimo are submodules really supposed to be mixed into classes when roles apply to them? 13:23
masak waitwait
skids submodules?
masak "submodules" is a Git thing.
13:24 eli-se joined
moritz submethods 13:24
masak oh phew
timotimo submethods, yes
masak so a submethod from a role?
yes, I think so.
since even private attrs mix in. why not submethods.
skids trawls synopsis.
timotimo mhm
ok, so how do submethods handle conflicting definitions 13:25
masak onlys collide immediately.
jnthn Same rules as normal methods at present.
masak multis may or may not collide at runtime.
skids Yeah it's raosted as such.
jnthn The only thing being a submethod gets you really is differnet dispatch rules.
masak more philosophically, submethods say that they don't participate in inheritance. but that's OK, because roles work by composition. 13:26
jnthn Nicely put 13:27
masak drops mic
jnthn The thing is that some common uses of submethods lead to struggles with composition.
13:29 rurban left
skids maybe a generic "stackmethod" contruct that is specced to stack up in a chain/tree on both roles and classes? 13:31
masak I'd be wary of introducing any such layering wrt roles.
cf Ovid's comments on role commutativity and associativity.
introducing layering would be counter to that. 13:32
skids Yeah run anything by Ovid first for sure.
Maybe ask Ovid what to do :-)
masak well, except that this idea is obviously diametrically opposed to what he's suggesting
skids He might have a nice out-of-the-box opinion on how to solve the problem then :-) 13:34
colomon kind of lost track of the debate (sorry) but still worries that Ovid is very far off from p6 O-O 13:37
skids Well, he's obviously got some experience with big-codebase-maintainability so it's good to draw on experience. 13:41
masak I'm not so sure of that. his concerns had less to do with "how we do it here in Perl 6" and more to do with what causes real-life headaches in development due to big effects from small changes.
13:41 amaliapomian left
masak notable small changes that *one doesn't expect should change the program*. 13:41
like changing the order of imports.
well, hrm. changing the order of imports in general does create different results. but one wouldn't expect *roles* to cause that. 13:42
at least I wouldn't.
13:42 smls joined
skids yeah roles are supposed to be "throw it all in a big bucket and don't worry" 13:42
masak right. 13:43
and that's basically what his commutativity/associativity message is all about.
smls m: say IO("test")
camelia rakudo-moar b497d4: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤ in block <unit> at /tmp/5PaoQLj7HT:1␤␤»
smls ^^shouldn't this work the same as "test".IO ?
colomon changing the order of roles included does not change anything 13:44
skids So the problem would really boild down to ensuring what is in the BUILDs cannot care about the excution order of the BUILDs.
colomon changing the ordering of role inheritance changes everything, and should
so role A; role B; class C does A does B should be the same as class C does B does A 13:46
but role A; role B does A; class C does B is not at all the same as role B; role A does B; class C does A 13:47
nor should it be
skids Not so sure I get that from reading S14. 13:52
masak colomon: I'm curious where you get that "should" from.
colomon masak: consider p6 math 13:53
skids (and there's no such things a "role inheritance" IIRC)
colomon skids: our numeric types depend on role inheritance
skids Howso? 13:54
13:54 prime joined
colomon role Real does Numeric, for instance 13:54
timotimo Bridge and stuff
there is role inheritance
yeah
skids The spec calls that composition not inheritance.
masak has never quite understood what Bridge is, nor why it needs to be among the numeric types 13:55
skids "A role may not inherit from a class, but may be composed of other roles. However, this "crony" composition is not evaluated until class composition time"
moritz m: Bridge
camelia rakudo-moar b497d4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SEcBp8jZ0g␤Undeclared name:␤ Bridge used at line 1␤␤»
colomon forget Bridge, Real and Numeric are more than sufficient to talk about this 13:57
moritz iirc Bridge is just a method name
timotimo yes, sorry 13:58
colomon So Numeric has a method log
and Real does Numeric
and also has a method log, which is more specific than the Numeric version 13:59
this works fine in rakudo, and makes perfectly good sense
13:59 coffee` left
colomon but even more generally 14:00
it’s perfectly clear that anything which does Real must also do Numeric
it is completely wrong that anything which does Numeric must also do Real
masak colomon: did you follow the 'claim' keyword discussion? because it sounds relevant to what you're saying.
colomon: sounds like Real claims Numeric's .log method.
colomon masak: nope, that’s the first time I’ve heard of it 14:01
masak I could dig you out the relevant backlog.
I think that's the resolution to what you consider problematic, at least with this particular case.
there's a Rakudo branch 'claim-prototype'. I think I can find the backlog from the commit dates in that.
nine_ |Tux|: no, just meed time. Family weekend 14:02
skids This works because "A role that brings in two conflicting crony roles may resolve them as if it were a class."
Though without the second crony in this case.
masak colomon: irclog.perlgeek.de/perl6/2015-01-20#i_9975733 and surroundings. (the day after that, the branch was created.) 14:03
hm -- coming back to that topic, my immediate question is this: does `nextsame` interact with `claim`? (i.e. can you `nextsame` et al. to the overridden method from the new one?) 14:04
seems to me that could be a good thing.
skids But anyway that does prove the role A does B versus role B does A point colomon++ brought up. 14:07
masak in the presence of `claim`, sure.
skids No, even without claim.
(see above)
colomon yeah, claim is just added syntax to reinforce the idea that role A does B means something completely different from role B does A 14:08
:)
masak I think if we ever actually get `claim`, then the situation with .log would be an outright collision.
at least unless I'm missing something. 14:09
skids I thought claim was more something to deal with more esoteric class/role overrides.
colomon I’m assuming so as well
(outright collision, I mean)
masak skids: `claim` is only for overrides between roles.
colomon: data point for that: jnthn++ who implemented `claim` in that branch reported a lot of collisions in the setting. and fixed them, AFAIK. in the branch.
colomon no doubt 14:10
actually, now I’m having doubts about claim
masak haven't checked more closely, but I bet the branch is interesting reading.
colomon going back to numbers for a sec 14:11
(and this probably isn’t an actual example, but you’ll see what I mean)
role Rational does role Real (which does role Num)
masak Numeric, surely? 14:12
colomon right, Numeric
it would be perfectly sensible for Rational to also “claim” log if it had a rational-specific version
masak right; sure.
colomon but if we treat role inheritance as a set rather than something ordered, now we’ve got two different roles claiming log 14:13
and that also should be a conflict
shouldn’t it?
masak I don't think so.
I can see situations where it can go wrong.
but not here -- because Rational is somehow "most dervied" 14:14
a concept which I think applies to roles even though we're not doing inheritance
colomon but the point to “no inheritance in roles” (as I understand the concept) is there is no “most derived”
masak before composition there is still a relation saying who does who 14:15
that's not inheritance -- that's just information that's about to be flattened out in the composition
but I don't see it as wrong to act on that information as long as it's still around
colomon but if you have that, you don’t need claim for anything other than providing information to people who read the code.
it’s just taken the “problem” from before and added another layer to it 14:16
so before, the most derived log won
now, the most derived claimed log wins
skids 'claim' was initialliy considered as 'exclude' to say 'we do everything from role A which we composed but not this method, which we may or may not actually provide'
masak I think that's the purpose of `claim` -- to make explicit the fact that the role is overriding something from another role
colomon the issues are exactly the same, just punted down one level 14:17
masak another way of saying that is, we now handle more use cases. a few very weird ones still error out.
colomon I don’t see that at all 14:18
we used to handle more use cases
this isn’t anti-claim, mind you — it still might be a good idea just to “make explicit” what is going on 14:19
but at best it’s just sorting out really shallow issues. 14:20
masak I'm sorry, I seem to have a too-small brain on today. I can't see what you find worrying without a really concrete example... like, say, in a gist.
colomon and there will be plenty of big, real-world cases that are still confusing.
skids It might work to explicitly say which of the other roles in the flat set you override a method from. But there's no syntax for it (especially WRT parametrics) 14:21
colomon opens up wordpress 14:23
masak ++colomon 14:25
skids (and just getting the claim/override things resolved to remove ordering dependencies doesn't get us closer to a role/BUILD resolution) 14:27
timotimo colomon: you bloggin? about what? :) 14:31
colomon timotimo: backlog, my friend 14:32
timotimo so much
14:33 coffee` joined
timotimo about claim? 14:38
14:38 khisanth_ is now known as Khisanth
colomon timotimo: yes 14:38
timotimo ok
skids Were there something like the "stackmethod" idea it would also need syntax to say explcitly 'run role A's method before mine' and then all those directives would have to be checked for conflicts/loops. 14:40
And then there is the issue that sometimes if you say "claim foo from A" depending on the use case if A is not in the set that could be an error, or a noop. 14:41
Ugator :( installation still not working here. I'm trying to build moarvm: 14:43
Configuring 3rdparty libs .............................. FAIL
no idea how to build '3rdparty/libuv/libuv.a'
I'm not supposed to build libuv by myself, right?
skids I guess that could be indicated by whether or not the claiming role has a line up to A in the not-really-inheritance tree. 14:44
jnthn Ugator: What platform are you trying to build on?
14:45 laouji left
Ugator aix - thats an IBM-machine 14:45
powerpc-ibm-aix6.1.0.0 to be precise
cc compiler is available 14:46
jnthn Ugator: Is there a (maybe packaged) system libuv build available? I think there's a Configure flag that lets you use that if so 14:52
Ugator Ill check...
jnthn Ugator: Otherwise, I'm not immediately sure. I know there's code in the libuv repo that relates to aix.. 14:53
14:55 rmgk_ joined, rmgk is now known as Guest11400, Guest11400 left, rmgk_ is now known as rmgk
jnthn Ugator: The "no idea how to build" error comes from MoarVM's Configure script, rather than libuv itself, so there's some hope for this to work with some Configure patch. Sadly, I don't personally know anything useful about aix. :( 14:57
Ugator okay - thanks, Ill try to investigate... 14:58
15:00 virtualsue joined
perl6_newbee hi all. How can I transform the content of a Buf into binary data in order to write them into a file? 15:01
skids It already is.
perl6_newbee hmm 15:02
But the content of the file starts with: Buf:0x<89 50 4e 47 0d 0a 1a 0a 00 00 00
jnthn $fh.write($the_buf)
perl6_newbee oh I used say... thanks once more 15:03
and say prints .gis that in turn is a string... 15:04
Facebalm
jnthn
.oO( I'd heard of lipblam, but... )
15:05
skids You don't get to take the _newbee off quite yet I am afraid :-)
jnthn *balm :)
perl6_newbee skids: I think the same... 15:06
:-)
facepalm ...
15:07 Ben_Goldberg joined
perl6_newbee not only a perl6 newbee also an English newbee 15:07
skids
.oO(lipblam sounds painful)
15:08
15:08 marchelzo_ joined
timotimo profiles the run of an xml parse ... 15:10
69.15user 0.21system 1:09.40elapsed 99%CPU (0avgtext+0avgdata 709440maxresident)k
15:10 rjbs left
marchelzo_ Hi. I'm on OS X. What is the easiest way to get perl6 up and running on my machine 15:11
jnthn If you want to be on the bleeding edge, github.com/tadzik/rakudobrew and if you want the latest release grab the latest tarball from rakudo.org/downloads/star/ 15:13
timotimo run_alt has 13.26% exclusive time, interesting
jnthn I think there may be some other option (portfile?), somebody else may know about that :)
15:13 [particle] joined
jnthn timotimo: Very LTM :) 15:14
marchelzo_ jnthn: Cool. Is the bleeding edge relatively stable, or should I stick to the latest tarball if I want a stable experience?
15:14 [particle]1 left
skids Nothing is horribly broken at the moment IIRC. 15:14
timotimo unsurprisingly, the second place is taken by ListIter's reify method ... >_> 15:15
(because i also happen to grep through the nodes and >>.name.perl.say
jnthn marchelzo_: We try to keep it pretty stable; we do time-based releases, so don't like to diverge very far from the main branch being something releasable :)
timotimo next is List's gimme method
22396938 allocations of BOOTCode 15:16
15339473 Scalar
3410547 XML::Grammar
3393397 BOOTIntArray
jnthn is a bit curious about the first of those 15:17
marchelzo_ Ok. Forgive me if this is a stupid question, but what is Rakudo and what is its relation to perl.org / the perl foundation?
timotimo BUILDALL of Mu gets 5387610 BOOTCode allocations
skids rakudo is one implementation of Perl 6
And the primary one for development at this time. 15:18
timotimo Cursor's INTERPOLATE gets 2085744 BOOTCode allocations
another 1824924 come from Cursor's MATCH 15:19
and another 1684562 in MATCH
marchelzo_ skids: I see. When perl6 is "done", will it be available at perl.org?
timotimo and another 1613188 in MATCH
15:19 virtualsue left
skids perl.org isn't really a distro site as far as I know. 15:19
But the releases promised lately will be rakudo-based, almost certainly. 15:20
timotimo and more in INTERPOLATE ... so basically loads and loads of allocations of BOOTCode inside the Cursor methods
marchelzo_ I see. Thank you.
jnthn marchelzo_: Think of it a bit like the relationship between C and clang/gcc/msvc.
timotimo: Any chance you can get a cut-down version of this into perl6-bench if it ain't there already? 15:21
timotimo INTERPOLATE also wins in scalar allocations against gimme, reify, then MATCH
it's a big data file, but that data file is publically available; it's the opengl api specification 15:22
jnthn Interpolate is not the fastest thing... 15:23
timotimo: Got a link to the grammar?
timotimo it's just github.com/supernovus/exemel/ 15:24
Of 62459049 specialized or JIT-compiled frames, there were 2701839 deoptimizations (that's 4.33% of all optimized frames).
^- so wow
parse-node has 30k deopts, MATCH has 15k 15:25
jnthn I suspect some of the slowness is due to github.com/supernovus/exemel/blob/...ar.pm6#L25 15:27
timotimo ah 15:29
Ugator .seen nwc10 15:30
yoleaux I saw nwc10 6 Mar 2015 20:45Z in #perl6: <nwc10> how is Damian?
timotimo what is STOPPER for, i wonder ... /me greps 15:31
ah, this nibbles?
Ugator nwc10: I heard you got/tried to get perl6 working an an aix machine? any success? 15:32
colomon justrakudoit.wordpress.com/2015/03...heritance/
jnthn timotimo: Yeah. It's a very pretty solution, but causes a lot of (not so fast) interpolation. 15:36
15:42 marchelzo_ left 15:43 [particle] left 15:44 [particle] joined
Ugator .tell nwc10: I heard you got/tried to get perl6 working an an aix machine? any success? 15:45
yoleaux Ugator: What kind of a name is "nwc10:"?!
Ugator .tell nwc10 I heard you got/tried to get perl6 working an an aix machine? any success?
yoleaux Ugator: I'll pass your message to nwc10.
15:51 tinyblak left 15:52 espadrine_ is now known as espadrine
nine_ raydiak: still catching up with the backlog. I try to be consistent with the use of "call" for functions and "invoke" for methods in my Inline modules. 16:02
16:02 hoelzro left 16:14 raiph joined 16:17 eli-se left 16:23 MadcapJake joined
timotimo jnthn: i made a "simplification", hopefully that'll improve things a little bit 16:24
i'm not actually sure if i really made it better ... but it went from 1:17 to 1:09 16:28
Of 62459049 specialized or JIT-compiled frames, there were 2701839 deoptimizations (that's 4.33% of all optimized frames). 16:32
Of 52946393 specialized or JIT-compiled frames, there were 1554781 deoptimizations (that's 2.94% of all optimized frames).
that seems like a nice improvement
(although deopts are very cheap to do)
16:33 eli-se joined
eli-se hola 16:33
timotimo all deopts inside src/gen/m-CORE.setting:15382 and char:sym<common> are gone, though \o/ 16:34
hello eli-se!
1195 GCs -> 999 GCs, whee 16:35
Ven nice :) 16:36
masak hi eli-se
timotimo jnthn: char:sym<common> only used to take 12.46% inclusive, but now it's taking only 4.53% inclusive 16:37
it was quite a good spot :)
jnthn :)
timotimo++ # turning my spot into a patch
timotimo run_alt is at 14.6% now 16:38
colomon \o/ 16:39
timotimo used to be 13.26%, but time-wise it decreased
raydiak nine_: are you aware of the magical meaning of "invoke" in rakudo? it is the reason I cannot follow your example in this case 16:41
relatedly...'mornin all
timotimo mornin' raydiak!
it feels like i just read you write your good-night :) 16:42
raydiak heh hi timo :)
yeah feels that way to me too...though I assume that's because I wasn't concious of time passing when I was unconcsious 16:43
timotimo :D
geekosaur mbn
(lucid dreaming is less effective sleep, sigh) 16:44
nine_ raydiak: Unfortunately I've been wondering the same thing. I don't know anymore how knew that I had to add a method invoke and I don't seem to have documented it in the commit message... 16:45
raydiak geekosaur: sorry to hear it...that...didn't work out too well for me, so I try not to flip those switches if I can help it
nine_ raydiak: maybe we can find it in the IRC log
raydiak nine_: basically I have problems b/c a lua object can act like a table or function or etc when it isn't...so I need "invoke" to do what rakudo needs it to (call as a function), but I need a different method for calling methods as if the object were a table, and I need to support these uses and more on the exact same object 16:48
nine_ raydiak: what's a "table" in this context? 16:49
raydiak so I can't call the method call "invoke", because it needs to be the thing that gets called for postcircumfix:<( )>
a table in lua represents objects and arrays and hashes 16:50
generally
16:51 rurban joined
b2gills m: my $a = 1/3; say $a.base-repeating(10); say $a.FatRat.base-repeating(10); 16:52
camelia rakudo-moar b497d4: OUTPUT«0. 3␤0. ???␤»
16:52 mraynham joined
raydiak but if any lua object (table, function, userdata, thread) has a metatable, it can be called, indexed/subscripted, concatenated, or respond to numeric ops and comparisons 16:53
timotimo C printf has no letter for "i want to have this number printed to base2"?
geekosaur nope 16:54
16:55 zakharyas joined, rindolf left
timotimo hum. 16:56
raydiak nine_: to put it a simpler way, I need to support "$luaobj()" and "$luaobj.invoke()" on the same object and have it mean different things, so I renamed invoke to "dispatch" 16:58
nine_ raydiak: I guess invoke-as-method or the like would just not be usable
16:59 smls left
raydiak nine_: no I'd prefer not to inflict that on my users :) 17:00
nine_ raydiak: I guess it depends on how common such calls are
raydiak nine_: method calls?
nine_ raydiak: are normal methods not called like $luaobj.whatever_method_you_want_to_invoke()? 17:01
raydiak nine_: only the ones that aren't masked out by the dozens of methods my objects already have to provide to act in all those different ways at the same time 17:02
nine_: I could additionally allow .invoke :method to give us some vague notion of consistency, since lua doesn't have named arguments anyway 17:04
mraynham Hi. I started to look at Perl 6 yesterday, and found the "How to get Rakudo Perl 6" page on rakudo.org a bit confusing. PerlJam kindly set me up as an editor on the site so that I could make some changes. Rather than making lots of newbie mistakes on the live page, I've put my work-in-progress into a GitHub gist: gist.github.com/mikeraynham/8c9a4a...4d5cf6190c 17:05
Comments and suggestions are welcome...
raydiak nine_: but e.g. if someone wants to do something as simple as calling .new on the lua object instead of perl...that doesn't work with any of our Inline::* modules, does it? 17:06
nine_ raydiak: true 17:07
17:09 rindolf joined
raydiak nine_: btw another thing I've done wrt that problem is provide a .obj method, which returns a version meant to be used as an object so doesn't have a bunch of extra perl methods on it for the function and array and hash bits and so forth 17:10
nine_: also, I thought it'd be really cool to come up with a special syntax for the method call...e.g. if I took £ or something for Inline::Lua, and then $luaobj£new could make sure it actually calls to lua 17:12
nine_ raydiak: I came across a similiar problem when preparing my FOSDEM talk. During the talk jnthn++ mentioned that there's a way to fix it with some meta class magic.
raydiak hrm; I figured we could probably do that some way, but I was worried about making objects which are too magical...e.g. if I give a user an object and they use it in a flattening list, does it try to dispatch things like .list and .flat to lua then? 17:14
nine_ I guess using a different meta class gives you quite a lot of control in such situations 17:15
raydiak suppose I'll have to learn more about that eventually, then 17:18
timotimo i'm getting more memory usage with the faster variant of exemel on this xml file :(
nine_ raydiak: we both do :)
raydiak nine_: wrt £, I'd be open to a more generic "call into this foreign thing" syntax which we could use across all of Inline:: if you're interested in such a construct..."invoke" is just too overloaded for me to track that one precisely as-is 17:19
nine_ raydiak: how about -> ;) 17:20
raydiak: still, I'd much rather move the special methods out of the way. I want my Inline modules to be as seamless as possible. Objects really should feel like they are just normal Perl 6 objects. 17:21
17:22 zakharyas left
raydiak nine_: well I got this far by blatantly ripping off a ton of your research and hard work so hurry up and make me another working example ;) 17:23
nine_ raydiak: I'd love to :) But it seems like I'm spending more time tracking problems in rakudo than in my modules :) 17:24
raydiak: right now I'm trying to bisect |Tux|++'s performance regression which I suspect is caused by merging the native support
b2gills mraynham: I don't see any glaring issues 17:25
mraynham b2gills: thanks for taking a look. 17:27
b2gills I only use rakudobrew so take it with a grain of salt 17:29
raydiak nine_: nice, good luck...my joking aside, I will give metaclasses a shot when I get to the point where it's my largest problem if you haven't gotten there first
17:30 kjs_ joined
raydiak mraynham++: "Building from source not as easy" missing an "is" 17:31
mraynham raydiak: fixed, thanks. 17:33
raydiak mraynham: yw...other than that, it looks great :) really like it 17:34
though, now that I think about it...it also needs all mention of parrot removed :P 17:35
mraynham raydiak: great, thanks. It's taken me a while to figure out what's going on with Parrot, MoarVM and JVM. I got the impression that Parrot was now no longer recommended, but wasn't 100% sure - I must have scanned a few hundred blog posts and forums in the past few hours. 17:36
timotimo used to be: 17:37
69.20user 0.23system 1:09.47elapsed 99%CPU (0avgtext+0avgdata 705276maxresident)k
60.20user 0.20system 1:00.44elapsed 99%CPU (0avgtext+0avgdata 704412maxresident)k
^- what it's at now
m: say 1 - 60 / 69 17:39
camelia rakudo-moar b497d4: OUTPUT«0.130435␤»
raydiak mraynham: we recently dropped parrot support from rakudo entirely; the jvm backend is still alive, but moar is probably the fastest and most complete atm
mraynham: also there is a JS backend coming, but that's just FYI, nothing that ought to be documented as an option for users yet 17:41
xfix codegolf.stackexchange.com/a/47535/3103 - I wonder if it could be shorter.
timotimo well, after a bit of runtime, the jvm backend can win in many cases, but it has a very hefty startup time penalty
Ulti m: macro circumfix:<` `> ($x) { "\"$x\"" } say `hello`; 17:42
camelia rakudo-moar b497d4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UagIHzWjNz␤Two terms in a row␤at /tmp/UagIHzWjNz:1␤------> 3macro circumfix:<` `> ($x) { "\"$x\"" }7⏏5 say `hello`;␤ expecting any of:␤ postfix␤ infix stopper␤ infix …»
Ulti well imagine those were on different lines, should it have worked?
raydiak timotimo: at least for Pray, that hasn't been true for a long time
timotimo m: say {$^a>none [\+] 0,@^b}(5, (1, 2, 3, 4, 5))
camelia rakudo-moar b497d4: OUTPUT«none(True, True, True, False, False, False)␤»
timotimo m: say {$^a>none [\+]0,@^b}(5, (1, 2, 3, 4, 5))
camelia rakudo-moar b497d4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Q3g4PMWexB␤Two terms in a row␤at /tmp/Q3g4PMWexB:1␤------> 3say {$^a>none [\+]7⏏050,@^b}(5, (1, 2, 3, 4, 5))␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ p…»
timotimo mhm
raydiak m: macro circumfix:<` `> ($x) { "\"$x\"" }; say `hello`; 17:43
camelia rakudo-moar b497d4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Wrol_9GlRV␤Undeclared routine:␤ hello used at line 1. Did you mean 'shell'?␤␤»
raydiak Ulti: so...guess not 17:44
timotimo not quite like that; the "hello" doesn't get nibbled
you'd need an "is parsed" macro, but i don't know what the current stance on those is
17:45 telex left
raydiak m: macro circumfix:<` `> ($x) is parsed { "\"$x\"" }; say `hello`; 17:45
camelia rakudo-moar b497d4: OUTPUT«5===SORRY!5=== Error while compiling /tmp/I_s5664ksF␤Can't use unknown trait 'is parsed' in a macro declaration.␤at /tmp/I_s5664ksF:1␤------> ␤ expecting any of:␤ rw parcel hidden_from_backtrace hidden_from_USAGE␤ pure defa…»
xfix But I actually like how readable this program is, despite being golfed.
J is like */@:<:0,+/\ - too many symbols 17:46
Ulti raydiak well thats good and bad, at least it means that slang was worthwhile
but I think something like that should work, right?
17:46 telex joined
timotimo xfix: i'm glad to see you back on the channel :) 17:47
xfix I also find Haskell solution quite readable. f t=all(>=t).scanl(+)0
Beautiful, and I believe it's very similar to Perl 6 solution.
TimToady the problem with J is that the symbols are all equally huffmanized, so it doesn't tell you visually which bits are important 17:48
mraynham raydiak: okay, I'm editing it out now. Thanks.
timotimo mraynham: i'd like it if you put the windows section first, so that it doesn't seem like we're putting windows support last 17:50
17:52 Ven left
timotimo mraynham: i wonder about the last section on gcc; is that even still relevant? especially since it seems to refer to parrot only? 17:52
i don't remember that bug anyway ...
raydiak Ulti: idk what the state of our macros are, or even our macro design docs, but masak++ would know more...I think it's one of the corners of P6 which is still more experimental, so you might have the most luck just experimenting and trying to read the pertinent rakudo sources than anything else 17:54
timotimo should we really recommend the linux packages? they are typically extremely out of date :(
well, at least you mention that in the text
raydiak Ulti: I think we've had some nice macro posts on the advent calendars too
mraynham timotimo: I see your point. I don't have access to Windows at the moment, so haven't been able to test it, hence its lowly position. Prior to the 2015.02 versions, there are '-parrot.msi', '-moar.msi' and plain '.msi' versions. The 2015.02 version doesn't include those files - so which version is it? 17:55
timotimo if in doubt, it's moar 17:56
FROGGS makes most of these
one of our core developers does pretty much all his development on windows, so the windows releases usually work pretty well 17:57
mraynham timotimo: re gcc, 4.1.2 is from 2007, so probably not relevant any more. I'll remove that section.
timotimo and we have a few more windows perl6 users in the channel since a week or so
i suspect that the shorter the whole page, the less chance for confusion (only 2 cents worth of opinion here, though) 17:58
Ulti raydiak I'll check it out, I saw some macro examples on a video about Pugs and wondered if they were how things acted in Rakudo
raydiak heh good question 17:59
xfix codegolf.stackexchange.com/a/17909/3103 18:02
I like this particular Perl 6 code golf solution for a task.
It's as short as APL solution. 18:03
mraynham timotimo: re linux packages. There are some less than complimentary comments at the bottom of the original page about packages, which is why I thought it worth including them. But as it's under active development, the ease of installing packages is probably a false economy. How about if I put a section at the end of the page about packages, which says that they are available for some distros, but are likely to be out-of-da
xfix (although I would say it's also quite unreadable as well, and does various language misuse, like $/ for storing a tuple)
18:04 Ven joined
xfix (but it could be argued that $/ for storing tuples is actually a feature) 18:04
18:04 zby_home joined, virtualsue joined
TimToady std: $/=split ".",get;say ($0+($1+$2/(9 x$2.chars||1))/10**$1.chars).nude 18:08
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unsupported use of $/ variable as input record separator; in Perl 6 please use the filehandle's :irs attribute at /tmp/FD15umwtY3 line 1:␤------> 3$/7⏏5=split ".",get;say ($0+($1+$2/(9 x$2.cha␤Parse failed␤FAILED 00:00 134m␤»
xfix :-(
Well, it works in current Perl 6, at least.
timotimo mraynham: cut off after "but are likely to be out-of-da", but i expect that's already the end of what you wrote 18:09
xfix Eh, Perl 6 was once more code golf friendly, with stuff like space not required after [+], and so on.
mraynham timotimo: Yes, that was the end of my message.
TimToady no, rakudo was was more friendly, not Perl 6... 18:10
xfix Although, it doesn't really matter. I like Perl 6 as code golfing language, because the programs are short, but the programs don't look as unreadable as in real code golfing languages.
Currently code golf on Stack Exchange is pretty much clones of GolfScript, APL, and Mathematica (if it happens to have a function that does exactly what the question asks about). 18:12
timotimo %)
i prefer "[\+]" to "cumsum" very much
TimToady code golf should be measured in morphemes, not characters
18:12 zakharyas joined
xfix Mathematica has crazy standard library. Like, it has practically everything. 18:13
lizmat m: my $a; $a[0] := 42 # shouldn;'t this also work ?
camelia rakudo-moar b497d4: OUTPUT«No such method 'bind_pos' for invocant of type 'Any'␤ in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3340␤ in block <unit> at /tmp/crRvXvrlnl:1␤␤»
lizmat std: my $a; $a[0] := 42
camelia std 28329a7: OUTPUT«ok 00:00 139m␤»
xfix std: $/:=split ".",get;say ($0+($1+$2/(9 x$2.chars||1))/10**$1.chars).nude 18:14
camelia std 28329a7: OUTPUT«ok 00:01 140m␤»
xfix www.youtube.com/watch?v=uzUTIffsc-M&t=292 18:25
Mathematica pretty much.
jnthn lizmat: I guess it could, though we tend to view binding as somewhat more "low level" than assignment, so maybe it doesn't deserve the magic. Could go either way. 18:26
lizmat: Checking STD doesn't tell much given it's a semantic question rather than a syntactic one :) 18:27
dalek kudo/nom: 80d506d | lizmat++ | / (46 files):
Migrate from at_key c.s. to AT-KEY

This is a proof-of-concept of changing the infamous implementation specific internal methods for accessing arrays and hashes into something more release ready. The following transformations were done:
OLD NEW at_pos AT-POS exists_pos EXISTS-POS delete_pos DELETE-POS assign_pos ASSIGN-POS bind_pos BIND-POS at_key AT-KEY exists_key EXISTS-KEY delete_key DELETE-KEY assign_key ASSIGN-KEY bind_key BIND-KEY
All of the methods have a catch method with DEPRECATION message to ensure anyting out there in the ecosystem will continue to work.
Please feel free to revert if this change does not get consensus.
18:28
pan style="color: #395be5">perl6-examples: ad4dce0 | paultcochrane++ | categories/module-management/Fletcher.pl:
[module-management] use v6; add vim coda
xfix That's a long commit description.
pan style="color: #395be5">perl6-examples: 27fa3dc | paultcochrane++ | categories/module-management/Fletcher.pl:
[module-management] purge trailing whitespace
pan style="color: #395be5">perl6-examples: a1d2c40 | paultcochrane++ | categories/module-management/Fletcher.pl:
[module-management] convert comments into pod
pan style="color: #395be5">perl6-examples: 6c64b9a | paultcochrane++ | categories/module-management/Fletcher.pl:
[module-management] replace hard tabs with spaces
lizmat xfix: it's a big commit: 46 files changed, 486 insertions(+), 435 deletions(-) 18:29
xfix (and then 4 extra commits as if to add to the length)
TimToady what about invoke?
lizmat TimToady: I hadn't considered invoke() just yet
TimToady that's kinda what triggere the whole discussion 18:30
*ed
lizmat s/invoke/INVOKE/ as well then ?
TimToady well, there's been some discussion that invoke is the wrong word anyway 18:31
but INVOKE is better than invoke anyway
b2gills I think it might be a good idea to add a synopsis that discusses what the "Perl 6 Spec" actually is, and what it is not ( see pmichaud's FOSDEM talk video.fosdem.org/2015/devroom-perl/...earned.mp4 ) 18:32
nine_ jnthn: |Tux| reported a 40 % performance regression using Inline::Perl5 that is caused by rakudo and I bisected it down to the commits in gist.github.com/niner/83f73cfbcf3f38a88ae8
tadzik oh, big changes
nine_ jnthn: unfortunatly the build is broken in those commits, so I cannot shorten it further
flussence invoke() is the one for calling an object like a function, right? Having that named that, and then FALLBACK for methods seems a bit wonky to me...
nine_ .tell |Tux| the performance regression is not caused by Inline::Perl5 but by Rakudo. I suspect it's jnthn++'s native work. 18:33
yoleaux nine_: I'll pass your message to |Tux|.
flussence IMO, the method one should be a bit more huffmanized than the sub one...
TimToady it's more like "invoked" or "called"
if we're going with the "comefrom-ness" of HOOKNAMES 18:34
flussence oh wait, I think I'm getting confused again...
TimToady CALL for Callable, I suppose 18:36
18:36 Ugator left
raydiak \o/ lizmat++ ! I dared not hope for such a sweeping change so soon 18:36
18:37 zakharyas left
TimToady nine_: looks like it's the native changes, which are known to have regressed a bit 18:37
(temporarily, it is hoped)
nine_ TimToady: as I suspected 18:38
b2gills TimToady: FatRat.base-repeating doesn't work ( i'm pointing this out to you since `git blame` blames you )
m: my $a = 1/3; say $a.base-repeating(10); say $a.FatRat.base-repeating(10);
camelia rakudo-moar b497d4: OUTPUT«0. 3␤0. ???␤»
Mouq xfix: I don't think you need that "0,"
TimToady you can put it outside the [\+] too
Mouq xfix: To codegolf.stackexchange.com/a/47535/3103 that is 18:39
TimToady Mouq: [\+] doesn't start with the identity element
xfix Mouq: gist.github.com/xfix/2cc0ea88050a915d53c2
I need it.
Mouq Oh, okay, sorry :) 18:40
xfix No problem.
Thanks for proposing $/ in one of my code golf solutions, by the way.
TimToady perhaps we can warn on $/= only if followed by a quote 18:41
dalek kudo/nom: 19f4bc2 | lizmat++ | src/core/Any.pm:
Fix missing "is rw" on DEPRECATED catcher methods
18:42
Mouq xfix: Is it too late to note you can cut two chars by using 'comb' instead of 'chars'? 18:43
:9
TimToady also, if we allwed mg/\d+/ in place of m:g/\d+/ you could get another 18:44
now that we have locals terms overriding quoters, maybe we could relax that
*local
xfix Not really. 18:45
TimToady get~~m:g/\d+/ works
Mouq TimToady: It needs to work for "2..142857" though
TimToady but is same length
ah
jnthn lizmat, TimToady: We can do INVOKE, and I want to kill postcircumfix:<( )>, and I want something else for coercion, I think.
xfix Mouq: Done. 18:46
jnthn Well, would be happy with names other than INVOKE too :) 18:47
Main thing is the method postcircumfix:<( )> should go away.
TimToady seems they're all Callables
18:47 virtualsue left
TimToady CALL-ME-ANYTHING-BUT-CALL-ME 18:48
jnthn nine_: Did you build them against latest NQP/Moar, or against their NQP_REVISION one, ooc? 18:49
TimToady all the others have a - now, so CALL-ME ain't so bad
jnthn nine_: But I suspect a --profile will be indicative.
18:52 kaare__ left
TimToady lizmat: I think I like CALL-ME the best, unless someone can think of a major objection 18:56
Mouq jnthn: Does putting a deprecation check in Metamodel::MethodContainer.add_method seem sane? 18:57
[Tux] nine_, understood
18:57 Ven left
TimToady it's self-documenting from the definers viewpoint, less so from the, er, caller's viewpoint, but users won't generally see a .CALL-ME() call 18:57
jnthn Mouq: Uh...why would we be putting a deprecation check in add_method? 18:59
Mouq just realized he had missed lizmat++'s AT-KEY etc. commit
jnthn: postcircumfix:<*>
jnthn Oh...hm 19:00
TimToady that's not a...oh, whatever...
Mouq jnthn: Or do we just want to try to catch it in the grammar?
jnthn tbh I'd just catch it in Actions or so
I think we have prior art for deprecations there.
Not sure we do in the MOP
TimToady depredations, anyway
[Tux] does lizmat's change mean I have to rename my «method at_pos (int $i) {» to «method AT-POS (int $i) {» ? 19:01
lizmat [Tux]: if you don't want to see deprecation messages, yes 19:02
(or incur the performance penalty of calling a deprecated method)
[Tux] Inline::Perl5 fails again on current checkout
lizmat gist? 19:03
[Tux] one sec. testing ...
gist.github.com/Tux/5774f0e94a82335d3312
Text::CSV still passes \o/ 19:04
nine_ jnthn: I rm -rf'ed install/ after every step 19:05
Mouq Has there been any discussion re irclog.perlgeek.de/perl6/2015-03-07#i_10238947 ? 19:06
(Since I'm in that section of code rn) 19:07
jnthn nine_: Yeah, I didn't keep NQP_REVISION up to date while working in the branch... 19:09
lizmat [Tux]: seems like some AT-POS candidates are missing an "is rw"
but this was already *before* my change, so I wonder why it would make a difference now 19:10
TimToady Mouq: I suspect most people's current opinion is that they're a bit too huffmanized for how often they're used
lizmat anyways, spectesting a fix
TimToady and that shouting is probably more important than swearing :)
s/important/understandable/ 19:11
19:11 rindolf left
jnthn nine_: I don't think that bisecting any further will learn us more, though 19:12
Mouq TimToady: Heh, true :) Shall I just deprecate the method forms then? (at least for now)
jnthn nine_: A before/after profile might point out an easy static optimization that helps 19:13
nine_: Or it may fall under the more general optimization work at VM level for native ref stuff that's still to come
TimToady Mouq: or depredate 'em
19:13 kjs_ left
dalek kudo/nom: de36866 | lizmat++ | src/core/Any.pm:
Add more missing "is rw"
19:18
lizmat [Tux]: could you try with this commit ?
19:19 perl6_newbee left
[Tux] building 19:21
Cannot modify an immutable TypedCArray[Pointer] 19:23
in method ASSIGN-POS at src/gen/m-CORE.setting:2167
in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3389
xfix m: ('' xx 2, 'Fizz') xx * Z~ ('' xx 4, 'Buzz') xx * Z|| 1..100 19:26
camelia rakudo-moar 19f4bc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rt51_G2k3e␤Operators 'Z~' and 'Z||' are non-associative and require parentheses␤at /tmp/rt51_G2k3e:1␤------> 3'Fizz') xx * Z~ ('' xx 4, 'Buzz') xx * Z7⏏5|| 1..100␤ expecting any of:␤ i…»
xfix I'm not exactly sure why is this a problem.
(I tried to do FizzBuzz in functional Perl 6 style) 19:27
Mouq std: ('' xx 2, 'Fizz') xx * Z~ ('' xx 4, 'Buzz') xx * Z|| 1..100 19:28
camelia std 28329a7: OUTPUT«5===SORRY!5===␤"Z~" and "Z||" are non-associative and require parens at /tmp/O0IvusgfQl line 1:␤------> 3zz') xx * Z~ ('' xx 4, 'Buzz') xx * Z|| 7⏏051..100␤Check failed␤FAILED 00:00 139m␤»
xfix I know it's a syntax error, but why it has to be?
Meaning is quite obvious, zip with three lists. 19:29
flussence m: say ('' xx 2, 'Fizz') xx (* Z~ ('' xx 4, 'Buzz') xx (* Z|| 1..100))
camelia rakudo-moar 19f4bc: OUTPUT« Fizz␤»
Mouq xfix: It means ( … Z~ …) Z|| 1..100, right?
xfix m: say for (('' xx 2, 'Fizz') xx * Z~ ('' xx 4, 'Buzz') xx *) Z|| 1..100 19:30
camelia rakudo-moar 19f4bc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JoH2BiBf5O␤Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument␤at /tmp/JoH2BiBf5O:1␤------> 3say7⏏5 for (('' xx 2, 'Fizz') xx * Z~ ('' xx…»
xfix m: .say for (('' xx 2, 'Fizz') xx * Z~ ('' xx 4, 'Buzz') xx *) Z|| 1..100
camelia rakudo-moar 19f4bc: OUTPUT«1␤2␤Fizz␤4␤Buzz␤Fizz␤7␤8␤Fizz␤Buzz␤11␤Fizz␤13␤14␤FizzBuzz␤16␤17␤Fizz␤19␤Buzz␤Fizz␤22␤23␤Fizz␤Buzz␤26␤Fizz␤28␤29␤FizzBuzz␤31␤32␤Fizz␤34␤Buzz␤Fizz␤37␤38␤Fizz␤Buzz␤41␤Fizz␤43…»
xfix Yep.
I was porting an expression I wrote in Python: [a + b or c for a, b, c in zip(cycle([''] * 2 + ['Fizz']), cycle([''] * 4 + ['Buzz']), range(1, 101))] 19:33
Perl 6 is clearly shorter, but I don't understand the need for parens in this case.
masak m: my $start = 468_395_662_504_823; my $step = 205_619 * 223_092_870; for 0..23 -> $n { say is-prime $start + $step * $n } # en.wikipedia.org/wiki/Green%E2%80%93Tao_theorem 19:34
camelia rakudo-moar 19f4bc: OUTPUT«True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤True␤»
masak \o/
FROGGS lizmat++ # Unbreak build on JVM 19:36
masak m: my $start = 6_171_054_912_832_631; my $step = 366_384 * 223_092_870; say so all (is-prime $start + $step * $_ for 0..24) 19:37
camelia rakudo-moar 19f4bc: OUTPUT«True␤»
nwc10 .tell ugator I have built it on IBM hardware, yes, but the machine is running Fedora (ie Linux)
yoleaux 15:45Z <Ugator> nwc10: I heard you got/tried to get perl6 working an an aix machine? any success?
nwc10: I'll pass your message to ugator.
masak m: my $start = 43_142_746_595_714_191; my $step = 23_681_770 * 223_092_870; say so all (is-prime $start + $step * $_ for 0..25) 19:38
camelia rakudo-moar 19f4bc: OUTPUT«True␤»
masak amazing.
FROGGS m: my $start = 43_142_746_595_714_191; my $step = 23_681_770 * 223_092_871; say so all (is-prime $start + $step * $_ for 0..25)
camelia rakudo-moar 19f4bc: OUTPUT«False␤»
FROGGS k
Mouq m: say zip(('' xx 2, 'Fizz') xx *;('' xx 4, 'Buzz') xx *;1..100).tree».first(?*) 19:39
camelia rakudo-moar 19f4bc: OUTPUT«1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 Fizz 16 17 Fizz 19 Buzz Fizz 22 23 Fizz Buzz 26 Fizz 28 29 Fizz 31 32 Fizz 34 Buzz Fizz 37 38 Fizz Buzz 41 Fizz 43 44 Fizz 46 47 Fizz 49 Buzz Fizz 52 53 Fizz Buzz 56 Fizz 58 59 Fizz 61 62 Fizz 64 Buzz Fizz 6…»
nwc10 .tell ugator I have tried building it on AIX. IIRC one or two of the dependecy libraries are a pain (not libuv). I don't think that dyncall supports AIX. IIRC libffi does - unless you know PPC assembler, I'd guess that the route of least resistance is actually to abstract the dynamic call stuff to be able to use dyncall or libffi. I think that would get us most of HP/UX too.
yoleaux nwc10: I'll pass your message to ugator.
xfix Mouq: Doesn't handle FizzBuzz case. 19:40
nwc10 itell ugator also, IIRC, the MoarVM build system annoyingly picks the GNU make specific Makefile, instead of the most generic "embedding" makefile
Mouq xfix: Yeah, just realized :)
nwc10 .tell ugator also, IIRC, the MoarVM build system annoyingly picks the GNU make specific Makefile, instead of the most generic "embedding" makefile
yoleaux nwc10: I'll pass your message to ugator.
nwc10 en.wikipedia.org/wiki/Typescript says "TypeScript adds support for features such as classes, modules and an arrow function syntax as proposed" - is that the next thing from Perl 6 that JS wants to steal? (after ~) 19:44
flussence wait wait, JS has sane concatenation now? :)
nwc10 *wants*
lizmat [Tux]: seems I forgot NativeCall 19:45
19:46 atweiden joined
TimToady m: {say $^a ~ $^b || $^c} for ('' xx 2, 'Fizz') xx * Z ('' xx 4, 'Buzz') xx * Z 1..100 19:46
camelia rakudo-moar de3686: OUTPUT«1␤2␤Fizz␤4␤Buzz␤Fizz␤7␤8␤Fizz␤Buzz␤11␤Fizz␤13␤14␤FizzBuzz␤16␤17␤Fizz␤19␤Buzz␤Fizz␤22␤23␤Fizz␤Buzz␤26␤Fizz␤28␤29␤FizzBuzz␤31␤32␤Fizz␤34␤Buzz␤Fizz␤37␤38␤Fizz␤Buzz␤41␤Fizz␤43…»
dalek kudo/nom: 727f96f | lizmat++ | lib/NativeCall.pm:
Bring NativeCall upto AT/ASSIGN-POS
19:47
lizmat [Tux]: could you try again?
Mouq nwc10: wiki.ecmascript.org/doku.php?id=har...ion_syntax 19:48
[Tux] expects NativeCall to be somewhat essential to Inline::Perl5 :) 19:49
nwc10 oh, not quite. it's =>, not ->
mraynham Further to comments from timotimo, I've simplified the installaiton notes and removed references to Parrot. I've limited the page to the basics, as more detailed info is available in the README files. gist.github.com/mikeraynham/8c9a4a...4d5cf6190c
Mouq nwc10: Also has inverted parameters to allow for blockless forms
b2gills m: multi sub python-range ($start,$stop,$inc = 1){ $start, { $^prev + $inc } ...^ { $^check >= $stop } }; say python-range 0, 11, 2
camelia rakudo-moar de3686: OUTPUT«0 2 4 6 8 10␤»
mraynham Going to fire up an AWS EC2 Windows instance and have a look at the installation details. 19:50
lizmat didn't fully incorporate NativeCall into her mental image of the core just yet
[Tux] All tests successful.
Files=19, Tests=289, 12 wallclock secs ( 0.07 usr 0.02 sys + 11.27 cusr 0.86 csys = 12.22 CPU)
Result: PASS
Mouq nwc10: Which I think makes more sense for Coffeescript than JS, but I'm no JS guru
[Tux] still slow though 19:53
nwc10 I'm no guru in any of this 19:54
I just had no idea what Typescript was, or why AngularJS needs a "scripting language" 19:55
(or why PHP needs a templating language)
dalek kudo/nom: f4ef3c1 | lizmat++ | src/core/Any.pm:
Fast-forward a year, don't change history
19:59
20:01 beastd joined
timotimo [Tux]: for the TypedCArray thing, maybe you forgot to .new the TypedCArray before trying to assign to it? 20:04
20:11 Ben_Goldberg left
lizmat hmmm... just realised that the catch at_xxx c.s. methods don't work if a module is defining its own 20:12
guess I would need to do some metamodel magic for that :-(
afk for a while&
Mouq lizmat: That's what I was looking into
lizmat++ again though :) 20:13
The issue with deprecating them is that Any already has the fallbacks… which means that we try to warn when compiling the setting…
b2gills I wouldn't be too bothered if the way to implement .AT-KEY was `method HASH:<at-key>` or similar ( I'm assuming it doesn't modify the parser ) That way it definitely doesn't collide with normal methods 20:23
m: class C { method HASH:<at-key>(|c){ say 'hi' }}; C.HASH:<<at-key>>
camelia rakudo-moar f4ef3c: OUTPUT«hi␤»
20:24 Ben_Goldberg joined, mjreed joined
Mouq m: class C { method HASH:at-key(|c){ say 'hi' }}; C.HASH:at-key 20:26
camelia rakudo-moar f4ef3c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hsmVCDmLHi␤Colon pair value '|c' too complex to use in name␤at /tmp/hsmVCDmLHi:1␤------> 3s C { method HASH:at-key(|c){ say 'hi' }7⏏5}; C.HASH:at-key␤»
Mouq m: class C { method HASH:at-key (|c){ say 'hi' }}; C.HASH:at-key
camelia rakudo-moar f4ef3c: OUTPUT«No such method 'HASH' for invocant of type 'C'␤ in block <unit> at /tmp/U0hDcWPqf2:1␤␤»
Mouq m: class C { method HASH:at-key<>(|c){ say 'hi' }}; C.HASH:at-key<> 20:27
camelia rakudo-moar f4ef3c: OUTPUT«Potential difficulties:␤ Pair with <> really means an empty list, not null string; use :at-key('') to represent the null string,␤ or :at-key() to represent the empty list more accurately␤ at /tmp/hkQKA_7v3I:1␤ ------> 3class C { meth…»
Mouq I tried :P
dalek kudo/nom: b57f135 | Mouq++ | src/Perl6/ (2 files):
Make `method postcircumfix:<* *>` and `method <sigil>` obsolete

We probably want a custom typed_worry for the postcircumfix case.
20:31
kudo/nom: 8df4617 | Mouq++ | src/core/Any.pm:
Merge branch 'nom' of github.com/rakudo/rakudo into nom
b2gills I already succeeded it's spelled `HASH:«at-key»`
Mouq b2gills: I just think the extra < > is icky 20:32
HASH:at-key is a valid name
b2gills that's part of the point, it is usually called by the implementation not user code
m: class C { method HASH:at-key (|c){ say 'hi' }}; C.'HASH:at-key'() 20:34
camelia rakudo-moar f4ef3c: OUTPUT«hi␤»
Mouq &
20:37 darutoko left 20:43 eli-se left 20:46 rurban left
raydiak is there any way to do a different thing in STORE depending on what kind of container you're bound into if any? e.g. my %h := $o; my @a := $o;, then have %h = <a b c d> and @o = <a b c d> both work normally? 20:49
[Tux] Mouq, you broke Inline::Perl5: gist.github.com/Tux/b3060a13a6211bd1cb9d 20:53
20:54 mraynham left 20:58 eli-se joined
eli-se woo 20:58
dalek pan style="color: #395be5">perl6-examples: 54e42d2 | paultcochrane++ | doc/README:
[doc] correct minor typo
pan style="color: #395be5">perl6-examples: 10e9f5d | paultcochrane++ | categories/rosalind/README:
Purge trailing whitespace in READMEs
pan style="color: #395be5">perl6-examples: c546c70 | paultcochrane++ | .gitignore:
Ignoring automatically generated files from running examples
pan style="color: #395be5">perl6-examples: ac749ad | paultcochrane++ | / (16 files):
Rename all READMEs to README.md
pan style="color: #395be5">perl6-examples: 82ac038 | paultcochrane++ | / (8 files):
Convert READMEs to Markdown
b2gills m: role Asdf { method Asdf:<jkl>{...} }; class C does Asdf { method Asdf:<jkl>{say 'hi'} }; my Asdf $v = C; $v.Asdf:<jkl> # this is my line of thinking
camelia rakudo-moar 8df461: OUTPUT«hi␤»
21:05 zakharyas joined
raydiak .tell mraynham looking awesome; mraynham++ ! I think my only suggestion is that, since rakudobrew is under Installing Rakudo Star, you could mention that once rakudo and panda are installed, you can do "panda install Task::Star" to install all of the star modules 21:06
yoleaux raydiak: I'll pass your message to mraynham.
21:15 perigrin joined 21:16 pmurias left 21:20 mraynham joined 21:24 Foxcool left 21:25 pecastro left 21:31 cognominal joined 21:35 xfix left
Ulti nine_ have you tried your grammar highlighter with std? 21:35
21:39 cognominal left
raiph design.perl6.org/S12.html#Lvalue_methods says "Setter methods that expect the new value as an argument do not [work]" 21:46
What's the intended way to create (the equivalent of) validating setter methods? 21:47
jnthn raiph: Preferably, fold the validation into the type (using subset types) 21:48
raiph jnthn: will a subset type on an attribute support access to self? 21:49
21:49 dolmen joined
jnthn raiph: No 21:49
raiph: If you want an l-value-ish interface where you can do what you like, there's Proxy 21:50
raiph jnthn: thanks
jnthn raiph: But an object with interesting enough invariants that you want to do more sophisticated things probably deserves an interface expresed in terms of meaningful method names rather than just getter/setter logic.
Mouq m: class C { has $.canfoo; subset Foo of Int where { $.canfoo and $_ ~~ -50..50 }; has Foo $.foo } 21:51
camelia rakudo-moar 8df461: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JrRXRlAGod␤Variable $.canfoo used where no 'self' is available␤at /tmp/JrRXRlAGod:1␤------> 3nfoo; subset Foo of Int where { $.canfoo7⏏5 and $_ ~~ -50..50 }; has Foo $.foo }␤ expecting any of:…»
Mouq [Tux]: That's weird 21:53
jnthn This is one of the places I think Perl 6 is a little opinionated on OO, but I agree with its opinions. :)
21:54 wicope left
Mouq m: class C { has $.canfoo; has subset Foo of Int where { $.canfoo and $_ ~~ -50..50 }; has Foo $.foo } 21:55
camelia rakudo-moar 8df461: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Nv9lr9SgLh␤Virtual call $.canfoo may not be used on partially constructed objects␤at /tmp/Nv9lr9SgLh:1␤------> 3; has subset Foo of Int where { $.canfoo7⏏5 and $_ ~~ -50..50 }; has Foo $.foo }␤ …»
mraynham raydiak: msg received. Thanks for positive comments. Will check out suggestion. 21:56
yoleaux 21:06Z <raydiak> mraynham: looking awesome; mraynham++ ! I think my only suggestion is that, since rakudobrew is under Installing Rakudo Star, you could mention that once rakudo and panda are installed, you can do "panda install Task::Star" to install all of the star modules
ugexe are there any plans for build reports on rakudo itself? say if i wanted to lookup if jvm was building for other arm6 processors or with X amount of memory?
21:58 hoelzro joined 22:01 gugod left
dalek kudo/nom: 67b7ba1 | Mouq++ | lib/NativeCall.pm:
[NativeCall] postcircumfix:<( )> -> invoke

Gets us closer to being able to run Inline::Perl5 before also fixing the method there. [Tux]++
Unfortunately, Inline::Perl5's precomp.t still dies with:
   ===SORRY!===
   Serialization Error: Unimplemented case of read_ref
22:02
raiph jnthn: thanks. fwiw the use case is an Interval class with lower/upper bounds; setters for those; and the invariant lower <= upper. I'll try a Proxy. jnthn++ 22:03
jnthn raiph: I lack context, but off-hand, Interval sounds to me like a value object, and so the kinda thing where I'd go for an immutable design.
22:05 mraynham_ joined
jnthn (And validate at construction time) 22:07
raiph jnthn: That makes a lot of sense. Thanks! 22:08
raydiak is there any way to bind instead of assign attribute defaults?
m: class C { has $.foo = Proxy.new: FETCH => method () { rand } }; my $o = C.new; say $o.foo; say $o.foo;
camelia rakudo-moar 8df461: OUTPUT«0.701982881641943␤0.701982881641943␤»
raydiak m: class C { has $.foo := Proxy.new: FETCH => method () { rand } }; my $o = C.new; say $o.foo; say $o.foo;
camelia rakudo-moar 8df461: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IgU7Ekh1Sr␤Cannot use := to initialize an attribute␤at /tmp/IgU7Ekh1Sr:1␤------> 3= Proxy.new: FETCH => method () { rand }7⏏5 }; my $o = C.new; say $o.foo; say $o.fo␤ expecting any of:␤ …»
Mouq raydiak: NYI 22:09
raydiak I guess you could bind it in a BUILD then?
m: class C { has $.foo; submethod BUILD (|) { $!foo := Proxy.new: FETCH => method () { rand } } }; my $o = C.new; say $o.foo; say $o.foo; 22:10
camelia rakudo-moar 8df461: OUTPUT«0.792309262432954␤0.947388834466232␤»
jnthn Yeah, you can bind it in a BUILD
Mouq: Along with .= :)
Mouq: Those two may be worth handling at the same time.
22:10 jercos left
Mouq jnthn: I think I fudged handling of .= a few weeks ago; I'm not sure what the "proper" way to do it would be 22:11
*un-scarequote proper
m: class Foo { has Rat $.r .= new(1, 2) }; say Foo.new.r
camelia rakudo-moar 67b7ba: OUTPUT«0.5␤»
Mouq That just rewrites it as Rat.new(1, 2) 22:12
Essentially
22:12 jercos joined
jnthn hm 22:16
22:16 mraynham_ left
jnthn mebbe close enough 22:16
If implementing := is easy in terms of what you did, it's probably about the right factoring. Otherwise it's maybe not :)
22:17 mraynham left
raydiak is is just me or is writing rw routines with a body consisting of only a Proxy.new with all the logic in the fetch and store blocks going to be common enough to maybe warrant a more pleasant way to declare such a construct? 22:19
Mouq jnthn: github.com/rakudo/rakudo/commit/df5b31eae
22:20 mraynham joined
Mouq And I kinda doubt my way's going to have real relevance to :=… :) 22:20
jnthn Mouq: Hm :)
No :) 22:21
22:21 mraynham left
jnthn Though probably the whole 3 (=, .=, and :=) may want a refactor 22:21
Mouq jnthn: On the other hand, a good implementation of := may have a lot of relevance to doing .= right…
jnthn Yeah, I think maybe the block itself should do the operation on the attribute.
Then it's easy to just delegate to assign_op, bind_op, etc. 22:22
Mouq m: my $a .= perl; say $a
camelia rakudo-moar 67b7ba: OUTPUT«Any␤»
raiph raydiak: related afaict: design.perl6.org/S06.html#The_want_function 22:28
raydiak: well, not related, but maybe to be considered at the same time 22:29
22:31 dolmen left
raiph raydiak: the speculated ContextProxy looks like a multi case FETCH depending on context 22:33
22:35 kaare__ joined
raydiak raiph: ah, neat...and thanks, I'll keep that in mind as I contemplate 22:37
jnthn Also note that if there's a strong pattern in what you're doing with the Proxy you can always factor out its creation. 22:39
Mouq doesn't see what ContextProxy would do that class :: is Proxy { … } wouldn't 22:41
jnthn wonders if he should try and find time for a blog post on his ideas about object design and when to consdier/not consider Proxy 22:42
*consider
raydiak how else do you implement lvalue routines? 22:43
22:43 aborazmeh joined, aborazmeh left, aborazmeh joined 22:44 Ben_Goldberg left
raydiak custom class with a STORE method maybe? 22:46
22:50 aborazmeh left
colomon jnthn: +1 to that post idea 22:50
22:52 zakharyas left 22:56 Ben_Goldberg joined 23:09 cognominal joined
dalek kudo/nom: 5acaa4a | lizmat++ | t/01-sanity/22-KEY.t:
Add basic xx-KEY sanity tests
23:15
23:16 diana_olhovik_ left 23:17 woshty left 23:21 espadrine left
lizmat .tell Mouq b57f1358abf seems to break the NativeCall sanity tests (make t/04-nativecall/*.t) , and later commits don't fix 23:21
yoleaux lizmat: I'll pass your message to Mouq.
lizmat .tell Mouq maybe we should revert those commits to not hurt the bleeding edge ecosystem too much ?
yoleaux lizmat: I'll pass your message to Mouq.
lizmat sleep& 23:22
23:24 mreed joined
mreed m: rx:i/hello/.perl.say 23:25
camelia rakudo-moar 67b7ba: OUTPUT«regex ($: *%_) { #`(Regex|69167504) ... }␤»
23:25 Rounin left
mreed ^ that’s not very useful. :) 23:25
dalek kudo-star-daily: 6ccbb92 | coke++ | log/ (9 files):
today (automated commit)
23:27
kudo-star-daily: e734be0 | coke++ | log/ (9 files):
today (automated commit)
rl6-roast-data: ee4df57 | coke++ | / (9 files):
today (automated commit)
rl6-roast-data: da1990b | coke++ | / (9 files):
today (automated commit)
23:29 eli-se left 23:30 woshty joined
masak mreed: agreed. 23:35
mreed: I wonder if it could simply output the regex itself? 23:36
mreed I guess rules are a bit complicated for easy stringification in general..
spitting the original regex back out would be a distinct improvement..
23:37 coffee` left
dalek kudo/nom: 161550a | Mouq++ | src/Perl6/Actions.nqp:
Fix nativecall tests; lizmat++
23:37
Mouq .botsnack 23:38
yoleaux 23:21Z <lizmat> Mouq: b57f1358abf seems to break the NativeCall sanity tests (make t/04-nativecall/*.t) , and later commits don't fix
:D
23:21Z <lizmat> Mouq: maybe we should revert those commits to not hurt the bleeding edge ecosystem too much ?
Mouq .tell lizmat Fixed what was breaking the tests, but we may still want to revert… Inline::Perl5's t/precomp.t currently dies because of some internal mishandling of the postcircumfix:<( )> error, it seems 23:39
yoleaux Mouq: I'll pass your message to lizmat.
23:41 zby_home left
masak 'night, #perl6 23:42
23:47 mreed left
ugexe Mouq: DBDish gave my smoker that error too i think 23:47
cant seem to get panda to install on jvm as of the last 24 hours either 23:48
23:50 mreed joined 23:53 mreed left, mreed joined 23:55 mreed left
[Coke] (OS X) will hopefully have a macports version by midyear. (takes a while to get new things approved, it seems) 23:56
23:58 mreed joined