»ö« 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!
Set by moritz on 25 December 2014.
masak 'night, #perl6 01:00
ugexe does anyone know if the meta6.json items in 'emulates' should count as a fulfilled dependency? should it be up to the user? or should anything declared under 'depends' be taken as a requirement even if if you have a module installed that claims to emulate it? 01:13
superceded and friends claim to not have anything to do with depends, so im guessing emulates is also intended to not have any association with depends 01:14
skids For the purpose of panda, or module loading? For the latter I think it's clear that if you want to load a particular auth you have to be specific. 01:17
ugexe for the purpose of any module installer 01:19
and for the latter the specs example show a non-auth specific module as emulating an auth specific module 01:21
emulates : { "JSON::Fast" : "JSON::XS:auth<cpan:MLEHMANN>" }
the question is, if a package requires JSON::XS but you already have JSON::Fast installed (and not JSON::XS) should the package manager install JSON::XS 01:22
s/requires/depends/
skids Well, IMO that can get sticky: 01:38
If the package really needs a particular implementation of that interface it can say so by supplying an owner.
But then an addition to repos can break that until the package manager gets around to adjusting the Meta file.
from the user perspective: 01:39
It would be annoying to a user if a package manager kept installing an implementation they did not want because it was breaking things on their system.
If the repos could have virtual packages that were backwards to the way Debian does it (they list eligible packages) then problems like that could be more easily fixed by "distro" maintainers. 01:44
ugexe you are describing supersedes 01:47
ugexe i am mostly interested in automatically attempting to resolve dependency failures 01:49
afterall, the user does not get to pick what depends they pull in for the most part anyway so they should have no reason to be annoyed 01:50
skids Well, don't say that to me when I'm screaming at apt. But anyway, my point is let us say that a recommendation manager declares all emulates to satisfy a dependency. Then if a package that everyone usually has installed starts to emulate another package in a broken fashion, it will break a depending package until that other module author fixes that package's Meta. 01:52
(Asuuming they did not already have the "pure" dependency installed) 01:53
ugexe it would only break it if your package manager was not very smart. a smart package manager would not install a broken dependency, or a dependency that lead to the original module to fail its tests 02:00
so then your reccomendation manager could ask if you'd like to try <some other module that claims to emulate the failed module> 02:02
skids That strikes me as analogous to a "sufficiently smart compiler" train of thought: sure panda could be made that smart, that I can believe, but thorough test suites throughout the entire ecosystems strains credibility. 02:04
ugexe im not talking about panda, and it also involves the help of the actual ecosystem involved (which holds all the meta data of all the modules)
the ecosystem would actual make the recomendation 02:05
remember there will be many ecosystems/auths and package managers
including test matrixes that can test a module build with various modules that claim to emulate each other 02:08
skids Sure. Anyway I don't think the docs make it clear in enough places to say whether certain sentences apply to the compunit loader or the recommendation manager.
IIRC that was lizmat++'s thing, maybe she could clarify.
ugexe a distro maintainer can already supply alternative modules to be installed on failure as well 02:36
leont Is there any centralized description for that meta6.json? 02:44
ugexe github.com/perl6/specs/blob/master...format.pod 02:45
skids leont: it is specced in S22
skids catches up on some old things he should have filed as RTs 03:37
skids Can someone with a newish compile test gist.github.com/skids/11d8dca21973925c7850 so I don't file an already-fixed RT? 03:38
ugexe did you try putting a '/' at the end of the { True } 03:58
er, '\' 03:59
ugexe yeah, that gives the same result 04:04
which is expected
(same result as the first example)
skids Yeah, same here, fails when using / to make it one "line" 04:05
ugexe \, not /
and its supposed to fail
skids OK, good then I'll file that as an RT. Right I used \
Why would you expect it to fail?
ugexe role A takes arguments, and you are calling does A[ ] 04:06
skids Named args are optional.
r: role A [ :$d ] { } ; class B does A[ ] { }; B.new; 04:07
camelia ( no output )
ugexe i see 04:08
ugexe fwiw you get a similar error using programtic checks in any signature on a default assignment 04:24
m: sub A($bs where { True } = 1) { }; A(3);
camelia rakudo-moar 6279e1: OUTPUT«Cannot modify an immutable Block␤ in method ACCEPTS at src/gen/m-CORE.setting:3281␤ in sub A at /tmp/5ayhGJwfai:1␤ in block <unit> at /tmp/5ayhGJwfai:1␤␤»
skids m: sub a ($bs where { True } ␤= 1) { }; a(3); # Yeah that is suspiciously newline dependent too. 04:32
camelia ( no output )
skids And better yet, that shows a problem when run from -e 04:34
ugexe -e runs with less strictness, although im not sure if that matters 04:36
use v6; will run it with normal strictness
skids Weird. I'm able to do the role one on -e now, without use v6, but ISTR that did not owrk before. 04:39
m: role A [ :$bs where { True } = 512] { }; class B does A[ ] { }; B.new; 04:40
camelia rakudo-moar 6279e1: OUTPUT«===SORRY!===␤None of the parametric role variants for 'A' matched the arguments supplied.␤Cannot modify an immutable Block␤»
skids m: role A [ :$bs where { True } ␤= 512] { }; class B does A[ ] { }; B.new;
camelia ( no output )
ugexe m: role A [ :$bs where { not True } ] { }; class B does A { }; B.new; 04:46
camelia rakudo-moar 6279e1: OUTPUT«===SORRY!===␤None of the parametric role variants for 'A' matched the arguments supplied.␤Cannot call ''; none of these signatures match:␤:(::$?CLASS ::::?CLASS $, :bs($bs) where { ... })␤»
skids RT123623 04:49
jnthn Ooh, snow! :) Morning, #perl6 09:10
tadzik good morning jnthn 09:11
FROGGS morning 09:14
nwc10 I used to know that - "snö" 09:15
(but I had to look it up, because I couldn't remmeber what sort of accented o it has"
er. s/"/)/
JimmyZ morning, jnthn 09:23
moritz nwc10: in Norwegian it would be snø - not sure about Swedish 09:24
nwc10 Google thought Swedish was snö
moritz might well be possible
nwc10 it used to be the only Swedish word I (reliably) knew 09:25
I fail - I don't even know "beer" (in Swedish)
jnthn öl
nwc10 good. that's like Danish.
I stand a chance of remmebering that.
thanks
jnthn++
FROGGS do you pronounce the swedish ö like the german ö? 09:26
moritz it's very close
that is, indistinguishable for a German 09:27
jnthn I already knew snö, because it's one of the words sometimes used to explain why my train is late/cancelled :P
moritz de snø, de snø, tidelibom
nwc10 "the big book of Swedish railway excuses"? 09:28
jnthn: do they also have the "wrong kind of snow"?
jnthn "Comes in 3 volumes!" 09:29
Yes, there's that too :)
nwc10 (which, seriously, was a genuine excuse - the "wrong" kind was very fine dry snow, not the usual wet snow, and the wrong kind was getting through the grills and stuff, and then melting inside the trains)
moritz which of course no engineer could have predicted 09:30
nwc10 possibly they could, but the cost/benefit analysis was "oh, smeg it" 09:32
(possibly using a ruder term)
jnthn
.oO( "oh, снег it" )
09:34
mathw morning! 09:44
in England we have the wrong kind of leaves on the line
which is laughed at a lot, but they form a sort of slippery film that means the trains can't brake effectively 09:45
recent news reports said they were testing train-mounted lasers to clear such things off the tracks
it's the future!
I can tell because we have Perl 6 and LASERS ON TRAINS 09:46
moritz we had lasers on watches in 2001 (in a Bond movie, that is... :-)
mathw sets up a GitHub repo for Railway::Util::Laser
sergot hi o/ 09:47
FROGGS sergot: btw, I am working (hard) on XML::LibXML, in case you wanna joing the fun :o) 09:54
join*
sergot: the good thing is, once we have the libxml2 bindings, XML::Compile should be fairly straight and perhaps easy to port 09:59
and then we can slurp WSDL files and access webservices just like an ordinary routine /o/ 10:00
moritz and then we're doomed. 10:01
FROGGS no we're not :o) 10:02
moritz I'm 70% joking and 30% serious
pretending a remote interface is local is dangerous 10:03
FROGGS .oO( perhaps we are DOMed )
moritz because reliability, security and performance differ significantly between local and remote interfaces
FROGGS moritz: you'd call it on your soap object... like in P5
moritz FROGGS: then it's likely a rather small DOOM :-) 10:04
sergot FROGGS: sounds interesting :)
jnthn Still, it's fun to see moritz++ on his SOAP box... :)
sergot FROGGS: I'm joining :))
FROGGS \o/
--> github.com/FROGGS/p6-XML-LibXML
moritz guess I read too much Fowler 10:05
jnthn moritz: I largely agree, fwiw. :)
citeseerx.ist.psu.edu/viewdoc/downl...p;type=pdf is good reading on the matter
FROGGS sergot: the test files have a lot commented out tests, that need some missing mapping or functionality
sergot: that'd be a good place to start
moritz jnthn: but you can't resist a SOAP pun :-) 10:06
FROGGS sergot: besides that, I have the tests from the P5 modules uncommitted on my box... I'll commit these once I've 6ified them a bit 10:06
nwc10 programming.tudorconstantin.com/201...y-won.html -- ... it results that the average Perl developer has 12 years of software development experience. What kind of code would you prefer in your business critical, money making software products? ... 10:20
I had never thought of spinning it *that* way. 10:21
sergot FROGGS: oki :) 10:22
FROGGS sergot: commit messages go to #perl-lwp-gsoc btw 10:23
osfameron nwc10: nice link, thanks 10:32
nwc10 osfameron: credit davewood for it (I failed to, above)
osfameron nwc10: ah, great (I just RT'd @tudorconstantin's tweet about it in the end) 10:39
Woodi_ hallo today :)
Woodi_ orginal plan for Multics/Unix was to have memory in "layers" but accesible in same way. but Unix got "everything is filesystem" :) so maybe remote objects accesing/calling could be generalized in some way too ? 10:43
Woodi_ so we had a bit of state of Perl6 lastly :) looks nqp is what to blame (for everything). would be nice to know what is not right in nqp - becouse eventual porting Perl6 to new platfroms probably would be via nqp (or vm). and Parrot needs something from nqp and nqp wants something from Parrot... 10:51
Woodi_ also looks like Parrot threads have parts of sheduler/Channel build in, would be hard to get that MS API to Parrot ? :) 10:53
moritz Woodi_: what gives you the impression that nqp is to blame for anything? 10:54
Woodi_ it is common part in hot discusions 11:03
Woodi_ moritz: and nqp is natural candidate for problematic place: it API point to the external world from Perl6 11:05
moritz Woodi_: can you please be more specific?
Woodi_ not realy...
timotimo what discussions are you refering to? 11:06
moritz Woodi_: the only reference that I could relate to your statement was from rurban yesterday, who claimed that NQP lexpads were broken
timotimo (also: good morning!)
moritz (without any evidence)
but given that NQP lexpads implement Perl 6 semantics just fine, I hesitate to agree
Woodi_ moritz: first, from history ;) nqp was part when things goes separate ways. 11:07
moritz: possible it is that Parrot implementation cast something on Parrot-using applications 11:08
moritz Woodi_: your statements are still too vague for me to make any sense of, sorry 11:09
donaldh Woodi_: Who is "we" that "had a bit of state of Perl6" ? 11:10
Woodi_: What is nqp to blame for?
btyler also can't really understand what Woodi_ is talking about 11:11
timotimo neither
donaldh Woodi_: Perl6 is already on parrot, jvm and moarvm largely due to the portability of nqp.
Woodi_ moritz: np :) that history is more p2p then (actual) technical issues. but I'm sure rurban++ have something specific in mind about nqp "model" 11:12
donaldh So Perl6 can be ported to (oralready runs on) any hardware platform that can run those vms.
Woodi_ donaldh: we, here, nation of backloggers :)
Woodi_ donaldh: a) history of Perl6 internal conflicts; b) rurban++ pointed something about MoarVM's simple thread implementation - that's a state 11:13
donaldh: I do not negate need for nqp. just as it is one of methods to implement Perl6 so it must communicate with all that big world out there. and this make it point of problems 11:15
timotimo we have problems inside NQP, we have problems inside Rakudo, we have problems inside parrot, moarvm, the JVM ... i don't understand what point you're making :) 11:16
donaldh Woodi_: If you have some specific nqp problems that need to be fixed then describing them would be helpful, so we can have a go at fixing them. 11:17
Woodi_ timotimo: just some specific info not our usual pink fog :)
donaldh: that's my point. I would like to know more eg. what rurban++ would like to have available from nqp 11:18
timotimo not meaning to offend, but it seems like you're just adding more pink fog right now? at least i don't exactly understand what you mean
oh, so maybe it's that you're receiving some pink fog from rurban? 11:19
Woodi_ timotimo: possible, I assume rurban talk sensibly :) maybe from Parrot paint of view.
Woodi_ also: "simple thread optimization", maybe there is no such thing :) 11:25
optimization^Wimplementation
rurban github.com/perl6/nqp/issues/67 11:35
FROGGS I remember that one 11:37
it is just... I don't know what to do
moritz FROGGS: I felt that same. We should add that to the issue 11:38
jnthn donaldh: Did you get any further with gist.github.com/donaldh/91a212b38725642131be ? 11:42
FROGGS I dunno what "support the new Proxy pmc" means by looking at github.com/perl6/nqp/blob/master/s...lexpad.pmc
rurban: can you explain a bit what we need to do?
jnthn donaldh: Now I'm more concentrated, #2 still feels like the way to go (assuming we're clearing them on the cloned node after cloning) 11:43
donaldh jnthn: good reminder. I have a trivial fix that clears the annotations at the same time as clearing the node.
jnthn donaldh: Ah, cool. 11:44
donaldh: Then I'll not task steal it anytime soon :)
donaldh I'll commit the nqp changes and then submit a PR for rakudo.
jnthn \o/
FROGGS donaldh++
jnthn Does it shave much off CORE.setting size, ooc?
donaldh A bit yes. i will make note of the size differences. 11:45
jnthn Cool :)
I got a meg or so off yesterday in a branch I'm working on; that was measured on MoarVM, but (once I do a bit more porting of 6pe) we'll get a win on JVM too; maybe less given the .jar is compressed. 11:47
timotimo a meg isn't half bad! 11:49
rurban I'm a bit busy preparing the new release on slow vms... 11:56
FROGGS rurban: no hurry 11:58
dalek p: 9f1320c | donaldh++ | src/QAST/Node.nqp:
Add clear_annotations method.
12:06
nwc10 is there a release name yet for this month? 12:10
donaldh CORE.setting.jar 2.9M -> 2.6M (10%)
nwc10 nice.
donaldh That's nearly 1M off the raw .class file. 12:11
nwc10 win 12:12
jnthn \o/
nwc10 [Coke]: is there a name yet for this month? 12:14
as it looks like he's the right person to ask directly
jnthn err& 12:15
nwc10 doh, my pun-o-matic is failing me, as I can't quite figure out a seamless way to make some comment about "going out the dor" 12:16
nwc10 andthen no-one else attempts to help me. :-( 12:19
masak .oO( help me, orelse ) 12:28
donaldh jnthn: github.com/rakudo/rakudo/pull/356 12:35
dalek kudo/nom: 37a03fc | donaldh++ | src/Perl6/Actions.nqp:
Clear the QAST annotations when building inlining info.
12:38
kudo/nom: 35c0507 | donaldh++ | tools/build/NQP_REVISION:
Bump nqp version to get QAST::Node.clear_annotations
kudo/nom: 0bf4263 | FROGGS++ | / (2 files):
Merge pull request #356 from donaldh/nom

Clear the QAST annotations when building inlining info.
moritz looking at the discussion and the two patches for pull request 356, it's clear to me that quite some diagnosis work (several hours) went into this, and yet basically only three lines of codes were added :-) 12:49
FROGGS moritz: I love it when you only have to add or tweak a few lines... often that means that the approach is right :o) 12:51
vendethiel FROGGS: or that you added bigger bugs ;-) 12:52
moritz FROGGS: or even just remove a line or two :-) 12:53
the other day I thought "what would happen if we made scopes first-class objects?" 12:55
and a vision emerged where variables/objects inside a scope could be either private or public
private elements are only exposed to the lexical scope itself, public ones can be accessed from everywhere 12:56
arnsholt donaldh++ 12:56
moritz and by adding some scope as an outer to a scope, you could get importing / inheritance-like structures
indeed, donaldh++
and then i wondered how far object orientation and scopes could be unified 12:57
jnthn donaldh++ # nice find!
FROGGS moritz: interesting idea
moritz and I thought "wait, scopes have no instantiation", but that's not entirely true 12:58
entering the outer scope kinda instantiates a scope
but it's not quite the same as with objects
(just for the record, this is not something that I want to pursue for Perl 6, more of a general interesting in programming languages)
I guess I have to mediate a bit more on that 12:59
moritz well, lexicals in a closure are kind of like attributes, and instantiation does correspond to taking a closure / creating a scope in some way 13:00
jnthn moritz: In C#, they compile closures to an object plus a delegate (function pointer associated with object instance), and promote the local variables to be stored in that object. Which shows that at least as an implementation strategy the idea works... :) 13:05
moritz jnthn: well, I thought more the other way round: implement objects in terms of scopes/closures 13:08
or not implement, more "expose to the user"
jnthn ah 13:13
lumimies moritz: IIRC Self works somewhat like that 13:26
lumimies moritz: It uses prototype delegation as access to an outer scope 13:28
moritz lumimies: ah yes, the prototype model does seem to fit with the idea 13:29
masak good afternoon, #perl6 14:00
masak m: my @a; my $i = -2; try @a[$i]; say $! ~~ X::Subscript::Negative; say $!.^name 14:38
camelia rakudo-moar 0bf426: OUTPUT«False␤X::OutOfRange␤»
masak I have a test failure in 007 because the exception used to be X::Subscript::Negative but is now X::OutOfRange instead.
I will change the 007 code regardless -- just curious what prompted this change. 14:39
arnsholt More general, I guess?
masak why is that a good thing here? X::Subscript::Negative is more specific and more descriptive. 14:40
I can't think of a better situation to use it.
note that we still *have* X::Subscript::Negative in the setting.
arnsholt Yeah. But for an array that supports arbitrary indices (which Perl 6 arrays should, ultimately), I think out of range is the appropriate response
masak I don't think that argument holds up as long as I'm using .[] 14:41
my S09 is a bit rusty, but I think .[] always starts at 0.
donaldh the subscript is out of range. The fact that it is also negative is an interesting property, but not the error.
masak why did it change from one (specific) exception type to another (more general and less descriptive)? 14:42
arnsholt Ah. I thought an appropriately shaped array was supposed to support @foo[-1]
donaldh don't negative subscripts select from end?
masak that's Perl 5.
in Perl 6, that's spelled .[*-2]
arnsholt No, not as "index from end", but an array that lets you have something like -2 .. 2 as valid indices 14:43
masak then you have to use .{}, IIRC. 14:44
arnsholt Ah, ok
jnthn masak: It may be an unintentional change of behavior; lizmat++ is the person to ask 14:45
masak aye, I saw her changes in the git log. 14:45
it's probably just a change introduced by mistake.
m: say X::Subscript::Negative ~~ X::OutOfRange
camelia rakudo-moar 0bf426: OUTPUT«False␤»
donaldh Sameex
Same exception for both ends of the range? 14:46
dalek : 033b83e | sergot++ | misc/gsoc-2015/ideas.md:
ideas page for gsoc2015, lets fill it up
14:47
masak then why do we still have X::Subscript::Negative?
arnsholt I agree that Negative should be a subclass of outofrange 14:48
donaldh As long as you never use it for anything else. 14:49
arnsholt Troo
FROGGS m: my @a; @a[1.7] = 42; say @a[1] # <--- is that intended? 14:50
camelia rakudo-moar 0bf426: OUTPUT«42␤»
masak yes.
FROGGS k
masak what behavior did you expect, ooc? 14:51
JimmyZ m: ( 13827390 - 12081111 ) /1024/1024
camelia ( no output )
JimmyZ m:say ( 13827390 - 12081111 ) /1024/1024
masak `say`
FROGGS masak: some sort of out of range exception
JimmyZ m: say ( 13827390 - 12081111 ) /1024/1024
camelia rakudo-moar 0bf426: OUTPUT«1.66538143␤»
masak FROGGS: (a) works in Perl 5, (b) it's within range, in the sense that the array auto-extends 14:52
gtodd "To succeed in today’s market, services and IT organizations must use high-performing technologies to increase revenue and margin while improving customer satisfaction, gain competitive advantages and strengthen their brands."
masak "not an integer" does not mean "out of range".
gtodd oops
ww 14:53
masak gtodd: you meant to paste that to #marketingbs ? :P
FROGGS masak: though, the indexes are integers, not nums
masak gtodd: as a modern consumer, I'm always looking for more ways to engage with brands. 14:54
FROGGS: Perl has a tendency to cast rather than fail when it's straightforward to do so.
JimmyZ m: say ( 13827390 - 12077603 ) /1024/1024
camelia rakudo-moar 0bf426: OUTPUT«1.66872692␤»
masak FROGGS: just as hashes auto-cast to Str keys, arrays auto-cast to Int indices.
jnthn masak, FROGGS: You could say it's a floored design... :P
JimmyZ donaldh++ # 1.668 smaller on MoarVM 14:55
donaldh nice! 14:55
masak jnthn: floor wax *and* dessert topping!?
FROGGS jnthn: in german I could say: "I'm going to the ceiling" :P
masak: yes, you are right of course
gtodd heh my chat app is "friends: with [email@hidden.address] .. etc. meant to paste in there
JimmyZ with 6pe will 11M
*will be
gtodd masak: machine translation really fails on some of these things :) 14:56
jnthn BS in, BS out... :P
JimmyZ jnthn: will we have static optimization for .moarvm in the long future? :P 14:57
gtodd masak: OTOH this could be a sort of fortuitous accident that inspires #perl6 to boost the brand! 14:58
jnthn JimmyZ: Perl6::Optimizer and NQP::Optimizer do the static optimization stuff. Dynamic optimization is inherently dynamic. 14:58
That is, based on the types and usages patterns that actually show up at runtime.
JimmyZ I meant something like CSE and AA etc 14:59
basic AAa/CSE 15:00
jnthn I can imagine CSE showing up in Perl 6 level optimization, perhaps... AA isn't an optimization, it's just an analysis you need to do something with, and the sorts of things you'd do are likely better done at VM level. 15:01
And about those two at VM level, you probably get more bang for your buck if doing them post-inlining.
And inlining certainly depends on type specialization, which is certainly dynamic. 15:02
So no, I don't see those two wanting doing at bytecode assembly time
It's also important to remember that optimization is costly and has to pull its weight.
masak gtodd: "if only we had more marketing people among us" :P 15:03
jnthn And "do it when we know the code is hot" is one way to do better on that axis.
JimmyZ jnthn: I saw a lot code like wval ....; getattr ..... when accessing $!x multi time in a method, which looks like a good static optimization
JimmyZ it's about CSE? 15:04
JimmyZ is not sure...
jnthn Under spesh, though, the getattr tends to become a pointer index operation, and the wval instruction is deleted.
You could certainly lift duplicate wval accesses 15:05
Though again, we can JIT most of those into static pointer loads.
JimmyZ so it's about load forwarding 15:07
timotimo JimmyZ: can you also measure the maxrss of a hello world before and after donaldh's patch? 15:17
JimmyZ timotimo: look like ~0.01s save 15:23
jnthn I think timotimo meant memory use 15:25
But another 0.01s off is good too :)
timotimo yeah, memory usage please :) 15:27
JimmyZ REPL: 55.1M, , after hello world: 127.8m 15:30
REPL: 55M, after hello world: 119.6M
save 8.2M , donaldh++ again 15:31
timotimo holy nice!
donaldh++ # i like that a lot
jnthn away for a few hours & 15:34
oh, and donaldh++ again :)
lizmat good *, #perl6 16:57
dalek osystem: 8cebaad | (David Warring [email@hidden.address] | META.list:
added CSS::Module::CSS3::Selectors - a component of CSS::Module
17:31
dwarring ^^ that's a small low depenency, for when you just want Level 3 Selectors 17:38
dwarring prompted by discussions a few days ago on porting Mojo::DOM::CSS 17:39
hoelzro: ^^ hoping that might be a useful lightweight alternative
dwarring to the pretty hefty and experiemental CSS::Module 17:40
btw, CSS::Grammar will also need to be reinstalled 17:42
flussence I tried writing a CSS grammar around 2010-ish, but a bunch of things made me give up out of frustration. I think the css3-syntax spec itself had errors... 18:01
moritz jnthn: am I right in assuming that instances of class Variable are only available in traits? 18:02
masak flussence: I imagine part of the difficulty is that (like with HTML), CSS has to be fault-tolerant and resume the parse even when there are errors.
flussence masak: part of the frustration, back then, was waiting insane amounts of time for small tests to run :) 18:04
masak huh.
flussence and the regex engine didn't always work as expected - I think I picked the wrong time to try heavy string processing projects... 18:05
lizmat masak: wrt to the changed <0 exception: I felt that one exception for all out of bounds errors would be best
lizmat I just haven't gotten around to removing the other <0 errors, which is why there is still code using it 18:06
masak lizmat: I see.
lizmat but if you think we should have a separate exception for <0
masak lizmat: I don't have any objection either way -- but I was curious about why the semantics had changed.
lizmat then I'll put those in again
masak I didn't see it announced anywhere.
and it broke my code, because I relied on Rakudo throwing that exception :)
lizmat well, I've moved the <0 check from postcircumfix[] to at_pos 18:07
masak but it's all good -- already fixed my code and now we're throwing the exception instead.
lizmat that feels fragile
and reminds me of the whole discussion on p5 wrt to new warnings
masak once the exception type goes away, we'll either declare it ourselves, I guess, or decide to just have one OutOfRange type too.
lizmat and the use of "use FATAL"
moritz m: my %h is EnumMap;
camelia rakudo-moar 0bf426: OUTPUT«===SORRY!=== Error while compiling /tmp/24Hb6NMOin␤Variable trait 'is TypeObject' not yet implemented. Sorry. ␤at /tmp/24Hb6NMOin:1␤------> my %h is EnumMap⏏;␤ expecting any of:␤ constraint␤»
moritz didn't we used to do that?
masak moritz: not that I recall. 18:08
lizmat not as far as I now
I tried to when I was working on traits
but my fu was too weak then, and probably is now
skids Only way I could get at an EnumMap to test somethin the other day was to make a Match.hash
lizmat ?? 18:09
moritz m: say EnumMap.new(a => 42).perl
camelia rakudo-moar 0bf426: OUTPUT«EnumMap.new()␤»
moritz m: say EnumMap.new("a" => 42).perl
camelia rakudo-moar 0bf426: OUTPUT«Default constructor for 'EnumMap' only takes named arguments␤ in method new at src/gen/m-CORE.setting:950␤ in block <unit> at /tmp/ihhEVMv0qi:1␤␤»
moritz m: say EnumMap.new().perl
camelia rakudo-moar 0bf426: OUTPUT«EnumMap.new()␤»
moritz ah well, at least an empty enummap is easy to get :-) 18:10
skids ^^ what moritz just did
lizmat I'm not sure what you'd expect there
EnumMap does not have public attributes
skids Id' expect it to operate like a ro Hash. 18:11
moritz m: for EnumMap.new(a => 42) -> $p { say $p.perl }
camelia ( no output )
skids m: my %h = Hash.new(1 => 2); %h.say # that works, so why not EnumMap?
camelia rakudo-moar 0bf426: OUTPUT«1 => 2␤»
lizmat skids: we could do that, I guess 18:13
lizmat masak moritz jnthn TimToady timotimo comments? 18:14
moritz lizmat: I agree with skids++ that EnumMap is pretty useless right now as a user-exposed type 18:15
lizmat for what I can seem, EnumMap is not really a first class citizen atm
moritz right 18:15
so we should either make it one, or hide it as much as possible
masak EnumMap, besides having a really wonky name, is currently being kept in the cupboard under the stairs, yes. 18:16
skids Do subclasses of EnumMap benefit efficiency-wise from notinheriting an initializer? 18:18
lizmat I doubt it
moritz skids: I don't think performance is the issue
skids: it's more that hash assignment is implemented in the STORE method 18:19
skids: so the Hash constructor creates an empty hash, and then calls STORE
skids Ah.
moritz skids: but EnumMap doesn't have the STORE method
moritz (all "if I remember correctly") 18:19
vendethiel
.oO( or maybe we should have a "is ro" on variables. )
18:20
or is that what ::= is for?
lizmat tries something by moving new and STORE from Hash to EnumMap 18:22
moritz lizmat: do your remember what 'has $.slash' in class Variable is about? 18:24
oh, it seems to be the match object with which it was parsed
lizmat yup, needed for some variable traits 18:26
iirc
masak the fact that this thread news.ycombinator.com/item?id=8906331 seriously argues that Perl *4* was the best Perl ever, feels oddly comforting in some way. 18:30
I mean, one suspects in many cases that HN is full of cooks, but it's seldom this clear.
huf i dunno, every time i tried to look at HN i found hype-chasers
masak it is a bit of a relief from the normal Perl 5 vs Perl 6 thing, I confess. :) 18:31
huf :)
gtodd masak: aren't they all very young "whiz kid" types who passionately believe they are entrepreneurs?
huf i guess perl4 was the last awk-replacement-ish-ish version of perl?
(note: i'm far too young to have used p4)
gtodd in case awk sed scripts did not work on your versio of unix you could install gnu versions or just install perl 18:32
huf yeah, perl is portable. it was the easiest way to implement readlink -f (iirc) on osx ;) 18:33
gtodd I remember using perl4 it with windows 3.1 ....
geekosaur finds HN mostly useless fwiw
gtodd (via telnet on a unix host)
huf yeah, at least reddit is racist and horrible, so it confirms my depressing worldview :)
gtodd twitter? :) 18:34
masak geekosaur: I find the articles interesting, but I usually just skim the comments for a little bit of perspective on the article itself. usually not that much. 18:40
geekosaur I never see comments. (/me <3 Shut Up browser extension) 18:41
japhb Did anyone have any ideas for how multiple Roles can all contribute to BUILD (or some other object construction hook) without having to write an explicit BUILD in the composing class that invokes the Role BUILDs explicitly? 18:44
timotimo lizmat: comments about what? 18:45
lizmat timotimo about making EnumMap.new a full ciitzen 18:58
$ 6 'my $h = EnumMap.new("a"=>42); $h<a> = 43; say $h' 19:01
EnumMap.new("a" => 43)
skids: I guess ^^^ should be verboten ?
skids Right, even assignment I think, maybe. 19:02
lizmat you mean afterwards assigning to $h ?
skids I mean I don't know, should declarative assignment work or not? 19:03
my EnumMap %h = ( ... );
masak no.
lizmat dinner&
masak not unless you are storing EnumMaps in that hash. 19:04
brrt FROGGS: fwiw i can explain the nqp lexpad bug report
masak remember, with collection types, the declared type before the variable is the type of the *values* stored in the collection type.
brrt or at least i think i can
skids Oh right. 19:05
That's one of those things I'll have to use 5 times before it finally sinks in :-) 19:06
dalek c: 53cbdb8 | moritz++ | / (2 files):
(paritially) document class Variable
19:07
gtodd unless one uses a language all the time ... how does one remember things .... ? 19:10
masak :)
gtodd with java your IDE remembers :) 19:11
the virtue of those crazy perl5 perlvar mnemonics was errm that you may have learned them under age 25 and so they were unforgettable :)
masak for me, it's about hanging things on the right hooks, mentally.
gtodd perl6 is/has a way
hmm yes
hooks
gtodd I think having sigils helps :-) ... but amazing error messages ++ 19:14
skids Yeah the error messages just keep getting better and better. 19:15
gtodd p6 error messages ++
gtodd I want them to be easier to make / add :-) ... but maybe not to the core distribution :-D I guess something like ~/.perl6critic/my_reminders .... 19:16
gtodd where I create my own custom error grammar that gets to know me :) 19:17
skids Maybe integrate that into an IDE editor and turn your common mistakes red. 19:21
gtodd perl6 has a grammar of itself ... now I want a grammar of myself using perl6 :) 19:23
hrrm can't build on bsd .... git hist says I'm on branch/nom --> 35c0507
In file included from src/core/threads.c:2: 19:24
gtodd src/platform/threads.h:7:5: error: conflicting types for 'pthread_yield' 19:24
moritz seems to be a MoarVM thing 19:25
so the moarvm commit might be more interesting 19:26
(but I likely won't be of any use either way)
gtodd hmm yeah can't tell ... when did it happen ... I haven't been updating moar nqp etc as frequently
gtodd looks
FROGGS gtodd: github.com/MoarVM/MoarVM/commit/01...nt-9331701 19:32
bartolin hi #perl6 19:33
FROGGS hi bartolin
bartolin is a bit too late to point to that comment
FROGGS just a bit :o)
gtodd FROGGS: perfect
bartolin did anyone had a chance to look at PR 218 for nqp (github.com/perl6/nqp/pull/218)? 19:36
nwc10 bisect (eventually) agrees 19:39
nwc10 0194409f7599850d73b8861cd26d2fe9b9f7f85b is the first bad commit 19:39
gtodd why would that line have been added (to quiet threads yield) ... for clang3.5? 19:42
bartolin gtodd: jnthn++ was fixing some warnings clang emitted (see also some of the preceeding commits) 19:43
gtodd yeah "Quiet pthread_yield() warnings." maybe I will just upgrade my clang :) ... but I guess it needs some sort of configure dancing to not break on older ones 19:44
bartolin gtodd: irclog.perlgeek.de/moarvm/2015-01-17#i_9957677 19:45
gtodd I will try to use mostly the same software as jnthn++ :-)
(except on BSD) and see what happens 19:46
dalek p: f2577cb | usev6++ | src/HLL/sprintf.nqp:
Do not try to intify a missing argument

