00:00:00 --- log: started forth/12.04.06 00:06:57 --- quit: ttmrichter (Ping timeout: 246 seconds) 01:00:50 --- join: ttmrichter (~ttmrichte@61.184.206.222) joined #forth 01:00:51 --- mode: ChanServ set +v ttmrichter 02:13:27 is there any way using only ans forth words that I can distinguish end of line from simply reaching the maximum size of the input buffer? 02:27:28 could read one char at a time with key of course, but unless i'm misreading dpans94, i can't count on being able to do read-file on stdin 02:27:49 so either i am missing something or this is incredibly brain damaged. 02:28:02 crc: hi 02:29:00 koisoke: what exactly are you trying to do? 02:29:09 koisoke: I mean, the reading part. 02:29:31 ASau`: want to know if forth's meta vm has the term register? 02:30:43 ASau`: read from stdin preserving carriage returns. 02:30:58 koisoke: no way. 02:31:21 koisoke: you cannot do that across operating systems portably. 02:31:45 In fact, not preserving semantics is more sound. 02:33:36 koisoke: consider the case when your input stream is actually 02:33:41 ASau`: i don't actually need the carriage returns, but suppose I have a read buffer of 256 bytes and read in a really long line with foobar straddling a 256-byte boundary. how do i distinguish "foobar" from "foo bar" when that happens, other than reading one character at a time with key 02:34:18 Use READ-LINE. 02:34:41 Consider the case when your input stream is actually 02:34:58 an iterator over single-linked list of lines kept in memory. 02:35:03 read-line is not guaranteed to behave correctly for lines over 128 bytes 02:35:34 Sorry? 02:35:43 per ans 02:35:49 How does it follow from ANS? 02:37:04 I know there's brain damage there that forces you to allocate 02:37:13 two extra bytes reserved for system-dependent line terminator, 02:37:28 but I don't remember such small and arbitrary limit. 02:38:43 ah yes sorry, that only applies to parsing behavior. 02:39:10 so then yes, read-line 02:39:19 thanks. 02:39:31 ok is it my turn? 02:39:41 ASau`: how about my question? 02:39:53 I couldn't understand it. 02:40:10 Rephrase it. 02:40:26 ASau`: i know many forth like gforth based on a meta vm, right? 02:40:45 I don't understand what you call "meta vm." 02:41:19 ASau`: there is an virtual machine in their code , isnt it? and they port this virtual machine on target platform? 02:42:01 There's virtual machine in virtually any code. 02:42:13 C language is implemented on top of virtual machine, 02:42:29 and any C compiler basically implements that VM on top of physical one. 02:42:47 So, I don't understand what you're talking about. 02:43:05 ASau`: anyway i saw gforth's installation is to compiled their code to VM image, and so does retroforth, right crc? 02:44:32 Unless crc changed everything once again, RetroForth runs on its own byte-code VM, right. 02:44:42 But that's its own decision. 02:44:52 ASau`: they are not compiled the code to native machine code, they compiled that to their virtual machine's machine code , isnt it? 02:45:08 Who are "they"? 02:45:23 C is not compiled to native machine code, 02:45:27 ASau`: so the question is, in its own byte-code VM, is there also register exists ? 02:45:29 it uses its own virtual machine's code. 02:46:13 I don't understand what you're talking about. 02:46:28 ASau`: it looks like read-line on stdin is nonportable but i'll use it anyway. 02:46:29 You lump together three different conceptual levels. 02:46:47 koisoke: there's no portable "stdin". 02:47:30 ASau`: ok lets just talk about retro forth, in its own byte-code VM, is there still register exists ? i mean just like those really cpu(x86, mips) 02:47:31 koisoke: at some conceptual level it is specific to C virtual machine. 02:48:32 jyfl987: it depends on what you call a register. 02:48:55 let me rephrase: it looks like one can not protably do read-line on the "user input device" 02:49:11 koisoke: Yes. 02:49:36 ASau`: i call register just like those ASM programmer, its a inside storage in the cpu, and its accessing time is very short 02:49:37 The primary reason for it is that the notion of "stdin" isn't defined "portably". 02:49:49 jyfl987: is I/O port a register? 02:50:14 ASau`: nope , just those %eax %ebx in x86 or r0-r31 in mips 02:50:23 jyfl987: is R0 that is hardwired to "contain" 0 a register? 02:51:06 jyfl987: what if it contains random noise? Is it a register? 02:51:33 For some values of "contains." 02:52:34 ASau`: ok how do you call those storage location like %eax %ebx in x86 cpu? 02:53:14 jyfl987: R0 that is hardwired to "contain" 0 was called "register" on KL-10 at least. 02:53:28 jyfl987: do you call it a "storage location"? 02:54:37 ASau`: you make my brain confuse :[ 03:13:58 ASau`: i got it, there is internal registers in retroforth's ngaro VM 03:49:04 --- quit: ttmrichter (Ping timeout: 252 seconds) 04:04:21 jyfl987: an ngaro implementation may have simulated registers internally, but these are not exposed via the instruction set 04:09:15 the only exception is the i/o ports, which can read/written to via 'in' and 'out' 04:29:40 crc: thanks, but what i need to know is just the internal register 04:30:48 crc: i am implementing a forth like but simpler lang , i was thought the the VM didnt use any register internal , but now, your documents made my mind clear 04:42:07 Hm. 04:42:16 Consider CL implementation of ngaro. 04:42:30 There're no registers. 04:42:49 i found in django's template language, there's some forth model 04:43:03 Anyway, the whole issue is taken out of air. 04:43:32 so i was thinking to use part of forth for a template language for website 04:43:56 I considered it once, and I don't think it is practical. 04:44:26 DGASAU: so which language do you use for web developing? 04:44:34 i use python 04:44:42 Last time I did it, it was Scheme. 04:45:01 The domain is built around tree-like structure of XML, 04:45:14 and there're well-elaborate technologies around it. 04:45:46 Attempt to implement it around stack creates impedance mismatch. 04:46:10 i know how do you output html, i see some example in some common lisp's framework 04:46:37 DGASAU: its like php, mix its code and html snippets 04:47:04 No, it isn't like PHP. 04:47:25 isnt it? let me find a example, wait 04:47:34 There's big difference between splicing strings and splicing _tree_structures_. 04:47:44 This difference is fundamental. 04:53:26 http://www.frank-buss.de/lisp/tbnl.html check this, 04:53:41 they mix html label and their code 04:53:52 isnt it the php style? 04:56:08 and i will show you a full file of our company's template file 04:58:28 DGASAU: http://pastebin.com/5Bac0Kqx check this, this is a template file from our company, pay attention to those code in {% %} and {{ }} 05:00:03 the common flow is when user request a url, there's a python thread parsed it and fetch all the data it would used, then it load this template file, invoke the render function, and return the result html str to user's webbrownser 05:00:48 DGASAU: what i am trying to do is to add a forth like language to this template file 05:05:48 and inspired by carrier iq, i want to use forth code to instead of jsonp in client-side 05:06:38 this will be very compact which will reduce the brandwith and make a very flexible sandbox in client-side(webbrowser) 05:19:51 --- join: morthwylion (~merv@94.198.124.172) joined #forth 05:19:52 --- mode: ChanServ set +v morthwylion 05:20:09 --- quit: jyfl987 (Quit: leaving) 05:26:58 --- quit: morthwylion (Quit: leaving) 05:31:34 --- join: morthwylion (~merv@94.198.124.172) joined #forth 05:31:35 --- mode: ChanServ set +v morthwylion 05:32:01 --- quit: morthwylion (Client Quit) 05:36:53 --- join: morthwylion (~merv@94.198.124.172) joined #forth 05:36:54 --- mode: ChanServ set +v morthwylion 05:42:54 --- quit: morthwylion (Quit: leaving) 05:43:11 --- join: morthwylion (~merv@94.198.124.172) joined #forth 05:43:19 --- mode: ChanServ set +v morthwylion 05:45:19 koisoke: modern parsing primitives don't introduce limitations. 05:46:18 koisoke: though I've lost the track whether they're going into new standard or not. 05:51:18 --- join: ttmrichter (~ttmrichte@61.184.205.206) joined #forth 05:51:18 --- mode: ChanServ set +v ttmrichter 05:53:18 --- join: ttmrichter_ (~ttmrichte@61.184.206.221) joined #forth 05:53:19 --- mode: ChanServ set +v ttmrichter_ 05:57:28 --- quit: ttmrichter (Ping timeout: 264 seconds) 05:57:36 --- nick: ttmrichter_ -> ttmrichter 07:13:36 --- quit: remyhr (Ping timeout: 246 seconds) 07:56:10 --- quit: morthwylion (Quit: leaving) 08:49:46 --- join: remyhr (~remy@pob78-1-82-238-158-96.fbx.proxad.net) joined #forth 08:49:46 --- mode: ChanServ set +v remyhr 09:11:17 --- quit: ttmrichter (Quit: Leaving) 09:51:58 --- join: jyfl987 (~jyf@114.252.85.193) joined #forth 09:51:59 --- mode: ChanServ set +v jyfl987 09:54:00 hi crc ASau` DGASAU 10:02:11 --- quit: Nisstyre (Quit: Leaving) 10:06:53 --- join: Kumul (~Kumul@adsl-72-50-66-190.prtc.net) joined #forth 10:06:53 --- mode: ChanServ set +v Kumul 10:31:30 --- join: Nisstyre (~yours@c-208-90-102-250.netflash.net) joined #forth 10:31:30 --- mode: ChanServ set +v Nisstyre 10:48:30 --- quit: Nisstyre (Quit: Leaving) 12:01:57 --- quit: jyfl987 (Quit: leaving) 12:34:50 --- join: morthwylion (~merv@94.198.124.172) joined #forth 12:34:50 --- mode: ChanServ set +v morthwylion 13:21:39 --- quit: shachaf (Ping timeout: 245 seconds) 13:23:16 --- join: shachaf (~shachaf@li227-219.members.linode.com) joined #forth 13:23:19 --- mode: ChanServ set +v shachaf 14:33:59 --- join: MrBusiness (~MrBusines@184.99.7.19) joined #forth 14:33:59 --- mode: ChanServ set +v MrBusiness 14:34:28 --- quit: morthwylion (Quit: leaving) 16:04:01 --- quit: ASau` (Ping timeout: 246 seconds) 18:31:37 --- join: ttmrichter (~ttmrichte@58.55.124.247) joined #forth 18:31:37 --- mode: ChanServ set +v ttmrichter 19:10:35 --- join: Nisstyre (~yours@c-208-90-102-250.netflash.net) joined #forth 19:10:35 --- mode: ChanServ set +v Nisstyre 22:50:12 --- quit: nighty_ (Ping timeout: 246 seconds) 22:50:25 --- join: nighty_ (~nighty@69-165-220-105.dsl.teksavvy.com) joined #forth 22:50:26 --- mode: ChanServ set +v nighty_ 22:50:35 --- quit: nighty^ (Ping timeout: 248 seconds) 22:52:02 --- join: nighty^ (~nighty@69-165-220-105.dsl.teksavvy.com) joined #forth 22:52:02 --- mode: ChanServ set +v nighty^ 23:35:49 --- quit: nighty^ (Ping timeout: 245 seconds) 23:59:59 --- log: ended forth/12.04.06