*** mi6x3m has quit IRC | 00:00 | |
*** jfischoff has quit IRC | 00:15 | |
*** jfischoff has joined #io | 00:17 | |
*** chadkouse has joined #io | 03:19 | |
*** gatesphere has quit IRC | 05:15 | |
*** jfischoff has quit IRC | 05:58 | |
*** jfischoff has joined #io | 06:01 | |
*** chadkouse has quit IRC | 06:02 | |
*** jfischoff has quit IRC | 07:56 | |
*** mi6x3m has joined #io | 08:04 | |
*** mi6x3m has quit IRC | 08:20 | |
zephyrtronium | when i do x := 5; y := x clone; y*x; the result is 25, as expected, but since y is a clone of x and not itself actually a Number, how does y * know that y is 5? | 08:45 |
---|---|---|
*** pchalupa has joined #io | 08:51 | |
*** debris` has quit IRC | 10:06 | |
*** debris` has joined #io | 10:07 | |
*** fredreichbier has joined #io | 12:49 | |
*** gatesphere has joined #io | 13:31 | |
*** fredreichbier has quit IRC | 13:59 | |
*** gatesphere has quit IRC | 13:59 | |
*** asie has joined #io | 14:10 | |
*** gatesphere has joined #io | 14:43 | |
*** asie has quit IRC | 15:05 | |
*** asie has joined #io | 15:06 | |
*** gatesphere has quit IRC | 16:33 | |
jer | zephyrtronium, order of operations. | 17:04 |
jer | zephyrtronium, first do setSlot("x", 5); then do setSlot("y", x clone); then do y *(x) | 17:04 |
jer | with reduction we know that x == 5, and we know that y == 5 at the point the y *(x) expression is seen | 17:04 |
jer | therefore, 5*5 == 25 | 17:04 |
*** jfischoff has joined #io | 18:17 | |
*** asie has quit IRC | 18:36 | |
*** asie has joined #io | 18:38 | |
*** asie has quit IRC | 18:43 | |
*** OpenSpace has quit IRC | 18:51 | |
*** pchalupa has quit IRC | 18:54 | |
*** gatesphere has joined #io | 18:58 | |
*** TheMonkey has joined #io | 19:19 | |
*** bomma_ has joined #io | 19:20 | |
*** debris`_ has joined #io | 19:22 | |
*** debris` has quit IRC | 19:26 | |
*** ElMonkey has quit IRC | 19:26 | |
*** bomma has quit IRC | 19:26 | |
*** jfischoff has quit IRC | 20:26 | |
zephyrtronium | jer: my question was more about the type of y | 20:48 |
alpha123 | zephyrtronium: I guess * looks up the prototype chain for a value? :/ | 20:49 |
zephyrtronium | according to the programming guide, cloning produces "an empty object," which i assumed meant was literally an empty Object, but upon closer inspection, it seems that Number clone actually produces a Number | 20:50 |
zephyrtronium | or more accurately IoNumber_rawClone() returns an IoNumber * with its DATA set to that of the proto | 20:51 |
jer | zephyrtronium, right | 20:52 |
jer | it's literally an empty object | 20:53 |
jer | except it's protos list, is initialized with one member, the receiver of the 'clone' message | 20:53 |
jer | i.e., o1 := Object clone do(x := 1); o2 := Object clone do(x := 2); o3 := o1 clone; o3 slotNames == list(); while o3 x == 1; whereas o1 slotNames == list("x") | 20:54 |
*** gatesphere has quit IRC | 21:11 | |
prologic | wait a minute | 21:31 |
prologic | jer, x * y works becuase of inheritence | 21:31 |
prologic | a clone of a Number still inherits the Number proto's methods | 21:32 |
prologic | zephyrtronium> according to the programming guide, cloning produces "an empty object," which i assumed meant was literally an empty Object, but upon closer inspection, it seems that Number clone actually produces a Number <-- yes an empty object, but it's parent or __proto__ is set to the cloned object | 21:33 |
prologic | so there's a lookup inheritence chain | 21:33 |
prologic | Io has and implemented multiple inheritence in a prototype object model | 21:34 |
zephyrtronium | the issue was more that i thought i didn't understand how the target of a message is chosen | 21:36 |
zephyrtronium | but since x clone produces a Number instead of a plain Object, everything makes sense | 21:37 |
zephyrtronium | as in, it is literally a Number that has x in its protos | 21:37 |
zephyrtronium | er, wrong chat | 22:24 |
*** perdix has joined #io | 23:11 | |
*** perdix has quit IRC | 23:11 | |
*** perdix has joined #io | 23:11 | |
*** perdix has quit IRC | 23:12 |
Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!