00:00:00 --- log: started forth/04.01.20 00:00:15 is there a free implemention of J? 00:00:42 No. 00:00:42 As I've understood, no. 00:00:47 heh 00:00:48 Iverson is a money-grubber. 00:00:52 I played with A+ a bit 00:01:03 but essentially their site said "if you don't use xemacs you're on your own" 00:01:10 Yeah. 00:01:15 I don't like that. 00:01:18 and I didn't want to bother setting up X11 xemacs and the proper fonts and all that crap to try it 00:01:34 and then discover that some interaction with Apple's X server is preventing me from typing the special characters 00:01:36 * kc5tja would like to explore the possibility of writing my own APL-derivative, using plain ASCII, and which is open. 00:01:46 well, plain-ASCII sounds like J 00:01:53 perhaps one could just implement that 00:02:15 One could, but I don't like the idea of writing an LR parser for it. 00:02:22 I could use yacc, but, . . . 00:03:12 code a yacc in forth :) 00:03:18 actually i think that would be kinda neat 00:03:20 I440r: No. 00:03:23 I440r: See Gray. 00:04:31 kc5tja: Have you ever heard of PAN after MS Research? 00:04:38 No 00:05:08 That's a Haskell-based image processing p.l. 00:05:52 Something like a set of filters generating and changing image. 00:06:55 IIRC, I told here idea of it. It can be implemented in Forth rather easily. 00:07:09 --- quit: rO| ("construction..") 00:07:14 It's all just manipulation of matrices. 00:09:18 mhx' way is better, I think. 00:09:49 I've visited MHX's site several times, and I didn't see it. 00:09:57 If we speak Forth. 00:10:02 But it's entirely possible that his code is included within iForth, so I don't know. 00:12:51 I don't know if he sticked with his idea. He said his interactive math was experimental. 00:13:05 * kc5tja nods 00:13:22 * kc5tja was looking at how J stores vectors in memory, and it seems easy enough to replicate much of J's functionality in Forth. 00:13:53 And the biggest benefit of J and APL is not in its selection of primitives, but rather, in its implicit iteration. 00:14:00 If it's one thing I can't stand, it's setting up loops. 00:14:13 They are the biggest stack thrashers I can think of. 00:16:29 Il'ja Tarasov implemented mapping constructs recently. 00:17:02 See: news:fido7.su.forth for details. 00:18:25 He promised to include them in his PM-Forth, if he finds them useful enough. 00:24:42 http://www.nsl.com/ "no stinking loops" =) Somewhat K-oriented, though. 00:25:01 * kc5tja has been to Apter's page. :) 00:25:07 Lots of neat stuff on it. 00:25:12 But his code is still too dense for me to grok. 00:30:56 * ayrnieu feels a bit silly, ssh'd into someone else's machine, doing their gentoo installation for them. 00:49:13 Well, one thing is for sure: I just downloaded K, and it's 10x smaller than J. :) 00:49:52 It's annoying that K chose different operator names than J for the same types of things. 00:50:46 Dobryjj...morning, ASau. And hi to the rest of you. 00:51:09 Dobryjj den', Robert! 00:51:48 Now I have to leave for school, see you :) 00:51:55 kc5 - yes, your discussion had me downloading K about an hour ago =) 00:53:05 * kc5tja is interested to see if K is any faster than J in my little performance test. :) 01:14:48 * warpzero is back (gone 08:23:27) 01:15:04 Hey kc5tja ;) 01:20:18 re 01:23:42 Hmm...pity. K isn't any faster than J in the performance test. 01:24:47 Well, hold on a second. 01:25:05 K isn't any faster than unoptimized C, let's put it that way. It is therefore slightly faster than J. 01:27:42 re-running the test. 01:27:59 My C code had a performance of 3 minutes when optimized for my Athlon, and 18m without. 01:28:03 J ran at 25m. 01:28:24 Wgat tge gekll? 01:28:25 Er 01:28:28 What the hell? 01:28:31 What I did with the K code was interrupt it after 3 minutes, and divided the iteration counter by 4096 to get the scaling factor. 01:28:37 What is K code? 01:28:46 J and K are programming languages. 01:29:00 What do they do? 01:29:23 THey are languages derived from APL. 01:29:30 Isn't J that one like APL but... 01:29:32 oh. 01:29:42 I'm running performance comparisons. 01:29:54 Comparisons to C? 01:29:55 (For a project I might get hired to do for a potential client) 01:30:00 Are you running forth tests? 01:30:02 Yes. 01:30:16 Yes. gforth only, though, because that's all I ahve available. 01:30:21 Forth gets **SLAMMED** though. 01:30:32 ocaml is the only other language that is in the ballpark of C. 01:30:59 C ran in 3 minutes. 01:31:05 (optimized for Athlon) 01:31:13 C (unoptimized) ran in 18 minutes. 01:31:18 J ran in 25 minutes. 01:31:22 gforth ran in 47 minutes. 01:31:24 HOw do I love you C, let me count the ways. 01:32:08 What did ocaml run in? 01:32:19 Well, I forgot who posted the comparisons, but on their computer, the C code ran in 1:15, and the ocaml code ran in 1:57 -- easily within acceptable limits. 01:33:03 So whats the project? 01:33:11 I can't discuss the project in public. 01:33:16 And did you try anything like Python? 01:33:37 Python has that compiled mode. 01:33:40 No; Python is so slow as to not even be worth testing. 01:33:50 Oh. 01:34:01 That would go for all interpreted languages? 01:34:11 Python compiles to a byte-code, but its byte-code interpreter is horrifyingly slow. 01:34:16 J qualifies as an 'interpreted language' -- moreso than Python, even. 01:34:19 warpzero: No. 01:34:41 What about perl? How fast is it? 01:34:47 Realistically speaking, only the C code was used for my project estimates. 01:35:07 I'm just comparing J, K, GForth, C, etc. for my own edification. 01:35:26 Perl is 'fast' for string manipulation, but I'm doing number crunching. 01:35:53 I don't even know how to create an array of 4096 integers in Perl. That's how long it's been since I coded in Perl. 01:35:53 So why is GForth so slow? 01:36:07 my @array; 01:36:16 eh, no. 01:36:35 warpzero: Because it uses direct threading on a processor architecture where such threading is known to be much slower than subroutine threading. 01:37:04 my @array; $array[4096] = 0; $array[$_]++ for (0..4096) 01:37:17 kc5tja: Huh?> 01:37:20 or something like that, I don't quite understand the test at hand. 01:38:08 warpzero: Read "Moving Forth" on the web. That will discuss the differences between direct threading, indirect threading, token threading, and subroutine threading. 01:38:45 OK, I'm impressed. 01:38:50 K completed the whole test in 9 minutes. 01:38:56 It blew J clear out of the water. 01:39:01 Wham bam! 01:39:07 Thats only 3x as slow as C!\ 01:39:34 For a non-tokenized, non-compiled interpreted language, I'd say that is damn sweet. 01:39:48 Holy! 01:40:05 a:4096#0 01:40:18 An intrepeted language with an approx 3 instruction overhead! 01:40:19 do[16777216;."a:a+1"] 01:40:29 er two 01:40:39 Not quite. 01:40:52 The expression "a:a+1" has to be interpreted by the text interpreter. 01:40:57 Then a+1 must be evaluated. 01:41:22 But the + primitive is extremely efficiently implemented, so the losses of the text interpreter are slightly absorbed. 01:41:36 Well thats cool. 01:42:10 And from examining the output of top, K, like J, is smart enough to realize when a vector is being overwritten, and avoids garbage collector overhead. 01:44:37 I wonder how fast FS/Forth would do it if it were complete? 01:44:45 * kc5tja starts hacking on the FS/Forth cross compiler... 01:44:55 I don't expect it to be all that fast. 01:45:06 I wonder how AF's bytecode would do? 01:45:48 Which brings up the question, how do you write a fast bytecode interpereter? 01:47:50 You typically don't. 01:48:09 Direct threading is usually the fastest form of interpretation that can still be called interpretation. 01:48:30 Next up from that is subroutine threading, but that's closer to compilation, since that emits real machine language code instead of an abstraction of a program. 01:49:02 Okay... the end goal is subroutine threading then (i think). 01:49:20 But I need a pure interpreted mode for reference first. 01:59:01 Wait so... 01:59:17 The only one that looks programmable in C is Token. 01:59:45 In ANSI Portable C, yes. 02:00:00 gforth uses GCC-specific extensions to enable it to create a direct threaded system. 02:00:09 But it's still not as fast as a subroutine-threaded system. 02:00:21 It's a good 10 times slower than machine-optimized C code. 02:00:40 But subroutine-threaded requires almost direct compilation. 02:00:51 Wait thats almost writable in C... 02:00:53 Yep. 02:01:02 If you can figure out how long a function is... 02:01:45 How would you do that in C? 02:02:00 Make that call instruction so you could put them together? 02:02:01 Well, a subroutine call is five bytes long. 02:02:11 You need to know the address of the subroutine/primitive you're calling. 02:02:14 On every architecture? 02:02:20 warp - eh, of course not. 02:02:20 Thats easy to find out. 02:02:21 No, not on every architecture. 02:02:25 On x86. 02:02:31 On PowerPC, a subroutine call is 4 bytes. 02:02:34 On 68K, it's 6. 02:02:44 You have to compile actual machine-language instructions. 02:02:54 How to do this will differ depending on target architecture. 02:02:57 There should be some way to do this. 02:03:28 Get cc to make a subroutine call, and tell you how long it is and where you need to stick the address. 02:04:15 Same thing for a return... 02:04:28 And then just malloc() and make them... 02:05:23 warp - you'd do better to forget about C and bootstrap your forth with some other forth. 02:06:15 ayrnieu: Comedy I'm not writing a version of forth dude. 02:06:33 warpzero - I have no idea what you just tried to say, sorry. 02:06:50 ayrnieu: I'm not writing a version of forth. 02:08:27 I'll probably just end up writing a token threaded one, because thats easy to do in portable ANSI C. 02:13:49 Hm. It's that easy to do in non-portable assembly. 02:14:39 It's even easier, I should say. 02:14:58 Well part of the point is to be portable here man. 02:15:58 You can recode primitives. 02:16:21 Threaded code is not changed while porting. 02:16:41 Latter if you wrote it right, of course. 02:17:53 If you write VM, there is no matter what language or compiler you do utilize. 02:20:38 BTW, have you seen postForth? 02:22:06 It's a good example of how small and simple Forth kernel can be. 02:22:57 Well, I got the FS/Forth cross compiler to generate code; unfortunately, my implementation of +! crashes Linux for reasons that I cannot yet explain. 02:23:08 I believe that it's getting incorrect address information. :( 02:23:14 What does +! do? 02:23:38 It increments the contents of a memory address by a constant. 02:23:41 E.g., 1 myVariable +! 02:24:11 Ah. 02:24:33 So does it just crash the compiler? or the program? or all of linux? 02:24:40 Only the program. 02:24:49 Hmm. 02:24:53 The compiler couldn't care less. As far as it's concerned, it's just streaming bytes to memory. 02:25:18 Segm. violation? 02:25:22 Yep. 02:25:35 Fun times. 02:25:35 I wish there was a usable machine language monitor for Linux too. 02:25:46 I need to know what is in the EBX and EAX CPU registers. 02:25:54 Gdb? 02:26:01 Ha! 02:26:04 Bochs? 02:26:04 Gdb won't single-step, nor will it breakpoint. 02:26:30 Bochs won't work, because I have to install Linux on a virtual harddrive just to debug this application. not my idea of "fun." 02:26:46 There are other, easier to implement solutions. 02:26:55 Then implement one? 02:26:56 * kc5tja will have to code a register dump code fragment tomorrow. 02:26:57 I've seen a project of Linux _asm_ debugger. 02:27:11 ASau: It's currently in a useless state as far as I can tell. 02:27:35 I've written such a thing. Use octals. 02:27:37 kc5tja: Port your code to kernelspace, that way when it crashes it will tell you. 02:27:44 warpzero: Again, there are easier solutions to debugging this problem. 02:27:50 I'm not being serious. 02:28:45 kc5tja: I had to remember ZX times of writing an embedded monitor. 02:29:17 I'm going to write code that dumps the contents of a CPU register. 02:29:23 That's all I need. 02:29:30 I don't need a full-blown debugger. 02:29:54 Writing a debugger is *NOT* that easy, especially under Linux, where you must interact with the ptrace() system call. I'd much rather deal with protected mode stuff directly than use ptrace(). 02:30:39 Yes. That's a usual thing. These was popular in time of Sinclair's Spectrums. 02:35:36 --- quit: imaginator ("sleep") 02:49:10 OK, the words to print the hex numbers are choking too. 02:49:54 The IF clause that determines whether or not to add 7 to the ASCII code (to support A..F) *ALWAYS* runs, whether or not the test is true or not. 02:49:55 >:( 02:54:01 Why not octal? 02:54:40 Because I can't read octal. 02:54:52 And none of my other software tools use octal. 02:54:57 When I do a disassembly, I get hex. 02:54:59 I want hex. 02:57:05 and octal digits correspond to three bits -- totally inappropriate for concise representation of 32/16/8 -bit numbers. 02:57:43 Well, for some reason, the EFLAGS register always is having its sign bit set. 02:57:47 Possibly you never disassembled reading dump. 02:57:51 And I just can't find the instruction that's setting that frigging flag. 02:58:14 asau - I don't understand "disassembled reading dump", sorry. 02:58:20 ASau: I use a set of pre-existing disassembly tools to help my debugging efforts. They all use hexadecima.. 02:58:26 hexadecimal even. 02:59:21 Sometimes I have no such tool. 02:59:45 Or I can't reach it. 03:00:46 I always have such a tool available. 03:00:50 It comes standard with every Linux distribution. 03:01:11 I'm not on Linux frequently. 03:01:37 BTW, ``od'' is octal. 03:01:52 objdump --disassemble is hex. 03:11:08 OK, found and fixed the flag bug. 03:18:16 Goign to bed. 03:18:26 This bug is too hard to track down for my current condition. 03:18:34 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT ar sk") 03:20:14 --- quit: ASau () 05:01:39 --- join: ASau (~asau@158.250.48.196) joined #forth 05:01:48 I'm back. 05:02:01 Dobry den! 05:03:25 * warpzero hops areound 06:10:45 --- quit: I440r ("Leaving") 06:47:37 --- join: downix (~downix@adsl-219-23-176.mia.bellsouth.net) joined #forth 06:47:40 morning 06:47:44 --- join: hovil (~hovil@CommSecureAustPtyLtd.sb1.optus.net.au) joined #forth 06:48:23 --- join: schihei (~schihei@pD9548C1E.dip.t-dialin.net) joined #forth 06:48:56 --- quit: madgarden ("*frotz*") 07:32:12 --- join: MysticOne (mysticone@mysticone.usercloak.freenode) joined #forth 07:32:23 question ... anyone done any XML parsing in forth? 07:33:34 Nope. 07:33:59 I think a Forther would use Forth instead of XML :) 07:34:21 was curious ... 07:34:34 my co-worker is working on a little commandline configuration program for some equipment we have 07:34:45 right now it's in perl with an XML data file ... but it's *dog* slow 07:35:41 Hehe. 07:39:24 i use gulp... java for that 07:39:30 Use YAML. 07:39:32 i saw xml in forth once 07:39:54 It's more simple. 07:41:53 Java is more slow than perl :) 07:41:56 and it's not going on this machine 07:41:59 133MHz 07:44:04 MysticOne ouch =] 07:44:17 java can be as fast as perl, but not on that machine 07:44:19 hehehe 07:48:01 hehehe 07:48:38 we're having to do a good bit of text processing 07:48:42 which is why XML was fairly good at that 08:09:52 use VB ! 08:09:57 :) 08:10:47 Right... 08:11:22 robert - whers my web page :) 08:12:38 Er... over there! 08:12:41 * Robert runs away 08:22:07 ooooooh... 08:22:12 I just saw what mmanning said 08:22:14 * MysticOne kills mmanning 08:22:17 had to do it 08:23:23 it was in the best interests of humanity 08:26:41 yes, precisely 08:45:51 How do I get forth to float points? 08:46:28 You write words to do it. :D 08:46:51 Depends on the Forth and the system I guess, I think mmanning talked about just implementing FPU instructions in the Forth assembler. 08:47:03 No really I have two integers here how do I divide them for a floating result? 08:47:05 gforth 08:47:09 While others implement a floating point stack and Forth words to do calculations with it. 08:47:13 Oh. 08:47:21 But it already has floating point support. 08:47:46 I'm not quite sure, I think you'll have to convert it to a double sized integer, then to a floating point. 08:47:52 Then use f/ (floating point division). 08:48:15 oh 08:48:18 Haven't really used gforth, so I'd recommend reading the manual, or guessing. :) 08:48:24 s>d d>f or something. 08:53:08 thats working except . doesn't pop off the floating point stack 08:53:18 lol 08:54:15 It's f. or .f 08:54:23 I think "f." 08:55:22 thanks 08:55:26 * warpzero hugs Robert 08:56:27 :) 08:57:19 So whats the s and d thing do? 09:00:27 s>d <-- single size to double sized integer 09:00:38 d>f <-- double sized integer to floating point number 09:01:47 How big are the single and double sized integer? 09:02:39 Er.. in gforth I think they're one and two stack items 09:02:45 That is, 32 and 64 bits. 09:02:48 But I'm not sure. 09:03:27 man gforth says almost nothing about anything 09:03:56 www.google.com 09:03:59 :) 09:04:09 Check either the ANS document or the gforth manual 09:05:16 lol 09:05:32 isforth says almot nothing about EVERYTHING lol 09:05:42 hmmm.... must correct that some day.... 09:05:50 That's what the src/ dir is for :P 09:06:03 ya :) 09:06:13 Is it wrong to use gforth as a better dc? 09:06:22 better dc ? 09:06:29 yeah 09:06:30 As in the calculator? 09:06:33 yeah 09:06:50 I use calc most of the time, since isforth doesn't do floats. 09:07:07 And it doesn't support scrolling back in the command history either ;) 09:07:19 --- quit: downix ("Leaving") 09:07:19 But I like the Forth way of doing calculations 09:07:22 Feels more natural. 09:08:04 yet! 09:08:36 yet! 09:08:55 mmanning: Hehe.. yeah right ;) 09:10:14 * mmanning thwaps Robert with the isforth manual 09:10:42 That didn't hurt. I wonder why! 09:11:11 What is isforth? 09:11:25 His forth. 09:11:29 http://isforth.clss.net 09:11:47 If you're on Linux you might want to try it. 09:12:00 Unless you need features such as floating point numbers. ;) 09:12:39 isforth is my forth compiler - a work in progress 09:12:53 Is everyone in this place writing forth compilers? 09:13:07 lol i started this channel when i started isforth hehe 09:13:14 I think so, warpzero 09:13:19 ALL forth coders write forth compilers - its tradition 09:13:21 At least most of us. 09:13:27 Well then. 09:13:32 I'd better leave. 09:13:35 warpzero: No. 09:13:38 lol 09:13:41 warpzero: Write a Forth instead! :D 09:13:49 I'm too busy writing ARGONFLAME. 09:13:59 Which is..? 09:14:20 A project where you try to put fire to a noble gas? 09:14:23 Yes. 09:14:28 Neat. 09:14:33 Watch out for the explosion! 09:14:41 http://wza.us/af/ 09:15:19 argon is inert 09:15:22 :P 09:15:33 warpzero: So, what will the language be like? 09:15:43 warpzero: Forth, obviously, but what variant of Forth? 09:15:47 ;) 09:15:52 Robert: I could describe it to you, if you have about 2 hours. 09:16:04 Er.. 09:16:12 Can't you take the 3-line version? 09:16:19 Or is it THAT unique? 09:16:24 its THAT unique 09:16:42 I see. 09:16:47 Then nevermind. :) 09:17:49 Its generic infinitely defined event-centric super-concurrent language. If that helps. 09:18:06 Ah. So, like BASIC? 09:18:23 Uh... 09:18:24 No. 09:18:30 Just teasing you. :) 09:19:06 --- join: kc5tja (~kc5tja@66-91-231-74.san.rr.com) joined #forth 09:19:06 --- mode: ChanServ set +o kc5tja 09:19:24 Hi 09:19:31 Sup kc5tja? 09:19:53 Still battling a stack corruption bug in FS/Forth. 09:19:59 Robert: Also its technically impossible for the language to run on a computer. 09:20:35 --- part: MysticOne left #forth 09:20:55 warpzero: What will it run on, then? 09:21:09 Robert: Computers... :( 09:21:37 Sounds great. Is that the language they programmed HAL9000 in? :) 09:21:53 Yes. 09:22:06 That might explain some things... 09:22:20 What will you use it for anyway? 09:22:20 Not really. 09:22:40 Everything but kernel/driver stuff. 09:22:59 Applications and daemons. 09:23:28 --- quit: mmanning (Read error: 104 (Connection reset by peer)) 09:23:38 --- join: mmanning (~mmanning@saturn.vcsd.com) joined #forth 09:23:51 kc5tja: mmanning here says you stole his channel! 09:26:35 --- join: rO| (rO_@pD9EE1EBC.dip.t-dialin.net) joined #forth 09:26:51 Hallo 09:27:39 howdy 09:29:12 Robert: so, what's your ham sign now? ;-) 09:29:38 I got my certificate - but the authorities are slow! No callsign yet 09:30:23 mmanning: are you == to i440r? 09:30:28 Yes. 09:30:56 For some reason he's using his own name now, instead of the name of his guitar. ;) 09:31:47 mmanning: I request to be added to the site. 09:32:10 --- quit: mmanning (Read error: 60 (Operation timed out)) 09:32:15 Or not. 09:32:46 --- join: mmanning (~mmanning@saturn.vcsd.com) joined #forth 09:33:08 * rO| is curious 09:33:15 sometimes 09:33:20 mmanning: Are you okay? 09:33:28 warpzero: which site? 09:33:41 http://www.freewebs.com/forth/forth.html 09:36:45 --- quit: mmanning (Client Quit) 10:10:04 what are the C threading functions called? 10:10:49 I've only use pthreads. 10:11:00 yeah 10:11:03 what are the functions 10:11:07 how do i looked up manpage 10:12:00 Hmm... good question. Do you have the development package installed? 10:12:16 I'm running gentoo you twit. 10:13:14 I know ;) 10:13:22 But I must be preaching Debian, or I'll go to hell 10:13:31 why 10:13:46 Just kidding.. anyway, there must be some online docs or manual. 10:13:56 And man pages too 10:13:58 i just need to know what the function is called 10:14:01 so i can man it 10:14:10 Well, I've forgot. Sorry 10:14:33 Check /usr/include/pthread.h 10:14:44 pthread_create is one of the functions 10:14:52 thanks 10:21:51 Robert: so when you create a new thread... 10:22:01 Robert: it calls a function of your choosing 10:22:24 Robert: variables and things are shared? 10:22:36 Yes 10:22:44 Except of course those on the stack. 10:23:20 but like malloc()ed stuff fo sho is? 10:23:30 Yeah. 10:23:38 Whats on the stack? 10:24:07 Local variables and return pointers. 10:24:12 Sorry, I'm just trying to grok using threads to create non-blocking io. 10:24:22 No problem. :) 10:25:51 So, variables inside a C function aren't shared cuz they're on the stack? 10:26:20 Correct. 10:26:37 So if you need a thread-specific variable, that's where to put them. 10:26:42 And that means you can have multiple threads with the same functions running not interfering with each-other? 10:26:48 And if you need to use them in several functions, just use pointers. 10:26:54 Correct. 10:27:14 And how do you implement locking? 10:27:35 Does a simple lock variable suffice or? 10:27:56 Well, that's what I'd use, and try to forget about deadlocks and all that shit. ;) 10:28:11 But honestly, I don't know of any other way to do it, even though there must be one. 10:28:27 I mean, say you wanted to implement a queue that all your threads are going to be reading and writing to... 10:28:34 pthreads has mutex support. Use those if you can. 10:28:45 kc5tja: Please continue. 10:28:50 Well, that's about it. 10:29:00 man pthreads_mutex_create (or something; I forget which) 10:29:01 kc5tja: I don't know what a mutex is? 10:29:08 Mutual exclusion object. 10:29:13 It's basically a semaphore. 10:29:32 A semaphore? 10:29:51 It's used to protect shared resources so only one thread can access it at a time. 10:41:37 So, the kernel garuntees that mutexes are SMP safe and such? 10:41:48 Yes. 10:43:02 * kc5tja is now testing FS/Forth's performance against that of GForth's performance, for that stupid little benchmark I wrote yesterday. 10:43:19 Now that I fixed something like 5 bugs in the code generator and in the syscall word. >:( 10:45:38 --- quit: schihei (Client Quit) 10:46:02 kc5tja: Be sure to tell us how it goes. 10:55:50 Now I'm looking up all the shm stuff. 10:59:20 OK, launching the test. 10:59:34 During a debugging run, it appears to be close to K in speed (!!!), but we'll see when the test has completed in full. 11:00:13 What's cool is that FS/Forth has, oh, 28KB of resources that it's consuming, versus 1.5MB for both J and K, and C was slightly larger at around 2.x MB (linking in libc, I suppose) 11:00:22 Well its native code, and K is interpreted... 11:00:27 What sucks is that FS/Forth doesn't respect file redirections. :( 11:00:31 I found that out the hardway. 11:00:46 Apparently, writing to stdout directly via the Linux console, literally, writes to *console*, without questions. 11:00:47 What do you mean by file redirections? 11:00:49 Even if >/dev/null. 11:00:56 Oh. 11:00:58 Uh oh! 11:01:11 As far as I'm concerned, this is clearly a major bug in Bash or in Linux itself. 11:01:15 strace a glibc program... 11:01:31 It'd take me years to parse through the output. 11:01:57 Well then look at glibc's source. 11:01:57 Actually, I think it's a bug in bash, not in Linux, because I'm using Bash's built-in "time" command. 11:02:32 Nothing else behaves that way? 11:02:46 warpzero: I haven't ever tried using file redirections when using time. 11:03:03 kc5tja: oh. 11:09:02 Well thats cool. 11:09:13 Signals mame threaded applications. 11:13:31 Well, FS/Forth isn't as fast as K. 11:13:33 Pity. 11:13:38 It sure looked like it at the start. :) 11:13:49 Its your thing, you can make it faster. 11:13:54 I guess slight timing differences accumulate when you're manipulating 2^50 bytes of data. :D 11:14:16 warpzero: Not without resorting to hand-coded assembly language, custom tweaked explicitly for the AMD Athlon Slot-A processor. 11:14:30 kc5tja: Really? 11:14:45 kc5tja: How is K going that fast then, an interpered language? 11:14:51 Yep. My compiler is intended to be dreadfully simple. 11:15:02 warpzero: Because it's primitives are coded in highly optimized code. 11:15:22 Remember that K and J are both array processing languages (e.g., APL dialects). 11:15:49 A single primitive "+" can easily add 2GB worth of data very quickly if so desired, because + itself is coded well. 11:16:06 Hmm. 11:16:25 Okay, that makes sense. 11:16:59 Would it be possible to make an FS/Forth mode where it jacked into gcc's optimization stuff? 11:17:07 This is also why J/K/APL programs are so terse too: they lack looping constructs in most cases, since these languages implicitly iterate over whole vectors of data. 11:17:22 It wouldn't be FS/Forth anymore. 11:17:29 But compiling Forth to C has been done before in the past. 11:17:39 I have a better idea in mind though. 11:17:47 Whats that? 11:18:00 A future version of FS/Forth will include a true data-flow optimizer, which performs both data flow and static type inferencing where possible. 11:18:26 This performs global optimizations, rather than function-local optimizations like C. And, therefore, ought to produce code that rivals, if not exceeds, C's output. 11:19:14 I'm hoping that my stuff 11:19:15 But, realistically speaking, if I can get a nice, clean, easy to grok vector system going for FS/Forth, I can delay the need for such a beast for quite some time, indeed. 11:19:24 's scalability will overcome its slowness :( 11:19:52 kc5tja: How are you generating code? 11:19:55 I prefer slow and correct over fast and buggy. 11:19:59 Feeding it to gas, or? 11:20:08 warpzero: I compile the bytes directly into RAM. 11:20:30 Did you then program in the actual machine code? 11:20:35 For example, if an address is on the stack already (appropriately adjusted for x86's PC-relative addressing), I can compile a call like this: $e8 c, , 11:21:01 Huh? 11:21:10 You know what c, and , do right? 11:21:14 No. 11:21:21 Hmm 11:21:28 These two words basically are Forth's compiler. 11:21:32 THey lay down bytes in memory. 11:21:46 The location where c, and , place these bytes is called HERE. 11:22:05 Hmm... I think you misunderstand my question? 11:22:08 --- join: Nutssh (~Foo@dunwlessnat.rice.edu) joined #forth 11:22:17 So you can do things like this: HERE 0 , HERE SWAP - . ( will print 2 for 16-bit Forths, 4 for 32-bit Forths, etc.) 11:22:53 HERE 0 , HERE SWAP - . 4 ok 11:22:59 So $e8 c, lays down the opcode byte for CALL, and the subsequent , lays down the effect address field for it. 11:23:14 Ah! 11:23:25 So you hardcoded in opcodes then? 11:23:28 Yes. 11:23:34 How hard was that? 11:23:38 Sorry, I think I got too detailed too quickly. :) 11:23:43 warpzero: Doing it is fairly easy. 11:23:46 Debugging it is hard. :) 11:24:06 This is why I use disassemblers to verify the generated code. 11:24:36 Oh, and my bug I was wrestling with -- I was right, my code *WAS* perfect. The problem was in the definition of the syscall primitive -- I didn't fix up the stack properly. I was off by four bytes. :( 11:24:42 I will need to do that for stage 5 of project argonflame 11:25:35 Damn, all I can say is, FS/Forth will be MUCH easier to get running for native hardware than it is for Linux. 11:25:48 The hard part will be in setting up protected mode. 11:25:56 From that point on, everything else will be trivially easy. 11:26:03 Somehow dynamically create little fragments of code that take care of themselves. 11:26:19 * kc5tja nods 11:26:35 Will anything explode if I ignore the stack? 11:26:51 If you overflow or underflow the stack, yes. 11:27:08 This is to be expected with any language that exposes such details to the programmer though. 11:27:10 I think. 11:27:11 Well I mean not use the stack for function-like things. 11:27:19 Oh, no. 11:27:33 You can address the stack like an array if you really wanted to. 11:27:46 I don't do it, nor do I provide primitives to do it, but it CAN be done if you code up your own primitives. 11:27:47 :) 11:28:05 Because argonflame doesn't use a stack, it uses a queue instead. 11:28:16 Ahh 11:28:35 Using a stack would be impossible I think. 11:29:33 Well, I have to get going. I need some food. 11:29:39 Okay ttyl. 11:29:45 And I have the urge for Coacoa Pebbles. :) 11:29:52 Get the uh 11:29:57 Time to dope myself up silly with SUGAR!! 11:30:00 * kc5tja is away: store 11:30:01 Get the uh Malt-O-Meal kind. 11:30:05 Its good. 11:30:37 Hey, number crashers! 11:30:38 Yeah, I usually buy the no-name brands if I can. But they don't taste exactly the same. 11:30:44 Anyway, I'm afk. 11:30:56 What do you think on ZEN float point? 11:31:38 It's very easy to port. 11:33:33 When you need a calculator, it suffice. I need fast calculator, that's why I program FPU. 11:34:00 ASau: what? 11:44:52 Martin Tracy's zen float point package. 11:55:41 --- quit: ayrnieu (Remote closed the connection) 12:19:11 --- join: wossname (wossname@HSE-QuebecCity-ppp82274.qc.sympatico.ca) joined #forth 12:20:02 --- quit: Nutssh ("Client exiting") 12:22:40 * kc5tja is back (gone 00:52:40) 12:22:49 OK, FS/Forth is *right out* when it comes to vector processing. :D 12:23:00 It's still going, after an hour. 12:23:00 :D 12:25:11 have you already ran the test against gforth? 12:26:31 Yes. 12:26:35 gforth took 47 minutes. 12:26:47 I'm not sure if the problem is my code, or not. 12:26:53 * kc5tja should have left the diagnostic print statements in. 12:27:14 But the resource consumption is pretty much all right though; it's fixed at 28KB. :) 12:27:44 So while FS/Forth might produce adequate code for most tasks, it's definitely not a vector processing language. :D 12:27:59 * kc5tja will definitely have to work on FS/Forth's code generation some more. 12:28:04 First I need a working copy of FS/Forth though. 12:28:09 And it needs to compile itself. 12:28:16 That's my most important goal for FS/Forth right now. 12:42:04 * warpzero is back 12:42:06 sup 12:42:38 * Robert tries to re-learn how the PIC works. 12:42:50 PIC as in Microchip's chips. 12:42:51 Programmable Interrupt Controller? 12:42:56 Oh. 12:45:49 Robert: Okay I'm about to do some major work on argonflame so if you want to find out about it, now is the time. 12:46:32 Hmm... 12:46:45 You said it would take three hours to explain what it IS. 12:47:03 So I think I'll pass :) 12:48:01 I might have been exagerating. 12:48:19 The specification is currently a page and a half. 12:48:21 Hehe, I thought so, but I still have the feeling your ideas are a bit complex. 12:48:29 Oh. Is it published somewhere? 12:48:52 Well its availible for download. 12:49:25 Great, where? 12:50:34 https://wza.us/svn/ARGONFLAME/spec/lang/english-language-specification.html but you're going to have to save-as and reopen it cuz subversion sends the wrong mime type 12:51:09 OK 12:52:04 There we go... 12:53:00 i is instantiation level. 12:53:01 v is volatility level. 12:53:07 So, what does that mean? 12:53:08 Yeah. 12:53:12 Jush hold up a sec. 12:53:21 first join #argonflame so we dont spam this channel 12:54:20 Okay. 13:01:44 --- join: dubious (~marc@209.71.234.197) joined #forth 13:05:28 --- join: mmanning (~mmanning@saturn.vcsd.com) joined #forth 13:27:11 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 13:27:52 --- quit: hovil ("Leaving") 14:23:13 --- join: Nutssh (~Foo@dunwlessnat.rice.edu) joined #forth 14:26:22 what is ` called? 14:32:32 No idea.. 14:32:41 But I don't like it. :) 14:33:07 On Swedish keyboards, it is shift+' and then space, which takes forever to type. 14:36:44 " 14:36:47 what 14:37:35 Okay I wont use it for my language then. 14:37:41 Maybe someone in here can help me out. 14:37:56 We will just put this in semi-C terms. 14:38:04 I have a . operator, and a * operator. 14:38:24 But no order of operations or parentheses for grouping. 14:38:45 How do I make them do what they need to still? 14:40:18 --- quit: qFox ("if at first you dont succeed, quit again") 14:42:24 back tick ? 14:42:31 oh right 14:42:42 mmanning: I request to be added to hte website. 14:43:03 aha thats futhin - but yea - your regular in here now so... :) 14:43:12 futhin when you read the logs add warp to the web site "{ 14:43:14 :P even 14:43:27 oh wait man im getting youguys all confused 14:43:27 futhin STOLE this channel from me :) 14:43:36 and gave it to kc5tja? 14:43:36 <-- I440r at work 14:43:45 Yeah i know that. 14:43:49 is kc5 the channel owner now ? 14:43:51 mmanning: Hey, I stole back another channel recently ;) 14:43:57 heh 14:44:08 no but hes the op now isn't he 14:44:22 its like uncool too cuz soon as he stole it the place got more regulars :P 14:44:26 bastard heh 14:44:46 Man I do not know what to about this. 14:44:48 I am in a dillema. 14:44:49 oh - yea well if futhin gives up the channel i would put kc5 as next in line before me 14:45:56 what dillema ? 14:46:05 Uh. 14:46:12 I have a language right. 14:46:22 And it has a * and a . operator. 14:46:32 ok 14:46:36 (dereference and member-of) just like C 14:46:59 but I don't have an order of operations or parentheses 14:47:24 ok - so ? 14:47:24 So how do i get it to express properly still? 14:47:25 heh 14:47:38 by making it reverse polish 14:47:53 or just make it ALWAYS do them in the order specified 14:48:01 or prefix... 14:48:04 i.e. the coder decides the order 14:48:17 which is what RPN is 14:48:38 i really like infix for . tho 14:49:32 I mean you're talking about a member... it just makes sense... 14:50:00 infix never makes sense heheh 14:50:28 In this case it does! I mean struct.member it just seems so right. 14:50:55 well sure 14:51:37 struct can return the address of the structure. .member can adjust that address to the specified member 14:51:48 so its just doing everything in the order specified 14:51:59 Well... 14:52:29 *(struct).*(member) needs to be expressable along with *(struct.member) 14:54:40 --- quit: rO| (Read error: 110 (Connection timed out)) 15:17:38 --- quit: wossname ("dgz") 15:39:33 --- join: blockhead (default@dialin-321-tnt.nyc.bestweb.net) joined #forth 15:43:12 --- join: aktnot_ (ident@233.80-202-65.nextgentel.com) joined #forth 15:43:17 --- quit: aktnot_ (Client Quit) 15:45:56 --- join: madgarden (~madgarden@Kitchener-HSE-ppp3576567.sympatico.ca) joined #forth 15:46:15 --- quit: Nutssh ("Client exiting") 15:47:44 --- quit: scope ("leaving") 16:30:16 --- part: blockhead left #forth 16:32:59 --- join: I440r (~mark4@12-160.lctv-a5.cablelynx.com) joined #forth 16:36:47 --- join: matt__ (1000@adsl-64-160-165-178.dsl.snfc21.pacbell.net) joined #forth 16:36:58 --- nick: matt__ -> Sonarman 16:44:32 --- join: Nutssh (~Foo@gh-1177.gh.rice.edu) joined #forth 17:16:46 Any thoughts on bytecode guys> 17:16:49 Bitpacked? 17:16:54 Not? 17:21:35 Am I alone here in this channel? 17:24:02 --- join: scope (~junk@njd.paradise.net.nz) joined #forth 17:24:08 --- join: thin (thin@bespin.org) joined #forth 17:26:46 warpzero: I think bytecode is under-rated and optimization techniques are not well understood for them. 17:27:02 * kc5tja admits that my own bytecode interpreters would no doubt be slow in comparison to one made by a master. 17:27:12 kc5tja: pm 17:27:14 Well I need some form of it. 17:27:52 I say start simple, but slow, and get correct results. 17:27:55 Wether its little more than a robust binary version of the language or a fully optimized virtual cpu type thing it doesn't matter. 17:27:59 Work on optimization later, and on an as-needed basis. 17:28:21 Yeah thats the plan. 17:36:39 --- quit: dubious ("Leaving") 17:58:36 kc5tja: I'm thinking about bit-packed code that can be byte-aligned optionally. 17:58:47 --- quit: Sonarman ("Lost terminal") 18:00:57 --- join: Sonarman (1000@adsl-64-160-165-178.dsl.snfc21.pacbell.net) joined #forth 18:45:05 warpzero: Why bother with bit-packed bytecode? Seems like it would be a performance hit to decode for a small code size reduction. 18:46:17 --- quit: thin (Remote closed the connection) 19:16:35 And forth is already dense. 19:43:10 --- quit: chandler (Remote closed the connection) 19:43:12 --- join: chandler (~chandler@d-84-77.dhcp-149-159.indiana.edu) joined #forth 19:48:14 --- quit: slava ("Leaving") 21:35:46 --- quit: fridge (Remote closed the connection) 22:05:30 --- quit: Nutssh ("Client exiting") 22:13:33 --- join: Serg (Serg_Pengu@212.34.52.140) joined #forth 22:36:10 --- join: ayrnieu (~julian@206.61.132.55) joined #forth 22:47:09 --- quit: Sonarman ("night") 22:52:56 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 23:03:01 --- quit: ASau () 23:28:57 --- join: crc (~crc@1Cust31.tnt8.phl6.da.uu.net) joined #forth 23:34:09 --- quit: crc ("ChatZilla 0.9.54f [Mozilla rv:1.5/20031007]") 23:59:59 --- log: ended forth/04.01.20