»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
slavik1 perl6: say 2 ** 64 00:00
p6eval pugs, niecza v6-150-g612a7b7: OUTPUT«18446744073709551616␤»
..rakudo 4a6d21: OUTPUT«1.84467440737096e+19␤»
slavik1 still no auto-bignum for rakudo?
sorear still! 00:01
more like, colomon++ is on it!
pmichaud: ping 00:02
jnthn grrr...the time it takes to compile the setting PIR => PBC is getting annoying. 00:04
sorear pmichaud: my Base $x = Derived.new; sub foo(Derived $y is rw) { $x = Base.new; my Derived $z = $y; }; foo($x) 00:06
pmichaud: where does that fail?
pmichaud: can the type check be removed in the assignment to $z? 00:07
00:10 whiteknight joined
jnthn sorear: I think I pondered a while ago that "is rw" probably constrains various optimizations. 00:20
I suspect that's one of them.
00:24 lumi_ left
dalek kudo/nom: 2888998 | jnthn++ | src/Perl6/Metamodel/ (5 files):
Basic case of type checking against a role. Doesn't support parameter subtyping just yet.
00:25
kudo/nom: 68216e5 | jnthn++ | src/core/operators.pm:
Add prefix:<!>.
kudo/nom: f14f7dc | jnthn++ | src/core/ (3 files):
Add .count and .arity to Signature; Code has these methods and delegates to the Signature.
kudo/nom: c10daf7 | jnthn++ | src/binder/bind.c:
Gut existing slurpy hash/array handling, in preparation for re-implementing it with new Array and Hash types.
00:25 cotto left
colomon jnthn: what's with the strange syntax in Rat.new? No bless? And why is it only for Rat:U? Shouldn't calling new on a defined Rat work as well? 00:25
00:25 lumi_ joined
sorear ponders splitting at_key into get_key, set_key, and create_key 00:28
ditto _pos
jnthn colomon: let me look... 00:31
00:31 estrabd joined
jnthn colomon: Well, no point going through the whole bless thing - it's slower. 00:31
But the :U is dubious. 00:32
colomon So the BUILD thing represents a faster way to create an object?
jnthn colomon: If you call BUILD directly, yes
Though subclassing probably bets...interesting. :)
colomon oh 00:33
00:33 thou joined
jnthn *gets 00:33
Wonder if new wants to become a multi though
So we can have new overrides that are more efficient and still reach the normal interfce.
pmichaud colomon: much of the code in nom is workaround as opposed to "it's supposed to be this way" 00:37
because we don't have all of the object bless/create stuff in place yet.
colomon pmichaud: gotcah 00:38
*gotcha
I'm just trying to glance at it every now and then as so not to fall too far behind. Stupid busy $work.
pmichaud ultimately we'll just be able to use .new as we do in master... but at present there's no working bless that introspects the object attributes and does the initializations automatically
so moritz just created a BUILD to do it manually for now 00:39
sorear pmichaud: any thoughts on my type checking question?
pmichaud sorear: I don't think it's valid to remove the typecheck there, no. 00:41
jnthn pmichaud: ping 00:42
oh, you're right there :)
pmichaud jnthn: pong
jnthn pmichaud: May have a circularity sawing issue.
pmichaud: With Array and Hash.
my @a; # really needs Array to at least have its attributes known here 00:43
I suspect we're going to probably want to use @a in Mu, Any, etc.
sorear jnthn: Are you telling me that it's possible to have $x with a static type of Derived containing a value of type Base?
jnthn sorear: huh? I said we couldn't do the optimization. 00:44
sorear if the static type information can be *wrong*, and you're OK with that, then I have some head-wrapping to do
jnthn sorear: I'm confused. I said you couldn't remove the type check.
You seem to think I said it'd be OK to. 00:45
sorear jnthn: no, I do not think that
pmichaud sorear: if you're asking if it's possible for type constraints to be violated because of actions at a distance -- there's precedent for it, yes. 00:46
jnthn I suspect not in *that* case though.
pmichaud I'm not sure which case sorear is specifically referring to here.
jnthn An is rw param should aggregate the constraints, I thought?
sorear pmichaud: I come from a Haskell background
jnthn There *is* a possibility of screwing it up with :=
00:46 daniel-s joined
jnthn Or at least, that's been discussed. 00:47
sorear pmichaud: where I come from, type constraints are never violated. EVER.
pmichaud I think sorear++ is referring to the fact that $y's constraints are violated.
sorear *major culture shock confusion*
pmichaud sorear: this is a case where I don't advocate a particular interpretation; I simply have asked "how is this supposed to work" and this is the answer I got back. 00:48
i.e., other people have decided that the type violation is "normal" for Perl 6 here.
jnthn pmichaud: Yes, in that example though, I'm pretty sure that assignment would fail.
sorear where I come from, if a variable's type constraints can be violated, no matter how contrived the situation - that's a release-blocking compiler bug
pmichaud the assignment to $z, yes, but not the assignment to $x
jnthn pmichaud: oh, I see what you mean. 00:49
Yeah. Hm.
I'm not sure what to say besides "maybe constraints on rw parameters are pointless".
pmichaud the assignment to $x inside of foo means that $y is no longer of type Derived
jnthn Yeah, I missed that on the first read.
pmichaud: Back to what I was asking about Array/Hash - I suspect the declaration of their attributes may need to move in to BOOTSTRAP 00:50
pmichaud jnthn: I have no problem with that. 00:51
jnthn pmichaud: So we don't run into annoying "can't declare @foo/%bar variables before this point in the setting"
pmichaud: OK.
pmichaud there aren't that many attributes, anyway :)
jnthn pmichaud: I probably also have roles to the point where Real and Numeric can become roles.
At least, all known blockers to that are gone.
pmichaud jnthn: oh, wait, does this mean that Iterator and Iterable have to move into BOOTSTRAP also? 00:52
if so, that's kind of icky
jnthn pmichaud: Not automatically.
pmichaud well, Iterable, at any rate.
jnthn pmichaud: I'm not sure Iterable meets the criteria of "stuff that needs to be in BOOTSTRAP".
pmichaud it's a base class for List
jnthn pmichaud: Ah...class not role? 00:53
pmichaud well, we don't have roles yet :)
but yes, it tends to want to act like a class at the moment
jnthn OK
Does it declare any storage?
pmichaud not yet, but it might
00:53 lumi_ left
jnthn Ah 00:53
pmichaud another question ...
jnthn Then the storage aspect of it (only) would want to be in BOOTSTRAP.
pmichaud do you have to put all of the attributes into BOOTSTRAP?
jnthn It's all about storage. 00:54
pmichaud or is it possible to have some in bootstrap and some in setting?
jnthn pmichaud: Do you mean, per type?
pmichaud: Or overall?
00:54 lumi_ joined
pmichaud for Array and Hash 00:54
jnthn Then all
00:55 Mowah left
jnthn The criteria for "goes in bootstrap" is essentially "used in a declarative situation". 00:55
pmichaud anyway, I don't have any heartache over moving those into bootstrap
jnthn That is, the compiler wants to make instances of them as it builds up the environment.
pmichaud it does become kind of painful to have to put List and EnumMap in there as well, but I can deal with it.
jnthn Well, only the attributes 00:56
Not the rest.
pmichaud right
jnthn Essentially, P6opaque needs to know all the attributes before the first time it makes an instance.
pmichaud got it
and that would include the attributes of its base classes, too :-)
jnthn Otherwise it can't compute the SI optimized memory layout that'll let us do indexed access.
Exactly.
pmichaud feel free to move them around 00:57
jnthn Thanks, will do. Though probably tomorrow.
pmichaud (conceptually it's not much different from when we were defining these classes in PIR :-)
jnthn Yeah, though I expect we'll end up with the minimalish "has to be in BOOTSTRAP" set. 00:59
I only put stuff in there when it needs to, or when not doing so is going to be just far too painful otherwise.
pmichaud we should leave comments in the setting classes that indicate what's been defined in BOOTSTRAP
e.g.
class List {
# has $!items
# has $!rest
or 01:00
# From BOOTSTRAP:
# has $!items
etc.
jnthn ah, good idea
Will do that and add missing ones.
01:00 noganex joined
pmichaud my overall idea is that someone can look at the definition in core/ and from there figure out where everything is 01:01
it's okay to shorten it to just say # predefined in BOOTSTRAP
so that they know they also need to check BOOTSTRAP (without being specifically told what is there)
jnthn Ah, even better.
Then it's not maintaining the same thing in two places 01:02
01:04 noganex_ left, mtk left
jnthn pmichaud: Sleeping soon. Things for tomorrow: move array/hash to bootstrap, slurpy array/hash parameters, our-scoped variables and subs. 01:05
pmichaud: Anything else you'd like me to look at especially? 01:06
pmichaud those sound great
of those, slurpies would be the biggest help at the moment
jnthn OK. And .arity and .count are done. 01:07
pmichaud \o/
any feeling for the timing of bless/build/create ?
jnthn Plus put back basic (not finished yet) .perl in signature
So we get better multi-dispatch errors
(bless/build/create) once we have slurpies they're more approachable. 01:08
pmichaud wfm
I agree that's a blocker
jnthn Oh
We may need |@foo too
(to pass args on to bless from new...)
well, |%foo really
The other thing on taht is that I found this note in the spec: 01:09
"Note that the default BUILD will only initialize public attributes; you must write your own BUILD (as above) in order to present private attributes as part of your initialization API."
That's different from what we've been doing so far.
pmichaud oh, very much so.
I hadn't caught that one before.
jnthn Should we go with what the spec says? 01:10
01:10 lumi_ left
sorear it's new, I think 01:10
pmichaud I think yes.
sorear a reaction to rakudo's behavior
jnthn Oh, that's why :)
OK, if it's reactionary then I follow it :)
pmichaud That part of the spec makes initialization possible to be much faster
sorear prototyped successfully in niecza
jnthn Yeah
sorear pmichaud: how?
jnthn pmichaud: I plan to pre-computed a list of BUILDs that we actually ahve to call, in the meta-object. 01:11
pmichaud: Then just walk that list.
Rather than the craziness we do now
01:11 lumi_ joined
jnthn So if a class has now BUILD submethod of its own and no public attributes, we know we've nothing to call 01:11
pmichaud exactly
jnthn Now we always pointlessly call BUILD on Mu/Any
pmichaud it's a lot cheaper to only have to call BUILD for the public attributes.
jnthn Yeah 01:12
Quite happy about that change overall.
We'll break some folk's code.
sorear I don't follow. Why does it make a difference?
jnthn Maybe worth a warning in the June release.
pmichaud looks like it was changed 2010-11-05
github.com/perl6/specs/commit/5f60...a649c7aacb
jnthn Oh, I was burried in $dayjob back then.
And probably paying little attention.
sorear Why is only initializing public attributes so much faster than initializing all of them?
jnthn sorear: If you have a class with just private attributes, no need to call BUILD 01:13
sorear: Maybe calls aren't so expensive for you. They are on Parrot.
pmichaud what about something like has $!private = .... ?
jnthn hmm 01:14
I'm not sure quite where that is handled.
In BUILD feels wrong though
I mean, if the user writes their own BUILD we shouldn't ignore things like that.
sorear for me, Mu.bless calls BUILD submethods only for classes that define them
pmichaud well, it should be post-build, definitely.
jnthn Maybe taht lives in BUILDALL
sorear does Rakudo automatically generate BUILD methods?
pmichaud the defaults are supposed to happen after other building takes place
jnthn sorear: No, there's a default one in Mu 01:15
pmichaud sorear: in rakudo there's a default BUILD method that occur.... what jnthn said
jnthn That's what S12 is talking about by "the default BUILD", presumably. 01:16
pmichaud some fun:
in nqp, say(pir::const::CCLASS_WORD)
now results in
"say"(.CCLASS_WORD) 01:17
jnthn Whee.
pmichaud (in the PIR output)
jnthn
.oO( don't try that in Rakudo... :) )
pmichaud which means we don't have to deal with the silly Q:PIR .includes, and we also future-proof our bootstrap .pir
jnthn \o/
pmichaud (currently the bootstrap pir holds the constant values, not the symbolic constants, which means things break if/when parrot changes the values) 01:18
why not in Rakudo?
jnthn oh, ouch
pmichaud: Because at present it'll get boxed to a Parrot Integer
pmichaud it's a PAST::Val node
it's pretty smart about boxing 01:19
jnthn pmichaud: Yeah, but there's no way to say at present what to do if we have some I register and need a P register
afaik
I mean, on a per-HLL basis
It'd be nice if we had something like that in PAST::Compiler
pmichaud we can add that at some point. but yes, say(pir::const::CCLASS_WORD) would fail 01:20
but that's not the intended use case
jnthn Yes, that's what I meant
OK :)
pmichaud oh, wait
I don't think it'd be boxed at all
the pir that would be generated would be
oh, yeah, it'd get boxed
anyway 01:21
01:21 awwaiid left
pmichaud the use case in rakudo is pir::die("message", pir::const::CONTROL_RETURN) 01:21
i.e., as an argument to pir:: opcodes
jnthn ah, then that's just fine :)
pmichaud yes, the plan has been for PAST to support HLL-level boxing at some point 01:22
I'll add that to the new version of PAST
jnthn OK, great :) 01:23
01:23 fish|ipad left
pmichaud I'm being called away for a while -- bbl/tomorrow 01:23
01:23 fish|ipad joined, fish|ipad left, fish|ipad joined
jnthn Sleep time here also 01:24
night o/
01:26 whiteknight left 01:34 huycwork joined 01:36 fish|ipad left 01:38 lumi_ left 01:40 lumi_ joined 01:45 fish|ipad joined, fish|ipad left, fish|ipad joined 01:53 kid51 joined 01:58 fish|ipad left 02:04 araujo joined, araujo left, araujo joined 02:23 kid51 left 02:25 Chillance left 02:29 kid51 joined
TiMBuS quercus.caucho.com/ 02:38
i um
i lack words
02:43 lumi_ left 02:44 lumi_ joined
sorear so I implemented a new autoviv implementation that makes @a[0][0][0] = @a[0][0][5] = 10 work 02:52
but it's half as fast as the current one :/ *shelve*
colomon Is it only slowing down autoviv? 02:53
sorear no, all aggregate access 02:54
colomon oh, that's ugly
TimToady I assume you're still trying to do it all at run time, rather than isolating the knowable lvalues at parse time 02:55
colomon has up-to-date niecza and nom built for the first time all week... 02:56
afk # bed
pmichaud xyz( @a[0][0][0] ) # don't really know if it's lvalue or not at parse time 02:58
TimToady yes you do
now if it were a method, you'd have a point
pmichaud xyz could be multi
xyz( @a[$x] ) then
TimToady chances are they're all or none rw
but all knowable at compile time 02:59
pmichaud method call, then :-)
TimToady maybe we outlaw that :)
pmichaud afk for a bit # walk 03:00
TimToady but you can still know that no method declared in this program named "foo" was rw
sorear maybe outlaw what?
TimToady rw params on methods :)
in any case, I still think autoviv that can be known to be required at compile time is likelier to be faster than any lazy implementation of autoviv 03:01
and I think it's knowable much of the time 03:02
sorear compile time analysis is definitely going to be a huge win... 03:03
(I agree) 03:04
the main thing that still looms in my mind about whole-program analysis is the setting
if we have to analyze the user's program before we can optimize CORE, that'll really hurt my chances of getting 50ms -e 'say 2 + 2' :) 03:05
(on my system that seems to take about 8ms with perl5. also, it seems I have HZ=250) 03:06
Eevee or outlaw rw params entirely 8) this ain't C, you can return a list 03:07
sorear outlawing rw parameters would require us to special case = much more than we already do 03:08
and other operators, like ++ 03:09
Eevee ah, boo.
03:09 lumi_ left
TimToady well, that's why operators are functions in P6, not methods :) 03:09
03:10 lumi_ joined 03:11 am0c left 03:13 envi_laptop joined
TimToady it's also not entirely certainly that we can't outlaw rw params on a proto by proto basis 03:15
03:21 furryfishy joined, furryfishy left, furryfishy joined 03:23 Su-Shee_ joined 03:25 Su-Shee left
pmichaud what about lift xyz( @a[$x][$y][$z] ) 03:25
03:25 kid51 left
Util I love being able to call a sub as a method with the .&foo syntax. 03:27
I can even change foo($_,42) into .&foo(42) .
Where is this syntax mentioned in the Specs? 03:28
sorear S12:339 03:30
TimToady I think it's a bit ugly, actually :) 03:31
sorear It just occurred to me that there's nothing in the specs requiring CORE:: to be implemented as a loadable Perl 6 module
TimToady nope, can be purely lexical OUTER 03:32
in fact, I once had it set up such that you *can't* load CORE
sorear if it is just a bunch of stubbed routines from the runtime code, then I don't have any "perl6 -e '2 + 2' takes 500ms to run CORE's CHECK-time optimization" problems 03:33
03:35 hudnix left 03:37 lumi_ left 03:38 lumi_ joined 03:42 jaldhar left, jaldhar joined 03:49 ymasory joined
Util TimToady: Thanks! I must say that, if I did not already know about .&foo, I would not infer it from S12:339. 03:51
An explicit example would be a helpful addition (as well as being `ack`-able)
I can see how .&foo is implied, but it is a bit of a reach. 03:52
04:13 perlEnthusiatic joined
perlEnthusiatic hello 04:14
How can I get started to contribute to Perl6?
any1 here? 04:16
04:16 ymasory left
TimToady howdy 04:17
what are you interested in?
sorear welcome 04:18
TimToady perlEnthusiatic: mostly, just start playing with it, to begin with 04:19
find something fun to try to write
perlEnthusiatic I am interested in anything that is Perl 04:20
TimToady that's kind of a broad category these days :)
TiMBuS start simple. write some perl6 bindings for gtk :D 04:21
04:21 lumi_ left
TimToady if you're familiar with Perl 5, then probably you want to look at moritz's p5-to-p6 pages first 04:21
sorear perlEnthusiatic: perhaps I should ask why you are interested in Perl? 04:22
04:22 lumi_ joined
TimToady perlgeek.de/en/article/5-to-6 04:22
sorear If we know what brought you here, perhaps it would help.
TimToady what do you currently do with Perl?
perlEnthusiatic I am interested in Perl because I learnt it in 7 days after i passed out from college and made 3 figures salary at a corporate company... I never looked back eversince! 04:23
Watch Larry Wall's and Damian's interviews all the time and finally thought of contributing what I can 04:24
TimToady have you played with, say, C or mono?
sorear what natural language(s) are you familiar with? 04:25
perlEnthusiatic C, C#, C++ - C# is kind of better these days considering that I am working on it
TimToady one thing you can do is find something that hasn't been written in Perl 6 yet and write it; there's a list of tasks at rosettacode.org/wiki/Reports:Tasks_..._in_Perl_6 04:26
if you know C# you can probably help sorear out with niecza, since that runs on mono/.net
niecza: say "howdy perlEnthusiatic!" # greetings from mono 04:28
p6eval niecza v6-150-g612a7b7: OUTPUT«howdy perlEnthusiatic!␤»
perlEnthusiatic good, and you?
sorear for Perl6 to be a well-used language, it needs...
... faster compilers
TiMBuS niecza is not yet sentient 04:29
sorear ... faster, leaner runtimes
... more libraries in the box
... better infrastructure / CPAN integration stuff
TimToady me? I just hang out here and kibbitz...
TiMBuS the ability to determine lvalues
perlEnthusiatic I understand.
sorear ... more widely-disseminated documentation
... more public awareness 04:30
... probably other things
all of these are interrelated
perlEnthusiatic ok... 04:31
yath speaking of niecza, will it be able to call other CLI classes?
perlEnthusiatic I am taking a look at the things that are not implemented.
yath i.e. is this a design goal?
sorear yath: it can call other CLI classes; making it more transparent is a design goal
yath sorear: \o/
perlEnthusiatic guys, I am out. Be back later on. Excited to be part of the team. 04:32
TimToady welcome!
perlEnthusiatic Thanks Yim
Tim*
sorear niecza> Q:CgOp { (box Int (rawscall System.Console.get_WindowWidth)) }
80
04:32 perlEnthusiatic left
sorear something like that 04:32
yath cool! sorear++
sorear known gaping holes: * no support for overloading * no support for calling constructors * limited support for CLR primitive operations * no ability to add assembly references 04:37
04:40 kaare_ joined 04:56 JimmyZ joined 05:01 lumi_ left 05:02 lumi_ joined 05:03 nymacro joined
sorear std: my push $x; 05:09
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Malformed my at /tmp/fIqFDaVyZG line 1:␤------> my ⏏push $x;␤ expecting any of:␤ scoped declarator␤ typename␤Parse failed␤FAILED 00:01 118m␤»
sorear std: my ::push $x;
p6eval std 37a0cdd: OUTPUT«ok 00:01 119m␤»
sorear std: my sub Int foo($x) { } 05:18
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Return type Int is not allowed between 'sub' and 'foo'; please put it:␤ after the 'my' but before the 'sub',␤ within the signature following the '-->' marker, or␤ as the argument of a 'returns' trait after the signature. at /tmp/19JUuvJQKF line
..1:␤…
05:33 XoDys joined, XoDys left
sorear *mumbles at is_name having to reparse the name* 05:35
05:45 XoDys joined
sorear it would be a bit nicer if it could access the longname or identifier Match directly. I wonder why all the callers stringify it. 05:46
sorear feels like ey's on a reverse engineering project
niecza: #DEBUG -1␤say 2 + 2 05:47
p6eval niecza v6-150-g612a7b7: OUTPUT«DEBUG␤In EXPR, at 10␤In loop, at 10␤is_name say␤Looking for say␤Looking in MY:file</tmp/6wWodVbveI>␤Looking in MY:unit<CORE>:xid<837>␤Looking in MY:unit<CORE>:xid<1>␤Looking in MY:unit<CORE>:xid<0>␤say not found␤In EXPR, at 14␤In loop, at 14␤after push: 1␤In loop, at
..18␤after push:…
05:52 lumi_ left 05:53 lumi_ joined
sorear TimToady: Is the stuff in STD that tries to let lexical lookups fall-back to OUR:: and GLOBAL:: fossils? 05:55
06:01 kaare_ left
sorear afk walk 06:07
TimToady sorear: not sure--if there's a Foo package in GLOBAL, you should be able to find Foo::<$bar> without putting GLOBAL on the front of it 06:14
OUR is for looking up something in our package that hasn't been declared with 'our', so probably is meaningful if others can add vars to our current package, which they can 06:16
but maybe it's illegal anyway to use that as a bare variable without explicit OUR:: qualification 06:17
so maybe that one doesn't make much sense
06:19 thou left 06:21 envi_laptop left 06:26 f00li5h left 06:31 lumi_ left, envi_laptop joined 06:32 lumi_ joined 06:36 f00li5h joined, envi_laptop left 06:37 XoDys left
sorear returns 06:41
(with much more understanding of names, too)
06:45 kaare_ joined
moritz sorear: did you study with master Elodin? :-) 06:46
sorear no 06:47
moritz (sorry, obscure reference to fantasy, see "The Name of the Wind" by. P. Rothfuss)
sorear I studied, but noone else showed up :/
JimmyZ Does Perl 6 support static attrs? 06:54
sorear yes 06:55
Rakudo? no
syntax is 'my $.foo'
JimmyZ thanks 06:57
06:59 lumi_ left
sorear JimmyZ: are you writing some kind of documentation? 06:59
07:00 lumi_ joined
JimmyZ sorear: Nope, I thought about it yesterday night before sleeping 07:02
sorear speaking of which, *poof* 07:05
07:18 jfried joined 07:20 wamba joined 07:23 lumi_ left, lumi_ joined 07:38 jrockway left, ilogger2_ joined 07:45 hillu joined, clkao joined, Bucciarati joined, acrussell joined, cognominal joined, mj41 joined, cotto_work joined, barika joined, starcoder2 joined, c9s joined, Util joined, BinGOs joined, Tedd1 joined, Patterner joined, sorear joined, nymacro joined, sftp_ joined, meraxes joined, felher joined, prammer joined, mdxi joined, wolverian joined, krakan joined, _ilbot joined, charsbar__ joined, gabiruh joined, aloha joined, llabthgie joined, athomason joined, JodaZ joined, mux joined, nsh| joined, Raynes joined, mikemol joined, jdhore1 joined, snarkyboojum joined, eternaleye joined, ashleydev joined, LoRe joined, beppu joined, ascent_ joined, jesk joined, cschimm1_ joined, robinsmidsrod joined, Yappoko__ joined, c1sung joined, foomator joined, Grrrr joined, nrr joined, Helios joined, ribasushi joined, jql joined, bbkr_ joined, chitragupt joined, jasonmay joined, starcoder joined, uniejo joined, geekosaur joined, jdv79 joined, pochi joined, kfo_ joined, yves joined, silug joined, tomize joined, jnthn joined, betterworld joined, pjcj joined, simcop2387 joined, jtpalmer joined, domidumont joined, sivoais joined, stepnem joined, PacoLinux joined, xinming joined, kst joined, REPLeffect joined, george_z0rwell joined, frettled joined, lue joined, ChrisDennis joined, masak joined, Guest96628 joined, _patch joined, y3llow joined, Vlavv joined, TimToady joined, Su-Shee_ joined, wamba joined, Maddingu1 joined, lestrrat joined, tylercur1is joined, larks_ joined, szbalint_ joined, breinbaa1 joined, sunnavy joined, pnu joined, tadzik joined, takesako joined, cosimo joined, mathw joined, jjore joined, pmichaud joined, ingy joined, Juerd joined, flussence joined, Lorn joined, dukeleto joined, amkrankruleuen joined, colomon joined, [particle] joined, wooden joined, lumi_ joined, tty234 joined, tewk joined, pyrimidine joined, miso2217 joined, cxreg joined, hatseflats joined, perigrin joined, Eevee joined, jfried joined, takadonet joined, arnsholt joined, sbp joined, fhelmberger joined, huf joined, slavik1 joined, yahooooo joined, Gothmog_ joined, moritz joined, yath joined, Katibe joined, ruoso joined, drbean joined, apejens joined, PerlJam joined, szabgab joined, mberends joined, zamolxes joined, pothos joined, JimmyZ joined, _sri joined, envi_laptop joined, literal joined, HarryS joined, perplexa joined, furryfishy joined, buubot_backup joined, Trashlord joined, Bzek joined, tomaw joined, sftp_ left, nymacro left, sorear left, Patterner left, Tedd1 left, BinGOs left, Util left, c9s left, starcoder2 left, barika left, cotto_work left, Pathin joined, araujo joined, noganex joined, estrabd joined, Krunch joined, benabik joined, slavik joined, shachaf joined, cookys joined, Woody2143 joined, nebuchadnezzar joined, PZt joined, kcwu joined, baest joined, estrai_ joined, sjn joined, renormalist joined, broquaint joined, frodwith joined, zb joined, perplexa is now known as Guest4182, jfried left, Eevee left, perigrin left, cxreg left, hatseflats left, miso2217 left, pyrimidine left, tewk left, tty234 left, HarryS left, envi_laptop left, _sri left, JimmyZ left, pothos left, zamolxes left, mberends left, szabgab left, PerlJam left, apejens left, drbean left, ruoso left, Katibe left, yath left, moritz left, shachaf left, tty234 joined, risou joined, shachaf joined 07:49 jfried joined, kolibrie_ joined, kaare_ joined, f00li5h joined, diakopter joined, ggoebel joined, gfldex joined, mattp_ joined, skangas joined, rhr joined, jrockway joined, revdiablo joined, bs338 joined, spinclad joined, krunen joined, Eevee joined, perigrin joined, hatseflats joined, cxreg joined, miso2217 joined, pyrimidine joined, tewk joined, sftp_ joined, nymacro joined, sorear joined, Patterner joined, Tedd1 joined, BinGOs joined, Util joined, c9s joined, starcoder2 joined, barika joined, cotto_work joined 07:50 envi_laptop joined, _sri joined, JimmyZ joined, pothos joined, zamolxes joined, mberends joined, szabgab joined, PerlJam joined, apejens joined, drbean joined, ruoso joined, Katibe joined, yath joined, moritz joined 07:53 Su-Shee_ is now known as Su-She, Su-She is now known as Su-Shee 07:58 mj41 left 08:02 mj41 joined
TiMBuS :I 08:06
dalek kudo/nom: af773fb | moritz++ | src/core/Num.pm:
add Num.isNaN
08:16
kudo/nom: 8393f6b | moritz++ | / (2 files):
Add Complex (mostly copied from master)