do its job later on
fixes RT #122907
20:01
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122907
dalek p: ff57c3a | moritz++ | src/HLL/sprintf.nqp:
Merge branch 'master' of github.com:usev6/nqp
lizmat tried working on the Perl6 weekly just now, but is not feeling well enough 20:28
probably something I ate yesterday :-(
I'll try to do it tomorrow morning
moritz lizmat: get well soon!
(for your own sake, not just for the weekly) 20:29
lizmat moritz: thank you
masak lizmat: what moritz said.
dalek kudo/nom: d78c678 | lizmat++ | src/core/ (2 files):
Make EnumMap a first class citizen, skids++

EnumMap.new should now work like Hash.new. There are still issues to be resolved wrt to the immutability of the EnumMap. Most of this patch consists of moving methods "new" and STORE from Hash to EnumMap.
20:32
lizmat afk&
japhb jnthn: around? 20:43
dalek p: 52733c5 | (Gerhard R)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Optimize nqp::join() on JVM
21:04
p: a702d5a | moritz++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
Merge branch 'gerdr/opt-jvm' of github.com:gerdr/nqp
moritz see github.com/perl6/nqp/pull/106#issu...t-70560333 for a discussion of the merits of the patch just pushed 21:05
bbkr hi. how to properly define 2 classes with circular dependency? "class A; use B; class A; has B $b" (the other file has A and B reversed) still gives me info that A is not found 21:10
"class A {...}; use B; class A; has B $.b" - I meant that, not declaring A::A 21:11
arnsholt They need to be defined in the same file 21:12
bbkr can they be stubbed in same file but implemented in different? 21:15
arnsholt Don't think so. I can't quite remember why it's like this, but I'm pretty sure they need to both be in the same file 21:16
arnsholt Something to do with parsing, IIRC 21:16
bbkr thanks, I'll try this way 21:17
moritz arnsholt, bkkr: I think the catch is that you can only use a stubbed class as a type constraint if you un-stub (properly define) it in the same compilation unit 21:28
masak it's a bit like you can only call a sub if you declare it in the same compilation unit. 21:30
arnsholt Yeah. And there's a moderately fundamental reason it has to be like that, IIRC
masak only difference is that subs don't have to be predeclared.
I kind of like these "ok, you're allowed to do this, but I'll come back and CHECK at the end of the compunit" things. they make the language more forgiving without giving up on useful checks. 21:33
moritz well, with subs, the reason is that subs live in lexpads, and those are immutable
that is to say, they become immutable at CHECK time 21:34
so if they can't be resolved at CHECK time, they never can be
bbkr makes sense, thanks for explanation 21:40
moritz oh, another thing is sorting MMD candidates 21:44
moritz that needs to happen at some point, and if a type that appreas in a signature isn't fully defined, we don't know its MRO, and thus can't compare it to others for sorting 21:44
masak oh, that is a good reason. 21:45
moritz *appears 21:45
masak wow, a lot of things come together at CHECK time.
moritz I'm glad they do, otherwise all that stuff would need to happen at run time 21:46
masak or the compiler would do it ASAP but would lose a lot of that patience/forgiveness.
moritz and what happens if multi is called before the candidate list can be sorted? 21:48
masak that's an interesting question. 21:51
I'd say that'd force an early sorting of the candidate list. if it's to be allowed at all.
oh, you said "before it can be sorted". OK.
well, hm. I guess there are *some* dispatches that could work out anyway in some cases. 21:52
but it feels like playing with fire.
maybe the answer should be "don't do that".
masak m: class T { ... }; multi foo(Int) { say "Int" }; multi foo(T) { say "T" }; BEGIN foo(42) 21:57
camelia rakudo-moar d78c67: OUTPUT«Int␤===SORRY!=== Error while compiling /tmp/G5wODPXzyX␤The following packages were stubbed but not defined:␤ T␤at /tmp/G5wODPXzyX:1␤------> multi foo(T) { say "T" }; BEGIN foo(42)⏏<EOL>␤ expecting a…»
masak seems to can do dispatch before.
I wonder if there is some more interesting corner case than that...
bbkr r-m: use A B; # LTA error 21:57
camelia rakudo-moar d78c67: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
masak bbkr: reported? 21:58
bbkr checking RT right now... I'll report if not known yet
masak great
++bbkr
TimToady notes that subs are actually specced to become immutable at LINK time, to give the entire application a say in the matter 22:00
TimToady *can have a say 22:01
oh wait, 'to give'
nm
donaldh :) 22:02
TimToady obviously doesn't know enough about language :)
masak hugs TimToady 22:03
donaldh That's nice. I can run the spectests on JVM in under 20 min, with TEST_JOBS=4 22:04
moritz donaldh: how much memory do you need for that? 22:05
TimToady which probably drives the load average up to about, oh, 12
donaldh load above 8 yes.
TimToady though I can get away with =3 on 4 cores
if I don't mind firefox getting really sluggish 22:06
donaldh moritz: macbook pro with 16GB but the eval server runs with max 3000m heap
TimToady 3 kilometers? 22:07
donaldh moritz: That's Java 8
moritz donaldh: does the standard 'make spectest' use the eval server right now? 22:08
donaldh yes.
donaldh make spectest can only use the eval server on the JVM backend 22:08
the codez make it so 22:09
moritz donaldh: I just remembered some back-and-forth because the eval server didn't work reliably for some folks 22:11
moritz is glad he can spectest rakudo-moar in <4min without any eval server 22:12
dalek p: ae6e8e4 | donaldh++ | src/vm/jvm/runtime/org/perl6/nqp/jast2bc/JASTCompiler.java:
Tweak JVM bytecode generation - use constant bytecodes where possible.
22:16
jnthn back 22:52
Given EnumMap was meant to be immutable, giving it a STORE method feels kinda wrong. 22:53
japhb jnthn: Is there any (not completely hackish) way for multiple Roles to compose into the same class and yet all contribute to object construction?
jnthn moritz: iirc, Variable instances are created just for the purpose of variable traits, yes. 22:54
skids jnthn: I think lizmat knows that and that was what she was referring to about the immutability needing to be worked out. 22:55
jnthn japhb: As in, all specify code towards a BUILD?
japhb: Not afaik 22:56
has $.a = ...default value code...; # works fine
And the normal initialization approach too
japhb jnthn: I was looking to have a base class that specified a number of attributes, but roles could be composed in to a subclass to specify stock initialization methods for particular attributes. So that rather than specify code for building these attributes, subclasses could just 'does FooInitialization'. 23:02
But then I realized for some classes I wanted to initialize some attributes one way, and other attributes another.
masak nice: py3readiness.org/
japhb The only way I've found to do that is to take advantage of Role punning and 'is' the Roles, rather than 'does' it. 23:03
donaldh Is it possible to use nqp types in perl6 ? e.g. use QAST::Node, etc. in perl6?
or do I have to write nqp ? 23:04
jnthn donaldh: FROGGS++'s v5 module uses those from Perl 6, iirc 23:06
It's maybe not very convenient, but I think it works out.
donaldh jnthn++ FROGGS++ I just need :from<NQP> 23:11
skids m: role A { has $.a = self.foo_def; method foo_def { 4 };}; role B does A { method foo_def { 5 } }; class C does B { }; C.new.a.say; # japhb 23:12
camelia rakudo-moar d78c67: OUTPUT«5␤»
japhb skids: Hmmm, that's not quite I meant, but I might be able to make 'has $.foo = self.foo_def;' work out the way I'm wanting .... 23:14
skids Right now, if you diamond-compose the role with the "has" in it more than once, that only works for class composition, so don't try to do that in a role. 23:16
dalek kudo-star-daily: 921da01 | coke++ | log/ (9 files):
today (automated commit)
23:46
kudo-star-daily: ef16e7c | coke++ | log/ (9 files):
today (automated commit)
kudo-star-daily: c2b6519 | coke++ | log/ (9 files):
today (automated commit)
kudo-star-daily: da62159 | coke++ | log/ (9 files):
today (automated commit)
rl6-roast-data: 1def276 | coke++ | / (5 files):
today (automated commit)
rl6-roast-data: 1829743 | coke++ | / (5 files):
today (automated commit)
rl6-roast-data: d2a8174 | coke++ | / (5 files):
today (automated commit)
rl6-roast-data: ddde45c | coke++ | / (5 files):
today (automated commit)
adu wow commitfest 23:56
jnthn Hm, rakudo.moar-jit clean, 1 fail for rakudo.moar 23:57