IRC Logs for #io Tuesday, 2014-10-28

*** petr has quit IRC00:09
*** petr has joined #io00:14
*** gatesphere has joined #io01:16
*** stevedekorte has quit IRC01:21
*** stevedekorte has joined #io02:14
*** gatesphere has quit IRC02:29
*** AKASkip has joined #io04:56
*** xjiujiu has joined #io05:06
*** AKASkip has quit IRC05:54
*** xjiujiu has quit IRC06:22
*** stevedekorte has quit IRC06:31
*** AKASkip has joined #io06:36
*** stevedekorte has joined #io07:05
*** stevedekorte has quit IRC07:14
*** stevedekorte has joined #io07:23
*** stevedekorte has quit IRC07:38
*** nithin has joined #io09:00
*** nithin has quit IRC09:01
*** AKASkip has quit IRC10:09
*** AKASkip has joined #io10:16
*** gatesphere has joined #io10:22
*** ec_ has quit IRC10:35
*** ELLIOTTCABLE has joined #io10:57
*** TheMonkey has joined #io11:11
*** ElMonkey_ has quit IRC11:15
*** gatesphere has quit IRC11:20
*** AKASkip has quit IRC12:45
*** AKASkip has joined #io12:50
*** AKASkip has quit IRC12:51
*** TheMonkey has quit IRC18:27
*** ldcn_ has quit IRC19:08
*** ElMonkey has joined #io20:16
*** KnightRider00_ has joined #io20:34
*** KnightRider00_ has quit IRC20:39
prologicjer, I tried to fix my interpreter last night with proper framing? No success (yet) however; I'm not understanding what the design/pattern should look like or how it should behave. e.g: What are frames for? Do I need a frame for every message? When are they pushed/popped on/off the stack?20:49
*** KnightRider00 has joined #io20:53
*** KnightRider00 has left #io ()20:59
*** KnightRider00 has joined #io20:59
*** KnightRider00 has left #io ()20:59
*** KnightRider00 has joined #io21:59
*** KnightRider00 has quit IRC21:59
*** KnightRider00 has joined #io22:02
*** KnightRider00 has left #io ()22:02
*** KnightRider00 has joined #io22:22
*** KnightRider00 has left #io ()22:22
jerprologic, ok, so frames should be isolated to methods, not messages. messages are sent, and it's up to the object receiving them to map them to some semantic meaning based on its domain22:26
jerusually either a method / function call or a variable lookup22:26
jerbut that's an implementation detail22:26
jerframes are used for methods/functions only22:26
jerand they're used for saving the state of the caller, so that when we return, we can leave things in a reasonable way 22:27
jerso for instance, assume we're running on an ARM processor, r0 is our register where our return value will go, say the caller has some value in r1, let's call it 42; but we invoke a function and overwrite the value in r1 to be the parameter passed into the function; when we return, we want to make sure we reset the values right22:27
jerin the right registers22:27
jerour ABI states that we'll overwrite r0 regardless of whatever its previous value is, so it's up to the compiler to ensure that it doesn't assign some local state or parameter to that register22:28
prologic*nods*22:28
prologicthat’s my understanding too22:28
jeras for when they're pushed onto a stack and popped off22:29
jerpushed on at call time, after we've constructed a proper frame22:29
jerand popped off at return time22:29
prologicright22:29
jerthe result of said function call is placed into some known location that the caller can expect to find it22:29
jerit's really not much more difficult than that22:30
jer=]22:30
prologicokay so this kind of strictly implies that my parser/ast must treat special keywords differently in some special way22:30
prologice.g: “method” and “block"22:30
jerin theory, yeah22:30
prologicright22:30
jermethod() would have two implicit parameters -- 1) the object receiving it, and 2) the information about the call (not necessarily the frame, but i's Call object)22:30
prologicdoesn’t this kind of defeat the point of homiconicty and message passing?22:31
jernow you may use a Call object as your frame for your VM, i don't know =]22:31
jerbut it's sorta heavyweight for that22:31
prologicor this is a special case that can’t be avaoided22:31
jerprologic, this is how you model behaviour properly that can be debugged22:31
jeri'm sure i can think of other ways to handle it if given enough time and a budget to do so22:31
jer=]22:31
jerbut this is the way i know how, and it works pretty much everywhere22:31
prologic*nods*22:31
prologicthat’s what I’m seeing too22:31
prologici.e: the pattern I’m seeing is exactrly this22:32
prologictreat certain keywords in a special way22:32
prologicand build a frame for every function/method call22:32
jerit only has to be special in the compiler frontend22:32
jerit could merely be a mapping to some primitive22:33
jerthat could be remapped to another prim22:33
jeri.e., then all that's special is "this goes through this chain to find what it maps to"22:33
jerthat's more smalltalky22:33
jerio does something similar for operator mappings22:33
jerspecifically, right associative operators22:33
jer(assign operators)22:34
prologicright22:36
*** TheMonkey has joined #io23:18
*** ElMonkey has quit IRC23:21
*** gatesphere has joined #io23:45

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!