Sadly I couldn't test it, because "Complex.new(2, 3).Str" segfaults in Rakudo_cont_decontainerize - but maybe it gives
  jnthn++ et. al. a useful start point for debugging
moritz nom: my $x = 3; say "foo $x" 08:18
p6eval nom: ( no output )
08:18 beekar joined
moritz ah, string interpolation in general segfaults. 08:18
pmichaud pmichaud@kiwi:~/rakudo$ ./perl6 08:22
> my @t; @t[0][2] = @t[0][0] = 9; say @t[0].perl;
[9, Any, 9]
\o/
moritz \o/ indeed 08:23
Method 'methodname' not found for invocatn of class 'SixModelObject' ... is really frustrating 08:24
pmichaud > my @a; @a[0][0][0] = @a[0][0][5] = 10; say @a.perl;
[[[10, Any, Any, Any, Any, 10]]]
\o/
mberends \o/ :-) 08:25
moritz wonders if pmichaud suffers from insNOMnia 08:29
mberends heh
pmichaud lately, yes.
I'm having so much -Ofun hacking that I've been foregoing sleep to do it 08:30
mberends istr that pmichaud generally gets by on a much-below-average amount of sleep 08:31
08:31 araujo left
pmichaud that was once very true, yes. but a few months ago I was needing above-average amounts of sleep. for me it seems to come and go in cycles 08:31
I'm heading back into a below-average period again, it appears :) 08:32
dalek kudo/nom: 3f8e441 | moritz++ | src/core/ (3 files):
add a few missing .abs methods, and avoid segfault in Complex stringification
moritz $ ./perl6 -e '1i'
Method 'new' not found for invocant of class 'Sub'
I have no clue where that Sub is coming from
pmichaud me either... but program initialization in general needs a fair bit of rework in nom 08:33
moritz the generated pir looks funny-ish 08:36
08:37 lumi_ left, lumi_ joined
pmichaud moritz: in the case of "$.re $op ($.im.abs)i" (which I know you've changed already) wouldn't there need to be parens after the method calls? 08:37
(that may or may not be why it failed)
08:38 jaldhar left
moritz pmichaud: simple interpolation of any variable segfaults in nom 08:38
08:38 jaldhar joined
pmichaud ah, that's an issue. 08:38
moritz pmichaud: and I think $.re is considered sufficently variable-ish that it doesn't need parens
08:39 HarryS joined
moritz perl6: class A { has $.foo = 3; method Str() { "Foo: $.foo" } }; say A.new.Str 08:39
p6eval pugs, rakudo 4a6d21, niecza v6-150-g612a7b7: OUTPUT«Foo: 3␤»
pmichaud well, the .abs would want one.
moritz aye
08:39 kaare_ left
pmichaud I guess since they parse as variables it fits. 08:40
moritz gist.github.com/1021349 lines 4 to 16... maybe pir -> pbc was faster if we didn't emit such constants 3 times :-)
tadzik :D 08:42
masak morning, #perl6.
tadzik I wonder how faster would it get if we passed it to |uniq
dalek kudo: ae5bead | pmichaud++ | / (3 files):
Update &infix:<=> to evaluate its arguments in a r-to-l sequence.
mberends good morning masak 08:43
pmichaud which constants?
moritz good morning tadzik and masak
tadzik .const 'Sub' $P14 = "11_1307867594.6099" 08:44
pmichaud I only see it twice there. :) 08:45
moritz the third time it's stored in a different (unused) PMC 08:46
.return ($P44)
.const 'Sub' $P46 = "12_1307867594.6099"
.return ($P46)
pmichaud that's actually a different constant. 08:47
note the "12_" instead of the "11_"
moritz it's the same sub
oh
ok
pmichaud I agree it ends up being unused (more)
moritz still dead code
TiMBuS hey pmichaud, w/r/t autovivifying and lvalues: have you figured out a solution to the "@a[1..*] = @b[1..*]" problem?
pmichaud TiMBuS: Yes, I have.
TiMBuS i ask because i spent a solid few hours trying to fix it myself and failing pretty miserably and id love to hear how 08:48
you did it
pmichaud there are still some design issues, but figuring out the assignment part itself is no big deal
the major question at this point is how we signal that something is "infinitish" 08:49
TiMBuS i thought the current list implementation had to track if something was potentially infinite
pmichaud we've speculatively used ,* to mean "this parcel acts like it's infinite", and then any such parcel used in an array causes autotrimming to take place
sure, the list implementation tracks if something is potentially infinite -- what we've been missing is how to signal that a sequence is infinite 08:50
e.g., if I have a gather/take statement, how can I signal "the results of this gather are potentially infinite"?
so, the answer is that we do something like (gather {...} ,*) 08:51
which creates a Parcel with the contents of the gather, and the Parcel "knows" that it's infinite because of the final ,*
TiMBuS i see
pmichaud so, when that gets used as a subscript, the postcircumfix<[ ]> knows to check subscripts as it goes and stop when it finds one that is beyond the end of the current array (i.e., don't extend the array) 08:52
what we call "autotrim"
(dead code) the reason for the dead .return there is that we have to do some fakery in the first sub in order to get "main" to work properly and still have :load :init subs take place in the proper sequence. the end result of that fakery is that the PAST compiler gets a little confused and we get two returns 08:54
...which has mainly to do with the fact that parrot doesn't give us good control over :load versus :init versus :main (further complicated by the fact that subs with :outer have to physically occur after their outer context, which means that :main cannot be both the last sub in a file and an :outer target). 08:55
08:57 daniel-s_ is now known as daniel-s
TiMBuS so TimToadys solution was to check for lvalue-ness at ast building time. I'm guessing this is impossible? 08:57
masak yes, the initialization of private attributes was spec'd to go away after the Big Discussion about introspection of attributes. the one that TheDamian started on p6l.
TiMBuS: it does sound at least difficult. 08:58
ingy o/
pmichaud masak: ah, yes, I forgot about that discussion
masak pmichaud: the other part that needed to go away was .perl printing private attrs. 08:59
ingy masak: going to yapc:eu?
masak ingy: yes \o/
TiMBuS also, is there a reason to not just assume any gather/take is potentially infinite instead? saving the need for the hacker to make a special parcel setup (unless that is what you're already 'magically' doing)
pmichaud TiMBuS: I'm not willing to say impossible, but we've come up with a few (possibly obscure) instances where it doesn't seem possible
masak ingy: though being three events away, it does feel a bit distant :)
pmichaud TiMBuS: the sequence 1...10 is implemented using gather/take, but is obviously not infinite.
ingy masak: \o/\o/
pmichaud in general, we implement sequences and other very-lazy operations using gather/take, but we don't want all (or even most) of those to be treated as infinite 09:00
ingy masak: 3rd for me too, what others?
pmichaud same thing goes for things like I/O and the like
ingy has 9 confs planned from now to eo11 09:01
TiMBuS ...assume infinite unless provably not? no, no that requires language analysis.
ingy masak: actually y:eu is my 4th
pmichaud the person implementing &infix:<...> has enough context to be able to say "this should act infinite" -- we just need some way to signal that in the returned value.
moritz should consider getting a "real" job to be able to afford more conferences :-)
ingy moritz: just stop living a "real" life 09:02
masak ingy: NPW next weekend, then FPW the next.
moritz ingy: no way, family still takes precedence
.oO( or "binds tighter", in p6 speak :-)
TiMBuS being lazy is hard :s 09:03
ingy masak: YAPC:NA, DebConf, CCC, YAPC:EU, IPW, OSDC.fr, PPW, YAPC:Tokyo, OSDC.au 09:04
09:05 icwiener joined
ingy lives the Python dream... 09:05
s/Python/$perl6_dialect/ 09:06
tadzik damn those junctions, where do they come from 09:07
09:07 lumi_ left
ingy masak: anyway, let's plan on some hacking 09:07
09:08 lumi_ joined
tadzik if a junction is created, the phrase /:i junction/ should appear somewhere in the generated pir 09:10
?
pmichaud not necessarily
any() would create a Junction, for example
as would infix:<|>
tadzik ok, I'll look for that
pmichaud lots of things can create junctions
masak ingy: yes, let's! 09:11
tadzik: have you tried minimizing the code?
tadzik masak: seems that I should 09:13
but the simplest case fails :/ 09:14
09:14 Mowah joined
tadzik it's this silly thing, the function returns a pod node, the returned thing is a junction 09:14
let's see what happens when I inline a function 09:15
09:16 nymacro left
masak tadzik: if the simplest case fails, that's significant. :) 09:16
tadzik whenever it's returned, it magically becomes a Junction 09:20
masak what's the smallest piece of code that you can demonstrate this with?
tadzik oh wait, I think I'm close 09:21
yes, got it
masak \o/
tadzik passing $<identifier>.substr(4) to a .new makes the object become a Junction as soon as it's returnet
or even returned
masak is it possible to demonstrate with p6eval? 09:22
moritz try $<identifier>.Str.substr(4)
tadzik there we go
Null PMC access in find_method('perl')...
moritz or (~$<identifier>).substr(4)
tadzik in 'Junction::Str' at line 1
so $<identifier> is a Junction! 09:23
moritz what does $<identifier>.PARROT report?
tadzik or is it? :)
Junction
masak wtf
moritz wtf
pmichaud I bet somewhere in your grammar you have $<identifier> = { foo | bar }
tadzik yeah, I wanted to say it gently, but seriously, wtf
$<identifier>=[ 'code' | 'comment' ] 09:24
pmichaud or something like that.
tadzik weeps
pmichaud is that inside of curlies?
tadzik that's inside a token, yes
pmichaud can I see the whole token ?
tadzik but || doesn't change much. Sure
masak tadzik: why d'you keep using | for alternations? it's a ticking bomb... :/ 09:25
tadzik github.com/tadzik/gsocmess/blob/ma...mar.pm#L78
masak: yeah, you warned me, I remember :)
masak warning still applies. :)
tadzik but still, that part was supposed to be fired on sym<abbreviated>, not <abbreviated_raw>
moritz I guess it just feels more future-proof
tadzik so that one should not apply
yeah, must've forgot about that 09:26
but it's not the case it seems
Every | has now a pair in the grammar, the Junction still is 09:27
pmichaud I bet there's an unpaired brace somewhere.
masak tadzik: I still think you'd do well to minimize the failing code.
09:27 sjohnson joined 09:28 fish|ipad joined, fish|ipad left, fish|ipad joined
tadzik masak: the failing code is lists, which basically depends on the entire grammar with action methods 09:28
masak tadzik: well, you don't need to preserve the intended semantics, just the bug...
tadzik yeah, I know
oh, wait 09:29
if $<identifier> ~~ /^item [\d+]?/ { # <= turns Match into a Junction
yeah, ~~ modifies $/ :/ 09:30
pmichaud smartmatching match objects with regexes does weird stuff, yes. 09:31
try ~$<identifier> if you really mean to do a string match.
tadzik it then turns Match into a Proxy, but everything seems to work 09:32
pmichaud why are your action methods doing "return", ooc?
oh, those aren't actions methods I guess
tadzik yep
09:33 mj41 left
tadzik yay, fixed 09:33
pmichaud++ masak++ moritz++, Thank you 09:34
pmichaud isn't /^item [\d+]?/ the same as /^item \d*/ ?
that looks funny to me :-)
tadzik it probably is, yes
indeed, now that I think of it :0 09:35
:)
masak tadzik: if you give me a minimal test case, I'll submit the rakudobug for you. 09:36
daniel-s are modules and packages different things in perl 6? 09:37
masak daniel-s: yes. 09:38
tadzik masak: cando in a sec
daniel-s according to the documentation, the module keyword is what used to be the package keyword in perl 5
masak aye.
daniel-s is there something that explains it I can read?
masak well, S10 and S11...
tadzik lessons learned. When in doubt, stringify 09:39
another two tests fixed :)
masak daniel-s: but the executive summary is "no-one really knows what `package` is for in Perl 6". 09:40
tadzik: that honestly sounds like a lesson one shouldn't have to learn, ideally.
daniel-s masak: is that cos it's not finished yet?
pmichaud the fact that $<identifier> isn't a string seems like a good lesson to remember, though.
masak sure.
pmichaud p5 folks are used to thinking that matches return strings... but they don't.
masak but I don't see why .substr shouldn't treat it like a string. 09:41
pmichaud it's not .substr that was the issue
it was the smartmatch
masak I still haven't seen the code! :)
pmichaud and Regex.ACCEPTS(Match) doesn't necessarily imply "string match"
masak why would a smartmatch produce a junction?
pmichaud I don't know about that part yet.
multi method ACCEPTS(@topic) { 09:42
my Mu $match = any(@topic).match(self);
pir::store_dynamic_lex__vSP('$/', $match);
$match
}
because it thinks it's smartmatching an array
masak o.O
pmichaud (because Match does Positional)
masak oy vey.
pmichaud so the any() creates the Junction
which then autothreads over .substr 09:43
masak that has to be wrong.
that junction shouldn't leave the method.
pmichaud Array Regex array "boolean grep" .any.match(X) 09:44
straight out of S03
it returns a junction of match objects.
masak :'(
JimmyZ \o Programming Perl, Fourth Edition
pmichaud I agree it might want some improvement.
we can add an entry for Regex.ACCEPTS(Match)
which would be tighter than Positional 09:45
we can change Regex.ACCEPTS(@topic) so that it returns a boolean instead of a junction of matches
masak yes. 09:46
pmichaud none of the other smart match entries return a boolean, though, so I'm not sure that's right.
I also suspect the smartmatch operator got confused by the existence of the regex on the right-hand-side, causing it to treat the lhs operand (the match object) as a lvalue to be manipulated 09:47
masak hm.
pmichaud e.g., as in a substitution. so there might be a syntactic issue there as well
masak huh.
09:48 fish|ipad left
pmichaud ...because ~~ temporarily binds its lhs to $_, I'm wondering if the regex match operation is also manipulating $_ somehow. 09:49
tadzik rakudo: "" ?? say 1 !! say 2 09:50
p6eval rakudo 4a6d21: OUTPUT«2␤»
masak rakudo: say "".so 09:51
p6eval rakudo 4a6d21: OUTPUT«Bool::False␤»
masak JimmyZ: that's quite witty. took me a while to get, though :) 09:53
JimmyZ masak: Hehe
pmichaud omg it's 5am 09:54
gist.github.com/1021390 # \o/ 09:56
masak \o/
reimplementing Rakudo means feeling joy about the simple things again ;)
pmichaud yeah, I can use some of that these days :) 09:57
but even master can be fun:
rakudo: my @t; @t[0][2] = @t[0][0] = 5; say @t[0].perl;
p6eval rakudo 4a6d21: OUTPUT«[Any, Any, 5]␤»
pmichaud hmm, not updated yet. works in current master.
masak ooh
pmichaud oh, maybe I forgot to push.
masak that could explain it.
pmichaud no, I pushed 09:58
pmichaud@kiwi:~/master$ ./perl6
> my @t; @t[0][2] = @t[0][0] = 5; @t[0].perl.say
[5, Any, 5]
>
masak \o/
09:59 whiteknight joined 10:04 lumi_ left, lumi_ joined
dalek kudo/nom: a7476b2 | pmichaud++ | src/Perl6/Actions.pm:
Update variable interpolation in string literals for 6model version of strings.
10:05
kudo/nom: 08ac96b | pmichaud++ | src/ops/perl6.ops:
Allow Routine objects to associate with Parrot Coroutines as well as Subs.
moritz pmichaud++ 10:17
dalek p: 6a0f778 | pmichaud++ | / (3 files):
Make a common set of pir constants available.
10:18
p: ce077cd | pmichaud++ | src/stage0/ (6 files):
Update bootstrap to get built-in includes.
p: 9d5b199 | pmichaud++ | src/PAST/Compiler-Regex.pir:
Convert first set of .CCLASS_* constants to remain symbolic in generated PIR.
p: c1aa27f | pmichaud++ | src/PAST/Compiler-Regex.pir:
Eliminate final .CCLASS_* non-symbol constants in regex code gen.
p: 67d1c79 | pmichaud++ | src/NQP/ (2 files):
Add pir::const::CONSTANT to NQP.
p: 285bf9f | pmichaud++ | src/stage0/ (6 files):
Update bootstrap to enable pir::const:: constants in NQP sources.
p: 8adbe89 | pmichaud++ | src/HLL/Compiler.pm:
Update some pir constants to use pir::const:: instead of Q:PIR.
p: c4d0afb | pmichaud++ | src/HLL/Grammar.pm:
Remove more extraneous .include's.
masak \o/ 10:19
pmichaud afk, sleep -- bbiaw
masak <TimToady> me? I just hang out here and kibbitz... 10:31
cracks me up every time that happens :P 10:32
I guess TimToady gets some satisfaction from doing that kind of Henry V move, too... 10:33
sbp heh
10:40 awoodland joined 10:43 dju joined 10:46 dju left 10:47 sftp_ left, dju joined 10:48 lumi_ left, lumi_ joined
jnthn afternoon, #perl6 10:55
masak o/
JimmyZ afternoon, jnthn 10:56
11:11 awoodland left
masak 下午好, JimmyZ 11:12
11:12 Guest4182 is now known as perplexa, perplexa left, perplexa joined
JimmyZ 下午好,masak 11:24
daniel-s hugme: hug someone 11:41
hugme hugs someone
11:41 dju left, dju joined, dju left, dju joined
masak mystery hug! 11:42
daniel-s hugme: hug masak 11:43
hugme hugs masak
masak beams 11:45
moritz beams masak into hacking mode 11:47
masak moritz: I"m sorry, today is more or less full of $dayjob... :/ 11:48
moritz masak: no worries, happens to all of use 11:52
11:52 lumi_ left
masak I'd love to hack, but I need to get this out of the way first. 11:52
11:53 lumi_ joined
masak can't even complain about $work intruding on the weekend... I've have weeks to prepare this, but I saved it for the last minute. :) 11:53
11:58 jaldhar left, jaldhar joined
daniel-s phenny, tell daniel-s hi 12:14
phenny You can tell yourself that.
12:14 Mowah left 12:16 huycwork_ joined 12:17 daniel-s is now known as daniel-s_1, huycwork left, daniel-s_1 is now known as daniel-s 12:19 daniel-s is now known as daniel-s_, daniel-s_ is now known as daniel-s 12:23 daniel-s left 12:25 mj41 joined 12:26 kaare_ joined 12:32 mj41 left 12:35 daniel-s joined
daniel-s what does the >>. do? 12:36
12:36 Moukeddar joined
daniel-s @modules>>.*noticed($event) 12:36
masak daniel-s: it distributes the method calls over all of the elements.
flussence like map { $_.noticed($event) } @modules
but different
masak rakudo: my @a = 1, 2, 3; my @b = @a>>.exp(); say @b.perl 12:37
p6eval rakudo ae5bea: OUTPUT«[2.71828182845905, 7.38905609893065, 20.0855369231877]␤»
daniel-s so in this case, @modules is a while bunch of classes, some of which may have the noticed() method
it's calling every method of every class (if there is one) that's called noticed()? 12:38
masak or have several, through inheritance.
daniel-s ok, thanks
masak the * makes it look up the MRO chain.
daniel-s MRO? 12:39
masak method resolution order
rakudo: class A { method x { "A" } }; class B is A { method x { "B" } }; class C {}; my @a = A.new, B.new, C.new; my @b = @a>>.*x; say @b.perl 12:40
p6eval rakudo ae5bea: OUTPUT«["A", "B", "A"]␤»
masak \o/
the first "A" comes from the A.new instance. the "B" and the "A" come from B.new. C.new leaves no trace.
jnthn++! 12:41
12:41 lumi_ left 12:42 hudnix joined, lumi_ joined
flussence (I totally didn't notice the .* part there... still not fully awake :) 12:42
masak the .? .+ .* are a stroke of genius, IMO. they are strangely consistent with regex quantifiers. and they put the focus on inheritance hierarchies in a good way. 12:44
12:45 Chillance joined
TiMBuS masak, probably one of the best features in perl6 imo 12:46
daniel-s oh, forgot: masak++ 12:47
pastebin.com/3dmaZXCp much easier to read than masak's example just now 12:48
masak TiMBuS: yes, I agree. 12:49
TiMBuS: imagine how ugly it'd look if method invocation were still ->
:)
TiMBuS ack
flussence rakudo: class A {}; A.?b(); A.c();
p6eval rakudo ae5bea: OUTPUT«Method 'c' not found for invocant of class ''␤ in main program body at line 22:/tmp/n8_ySNGQBc␤»
flussence ooh
masak yeah.
daniel-s @a>>->*x;
TiMBuS when i saw .? i was amazed. imagine if javascript had it for walking around DOM nodes
instead of checking for null over and over 12:50
flussence imagine if javascript had it for *anything*...
masak TiMBuS: coffeescript has it, I bet.
Moukeddar Hello Perlers
masak Moukeddar! \o/
Moukeddar my hero :)
what's up? 12:51
masak we were just praising the extreme suitability of .? and .+ and .* in Perl 6. 12:52
rakudo: class A {}; class B { method hi { say "OH HAI" } }; A.new.?hi; B.new.?hi; 12:53
p6eval rakudo ae5bea: OUTPUT«OH HAI␤»
Moukeddar perl always freaks me with it's statements :) 12:56
masak how so?
JimmyZ I guess you are saying perl 5?
masak I mean, we're all freaked, but in different ways... :)
Moukeddar like that one you mentioned before 12:57
masak it's really pretty straightforward.
it's like A.new.hi, but with an extra ? thrown in.
Moukeddar A doesn't inherit B , still it can access its methods
masak oh no no
that's not what's happening.
JimmyZ rakudo: class A {}; class B { method hi { say "OH HAI" } }; A.new.?hi; 12:58
p6eval rakudo ae5bea: ( no output )
masak A.new.?hi doesn't find any method, but instead of dying, the program just carries on.
thanks to the .?
JimmyZ rakudo: class A {}; class B { method hi { say "OH HAI" } }; A.new.?hi;
p6eval rakudo ae5bea: ( no output )
masak it's B.new.?hi that finds a method.
daniel-s TiMBuS: in the Net::IRC::Bot module, when a callback sends something to the channel, I'm using $e.conn.sendln() and sending raw IRC
JimmyZ no output
daniel-s is there an easier way of doing simpler things like sending messages to a channel or user? 12:59
TiMBuS woah. woah. someone uses my module??
masak :D
TiMBuS use $event.say()
the event has the context of the event so, it can just reply
masak TiMBuS: oh, the '@modules>>.*noticed($event)' line was from your module? :)
that explains it :)
TiMBuS so it was! 13:00
masak then it's no coincidence that you also like .* et al. :P
TiMBuS i used perls native dispatch to avoid hobbling together yet another event based system
masak \o/
TiMBuS: I've used it for the exact same thing. in Yapsi.
Moukeddar so , ? prevents exceptions? 13:01
masak Moukeddar: yes, it makes it OK not to find the method.
TiMBuS daniel-s, oh my bad its $event.msg("Reply text") my bad 13:02
masak Moukeddar: .* and .+ are more about inheritance, like you assumed.
Moukeddar uhm , like nullable types ? , like saying it's ok if it isn't found ?
TiMBuS not .say
masak Moukeddar: yes, there's a parallel.
TiMBuS it would have been .say but perl has that as a keyword so
daniel-s oh yea, thanks, I was about to say, because my bot just pooped itself
Moukeddar interesting thing that you implemented that :)
TiMBuS also daniel-s if you have any suggestions for features, please ask 13:03
daniel-s no problem
TiMBuS or if you have any design ideas
daniel-s also, I'm not really the only person who uses it 13:04
?
TiMBuS not sure
but i can say its probably not more than a handful of people
13:04 wamba left
masak rakudo: class A { method x { "life is like a dream" } }; class B is A { method x { "merrily " x 4 } }; class C is B { method x { "row " x 3 ~ " your boat" } }; say C.new.+x.join("\n") 13:04
p6eval rakudo ae5bea: OUTPUT«row row row your boat␤merrily merrily merrily merrily ␤life is like a dream␤»
masak oh! "gently down the stream"! 13:05
TiMBuS that ok. just insert it as a role with the decorator pattern
masak rakudo: class A { method x { "life is like a dream" } }; class B is A { method x { "merrily " x 4 } }; class C is B { method x { "gently down the stream" } }; class D is C { method x { "row " x 3 ~ "your boat" } }; say C.new.+x.join("\n")
p6eval rakudo ae5bea: OUTPUT«gently down the stream␤merrily merrily merrily merrily ␤life is like a dream␤»
13:05 Bzek_ joined
masak g'ah! :) 13:05
rakudo: class A { method x { "life is like a dream" } }; class B is A { method x { "merrily " x 4 } }; class C is B { method x { "gently down the stream" } }; class D is C { method x { "row " x 3 ~ "your boat" } }; say D.new.+x.join("\n")
p6eval rakudo ae5bea: OUTPUT«row row row your boat␤gently down the stream␤merrily merrily merrily merrily ␤life is like a dream␤»
Moukeddar lol 13:06
masak TiMBuS: I did it with 'nextsame' last advent calendar: perl6advent.wordpress.com/2010/12/1...s-cousins/ 13:07
Moukeddar loved the x for repitition
masak Moukeddar: there's also xx for repeating things in lists
TiMBuS yeah i read that and linked it on a few forums. quite nice
masak rakudo: say ("Moukeddar" xx 5).perl
p6eval rakudo ae5bea: OUTPUT«("Moukeddar", "Moukeddar", "Moukeddar", "Moukeddar", "Moukeddar")␤»
Moukeddar i'm being cloned
13:08 lumi_ left
masak Moukeddar: in Perl 5, both x and xx are called x, and it all depends on context. 13:08
Moukeddar like?
masak Moukeddar: "Moukeddar" x 5 would be string cloning, but ("Moukeddar") x 5 is list cloning in Perl 5.
daniel-s TiMBuS: on here: github.com/TiMBuS/Net--IRC/ where you give a little example
there's this line: modules = (AnnoyUsers.new(), Autoident.new(password => 'nspassw0rd')),
Moukeddar i understand
TiMBuS yep
masak Moukeddar: there's a lot of that kind of context in Perl 5. 13:09
daniel-s is it supposed to be module =>
13:09 lumi_ joined
Moukeddar YAY Perl :) 13:09
TiMBuS it is!
daniel-s ie. "=>" instead of "="
TiMBuS good catch
13:10 furryfishy left, buubot_backup left, Trashlord left, Bzek left, tomaw left
masak Moukeddar: I wrote a blog post of how I learned about that kind of context, if you're interested: strangelyconsistent.org/blog/the-ta...edy-on-irc 13:10
TiMBuS oh man i just saw my code again for the bots default nicknames. still proud of it 13:11
Moukeddar lol , the title is hilarious
TiMBuS has $nick = "Rakudobot";
has @altnicks = $nick X~ ("_","__",^10);
masak Moukeddar: yeah. I was the newbie :)
13:11 PhatEddy joined
Moukeddar you? 13:12
masak just read it, and you'll see :)
TiMBuS: nice!
TiMBuS: don't forget the backticks, too! 13:13
PhatEddy perl6: class A {has $.a}; class B is A {}; my A $a .= new; my A $b = $a.clone
p6eval niecza v6-150-g612a7b7: OUTPUT«Unhandled exception: Unable to resolve method clone in class A␤ at /tmp/o_bXafFnFM line 1 (MAIN mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1769 (CORE C837_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1770 (CORE module-CORE @ 57) ␤ at
../home/p6eval/n…
..pugs, rakudo ae5bea: ( no output )
daniel-s <PerlJam> masak: clearly you are insane.
haha
masak ;)
PhatEddy perl6: class A {has $.a}; class B is A {}; my A $a .= new; my B $b = $a.clone
p6eval niecza v6-150-g612a7b7: OUTPUT«Unhandled exception: Unable to resolve method clone in class A␤ at /tmp/RAfNrn9P4e line 1 (MAIN mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1769 (CORE C837_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1770 (CORE module-CORE @ 57) ␤ at 13:14
../home/p6eval/n…
..pugs: ( no output )
..rakudo ae5bea: OUTPUT«Type check failed for assignment␤ Container type: B␤ Got: A␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/NzzSrQsztG␤»
masak the adjoining Hacker News discussion was quite enlightening, too: news.ycombinator.com/item?id=1064622
PhatEddy Anyone about can suggest a way for me to do that second example w. rakudo? 13:15
masak lots of FP people thinking Perl is insane for not seeing that strings are really lists :P
PhatEddy: provide a 'method B' in the A class, and then fo 'my B $b = $a.B'.
PhatEddy: an A is not a B, so you can't explain to store it in a variable typed as B. 13:16
Moukeddar i think context behavior makes things more complex
13:17 Mowah joined
masak Moukeddar: I think I know what you mean. 13:20
Moukeddar: some Perl 5 programmers might disagree, though. saying "it's easy once you've learned it".
13:20 tomaw joined
masak but that's true of surgery and windsurfing too. 13:20
13:21 Trashlord joined
masak Trashlord! \o/ 13:21
Moukeddar lol,
PhatEddy masak: hmmm ... thanks but that is just an example and your solution doesn't quite cover what I actually want done - will explain in moment.
Moukeddar well , i find it just like context in an English conversation 13:22
masak PhatEddy: ok.
Moukeddar: right.
Su-Shee as someone from the humanities department I've always found "context" totally intuitive. in fact, how could something NOT be dependent on that? :)
PhatEddy rakudo: grammar g {token TOP {:i a}}; class lc_Match is Match { method Str { self.Match::Str.lc }; method orig { self.Match::Str } }; if g.parse('A') {say 'OK'; my lc_Match $lc = $/.clone; say 'something'} else {say 'no match'}
p6eval rakudo ae5bea: OUTPUT«OK␤»
13:22 buubot_backup joined
PhatEddy notice (think its a bug) that something never show up 13:22
masak Moukeddar: Perl 5 is very influenced by things from natural languages. some things worked out fine, others less so.
Moukeddar indeed 13:23
masak PhatEddy: ah, you don't own the A class in this case. I see.
PhatEddy right
Moukeddar i mean , the whole context idea , i find it pretty innovative
masak PhatEddy: well, the restriction still holds. Match is not an lc_Match, so you can't store it in an lc_Match container. 13:24
Moukeddar: in the case of 'reverse', you only have to learn one new builtin, and it does two things for you.
Moukeddar: so in a sense, it "saves space" in the brain.
maybe. :)
Moukeddar if there's a space already :p 13:25
masak yes, it's dangerous to talk about the brain as a hard drive, I know.
it's much more holographic than that :)
Moukeddar: one place where Perl 5 really messed up is in the conversion from lists to scalars. there are like three different ways that Perl 5 does that, and one has to learn when each one applies. 13:26
Moukeddar oh dear,
masak sometimes the list becomes the length of the list. sometimes it becomes the last element of the list. sometimes it becomes the stringification of all the elements.
Moukeddar isn't there some helper classes or methods to help deal with this mess , and specify exactly when to use each case? 13:27
and btw , you're pretty good at writing :) 13:28
the other day i started with design patterns , and i've found that i've been using many of them without knowing it , feels foolish 13:30
masak most of use recognize the patterns as something we've had contact with even before we knew their names. 13:31
it's like monads. you could have invented them. :)
(and probably have) 13:32
PhatEddy masak: don't you think that restriction make it difficult to extend internal classes and libraries? I will continue to poke around looking for some kind of solution. 13:35
Moukeddar monads?
Trashlord masak: hey :)
Moukeddar all praise the Trashlord 13:36
masak PhatEddy: it's not an restriction particular to Perl 6. that's how strict typing works.
PhatEddy thx
masak PhatEddy: the only way your example could work would be if there were some implicit narrowing casting being done in the background. there isn't. 13:37
gfldex PhatEddy: change "my lc_Match $lc
" to my $lc"
Moukeddar masak, i have one more request , is there some kind of dictionary for the main keywords in this field (programming and designing)
ex : Model , entity , behavior , etc
masak Moukeddar: monads exist in Haskell to preserve a central feature called "referential transparency", which means that functions never have visible side effects.
gfldex PhatEddy: if you dont want strict types, dont use them
masak Moukeddar: no, you just have to read a lot of stuff until it starts making sense. Wikipedia and c2.com help a lot, though. 13:38
Moukeddar so , there isn't a specific definition for those words or concepts?
just reading and watching? 13:39
PhatEddy gfldex: OK, I don't need strict types but I do want a modified Match object that stringifies in lower case and has method to return original match. BTW - don't know much about strict typing ... :(
masak Moukeddar: each of those three words you mentioned fire off a certain set of neurons in my brain. but they do that because I've read those words a thousand times by now; it's like a very composite taste experience :)
Moukeddar: so even if you found an excellent dictionary and read through it once, it's not of much use. you need to read it from a lot of angles. 13:40
Moukeddar so , you build your own definition for those words , right?
masak I guess. one that's fairly close to other people's.
Moukeddar ok n makes sense :)
gfldex PhatEddy: that makes sense but .clone is most likely the wrong way to do it. 13:41
tadzik ~~ 13:43
PhatEddy gfldex: thx - can you at least point me in the direction of a better/right way
gfldex PhatEddy: you want a copy constructor or you may want to try a wrapper around the stringify|say method 13:44
PhatEddy: if I get you right you want to modify the behaviour of an object at runtime. That's what nom is for. :) So for now you will most likely have to cheat. 13:46
13:48 hudnix left 13:51 lumi_ left 13:52 lumi_ joined
tadzik All tests successful. 13:57
I thought I'll never see this, and will have to leave to my home in the remote village covered in shame
TiMBuS rakudo: my $match = ("TiMBuS" ~~ /T(...)uS/); $match does role { method Str {return callsame.lc} }; say ~$match 13:58
p6eval rakudo ae5bea: OUTPUT«Null PMC access in clone()␤ in 'Str' at line 1␤ in main program body at line 7674:CORE.setting␤»
TiMBuS .. uh 13:59
didnt expect that
rakudo: my $match = ("TiMBuS" ~~ /T(...)uS/); $match does role { method Str {callsame} }
p6eval rakudo ae5bea: ( no output )
TiMBuS .. right 14:00
rakudo: my $match = ("TiMBuS" ~~ /T(...)uS/); $match does role { method Str {callsame} }; say ~$match
p6eval rakudo ae5bea: OUTPUT«Null PMC access in clone()␤ in 'Str' at line 1␤ in main program body at line 7674:CORE.setting␤»
TiMBuS just walks away
gfldex rakudo needs more nom:) 14:01
PhatEddy rakudo: grammar g {token TOP {:i a}}; if g.parse('A') {say $/; my $lc = $/.clone; say $/; say 'something'}
p6eval rakudo ae5bea: OUTPUT«A␤»
gfldex rakudo: grammar g {token TOP {:i a}}; if g.parse('A') {say $/.^WHAT; say $/.clone.^WHAT; } 14:04
p6eval rakudo ae5bea: OUTPUT«too many positional arguments: 2 passed, 1 expected␤ in main program body at line 22:/tmp/I1_mKd8uAW␤»
14:05 araujo joined
gfldex rakudo: grammar g {token TOP {:i a}}; if g.parse('A') {say $/.WHAT; say $/.clone.WHAT; } 14:06
p6eval rakudo ae5bea: OUTPUT«Match()␤»
14:07 JokeBot joined
daniel-s Jokebot: joke please 14:07
JokeBot is what I've been working on for the last hour or so 14:09
yep, that's right, it's completely useless
TiMBuS wheee
daniel-s ..mostly cos all the jokes suck
I wanted to find 1 line ones, so that it could put it in the chat 14:10
but they're too long, so it PMs them instead
TiMBuS daniel-s, check out my acme module
if you didnt see it
jnthn JokeBot: joke please
TiMBuS insert bitcoin for joke
jnthn that was awful 14:11
JokeBot: joke please
tadzik JokeBot: joke please
why privmsg?
TiMBuS JokeBot: joke me
aw
JokeBot: joke please
tadzik JokeBot: joke please
jnthn tadzik: because they're so bad we don't want to all see them :P
daniel-s tadzik: because alot of them are too long and I didn't want to flood the chat
jnthn JokeBot: joke please 14:12
14:12 XoDys joined
TimToady JokeBot: joke hugme 14:12
daniel-s I'll find 1 line ones that it can say in the main chat
14:12 XoDys left
colomon JokeBot: joke please 14:12
14:12 JokeBot left
TimToady hugme: hug jokebot 14:12
hugme hugs jokebot
daniel-s yea, they're too long
TiMBuS but it works!!
daniel-s you killed my bot
TiMBuS lmao
tadzik phenny: tell JokeBot joke please
phenny tadzik: I'll pass that on when JokeBot is around.
jnthn lol 14:13
daniel-s I'll find out what the flood limits for freenode are and slow it down 14:14
TiMBuS oooh thats what i need to do with my module. throttling.
and unrelated: the state hash sucks. ill make it an object 14:15
daniel-s I needed to use: "use Net::IRC::Modules::Autoident;" 14:16
instead of "use Modules::Autoident;"
because of where it is in the heirarchy
is that correct?
it worked anyway
TiMBuS thats likely
ive had to move things around a bit 14:17
Net::IRC::Modules::Autoident argh that is so long to type D: 14:18
stupid me for picking a perl5 name 14:19
daniel-s, if you think of any cool modules, write them and ill put them into the modules folder :D 14:22
reminder: perl6 has no threads or async IO so watch out if you make a bot do anything that pauses for too long (like the twitter module i gave up on) 14:23
daniel-s because it won't respond with pongs?
TiMBuS even if it did have async IO id need to make a callback handler and oh man.. thats like 10 lines more code ._.
yeah itll time out 14:24
tadzik I don't understand. I added more tests, and this still works
TiMBuS lol
14:27 envi_laptop left
masak dang, I missed the JokeBot. :) 14:31
tadzik ;)
14:35 awwaiid joined
pmichaud good morning, #perl6 14:36
tadzik good morning pmichaud 14:38
14:38 MayDaniel joined
jnthn hi, pmichaud 14:39
14:41 lumi_ left 14:42 lumi_ joined
masak good morning, pmichaud. 14:45
tadzik I think S26 is at least partly wrong. S26:821 says "This is yet another ordinary paragraph", but S26:51 says "An indented Pod block is considered to have a I<virtual left margin>, determined by the indentation of its opening delimiter". So the "ordinary paragraph" has a virtual left margin, so it's a code block, am I right?
14:47 donri joined
masak goes and reads those two bits 14:47
tadzik thank you, my mentor
masak tadzik: let's see that we agree on this: the paragraph at S26:821 is an "ordinary paragraph" because it has the same indentation as the heading at S26:819. yes? 14:48
14:49 JokeBot joined
tadzik I think that's what it tries to say, yes 14:49
daniel-s JokeBot: joke 14:50
masak tadzik: good.
JokeBot Worrying works! 90% of the things I worry about never happen.
phenny JokeBot: 14:12Z <tadzik> tell JokeBot joke please
tadzik but the code block description states:
masak tadzik: so even "ordinary paragraph" blocks have a virtual margin. but it must be 1.
tadzik A code block may be implicitly specified as one or more lines of text, each of which starts with a whitespace character at the block's virtual left margin.
masak nod. 14:51
tadzik masak: I think the previous ones have a margin of zero, or ""
masak I don't see a conflict.
tadzik while the last one has a margin of 4, or " "
masak directives (things that start with '=') set the "current margin baseline".
tadzik so that's where we disagree 14:52
masak when TheDamian says "virtual margin of 1", he seems to mean "on the current margin baseline".
so he's 1-based.
(as column numbers tend to be, I guess)
tadzik again: An indented Pod block is considered to have a I<virtual left margin>, determined by the indentation of its opening delimiter
and the opening delimiter is =begin pod, 4 spaces to the left
not the =head1
oh, I think I see your point 14:53
masak I don't get it. show with a nopaste?
tadzik but again, if it has the virtual margin, it's a code block, not an ordinary paragraph
masak your use of "virtual margin" confuses me.
tadzik masak: I'll gimp it for you for the visual experience
masak everything "has a virtual margin", and it's a number.
the virtual margin is just the regular margin minus the current margin baseline ( plus an off-by-one because we're one-based). 14:55
tadzik masak: see i.imgur.com/dhljt.png 14:58
masak looks
tadzik: you just made a picture where you pretended that the =head2 isn't there. what's up with that? :) 14:59
I explicitly pointed it out to you first thing I did in this discussion... 15:00
tadzik masak: because it isn't. It doesn't open a block
masak "This is another heading block"
tadzik "=head2 This is another heading block". Yep, and it ends
with a blank line below it
that's how abbreviated blocks work
masak and in the process, it set a new baseline margin, no?
tadzik nope. The opening delimiter sets the margin. The =head2 doesn't open anything, or if it does, it ends immediately 15:01
the last paragraph belongs to the toplevel =begin pod (imaginary), not to =head2 nor =head1
masak fine, I hear you.
what's the basis for this in S26?
tadzik S26:51
masak ok, right. 15:02
yes, I see now what you mean.
S26:819 does set a new baseline, but it's immediately re-set to the old one because it was an abbreviated block.
tadzik yes
masak I now agree with your interpretation. 15:03
did you email TheDamian already with some other question?
because this feels like one he could resolve if you emailed him about it.
tadzik nope, I took your point yesterday
masak (with the picture and the explanation)
tadzik I will, thanks 15:04
masak I'm very happy that you're running into these things.
tadzik I'll commit my code and tests now so you can look into it
masak it's model crunching. :)
no wait, "model churn" is the term.
pmichaud what about S26:135 -- does that apply? 15:05
tadzik I'm unfamiliar with it either way :)
tadzik looks
pmichaud: the only content of the =head2 block is the "This is another heading block". It's then ended by a blank line 15:06
masak pmichaud: the "Unlike Perl 5..." part?
pmichaud masak: yes
tadzik oh, this thingy
well, I assume that if the pod examples in S26 are not delimited with anything, they're delimited with =begin pod and =end pod 15:07
pmichaud in tadzik's png example, the indented text isn't within =pod, =nested, or =item, so it's not a code block
masak pmichaud: I think it's assumed that S26:821 is within a... what tadzik said. :)
it has to be within something for it to be Pod. 15:08
tadzik masak: commits pushed
masak and then =pod is sort of the natural assumption.
er, =begin pod
15:08 JokeBot left 15:09 dju_ joined
tadzik whoops, debugging code left 15:09
masak how embarassing. :) 15:10
tadzik luckily it's not swearing
masak s/r/rr/ 15:11
tadzik swearring?
15:12 dju left
masak yarr 15:12
no, I had to look up the spelling of "embarrassing", because it looked rong. :) 15:13
jnthn masak: swearring? wtfffffff?
:)
daniel-s I've noticed I've been doing this alot when I'm opening a file 15:17
pastebin.com/GCgXzUgL
is there a shorter way of doing the same thing?
jnthn my @jokes = lines("jokes.txt")
daniel-s awesome, thanks jnthn++ 15:18
15:22 MayDaniel left, lumi_ left
masak shouldn't that be lines("jokes.txt".IO) ? 15:22
15:23 lumi_ joined
masak S32/Str:395 seems to indicate lines(Str) works on the string, not on the contents of a file with that name. 15:24
15:25 daniel-s left
masak rakudo: say lines("Joke 1: not very funny\nJoke 2: a little funny\nJoke 3: extremely funny").perl 15:25
p6eval rakudo ae5bea: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/lX9HijKmp9␤ in 'lines' at line 5929:CORE.setting␤ in main program body at line 22:/tmp/lX9HijKmp9␤»
masak ...but Rakudo seems to be lagging.
masak submits rakudobug :)
dalek kudo/nom: ab08e61 | jnthn++ | src/ (6 files):
Move array and hash and dependencies partially into the BOOTSTRAP, so we can use them in declarative situations in the setting.
15:27
kudo/nom: d615b4f | jnthn++ | src/ (7 files):
Slurpy array and hash arguments. Also should mean optional array and hash parameters work again.
15:33 huycwork_ left
tadzik masak: wklej.org/id/545230/ wouldn't that fix your fresh ticket? 15:35
masak tadzik: well, there also needs to be a lines(Str) that DTRT in its place. 15:39
but it's a good start. :) the first half.
actually, you're probably right in that it satisfies the letter of the ticket. 15:40
tadzik there is one 15:50
masak: github.com/rakudo/rakudo/blob/mast...tr.pm#L488
masak might need to 'is export' that one to get the sub. 15:52
tadzik oic 15:53
dalek kudo/nom: 9b7d574 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Accidentally busted my '@a; @a[0] = ...' a couple of commits ago; this fixes it.
tadzik maybe we need some nomtests for regressions like this one? 15:54
jnthn tadzik: We may even have some, if only I ran them... :)
tadzik ;)
jnthn should make an effort to get at least t/00-parrot running consistently 15:55
masak jnthn: if that wasn't a branch, not running the tests would be an offense meriting karma withdrawal. 15:56
(but keep up the good work!) :P
jnthn masak: :P
It looks like we're dangerously close to passing all of 08-var-array.t 15:57
tadzik horray!
jnthn ooh 15:58
I guess say can use slurpies now
That probably gets us more tests.
tadzik what does it use now, arrays? 15:59
jnthn tadzik: a hack :)
tadzik :P
jnthn tries it 16:01
16:04 molaf joined 16:05 hudnix joined
jnthn Setting things that'd get us more of 00-parrot and 01-sanity: ++ (prefix and postfix), .Str on Array 16:09
dalek kudo/nom: c0312cd | jnthn++ | src/core/IO.pm:
Use slurpies for print and say now we have them.
tadzik I may get on it in a sec 16:10
16:11 lumi_ left
sorear good * #perl6 16:11
16:11 lumi_ joined
tadzik good * sorear 16:11
16:17 fish|ipad joined, felipe joined 16:19 fish|ipad left 16:20 fish|ipad joined, fish|ipad left, fish|ipad joined, wamba joined 16:25 thou joined
JimmyZ rakudo: class what is Cool { ... }; say so what; 16:27
16:27 ymasory joined
p6eval rakudo ae5bea: OUTPUT«Bool::False␤» 16:27
dalek kudo/nom: 8f7a0ac | jnthn++ | src/Perl6/ (2 files):
Get our-scoped subs working again.
16:30
moritz has seen zebras today
JimmyZ rakudo: class what is Cool { ... }; say so what.WHAT; #bug?
p6eval rakudo ae5bea: OUTPUT«Null PMC access in find_method('handled')␤ in 'prefix:<?>' at line 1␤ in 'prefix:<so>' at line 599:CORE.setting␤ in main program body at line 22:/tmp/5rLOHZ546o␤»
JimmyZ rakudo: class what is Cool { ... }; say so Cool.WHAT;
p6eval rakudo ae5bea: OUTPUT«Bool::False␤»
jnthn rakudo: class what is Cool { ... }; say what.WHAT 16:31
p6eval rakudo ae5bea: OUTPUT«Failure()␤»
jnthn nom: class what is Cool { ... }; say what.WHAT
p6eval nom: OUTPUT«The following packages were stubbed but not defined:␤ what␤␤current instr.: 'nqp;Perl6;SymbolTable;assert_stubs_defined' pc 2767 (src/gen/perl6-symboltable.pir:778)␤»
jnthn nom++ :)
moritz that is a Failure indeed :-)
JimmyZ nom: class what is Cool { ... }; say Cool.WHAT 16:32
p6eval nom: OUTPUT«The following packages were stubbed but not defined:␤ what␤␤current instr.: 'nqp;Perl6;SymbolTable;assert_stubs_defined' pc 2767 (src/gen/perl6-symboltable.pir:778)␤»
jnthn JimmyZ: Stubbing a package and not defining it is a compile time error.
std: class what is Cool { ... }; say Cool.WHAT
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Cool' used at line 1␤Check failed␤FAILED 00:01 119m␤»
jnthn er...that wasn't the error I was expecting. :) 16:33
std: class what is Cool { ... };
p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
JimmyZ std: class what is Cool { ... }; say Int.WHAT
p6eval std 37a0cdd: OUTPUT«ok 00:01 119m␤»
jnthn I'm sure STD used to complain about stubs.
JimmyZ I'm not sure why std accepts Int.WHAT 16:34
sorear niecza: class what is Cool { ... }; say Cool.WHAT
p6eval niecza v6-150-g612a7b7: OUTPUT«===SORRY!===␤␤Package was stubbed but not defined at /tmp/EoZq7dz64x line 1:␤------> class what is Cool { ... }⏏; say Cool.WHAT␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @
..2) ␤ at /hom…
sorear cribbed from nom
JimmyZ niecza: class what is Cool { ... }; say Int.WHAT 16:35
p6eval niecza v6-150-g612a7b7: OUTPUT«===SORRY!===␤␤Package was stubbed but not defined at /tmp/HUki7Kt6KQ line 1:␤------> class what is Cool { ... }⏏; say Int.WHAT␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @
..2) ␤ at /home…
tadzik moritz: visited a zoo with Ronja? :)
jnthn sorear: oh, you implemented it in niecza rather than std having it?
OK, I must be mis-remembering.
moritz jnthn: in nom, how do I get an RPA from an Array?
tadzik: yes
JimmyZ std: class what is Cool { ... }; say Int.WHAT # I gueess this also be SORRY ... ?
p6eval std 37a0cdd: OUTPUT«ok 00:01 119m␤»
moritz tadzik: though she wasn't very interested in the animals... too early for her 16:36
JimmyZ: no, it should rather never complain about Cool
sorear jnthn: 'role Foo[$x] { my method ::($x) { } }' After the method, what names are in lexical scope?
tadzik heh, I was showing a book full of animals to Mathilda today. She's able to point out the eyes, nose and ears of pretty much every animar, including a Crocodile, Coliber or a Cameleon
s/every/any/ I suppose
moritz tadzik: how old is she? 16:37
tadzik moritz: I think about year and a half
moritz sounds reasonable 16:38
tadzik oh, you may want to review the newest gsoc changes in some spare time 16:39
16:40 dju__ joined
moritz I'll put it on my schedule 16:40
tadzik thank you
jnthn sorear: Compile time error, I suspect. 16:41
moritz: Not sure off hand - ask pmichaud
sorear: Along the lines of "value not known at compile time" 16:42
sorear jnthn: how about role Foo[$x] { my method ::("k" x 10) { } }?
jnthn: how about role Foo { my method ::("k" x 10) { } }?
jnthn: how about class Foo { my method ::("k" x 10) { } }?
16:43 fish|ipad left
jnthn sorear: If we can statically work that out at parse time, it's probably kosher. 16:43
I'm not in a hurry to implement that though. :)
sorear as I'm currently redesigning the system, "my method" with a variable name is legal everywhere except in roles 16:44
16:44 dju_ left
sorear because all roles are parametric and roles defer evaluation of ... stuff to instantiation time 16:44
jnthn I suspect "variable is generic but we need its value in a non-generic context" issues will show up for various things. 16:45
yath hm. dumb question. how does @foo[*-1] work?
jnthn role Foo[$x] { constant $y = $x; } # probably also bad
yath *-1 is a block, as it seems
16:46 MayDaniel joined
jnthn yath: Yes. There's a multi candidate for postcircumfix:<[ ]> that takes a block and passes in the @foo.elems 16:46
yath jnthn: and that evaluates them how?
s/them/it/
jnthn yath: Subtracts 1 from it, meaning you have the index of the last element
pmichaud draft of my yapc::eu talk proposal, comments welcomed: pmichaud.com/sandbox/yapc-talk-1.txt 16:47
yath jnthn: no, i mean, if i have a block *-1, how would i call it, if i was an array?
jnthn my @foo = 1,2,3; say @foo[*-1] # *-1 is invoked with 3, so we look up @foo[2]
yath oh
jnthn yath: Sorry, I don't follow what you're asking...
yath rakudo: my $block = *-1; $block(23)
p6eval rakudo ae5bea: ( no output ) 16:48
yath err
rakudo: my $block = *-1; say $block(23)
p6eval rakudo ae5bea: OUTPUT«22␤»
jnthn oh, I see what your question meant now :)
yath jnthn: that was my actual question - thanks :)
yath is quite drunk, sorry ;->
sorear niecza supports running any code at BEGIN time, as long as it consists of string and number literals, infix:<,>, and infix:«=>» 16:49
jnthn yath: That's one way to use a Sunday :)
yath jnthn: it's holiday in germany tomorrow ;) 16:50
and i've got wine :)
nevertheless, i still spend my time trying to understand perl6 - even while drinking %-)
pmichaud yath: sometimes that's the best (and perhaps only) way to understand perl6 16:51
mberends pmichaud: perhaps mention series in the proposal?
yath pmichaud: heh
pmichaud mberends: +1
16:52 fish|ipad joined, fish|ipad left, fish|ipad joined
_patch rakudo: say 'food' ~~ /<?after f>o+/ 16:54
p6eval rakudo ae5bea: OUTPUT«Method 'after' not found for invocant of class 'Cursor'␤ in <anon> at line 22:/tmp/kn3SpGi9JX␤ in 'Cool::match' at line 2684:CORE.setting␤ in 'Regex::ACCEPTS' at line 6415:CORE.setting␤ in main program body at line 22:/tmp/kn3SpGi9JX␤»
sorear I find that depriving yourself of sleep until the threshold of delirium and then trying to understand stuff works, too
tadzik oh, I want to see that talk
_patch rakudo: say 'food' ~~ /o+<?before d>/
p6eval rakudo ae5bea: OUTPUT«oo␤»
tadzik I'd like to see "common caveats when handling lists in grammars" :)
jnthn tadzik: :P 16:55
sorear no "after" in Rakudo?
pmichaud pmichaud.com/sandbox/yapc-talk-1.txt # updated, mentioning sequences, examples, and reworking the content a bit
tadzik sorear: I don't think so 16:56
yay, gsoc-podparser still passes more spectests than master :)
pmichaud updated again 16:57
tadzik dogwalk & 16:58
jnthn pmichaud: Looks good :)
pmichaud any other talks people would like to see given?
mberends pmichaud: can the "better programs" at the end mean "prettier", "faster" or something else? 16:59
pmichaud mberends: ummm, "yes". :)
mberends "more readable" sounds a bit weak
pmichaud "more elegant code", perhaps? 17:00
_patch is there any way to currently do regex lookbehinds in rakudo?
mberends pmichaud: yes, and a performance benefit, if there is one
yath hm. is that a feature?:
rakudo: my @foo = <a b c d>; my $foo = sub { say @_.perl; return 1; }; say @foo[$foo] 17:01
jnthn yath: I don't think there is at the moment.
p6eval rakudo ae5bea: OUTPUT«(timeout)»
pmichaud I also wanted to somehow get in there that I think the talk would help Perl 5 programmers as well
yath jnthn: what am i exactly doing wrong? seems like the say @_.perl fails
pmichaud after using Perl 6 lists, you kind of think about Perl 5 lists in a new light too :)
jnthn yath: I'm not sure exactly. 17:02
pmichaud _patch: I'm not sure if lookbehinds are implemented yet. If so, it'd be <?after ...>
17:03 fish|ipad left
pmichaud yath: you're passing a block as an index to the array? 17:03
yath pmichaud: isn't that what *-1 also does?
pmichaud well, it actually passes a WhateverCode
yath pmichaud: $foo = sub { return 1; } works, fwiw
rakudo: my @foo = <a b c d>; my $foo = sub { return 1; }; say @foo[$foo]
p6eval rakudo ae5bea: OUTPUT«b␤» 17:04
pmichaud mberends: "Come to this talk and learn how Perl 6's list features can result 17:05
in more elegant and faster code.
"
how's that?
17:05 JimmyZ left
mberends better, but still won't attract p5 users 17:05
but it's a good snappy ending 17:06
dalek kudo/nom: a71c872 | jnthn++ | NOMMAP.markdown:
Update nommap.
yath i think "list features" is a very bad idea to attract p5 users, given that lists and arrays in perl5 are totally fucked :-)
17:06 lumi__ joined
yath or maybe.. historically grown... 17:07
pmichaud I'd like to propose one more talk but can't come up with a topic
otoh, jnthn++ already has two perl6 talks. not sure how many p6 talks yapc::eu will be able to handle :)
yapceurope.lv/ye2011/talk/3515 17:08
yapceurope.lv/ye2011/talk/3516
and there's also "State of the Parrot": yapceurope.lv/ye2011/talk/3407
jnthn ;)
Yes, I didn't realize that cotto was coming until I saw that talk
There's also a Perl 6 Hackathon
pmichaud well, I'll submit this one; if anyone else has talk ideas please let me know :) 17:09
mberends :)
yath hm 17:10
yath thinks he should think about the question before asking it, it may be too dumb.
smoking &
17:10 skyheights joined
jnthn pmichaud: I think you did an NQP one last year, iirc? 17:11
Guess there's not so much new this year beyond "you can write all your stuff in NQP now" and "now uses 6model" though...and my talk will look a lot at 6model.
17:12 lumi_ left, kolibrie_ left, f00li5h left, diakopter left, ggoebel left, gfldex left, mattp_ left, skangas left, rhr left, jrockway left, revdiablo left, bs338 left, spinclad left, krunen left
yath hm, something is weird. 17:12
rakudo: my $foo = sub { return @_[0] - 1 }; my @bar = 1..23; say @bar[$foo] 17:13
p6eval rakudo ae5bea: OUTPUT«(timeout)»
yath is this supposed to happen..? 17:14
Trashlord hm
I've never seen it time out before 17:15
colomon rakudo: my $foo = *-1; my @bar = 1..23; say @bar[$foo]
pmichaud jnthn: I thought about doing an NQP talk, yes.
p6eval rakudo ae5bea: OUTPUT«23␤»
pmichaud jnthn: but I think it might overlap with yours a fair bit
sorear rakudo: my $foo = sub { return @_[0] - 1 }; say $foo(23)
pmichaud rakudo: my $foo = { $^n - 1 }; my @bar = 1..23; say @bar[$foo];
p6eval rakudo ae5bea: OUTPUT«22␤» 17:16
rakudo ae5bea: OUTPUT«23␤»
yath what is $^n?!
pmichaud it might be the @_ that is the issue there.
sorear yath: placeholder variable
yath sorear: for?
sorear an argument
yath hm
pmichaud rakudo: my $foo = sub ($n) { $n - 1 }; my @bar = 1..23; say @bar[$foo];
p6eval rakudo ae5bea: OUTPUT«23␤»
sorear in Perl 6, every sub has a signature 17:17
if you don't explicitly write one, one is generated by assembling used placeholders
pmichaud rakudo: my $foo = sub { @_[0] - 1 }; my @bar = 1..23; say @bar[$foo];
colomon oh, is the signature of sub { @_[0] - 1 } () ?
sorear colomon: no, (*@_)
p6eval rakudo ae5bea: OUTPUT«(timeout)»
pmichaud colomon: the signature of that one is (*@_ is rw) or something like that
rakudo: my $foo = sub { @_[0] - 1 }; say $foo.signature 17:18
p6eval rakudo ae5bea: OUTPUT«Signature()<0x52df990>␤»
pmichaud rakudo: my $foo = sub { @_[0] - 1 }; say $foo.signature.perl
p6eval rakudo ae5bea: OUTPUT«:(;; *@_)␤»
yath anyway, i just came across that and thought it might be helpful if someone knows that :) i was wondering how Whatever gets the parameter passed to the block i pass to []
like in @foo[*-1]
17:18 MayDaniel left
colomon pmichaud: is that because @_ is used, or is that always the signature where there isn't any other obvious signature? 17:18
pmichaud colomon: it's because @_ is used, iirc. 17:19
sorear if there is no other obvious signature, (\$_ = $OUTER::_) is used
yath: that's called a "Whatever closure" 17:20
rakudo: say (* + 5)(7)
p6eval rakudo ae5bea: OUTPUT«12␤»
pmichaud sorear: that's for bare blocks... I don't think it's that way for subs, though?
sorear rakudo: say (* + *)(7, 5)
p6eval rakudo ae5bea: OUTPUT«12␤»
yath sorear: wheeee
thanks sorear++
sorear pmichaud: AFAIK it applies to all code objects, even methods and regexes
yath needing more wine, i think :)
sorear: does that "if there is no other obvious signature .." only apply to *? 17:21
jnthn had pmichaud's understanding
Subs get an emty $_
yath ah
didn't read, sorry :) 17:22
pmichaud having: sub foo() { say $_; }; foo() print the contents of foo's OUTER::$_ would be... strange
most people expect $_ to be Any in that case.
(sorry, eliminate the first parens) 17:23
yath hm, $_?
pmichaud $_ = 5; sub foo { say $_; }; foo(); # I'd expect Any, not 5
$_ = 5; sub foo { $_ = 6 }; foo(); say $_; # I'd expect 5, not 6. 17:24
yath $_ doesn't have anything to do with the arguments passed, does it?
pmichaud yath: it can in bare blocks
yath pmichaud: oh. how that? 17:25
pmichaud: besides it'd expect it from perl5
pmichaud rakudo: my $foo = { say $_ + 1 }; foo(5);
p6eval rakudo ae5bea: OUTPUT«Could not find sub &foo␤ in main program body at line 22:/tmp/Pxm3YUh0wx␤»
pmichaud rakudo: my $foo = { say $_ + 1 }; $foo(5);
p6eval rakudo ae5bea: OUTPUT«6␤»
yath hmm
sorear STD thinks that subs get $OUTER::_...I'll change it and see what breaks 17:26
yath hm.
and why?
17:26 benabik left
pmichaud a block that has no other signature assumes that it has an optional parameter that goes into $_ 17:26
yath pmichaud: but why does 17:27
rakudo: my $foo = sub { [+] @_[0,1] }; $foo(23,42)
p6eval rakudo ae5bea: ( no output )
yath rakudo: my $foo = sub { [+] @_[0,1] }; say $foo(23,42)
p6eval rakudo ae5bea: OUTPUT«65␤»
yath pmichaud: work then?
pmichaud sorear: S06:306 17:28
yath pmichaud: or is $_ aliased to @_[0] there?
pmichaud yath: since you used @_, that defines the signature of the block
sorear yath: if you use @_ in a block, $_ is not created
yath ahh
funny
sorear Perl 6 programmers hardly ever use @_
pmichaud @_ exists mostly for p5 backcompat 17:29
17:29 wamba left
yath so rule of thumb is: w/o signature only one arg in $_, if you need more than one, pass a signature? 17:29
pmichaud yath: for blocks, yes. 17:30
sorear or use placeholders, yes
pmichaud for subs, it's best to just always put a signature :)
yath sorear: placeholders? *sigh*
sorear: what's that now? :-)
pmichaud yath: my $foo = { $^a + $^b }; say $foo(5,7);
rakudo: my $foo = { $^a + $^b }; say $foo(5,7); 17:31
p6eval rakudo ae5bea: OUTPUT«12␤»
pmichaud rakudo: my $foo = { $^a + $^b + $^a }; say $foo(5,7);
p6eval rakudo ae5bea: OUTPUT«17␤»
17:31 benabik joined
yath pmichaud: hm. 17:31
pmichaud: but why?
pmichaud it's like writing: my $foo = sub ($a, $b) { $a + $b } but shorter
the classic p5 example would be: 17:32
yath yes, but why $^a and $^b?
pmichaud it can be whatever names you want
yath and not $^foo and $^bar?
pmichaud rakudo: my $foo = { $^bar + $^foo }; say $foo(5,7);
p6eval rakudo ae5bea: OUTPUT«12␤»
yath O_O
so that's in order of occurance, or what?
pmichaud collation by identifier
masak in Unicode order.
yath ah 17:33
crazy.
seriously. :)
17:33 skyheights left
pmichaud my $foo = { $^foo + $^bar } is like sub ($bar, $foo) { $foo + $bar } 17:33
moritz yath: it's only meant for very short subs
pmichaud the classic use example is with sort: sort { $^a <=> $^b }, @list
masak rakudo: say { $^second ~ " " ~ $^first }(" HAI", "OH")
p6eval rakudo ae5bea: OUTPUT«OH HAI␤»
yath heh. really. that's why i love perl. 17:34
thanks moritz++ pmichaud++ masak++ sorear++
yath is off for smoking
17:34 beekar left
huf isnt there another twigil for placeholders that orders by something else? 17:35
17:35 Moukeddar_ joined
pmichaud the ':' twigil gives named parameters instead of positional 17:35
I'm not aware of a twigil to change the ordering 17:36
jnthn nom: my $x = { say "$:a, $:b" }; $x(b => 42, a => 100)
p6eval nom: OUTPUT«get_pmc_keyed() not implemented in class 'Integer'␤current instr.: 'nqp;Perl6;Actions;_block7380' pc 62312 (src/gen/perl6-actions.pir:0)␤»
17:36 Moukeddar left
jnthn hm 17:36
17:37 whiteknight left
jnthn huh, where'd that prefix:<+> come from... 17:38
sorear hey masak 17:40
17:41 jrockway joined
sorear pmichaud: What is S06:369 talking about? 17:41
pmichaud typo 17:42
oh, wait, looking
17:43 lumi__ left
yath sooo.. just to make sure i did understand that correctly: a block has signature () if it doesn't use @_ or any of the funny $^ variables? 17:43
thou yath: no, it has implicit $_
moritz correct
pmichaud yath: a *sub* has signature () if it doesn't use those
17:43 kolibrie_ joined, f00li5h joined, diakopter joined, ggoebel joined, gfldex joined, mattp_ joined, skangas joined, rhr joined, revdiablo joined, bs338 joined, spinclad joined, krunen joined
yath thou: tried that. 17:43
17:43 donri left 17:44 donri joined
yath rakudo: my $foo = sub { return $_+1 }; $foo(12) 17:44
p6eval rakudo ae5bea: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤ in <anon> at line 2:/tmp/ABcV_d5d5d␤ in main program body at line 22:/tmp/ABcV_d5d5d␤»
yath pmichaud: isn't a sub a block?
pmichaud a block has signature ($_ is rw = $OUTER::_) if it doesn't have the variables
moritz pmichaud: is there a convenient way to get an RPA from a List (in nom)?
pmichaud yath: a sub is a special form of a block, called a Routine
moritz: not at present... but why do you need one?
yath pmichaud: ah..
17:44 lumi_ joined
pmichaud we're trying to move way away from RPAs 17:44
moritz pmichaud: for implementing .join
17:45 jaldhar left, jaldhar joined
moritz pmichaud: it needs to reify the whole thing anyway, and when it's reified, I can use pir::join 17:45
pmichaud moritz: looking/thinking
yath one last silly question: is sub foo { ... } the same as { ... }? 17:46
moritz .gimme(*), and then access $items
yath s/foo //
sorear yath: no
moritz yath: no. For example return() works on subs, not on blocks
pmichaud .gimme(*) isn't guaranteed to reify the whole thing, though.
might want .gimme(Inf) 17:47
thou yath: definitely *not* silly questions
yath moritz: but "my $x = { return 23 }" works
sorear yath: also, blocks get an implicit $_, subs don't
rakudo: my $x = { return 23 }; sub foo () { $x(); say "Got here"; }; say foo()
yath sorear: then i don't understand:
p6eval rakudo ae5bea: OUTPUT«23␤»
yath rakudo: $_ = "foobar"; my $x = { say $_ }; $x()
p6eval rakudo ae5bea: OUTPUT«foobar␤»
moritz .gimme(*) runs the code while $!rest && $eager where $eager is True 17:48
sorear the return in $x makes foo() return
yath ahh
pmichaud moritz: but it will stop upon reaching an infinite generator
(I don't have that code in there yet... the List code is still incomplete.)
moritz ah, ok
yath sorear: ah.. thanks! 17:49
yath is beginning to understand :)
sorear 10:47 < yath> rakudo: $_ = "foobar"; my $x = { say $_ }; $x()
this works because, in a block, $_ is an *optional* parameter
moritz rakudo: say Inf 17:50
sorear if you don't supply it, it defaults to the value of $_ from the outer scope
p6eval rakudo ae5bea: OUTPUT«Inf␤»
moritz nom: say Inf
p6eval nom: OUTPUT«sh: ./perl6: not found␤»
thou yath: there's .leave() method that works on all kinds of BLOCKs that's kind of like return
yath thou: and where would i invoke that method on?
moritz for example on &?BLOCK 17:51
thou good question, i'm still reading the synopses :-) i'm not sure it's implemented
moritz which is the current block
yath hm
ah
moritz or an item of @?BLOCKS (which is the array of the current and all outer blocks)
yath rakudo: say (sub { say "foo" }).signature.perl; say { say "foo" }.signature.perl
p6eval rakudo ae5bea: OUTPUT«:()␤:(;; Mu \|$_?)␤»
moritz (both NYI in rakudo)
thou but it's kind of a nice way, in my mind, to think about it; return is like a leave() that goes up the dynamic call stack looking for a sub or method 17:52
yath hm, hm, tricky!
sorear moritz: where is @?BLOCKS spec'd?
pmichaud sorear: I think S06:369 is dealing with blocks being passed to listops or the $foo.method: syntax
yath but well thought :)
17:53 lichtkind joined
pmichaud @?BLOCK is no longer in the spec 17:53
moritz sorear: dunno, I remebered @?ROUTINES or something, and thought it also exists for blocks
pmichaud it's been removed, I think.
moritz ack will tell
pmichaud it did exist at one time, yes.
lichtkind pmichaud: ohai, your boardmember of the parrot.org, you know if the logo is under a free license?
sorear BLOCKS was never in the specs as long as git history goes back 17:54
pmichaud *BLOCK*
not BLOCK*S*
yath so sub { ... } creates a Sub, { ... } just a Block 17:55
pmichaud lichtkind: I'm no longer a board member of parrot.org
yath funny.
sorear 4681baa37
moritz lichtkind: try #parrot
pmichaud (I don't know the logo's licensing terms, either.) 17:57
lichtkind pmichaud: allright the web site told so
pmichaud lichtkind: where are you looking on the web site?
I need to get it fixed then :) 17:58
lichtkind pmichaud: my fault as always (it was stated as previous :) ) 17:59
pmichaud no problem, just wanted to make sure it wasn't listed somewhere else :)
lichtkind your too kind :)
pmichaud: maybe i have some further quastions too if you dont mind about developement of parrot and such 18:00
pmichaud I don't mind, but #parrot might be a better place to ask 18:01
I've really moved away from much of the core decision making about parrot
sorear funny... my general opinion on Parrot and Rakudo has been that they would be much better off if they shared an architect 18:02
lichtkind sorear: why do you think so? 18:03
18:03 wamba joined
pmichaud sorear: that's probably true.... but politically Parrot seemed to be moving itself *away* from Perl development, not closer 18:03
moritz under allison's steering, parrot moved a bit away from primarily focusing on Perl 6 18:04
pmichaud not just Perl 6, but Perl in general.
in many respects it was actively trying to remove as much perl stuff as it could
18:04 lumi_ left 18:05 Moukeddar joined
pmichaud even to the point of saying at times "if perl solves the problem by doing XYZ, we have to do something else" 18:05
18:05 lumi_ joined
moritz seems that List.join is not a LHF :( 18:06
pmichaud moritz: I'm trying to decide how to do the RPA part 18:07
are there other places where we'll want an RPA?
moritz pmichaud: it seems that an RPA allone doesn't solve the problem
pmichaud: because we need to convert to parrot strings first before we can join() 18:08
pmichaud trying to use the join opcode is going to be a bit nasty also because it'll go through the str_vtable
18:08 Moukeddar_ left
pmichaud er, VTABLE_get_string 18:08
which will be slow.
18:08 Moukeddar left
moritz so we should really create a parrot string array 18:08
pmichaud called a Cat
18:08 beekar joined
pmichaud to go along with our LoL's 18:08
moritz by pir::repr_unbox_str($item.Str) or so 18:09
pmichaud why not just implement join in pure perl 6?
I also wonder if .join is Stringy, not Str
yath hm, what's wrong with this? shouldn't it flatten to a list?
rakudo: { say "foo" ~ $^foo ~ $^bar }(<baz bar>)
p6eval rakudo ae5bea: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in <anon> at line 2:/tmp/h19n3RaI7k␤ in main program body at line 22:/tmp/h19n3RaI7k␤»
pmichaud yath: list arguments don't automatically flatten, no. 18:10
yath pmichaud: hm, can i force that somehow?
pmichaud rakudo: { say "foo" ~ $^foo ~ $^bar }(<baz bar>, <abc def>); 18:11
p6eval rakudo ae5bea: OUTPUT«fooabc defbaz bar␤»
yath hm, not with .list 18:12
pmichaud flattening is usually done with prefix:<|>
I don't know if it'll work on the literal list
rakudo: { say "foo" ~ $^foo ~ $^bar }(|<baz bar>); 18:13
p6eval rakudo ae5bea: OUTPUT«foobarbaz␤»
pmichaud ...it does.
yath pmichaud: ah, cool, that's what i were looking for! thanks!
pmichaud adds that as something to cover in his talk
yath :-)
argh 18:14
i read "rick roll" instead of "pick roll" in <foo bar>.^methods
tadzik never gonna pick you up... 18:16
pmichaud moritz: anyway, to get an RPA would be something like: @list.gimme(Inf) and then use the $!items RPA
jnthn pmichaud: join in pure Perl 6 has the issue that we'd do loads of concats 18:17
pmichaud: And with immutable strings tht's probably slow. I guess join does something saner.
moritz pmichaud: tried that... it segfaults
pmichaud moritz: I'm guessing it's segfaulting on the fact that they aren't parrot strings, yes. 18:18
jnthn That really shouldn't make it segfault... 18:19
pmichaud moritz: try pir::join__sP if you haven't already
er,
join__vsP
jnthn Note that the resulting string needs to be perl6_box_str'd
v?
pmichaud grrr
join__SsP
jnthn phew ;) 18:20
pmichaud nm, pir::join already has it that way.
moritz yes, I'm boxing after the join 18:21
pmichaud gist.github.com/1021842
and 18:22
gist.github.com/1021843
jnthn: I'm wondering which will be slower, the repeated concats or the multiple VTABLE_get_string invocations 18:24
does VTABLE_get_string end up going through any PIR with 6model/nom ?
jnthn pmichaud: vtable overrides are rather faster in 6model 18:25
moritz repeated concat is O(n^2)
jnthn pmichaud: Parrot's implementation of them is...how can I say this nicely...
...yeah, I can't, but anyway. :)
pmichaud moritz: vtable overrides in parrot are 3000x
(per whiteknight's benchmarks)
jnthn In 6model it's a few pointer follows to find the thing to call.
pmichaud jnthn: the question is whether it results in new interpreters, at least according to the way Parrot natively does it 18:26
sorear it's still gonna be slow
because of Parrot_pcc_...
jnthn sorear: true
sorear and inferior runops
pmichaud exactly
jnthn Yeah, we hit the inferior runloop issue
pmichaud even at O(n^2), I'm wondering if we'll still do better than O(n) 18:27
sorry, O(n) where "n" is really 300x
3000x
grrrr
(need food I think)
sorear the sane thing to do is to expose StringBuilder to Perl 6 code
does pir::new work in 6model?
probably not I guess
pmichaud we're trying to avoid the Parrot PMCs/objects
sorear since it's not a SixModelObject
jnthn Yes, but you'd best be darn careful with the thing you get back.
pmichaud pir::new works -- that's one way we get hashes and rpas 18:28
(Parrot native Hash, that is)
jnthn So long as you don't let it leak out of code that doesn't know how to hadnle it, it's fine.
*handle
So yes, we could use StringBuilder.
It's O(n) and better than the inferior runloops :) 18:29
sorear jnthn: what nom operations are legal to perform with a non-SixModelObject?
jnthn sorear: Probably, binding it to an attribute/scalar that is of type Mu, calling methods on it, using it in a pir::op 18:30
pmichaud currently one can also use it in boolean contexts, but that might go away 18:31
jnthn Yes, true
moritz we can also construct a FSA from $!items and call parrot's join() on it
jnthn moritz: That'd also work.
pmichaud that's basically the same as unboxing all of the elements, isn't it? 18:32
moritz it just involves an iteration over $!items, which I wanted to avoid, since I still have the "iterating is slow" thing in the back of my mind (from rakudo/master)
pmichaud: yes
they need to be unboxed at some point, the question is just if we do it ourselves, or if we let parrot do it
jnthn Doing it ourselves is better
pmichaud let parrot do it == inferior runloops
== WAY SLOW 18:33
jnthn Right
The way moritz++ suggested will be pretty fast.
moritz ok, it's the self.gimme(Inf) that causes the segfault
pmichaud does the FSA avoid PMC creations?
moritz: okay to use .gimme(*) for now if that works
we'll just have to remember to change it later
you can also do my $list = (self,).list; and then repeatedly shift $list until it's empty 18:34
(that's iteration)
sorear why do you say "iterating is slow"? 18:35
pmichaud because it's historically been slow in master, I suspect. I hope we don't bring too many master assumptions into nom.
the underlying fundamentals of nom are way different 18:36
jnthn Or too many master realities :)
pmichaud in general I think nom should avoid premature optimization as much as possible at this point. write the natural answer, and then let's figure out what's slow. 18:37
that's one reason I went ahead and wrote List.gimme in p6 instead of trying to optimize it for PIR
colomon pmichaud: speaking of which, are those profiling tools you cobbled together in nom yet? :)
sorear nom's going to be pretty hard to stay ahead of ;)
pmichaud colomon: not yet. I'm going to put them into nqp.
I can likely do that today. 18:38
colomon pmichaud++
jnthn I think getting Test.pm to run again should become a goal soon. 18:39
pmichaud that's normally an early goal of a new implementation, yes :)
that's what 00-parrot is supposed to lead to :)
colomon didn't realize Test.pm wasn't working yet
tadzik I prepared a version of Test.pm with no our and proto multis, and I try to compile it frequently :)
pmichaud I have no problem with updating Test.pm to be more nom-friendly at this point 18:40
jnthn tadzik: What's the current blocker in that one?
tadzik let me see
sorear problem: Test.pm doesn't have a spec
tadzik there is no
"Testing" spec?
pmichaud anything that is a blocker probably deserves tests in t/00-parrot/ fwiw
sorear tadzik: correct
tadzik oh
jnthn Or t/01-sanity/
pmichaud we've talked about creating one, yes
jnthn pmichaud: What's the difference between the two, ooc? :) 18:41
pmichaud sorry, t/01-sanity is right
moritz I wanted to write one, got carried away, and never really came back to it :/
pmichaud t/01-sanity : things needed to do Test.pm
t/00-parrot : just some basic stuff
so, replace my mentions of 00-parrot above with 01-sanity
01-sanity is what we want to target (and what should be the Test.pm suite)
lunchtime here. 18:42
18:43 jaldhar left, jaldhar joined
tadzik jnthn: ResizablePMCArray: Can't shift from an empty array! 18:43
current instr.: 'nqp;Perl6;Actions;cleanup_modifiers' pc 72327 (src/gen/perl6-actions.pir:25628)
will paste
jnthn tadzik: Is that something to do with regex?
tadzik wklej.org/id/545402/
no eye deer
jnthn yes, it is 18:45
I didn't do anything with regexes yet :)
tadzik :) 18:46
I wonder if I can rip them off
thou sorear: is this behavior of niecza something you'd like a bug report for? and you like those on github? friendpaste.com/sBNlMhQ4dwYgWbEeONc81
18:51 lumi_ left 18:52 lumi_ joined
yath hm, why is .WHAT of a Block still a Block? 18:53
er, ignore that :)
yath ist just trying to understand how foo.^bar works
sorear foo.^bar means foo.HOW.bar(foo) 18:54
yath ah, HOW..
18:55 sylwek joined
sorear thou: yeah bug reports for those would be good 18:55
the second problem is new to me, the first is a new manifestation of an old problem
thou++ # rlwrap 18:58
thou yes, it's very nice! :-)
sorear: for the 2nd issue, i'm really not sure that it's correct syntax. but i guess you can sort that out :-) thanks, sorear++ 19:05
19:09 kst left, kst joined
thou sorear: OK, bugs at github.com/sorear/niecza/issues/cr...amp;page=1 19:14
sorear thou: the syntax should be \|(%h<a>:p) 19:16
19:16 MayDaniel joined, sftp joined
sorear adverbs attach to the lowest-priority thing they can find, which in this case is the call to prefix:<!> 19:17
prefix:sym<|> rather
the error should *probably* be "You can't adverb that"
niecza: 2.WHAT :foo 19:18
p6eval niecza v6-150-g612a7b7: OUTPUT«===SORRY!===␤␤You can't adverb that at /tmp/eGTV4z3bLI line 1 (EOF):␤------> 2.WHAT :foo⏏<EOL>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤ at
../home/p6eval/niecza/src/STD.pm6 line …
thou ah, right. should probably fix the examples at perlcabal.org/syn/S06.html#line_765
?
masak std: my $foo; |$foo :adverb
p6eval std 37a0cdd: OUTPUT«ok 00:01 120m␤»
thou doit |%hash<a>:p,1,2,3;
sorear yes
yath hm, can i find out from where a method comes from? i don't see what a{sin,cos,tan} should do on a Parcel 19:19
moritz you can loop through $class.^parents 19:21
and in each, look at .methods(:local)
thou niecza: \(|(%h<a>:p))
p6eval niecza v6-150-g612a7b7: OUTPUT«===SORRY!===␤␤Variable %h is not predeclared at /tmp/Fa8H_8P7g6 line 1:␤------> \(|(⏏%h<a>:p))␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤ at
dalek kudo/nom: 6023be1 | pmichaud++ | src/core/ (3 files):
Add Hash.STORE.
p6eval ../home/p6eval/niecza/src/STD.pm6 line …
sorear thou: 'softmoth' can now push to perl6/specs 19:22
thou niecza: my %h = :a<1>; \(|(%h<a>:p))
p6eval niecza v6-150-g612a7b7: ( no output )
sorear thou: the html file on perlcabal.org is automatically generated from S06-routines.pod 19:23
thou niecza: my %h = :a<1>; say (\(|(%h<a>:p))).perl
p6eval niecza v6-150-g612a7b7: OUTPUT«\(|{"a" => "1"})␤»
19:24 sylwek left 19:25 larks_ is now known as larks, larks left, larks joined
moritz nom: pir::new__Ps('FixedStringArray'); say 'alive'; 19:34
p6eval nom: OUTPUT«alive␤»
moritz nom: my $a = pir::new__Ps('FixedStringArray'); say 'alive';
p6eval nom: ( no output )
moritz that makes it kinda hard for me to work with FSAs :/
masak it just... silently fails? 19:36
moritz it segfaults locally
colomon nom: my $a := pir::new__Ps('FixedStringArray'); say 'alive';
p6eval nom: OUTPUT«Can only use perl6_assert_bind_ok on a SixModelObject␤current instr.: '_block13' pc 28 ((file unknown):0) (:1)␤»
sorear it's only silent because p6eval isn't smart enough to report the exit code of programs it runs
and I don't feel comfortable enough with the p6eval setup to hack it 19:37
19:40 lumi_ left 19:41 lumi_ joined
moritz gives up on List.join 19:43
19:44 ymasory left
pmichaud you have to bind 19:45
assignment won't work with non-6model objects
and I think it only works for binding to attributes, atm (perhaps ever)
moritz well, at least I can't bind to lexicals
dalek ecs: c4304e7 | (Tim Smith)++ | S06-routines.pod:
[S06] Fix an example in the Named arguments section
19:47
19:47 MayDaniel left
pmichaud wow, parrot has gotten really slow at compiling src/gen/CORE.settings.pir 19:53
gist.github.com/1021929
that's.... a bit surprising.
moritz rakudo: class A { say $?CLASS } 19:54
p6eval rakudo ae5bea: OUTPUT«===SORRY!===␤Symbol '$?CLASS' not predeclared in <anonymous> (/tmp/j_UahhdFY1:22)␤» 19:55
pmichaud I guess we're going to have to figure out register allocation in PAST / POST instead of letting IMCC handle it :-(
or figure out how to manage the registers better in the prologue 19:56
19:56 kaare_ left
sorear managing temporary registers isn't very hard 20:00
just set aside a set of register numbers for temporaries, then allocate them as a stack
benabik PAST just keeps a counter and increments it each time a register is asked for. Less than ideal. 20:02
pmichaud PAST expected imcc to be able to handle that.
tadzik seen mberends
aloha mberends was last seen in #perl6 2 hours 53 mins ago saying ":)".
pmichaud (because imcc advertised itself as being able to do so)
tadzik mberends: is the perlduino code living somewhere? 20:03
mberends tadzik: it's still not in a publishable state. I am currently working on the biggishint library part, and that is being published in Zavolaj as an example 20:05
tadzik mberends: there is an interested redditor: www.reddit.com/r/perl/comments/hxs8...?context=3 20:06
20:07 molaf left
jnthn pmichaud: I analysed the registre allocation. 20:12
pmichaud: Unforturenly, the problem isn't going to get linearly worse.
pmichaud: It's going quadratic, which is why it's got suddenly painful. 20:13
pmichaud: Should we be able to bind Parrot things to lexicals? 20:14
pmichaud: I can make bidning to a Mu-typed one OK.
sorear I think it would be good to make use Curses:from<parrot> as minimally painful as possible 20:15
allowing binding Parrot stuff to lexicals sounds like a zero-cost way to make wrapping Parrot stuff less painful
jnthn :/ 20:16
sorear is it painful to implement?
jnthn No
sorear or slow?
jnthn It's more that every time something non-6model-y can get into the system, we have to stop and handle it.
20:16 dju_ joined
jnthn I'd rather wrap/munge it at boundaries. 20:16
Import boundaries are a great time to do that. 20:17
Largely, Parrot objects and PMCs should be treated in Rakudo the same way a Rakudo on CLR would treat CLR objects.
sorear most handling can be done using pir::
20:17 dju_ is now known as dju
sorear but it's impossible to create lexicals using pir::, so another way has to exist 20:18
20:18 wallberg joined
sorear How would Rakudo on CLR treat CLR objects? 20:18
20:18 lumi_ left
pmichaud jnthn: I think I know how to manage the temporaries 20:19
jnthn I suspect the thing to do it belongs at the NQP level rather than Rakudo level. But most likely an interop meta-object.
pmichaud: We can do that.
pmichaud: One alternative is that I just break the SC stuff over multiple Parrot subs.
pmichaud bad alternative :)
20:19 lumi_ joined
jnthn pmichaud: 1000 things in one, next 1000 in another, etc. 20:19
OK
pmichaud since subs are slow and increase our startup time
let's go ahead and solve the register allocation problem 20:20
jnthn OK
pmichaud can you embed the SC stuff into PAST::Stmt, though?
jnthn Oh, sure
pmichaud go ahead and do that, please
jnthn It's just a sequence of PAST nodes
20:20 dju__ left
jnthn Wait 20:20
sorear another alternative would be to make a great big string with binary description of the SC, then use a new nqp_build_sc op
jnthn Explain a little more about you want :)
aloha positive: nothing; negative: nothing; overall: 0.
pmichaud I presumbe the SC is at some level a sequence of unrelated PAST nodes 20:21
jnthn sorear: Well, but by then I may as well have done the full-blown serialization.
dalek ecza: e51f7a9 | sorear++ | / (3 files):
[remove-CURLEX] Reimplementation of STD is_name
pmichaud basically, I'm thinking that PAST::Stmt will be our "temporary register" boundary
jnthn pmichaud: Ah, OK
pmichaud: There's an Obvious Way to do that.
(for me to put in the PAST::Stmts nodes)
masak explain why aloha butts into grownup conversation.
aloha positive: nothing; negative: nothing; overall: 0.
masak explain why this is a good idea.
aloha positive: nothing; negative: nothing; overall: 0.
sorear explain sorear 20:22
aloha positive: | perf/ (4 files): (dalek), | / (3 files): (dalek), | / (2 files): (dalek); negative: nothing; overall: 1382.
jnthn explain jnthn
aloha positive: | src/Perl6/Grammar.pm: (dalek), | dotnet/compiler/PAST2DNSTCompiler.pm: (dalek), is writing a really nice MOP and then parrot will steal it and then rakudo should scream since parrot understands the MOP under the hood (dukeleto); negative: nothing; overall: 805.
pmichaud I figure that when you create an SC item, simply wrap it in a PAST::Stmts node
masak 'explain' is not a good bot prefix, since it's a perfectly good human conversation prefix.
jnthn pmichaud: looking now 20:23
pmichaud jnthn: what's a "good size" for a temporary register bank? 100? 1000? 20:25
tadzik explain tadzik
aloha positive: did, recently (moritz), . (dalek), : ooh! excitement! (mberends); negative: nothing; overall: 311.
tadzik what is that? :)
pmichaud bots should not speak unless addressed. Period.
masak explain masak 20:26
aloha positive: moritz_++ (colomon), | doc/ChangeLog: (dalek), said (jnthn); negative: C3 Multiple inheritance has been very good to me, it doesn't need senseless hating (sorear); overall: 364.
pmichaud jnthn: i.e., what number of temporaries would be able to handle a large percentage of our cases?
colomon explain colomon 20:27
aloha positive: :) (TimToady), | t/spectest.data: (dalek), reminder (masak); negative: nothing; overall: 120.
20:27 wamba left
jnthn pmichaud: 1000 sounds excessive 20:27
pmichaud: The most complex objects we build are probably parameters.
pmichaud: Which should be sub-100
pmichaud well, it's also complexity of expressions 20:28
20:28 bitpart joined
pmichaud and if we do inlining, we end up with even more nesting 20:28
jnthn pmichaud: Oh, you meant generally rather than just for this use case
pmichaud yes, I"m planning to solve it generally. :) 20:29
(since I think I know how to do that relatively easily)
jnthn OK, then I can see it being more in some cases
pmichaud besides, register identifiers are cheap
jnthn True.
pmichaud it's not like we're going to allocate 1000 actual registers unless we truly need them
jnthn *nod*
I guess it's an easy enough number to change if we need to later?
pmichaud (I'm assuming, of course, that $P2000 doesn't automatically put 2000+ P-registers in the call frame.) 20:30
jnthn I, er, hope not :)
pmichaud yes, it'd be trivial to change
I'll go with 1000 for now
jnthn OK, then maybe 1000 is a good starting guess.
mberends pmichaud: this sort of problem really needs a high water mark diagnostic. There is little sense in guessing.
pmichaud mberends: it'll be easy to see if we guess too low. and too high isn't an issue. 20:31
(other than all non-temporary register allocations will start at the value I pick for the temp max)
1000 seems simple enough, at any rate. 20:32
note when I say "1000" it doesn't mean that things go bad if we run out of temporaries 20:33
jnthn pmichaud: I think we've also traditionally left $P0..$P9 unused.
pmichaud it just means that further allocations aren't temporary (but that would be limited to the sub that needed 1000 of them)
jnthn: yes, I'm planning to start the temporaries at $P50 or $P100 or something like that 20:34
the non-temporaries start at $P1000
jnthn pmichaud: OK :)
pmichaud $P0...$P9 remain reserved for the user
$P10..$P19 get used by nqp's libraries
jnthn 10 regisers should be enough for anyone! 20:35
:-)
pmichaud you can always get more by introducing your own register namespace :)
these are just the ones you get using the $P... syntax.
tadzik karma tadzik
aloha tadzik has karma of 311.
pmichaud afk for a bit
tadzik so explain has something to do with karma
int eresting;
20:36 dorlamm joined
colomon jnthn: back in my 6502 programming days, we only had three registers... limited to 8-bits, too! ;) 20:38
sorear argh! 20:39
moritz you wouldn't run Perl 6 on that :-)
sorear I just noticed longnames are allowed to end in :: 20:40
sorear tries to work this into eir mental model
20:40 masak left 20:41 pjcj left 20:42 kcwu left
sorear STD.pm6 line 4058 is... being a problem for me now 20:43
jnthn Isn't trailing :: is a synonym for .WHO 20:48
?
s/is//
20:49 masak joined
sorear jnthn: I'm thinking that too, now. 20:49
jnthn Holy s**t 20:50
sorear ststststs
jnthn I just turend off the "always dump deserialization and fixup PIR" thing I did for debugging SC issues.
tadzik oh wow
jnthn And it took running NQP tests from 27 seconds down to 19. 20:51
sorear What did that thing do?
jnthn sorear: Basically, emitted a LOAD of pointless code :)
pmichaud jnthn: can you leave it enabled until I get the temporary register code in place?
jnthn sorear: There's two cases. One where we have built up an environment mostly during the parse, will run immediately and just need to fiddle with it a little.
pmichaud it serves as a good baseline for me to check
jnthn sorear: And another one where we have to build the world. 20:52
pmichaud: I can; I'd like to check how this works out with Rakudo too, but I needn't push it.
pmichaud: Or you could use it as your baseline.
sorear jnthn: and if target => 'eval' we don't need to build the world because the compiler built it?
pmichaud I'd still like the PAST::Stmts patch, though.
jnthn sorear: Correct.
sorear: I didn't have any clue that leaving both in was so...costly. 20:53
dalek p: c0d2879 | jonathan++ | src/NQP/SymbolTable.pm:
Add extra PAST::Stmts nodes to better delimit steps, to allow better code generation.
pmichaud jnthn++
btw, the other reason for fixing this in the general case is that rakudo master will benefit also :) 20:54
jnthn Troo :)
pmichaud: Perl6::SymbolTable patch pushed too 20:55
Bit bugged I had to patch both...tells me I've got some refactors to do later on.
pmichaud excellent, thanks.
jnthn oh, it wasn't pushed...push failed 20:56
now.
20:57 lumi_ left, lumi_ joined, pjcj joined
tadzik jnthn: was that last nqp commit supposed to give a speedup? 20:58
dalek kudo/nom: b534a1f | jnthn++ | src/ (3 files):
Implement default values on parameters.
21:00
kudo/nom: 0b64b37 | jnthn++ | src/Perl6/SymbolTable.pm:
Extra PAST::Stmts nodes to delimit sections of the deserialization/fixup code.
jnthn tadzik: no 21:06
tadzik: The one pmichaud wants me to hold off with to nqp would give a speedup for NQP and Rakudo in run-immediately mode, and a smaller win for pre-compilation (just the compile stage, not runtime).
pmichaud I'm only asking for a hold for an hour or two, I think. 21:07
actually
you can go ahead and push when you're ready, jnthn. I just won't pull until after I'm done.
jnthn pmichaud: If that's not going to cause problems for you, sure
pmichaud it shouldn't.
as long as I got the PAST::Stmts commit separate from the others, it's fine. 21:08
(and I have that now.)
21:08 Moukeddar joined
dalek p: c7bf530 | jonathan++ | src/HLL/SerializationContextBuilder.pm:
Detect whether we're in pre-compilation or run-right-away mode and only code-gen the things we need. Quite a notable speedup for NQP tests; can always put it back if we need to debug it, but problems with this have been pretty rare.
21:09
Moukeddar Hello Perlers
sorear hello Moukeddar
tadzik hello Moukeddar
Moukeddar how are you doing guys?
jnthn Weekend is ending :( 21:10
But otherwise fine :)
Moukeddar yes , indeed, good to hear
who's here using static blog ?
when you store the posts in files instead of database 21:11
jnthn I think masak is
masak aye.
moritz uses something like that, too.
Moukeddar masak, and pmichaud i guess too
masak at least a file-backed blogging system. maybe not static. 21:12
pmichaud my blog is wordpress, mainly
masak wordpress is dynamic.
Moukeddar i was thinking about it , and found it pretty secure, no room for SQL injection or whatsoever
masak as a rule, one should use the least powerful technology where it's still comfortable to implement the solution. 21:13
i.e. use a small hammer when you can, and a sledge when you must. 21:14
Moukeddar are those from merphy's rules?
masak no, they're from a book about programming languages whose name I'm forgetting right now.
Moukeddar when you remember it , note it :) 21:15
97 things programmer should know?
masak Moukeddar: this one: www.amazon.com/Concepts-Techniques-...0262220695 21:16
tadzik no speedup for me
jnthn tadzik: What are you looking for a speedup on? :) 21:17
Moukeddar looks somewhat interesting , 20 years of experience in a single book :)
jnthn tadzik: NQP test suite run time is a good one.
masak Moukeddar: so, you're thinking of writing a blogging system? 21:19
Moukeddar yes, as a show off :)
tadzik jnthn: it's exactly the same 21:20
21:20 wamba joined
masak Moukeddar: are you planning to use it after you've written it? :) 21:20
tadzik about 67 seconds
Moukeddar yes
21:20 MayDaniel joined
Moukeddar if it impresses me :) 21:20
masak Moukeddar: release early, release often. :)
Moukeddar: what language?
jnthn tadzik: Oddness.
tadzik: Was notable gain here.
Moukeddar the language is still a big issue 21:21
release early, release often , what rule is this?
my country is being torn apart by 3 major languages : Arabic , French , English
masak Moukeddar: an agile one. it's about getting something out there, rather than getting something perfect out there.
Moukeddar: interesting that you use the term "torn apart". why is that? 21:22
Moukeddar well , the business domain is schizofrenic , some use English , some still use French , And Arabic is the official language :p 21:23
masak you could say the same about Sweden. some use Swedish, some Finnish, some English. but I wouldn't say Sweden is torn apart by that fact. :) 21:24
pmichaud okay, my first test case will be t/nqp/13-op.t . Currently its mainline uses approx 173 unique registers 21:25
Moukeddar well , believe me , it is being torn 21:26
pmichaud let's see if we can reduce that number :-)
Moukeddar they just can't decide
tadzik jnthn: no change at all :(
jnthn ++pmichaud ;)
tadzik: You certainly have latest NQP master checked out?
masak Moukeddar: I would say it's only a problem if people are excluded or can't understand because of the choice of language.
tadzik jnthn: yep, and I realclean'd and rebuilt
jnthn Not latest NQP_REVISION?
OK.
Then I'm confused. :)
21:27 tandy80 joined
tadzik also, t/p6regex/01-regex.t .. 332/? Null PMC access in can() 21:27
thou Moukeddar: is it causing political tension? or people are using language as a way to prevent certain groups from getting some jobs, for example?
masak are the languages dividing people into separate groups with separate identities? 21:28
21:29 dorlamm left
tandy80 hi guys, what's the best to learn coming from php? perl or python? 21:29
no trolls plz
Moukeddar thou, there's no political tension , but some companies require you to have previous project in french , or you pass the interview in French
which is a big issue 21:30
thou Moukeddar: by the way, other ways to interpret the original question ("which language?") might be regarding which programming language you intend to use to write your blogging system; or possibly which templating language you might use
Moukeddar it's just crazy
masak tandy80: I'd say Perl is closer to PHP. but it's not necessarily that simple.
Moukeddar thou, MVC architecture is my first choice
tandy80 and to get a job in finance what would you reckon? perl or php?
Moukeddar so it can be any language , i guess
tandy80 sorry perl or python
masak tandy80: I reckon either would do fine :) 21:31
tandy80 ok thank you very much :)
21:31 lumi_ left
masak tandy80: there's a bit of a jump from programming language to a job in finance. I'd say don't worry about the connection -- there probably is none. :) 21:31
Moukeddar tandy80, finance requires functional languages in most i guess
masak Moukeddar: yes, more than other branches.
dalek kudo/nom: a46c5d2 | jnthn++ | src/ops/perl6.ops:
Allow binding Parrot things to Mu-typed scalars.
kudo/nom: 4df8fab | jnthn++ | src/Perl6/Actions.pm:
Unbreak hash vs block detection a bit.
masak some even use APL.
tandy80 masak: I am more on the finance side now ;) 21:32
masak and here on this channel, we're more on the programming language side ;)
Moukeddar functional languages are your friends
21:32 lumi_ joined
masak with dysfunctional languages like these, who needs enemies? 21:33
thou tandy80: also, you really can't go wrong learning either one. most of the concepts map between the two pretty easily
Moukeddar masak, unleashed the inner-troll
tandy80 ok thank you very mucj for this advise
masak tandy80: good luck in finance!
Moukeddar it's a dog world 21:39
masak "it's a doggy-dog world" :) 21:40
Moukeddar dog but softer and much cuter
21:41 Psyche^ joined 21:44 Patterner left, Psyche^ is now known as Patterner
masak tandy80: Python has a larger built-in library of things. Perl has a larger module repository. Python has block indentation. Perl has block curly braces. Python has fewer "ways to do it". Perl has a slightly more liberal view on restricting the programmer. Python has slightly antiquated OO facilities. Perl has Moose. :) 21:44
uh, for the first and the last of those, s/Perl/Perl 5/. 21:45
benabik Perl has s///
masak :)
tandy80: when you come to a Perl channel, expect at least a little Perl bias :P 21:46
tandy80 masak: haha yes I know about the bias but at least I get a good knowledge here ;) 21:47
masak we're known for that :)
21:52 tandy80 left
pmichaud first pass at temporary register allocation reduced from 173-ish to 128-ish registers 21:53
jnthn pmichaud: Nice 21:54
pmichaud: I suspect that the thing we're mosly aiming this at might have a much larger win.
pmichaud ...and only used two temporaries to do it
jnthn wow!
21:57 PacoLinux left
pmichaud second pass reduces it to 89-ish registers 21:57
still only required at most two temporaries (per register bank) to do it. 21:58
jnthn whoa
masak blog post! strangelyconsistent.org/blog/june-12-for-loops 21:59
21:59 lumi_ left, MayDaniel left 22:00 lumi_ joined
masak rakudo: my $foo = 42; say "The number is '$foo'" 22:00
p6eval rakudo ae5bea: OUTPUT«The number is '42'␤»
masak rakudo: my $sentence = "Look, a fish!"; for $sentence.words -> $word { say "'$word' has $word.chars() characters" } 22:02
p6eval rakudo ae5bea: OUTPUT«'Look,' has 5 characters␤'a' has 1 characters␤'fish!' has 5 characters␤»
Moukeddar the answer to the ultimate question?
pmichaud third pass reduced it to 19 registers, using a max of 4 temporaries in a bank 22:03
jnthn O.O
masak I must have an outdated Rakudo. The above fails locally.
masak updates
pmichaud let's make sure nqp still passes its tests :)
it does. now let's see how rakudo master does. 22:04
masak oh! bash quoting fail. never mind :)
jnthn pmichaud: That was...fast :) 22:05
pmichaud++
pmichaud ah, but it breaks master 22:08
now to figure out why.
sorear good * #perl6
masak good *, sorear 22:09
colomon \o
pmichaud for the SC stuff, we go from 1100 registers used down to 500 (so far) 22:11
still some possible further optimizations
(SC stuff being the SC generated for NQP.pir)
22:11 Guest96628 is now known as alys, alys is now known as alyx
sorear I'm not suprised _at all_ that you reduced 170 registers to 19 22:11
jnthn pmichaud: I'm guessing many are the .const 'Sub' $Px ones
22:12 alyx left, alyx joined
pmichaud jnthn: correct. and I'm thinking those aren't reusable. 22:12
sorear: I'm not that surprised either.
jnthn pmichaud: I don't think so.
sorear Why does .const need registers? 22:13
pmichaud ...because those are what get passed to the opcodes
Moukeddar milestones are like goals , right? 22:14
sorear how does .const work?
Moukeddar: sort of
Moukeddar ok
sorear Moukeddar: milestones implies that you have furhter to go. Intermediate steps.
Moukeddar phase?
pmichaud IMCC might be smart enough to treat the .const's as _pc arguments instead of _p ones
thou masak: probably you have rejected this idea, but just in case: have you considered using something like disqus for comments in your blog? 22:15
pmichaud so that it doesn't allocate a register or use it in the allocation analysis
sorear Moukeddar: the legend goes that Roman roads had stones placed 1 mile apart to count distance. So we get phrases like "keep going until the next mile-stone"
pmichaud and "mile" was the distance of 1000 steps
thus originally "mille" 22:16
Moukeddar 5 4nderstand
thou masak: btw, i usually put baking powder in my pancakes 22:18
Moukeddar num luck misses with my key mapping
sorear is wondering how much of STD's check_variable and whatnot to leave in the grammar, or if it should be moved to actions
niecza: say "foo @!pie bar" 22:20
p6eval niecza v6-151-ge51f7a9: OUTPUT«===SORRY!===␤␤Cannot resolve class for private method at /tmp/WffMHQqA49 line 1:␤------> say "foo @!pie⏏ bar"␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 469 (CORE die @ 2) ␤ at
../home/p6eval/niecza/sr…
22:22 whiteknight joined 22:26 Moukeddar left 22:28 araujo left 22:29 Eevee left 22:32 araujo joined 22:33 jaldhar left 22:34 lumi_ left, jfried left 22:35 lumi_ joined
sorear pmichaud: Parsing Perl6 is more your domain, right? Do you know what all the cases in STD's <variable> are for? 22:37
or TimToady: if he's around
22:43 dju_ joined 22:44 araujo left, dju left 22:45 wallberg left
masak thou: you're the second person to mention disqus (after sorear). I haven't looked closely enough at it to be able to accept or reject it yet. 22:45
thou: next time I'll make pancakes, I'll be making them out of sourdough. TIMTOWTDI. :) 22:46
'night, #perl6.
thou ok. for a 10-year+ blog, i could understand very well avoiding an external service like disqus
jnthn night o/
22:46 mishnik joined, mishnik|2 joined
masak thou: plus, it's fun to invent one's own wheel ;) 22:46
thou but it could also just work, and you could have comments on your blog tomorrow. :-) 22:47
ok, good night masak
:-) when i was a kid Mom had sourdough starter in the fridge, named Herman. she'd feed Herman every few days, and on the weekends we'd have pancakes or waffles. good stuff. :-) 22:48
22:49 bitpart left 23:08 dju_ is now known as dju
sorear whiteknight: maybe you should be the third person to mention disqus to masak? :D 23:10
dalek kudo/nom: b64412d | jnthn++ | src/Perl6/Metamodel/MultiMethodContainer.pm:
Clean up multi method implementation a little so it exposes a cleaner API.
23:21
kudo/nom: 563344f | jnthn++ | src/Perl6/Metamodel/ (3 files):
Multi-method specialization and composition.
kudo/nom: 1206d0c | jnthn++ | src/Perl6/SymbolTable.pm:
If we have to dynamically compile code, be sure to fix up all the nested Parrot subs with their Perl 6 Code objects, not just the outermost one.
kudo/nom: dbb28dc | jnthn++ | src/ (2 files):
Ensure that we locate signatures from the code object, not just the static signature, otherwise instantiated generic signatures will never be located, just the generic original.
sorear o/ jnthn 23:26
jnthn: I want to at least understand how to make roles work before the month is over...
sorear is planning to scrap check_variable as it currently exists and replace it with some different sort of checker 23:27
jnthn sorear: Same ;) 23:28
sorear: My current attempt at doing that seems to be wroking out fairly well. 23:29
Key previous mistake: not reifying all the different things that can show up, or forms roley things can show up as, into separate meta-objects. 23:30
dalek kudo/nom: e5e56ae | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Need to fix up cloned code objects in all cases, not just dispatcher derivation.
23:31
kudo/nom: 8bcdd16 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
Fix a couple of really silly bugs in code object generic and signature generic instantiation that were hiding various others (which have been resolved over the last few commits).
sorear jnthn: what do you mean by that?
jnthn: like not distinguishing the role from the punned class? 23:32
is the g in twigil soft or hard?
jnthn I say it soft.
No, the punning bit wasn't to bad in the master implementation.
*too
I guess the biggest missing thing was no meta-object that represented a generic type variable. 23:33
The pile of cheats that resulted caused...issues.
Of course, in master there wasn't a really good way to do meta-objects. 23:34
sorear How can you have a metaobject for a generic type variable?
23:34 daniel-s joined
sorear Do you also have a metaobject for ::($foo) ? 23:34
...I suppose you would/should.
after all the methods have to exist while they are being compiled, so they need return types 23:35
jnthn I didn't get to interpolated names yet, but it sounds like something that'd need to be handled in a similar way.
sorear I think I get that much
niecza currently has cheaty support for interpolated names, but only in method definitions 23:36
regex ::($name) { ... } # no other form is valid
jnthn I didn't even realize that was allowed until relatively recently.
And was slightly horrified when I saw it.
sorear I'm not entirely sure it *was* allowed before I complained to TimToady that it was impossible to write add_categorical in Perl 6 23:37
then he used his super retcon powers to add it to Perl 6 without changing STD
jnthn oh, so it's your fault :P 23:38
I can see it being useful though :)
23:38 lumi_ left
jnthn It's just a little way down my list of things to worry about. Of course, if you have a cuse case in Niecza for it I can see why you're worrying about it now. 23:38
I do worry a bit about how to factor those things in the general case.
lichtkind good night 23:39
sorear well, that and I'm currently trying to modify Niecza's grammar to not maintain two copies of the symbol table
Which is forcing me to confront a lot of questions about the meaning of names
23:39 lumi_ joined 23:40 wamba left
jnthn Yeah...I've been fighting the same battle in nqp and nom. 23:40
lichtkind sounds like its really advantage to have 2 implementations :)
jnthn At least, with the packages.
Not got lexpads as unified as I want just yet.
lichtkind jnthn: how you mena that? 23:42
jnthn lichtkind: In general, I'm unifying the object the compiler works with and the ones that exist at runtime 23:43
lichtkind: But I'm not as far along with that as I'd like to be with lexpads.
sorear niecza has an interesting problem with that sort of unification 23:49
23:49 araujo joined
sorear I'm trying to keep the compiler pure Perl 6 23:49
23:49 jaldhar joined, araujo left, araujo joined
sorear so the compile time objects are just classes; they aren't manifestations of deeper runtime objects 23:49
it seems like unification would create major problems for cross-compilation 23:51
23:53 nymacro joined
jnthn Must sleep...actually have to act like I have a $dayjob tomorrow 23:54
night o/ 23:55
23:55 Chillance left
dalek kudo/nom: b977e96 | jnthn++ | src/Perl6/SymbolTable.pm:
Add some missing cloning at fixup time, which led to things being shared in ways they should not be.
23:57
lichtkind jnthn: what is a lexpad? 23:59