00:00:00 --- log: started retro/10.02.08 01:25:03 --- quit: SimonRC (Ping timeout: 265 seconds) 01:31:51 --- join: SimonRC (~sc@fof.durge.org) joined #retro 04:16:12 --- quit: virl (Remote host closed the connection) 05:01:57 --- quit: crcz (Remote host closed the connection) 05:03:56 --- join: crcz (~crcz@bespin.org) joined #retro 06:08:53 good morning 09:58:52 --- join: probonono (~User@unaffiliated/probonono) joined #retro 10:07:34 --- join: luptenschteiner (~User@unaffiliated/probonono) joined #retro 10:08:08 --- quit: probonono (Disconnected by services) 10:08:26 --- nick: luptenschteiner -> probonono 11:38:05 --- quit: probonono (Read error: Connection reset by peer) 11:41:12 --- join: probonono (~User@unaffiliated/probonono) joined #retro 13:28:51 --- join: virl (~virl__@chello062178085149.1.12.vie.surfer.at) joined #retro 13:49:34 I'll be heading home soon 14:27:56 --- join: erider (~chatzilla@pool-173-69-160-231.bltmmd.fios.verizon.net) joined #retro 14:28:48 hi 14:28:53 hi erider 14:29:07 crc you are home 14:29:14 early day today 14:31:30 yup 14:35:57 erider: what OS are you using? 14:36:41 * crc is going to port rem to reva 14:37:21 crc linux mint, win 7, FC4, opensolaris and winXPP 14:38:27 I got dsforth to work on my htc phone 14:40:17 cool 14:40:27 erider: ok 14:41:01 its dsforth@ 14:41:04 its dsforth2 14:42:24 crc I think the project was abandoned 14:42:35 The last update was 06 14:45:12 dies the htc have a keyboard? 14:45:15 *does 14:47:23 yes 14:47:43 it may be possible to build the sdl-based retro for it then 14:47:47 maybe 14:48:03 * crc might try sometime closer to 10.5 release 14:49:46 I am going to get the new HTC D2 soon 16:23:01 * crc is hacking the firmware on his sony reader 16:23:35 I'm exposing the user css for the epub rendering engine, so I can control how all the books are formatted 16:38:00 --- quit: virl (Remote host closed the connection) 16:39:15 ok I got my forth environment setup whew 16:50:10 * crc keeps his forth environment in the image file :) 17:03:18 crc what is your postpone word 17:06:06 ` is the closest thing to postpone 17:06:31 ` what is the function of it 17:06:51 ` foo = ['] foo 17:06:53 so: 17:06:59 ` words = ['] words .word 17:07:07 sp@ sp! rp@ rp! 17:07:08 ` =if = ['] =if .compiler 17:07:18 so it returns xt 17:07:22 no 17:07:46 it compiles the code to pass an xt to the class handler associated with it 17:07:56 the best way to get this is with 'see': 17:08:06 : foo ` =if ` words ` then ; 17:08:07 see foo 17:08:39 8684 nop 17:08:39 8685 nop 17:08:40 8686 lit 372 ( =if ) 17:08:41 8688 call 4247 ( .compiler ) 17:08:41 8690 lit 7058 ( words ) 17:08:41 8692 call 424 ( .word ) 17:08:41 8694 lit 396 ( then ) 17:08:41 8696 call 4247 ( .compiler ) 17:08:41 8698 ; 17:08:50 this is the same as if I did: 17:09:09 : foo ['] =if .compiler ['] words .word ['] then .compiler ; 17:09:13 so what is the stack diagram for ` 17:09:22 ( "- ) 17:09:32 it parses for a name and lays down code 17:09:44 takes a word but doesn't return 17:09:59 it takes and leaves nothing from the stack 17:10:11 " denotes parsing, so it parses input for a name or value 17:10:15 parses 17:10:20 ` can be used with numbers :) 17:10:47 lay down code some it adds to the dictionary 17:11:08 it lays down code into the current definition 17:11:35 basic logic is: parse and find xt, class. compile a literal with the xt, and a call to the class 17:11:52 if not a word, convert to a number, compile the number, and a call to .data class 17:12:47 I think of lay down code as adding cells 17:13:08 it linlines machine language for ngaro vm 17:14:30 ok 17:15:31 p: does the same thing in reva, I think 17:16:40 p: ? 17:16:48 that is the postpone 17:18:07 crc ah ok so it stops the effects of immediate 17:18:30 reverts the word back to run-time behavior 17:19:10 postpone is actually different 17:19:27 postpone compiles whatever's necessary to get the compile-time behavior 17:19:36 p: and ` compile a call to the class 17:20:39 in retro, at least, this means you can use it to inline code: 17:20:46 : foo ` 1 ` 2 ` + ` . ; immediate 17:20:48 foo 17:20:48 3 17:20:52 : bar foo ; 17:20:54 see bar 17:21:02 ok see bar 17:21:02 8710 nop 17:21:03 8711 nop 17:21:03 8712 lit 1 17:21:03 8714 lit 1 17:21:03 8716 + 17:21:04 8717 call 5340 ( . ) 17:21:05 8719 ; 17:21:11 bar contains no reference to 'foo' 17:21:26 crc can you explain alignment to me? I am thinking its needed for structure in memory for evenest so adding padding when necessary 17:21:37 alignment isn't needed in retro 17:21:48 in reva, it may be needed for ffi 17:22:28 alignment = padding data to a memory boundry (typically a word or dword boundry) 17:24:09 crc is the useful for ease to count cells 17:29:48 aligned data structures can be accessed faster, if performance is a goal 17:30:05 and some compilers will align elements within a struct, if you're dealing with FFI 17:30:39 reva has 'align' and 'aligned' 17:30:57 align -- allocates space to make 'here' rest on a dword boundary 17:31:17 aligned -- takes and address and returns the next address aligned to a dword boundary 17:34:12 crc so when you say boundary you are talking about that data can only be accessed a dword at a time 17:34:40 no, just making sure the address rests on the start of a dword in memory 17:35:15 hmm 17:53:34 erider: don't worry about alignment with reva. you're not trying to tune for performance, so it's not that important at this point 17:53:49 ok 17:58:51 crc dsforth has a telnet example written in forth that works on wm6 that is pretty neat 18:00:34 but they have a word that exposes or allows access to the device's libraries (DLL) 18:00:51 that would be part of their FFI 18:01:24 yeah they have a word WINAPI: 18:04:08 crc I was expecting something a little more embedded device programming with pure address tweaking :) 18:04:37 but if you can expose the dlls on the system why not use them 18:04:38 generally mobile phone oses don't make it easy to access the raw hardware 18:06:39 I am please with it but I don't like the case sensitivity 18:07:14 most forths I've used are case sensitive 18:08:20 its not that big of an issue but it was a little ignoring to lock my keyboard to upper case 18:14:08 * crc hates all uppercase 18:14:31 uppercase is one of the big dislikes I have with ANS 18:35:45 crc do you have a pastebin 18:35:54 retroforth.com/paste 18:38:26 crc can you look at this for me http://retroforth.com/paste/?id=1946 18:38:58 I am doing something wrong 18:39:35 I am not comfortable with the loops 18:42:32 crc I think I am going to need to swap something somewhere 18:44:48 crc I am going to redone it :( 18:45:06 I think I am confused 18:45:06 one second 18:47:27 http://retroforth.com/paste/?id=1947 18:48:11 drop the 'cr' after 'execute' in the second conditional 18:50:13 http://retroforth.com/paste/?id=1948 with stack comments added 18:52:25 crc so I did need the while 18:52:42 no while in mine 18:53:34 crc my goal was to be able to pick the vector with the number on the stack 18:54:29 mine does that 18:54:41 I was thinking about wrapping the word inside another word to control the vector as if it was the command with the same behavior 18:54:49 http://retroforth.com/paste/?id=1949 - with 'while' 18:56:04 your only real issue was with the first dup @ 0 <> before the 'repeat' 18:57:00 you didn't use the flag, so it was passed into repeat loop 18:57:06 ( n a f -- ) 18:57:11 instead of ( n a -- ) 18:57:26 I was trying to piece it together 19:01:22 crc I got confused 19:03:33 I need to refactor the code with less stack magic 19:05:08 the code looks pretty good to me 19:06:22 your stacks are shallow (4 items max), and no odd stack manipulation in the code 19:08:24 crc I think I should leave the xt on the stack and use another word to call execute 19:08:33 why? 19:09:15 I think I will have more flexibility?? 19:10:16 ok 19:10:32 so : ExecuteCommand ( xt -- ) vector execute ; 19:10:40 then you can change it later: 19:10:59 here >defer ExecuteCommand ] ." calling " dup . cr execute ; 19:11:17 (assuming this is being run under Reva) 19:12:50 actually, 19:13:05 : ExecuteCommand ( xt -- ) ~sys.vector execute ; 19:13:13 here ~sys.>defer ....... 19:13:28 nope 19:13:31 here >defer .... 19:13:36 confusing :( 19:19:09 --- join: sixforty (~sixforty@pdpc/supporter/active/sixforty) joined #retro 19:23:12 crc I was thinking the I could use this later to build some opcode table 19:23:38 that* 19:24:58 --- quit: sixforty (Ping timeout: 240 seconds) 19:25:34 --- join: sixforty (~sixforty@pdpc/supporter/active/sixforty) joined #retro 19:28:12 crc for instances I can create a table of your opcode and match them to there functions and execute them 19:29:59 the true learning out of this is to work with a block of memory and scale it with loop/cond structures lol 19:30:26 I am trying 19:31:52 you're doing good IMO 19:36:57 thanks but I still have a long way to go to get the full power out of forth 19:38:23 crc I guess soon I need to decide what route I want to take ( device drivers, embedded systems) 19:39:48 I was thinking about using forth as a firewall or maybe a proxy. Do you think it would be hard to program forth to do something like that 19:40:44 that would depend on the forth 19:41:23 you'll want ffi for that likely, but if you know the api's you'll deal with, it'll be doable without any more difficulty than using C 19:41:26 reva 19:41:38 would be the system 19:41:50 reva's got good FFI 19:42:08 and ron would probably be able to help identify helpful words / techniques to use 19:42:32 I don't know I was thinking about making a driver for the firewall 19:43:32 firewall needs to sit at kernel level 19:44:10 firewall can be user-level 19:44:12 to inspect the packets being forwarded up the stack 19:44:36 yeah I know but I want to learn forth :) 19:44:51 reva won't run at a kernel level 19:45:23 but can I access it 19:45:29 --- join: docl_ (~luke@97-120-215-201.ptld.qwest.net) joined #retro 19:45:32 you can access the syscalls 19:45:37 --- nick: docl_ -> docl 19:45:37 but that's all userspace 19:45:41 hi docl 19:45:44 hi crc 19:45:52 what's up? 19:46:01 not a lot 19:46:27 * crc modified the firmware on his sony reader to let me have custom fonts + css for all books 19:46:46 erider is thinking about writing a firewall app in reva 19:47:20 cool! 19:48:12 crc I think I could start with a proxy to learn how to redirect packets that hit the machine then I guess I can get into inspecting 19:48:22 that'd be the easiest option 19:48:38 the proxy? 19:48:42 yes 19:48:56 lol yeah I have to start from somewhere 19:49:17 the proxy can be userspace, and handle forwarding/blocking of ports/packets 19:50:15 yeah for starter I can work with the known proxy ports 19:50:36 mainly the squid ones 19:51:26 I guess it would be a redirector 19:52:35 something like socat 20:07:32 --- quit: erider (Ping timeout: 272 seconds) 21:24:39 --- quit: sixforty (Quit: Leaving.) 23:51:17 --- quit: probonono (Ping timeout: 240 seconds) 23:51:33 --- join: probonono (~User@unaffiliated/probonono) joined #retro 23:59:59 --- log: ended retro/10.02.08