pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
00:03 Limbic_Region joined, renormalist left 00:06 wknight8111 joined 00:11 Auzon joined 00:22 reZo joined
meppl good night 00:24
00:28 meppl left 00:31 Auzon left 00:36 jferrero left 00:48 thorat joined 00:57 nipotaway is now known as nipotan 01:06 thorat left 01:10 japhb left 01:12 Lorn_ left, Zygo joined 01:27 jjore joined 01:38 japhb joined 02:07 jjore left 02:10 Daveman joined 02:33 njbartlett left 02:43 justatheory left, exp_evalbot left, rhr_ left, felipe left, Gothmog_ left 02:44 meteorja1 joined, diakopte1 joined, mofino joined, exp_evalbot joined 02:47 GeJ_ left, nodboy left, Southen left, kane_ left, hcchien left, yves left, cookys left, buu left, kcwu left, ead left, nipotan left, jjore-w left, r0bby left, pravus left, mugwump left, [particle] left, broquaint left, cognominal left, arguile left, apple-gunkies left, pbuetow left, lumi left, kst left, nothingmuch left, feb left, Helios left, Eidolos left, Maddingue left, jrockway left, IllvilJa left, viklund left, avar left, simcop2387 left, silug left, Zygo left, charsbar left, buubot left, mj41 left, meteorja1 left, diakopte1 left, reZo left, Limbic_Region left, Patterner left, c9s left, kolibrie left, TimToady left, rafl left, Daveman left, SCalimlim left, japhb left, wknight8111 left, alester left, cj left, Tene left, mtve left 02:49 Tene joined, GeJ_ joined, lidden joined, pmichaud joined, Caelum joined, peepsalot joined, nnunley joined, shachaf joined, yahooooo joined, diakopter joined, meteorja1 joined, Daveman joined, japhb joined, Zygo joined, reZo joined, wknight8111 joined, Limbic_Region joined, charsbar joined, alester joined, buubot joined, pravus joined, nipotan joined, cookys joined, ead joined, yves joined, nodboy joined, kane_ joined, Southen joined, r0bby joined, jjore-w joined, hcchien joined, kcwu joined, buu joined, mugwump joined, broquaint joined, [particle] joined, Eidolos joined, cognominal joined, Maddingue joined, arguile joined, nothingmuch joined, simcop2387 joined, silug joined, jrockway joined, kst joined, apple-gunkies joined, avar joined, IllvilJa joined, irc.freenode.net sets mode: +o Tene, viklund joined, pbuetow joined, lumi joined, Helios joined, feb joined, cj joined, mj41 joined, Patterner joined, rakudo_svn joined, allbery_m joined, bloonix joined, fridim_ joined, dalek joined, AndyAway joined, aindilis joined, lambdabot joined, Botje joined, xinming_ joined, mattz joined, qmole joined, stevan_ joined, rintaro joined, PerlJam joined, penk joined, Lorn joined, kanru joined, ruz joined, wolverian joined, cxreg joined, Juerd joined, pugs_svnbot joined, tobeya joined, smtms joined, moritz_ joined, ilbot2 joined, spinclad joined, integral joined, TreyHarris joined, acmoore joined, `nipra joined, zev joined, IRSeekBot joined, tcliou_ joined, jql joined, revdiablo joined, Khisanth joined, SamB joined, SCalimlim joined, c9s joined, mtve joined, kolibrie joined, TimToady joined, irc.freenode.net sets mode: +o TimToady, rafl joined 02:50 rhr_ joined 02:51 Gothmog_ joined 02:52 allbery_m is now known as allbery_b, allbery_b is now known as allbery_m 02:53 allbery_m is now known as allbery_b 02:54 allbery_b is now known as allbery_m 02:56 stevan_ left, stevan_ joined 02:59 zakame joined 03:00 jjore joined 03:07 jjore left 03:08 justatheory joined 03:09 jjore joined
nothingmuch @tell ruoso c.f. meta slots in MO 03:11
lambdabot Consider it noted.
03:18 wknight8111 is now known as wknight-away 03:24 REPLeffect joined 03:25 stevan_ left 03:33 thoughtpolice joined 03:35 Limbic_Region left 03:46 felipe joined 03:56 zakame left, saoler joined 04:16 wknight-away left 04:37 pbuetow left, pbuetow joined 04:43 stevan_ joined
alester yessir 04:52
04:58 clkao joined, obra joined, sunnavy joined, Lunchy joined 05:03 justatheory left 05:28 monomorph joined 05:30 alester left 05:31 stevan__ joined 05:47 stevan_ left 05:50 nothingmuch left 06:03 zakame joined 06:06 thoughtpolice left 06:20 pravus left 06:27 iblechbot joined 06:31 pravus joined 06:46 REPLeffect left 06:48 shachaf is now known as caxaf, REPLeffect joined 06:55 caxaf is now known as shachaf 06:59 devogon joined 07:13 araujo joined 07:17 Psyche^ joined 07:21 baest joined 07:23 Aankhen`` joined 07:27 iblechbot left 07:34 Patterner left, Psyche^ is now known as Patterner 07:55 nothingmuch joined 08:00 GeJ_ is now known as GeJ
nothingmuch h 08:09
lambdabot nothingmuch: You have 1 new message. '/msg lambdabot @messages' to read it.
nothingmuch @tell ruoso re what stevan was talking about... p6opaque living together with p5 types, unboxed types, etc all fully introspectable 08:10
lambdabot Consider it noted.
08:11 stevan__ left 08:39 REPLeffect left 08:45 saoler left 08:46 zakame left 08:50 zakame joined 08:54 zakame_ joined 08:58 apple-gunkies left, masak joined 09:05 zakame_ left 09:07 zakame_ joined, monomorph left 09:09 jferrero joined
masak what happens in perl6 if you assign to undef? 09:19
09:20 zakame_ left 09:22 zakame left 09:23 meppl joined 09:31 zakame joined 09:35 pbuetow left, pbuetow joined 09:52 Zygo left, Zygo joined 09:53 masak left
moritz_ pugs: undef = 3; 09:55
exp_evalbot OUTPUT[*** Can't modify constant item: VUndefā¤ at /tmp/ZAEY1V1HM3 line 1, column 1-10ā¤]
10:00 jisom joined 10:04 pbuetow left 10:14 Aankh|Clone joined, laye joined 10:33 Aankhen`` left 10:43 Lorn_ joined 10:44 cognominal_ joined 10:45 ruoso joined 10:49 jferrero left 10:53 nipotan is now known as nipotaway 11:01 Lorn_ left
ruoso hi 11:15
lambdabot ruoso: You have 2 new messages. '/msg lambdabot @messages' to read them.
moritz_ hi ruoso ;) 11:16
ruoso hi moritz_
11:19 riffraff joined
ruoso nothingmuch, I don't think I understood what you said... 11:31
11:34 pbuetow joined 11:41 jisom left 11:52 Aankh|Clone left 11:53 Aankhen`` joined 11:58 Schwern joined 12:01 pbuetow left, ebassi joined 12:06 pbuetow joined 12:10 iblechbot joined, `nipra left
pugs_svnbot r19913 | ruoso++ | [smop] runtime declared constants now working... All tests pass! the problem was SMOP__Object** x SMOP__Object* confusion... 12:20
diff: dev.pugscode.org/changeset/19913
lambdabot Title: Changeset 19913 - Pugs - Trac
12:22 RayMagini joined 12:34 ebassi is now known as ebassi|lunch 12:42 pbuetow left 12:57 cmarcelo joined
moritz_ ruoso++ # all tests pass ;) 12:58
13:03 andara joined 13:07 `nipra joined
rakudo_svn r25711 | jonathan++ | [rakudo] Initial work on parsing rule, token, regex and grammar, plus a first-cut implementation to make regex work. rule and token currently have regex semantics, however. 13:07
13:07 sri_work joined 13:08 laye left 13:11 ebassi|lunch is now known as ebassi 13:12 sri_work left, sri_work joined 13:15 sri_work is now known as sebastian, sebastian is now known as sri_work
rakudo_svn r25712 | jonathan++ | [rakudo] Junctions should not have a pick method, so remove it. Also remove now-unsed attempt at auto-threading. 13:26
13:32 nodboy_ joined 13:34 rindolf joined 13:39 zakame left, zakame joined 13:40 pbuetow joined 13:48 alester joined 13:55 nodboy left, alester left 14:08 IllvilJa left 14:10 bphillips left
rakudo_svn r25713 | jonathan++ | [rakudo] Tweak to allow you to do all(@array) as well as all(42,45,...). 14:12
pugs_svnbot r19914 | rhr++ | [smop] fix a test number
diff: dev.pugscode.org/changeset/19914
lambdabot Title: Changeset 19914 - Pugs - Trac
14:16 bphillips joined, bphillips left 14:18 bphillips joined 14:23 zakame_ joined 14:26 zakame left, nodboy joined 14:36 njbartlett joined, kyrbe joined
pugs_svnbot r19915 | andara++ | [pugspc] 14:36
r19915 | andara++ | A stand-alone Perl6-to-PIR compiler branched off from Pugs. I basically resurrected Pugs' -CPIL1 and -CPIR backends and removed all the rest.
r19915 | andara++ | First commit, all help welcome.
r19915 | andara++ | Needs ghc 6.8, on feather set your path to /home/andara/usr/local/bin
diff: dev.pugscode.org/changeset/19915
lambdabot Title: Changeset 19915 - Pugs - Trac
14:37 kyrbe left
moritz_ andara: no need to put it under misc/, if you are serious ;) 14:37
andara moritz_: serious? it was just for fun of course :-D 14:39
moritz_ andara: serious fun, that is ;) 14:40
andara moritz_: aye, rather. It's not far behind rakudo and mainly due to incomplete PIR builtins 14:41
14:42 nodboy_ left
moritz_ andara: did you build debian packages for ghc 6.8? 14:42
andara moritz_: no. never did that, is it hard? I just took the binary from haskell.org
moritz_ andara: dunno, if you did I would have used them as well ;) 14:43
andara moritz_: have a look here: haskell-unsafe.alioth.debian.org/ha...nsafe.html 14:45
lambdabot Title: Haskell Unsafe
moritz_ andara: I just looked at it, it's far too old 14:46
andara moritz_: yeah, I see. Is it against your principles to install a binary locally without .deb ;-) 14:48
moritz_ andara: no, I'll install it locally. Installing globally is evil, though ;) 14:49
14:50 chris2 joined
andara moritz_: agree. Say, you seem to be online often. I've been away from per6 for a few months, did I miss much excitement? 14:51
moritz_ andara: depends on your notion of "excitement"
14:51 lisppaste3 joined
moritz_ are you asking about spec changes? or implementation? 14:51
andara rather implementation 14:52
moritz_ kp6 is nearly bootstrapped, waiting for a faster backend
ruoso++ is working on it, called "smop"
andara "smop"? 14:53
moritz_ A C preprocessor and runtime lib that takes care of the meta object stuff
"simple meta object programming"
andara ok
moritz_ or "small matter of programmiing"
andara :-)
moritz_ today he got to the "all test pass" status ;)
perl6 on parrot is now called rakudo 14:54
andara Yes, I gathered that
14:54 thepler joined
moritz_ and it's progressing 14:54
andara Yes, I checked it out, looks very promising. 14:55
moritz_ but slowed by some personal issues (pmichauds wife got sick, and a few other things)
but looks bright ;)
TimToady has hacked a preprocessor for the tests, called "fudge"
cosimo and a few others started to check tests, reorganize them, and move to t/spec/* 14:56
andara very brave :-)
I knew about the work on rakudo, but it seemed a shame to just drop the brilliant Pugs code, that's why I tried to resurrect the PIR backend 14:58
moritz_ the 'fudge' thing is there for making implementation specific TODO marks
14:58 IllvilJa joined 15:00 DarkWolf84 joined 15:02 njbartlett left 15:06 manfred joined, zakame_ left, zakame_ joined 15:15 zakame_ left, zakame_ joined 15:17 allbery_b joined 15:18 rdice joined 15:20 allbery_m left
ruoso pugs: class A { method a { say $!foo } }; A.new().a(); 15:21
exp_evalbot OUTPUT[ā¤]
[particle] hrmm, no error?
ruoso pugs: class A { method a { say $!foo }; method b ($a) { $!foo = $a }; my $a = A.new(); $a.a(); $a.b(1); $a.a(); 15:22
exp_evalbot OUTPUT[*** ā¤ Unexpected end of inputā¤ expecting ";" or "}"ā¤ at /tmp/m53tbYqVAg line 2, column 1ā¤]
ruoso pugs: class A { method a { say $!foo }; method b ($a) { $!foo = $a } }; my $a = A.new(); $a.a(); $a.b(1); $a.a();
exp_evalbot OUTPUT[ā¤1ā¤]
ruoso so, pugs autovivifies the private storage 15:23
pugs: class A { method a { say $!foo.WHAT }; method b ($a) { $!foo = $a } }; my $a = A.new(); $a.a(); $a.b(1); $a.a(); 15:24
exp_evalbot OUTPUT[Scalarā¤Intā¤]
ruoso $!foo.WHAT should be Object when uninitialized, shouldn't it?
VAR($!foo).WHAT would be Scalar 15:25
anyway...
smop p6opaque current design would make it behave like this... 15:26
(autovivifying private storage)
I need a different API for declaring the private storage and later accessing it 15:27
so it can Fail on non-existent private slots in the second phase
[particle] autovivifying private storage isn't what i'd expect, but i'm not sure what the spec says
ruoso it's probably just wrong... 15:28
[particle] ok. good.
ruoso considering Perl 6 is strict by default
[particle] right.
ruoso although there must be a way to allow it
15:30 Lorn_ joined 15:34 Lorn left
ruoso hmm... 15:35
I need a second BUILD submethod that cannot be overrided by the user (at least not easily)
which is the BUILD that initialize the instance using the REPR API 15:36
moritz_ ruoso: but can't non-strict behaviour be detected at compile time, and morphed into 'strict' code?
ruoso moritz_, I'm not sure... can you do $!"foo"?
pugs: class A { method a { say $!"foo" }; method b($a) { $!foo = $a } }; my $a = A.new(); $a.a(); $a.b(1); 15:37
exp_evalbot OUTPUT[*** ā¤ Unexpected "\""ā¤ expecting term postfix, operator, ":", "," or "}"ā¤ at /tmp/FpBafdN9rk line 1, column 28ā¤]
moritz_ ruoso: like symbolic refs? don't think so, but not sure
ruoso at least pugs doesn't support it
Juerd andara: GHC 6.8.2 is in Debian; installing it on feather as I type
andara Juerd: brilliant, thanks a lot! 15:38
15:46 stevan_ joined 15:47 Lorn joined
ruoso TimToady, is $!"$var" allowed? 15:47
andara Juerd: is there an extra library package for GHC 6.8.2? I seem to be missing some libraries 15:48
Juerd Let's see
There are many 15:49
I'll just install them all :)
andara Juerd: I'm missing in particular stm
Juerd Oh, all won't work because some are still for 6.6 15:50
andara Juerd: cool, thanks!
bbl &
TimToady I'm not even sure that $."var" is allowed
if you really want indirection, we should probably force use of the long form in either case
15:50 loki666 joined
TimToady self!"$var" should presumably be allowed 15:50
Juerd Installing stm 15:51
TimToady though I don't think that's in STD yet
loki666 hi, sorry for my bad english... i need construct one module to create syn packages in perl
help please
moritz_ loki666: you're only right here if you want to use perl 6 ;) 15:52
Juerd loki666: Perl version 6?
loki666: If not, have a look over in #perl
moritz_ ... and I doubt that it's much fun right now
loki666 one moment please. 15:53
sorry, 15:54
ok, thanks
15:59 Lorn_ left
Juerd I wonder why people looking for help join #perl6 15:59
In a channel list, it's sorted right under #perl probably, and I think using a channel list is kind of weird anyway :) 16:00
16:01 loki666 left
[particle] maybe because they tried # perl 5 first and were disappointed 16:01
grr.
you know what i mean
moritz_ we all know what you mean 16:03
perhaps we need #perl5helpforreal ;) 16:04
16:14 [particle1 joined, Aankhen`` left 16:17 zakame_ left 16:20 Aankhen`` joined 16:22 r0bby left 16:31 [particle] left 16:34 Aankhen`` left 16:36 devogon left, DarkWolf84 left 16:37 Lorn left 16:39 rindolf left 16:49 viklund left, jferrero joined 16:50 jjore left 16:57 monomorph joined 17:01 rindolf joined 17:03 zamolxes joined 17:14 jisom joined 17:27 spinclad left 17:28 Lorn joined 17:31 andara left 17:36 riffraff left, reZo left 17:37 reZo joined 17:38 smtms left 17:41 Psyche^ joined 17:47 Jamtech joined, TJCRI joined 17:51 baest left 17:56 baest joined, njbartlett joined 17:57 Patterner left, Psyche^ is now known as Patterner 18:03 njbartlett left 18:04 zamolxes left 18:09 njbartlett joined 18:12 jjore joined 18:15 meppel-san joined 18:22 njbartlett left, justatheory joined 18:26 chris2 left 18:27 shlomif joined, rindolf left, shlomif is now known as rindolf, shlomif joined 18:30 justatheory left, meppl left 18:36 Lorn_ joined 18:39 shlomif left 18:40 ebassi left 18:50 Auzon joined 18:52 rindolf left 18:53 mj41 left 19:00 rindolf joined 19:03 jisom left 19:10 TJCRI left 19:13 njbartlett joined 19:19 spinclad joined 19:20 mj41 joined 19:25 jjore left 19:26 jjore joined 19:27 TJCRI joined 19:35 eternaleye joined 19:48 Jamtech left 20:04 meppel-san is now known as meppl
ruoso pugs: class A { has $!a; has @!a; } 20:14
exp_evalbot RESULT[undef]
ruoso pugs: class A { has $!a; has @!a; method a { say $!a; say @!a; } } A.a() 20:15
exp_evalbot OUTPUT[*** Class prototype occured where its instance object expected: Aā¤ at /tmp/Z3mBTtDS4r line 1, column 40-47ā¤ /tmp/Z3mBTtDS4r line 1, column 40-47ā¤]
ruoso pugs: class A { has $!a; has @!a; method a { say $!a; say @!a; } }; A.a()
exp_evalbot OUTPUT[*** Class prototype occured where its instance object expected: Aā¤ at /tmp/nnDoJKC45Q line 1, column 40-47ā¤ /tmp/nnDoJKC45Q line 1, column 40-47ā¤]
ruoso pugs: class A { has $!a; has @!a; method a { say $!a; say @!a; } }; A.new().a()
exp_evalbot OUTPUT[ā¤ā¤]
20:15 jjore left
ruoso pugs: class A { has $!a; has @!a; method a { say $!a.WHAT; say @!a.WHAT; } }; A.new().a() 20:15
exp_evalbot OUTPUT[Scalarā¤Arrayā¤]
nothingmuch ruoso: stevan was discussing the meta isntance 20:16
in Moose the meta instance is a provider of "slot" access
slot == actual storage an attr can use, without caring how the storage is organized
in MO it's a little more abstract
20:16 jferrero left
nothingmuch the attr requests a bunch of slots 20:17
and gets back slot manager objects
these are coordinated by a meta instance
and more decoupled
a p6 opaque generating meta instance would know how p6opaques are implemented
an unboxed meta instance for an int would have just one slot for the value
a Moose meta instance for p5 hash based objects will abstract hash access
ruoso hmm... ok... in smop this is determined by the responder interface 20:18
that intercept the meta calls
instead of doing the usual dispatch
yes... so you have repr and responder interface coupled 20:20
nothingmuch, do you think that might be a problem?
nothingmuch no, ri == interface 20:22
meta instance == representation
ruoso yes... I know...
nothingmuch the responder interface cares what to do with the box
the meta instance cares what to do with the inside of it
only the constructor/accessors gain access to the actual data
and even that is indirect
20:22 manfred left
nothingmuch it can be optimized to be inline 20:22
but accessor implementations should be representation independant 20:23
ruoso nothingmuch, but that's why there's the REPR api
I think conceptually both apply
it might be just an implementation detail
nothingmuch (e.g. the same definition of the Int class can work for real objects that has $.value, and are p6opaque, or are really moose objects which are implemented with a hash)
ruoso yes...
nothingmuch but when it's Int,new 20:24
then there are no other fields
well, i forgot if Int is infinite or not
if it's int
ruoso in smop, that will be controlled by the responder interface
nothingmuch why?
ruoso because even the meta methods are called through the responder interface 20:25
20:25 perigrin joined
nothingmuch so? 20:25
no method needs to know about the representation, ever
ruoso except the metamethods 20:26
nothingmuch the same accessor can be used with multiple implementation types
not even them
ruoso sorry...
except the repr methods
nothingmuch still not necessary =)
ruoso the metamethods will use the repr methods
nothingmuch it's the *slot*'s responder interface that might know more
but that's completely encapsulated 20:27
in practice the slot should be optimzied away 99% of the time
ruoso ah... wait... I think we're not talking about the same thing here...
nothingmuch OK, please resync me then =)
ruoso the slot inside p6opaque is an object like itself 20:28
or not
it's completely encapsulated by the slot's ri
nothingmuch let's talk low level for a sec
ruoso but you still need to know how to get to the slot
before talking to the slot
nothingmuch somewhere, soemthing is going to actually deref a pointer and write a value, right?
ruoso yes, but that's in a very late stage 20:29
the slot is a container
you'll STORE on the container
nothingmuch yes
ruoso by calling a method
nothingmuch exactly
it's the same level of metacircularity that Invocation has
or the fact that each responder interface has it's own responder interface
rindolf Hi all.
Hi nothingmuch
nothingmuch hola
rindolf nothingmuch: what's up? 20:30
nothingmuch: would you suggest Moosifying Test::Run? At the moment I'm using Class::Accessor.
nothingmuch not much perl 6 stuff, tbh
rindolf nothingmuch: oh.
nothingmuch sure, that should be a fun endaveor
rindolf nothingmuch: I enjoyed your presentation at the Perl Workshop.
nothingmuch thanks =) 20:31
rindolf About Devel::Events.
nothingmuch was very antisocial
rindolf There's a recording of it.
nothingmuch i had internets issues so I arrived only in time to give mine
missed the whole day
ruoso nothingmuch, the metacircularity is broken when a low-level implementation implements a container in C struct terms...
20:31 IllvilJa left
nothingmuch ruoso: precisely 20:31
rindolf ruoso: meta-circ of what? 20:32
nothingmuch the object that breaks this circularity is closed over in the responder interface of the resultant object
ruoso rindolf, by the fact that the attribute of an Object is an Object
nothingmuch ... and the fact that a method is an object
and that to call a method call you need to call a method call on an object that dispatches method calls =) 20:33
ruoso what do you mean by "closed over"
?
nothingmuch the metaclass gathers the meta attributes
asks them for their slot information
and provides these bundles to the meta instance 20:34
more accurately it constructs a meta instance with these slots
slot descriptions
ruoso in fact, you *can* implement it that way... but smop doesn't *require* you to do it
you can implement a responder interface that short-circuits everything to a C struct
nothingmuch then when the methods of the attribute are compiled by the attr (using the meta instance) 20:35
yes, but that's not extensible
might as well ditch meta altogether =)
20:35 IllvilJa joined
nothingmuch the meta instance will give the attr meta slot object to use for value access 20:35
the accessors/constructor will close over these objects 20:36
ruoso nothingmuch, did you see the SMOP OO API and SMOP p6opaque Implementation wiki pages?
nothingmuch the p6opaque page no 20:37
wait, actually i think i see where our misunderstanding is
let's go back to Foo isa Int and a real Int
their responder interfaces though related are completely independant
ruoso might be or might be not
nothingmuch completely unrelated means "could possibly be" in this context 20:38
it *is* the responder interface who at the end of the line is responsible for locating (probably indirectly) the correct low level impl for the value access
ruoso if both use the same representation, they will probably use the same RI
nothingmuch no, because they have different methods
ruoso the RI will dispatch to the meta 20:39
s/dispatch to/talk to/
to do the dispatch
nothingmuch do you mean same RI class?
ruoso same RI instance
but different invocants 20:40
nothingmuch why?
ruoso ok... wait... RI prototype 20:41
an RI is never an instance
or almost never
there's no much point in it being instantiated
nothingmuch por que? 20:42
ruoso because every call is always invocant-dependant
so, in a higher-level-sense
nothingmuch well, for protype object RIs, yes
ruoso they will be two RI instances
nothingmuch but 'int' can't be a prototype object
because it's just n bits of integer data
ruoso nope... int is an SMOP__Object...
nothingmuch lowercase int, not Int 20:43
ruoso yes...
the only difference between int and Int
is that I can know for sure the repr of "int", and not of "Int"
nothingmuch well, it *can* be completely unboxed
ruoso in C? how? 20:44
when will that value be destroyed?
who will care about its destruction
nothingmuch because the prototype of all 'int's are statically known then the method set can be copied over to a static method table responder interface
ruoso but how do I know that something is an int? 20:45
nothingmuch if it needs to be destroyed then this is a specific responder interface variant for 'int' that supports tracking
the int constructor knows
ruoso how?
nothingmuch it binds the RI and the value
because it's the constructor
ruoso ah.. ok
that's what a SMOP__Object* is
nothingmuch if the constructor doesn't know what kind of object it makes, then we're way too meta ;-)
right, but you can go further
ruoso a SMOP__Object is simply something with a RI
nothingmuch in the case of 'int'
there is never any finalization guarantee, IIRC 20:46
since the class is closed
when you know that in the low level an 'int' value can live as parameters only
and get thrown away with it's continuation when it's no longer needed
then you don't need to box it at all, the value can just be the actual C repr of the int
the constructor will have two variants (Whether by some special optimizer flag, or really two distinct variants) 20:47
one returns an int, and the code calling on it is responsible for tracking the responder interface
ruoso how can I send a plain int into a capture and recognize it in the other side?
if it's not tagged with its RI?
nothingmuch the other returns a pointer to "something" boxed with a responder interface
that is something you must statically know 20:48
this is an optimization
ruoso ah... ok...
nothingmuch if you have a type annotation, for instance
ruoso we're in the JIT-land in that matter
nothingmuch but wait, i will actually take this further ;-)
now, in the case of a boxed int
it's a pointer to "something"
but that something can still be just an int*
so autoboxing a low level int is just a matter of allocating space for that int, writing it there, and and sending an object box with the right int 20:49
a third variant for the constructor would create a p6opaque
with one slot for value
*the value
this and the second variant are completely polymorphic 20:50
the calling code can never know which is which
without deconstructing the responder interface
this third object looks similar to what subclasses of int do 20:51
ruoso if "something" is just an int* how will you call it the same way as other things
nothingmuch it's a touple
(int*, ri)
ruoso ah...
ok..
that's SMOP__Object
nothingmuch wheras the third variant is
(dict*, ri) 20:52
yes
dict* in our case is a p6opaque
or HV
the responder interface for these guys doesn't need to know the difference though 20:53
if it's a method table
(it's expensive to copy the whole method table in every prototype object if it can be deduced that the slots for the methods are unused by everyone except the responder interface itself)
ruoso I won't copy the whole method table... 20:54
not even in p6opaque
nothingmuch s/whole/local/;
if it's a "real" prototype object, in the sense that it's a dictionary of values
and some values are methods 20:55
20:55 Caelum left
nothingmuch and the responder interface walks the parent chain at runtime 20:55
then the responder interface is compiled with slot access into it
but in 99% of the cases you can create a simpler responder interface
that knows the entire set of methods statically
and is just a dumb vtable
(fwiw, even in the prototype object case, the responder interface should delegate for the meta attr of each method) 20:56
ruoso nothingmuch, that's what I'm calling "low-level implementations" 20:57
for instance...
the Array of Method returned by .^!methods() 20:58
it will simply navigate into the p6opaque structure of the given object 20:59
20:59 Auzon left
ruoso it's what allbery_b was calling a "community" yesterday 20:59
but I need to go... 21:00
nothingmuch just briefly before
please disambiguate 'navigate'
ruoso it will go access the members of the C struct directly 21:01
because it *knows* the structure of that specific object
nothingmuch as an optimization
ruoso yes
nothingmuch ?
ruoso not only, actually
it needs to do that to avoid circularity also 21:02
nothingmuch ah right 21:03
ruoso several optimizations in smop have that same function
the constant identifiers are the best example
it's an optimization in the sense that it allows string matching with plain C pointer identity check 21:04
21:04 smtms joined
ruoso but it breaks circularity because it avoids the need of another method call to do the comparing 21:04
which would require other identifiers to be used
other is the constant capture returned when the invocant is the interpreter 21:05
it avoids creating and destroying an unecessary object
21:06 Squern joined, Schwern left
ruoso but it break circularity on the "current" call 21:06
that returns the current continuation
ruoso signing of in 5...
4.. 21:07
nothingmuch well, in any case of circularity breakage
ruoso 3.. 2...
nothingmuch there should always be a low level accessible unbreaking
ruoso basically, ues
nothingmuch so that in the level just slightly higher it doesn't appear to be broken
ruoso s/ues/yes/
nothingmuch OK, so we were in agreement after all, it seems
ruoso heh... yeah...
and it looks smop survived another massive peer review ;) 21:08
actually... massive review from a peer
heh
nothingmuch stevan too
=)
ruoso pressing the eject button 21:09
nothingmuch ciao 21:10
21:11 Squern left, Squern joined 21:17 thoughtpolice joined 21:20 rdice left, buchetc joined 21:24 fridim_ left 21:35 IllvilJa left 21:52 buchetc left 21:56 rdice joined, rdice left 22:10 TJCRI left 22:25 thoughtpolice left 22:26 dmq joined, iblechbot left 22:30 monomorph left 22:41 Limbic_Region joined 22:46 wknight8111 joined 22:58 jferrero joined 23:05 lumi left, lumi joined 23:11 lumi left 23:15 cmarcelo left 23:16 lumi joined 23:32 justatheory joined 23:39 lumi left 23:42 justatheory left