00:00:00 --- log: started forth/04.09.28 00:33:54 --- quit: proteusguy ("The #python split is remarkably silly...") 02:19:14 --- join: saon (Ecoder@c-24-129-95-254.se.client2.attbi.com) joined #forth 02:19:27 --- quit: saon (Read error: 104 (Connection reset by peer)) 04:08:31 --- join: crc (crc@131-pool1.ras11.nynyc-t.alerondial.net) joined #forth 04:17:16 Just to get some input, should comparision words use the stack like "TOS > NOS" or "NOS > TOS" ? 04:53:47 --- quit: crc (Client Quit) 06:19:13 --- join: t3h_ch1k3n (f2@bespin.org) joined #forth 06:41:50 --- join: I440r_ (~mark4@216-110-82-59.gen.twtelecom.net) joined #forth 07:26:43 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 07:26:44 --- mode: ChanServ set +o Herkamire 07:47:47 --- join: fridge (~fridge@dsl-220-253-69-140.NSW.netspace.net.au) joined #forth 07:48:24 --- join: hefner (~hefner1@linux3.gl.umbc.edu) joined #forth 08:27:26 --- quit: juhammed (Read error: 104 (Connection reset by peer)) 08:58:53 --- join: AldoBr (Aldo@201009177088.user.veloxzone.com.br) joined #forth 09:09:14 --- join: sch00l_ch1k3n (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 09:19:48 Herkamire: hey 09:21:48 --- join: qFox (C00K13S@82-169-140-229-mx.xdsl.tiscali.nl) joined #forth 09:46:00 hi arke 10:16:40 --- quit: sch00l_ch1k3n ("CGI:IRC (EOF)") 10:17:13 --- join: tgunr (~davec@vsat-148-63-4-107.c001.g4.mrt.starband.net) joined #forth 10:55:37 --- quit: tgunr (Read error: 104 (Connection reset by peer)) 10:57:26 --- join: tgunr (~davec@vsat-148-63-4-107.c001.g4.mrt.starband.net) joined #forth 10:59:32 --- quit: tgunr (Read error: 104 (Connection reset by peer)) 11:00:36 --- join: tgunr (~davec@vsat-148-63-4-107.c001.g4.mrt.starband.net) joined #forth 12:14:30 --- join: swsch__ (~stefan@p5091E59F.dip.t-dialin.net) joined #forth 12:23:00 --- quit: swsch_ (Read error: 60 (Operation timed out)) 12:31:00 Man, forth RPC is unbelievably fun. TEH FORTH si so fun WTF!?!?11 12:33:35 rofflkelolz 12:33:44 rpc? 12:34:01 remote procedure call? 12:34:03 hi 12:34:21 Herkamire, ya. 12:34:25 slava, hi 12:34:29 --- nick: madwork_ -> madwork 12:34:37 any x86 experts here? 12:35:00 when i do something like MOV EAX,[EAX+n] where n is a displacement, what is the limit on the size of n 12:35:03 8 bits? 12:36:23 which is higher-level: forth or x86 asm? 12:36:58 Is that a trick question? 12:38:36 they're equivalent 12:38:48 forth is a macro assembler ;) 12:39:19 Forth is >= ASM. 12:39:33 metacompiled forth *is* asm 12:39:43 Thus the >= 12:40:06 --- join: sch00l_ch1k3n (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 12:40:28 sch00l_ch1k3n! 12:41:36 sl4v4! 12:42:19 arke i have an asm quesiton 12:42:55 go right ahead 12:43:04 basically what is the best way to express this: 12:43:08 i have some integer in EAX 12:43:22 i want to use this integer to index inside an array of XTs 12:43:29 and jump to that XT 12:43:45 well XT = relative address that can jump to 12:44:16 shl eax, 2 12:44:23 add eax, xt_table 12:44:28 jmp eax 12:44:32 err 12:44:33 no 12:44:33 wait 12:44:40 shll $2, %eax 12:44:48 addl xt_table, %eax 12:44:56 movl (%eax), %eax 12:45:02 :) 12:45:04 jmpl %eax 12:45:09 thanks :) 12:45:13 (i think) 12:45:17 it looks good 12:46:10 jmpl %eax 12:46:16 run.s: Assembler messages: 12:46:16 run.s:9: Warning: indirect jmp without `*' 12:46:18 what does that mean? 12:46:36 no idea 12:46:46 ask in #asm or #assembler 12:46:47 its just a warning 12:46:47 lol 12:47:07 when i disassemble it with ojbdump 12:47:08 0: c1 e0 02 shl $0x2,%eax 12:47:08 3: 03 05 00 00 00 00 add 0x0,%eax 12:47:08 9: 8b 00 mov (%eax),%eax 12:47:08 b: ff e0 jmp *%eax 12:47:26 which is ok 12:47:44 im guessing the e0 after ff is a mod-r/m byte? 12:47:57 i have to add jmp to register & shl to my assembler;) 12:48:43 no 12:48:52 i think the e0 = the eax 12:49:02 actually 12:49:04 yes its the mod r/m byte though 12:49:17 replace the mov and jmp with a jmpl (%eax) and see what happenes :) 12:49:41 sch00l_ch1k3n, it works ;) 12:49:48 well, assembles, with the same warning :) 12:49:54 and disassembles fine 12:49:55 ok 12:50:32 my assembler needs some cleanup 12:50:34 its badly factored 12:50:36 http://cvs.sourceforge.net/viewcvs.py/factor/Factor/Factor/library/compiler/assembly-x86.factor?rev=1.7&view=auto 12:51:17 factor factor factor 12:52:47 i will :) 12:53:18 FACTOR FACTOR FACTOR COME ON YOUR FRIGGIN LANG IS CALLED FACTOR SO FACTOR YOU NON-FACTORING HERETIC 12:53:23 ^_^ 12:53:27 hehe :) I was looking at this part of your URL: factor/Factor/Factor 12:53:51 slava doesnt factor his code ? 12:54:42 I440r, i copy and paste religiously, and add NOP loops all over the place for effect 12:54:54 lol 12:54:57 * I440r_ thwaps slava 12:54:58 hehe 12:55:14 herkforth doesn't have copy :) :) 12:55:23 the only piece of code i factor is : int i = 1000000; while(i--); 12:55:27 then i add calls to it all over the place 12:55:51 haha 12:56:06 I have cut and paste. 12:56:19 this encourages factoring 12:57:58 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 12:58:04 --- quit: sch00l_ch1k3n ("CGI:IRC (EOF)") 12:58:08 i have cut and backspace but no paste and no keyboard input, it encourages shorter code :) 12:58:24 :) 13:00:20 I can see how no keyboard input would... 13:00:43 I just have backspace, and a key that pasts the last char deleted with backspace 13:01:03 s/char/word/ 13:05:20 dang, I keep exploding rings 13:06:44 my keyboard is hexadecimal 13:06:52 this really encourages shorter code 13:06:54 :P 13:07:16 my computer doesn't work 13:07:20 this encourages incrased debugging 13:09:07 :P 13:09:48 --- join: sch00l_ch1k3n (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 13:11:24 HI!!!!!!!!!!!!!!!!!!!!!!!1111111 13:11:38 wht the... 13:12:14 hi qfox 13:12:47 hi arke 13:12:55 oh 13:12:59 should've known 13:13:09 cgiirc == evil btw. 13:13:19 i know 13:13:23 but it works from school :) 13:13:43 guess it cant be much worse then the irc client i found for the mac osx 13:13:51 goddamn that thing is evil to the bone 13:14:28 irssi for life! 13:16:37 --- quit: sch00l_ch1k3n ("CGI:IRC (EOF)") 13:17:10 --- join: sch00l_ch1k3n (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 13:22:28 --- join: Topaz (~top@sown-87.ecs.soton.ac.uk) joined #forth 13:27:52 Can someone tell me if this implemantation of CASE etc. is supposed to work? http://www-personal.umich.edu/~williams/archive/forth/peters/Case.html 13:28:09 Converted it to POSTPONE etc, and I get a control-flow mismatch. 13:30:04 OK, got it working with my FOR/NEXT loop. Maybe my ?dup was not working right. 13:30:05 --- quit: sch00l_ch1k3n ("CGI:IRC (EOF)") 13:30:21 Though, I don't see how the 0 from the CASE statement was being used or incremented. 13:32:14 --- join: sch00l_ch1k3n (apache@11.198.216.81.dre.siw.siwnet.net) joined #forth 13:42:53 HELLO CHILDREN 13:42:58 sch00l_ch1k3n, instead of this: 13:43:03 call FOO 13:43:05 jmp BAR 13:43:07 should i do 13:43:09 push BAR 13:43:12 jmp FOO 13:45:34 oh wait no 13:45:39 or yes 13:47:22 --- quit: qFox (Read error: 104 (Connection reset by peer)) 13:48:05 looks good to me.. 13:49:40 no* 13:49:43 that wont work 13:49:49 err 13:49:54 actually, yes it will. 13:49:58 but i think it doesnt matter either wauy 13:50:04 and its less copmlicated the first way. 13:50:09 it makes the code that genreates the asm in this case easier 13:50:23 i'm doing table dispatching and its kind of tricky 13:52:36 combiend with tail-call optimization anyway 13:53:10 i'm going to a lecture bye 13:53:44 wow... I think this would be a significant optomization on ppc 14:00:44 --- quit: sch00l_ch1k3n ("CGI:IRC (EOF)") 14:13:39 --- join: paintcan (~wossname@rn-v1w5a06.uwaterloo.ca) joined #forth 15:10:38 --- nick: paintcan -> wossname 15:17:04 --- quit: hefner ("arrr") 15:27:51 if the last two things in a def are calls, then it could be compiled as: lis, ori, mtlr, b 15:33:43 what I have now compiles: bl, lwz, addi, mtlr, b 15:36:14 so it's actually shorter. but if I had the return stack growing up instead of down, they would be the same length. 15:43:52 no wait, up vs down doesn't matter. 15:44:34 it's just a matter of whether it's push or pop that's post-increment 15:47:07 maaan... a simple stack optomizer could speed some things up sooo much 15:47:18 eg something like this: 3 + @ 15:47:26 eg something like this: 16 + @ 15:47:57 in asm, it's one instruction: lwz tos, 16(tos) 15:48:51 but without the optomizer, it's 6 instructions 15:49:18 perhaps an extreme case... 15:49:43 but stuff like "16 +" and "4 *" are common enough 16:04:20 --- quit: tathi ("leaving") 16:11:08 --- quit: Topaz ("Leaving") 16:12:59 --- join: TheBlueWizard (TheBlueWiz@modem-033.nyc-tc03b.fcc.net) joined #forth 16:13:00 --- mode: ChanServ set +o TheBlueWizard 16:19:31 --- quit: TheBlueWizard (Nick collision from services.) 16:19:51 --- join: TheBlueWizard (TheBlueWiz@modem-055.nyc-tc03a.FCC.NET) joined #forth 16:19:51 --- mode: ChanServ set +o TheBlueWizard 16:22:32 --- join: futhin (thin@bespin.org) joined #forth 16:22:32 --- mode: ChanServ set +o futhin 16:23:17 t3h ch1k3n 16:24:08 so guys.. 16:24:19 is it worth driving 6 hours to go get my computers and monitors? 16:24:27 otherwise i have no computer at home.. 16:26:42 6 hours?!? where on the Earh are you? 16:27:03 well 3 hours to the place and 3 hours back to home 16:27:16 i left my computer in edmonton 16:27:22 and drove to calgary and found a place 16:27:30 i can wait 2 weeks for my friend to bring it down with him 16:32:46 I see 16:35:35 but can i survive 2 weeks with no computers!!!!!!! 16:36:25 i'll just become a library whore 16:36:26 or something 16:36:45 but it only gives like 30 or 60 mins of internet 16:36:57 think of it as Extreme Survival reality TV show stunt :-D 16:37:03 haha 16:37:16 hi futhin 16:37:19 i'll have to find a hottie chick near my new apartment so i can mooch off her 16:37:28 for int3rn3t! 16:44:11 hi futhin 16:44:27 dammit i said "HI FUTHIN" 16:44:53 Sit on a park bench and write forth code in a note pad, all mysterious-like. 16:45:01 t3h_ch1k3n: i heard you 16:45:32 "hi" doesnt mean much to me 16:45:39 trenchcoat and black hat 16:45:45 but if you launched into a discussion that would get my response 16:46:07 Herkamire: nooo, white hat! for white hat hacking! 16:46:31 whitehat? 16:46:56 yeah some ppl tried to differentiate between good hacking and bad hacking 16:47:09 by introducing the terms "white hat" and "black hat" i believe 16:47:18 futhin: I am thinking of an optimal way to code trigonometric functions in fixed point math using forth 16:47:19 it was like 3-4 years ago since i saw those terms 16:47:20 and where does redhat fit into this? 16:47:24 heh 16:47:26 futhin: interesting enough btch? 16:47:30 redhat is both evil and good! 16:47:50 redhat is evil but linux's goodness shines thru 16:47:57 I have a good integer sqrt 16:48:10 Herkamire: lemme see 16:48:11 in dragonlance books, the red wizards are halfway between the white wizards and the black wizards 16:48:25 http://herkamire.com/jason/sqrt.fs 16:48:36 futhin: :) 16:49:34 Herkamire: :D 16:50:04 Herkamire, ppc doesn't have sqrt opcode? 16:50:57 slava: why would it? 16:51:02 x86 does 16:51:29 --- join: das (~das@adsl-64-219-100-33.dsl.lgvwtx.swbell.net) joined #forth 16:51:34 x86 has everything except a kitchen sink 16:51:51 I think ppc has a sqrt-guess instruction in floating point, but nothing in int 16:53:22 why would you use sqrt for ints? 16:54:22 yeah, ppc has frsqrte which as I understand it (not all that well) is that it only has 5 bits of accuracy. 16:54:42 slava: dunno, I just was reading about that method for finding a square root, and wanted to try it. 16:55:54 Herkamire: thats a nice implementation :) 16:56:05 Herkamire: now, same thing for trig functions? :) 16:56:24 --- quit: wossname (Connection timed out) 16:56:39 Herkamire: I thought of implementing ratios which get rescaled and table into a trig table 16:56:52 t3h_ch1k3n: sqrt() is a trig function isn't it? 16:56:54 Herkamire: then, with the closest two values, it gets rounded on a linear basis. 16:57:07 Herkamire: no, trig is cos tan sin and their inverses 16:57:29 what about log() ? 16:58:52 yeah, I was thinking about how I'd to cos() and sin() yesterday 16:59:02 I saw a fun attractor fractal that used them and wanted to do it in herkforth 16:59:20 log is not trig 16:59:39 oh, I didn't realize "trig functions" meant just the sine waves and tan() 16:59:48 if log base a of x = y, then a^x = y 16:59:51 err 16:59:56 if log base a of x = y, then a^y = x 16:59:58 :) 17:00:04 err 17:00:11 thats wrong too 17:00:27 * t3h_ch1k3n is conf00s3d 17:00:27 * t3h_ch1k3n eats something 17:00:35 a^x = y 17:00:47 x = log(base: a, y) 17:01:06 x = ln(y)/ln(a) 17:01:33 the above all work together 17:01:47 let log_a(x) denotes a log base a function of x. Then log_a(a^x) = x 17:02:29 TheBlueWizard: right 17:03:08 so you log_a() both sides, to get: log_a(a^x) = log_a(y) ---> x = log_a(y) 17:03:32 good 17:04:36 linear interprepolation seems like it'll be fun with fixed point 17:06:01 first clear enough low bits (and shift down) so that your input is a good index into your table. then fetch that element and the next. call that sint-get2 17:08:49 over - gives you the lower bound, and the difference to the next one. multiply this by the lower bits of your opperand, shift it down, and add to the lower bound. 17:08:52 tada 17:16:09 --- part: TheBlueWizard left #forth 17:18:04 heh 17:18:19 just did a little math 17:19:37 if you do fixed point with the point in the middle ie 16.16 then you could have a 402KB table and not need interpolation 17:26:27 eh? Well, I'm working on the XTL for the 28x. Running into a few annoying things that make for comprises. Eh... I'll have to wast 4 clock cycles in a few places.... no big deal. 17:27:07 sorry, wrong window... 17:28:05 mmm... actually, you'd only need half that, because all the values would be from 0..1 which only uses 16 bits. 17:30:23 ok, now to compute the maximum error you would get from a linear interpolation with a table of only 256 entries. 17:30:42 Herkamire: listened to the radio show yet? 17:30:55 t3h_ch1k3n: no. you? 17:31:03 listening to track 3 17:31:08 its funny :) 17:42:22 hmmm... acording to my calculations on my calculator, a 256-element array would give an accuracy of +- 0x0000.00005 17:42:31 oops. that's 0x0000.0005 17:42:40 I'm not working in 36 bits! 17:42:51 :) 17:43:33 actually... that's not +-... it's always off towards zero 18:16:55 huh... my calculations went different this time 18:20:02 my latest indicates that the point at which the inacuracy of linear interpolation method creates errors greater than 0x0000.0001 is when the table has somewhere between 100 and 200 entries 18:21:00 my math indicates that whith a table of 201 entries, the maximum error, (with linear interpolation) is less that 0x0000.0001 18:26:54 --- join: Rayvin (~chatzilla@2.dallas-21rh15-16rt.tx.dial-access.att.net) joined #forth 18:42:55 --- part: futhin left #forth 18:54:59 --- join: hefner (~hefner@pool-151-196-238-98.balt.east.verizon.net) joined #forth 18:59:25 --- quit: Rayvin ("ChatZilla 0.9.52B [Mozilla rv:1.6/20040115]") 19:06:03 --- join: krb (~krb@169.dallas-20rh16rt.tx.dial-access.att.net) joined #forth 19:06:44 --- nick: krb -> Rayvin 19:33:05 sin() almost implemented in herkforth. but, time to work 19:36:39 when I get it finished, I'm going to make this: http://astronomy.swin.edu.au/~pbourke/fractals/peterdejong/0.gif 19:37:13 and then play with the parameters. maybe make some others on this page: http://astronomy.swin.edu.au/~pbourke/fractals/peterdejong/ 19:37:18 wow 19:37:56 those are awesome 19:38:04 I'd love to see them animated as the parameters change 20:21:50 :) 20:22:07 I'm not sure how long they take to generate. I'm guessing a bit long for animation 20:22:12 not sure though. 20:22:27 Herkamire: listened to them yet? 20:22:33 last time I did something like this was on a 90MHz computer I think 20:22:33 Herkamire: its _great_ :)\ 20:22:43 Herkamire: especially #s 2, 5, 6 20:22:46 arke: I'll get to it. working atm 20:22:55 :) 20:23:10 I like to save amusing listening material for when I'm in the mood. 20:23:23 when I want to be entertained, rather than when I want to do something 20:24:07 I'm generating them now, you get a reasonable picture from plotting several hundred thousand points 20:24:21 --- quit: Rayvin (Remote closed the connection) 20:28:21 I just had an interesting idea for a C library. 20:28:58 basically, a library which protects from buffer overflows. 20:29:20 its called lisp, factor, or java, depending on your tastes. :) 20:29:27 only problem I can think of is its lack of reentrance 20:29:32 :) 20:30:50 basically, you would allocate a chunk of memory via safe_alloc(size_t) and this returns a pointer to a safe region. This would only be temporary - as in, you can't have more than one safe reason allocated 20:31:38 the safe memory is allocated in a blank page at the end. The page is set to -rwx, as is the following page 20:31:51 sounds like a lot of trouble 20:31:58 why use C for this kind of stuff at all? 20:32:53 the safe memory is then mprotect() to +rw (NOT rwx, even though it doesnt matter on x86) 20:33:11 stupid x86 20:33:25 why does it matter? 20:33:38 finally, it sets up a signal handler temporarily, and after locking the safe memory, safe_was_overflow() should be checked. 20:33:55 yes, stupid x86 20:34:06 slava: afaik most linux viruses get in because x86 does not differentiate between data and instructions 20:34:09 slava: theres a bug in x86 where readable code is automatically executable too 20:34:28 why should the CPU compensate for poor design? 20:34:54 so you figure out how to crash a server (by making a buffer overflow or something) and it starts executing the wrong thing. with luck it'll execute the stuff you sent it 20:35:09 doing array bounds checking should be done by software not by the CPU 20:35:20 buffer overflows are just a sign of shoddy code 20:35:30 fine :) 20:35:33 sure, it's bad code 20:35:36 but it happens 20:35:50 and with all that memory protection and all that, it would be nice if it wouldn't execute data 20:36:12 with something as complex as GNU/Linux, it's good to have as many layers of protection as possible 20:36:15 the w^x protection in openvms is troublesome for lisp implementations and i'm sure forths too 20:36:19 bounds checking is SLOW 20:36:23 s/openvms/openbsd/ 20:36:27 Herkamire, my cpu is 2.4ghz 20:36:36 slava: good for you. I'm talking about servers 20:36:48 slava: and thats _exactly_ the kind of attitude which makes modern OSes so fucking slow 20:36:52 basically they crippled their OS to work around bugs in C 20:36:57 s/C/C apps/ 20:36:58 running 20-100 php scripts at once takes speed 20:37:05 php is interpreted 20:37:23 slava: so is java 20:37:28 java is compiled 20:37:40 slava: java is emulated 20:37:53 its translated to native code just like a native compiling forth 20:38:02 a JVM doesn't have an inner interpreter loop 20:38:08 slava: just like any good emulator does 20:38:16 so gcc is an emulator? 20:38:21 slava: no 20:38:27 only difference is time of compilation 20:38:32 slava: ok, right, you can compile java aps 20:38:35 gcc is developer compiles, java compiles on program loading 20:38:37 but mostly people don't. 20:38:45 most people do, by virtue of running the JVM 20:38:48 mostly people just run them in the emulator (JRE) 20:39:07 which creates java bytecode for the java VM 20:39:09 it doesn't matter if its compiled to an ELF file or memory, its still compiled 20:39:11 vm= virtual machine 20:39:24 whatever dude 20:39:39 gcc creates binaries containing instructions for the actual architecture 20:39:51 java creates instructions for the architecture in memory 20:39:57 so it loads your .class file 20:40:03 and compiles that to native code, there's no difference 20:40:06 java normally creates bytecode for a _virtual_ machine (ie not the real architecture it's going to run on) 20:40:15 you're wrong 20:40:20 .class files on disk are java bytecode 20:40:23 I love this argument 20:40:25 they are loaded by the JVM and compiled to native code 20:40:34 look, I realize you have a fancy jvm that compiles to native code on the fly 20:40:37 there is no bytecode inner interpreter 20:40:41 I don't have that, and I never have to my knowledge 20:40:42 it makes no difference 20:40:51 Herkamire, mac os x jvm also compiles to native code 20:40:58 consider .class files as source code 20:41:01 and the jvm as a compiler 20:41:05 it's still an emulator 20:41:07 qemu does the same thing 20:41:09 and so is gcc 20:41:13 and I don't have mac osx btw 20:41:19 gcc is not an emulator 20:41:21 it's a compiler 20:41:25 so is the JVM 20:41:38 if i'm running a java http web app, everything is compiled ot native code on startup 20:41:44 its as if i did gcc on my .c files, and ran the immediately 20:41:52 while its running there's no bytecode interpretation 20:42:06 that's why java has a long startup time 20:42:08 its compiling 20:42:11 what if you have self-modifying code? 20:42:14 you can't 20:42:22 you can't generate code in java? 20:42:27 then how the hell does factor work? 20:42:28 you can generate code yes 20:42:36 but you can't modify random code in memory 20:42:48 factor compiles words and sends the bytecode to the VM using a special API 20:42:51 right, and it generates java byte code, so the JVM obviously deals with the bytecode 20:42:52 the VM then compiles this to native code 20:42:58 yes, but there's no self modifying bytecode 20:43:02 its simply not possible 20:43:10 whatever. I mean it can spit out code 20:43:15 you can generate new code, and never call the old code again, in which case it gets garbage collected 20:43:21 yes, sure 20:43:21 it's not like a compiler where it's all (and only) done ahead of time. 20:43:31 yes but 99% of programs don't generate code on the fly 20:43:32 it's like a good emulator that traslates bits to native code 20:43:36 even factor compiles everything on startup 20:44:07 and I asume that it's a jit thing, where it only compiles bits of bytecode that it comes accross, and only when it gets to them 20:44:34 are you saying qemu is a compiler and not an emulator? 20:44:34 Herkamire, it does profiling of the code on the fly and recompiles it sometimes to try a more efficient approach yes 20:44:49 Herkamire, but for all intends and purposes its all native compiled 20:44:56 so? 20:45:03 so it doesn't 'emulate' anything 20:45:13 it (*@#&$@# emulates other architectures 20:45:19 the algorithms for compiling a .class file are not much different than compiling a .c file 20:45:21 look up emulator in the *#$$##@# dictionary 20:45:28 except you parse binary data not text 20:45:28 I don't care 20:45:35 is forth an emulator/ 20:45:35 there's a distiction. that's why we have different words for it 20:45:43 you're an emulator ;) 20:45:56 sorry, but you don't get to redefine words in the english language 20:46:08 Herkamire, how is forth code different from jvm bytecode? 20:46:14 Herkamire, a forth compiler goes over the code and turns it into machine code 20:46:22 Herkamire, jvm is not an 'architecture' its just a simple stack based language 20:46:30 with some fancy opcodes for virtual method dispatch 20:46:47 afaik it's not a language, it's an instruction set 20:46:59 as much as forth is an 'instruction set' 20:47:08 you put values on a stack 20:47:11 you call methods which return vlaues on the stack 20:47:15 you add integers on the stack etc 20:47:15 java bytecode in an instruction set for a virtual machine 20:47:26 forth is a language 20:47:30 it's source code 20:47:35 java bytecode is compiled code 20:47:35 forth is an instruction set for a virtual machine 20:47:39 java bytecode is a language 20:47:45 no, forth is not an instruction set 20:47:47 it's a language 20:47:57 just because .class files are binary doesn't mean anything that runs them is an 'emulator' 20:48:05 i believe herkforth source is binary too 20:48:08 is herkforth an emulator? 20:48:16 a forth compiler turns forth code into whatever instruction set you programmed it to compile to. eg herkforth compiles forth (or something close) to the ppc instruction set 20:48:30 Herkamire, and JVM compiles .class file to x86 or ppc machine code 20:48:36 for the JVM .class is source 20:48:39 JVM doesn't know about .java file 20:48:41 that's exactly what emulator means. 20:48:45 javac is just a translator from one language to another 20:48:53 you EMULATE binaries. you COMPILE or INTERPRET source 20:48:58 that's the distiction 20:49:14 Herkamire, you can write a special editor that edits .class files directly, with a gui 20:49:16 Herkamire, just like herkforth editor 20:49:25 Herkamire, does this make JVM a compiler and herkforth an emulator/ 20:50:13 slava: what's your point? 20:50:29 my point is that jvm is not an emulator in the sense of qemu or bochs or whatever 20:50:33 it doesn't emulate a computer 20:50:44 it emulates a virtual machine 20:50:47 there's no MOV instruction in the JVM 20:50:50 there's no I/O ports in the JVM 20:50:54 there's no emulated periphirals 20:51:07 I'm not sure that's true, but whatever 20:51:22 doesn't matter 20:51:25 it's a virtual machine 20:51:31 and so is forth etc 20:51:45 how is a .class file editor different from herkforth editor? 20:52:16 I honestly don't know what a .class file is 20:52:22 except that it's some part of a java program or something 20:52:24 then why are you talking about java? 20:52:32 javac turns HelloWorld.java into HelloWorld.class 20:52:35 its pretty fundamental 20:52:39 than java VM runs .class files 20:52:43 you don't run .java files 20:53:05 so the .class file is a series of instructions in a binary format intended for a (virtual) machine 20:53:22 much like an ELF file 20:53:23 yes, just like herkforth sourec is a binary format intended for a (virtual) machine 20:53:27 no, not like ELf at all 20:53:36 no, herkforth source is not intended for a virtual machine 20:53:45 it is intended to be edited, and compiled 20:53:48 Herkamire, only because you don't call it a virtual machine but semantically its identical 20:53:55 Herkamire, i can write a program that ediots .class files 20:54:03 Herkamire, and .class files *are* compiled by the JVM 20:54:06 * t3h_ch1k3n considers buying new motor for remote-controlled car 20:54:09 so where's the difference? 20:54:17 intended use 20:54:35 Herkamire, a lot of tools for editing .class files exist 20:54:41 are you trying to prove that there is no difference between an emulator and a compiler? 20:54:52 Herkamire, an emulator can either be a compiler or an interpreter 20:54:53 slava: so what? there's tools for editing ELF files too 20:55:00 Herkamire, yes but not in the same sense 20:55:11 Herkamire, you can't take an ELF file, add a function, change this function, add some statements here, there... 20:55:35 it's feasable 20:55:38 but pointless 20:55:43 Herkamire, ELF has addresses to jump to, java has method names 20:55:55 the addresses etc only exist when its compiled to native code by the JVM 20:56:19 I don't have time for this BS. I'm going to stick with the terminology everybody else in the world is using. emulators are for running code for other architectures. compiles turn source into binaries. PERIOD. THATS WHAT THE WORDS MEAN 20:56:25 --- quit: Herkamire ("beanhead") 20:56:38 what a pedant 21:02:54 hmm 21:03:05 i wish i could change gears on the remote control for it 21:03:15 right now, I have to manually select the gear on the car 21:03:16 :/ 21:09:32 ack 21:09:38 and i also need to fix that differential 21:09:48 it needs to be _alot_ tighter than that 21:10:35 * t3h_ch1k3n grabs a screwdirver 21:15:55 hrm 21:16:01 this is actually quite impressive. 21:18:46 --- join: Herkamire (~jason@h000094d30ba2.ne.client2.attbi.com) joined #forth 21:18:46 --- mode: ChanServ set +o Herkamire 21:19:18 hi Herkamire 21:24:16 sorry I was arguing 21:24:24 :) 21:24:32 anyway i couldn't care less about java :) 21:24:39 i don't even know why i got into that argument 21:25:05 * t3h_ch1k3n is taking apart r/c-cars rear axlr 21:25:06 I could have just asked you to define your terms 21:25:08 axle* 21:25:43 to me an emulator can compile to native code if it wants to. in which case it obviously contains a compiler. but to me that's an implementation detail within the emulator. 21:25:49 and I still consider it to be an emulator 21:26:25 there are many emulators (pearpc for example) which compile to native code on some architectures (x86 in this case) but not on others (like say ppc) 21:27:46 to me the distiction between "emulator" and "compiler" is just a matter of whether they run a binary (instructions) or source 21:27:56 i tend to have a more abstract view 21:28:01 anything can be source really 21:28:05 there are probably cases where it's a judgement call if something is a binary or source 21:28:17 you can make a language that runs gif files based on pixel colors etc ;) 21:28:42 you seem to me to be arguing that everything is source 21:28:51 it can be 21:29:08 while it may be true that there is no clear stark line between source and binary 21:29:08 even exe can be source. i remembe seeing a program that 'compiled' an exe to make it smaller by eliminating redundancies in the assembly 21:29:33 I don't dissagree with that... you can think of anything as source. 21:29:41 I just don't think that thinking that way is helpful 21:29:42 if you're talking about convention 21:29:53 then sure, .java is source, forth is source, .o and .class are binary etc 21:30:04 I think it's useful to have the (abstract, perhaps artificial) distiction between source and binary 21:30:26 gnu has a nice definition for source iirc 21:30:48 something about "the form intended for editing" 21:30:57 it's not a technical difference 21:31:05 it's about what it's for 21:31:09 what people generally do with it 21:31:25 technically it's all data that the computer knows how to do stuff with 21:31:33 "it's all ones and zeros" 21:31:35 i like 'sourceless programming' in concept 21:31:38 like colorforth and herkforth 21:31:55 as long as you can still document the code with something resembling comments 21:32:09 I think colorforth and herkforth have source 21:32:43 the code is there in a form intended for editing 21:32:45 not text files 21:32:51 yeah 21:33:05 no, not text files 21:33:45 there are a lot of languages where the source isn't ascii files 21:34:12 i believe some lisp machines stored code as lists in a memory image 21:34:23 you edited them directly 21:34:31 when I distinguisg between source code, binary, data, etc, I'm making a distiction of _use_ not technical structure 21:34:53 yeah, sometimes you can really blur the lines 21:34:59 I considered doing something like that for a bit 21:35:15 but decided to instead have source seperate from "executed" code 21:35:28 a lisp system still compiles those lists. 21:35:31 i guess its similar to your situation 21:35:39 where you have tokenied source 21:35:40 partly for speed, and partly you need two copies so you can edit the system it's self 21:35:42 that becomse machine code 21:36:12 (and partly I couldn't think of any good way to do control constructs like IF and FOR 21:36:24 my approach is troublesome in some cases 21:36:38 actually fiddling code blocks on the stack at runtime 21:38:10 /me loves WD-40 21:38:15 * t3h_ch1k3n loves WD-40 21:38:19 what is wd-40? 21:38:48 slava: its this stuff thats like a cleaner, rust protection, and lube at the same time 21:38:55 lol 21:38:56 slava: hard to explain. but it orks! :) 21:40:18 you can fix just about anything with duct tape and WD-40 21:40:33 yep :) 21:43:17 dammit 21:43:22 i cant figure out how to open this 21:44:02 its locked right in the middle 21:44:09 and i cant figure out how to unlock it 21:44:12 without reaking it 21:45:28 i dont assume you have any idea with this very specific detailed description I just gave? :P 21:45:45 t3h_ch1k3n, you need to apply the misato principle 21:45:58 * t3h_ch1k3n smacks slava? 21:46:01 excuse? 21:47:51 aargh you asshole 21:50:08 yes! 21:50:13 there was another hidden screw 21:50:19 on the link? 21:50:26 i saw some rather old rusty screws 21:50:28 NOOOO YOU ASH)OLE 21:50:29 ARGHFHGH 21:54:52 I once spent like 15 minutes trying to find out how to get a fax machine open 21:55:24 ooh, found some cool attractor parameters -- http://userpages.umbc.edu/~hefner1/attractor-1.jpeg 21:55:26 turns out that in the corner (this is all black BTW) of the dent where the ear end of the handset hangs up there's a little rubber circle. and under it a screw. 21:56:23 hefner: cool, what formula? 21:56:46 the one on the page you linked 21:56:54 hefner, looks like your listener is really nifty 21:57:06 I'm amazed plotting 200k points didn't make it catch fire 21:57:22 mcclim output recording was *not* designed for that :) 21:58:55 ok, enough work 21:59:03 hefner, did you actually type number[-2.3] or was it automatically added? 21:59:47 no, CLIM put the prompt with the type (number) and default value (-2.3) in there itself 22:00:22 hefner, aha 22:00:25 hefner, is the input line actually text? 22:00:28 hefner: I don't see a formula, only parameters 22:00:29 hefner, or just presented as such? 22:00:41 xn+1 = sin(a yn) - cos(b xn) 22:00:41 yn+1 = sin(c xn) - cos(d yn) 22:00:50 ahh. cool 22:01:07 I'm going to see if I can get that formula working in herkforth tonight 22:01:19 I gotta make sure I don't stay up too too late though. 22:01:57 ok, timer set for one hour 22:02:17 the race is on 22:02:27 slava: it's entered textually, the prompts are emitted into the editing stream via input-editor-format or somesuch, which in theory marks that extent of text as a "noise string" rather than user input 22:02:37 hefner, ok 22:02:57 hefner, how does the listener receive the input? is it a sexp, or just a string? 22:03:13 slava: have you read KMP's "ambitious evaluator" article? 22:03:18 no 22:04:24 he describes a technique he calls "lisp-machine style rubout handling", which was new to me, but the same idea is used behind CLIM input editing 22:07:15 basically there's a top level call to the function ACCEPT for a type 'command, ACCEPT knows how to parse this and starts reading, and once it gets a command name it starts caling ACCEPT recursively for the arguments with the appropriate types. So as you type characters, they will be fed directly into the parsers for the commands, which are blocked calling read-character or similar. 22:07:55 ok 22:08:02 At the end of all this I'll have a command object that's basically a sexp 22:10:24 anyway.. the cute bit is that this all usualy occurs inside an invocation of the input editor, which wraps the whole thing up inside CATCH. If you type an editing character such as backspace, it throws backs to that point, pushing the remaining text back onto the stream to be reread, so the functions doing the parsing can be totally oblivious of editing 22:10:43 heh 22:22:31 I had a cute hack going one night where if you were typing a lisp form and caused a reader error, the text following the error would turn red. (sadly I couldn't commit it due to some clim braindamage) 22:24:07 but then this is #forth.. ;) 22:24:38 now you just need a structure editor 22:24:57 indeed 22:25:06 and a graphical inspector 22:25:09 that would be neat ;) 22:25:17 and a graphical debugger 22:25:27 there's no way to update inspector windows when objects change though, is there 22:25:45 I've got incredibly lousy beginnings of the last two which I look forward to throwing out and reimplementing given the chance ;) 22:26:06 yeah, no way to really do that 22:26:31 unless the runtime has support -- but that might be unacceptable overhead. 22:27:21 I guess you could get in bed with the GC to monitor things via page protection hacks, but that would get pretty hairy 22:33:01 sin() works in herkforth! 22:34:23 --- join: Serg_penguin (~z@212.34.52.140) joined #forth 22:34:43 is this right?: : cos pi/2 + sin ; 22:35:55 oh, I didn't to the interpolating yet 22:36:01 just raw table values 22:36:47 that should be right 22:37:39 hmmm... I think I'll need to add interpolation before the attractors will work well 22:40:34 you might get some interesting effects from the quantization :) 22:49:03 I just hacked mine to quantize the sin/cos results to the nearest hundredth, it changes the shape of the output quite a bit but it's still interesting 22:52:54 argh 22:52:59 i cant find my second halfshaft 22:53:00 argghhghgg 22:53:56 aah, found it 22:54:02 * t3h_ch1k3n does differential test 22:54:35 * t3h_ch1k3n finds that it doesnt work. 22:54:39 * t3h_ch1k3n is frustrated 22:54:43 * t3h_ch1k3n kills family 23:00:31 --- join: AshyIsMe (~aaron@smm-158-145-219-137.tvlres.jcu.edu.au) joined #forth 23:00:43 --- part: AshyIsMe left #forth 23:03:47 I take it back it about the quantization 23:04:06 it still forms the same basic shapes, but too many points fall in the same places to fill out the image 23:05:02 --- quit: hefner ("another day,,") 23:11:29 ooops. well, that was a stupid bug 23:11:45 guess I'll save interpolating for tomorrow. 23:11:48 --- quit: Herkamire ("good night") 23:34:33 --- quit: Serg_penguin () 23:45:49 --- quit: swsch__ ("Leaving") 23:59:59 --- log: ended forth/04.09.28