Conversation with #inferno at Tue Sep 11 09:41:51 2012 on powerman-asdf@irc.freenode.net (irc) (12:05:24) wrtp [~rog@host-92-23-123-18.as13285.net] entered the room. (12:45:35) yshurik [~Adium@193.69.63.210] entered the room. (13:18:20) Fish [~Fish@9fans.fr] entered the room. (14:40:12) Fish left the room (quit: Quit: WeeChat 0.3.8). (15:58:18) Gagarin [~Gagarin@pD95E207E.dip.t-dialin.net] entered the room. (16:01:56) Gagarin: I'm trying to understand the dis vm and I'm stuck with the data section. The doc says "Data memory is a linear array of bytes" (16:03:03) wrtp: Gagarin: what's your difficulty with that? (16:03:15) Gagarin: But why are types specifided? And what are offsets for? (16:03:31) Gagarin: I mean, if it was just an array, why not just one BLOB? (16:06:20) Gagarin: Where is the difference between 3 Strings and one big string? The lenght is specified, but it seems it just ends in the same array and this information is somehow lost (16:06:39) Gagarin: or isn't it? (16:18:23) powerman-asdf: Gagarin: I don't understand your question. (16:18:54) powerman-asdf: "linear array of bytes" probably about absence of memory protection, segments, etc. (16:19:22) powerman-asdf: types (like String) are just C structs (16:21:43) Gagarin: but is there a reason the dis format specifies the types of the data? (16:22:31) Gagarin: C structs do matter on the language level, but for the assembler "interpreter" it does not matter (16:23:03) powerman-asdf: I don't think so. Different opcodes work with different data types, so it matters. (16:24:13) Gagarin: so, does that mean i can't use "addb" if i point inside a array? (16:24:22) Gagarin: s/array/string (16:26:11) Gagarin: or do stuff like (int)("hello"[3])+4 (16:30:23) yshurik left the room (quit: Quit: Leaving.). (16:31:45) powerman-asdf: Gagarin: yeah, I think so. (16:32:27) powerman-asdf: mystring[i] have type int in Limbo (16:33:41) powerman-asdf: so I think "mystring[i]+=4;" should be valid code (16:35:44) Gagarin: But somewhere there is a table that keeps trac of the types stored in memory (like real vs. string) and it checks if the ops are valid (16:36:24) Gagarin: i can't cast a array of reals to string, right? (16:49:38) Gegemon left the room (quit: Quit: Leaving.). (17:45:18) yshurik [~Adium@161.223.34.95.customer.cdi.no] entered the room. (17:51:14) Fish- [~Fish@9fans.fr] entered the room. (18:54:15) utroz [~utroz@201-78-15-143.user.veloxzone.com.br] entered the room. (20:44:00) Aram [~aram@unaffiliated/aramdune] entered the room. (21:03:50) Gagarin left the room (quit: Ping timeout: 260 seconds). (21:08:42) Gagarin [~Gagarin@pD95E207E.dip.t-dialin.net] entered the room. (21:57:33) `jpi left the room (quit: *.net *.split). (21:58:46) `jpi [~jpi@unaffiliated/pseud0cod3r] entered the room. (22:04:12) yshurik left the room (quit: Quit: Leaving.). (23:37:14) Fish- left the room (quit: Quit: WeeChat 0.3.8). (00:56:16) Aram left the room (quit: Read error: Connection reset by peer). (02:31:35) Gagarin left the room (quit: Ping timeout: 244 seconds). (08:49:31) Gegemon [~ynv@mx1.airis.ru] entered the room.