00:00:00 --- log: started forth/04.06.05 00:01:17 re arke 00:01:29 whats up, mi amigo? 00:01:47 Reading up on Cicadas, for some strange reason. 00:07:26 cicadas leg technology has much insights that can be applied to the K! 00:21:10 hey guys. 00:21:13 heh 00:21:15 what do you think about L4? 00:21:19 is it worth using"?: 00:21:19 --- quit: Herkamire ("goodnight") 00:21:25 arke: I've heard some good things about it. 00:22:33 Mechanic, Photographer, Artist, Architect, Engineer, Builder, Set designer 00:22:34 but, nobody here has ever used it? :) 00:22:36 oops. 00:22:41 Wrong window. 00:22:49 but, it seems that L4 is supposedly pretty good. 00:22:52 and it's portable 00:22:53 = good 00:23:06 dunno if I wanna put F2 on it though. 00:23:08 arke: Read "Worse is Better." 00:23:56 hrm? 00:24:00 http://www.neocoder.net/nanos/ 00:24:04 how would that one be? 00:26:13 hrm, nanos sseems simple 00:30:41 There is a document on the net called "Worse is better," and it explains the most likely reason why something like C would win out over Lisp. The same arguments apply to other better-or-worse technologies. 00:30:45 I forget the URL. 00:30:55 * kc5tja is currently reading something though, and I don't want to lose my place to go look. 00:30:59 ok 00:31:23 I'll be available to look in a few minutes though, assuming this document is as short as I think it is... 00:34:23 found it. 00:37:48 interesting 00:57:30 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 02:43:52 --- join: Topaz (~top@exten-halls-131.soton.ac.uk) joined #forth 02:44:39 hmm, what exactly is an execution token (xt)? is it the address of the word definition, or the address of the dictionary entry, or the address of the code pointer, or the code pointer itself, or something? 03:14:12 ooh, i found a good explanation 03:14:19 http://www.zetetics.com/bj/papers/moving1.htm 03:57:10 --- join: crc (crc@0-1pool176-19.nas6.philadelphia1.pa.us.da.qwest.net) joined #forth 04:04:31 --- quit: warpzero (Read error: 60 (Operation timed out)) 04:16:19 --- join: warpzero (~warpzero@dsl.142.mt.onewest.net) joined #forth 04:37:00 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 04:38:44 Hi 04:38:48 Hamforth. 04:42:01 --- quit: SolarFire[ (Read error: 60 (Operation timed out)) 04:55:11 --- quit: crc ("Going to sleep now...") 05:02:51 --- join: schihei (~schihei@pD95F72F8.dip.t-dialin.net) joined #forth 05:03:19 Hello, knows somebody a program for Forth source which generates Documentations, like Doxygen or Javadoc? 05:25:42 Sorry, I don't. 05:32:24 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 05:33:42 hmmm, that's too bad :( Robodoc has written in its manual that it can support Forth, but all comment header types doesn't look really like forth. 05:36:33 Forth can look very different... 05:37:49 --- quit: Robert ("brb") 06:08:35 --- quit: schihei (Read error: 60 (Operation timed out)) 06:18:04 --- join: schihei (~schihei@pD9E5CCE2.dip.t-dialin.net) joined #forth 06:30:05 hwo do i simply convert n to r? 06:30:11 (a normal number to a float) 06:33:27 err...in forth? 06:33:31 yessir 06:33:53 although i just realized i dont even need floats right now, but i will need it later anyhow 06:34:49 Hmm, looks like in ANS, you have to convert it to a double-cell number, then to float. 06:35:08 so S>D D>F I guess. 06:35:13 huh, how. as far as conversion goes i could only see string>float 06:35:31 oh d means double? i thought double precision or something like a double float 06:35:50 well that makes it easier then :) 06:35:53 :) 06:36:32 --- join: ASau (~asau@158.250.48.204) joined #forth 06:37:03 Dobryjj vecher! 06:38:57 Doh! 06:39:09 ALLOT takes a byte count, NOT a cell count. 06:39:28 That would explain my problems. 06:39:30 Hi ASau 06:39:30 yep 06:40:10 and read-file returns 3 arguments, not 2, which explains my infinite looping 06:40:11 hehe 06:41:02 programming works so much better when you know what the words actually do :) 06:41:13 well, ansi says it should return 2 06:41:14 :\ 06:41:44 so i dont even know what the other argument represents, but i only need the "actual bytes read" one 06:42:12 Oh. What forth are you using? 06:42:16 win32forth 06:44:45 That's weird. 06:46:02 oh i meant file-position 06:46:56 i keep reading 3 bytes, and put the position back 2 bytes 06:47:11 so i need file-position and reposition-file 06:47:28 I see 06:48:15 huh, and reposition-file consumes 3 arguments?? 06:48:53 code SWAP --> [4] 116 3 1 116 06:48:53 : REPOSITION-FILE 06:48:53 --> [2] 116 0 06:49:49 according to the kernel, it should only take 2 :\ 06:49:59 (the sourcecode of win32forth for that word) 06:50:19 : reposition-file ( len-ud fileid -- ior ) 06:50:19 FILE_BEGIN SetFP >R 2DROP R> ; \ ior - 0 = success 06:51:24 --- join: Robert (~snofs@c-bf5a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 06:51:36 ANS says position is a double-cell number. 06:51:52 REPOSITION-FILE ( ud fileid -- ior ) 06:52:00 oh! 06:52:46 high-low? ( high low fileid -- ior ) or the other way around? 06:54:02 hmm... 06:54:44 "On the stack, the cell containing the most significant part of a double-cell integer shall be above the cell containing the least significant part." 06:55:10 so ( low high fileid -- ior ) 06:55:31 k 07:37:50 --- join: MrReach (~spam@209.181.43.190) joined #forth 07:37:51 --- mode: ChanServ set +o MrReach 07:38:07 hihi 07:39:14 Good evening! 07:40:18 yes, 07:30 here 07:40:38 06:30 here. 07:40:56 --- join: murl (quinton@murl.registered) joined #forth 07:41:14 Good evening, murl! 07:41:29 you're in Hawaii?? 07:41:41 or do you mean 18:30? 07:42:19 PM, of course. 07:42:38 ok 07:43:25 I never have heard that "evening" means "a.m." 07:43:55 I may mistake here. 07:44:05 :) 07:44:48 heya, qFox 07:44:52 hi 07:45:14 I was confused ... time starting with "0" usually means it's in 24 times 07:45:16 time 07:45:46 otherwise you have to deliberately place the ante/post indicator 07:45:59 Well. 07:46:19 I'm not used to british/american standard. 07:47:22 what country are you in? how do they specify time? 07:47:41 * qFox mumbles ctcp time 07:47:49 Russia. 07:49:15 We write quite arbitrarily. 07:50:31 It's better to append time of day if it is not clear. 07:51:00 * MrReach nods 07:55:49 I have an interesting idea. 07:56:02 i have to go in 2 minutes 07:56:18 We live in almost UNIX world. 07:56:58 Maybe we should work out common UNIX ways to deal with simple Forth related tasks. 07:57:24 Blocks to lines, lines to blocks. 07:57:31 heh, there's so many tools provided with unix 07:57:36 --- nick: MrReach -> MrGone 07:57:45 Maybe with not full blocks. 07:58:01 We can use FF to separate them. 07:59:02 And maybe it would be good to create printing filter. 07:59:10 fold 07:59:59 fold can convert blokcs and files 08:01:39 Well. dd can do this too. 08:02:04 What about separating blocks with form feeds? 08:20:02 err 08:20:50 dd cant insret an eol at the end of every block line 08:20:58 or remove them from the flat file 08:23:51 Strange. 08:23:58 My dd did. 08:26:00 dd cbs=64 conv=(un)block (?) 08:26:53 err it cant insert a 0x0d every nth char of the output file 08:30:04 Hm. 08:30:26 "dd cbs=64 conv=unblock" does it pretty well. 08:30:40 DJGPP v.2 08:38:29 --- quit: schihei (Read error: 60 (Operation timed out)) 08:39:06 --- part: murl left #forth 08:46:38 --- quit: warpzero (Read error: 110 (Connection timed out)) 08:48:53 --- join: kc5tja (~kc5tja@66-74-218-202.san.rr.com) joined #forth 08:48:58 --- mode: ChanServ set +o kc5tja 08:50:20 Dobryjj vecher, kc5tja! 08:51:04 Greetings. 08:54:52 its not possible to devide with two doubles? 08:55:00 double-numbers... 08:56:07 D/ doesn't work? 08:56:16 no 08:56:21 hmm 08:56:22 its not in the ansi either btw.. 08:56:30 ansi only has d*/ 08:56:37 which takes only one d, and two n 08:56:52 oh thats M*/ 08:57:06 Don't know then. 08:57:13 grr 08:57:14 I never actually use double-width numbers, so... 08:57:28 well i want to do a percentile for two filesizes 08:57:37 and filesizes come as double numbers 08:58:33 If you're willing to live with just 32-bit integers, you can use D>S to convert the double number to a single-width number. 08:58:50 yeah i know, but i'm not sure if that'll be accurate enough 08:59:26 but i guess 4gig is pretty big 09:00:01 Another solution is to convert it to floating point somehow. I'm not sure how though -- I also never use floating point. :) 09:01:00 hm wait, thats not a bad idea... d>f 09:03:24 qFox. Divide both doubles by the same number. 09:03:36 --- quit: Robert ("brb") 09:03:37 huh? 09:03:40 You don't need all digits, when you want percentage. 09:04:05 a/b = (a/c) / (b/c) 09:04:12 ic 09:04:33 When you have integer division, you get approximate answer. 09:04:36 That loses the low-end bits, though, which is where 90% of the information is stored, since I *really* doubt he has very many files bigger than 4GB. 09:05:30 kc5tja. Actually, the number isn't to be the same for all files. 09:05:37 if anyone dares to run this code on a 4gig+ file and doesnt mind waiting at all... :p 09:06:13 ASau: Doesn't matter. It still assumes the presence of a double-width division operator, which does not exist in ANSI Forth, apparently. 09:06:36 For each pair you're able to find c. 09:06:49 a/c is single! 09:06:50 He doesn't want to find c. 09:07:14 He just wants to divide a/b; such an operation should not involve an equation solver. 09:07:28 its ok. it works now :) 09:07:33 * arke is b4ck 09:07:44 And why even bother doing that, when you can just lop off the top 32 bits anyway (which are 99% of the time guaranteed to be zero ANYWAY)? 09:07:53 No need to divide anything. 09:09:10 Those number may have 35 bits. 09:09:30 Not for a single file, no. 09:09:34 When you get rid of 32 lower bits, you get too little. 09:09:51 32 lower bits? I was talking about the 32 upper bits. 09:10:00 f/ [ 100 s>d d>f ] fliteral f* f. ." %" 09:10:28 ok i'd prefer there to be no space before the %, but i can live wit hthat 09:10:34 qFox: You could have just said f/ 100e f* f. 09:10:48 oh 09:10:57 e? 09:11:06 kc5tja. HEX 09:11:15 ASau: Don't use hex. 09:11:18 Problem solved. 09:11:42 well i am in decimal mode anyhow, but e puts a number directly in float? 09:11:59 qFox: In this context, e means "with an exponent of". It is scientific notation. I'm sure you've seen numbers like 1.24e+5 or some such before? That's where it comes from. But since our exponent is zero, we just leave it ff. 09:12:01 * arke is writing an email to the NanOS guy 09:12:12 aha ok 09:12:53 --- join: Robert (~snofs@c-bf5a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 09:13:25 hi Robert 09:13:40 Hi 09:13:41 Robert: http://www.neocoder.net/nanos/ 09:15:26 A swede.. 09:15:58 So, why did you show me this? 09:17:06 well... i created a almost correct compressor, using a simple linear algorithm. it obviously has variating compression rates, and it looses on winrar (although my few tests seem to show so). it varies for images (100 bytes loss/win for a 200k image). 09:18:03 Robert: well, I wanted to know waht you thought about it. 09:18:10 Robert: seems quite nice. 09:18:32 arke: Well, I don't know how well it works... 09:18:42 For now, I'm happy with Debian 09:18:48 the code checks a file per 3 bytes (position increasing 1 byte at a time), and checks if the three bytes are a linear (whatsthename?). so b2-b1 = b3-b2 09:19:08 Robert: well, I meant for F2.. 09:19:27 * arke is playing with AROS 09:20:34 the downside is that it requires at least 4 bytes per euhm... found match (one escape char, one begin char, one number thats the coefficient (?), and one number indicating how many bytes should be put in) 09:20:52 plus it creates some overhead for the escapechar 09:21:37 but the code does tackle single byte repeating strings (aaaaaaa), since their coefficient is 0 09:21:49 ohwell 09:21:55 oh god 09:21:57 Interesting. 09:21:58 this is so annoting 09:22:08 AROS queries the floppy drive every 2 seconds 09:22:14 making a very audible sound 09:22:16 WAY annoying 09:22:17 heh 09:22:33 arke: That's because AmigaOS can auto-detect when a disk is inserted. 09:22:46 The only way to get that same effect on the PC is to ping the drive and actually spin the motor. 09:23:05 On the Amiga, it involved only a click, but you can't move the heads in the PC's floppy without spinning up the motor. 09:24:10 Besides, it's safer for the drive to have a floppy in it at all times anyway. 09:24:30 Helps to keep the heads clean. 09:25:15 * arke is going to turn off teh floppy stuffs 09:27:24 bleh 09:27:31 had to add a dummy floppy 09:27:37 otherwise it crashes VMWare :P 09:27:57 What crashes VMWare? 09:28:06 Not having a floppy in it ought not to crash VMware. 09:28:13 booting up AROS without a floppy 09:28:16 I know lol 09:28:23 oh well 09:28:28 Then VMware is broken, I suspect. 09:28:29 I got it for free, so... 09:28:47 yeah, it's got its quirks, but it's one HELL of an effort that I'm very thankful for. 09:29:33 even though I stole it.. lol 09:29:41 I dunno -- I never liked VMware. 09:29:55 It works most of the time. 09:30:01 --- join: warpzero (~warpzero@dsl.142.mt.onewest.net) joined #forth 09:30:03 it boots my linux partition without a sound 09:30:04 It has NEVER worked for me. 09:30:18 the older VMWare used to give me all kinds of shit though 09:30:21 hi warpzero 09:30:29 Even the latest versions don't work for me. 09:30:39 They inevitably crash, hang, or otherwise choke on even the simplest things. 09:30:56 I find bochs to be vastly more reliable for my needs. 09:30:59 never crashed on me, btw. 09:31:19 bochs is more reliable becasuse it copmletely emulates, not protects. 09:31:24 bochs has nothing to protect 09:31:25 haha. i tried to swap two floats with 2SWAP, but didnt know the floats no longer existed on teh data stack (or didnt realize it), because the devision was going the wrong way. so the 2swap didnt matter anything and i didnt understand why :p 09:31:26 vmware does 09:31:26 :) 09:31:53 arke: No, it emulates physical resources. 09:32:09 It may provide a bridge to some devices, like the floppies, but everything else it emulates. 09:32:18 In fact, there are some CPU instructions that it has no choice but to emulate. 09:32:19 VMWare? 09:32:25 oh 09:32:27 yeah. 09:32:34 Because the x86 is borked in that a user-mode program can tell when it's not running in user mode (RETARDED!) 09:32:41 but, it lets most instructios run native 09:32:55 :P 09:32:55 It sure doesn't seem like it to me, but whatever. 09:33:19 for explorer.exe (xp pro) 09:33:19 Esc = 79 (O) 09:33:19 Saved bytes = 168044 09:33:19 Size inputfile: 1007616 09:33:19 Size outputfile: 763529 09:33:19 >> 75.7758 % 09:33:20 its kinda like plex86 in that respect. 09:33:25 All I know is that *EVERY* opportunity I've had to use VMware, I've always walked away disgusted. 09:33:43 whats teh cd command in amiga/aros? 09:33:50 arke: CD 09:34:03 arke: However, you don't need it. 09:34:15 Type the name of a directory, and it'll auto-detect it's a directory, and switch to it. 09:34:26 cool 09:34:33 is it case sensitivE? 09:34:34 Use / to go back one level. 09:34:43 depends on the filesystem. 09:34:59 Most filesystems for AmigaOS *preserve* case, but are not case sensitive when matching filenames. 09:35:07 But Unix-compatible FSes are case sensitive. 09:36:22 woah cool 09:36:34 you can have the desktop be a separate, moveable window 09:38:46 * arke is impressed by the whole system 09:39:10 *** Virtual machine kernel stack fault (hardware reset) *** 09:39:10 The virtual machine just suffered a stack fault in kernel mode. On a real computer, this would amount to a reset of the processor. It can be caused by an incorrect configuration of the virtual machine, a bug in the operating system, or a problem in the VMware Workstation software. Press OK to reboot virtual machine or Cancel to shut it down. 09:39:22 gotta hate that. 09:39:56 arke: I *told* you AmigaOS rocked. 09:40:25 Of all the OSes I've ever used, AmigaOS is the lightest weight, fastest, most user-friendly system I've *ever* used. Period. Hands down. No further discussion needed. 09:42:13 --- quit: warpzero (Read error: 60 (Operation timed out)) 09:44:31 cool. 09:45:20 That's what Dolphin is most inspired by. 09:45:29 Or, at least, was. 09:45:32 Wow. 09:45:34 * arke likes it 09:46:42 ooh 09:46:47 here's another thing I'm loving 09:47:17 hold the right button to get the menu for that particular app at the top (like MacOS, only that MacOS has it always focused) 09:47:45 Yep. 09:47:59 Note that you can also make MULTIPLE MENU SELECTIONS with the LEFT mouse button WHILE the right is held down too. 09:51:09 So AROS is self-hosting now? I remember when AROS was still hosted under Linux. 09:54:28 yep. 09:54:49 it runs native x86, m68k (or whatever the amiga CPU was), linux, and fbsd 09:56:42 Oh, so it still can run under Linux then. 09:56:43 kc5 i would agree with that statement 100% 09:56:59 the one about the amiga os being the best os ever created i mean 09:57:08 * I440r misses his amiga :( 09:57:35 * arke is loving AROS 09:57:48 * kc5tja will have to play with AROS again. 09:57:55 * kc5tja is currently (still) using amiwm for X11. :D 09:58:11 it's running under VMWare, with other VMs open too, a whole bunch of native stuff, no accelerated graphics, and it's BLAZING! 09:58:17 kc5tja: :) 09:58:29 One thing I really miss is having HUGE Workbench screens (like, on a 640x200 display, having a 1024x1024 Workbench screen). 09:58:48 you can have that in C 09:58:49 er 09:58:50 X 09:59:00 arke: Only if your wm supports it. 09:59:08 eh? 09:59:15 sure about that? 09:59:24 I'm fairly sure. I am not 100% sure. 09:59:31 Well, yeah, i suppose you can. 09:59:42 if you ctrl+alt+- now, you'll see the same effect 09:59:43 Because you can ctrl-alt-- and have it drop into low resolution mode. 09:59:46 scrolling with the mouse 09:59:48 yeah 09:59:50 exactly 10:00:14 But, I still miss the ease of configurability with the Amiga. That, combined with multiple screen support, is just sooooooooooooo niiiiiiiice. 10:00:24 multiple screen == depth-arrangable screens. 10:00:35 --- quit: tathi ("leaving") 10:00:53 depth arrangaeble? 10:00:56 The nice thing about amiwm is it emulates multiple, depth-arrangable, scrollable screens very fast. 10:01:18 arke: Notice that the Workbench screen titlebar has a depth-arrange gadget on it? 10:01:41 yeah. 10:01:49 Try dragging the screen's titlebar down. 10:01:50 :) 10:02:15 If you had another program running in a different screen, you'd reveal the screen immediately beneath the Workbench. 10:02:23 In other words, in AmigaOS, screens layer like windows do. 10:02:37 oh, you mean the wanderer being able to move like a window of its own? 10:02:52 oh....hrm. 10:02:55 I don't know what "the wanderer" is, so I can't answer that question. 10:03:07 the wanderer seems to be like the finder in macos 10:05:08 actually, if I may say that, AROS and my old Mac (1986, dunno what version, like 4?) are quite similar in interface 10:06:57 Ahh, so what they call Wanderer was called Workbench in AmigaOS. 10:14:35 --- join: arke_ (~Chris@wbar8.lax1-4-11-100-108.dsl-verizon.net) joined #forth 10:26:22 Dude, if AROS gets that TCP/IP implementation going, I just might consider tinkering with it instead of Linux for my desktop. That's assuming they have reasonable IRC, e-mail, and web browser support of course. Oh, and VIM. Gotta have VIM. 10:31:50 --- quit: arke (Read error: 110 (Connection timed out)) 10:35:00 of course, always gotta have VIM :) 10:35:03 --- nick: arke_ -> arke 10:35:23 are they working on eth right now? 10:35:56 TCP/IP isn't Ethernet. 10:36:03 They have Ethernet drivers as far as I can tell. 10:36:12 They don't have bsdsockets.library though. 10:36:21 There is a $575 bounty on it. 10:36:33 bounty? 10:36:57 Yes. People will pay a bounty if you port or write a new open source module for something within a specific period of time. 10:37:25 hmmm ic 10:37:51 All donations come from other members of the community. 10:38:14 cool. 10:38:23 can't wait until they have that then. 10:38:24 For example, if I were a business or whatever, and I wanted to see some accounting software, I might offer some cash as an incentive to get people to port something like OpenOffice to the OS of my choice. 10:38:32 Others who agree would add to the pool of cash, and the bounty goes up. 10:39:17 For example, there is a $100 bounty on getting AROS running under PowerPC Linux. 10:39:23 then a curses port and then port irssi 10:40:39 I'm not seeing any open bounties for that. 10:41:52 $100 is hardly worth my trouble for such a large project (or at least it sounds like large) 10:41:53 true. but if you have BSD sockets, all you need is curses and then you can port irssi, right? :) 10:42:04 --- join: warpzero (~warpzero@dsl.142.mt.onewest.net) joined #forth 10:55:02 unistd.h is there. 10:55:21 the headers are coming! the headers are coming! 10:55:23 hi kc5tja 10:55:30 hi kc5tja 10:55:32 hi warpzero 10:55:34 hi arke 10:57:29 qFox: Why? Just port the sockets API that exists in another OS, bundle it as an AmigaOS library, and release. 10:57:35 I can't imagine it being at all that hard. 10:57:50 re warpzero 11:00:06 kc5tja: he meant for teh PPC port 11:00:46 arke: Even then, I can't see it as being all that hard. 11:00:51 It *ALREADY* runs under x86 Linux. 11:01:17 ^_^^__^^___^^____^^___^^__^^_^ 11:04:16 what are we porting? 11:04:22 AROS 11:05:27 Well, *I* am not porting anything. 11:05:28 what is that? 11:05:34 But I'm just saying, it can't be hard to port. 11:05:36 (that hard, rather) 11:05:48 AROS is an open source clone of the AmigaOS 3.x-era operating system. 11:07:34 oh 11:07:40 i never used anything like that 11:07:47 im too young 11:08:02 i think the oldest os ive used was THEOS/OASIS 11:24:12 --- quit: Robert ("brb") 11:33:23 --- join: Robert (~snofs@c-bf5a71d5.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 11:50:54 wb Robert 11:57:01 Time to work on re-organizing my website again... 11:57:06 Service calls are made through a call gate at selector 0008h(descriptor 1 in GDT). 11:57:10 what does that mean? 11:57:41 That means calls are made using a far call to address 0008h:00000000h. 11:58:15 To understand what precisely this means you will need to be aware of how Protected mode works in x86 processors. 11:58:25 well, i don't. :) 11:58:35 and especially how selectors work. 11:58:41 All I know is that segments don't map to physical memory, but to virtual memory 11:58:46 or selectors, yeah 11:59:01 Yes, but these selectors/segments (same thing) are referenced by *index* into a table. 11:59:42 13 bits comprises the index into either the global or local descriptor table, then there is a bit indicating which table to use, then the other two bits comprises the privilege level you claim to have. 12:00:16 into the GDT, correct? 12:00:22 In this case, yes. 12:00:25 or LDT, i guess. 12:00:27 No. 12:00:28 GDT. 12:00:36 Entry #1, global table, privilege level 0. 12:00:42 Because the lower three bits are cleared. 12:00:57 privilege 0 means full access? 12:01:55 Well, it's kind of hard to answer that question, but suffice it to say that the "requested privilege level" bits must match certain expectations (in tihs case, 00) for the call to succeed; otherwise, there will be a privilege violation. 12:02:41 0-3 are highest-lowest level though, right? or is it more of a "user" thing? 12:06:30 0 is the highest privilege, and 3 is the lowest, yes. 12:06:54 Though, in practice, most OSes only use rings 0 and 3, and completely ignore rings 1 and 2, because their behavioral semantics are not nearly as well specified. 12:08:16 kc5tja: waht' syour opinion on micro/nano kernels? 12:09:12 * arke wonders if he can convince pygmy to create 32-bit pmode code 12:09:29 I mean, not run it etc., just compile it. 12:09:41 ack 12:09:44 nevermind, pygmy is DTC. 12:09:51 hrm, actually, possible anywayh. 12:11:32 arke: Well, I got gforth (a DTC Forth implementation) to produce ELF executables for my FTS/Forth system. :) 12:11:38 It's up on my website, if you don't believe me. :-) 12:12:01 Although the future of my MachineForth systems appears to be BoxForth, of which my FTS1001 assembler will form the core of. 12:12:23 It ought to be very, very easy to adapt FTS1001's assembler to the x86 platform, which *will* obsolete my current FTS/Forth Cross Compiler. 12:12:51 Admittedly, I ripped most of the software infrastructure off from Chuck's MachineForth implementation, as documented by Jeff Fox. :) 12:13:26 arke: As far as micro/nanokernels, who knows? I'm in favor of them, but they have to be implemented just right. AmigaOS's exec.library is a microkernel, and is largely why AmigaOS kicked ass. 12:13:40 But when memory protection gets involved, some factors change. 12:13:59 Experience with QNX suggests that microkernels are still quite viable technologies for memory protected systems too. 12:14:22 My philosophy is very, very simple: get it working first -- make it fast later. 12:14:40 I'm planning on using NanOS 12:15:03 I want to have NanOS be the kernel 12:15:11 then cross-compile a minimal Forth system (in Forth!) 12:15:32 and then, extend in Forth. 12:15:43 so, basically, I write no asm code except for system calls 12:16:14 and even for those, I just write a generic Forth word which compiles it, and then I have it interfaced by higherlevel, portable Forth 12:16:30 hey 12:16:34 ack, wrong window 12:17:10 Right. 12:17:17 That was the plan for FTS/Forth under Linux. 12:17:34 That would give me a bit of a trampoline with which I can write an OSless version of FTS/Forth. 12:17:48 Cool. 12:17:56 How hard was it to write the compiler for gforth? 12:18:06 Not too hard, but I couldn't concentrate solidly on it. 12:18:10 remember, I'm not as good as you + I'm not familiar with ANSI 12:18:19 So it took me a LOT longer than it would take someone with a tighter attention span. 12:18:32 Most people complain too much about ANSI. 12:18:35 Forget ANSI. 12:18:51 GForth is ansi :) 12:18:55 Treat ANSI merely as a Forth system implementation quirk, because ALL Forth systems have quirks you won't be happy about. 12:18:59 Just work with it. 12:19:07 ANSI is amazingly workable. 12:19:15 :):):):) 12:19:24 Inconvenient at times, but nonetheless quite powerful. 12:19:37 wow. I don't have a Forth system here. 12:19:42 or rather, on Windows. 12:19:43 weird. 12:20:01 * arke will now find your FTS/Forth cross-compiler 12:20:17 It's on my website. 12:20:26 http://www.falvotech.com/ftsforth.html 12:20:42 Note that there is no documentation, and it is **ONLY** a cross-compiler. 12:20:58 But that's OK, since I'm here on IRC so often, you can ask me questions. 12:21:03 (and I can record a FAQ of sorts) 12:21:41 --- join: Sonarman (~matt@ppp-66-124-255-248.dsl.snfc21.pacbell.net) joined #forth 12:21:44 re Sonarman 12:21:47 I already got it :) 12:21:49 re Sonarman 12:22:09 hi 12:23:31 arke: Cool. 12:23:47 anyone know what herk and tathi are trying to do with OF? 12:24:04 Sonarman: good question,. 12:24:13 Get their own Forth implementation running native on the machine, without any need for OS, as far as I can tell. 12:24:20 s/Get/Getting/ 12:25:13 kc5tja: does it spit out ASM or binary? 12:25:37 arke: Raw, unadulterated, pure, uncompromised, 100% US RDA approved, prime choice binary. 12:25:47 lol 12:28:51 Hmm...re-organizing my site isn't going to be as easy as I thought. It threatens to change the whole user interface of the site. 13:09:09 --- join: Sonarman_ (~matt@adsl-67-113-234-63.dsl.snfc21.pacbell.net) joined #forth 13:09:15 --- quit: Sonarman (Nick collision from services.) 13:09:19 --- nick: Sonarman_ -> Sonarman 13:13:31 arke: lol, i remember the annoying floppy thing from AROS 13:13:43 :):):) 13:22:06 --- join: TheBlueWizard (TheBlueWiz@207.111.96.153) joined #forth 13:22:07 --- mode: ChanServ set +o TheBlueWizard 13:22:20 hiya all 13:23:49 You always say that too :P 13:24:41 Sonarman: yeah...so? 13:25:06 nothing :) 13:25:09 it is polite to greet everyone thusly, hm? 13:25:21 yes, i'm just being an asshole, that's all :) 13:26:01 * TheBlueWizard eyes Sonarman warily 13:26:32 Hehhe 13:26:37 sorry. here's a new spellbook to make it up to you 13:27:06 Sonarman: If he turns you into a newt, you realize, you won't get better, right? :D 13:27:40 at least i'll have better eyesight as a newt, right? 13:28:01 i mean, why else would their eyes be so prized? 13:30:02 That means calls are made using a far call to address 0008h:00000000h. 13:30:29 (regarding using GDT entry #1) 13:30:51 what are the bytes after the colonf or? 13:31:07 are they an offset? 13:32:22 They're the segment offset, which is ignored when used with a call-gate segment. 13:32:57 So any value can be placed there (and can potentially be used to encode the service request, thus freeing up a register at the expense of some speed) 13:33:11 ok 13:39:52 terve TheBlueWizard 13:41:43 moi mur :) 13:51:03 FIGUK MEETING EVERYBODY IRCNET/#FIGUK 13:51:04 :) 13:55:04 Hold on, logging in now. 13:55:06 Or TRYING to. 13:55:13 The server is not responding. 13:56:56 IRCNet is a pain 13:57:09 which is why we #c4th-ers are moving, most likely 13:59:02 --- quit: madgarden (Read error: 104 (Connection reset by peer)) 14:02:47 what server are you using., arke? 14:03:01 irc1.us.ircnet.net 14:03:06 seems to be the only one working for US people 14:07:07 *gasp* 14:07:15 kc5tja posted to comp.lang.forth! 14:08:44 Yes, amazingly so. I needed to figure out how to get gforth 0.6.2 to talk to an external (SDL) library. 14:08:50 hmm...is that unusual? 14:09:00 I haven't posted to CLF in years. 14:09:08 Or so it seems. 14:09:20 oh...hmm 14:13:16 oh, awesome. Howerd Oakford just joined 14:13:33 yep :) 14:18:32 kc: have you looked at fflib.fs? 14:18:50 Yes, and I'll probably end up using that. 14:19:15 But I wasn't sure if that was the official standard or not, since it seems that the library binding mechanism changes with each release of GForth. 14:20:36 i think they're going to stick with fflib.fs 14:20:46 well, never mind 14:22:23 i think fflib.fs was written because the older one didn't support C functions with va_args, and now with fflib.fs there aren't really any deficiencies so they shouldn't be changing the interface again 14:22:38 but yeah, Anton or Bernd will know :) 14:22:45 :) 14:24:28 --- join: lalalim_ (~lalalim@p508AB9E1.dip.t-dialin.net) joined #forth 14:25:56 I am not certain how to use fflib though; I know how to declare libraries, but I don't know how one declares pointers to various structures. 14:26:35 that gnu dragon is just TOO CUTWE 14:26:37 CUTE 14:27:20 GNU dragon? where? 14:27:42 Sonarman: donde esta? 14:27:43 TheBlueWizard: When GNU cross-breeds with a Forth SwapDragon, you get the GnuDragon. 14:27:47 http://www.jwdt.com/~paysan/gforth.html 14:27:48 --- quit: lalalim (Read error: 60 (Operation timed out)) 14:28:05 oh 14:28:06 haha 14:29:22 I see now...weird sort of cute 14:29:29 kc5tja: where did the term Swap Dragon originate? 14:30:06 Sonarman: It's a cartoon character in Starting Forth, by Leo Brodie. 14:30:23 Cool 14:45:12 --- join: arke_ (~chris@wbar8.lax1-4-11-100-108.dsl-verizon.net) joined #forth 14:57:26 --- join: cedricshock (~cedricsho@209-181-58-5.eugn.qwest.net) joined #forth 14:58:27 Forth GUI toolkits? 14:59:07 None available unless you want to write your own. BigForth is the closest thing to a cross-platform interface, but it's nonetheless tied into the BigForth environment. 15:01:09 Thanks. 15:01:46 n/p. You might want to check on comp.lang.forth -- I *think* I recalled seeing someone who wanted to interface GForth and gtk+, but I never followed up on it. Last I remembered, they were having issues with callbacks. 15:03:08 anybody familair with creating+using new dictionaries in ANS/Gforth 15:03:09 ? 15:04:39 New dictionaries, no. 15:04:42 New vocabularies, yes. 15:04:55 well, whatever the term is :) 15:05:22 anyway where I can override without overwriting certain words in certain parts of the code 15:05:46 vocablulary FOO 15:05:58 that easy? 15:06:01 creates vocabulary FOO 15:06:07 awesome :) 15:06:09 wait 15:06:17 Then you need to say "FOO DEFINITIONS" to tell Forth to place all new vocabulary *definitions* there. 15:06:45 Because definitions can be placed in a vocabulary which isn't even in your word search path! 15:06:58 then, to push FOO onto the stack of wordlists to be searched, you can just do FOO 15:07:41 and to pop it? 15:07:44 but, you should actually do FOO ALSO. ALSO is like dup for the wordlist stack 15:07:48 to pop: PREVIOUS 15:07:55 (sometimes calld TOSS) 15:08:51 different forth projects have different conventions for using the vocab stack, i think 15:09:22 eh? 15:09:27 in some, you do FOO ALSO, and in others, you do ALSO FOO 15:09:31 why would i dup FOO on the vocab list? 15:09:44 ok, let's say you didn't dup FOO 15:10:20 * arke_ is getting the impression that you want FOO on the vocab list twice 15:10:22 the stack would look something like this: FORTH FLOAT FILES FOO 15:10:44 sorry, i said something incorrectly earkuer 15:10:47 earkuer 15:10:48 earlier 15:11:31 executing a vocabulary word (like FOO) does not push FOO onto the vocab stack; it replaces the top item with FOO 15:12:22 so, now let's say this is what the vocab stack looks like: FORTH FLOATS FILES 15:13:09 if you were to execute FOO just then, then all the file access words would "mysteriously" disappear 15:13:39 so, you could do ALSO FOO, and the last item on the stack would be preserved 15:14:04 but the reason having the 15:14:13 ignore last line 15:14:15 kc5tja: how do you quit VIBE? 15:14:32 if you have the 15:14:39 ugbire kast kune too :) 15:14:43 --- join: solar_angel (~jenni@MTL-HSE-ppp169075.qc.sympatico.ca) joined #forth 15:14:44 GACK 15:15:03 lol 15:16:19 * arke_ will look which direction 15:16:31 OTOH, if you keep the vocab most recently added to the stack duplicated at all times (e.g.: FORTH FLOAT FILES FILES), then the convention to add a vocab to the search order would be FOO ALSO 15:16:58 oh 15:16:58 ok 15:17:38 i'm not sure why people pick one way of doing it over another 15:17:50 in fact, i've kind of confused myself :) 15:20:00 Going for food. I'll be back 15:22:15 --- quit: Topaz ("Leaving") 15:22:20 how large is an ELF header? 15:23:05 every time i see that word elf, i see a small chick with shiney wings :p 15:23:22 What did YOU have for breakfast? 15:23:29 hmmm 15:23:47 patatoe chips i believe 15:24:01 ack 15:25:19 Hehe 15:25:46 I actually had a piece of Prinzesstorte (sp?) since yesterday. 15:38:12 arke_ I think its on the order of 100 - 200 bytes 15:38:48 arke_ Somewhere I saw a working elf binary that was shorter than the header (it used addresses overlapping itself) and I think it got down to 73 bytes 15:39:58 cedricshock: already found it -- elf header is 52 bytes, and some guy created a 45-byte ELF executable :) 15:41:12 thanks though :) 15:42:14 Here's the site: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html 15:42:19 yep :) 15:42:28 what an effort 15:42:29 --- join: _I440r_ (proxyuser@adsl-67-65-218-134.dsl.snantx.swbell.net) joined #forth 15:42:29 lol 15:42:31 --- quit: I440r_ (Read error: 104 (Connection reset by peer)) 15:42:34 hi _I440r_ 15:55:44 I love that article. I hust read it again. It makes me laugh every time. 15:58:43 Anyone know any fast languages other than assembly and forth that are willing to do what : does? 16:01:18 euh you can do it with any language, basically.. 16:01:33 as long as it can do direct memory addressing 16:01:46 writing preferable :p 16:17:09 how do you do global search-and-replace in Vim again? :s/foo/bar/g doesn't work; i seem to remember that the colon should be replaced by something else in order to do it globally (i couldn't find it in the manual) 16:17:26 nope... 16:17:30 it needs to be :%s/foo/bar/g 16:17:42 yes! thanks! 16:17:55 sure thing. 16:19:22 --- quit: TheBlueWizard (Read error: 60 (Operation timed out)) 16:37:21 I'm trying to write an accumulator generator, but I can't figure out how to get / use the address of the created thing: 16:38:12 : acc 0 CREATE , DOES> @ + DUP ! ; 16:38:40 Somehow I need to get the address of the created thing in between DUP and !. 16:39:52 um... ? 16:40:21 like, say, DOES> +! ; 16:40:44 you can't get the address like you're thinking... because you've already discarded it. 16:40:57 you need something like DOES> DUP @ + SWAP ! ; 16:41:04 +! is faster though 16:41:27 Where does the address get discarded? 16:41:30 Oh I get it 16:41:37 The at used the address 16:41:39 right 16:41:42 the @ ate your address. 16:42:04 the problem i see here is that, while this will accumulate like you want, it provides no way to retrieve the accumulated value. 16:42:37 That's why I was duping after adding 16:42:57 So that there'd be a copy of the sum on the stack 16:42:57 oh. 16:43:05 that's not quite how you want to do it... 16:43:06 Now it'll take a little bit of swapping too 16:43:08 hrm... try this out: 16:44:31 : acc CREATE 0 , DOES> DUP @ ROT + TUCK SWAP ! ; 16:44:39 What does TUCK do? 16:44:47 a b - b a b 16:45:08 So this will be: 16:45:12 num addr 16:45:16 after dup 16:45:22 num addr addr 16:45:26 After @: 16:45:42 num addr value 16:45:45 right. 16:45:47 Then: 16:45:58 ROT changes it to addr value num 16:46:00 addr value num 16:46:06 Then addr sum 16:46:06 right. 16:46:10 yep 16:46:14 then sum addr sum 16:46:15 then addr sum addr 16:46:20 oh 16:46:27 then sum sum addr 16:46:31 then just sum. 16:46:53 hope that helps. 16:48:03 What does +! do? Takes num, address, and makes the value at that address num + value? 16:48:25 yep. 16:50:32 What would take: A B C to either B A C or C A B ? 16:51:03 CAB can be done with -ROT 16:51:26 So this could also be done like: 16:51:56 : acc 0 CREATE , DOES> DUP -ROT +! @ ; 16:52:26 yes, it certainly can. 16:52:36 that's a pretty nice solution, at that. 16:53:28 So -ROT is the same as ROT ROT. 16:54:19 yep 16:54:22 And we could get B A C by -ROT SWAP ROT. 16:54:47 that sounds right. 16:54:55 How far down the stack can we explore? 16:55:06 there is another way to get BAC as well. 16:55:14 ROT SWAP 16:55:28 as for how far down the stack, that depends on the particular FORTH you're using. 16:55:50 you can use PICK to copy a value from pretty much endlessly far down, if your FORTH supports it. 16:56:08 Often using the return stack can be efficient. 16:56:21 that's true as well. 16:56:26 >r swap r> or something similar to that. 16:56:56 although the return stack is usually somewhat nasty on an x86 FORTH. 16:57:31 If it's compiled to native code >r would often be a single push instruction. 16:58:10 hrm... depends on the implementation. most implementations use the hardware stack as the parameter stack. 16:58:11 Hmm. ( comments ) don't seem to work in gforth. 16:58:44 solar_angel: Some don't, ColorForth is one example. 16:59:02 colorforth doesn't use the hardware stack for paramter stack? 16:59:05 solar_angel: Uses esi for param stack, so lodsd can be used to load NOS 16:59:05 what does it use instead? 16:59:13 ahhh. 16:59:17 that's kinda clever. 16:59:26 Or is it TOS? I don't remembers if it caches TOS. 16:59:29 the FORTH i use uses esi for the IP register. 16:59:30 remember 16:59:45 Yes, IsForth does that too. 16:59:49 it keeps NEXT pretty small that way. 17:00:05 And since I "borrowed" an idea or two from there.... 17:00:09 Yeah 17:00:16 lodsd / jmp eax 17:00:35 yep. 17:00:37 3 bytes. 17:00:39 3-byte, so inlining is shorter than a call to NEXT. 17:00:44 exactly. 17:00:47 Or as long, in 16-bit mode. 17:01:22 How is does usually implemented ? 17:01:24 i should ammend "FORTH i use" to read "FORTH i wrote and used to write an OS in" 17:02:06 solar_angel: Yes, I saw your page 17:02:10 * solar_angel smiles. 17:02:20 cedricshock: Varies a lot, as you can see. 17:02:31 cedricshock: Even on the same arch, like x86. 17:02:31 i can imagine that for a stc forth, using esi for parameter stack and esp for return stack would be pretty efficient. 17:03:07 Yeah. That way you get the advantage of being able to use call/ret. 17:03:32 And of course push/pop for return stack, which allows optimization by the programmer. 17:03:45 *nods* 17:03:55 Is your Forth direct threaded? (I forget things :) 17:04:00 yes. 17:04:17 dtc is better served with the register assignment i use. 17:04:23 Same here, but I'm constantly tempted to make a real native code compiler. 17:04:39 i wrote an optimizing native code compiler before... 17:04:42 but it's all in C. 17:04:54 How well did it optimize? 17:05:03 pretty well. 17:05:08 Did it cache more than TOS in registers? 17:05:14 yes. a lot more. 17:05:21 SWAP on average would encode no instructions. 17:06:00 Good. How about function calls and loops, were they expensive (with all the cached data to be saved) ? 17:06:19 function calls supported automatic inlining, so they could be cheap... 17:06:29 loops were expensive though, because i never really finished that part. 17:07:06 the caching was best-case-only. it wouldn't cache more than it needed. 17:07:07 OK. I was thinking about implementing something like that, but I don't know how efficient it would get. 17:07:50 Here's a better question, how on earth do CREATE and DOES work (at the forth level). CREATE doesn't seem to leave anything on the stack, so what does DOES> get its information from ? 17:07:57 it also did things like 4 4 5 + + ! would be just POP EAX; MOV [EAX], 13 17:08:10 Maybe you simply shouldn't expect too much, other languages have to create stack frames and store parameters too... 17:08:59 solar_angel: What did you do the optimization (term rewriting) rules in? 17:09:11 cedricshock - C. :P 17:09:22 Yes. That's pretty trivial as long as you don't do any post-1940 things, like branches. 17:09:28 it wasn't just simple term rewriting. 17:10:56 I think I should continue that project, but I don't know if I want to do it for x86. Register optimization on a register starved machine sounds painful. 17:11:08 actually, x86 is a really nice FORTH machine. 17:11:23 If it wasn't term rewriting you just need to expand your concept of term :) 17:11:32 cedricshock - well, fair enough. 17:11:33 --- join: TheBlueWizard (TheBlueWiz@207.111.96.125) joined #forth 17:11:34 --- mode: ChanServ set +o TheBlueWizard 17:12:02 solar_angel: Could always be nicer, but sure, some of the complex instructions help you. 17:12:05 TheBlueWizard: Hi :) 17:12:54 hiya Robert 17:13:29 once i'm finished my assembler i'm planning to reuse a lot of the concepts in my old optimizing code generator. 17:17:35 solar_angel: where's your page? 17:17:47 Sonarman - which page? 17:18:02 the one describing your Forth 17:18:11 http://caladan.nanosoft.ca/cyvos.php 17:18:27 cool 17:20:29 i'm working on interrupt handler support now. 17:20:41 actually, a monitor task to handle kernel-mode stack faults. 17:21:03 --- join: blockhead (default@dialin-740-tnt.nyc.bestweb.net) joined #forth 17:25:45 what's a stack fault? when ESP reaches a certain point? 17:26:10 something like that. 17:26:34 Why do you use DTC instead of a native code compiler? 17:26:46 Robert - because i needed it to be tiny. 17:26:53 i'll add a native code mode. 17:27:16 Why do you need it to be tiny? 17:27:24 because it's bootable. 17:27:45 ..? 17:27:51 it's an operating system. 17:27:57 Yes. And? 17:28:17 DTC was smaller and quicker to write. 17:28:37 Should I read that as "laziness"? :) 17:28:37 and it provides enough of an environment that i can easily add a native-code mode later. 17:28:41 no... 17:28:46 Which is, basically, my reason. 17:28:49 you should read that as "assembler is only 75% finished" 17:28:56 Hehe. 17:28:59 i'm actually actively working on a native-code mode. 17:29:04 That sounds like I440r's eternal excuse. 17:29:09 Great 17:29:14 but i have a bunch of other things to add as well 17:29:19 like i need to finish interrupt support. 17:29:31 and finish my FAT12 driver. 17:29:36 and make the floppy driver work on all hardware. 17:30:11 and frankly, writing a native code generator in assembly would have sucked. now i have a real forth environment to do it in. 17:31:07 I guess you have a point there. 17:32:10 But I don't think writing it in assembly language would be THAT bad. 17:32:16 well i do. 17:32:21 Oh, well, I guess I'll notice. 17:37:06 and there's only so much i'd want to do without an OS under it... hence i built a DTC first. 17:39:38 solar_angel: waht is DTC. I goodled it and got odd results 17:39:43 googled, I mean 17:39:53 blockhead - direct threaded code. 17:40:49 duh. :) thank you. :D Yes I am a moron. :/ 17:41:00 * solar_angel giggles. 17:42:10 Moving Forth deals with a lot of exotic modes, did anyone write anything like the token-threaded Forth described in there? 17:42:26 token threaded has been done. 17:42:29 anyone familiar with compression techniques? 17:42:38 in depth.. 17:42:41 I wrote a false interpreter once. Used token threading 17:43:01 i wrote something FORTH-like that was clearly not really a FORTH at all.. 17:43:18 it used arbitrary-precision numbers for cells :P 17:43:23 qFox: not in depth but it's what I have been playing with this past two weeks. 17:43:29 solar_angel: Heh! 17:43:46 it had a FORTH-syntax... but that's the only thing FORTH-like about it. 17:43:50 just got BWT into arithmetic coding working today. :) 17:44:01 solar_angel: In case some maniac on NSA decides to write a program with a gogool words in it? 17:44:14 blockhead: BWT? 17:44:44 Burrows Wheeler transpform. Takes blocks and tranforms them so that they (often) become more compressible 17:45:10 it's freaky 17:46:02 I used a bwt on a file containign source code. then ran that into simple run-length compressin. The file shurnk to almost half its size 17:46:29 naturally the artithmentic compression did an even better job 17:46:49 blockhead> well i've been toying with it just today. i've created a small app that finds linear succeeding bytes and compresses them to 4 bytes. 17:46:55 blockhead: Neat. 17:47:02 although still not as good as zip does 17:47:08 this works nicely and all, but it overall doesnt quite work on already compressed files 17:47:28 qFox: I was thinking about playing with compression on error correcting modes over radio. 17:47:34 in my case, far from. the few tests i've done get 30% off where zip/rar get 60% 17:47:50 well i've been looking at random data for a bit 17:47:56 yeah. it's tough to beat zip/rar. Might not be possible 17:48:05 and it occurred to me that its in fact nothing but random numbers 17:48:15 Hehe. Write a program to compress random data. :D 17:48:23 * blockhead looked at compression to take a break from his forth :) 17:48:24 I know a guy who claimed his program did that 17:48:25 in fact i've created a small program (in forth) that takes a file and counts the occurnces of bytes 17:49:03 qFox: google "huffman coding" and go from there 17:49:13 it the one rar file i've tested (of about a few hundered k's) consisted of about 900-1100 for each byte, kinda funny 17:49:16 well 17:49:31 then i've been thinking, what if you dont take the data in a serial way 17:49:39 but a parallel way. 17:49:48 in the end its still numbers 17:50:02 serially (from byte one to the end) they might be optimized 17:50:20 but what would happen if you take every 2 bytes (so basicly cover half the file, twice) 17:50:49 you would scramble the order of bytes, thus creating a new file, not in zip/rar/w/e format 17:51:09 could you compress this, and would it be worth it... 17:51:35 (now for bigger files you can take every 2, but of course have more threads... 5 bytes parallel, etc...) 17:51:57 i was just wondering if this method has been tested (or already been implemented...) before 17:52:10 before i go and reinvent the wheel :p 17:52:50 qFox: the odds are that anythign anyone thingks of has been done before. :/ 17:53:11 fair enough 17:53:12 Hehe 17:53:13 that's why right now I am implemtning existing compression algorithsms, BEFORE I make a new one 17:53:35 i'm having a bit of trouble finding clear and fast explanations for existing algorithms 17:53:35 there's a limit to how much compression you can actually achieve. 17:53:41 qFox: if you really want to sprain you're brain, read up on "arithmetic compression". 17:53:47 your 17:53:47 not you're 17:53:48 there is, but i dont think we have found it yet 17:54:01 yes, we have found it yet. 17:54:06 it's all about information theory. 17:54:14 there's a certain minimum size you can achieve. 17:54:20 solar_angel: shhhm don't disourage him. A lot of inventions are made by people who didn't realize it was impossible :D 17:54:26 in the end its all numbers, i cant believe a 200k file of numbers cant be optimized. 17:54:26 blockhead - well, fine :P 17:55:05 pity i dont have that "one gaze at a field of numbers and spot logical number blocks" view thing :( 17:55:18 solar_angel: you are right, *but* if you make a compression algorithm optimized for a particualr type of data, you mgiht be able to "beat the odds" 17:55:24 blockhead - well, that's true. 17:55:31 zip and rar are general compressors. A specific compressor might get better results 17:55:32 especially if you're willing to be lossy about it 17:55:55 Or even lossless, when it comes to text. 17:55:59 true. 17:56:04 * blockhead was hoping for lossless :/ 17:56:06 solar_angel> well... if i can be so bold, i'm going for the random approach 17:56:11 hope for the best kinda thing 17:56:14 but if you're willing to be lossy, you've got a LOT of room for improvement. 17:56:17 random approach? 17:56:21 Robert: exactly 17:56:46 solar_angel: lossy is really only good for aduooa nd pictures. If you want to archive your HD, lossy is not an option 17:56:54 audio 17:57:04 obviously. 17:57:12 Actually, lossy compression on a novel would be interesting. 17:57:21 Different wording every time you decompress it. :) 17:57:29 might improve it :D 17:57:41 oolipue 17:57:48 actually, you could probably lossy compress a novel... if you reduce each word to the class of it's synonyms. 17:58:18 solar_angel: that might be turned into a novel-writing algorithm: get two books from one! :D 17:58:25 hehehe 17:58:36 solar_angel> what i'm thinking of right now, is searching for logical orders of bytes. a linear order, or a logaritmical order for now. this of course relies heavily on randomness. zipped data is compressed serial, but is it done "per 2 bytes"? 17:58:45 oh in fact, that can be easily tested 17:58:53 i really like being able to compress a whole dvd into 650 megs or so 17:58:58 and have dvd quality image 17:59:01 thats a ton of fun 17:59:06 i'm gonna create a program that reads x bytes, and writes each byte to a seperate file 17:59:13 zip is like a hopped up LZW algothim, using huffman tree on the dictionary codes 17:59:21 then try and rar those files, see if there will be any compression 17:59:21 zipped data is done in spans. 17:59:24 it's dictionary based. 18:05:57 --- quit: Robert ("gn") 18:07:00 qFox, solar_angel: you might find this link of interest (it's helped me a lot): http://www.fadden.com/techmisc/hdc/ 18:07:21 it's a 12-part "lesson" on various data compression algs 18:09:16 okay tnx 18:10:47 thanks blockhead, but i've studied compression already :P 18:11:10 solar_angel: I didn't know :/ sorries 18:12:15 solar_angel: so now I'm curours. what kind of compressor stuff were you studying? 18:12:22 curious 18:13:24 me? 18:13:33 you name it, pretty much 18:14:02 everything from huffman to lz to arithmatic to various lossy dct/mdct/fft-based image and/or sound formats. 18:14:06 i've written an MP2 player. 18:14:13 and a good section of an ogg player. 18:15:52 solar_angel: fucken-A. impressive! 18:16:12 lol 18:16:30 :D 18:19:13 woo, looks like i'm on the right track now. basic interrupt support seems to work 18:19:18 now if only i can get the monitor task running 18:19:31 --- quit: cedricshock ("Leaving") 18:20:42 solar_angel: I'm gonna have to remember your compresosr knowledge. if I get real stuck figuring out somethign maybe you can help? :D 18:22:19 err... maybe :P 18:22:28 :D :D 18:22:39 compression is the type of thing where help can turn into multi-hour things though 18:22:59 that's not a good thing 18:23:39 hey, I've got the artithmetic compresosr running. what could be harder than that :D 18:23:51 (famous last words) 18:24:01 hehehe 18:24:07 mdct code. definately. 18:27:02 oh my 18:27:28 looks lossy, can skip it :D 18:27:30 unless you're really comfy with really evil complex-number-valued DSP theory. 18:27:39 yep, it's used for lossy compression most often. 18:27:50 * blockhead doens't get beyond the FFT 18:29:18 and actually, I didn't use the fft for compression, but for (audio) noise reduction and (audio) channel extraction (ie - turn stereo into three channels) 18:29:25 *nods* 18:29:40 i found out why my monitor task was blowing up :) yay me. 18:29:47 * solar_angel goes to find the format of an LDT descriptor. 18:29:49 :) 18:52:34 hmmm 18:53:04 something tells me that rar already splits data at least once. amazingly enough, compressed files are exactly the same unpacked as packed 18:53:10 absolutely zero compression 18:53:25 (when split per 2 bytes, not in the middle...) 18:53:32 "compressed files are exactly the same unpacked as packed" -- huh? 18:53:45 oh 18:53:46 yar, lets just say its not quite what i expected 18:53:57 gonna try three and fourways 18:54:05 yah. it's kinda hard to comrpess already-compressed files, even if you mess them about a bit 18:54:06 there should be a difference at some point :\ 18:54:42 yeah but this is like a thorough shuffle. 18:54:54 we'll see what 3/4way will bring 18:54:57 ok, when you compresses an already well0-compressed file, it will generate a file that is BIGGER. 18:55:09 rar and pkzip "sense" this and will not compress the file 18:55:14 so that it will never get bigger 18:55:17 they cannot sense this file though 18:55:27 its physically simply not a rarfile anymore 18:55:35 "well", not "well0" 18:55:45 i read two bytes, write one byte to one file, and the other byte to another file. 18:55:51 sense was a bad word choice. let me rephrase 18:56:05 zip (or rar) will compress your file to a temp file ... 18:56:23 oh i see 18:56:34 if that temp file is bigger thant he input file, then zip knows that the file can't be compressed any more, so it will pass the original file through, uncompressed 18:56:34 you mean they wont compress if the result is bigger 18:56:41 kay 18:56:47 makes sense 18:56:49 right 18:56:58 no fair, but it makes sense :p 18:57:06 the files can get alarmingly big 18:57:50 that's why I am making msyelf thorughly understand each "known" exisitng compression algorithm before I try to do better 18:58:15 yeah, i'm just having a problem with the long explanations 18:59:01 agreed 18:59:32 if someone could just put the techniques down in plain english, i'd be hellish happy 18:59:52 I have to re-read them (after waiting a day or so) to get an understanding. wiring code helps my understanding also 19:00:50 doh 19:00:54 rot doesnt rotate 4 items ;) 19:01:02 what was the long version of rot? 19:01:06 that takes an argument 19:01:13 roll? 19:01:15 tnx 19:01:32 wait. that was from memroy. could be wrong 19:01:46 it was what i was looking for :) 19:02:02 the tos consists of 4 file handlers 19:02:09 i have a while loop 19:02:17 begin 19:02:18 dup data 2 rot read-file drop 19:02:18 2 = 19:02:18 while 19:02:22 4 roll 19:02:22 dup data 1 rot write-file drop 19:02:27 I just looked it up in my book, I was right :) 19:02:41 (twice more times the same, just the next byte of the variable data) 19:02:44 repeat 19:02:44 --- quit: solar_angel ("*humph*") 19:03:01 its simple, and it does hte job 19:03:11 i hope the 4 roll is correct tho :\ 19:03:17 i always mess up the argument 19:03:34 ok thats bad 19:03:35 hehe 19:03:42 i end up with 0 19:04:08 should be 3 19:04:46 qFox: according to this book: "n roll rotate the n-th number to the top (thus 2 roll is swap and 3 roll is rot)" 19:05:17 ("Forth Programmin" by Leo J. Scanlon) 19:05:25 uhm 19:05:32 * qFox checks again 19:05:49 ps, the nr of bytes read should be 3 in my example, not two :p 19:07:10 aaaaand, the 2 = check before the while should be 3 (checks either the read number of bytes is 3). 19:07:43 well, 3 roll does a 4rot 19:07:56 rot does the top3, 3 roll does the top4 items 19:08:17 (in win32forth...) 19:08:30 hmmm: well, this book *is* kinda old 19:08:38 well that shouldnt really matter 19:08:46 it only mentions forth-79 and fig-forth 19:08:47 especially in such a basic word as roll 19:09:01 i should get me a book on forth somewhere 19:09:03 the dfinition of ROLL may have changed 19:09:09 perhaps 19:09:34 ( xu xu-1 ... x0 u -- xu-1 ... x0 xu ) 19:09:34 Remove u. Rotate u+1 items on the top of the stack. An ambiguous condition exists if there are less than u+2 items on the stack before ROLL is executed. 19:09:36 ansi 19:09:41 doesn't win32forth have a reference? 19:09:55 well this is the ansi standard, which it seems to follow 19:10:13 wonder why they choose for u+1 19:10:14 :\ 19:10:23 confuses me every time 19:10:28 the ansi standard came after this book :D that might explain the descrepency 19:10:42 still no change 19:11:13 perhaps i should try 10meg files... doing 1.5meg now 19:15:38 there is no change... 19:15:45 the resulting file is 64bytes larger 19:15:59 which would seem to me to be nothing more then a header 19:16:10 --- join: Herkamire (stjohns@h000094d30ba2.ne.client2.attbi.com) joined #forth 19:17:31 zip adds 711 bytes to it 19:18:24 hiya Herkamire 19:18:58 hi TheBlueWizard :) 19:20:51 qFox: yeah, zip adds header and checksums and file flags. 19:20:57 they all do 19:21:03 well yeah i know 19:21:08 :) 19:21:11 but i am really surprised by this result 19:21:55 it would either mean that zip and rar already break it down into up to 4 parts, or for some reason these tests were all not good enough 19:22:31 i dont get it though. in theory all those files are unique and entirely unrelated to the original 19:22:55 i dont see how they could already be like a compressed file 19:23:07 i mean one perhaps, but all of them? 19:23:24 qFox: look at a long compressed file. count the frequencuies of each byte 19:23:38 hm, hold on i can do that 19:23:55 then do the same thing to a file containing "randomness" 19:25:24 then what? 19:25:41 what conclusion should i get to? 19:25:43 well, what are the frequencies? 19:26:24 conclusion: a statistical analysis of a compressed file is the same as pure random "white noise". 19:26:29 you can't compress randomness 19:27:07 hmm so current compression methods aim towards the fact that a file has a meaning? 19:27:25 mmmmm, kinda 19:27:51 qFox: not really 19:27:52 look at a text file. certain characters tend to follow other characters. certain characters appear more than others 19:28:13 it's just if the file is predictable (such as having a lot of the same byte) then it can be represented in a shorter form 19:28:17 patterns exist in data, inequalities of distribution. compression takes advantage of these 19:28:35 no patterns of this sort exist in pure white noise (or a in a well compressed file, which will resemble white nosie) 19:28:44 so no compression can happen 19:28:55 what Herkamire said :D 19:30:33 http://members.home.nl/qfox/results.txt 19:30:45 incase anyone cares :p 19:30:58 * blockhead looks 19:31:26 (this is the output of my program) 19:31:28 * blockhead pokes his modem "you alive down there?" 19:31:32 heh 19:32:46 then i'm gonna focus on trying to compress randomness :) 19:33:14 I expected the frequencies of the characters to be just about equal for a zip file. They almost are. 19:33:30 yes i noticed that too 19:33:42 white noise 19:34:02 compressed files compress like random files compress .... badly :D 19:34:41 you can't compress good random data 19:34:45 right 19:35:05 you cant predict the compression rate of compressed random data. 19:35:19 there's always a patern to be found one way or the other 19:35:23 pattern 19:35:33 i dont mean for all the bytes, but here and there 19:35:58 its questionable whether its profitable though 19:36:36 compression is fun :) ain't it? 19:36:50 you can't compress random data. 19:36:55 right 19:37:01 you can only compress data you can predict to some degree 19:37:20 * blockhead nods vigorously 19:38:07 we'll see :p 19:38:46 that's the spirit, but I really think you shoudl look at existing algorithms more before you go diving into this 19:39:16 but if existing compressions are designed for meaningfull data, what use are they? 19:39:22 hm dont answer that 19:39:28 :D 19:39:30 nothing to do with if it's meaningfull 19:39:36 just if it can be predicted at all 19:39:50 predictable data is usually meaningfull, or it would be random 19:40:01 no 19:40:09 001001001001001001001001001001001001001001001001001 19:40:17 that's predictable, but not meaningfull 19:40:24 and not random 19:40:46 hmmmm 19:41:01 part of me agrees and another part of me does not 19:41:01 hehe 19:41:10 but point taken 19:42:18 i'm gonna sleep now 19:42:19 nite 19:42:25 'nn 19:42:53 --- quit: qFox ("this is mirc's last attempt of communication...") 19:48:35 --- join: crc (crc@0-1pool176-37.nas6.philadelphia1.pa.us.da.qwest.net) joined #forth 19:49:33 crc :) 19:49:43 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 19:50:18 the whole famdamly is here :) 19:51:08 cool 19:51:37 ? 19:59:04 --- quit: kc5tja ("Lost terminal") 20:04:42 --- join: kc5tja (~kc5tja@66-74-218-202.san.rr.com) joined #forth 20:04:51 --- mode: ChanServ set +o kc5tja 20:11:41 --- quit: _I440r_ ("Leaving") 20:21:13 hiya kc5tja 20:25:54 Greetings 20:33:51 --- nick: TheBlueWizard -> TBW-sleeping 20:42:54 --- join: cedricshock (~cedricsho@209-181-58-5.eugn.qwest.net) joined #forth 20:46:43 'nn all 20:46:45 --- quit: blockhead ("laugha while you can, monkey boy") 20:53:56 Well, I need to get going too. I have to work on a fake radio show again. 21:51:07 --- quit: tathi ("leaving") 22:17:13 --- join: solar_angel (~jenni@MTL-HSE-ppp169075.qc.sympatico.ca) joined #forth 22:56:37 --- join: fridge (~fridge@dsl-203-113-231-53.NSW.netspace.net.au) joined #forth 23:19:49 --- quit: solar_angel ("*gone*") 23:20:21 --- quit: Fractal (Read error: 101 (Network is unreachable)) 23:24:38 --- quit: crc ("Hacking...") 23:49:22 --- quit: Sonarman ("leaving") 23:59:59 --- log: ended forth/04.06.05