»ö« 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