00:00:00 --- log: started forth/05.08.31 00:08:39 --- join: virsys (n=virsys@or-65-40-180-125.dyn.sprint-hsd.net) joined #forth 00:20:26 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 00:23:23 --- join: amca (n=plump@as-bri-3-28.ozonline.com.au) joined #forth 00:24:11 hi 00:24:50 Hello 00:25:19 how are you? 00:25:54 Not too bad 00:25:57 Yourself? 00:26:08 been coding most of the day 00:27:40 What have you been coding? 00:28:02 a new interpreter 00:28:56 Did you tell me about this earlier? 00:29:01 think so 00:29:18 I just got the macros to work 00:29:22 Sounds familiar. Then again it seems many are working on interpreters 00:29:33 Ah. that is right. I remember now 00:29:35 Cool 00:30:03 Was it difficult? 00:30:23 well I am writing it in C so no its not too hard. 00:30:44 ah 00:31:20 amca, to answer your earlier question, it depends. 00:32:31 I've been using DDD debugger. Its pretty good. 00:32:35 Quartus: So there is no convention, it is up to when the implementor decides? 00:32:46 ddd is a graphical gdb isnt it? 00:32:49 yes 00:33:02 I think I briefly looked at it once 00:33:23 its handy for running down stuff liked linked lists 00:33:35 amca, yes. Entirely up to the circumstance & situation. 00:34:11 Quartus: Are there any guidlines of what kind of situation what implementation to use or is it arbitrary? 00:34:20 snowrichard: Makes it easy does it? 00:34:28 If I don't need to take a copy of a string, I don't. It's a waste of time and space. 00:34:40 * amca nods 00:36:49 Lets say that the implementation alters the string in-place; which is the usual stack state: ( c-addr n -- c-addr n ) or (c-addr n -- ) ? 00:38:53 The stack diagram always reflects the before and after. 00:39:07 --- quit: snowrichard ("Leaving") 00:40:12 * amca nods 00:40:14 Probably more often than not, Forth words consume their arguments, but it's not hard and fast. Depends. 00:40:21 lol 00:40:22 ok 00:40:49 None of this is chiseled in stone. The freedom is yours as a developer to do what works best. 00:41:48 * amca nods 00:42:21 But if there are already established conventions, I would rather follow them where practical for readability/usability 00:42:36 Just saying why I ask all these types of Qs 00:43:20 You need to write some code. Write a string-modifying routine, use it. See if it works better for you if it consumes its arguments, or if it doesn't. See how the words you define fit together. Develop familiarity with the idioms of the language. 00:43:49 No matter how many questions you ask about swimming, you won't learn until you get in the water. 00:44:18 Currently Im doing that. 00:44:55 The only horribly-wrong way to write Forth is to avoid using the stack; everything else is varying degrees of 'right'. 00:45:05 Im starting with a filter forth utility, then Im going to convert it into one that alters a buffer instead of using stin/out 00:45:28 (stdin/out) 00:45:40 That's good. Simple stuff. 00:46:23 yep 00:46:42 I'm off for awhile. 00:46:48 Ill nopaste the code when Ive finished it to get advice from everyone 00:46:49 ok 00:46:50 enjoy 01:15:50 --- quit: amca (zelazny.freenode.net irc.freenode.net) 01:16:32 --- join: amca (n=plump@as-bri-3-28.ozonline.com.au) joined #forth 01:46:26 --- quit: virsys ("bah") 01:59:40 --- join: virsys (n=virsys@or-65-40-180-125.dyn.sprint-hsd.net) joined #forth 02:02:01 --- quit: amca (Read error: 113 (No route to host)) 02:38:06 --- quit: virsys ("bah") 02:38:50 --- quit: Amanita_Virosa ("Click click click.") 02:42:21 --- join: virsys (n=virsys@or-65-40-180-125.dyn.sprint-hsd.net) joined #forth 03:31:14 --- quit: OrngeTide ("zzzzZZZzzzZZzz z z z") 03:59:57 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 04:14:04 --- quit: snowrichard ("Leaving") 04:44:08 --- join: madgarden (n=madgarde@Kitchener-HSE-ppp3577151.sympatico.ca) joined #forth 04:55:52 --- join: I440r (n=I440r___@rrcs-24-242-160-169.sw.biz.rr.com) joined #forth 05:20:24 --- quit: Jim7J1AJH (Remote closed the connection) 05:38:28 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 06:03:38 mornin 06:04:28 hey 06:06:21 --- join: madwork (n=foo@derby.metrics.com) joined #forth 06:07:05 all these people 06:07:12 neat things happen when I get up in the morning 06:07:17 hehe 06:07:33 what time is it in your location? 06:07:41 7am here 06:07:42 9:08 06:07:56 I've been up since 4:30 06:08:01 ouch 06:08:17 well, I just couldn't sleep longer 06:08:55 I went to bed early, around 8 or so 06:09:47 heh 06:10:37 I decided to go on a regular sleep schedule for a month 06:10:49 good for you :) 06:10:55 it's a great idea 06:11:04 it's different being up, but not having anything I _have_ to do right now 06:11:44 yeah, it's really a cool experience 06:12:07 you can catch up on all sorts of unimportant things 06:12:37 I caught up on the dishes, e.g., and now the girls cook regular meals every so often 06:13:11 regular every so often... 06:13:13 hmmm 06:13:15 hehe 06:13:34 well, regular like make the entire family sit down and eat at the same time 06:13:46 ahh 06:13:54 I like those 06:14:24 tomorrow I'm moving into a household that does that 06:14:30 neat 06:14:50 yeah 06:15:05 there's 5 of us and we take turns cooking dinner for everybody during the work week 06:16:44 that sounds like a good idea 06:17:16 we try to assign particular jobs to people, and they sometimes forget 06:18:03 rotating the jobs might actually be better once we got used to it 06:18:33 nah 06:18:35 keep it simple 06:19:35 --- join: PoppaVic (n=pete@0-2pool198-70.nas30.chicago4.il.us.da.qwest.net) joined #forth 06:19:58 Mornin' 06:20:03 hi poppavic 06:20:11 how goesit? 06:20:16 pretty good 06:20:59 just drinking coffee and reading some LPI exam prep materials 06:21:06 lpi? 06:21:11 (lines per inch) 06:21:14 I think I'm adjusting to the new schedule. I had dreams this morning 06:21:39 hehe lpi.org - linux professionals institute 06:22:05 ahh 06:22:07 cool, I get more vivid dreams when I wake up earlier 06:22:10 of course the one I remember was me being late for a class in junior high... 06:22:49 yeah, they often involve angst over silly things for me 06:23:37 probably because I'm worried about sleeping through the allarm 06:23:40 one time I was being threatened by a goose, which was somehow symbolic of badly written code or something like that 06:23:51 I keep waking up at 7:27 06:24:01 lol 06:24:19 the demonic alien ducks are the worst though :P 06:25:38 they look normal and stupid on the outside, but on the inside they're plotting to murder you or something 06:25:53 heh 06:27:16 and so it goes. my dreams usually have very little plot. I'm amazed by people who can recall a half-hour's worth of narrative from a single dream. 06:27:40 yea 06:27:54 apparently there are techniques to get so you remember more of your dreams 06:28:22 yeah, I dream lucidly sometimes. but they still don't make enough sense to remember, seems like 06:28:44 --- join: YoyoFreeBSD_ (n=yoyofree@219.145.81.135) joined #forth 06:28:58 or anyway I'm not sure I'd want to remember most dreams 06:29:38 crap, I don't have any boxes 06:29:56 yeah, exactly, I'm not going to use those techniques 06:31:22 although they can be funny in retrospect. once you've awakened from thinking you're gonna die 06:33:08 oh, I don't have really scary dreams anymore 06:33:18 got rid of them in highschool 06:33:40 yeah. me neither, usually. 06:34:00 I just get nervous, embarrasing, weird... 06:34:12 yeah those ones 06:35:37 what's bad is when someone remembers one of those and feels compelled to tell it 06:36:51 yeah 06:37:05 hehe 06:37:10 it's tempting 06:37:24 weirdest thing that's happened to me, was while I was asleep 06:37:53 been sometimes having dreems with weird sexual undertones 06:38:37 last night my sexual orientation didn't seem to agree with my waking life 06:39:29 didn't have sexual undertones, but I did seem to be walking around with my "boyfriend' 06:39:43 TMI 06:41:08 sorry 06:41:36 the dream was mostly about boing threatened by the jackasses in the hall 06:44:30 oh dear. been watching too many of the fine products of the modern movie industry, maybe? :P 06:48:39 grr...why can I never remember that '=' is the command to re-indent in vim? 06:48:41 nah, not much 06:48:42 morning all 06:48:48 good morning 06:48:54 tathi: it is? 06:48:59 * JasonWoof tries 06:49:20 well, if you're in insert mode you can use Ctrl-E or Ctrl-F or something. 06:49:26 hi tathi 06:49:51 actually, = is just for general filtering -- you can use an external program. 06:50:01 but by default it uses the internal cindent stuff 06:50:42 kickass 06:50:43 Hi PoppaVic, how goes it? 06:51:11 But I always seem to forget it between uses and have to spend 5 minutes searching through the help. 06:51:13 so'k - beating that header you don't really want ;-) 06:52:13 I didn't know it could do that... 06:52:28 I usually do it by hand 06:52:57 unindent the whole thing, then I 06:53:11 then go through the lines hitting . for each indent it should have 06:54:16 PoppaVic: sorry, didn't intend to come across like I was looking for help :) 06:54:26 I was just talking about it 'cause you were curious. 06:54:45 nah, you never did - but it LOOKED like a car-wreak in progress ;-) 06:55:05 yah, talking it over is always fun 06:55:50 true -- if I were intending to make it more complex I'd clean up my act. 06:56:20 I'm just tinkering on the neatening But, at least Isorta' see where yer coming from now. 07:04:49 --- join: sproingie (i=foobar@64-121-15-14.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #forth 07:05:27 http://rafb.net/paste/results/CTBRwd93.html 07:06:00 tathi: Looking at the above, fovm_, would syscalls be better as global? unlike the vm? 07:08:33 well, unless you're planning to run several copies which are slightly different, both ops[] and sys[] would be the same for all copies. 07:08:46 * sproingie is looking at the union and not sure why there's a divergence between bval and cval. when was the last time you wanted signed characters? 07:08:49 yeah, just trying to Plan Ahead 07:09:17 sproingie: I threw it in as a convenience, it beats casts all over the universe 07:10:12 sproingie: imagine using something shorter than short - like 6-bit opcodes (or 8-bit) 07:10:24 i suppoe 07:10:26 suppose 07:10:34 they could be pointers instead of arrays -- then you could make a different VM if you wanted, but would save the space of having a copy for each. 07:10:38 well, I don't see the harm - maybeeven has value 07:10:45 unions basically are casts, they're just a way of putting them in one place 07:10:52 righto 07:11:01 tathi: the syscalls? Yeah 07:11:29 --- join: virl (n=hmpf@chello062178085149.1.12.vie.surfer.at) joined #forth 07:12:09 Yeah, I'm cogotating that a vm like this - and pulling the syscalls global/out might be useful for a wide variety of things. 07:12:19 cogo/cogi 07:13:39 yeah i'd definitely make the opcode map a pointer 07:13:42 8: C= * 1, S= * 2, I= * 4, L= * 4, F= *4, D= * 8 07:13:42 CELL=4; DCELL=8; FOVM=316 07:14:12 as for the reserved areas, unless you're aiming at binary compatibility, you probably don't need 'em 07:14:14 sproingie: hmm... Externalizing it like that.. hmm. 07:14:25 sproingie: oh, indeed portable. 07:15:45 ahh, doing to ptr drops us to... CELL=4; DCELL=8; FOVM=64 07:15:50 That's sorta' nice 07:16:12 that's probably as small as you need to get for a whole vm struct 07:16:20 yeah. 07:17:59 * sproingie is learning what a lousy book Teach Yourself Scheme in Fixnum Days really is 07:18:06 hehe 07:18:12 anything in N days sucks 07:18:31 yeah but it doesn't even do good in that capacity 07:18:38 gah, calogn 07:18:38 N^N is the truth... 07:19:05 i didn't expect it to teach a lot of theory, i expected it to demonstrate scheme to someone who knows some programming already 07:19:24 it covers macros, but not hygenic macros 07:19:29 heh 07:19:48 it uses this hacked up defstruct macro to do OOP, not a lick of static scoping in it 07:20:08 it starts with a pretty good treatment of call/cc 07:20:30 then abandons it and dives straight into using them for generators with barely any explanation 07:20:47 call/cc being getting in & out of C? 07:21:04 no, it's an abbreviation for call-with-current-continuation 07:21:13 it's sort of a functional GOTO 07:21:27 oh, ugh - yeah - continuation debates rage in ##C with lispers 07:22:24 escape continuations are pretty easy to do in C using setjmp/longjmp 07:22:42 PoppaVic: are you trying to solve problems that don't exist again? 07:22:57 and the *context stuff on solaris and linux can do more or less real continuations 07:23:28 JasonWoof: whahuh? 07:23:42 but continuations aren't generally accepted C idioms. too bad. 07:23:44 I've never liked the setjmpmess 07:23:50 still catching up on the backlog here, but it looks like you're generalizing fovium 07:23:57 yeppers 07:24:04 for what purpose? 07:24:29 For entertainment. The ideas are interesting, and I may be able to use it. 07:24:31 setjmp is pretty nice for structured exceptions. takes a screen of code to add try/except/finally to C using them 07:25:35 the *context ops are much nicer in general tho 07:25:49 yah 07:26:17 funny to see FOVM=64 [bytes] 07:26:42 don't forget about the 8K for stacks, and 1MB memory space 07:27:03 see res2 and RES2 07:30:29 I can actually see a way to save a CELL for another use, too... 07:30:53 RS[ -> ....... <- ]DS 07:31:26 or, more neatly: RS[ -> ...(mmap)... <- ]DS 07:37:46 hehe.. FOVM=60 07:38:27 ..and it added: LINK *shead; /* Internal, Sighandler:dynamic */ 07:38:32 * PoppaVic chortles 07:39:30 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 07:41:59 --- quit: ayrnieu (Connection timed out) 07:42:15 how many vms you planning on running at once? 07:42:32 nooo idea. 07:42:32 this seems an odd place to shave bytes 07:42:53 your structs are probably going to get padded to an 8-byte boundary anyway 07:42:55 I may end up with engines running engines 07:43:06 and, of course, threads are nice. 07:43:40 padding is a non-issue and an internal/compiler issue 07:45:54 mind you, "signals" are a slippery term - and I may use 'exceptions' instead. 07:47:30 signal has a pretty well defined meaning on unix 07:47:53 sure, and also on cpu's - and never the twain will meet ;-) 07:48:12 in days of yore they were the same 07:48:36 the signal numbers corresponded to the signal lines on the pdp-7 07:48:45 or pdp-11, can never remember which 07:48:46 sproingie: remember... I am also pretty sure we need a "synthetic-assembler", and I may be outlining several projects at once here. 07:49:14 sproingie: maskable, non-maskable, and "user" (which are often stolen before you get there) 07:49:55 anyway, yeah.. signals have bugged me for a long time - and I really hate exceptions. However, the latter WITHIN a vm make some sense to me 07:50:30 exceptions arent so bad, when used for actually exceptional things 07:50:35 java abuses the crap out of them 07:51:02 I think their advocates often misunderstand them, and they can't envision writing decent code. 07:51:18 me i need some kind of throw/catch in retroforth for one of my bits of code 07:51:27 forthers using them, and recalling interactive PLUS compiled - I can live with 07:51:48 namely a utf8 encoder/decoder. can't really deal adequately with malformed data any other way 07:51:56 sure, because yer an engine or syncpu-emulator 07:53:00 I never liked the way C and *nix managed to offer like 2 USR sigs, but wasn't smart enough to do the equiv of onexit 07:53:11 er, atexit 07:53:37 atexit is part of posix 07:53:49 sure - and I used it long before posix 07:54:02 CONFORMING TO 07:54:04 SVID 3, BSD 4.3, ISO 9899, POSIX 1003.1-2001 07:54:07 the idea was there long ago 07:54:09 been around a while 07:57:27 http://rafb.net/paste/results/y4Frff42.html 07:57:40 hmm, FOVM=68 07:57:57 well, I can still live with it (even it ain't a power of 2 ;-) 08:01:37 --- join: Raystm2 (n=Raystm2@adsl-68-95-254-73.dsl.rcsntx.swbell.net) joined #forth 08:04:07 --- nick: Raystm2 -> nanstm 08:06:20 --- quit: snowrichard ("Leaving") 08:26:05 --- quit: Quartus (Remote closed the connection) 08:29:33 --- join: Quartus (n=trailer@ansuz.pair.com) joined #forth 08:38:47 hmm 08:39:14 lol some script kiddie has been runing a script trying to log into my box for the past 2 hours. i just ping flooded the asshole off the net lol 08:39:33 my log was full of crap 08:39:35 Aug 31 11:38:58 localhost IN=eth0 OUT= MAC=00:0e:a6:92:a5:ec:00:02:fd:d8:78:8c:08:00 SRC=128.233.94.199 DST=24.242.160.169 LEN=60 TOS=0x00 PREC=0x00 TTL=43 ID=14486 DF PROTO=TCP SPT=46204 DPT=22 WINDOW=5840 RES=0x00 SYN URGP=0 08:39:35 I never found flooding to work. 08:39:39 over and over and over again 08:39:51 ping -s 65507 -f xxx.xxx.xxx.xxx 08:40:09 what size pipe do you have 08:40:26 no idea. It just lies there nice and friendly 08:40:27 i have two megabits up and down. im sure the skript kiddie didnt have anything to match that 08:40:55 for the past two hours ive been having logs like the above display once every second 08:41:02 every second a new log identical to the above 08:41:12 nothing after 30 seconds of ping flood :P 08:41:24 I'm cogitating... Can anyone think of a reason to NOT support an (argc/argv/envp) setup for a vm? 08:42:35 ..those 3 as var/const in the vm, I mean 08:44:50 yeah 08:44:55 what's the API? 08:45:00 exactly 08:45:57 I'm wondering if an execute_vm(...) [C'ish or equiv in asm] might benefit 08:46:18 probably a good idea to make that possible 08:46:23 probably through a syscall 08:46:39 seems like they'd be akin to thread-safe errno, yes? 08:46:39 after about 2 years of herkforth development I made access to the argv 08:46:57 well, actually, I got access to argv[0] a long time ago 08:47:02 sure 08:47:14 sorry, I don't see a connection to errno 08:47:20 we all do, but dropping INTO an engine... I think it might make sense 08:47:56 JasonWoof: all I can think of is... Engines (vm) might run engines and trying to set them up. 08:48:27 Not sure the idea is valid, but it adds a dimension. 08:49:28 don't follow 08:49:52 sorta' supporting execute_vm(int argc, char **argv, char **envp) ala' exec*() calls 08:50:05 yeah, I got that part. sounds useful 08:50:15 nice for writing unix programs 08:50:24 ok, I'll add some support for it then 08:50:39 and with some OSes anyway, it's nice to be able to pass boot args 08:50:48 yeah 08:51:03 and ignore shit WE don't handle, but the "program" might 08:51:05 I won't use it for months... so no pressure ;) 08:51:27 I think it'll be a while before I get herkforth ported 08:52:03 np, this is almost looking like we can even fake a "synthetic CPU" and associated assembler, at this point 08:53:32 almost? 08:53:37 heh 08:53:53 it's a virtual machine... mostly consisting of a synthetic CPU 08:54:01 and some other stuff like stacks 08:54:07 well, a synthetic assembler would prolly add more "registers" and alter opcodes 08:54:24 what's a synthetic assembler? 08:55:05 JasonWoof: synthetic CPU emulation, and opcode support. 08:55:43 oh! glad I asked. not even close to my guess. you mean basically the VM implementation/emulator 08:55:52 iow: not matching any ONE cpu or assembler, but being portable with judicious opcode/mem-vars 08:55:56 yes 08:56:02 lower than forth is all 08:57:16 it's - near as I can tell - lower than forth and C, but heads into the whole lib/plugin, host/target, vm/asm|C paradigm 08:58:04 SOURCE would be consistent or extensions, but the underlying asm/compile COULD vary 08:59:12 you "compile" for local/host; your pcode could be "host/asm"; and the source is consistent 08:59:43 It seems to depend a lot on the engine and expectations 09:00:06 hmm.. host/target 09:00:59 in the case of Forth[ish] we write "portable", and compile whatever 09:01:13 all we EVER cared about is access 09:01:43 I admit freely: it's not remotely easily communicated 09:02:07 but, java and such do it (ugly), I dunno why we can't 09:03:36 it is similar to the java appreach 09:03:39 approach 09:03:43 but simpler 09:03:54 and of course tailored to what we like to do 09:04:17 java has interpreters that compile to native code, and (so I hear) run pretty quickly once they get going 09:04:18 right 09:04:32 java takes forever to get going though 09:04:40 but I'd never trust java (I try to ignore it) 09:05:04 I LIKE the engine/opcodes sorta' FOVM idea 09:05:48 our vm is so small, I could include the interpreter pre-compiled for several architectures/OSes along with herkforth 09:06:22 It prolly should be source-in-tarball, plus pcode - sure. 09:07:45 anyway, here... 09:07:54 what's pcode? 09:08:11 http://rafb.net/paste/results/gkdyP449.html 09:08:35 pcode once meant "pascal code" - I use it as a generic 'interpret-me' term. 09:09:08 Life is source, intermediate/pcode, native-code 09:09:50 ok 09:09:59 pcode is a compacted "source", native-code is always going to be the optimized end of the spectrum 09:10:55 As usual when talking about source and C, I hate to "preoptimize" too much. Readability is better. 09:11:46 Going from pcode, my feeling is you SHOULD be able to regenerate "source" and prolly compile BETTER nativecode. 09:13:14 On the whole, pcode should be just this side of "native" - and maybe contain enough info to regenerate source, while certainly being nearly as portable - and smaller - than source. 09:13:52 I'd say "icode", but folks never understand that either. 09:15:22 Because of all the above, I've called a hiatus on attending #asm. personally, I feel forth-implementors have a better grasp of the issues. 09:16:53 hmm.. To be honest, offhand: all I can think of is indirect and call-threaded forth. I know there is another level (or two). Been sooo many years. 09:17:30 is it "direct, call, indirect"? 09:18:02 oh, shit.. lemme' recycle the ISP... 09:18:04 --- quit: PoppaVic ("Pulls the pin...") 09:20:32 --- join: PoppaVic (n=pete@0-1pool47-239.nas30.chicago4.il.us.da.qwest.net) joined #forth 09:21:03 3 hour cycles, usually 09:21:11 Anyway... Where were we? 09:26:12 --- join: snowrichard (n=richard@adsl-69-155-177-154.dsl.lgvwtx.swbell.net) joined #forth 09:26:35 --- join: ayrnieu (n=julian@ip68-13-110-105.om.om.cox.net) joined #forth 09:27:55 --- quit: snowrichard (Client Quit) 10:25:57 hmm? 10:30:06 damn.. I just a Cheech&Chong "Oh, WOW Man..." moment... 10:32:43 You know the lovely thing? Forth is so fucked-up we really lack some half-ass, semi-calcified semantic. 10:36:24 PoppaVic: that a bad thing? 10:36:52 Not sure... Still thinking generic/engines-over-engines 10:37:05 enjoy 10:37:30 the brainfart suggests parsing/literals options. 10:38:03 mind you: I still think text/ascii and "how would I write this in C?" ;-) 10:59:56 --- quit: PoppaVic ("Pulls the pin...") 11:00:22 --- join: derv0 (n=derv0@proxy1.nscl.msu.edu) joined #forth 11:13:07 --- part: derv0 left #forth 11:14:07 --- join: derv0 (n=derv0@proxy1.nscl.msu.edu) joined #forth 11:52:09 hi drv0 11:52:16 derv0 that is 11:53:28 hey JasonWoof. what's up? 11:55:43 woh, power just went out and flickered a bunch 11:55:54 I'm packing 11:56:40 hope it comes back on soon 11:56:45 might have to shut down 11:56:50 UPS doesn't last that long 11:57:51 I'd get a lot more packing done though :) 11:58:12 whew 11:58:17 firetruck went right by 11:58:48 ok, I'm outa here until the power comes back 11:59:04 --- quit: JasonWoof ("Can't do it captain! I don't have the power") 13:33:15 --- join: snoopy_16 (i=snoopy_1@dsl-084-058-166-149.arcor-ip.net) joined #forth 13:43:24 --- quit: Snoopy42 (Read error: 104 (Connection reset by peer)) 13:43:44 --- nick: snoopy_16 -> Snoopy42 14:01:22 --- quit: derv0 ("Client exiting") 14:12:10 --- quit: saon_ ("Lost terminal") 15:05:01 --- join: JasonWoof (n=jason@pdpc/supporter/student/Herkamire) joined #forth 15:05:01 --- mode: ChanServ set +o JasonWoof 16:40:49 --- nick: skylan_ -> skylan 16:45:30 --- mode: ChanServ set +o crc 16:45:50 --- mode: crc set -b *!*@boa.b9.com 16:46:54 --- nick: nanstm -> Raystm2 16:49:42 --- quit: virsys (Read error: 54 (Connection reset by peer)) 16:51:43 --- quit: tathi ("leaving") 17:17:49 Get all. 17:17:53 Whoops. 17:17:54 hey all. :) 17:20:10 all acquired. whoops: unknown command. greeting (informal) directed to all. 17:20:20 ok 17:20:30 No, something like "You can't carry all. " 17:22:08 17:22:37 ok 17:25:05 hi everyone 17:25:55 I don't see anything named 'everyone'. 17:26:23 defer everyone 17:27:17 I don't see anything named 'everyone'. 17:36:52 Anything going on? 17:41:46 * crc is just cleaning up source code 17:49:49 --- quit: YoyoFreeBSD_ (Read error: 110 (Connection timed out)) 18:05:04 --- join: itrebal (n=itrebal@adsl-210-59-101.mco.bellsouth.net) joined #forth 18:05:20 --- join: gustavderdrache (n=gustav@nat-89.sr.resnet.unca.edu) joined #forth 18:06:14 --- part: itrebal left #forth 18:06:39 --- part: gustavderdrache left #forth 18:15:56 --- join: saon_ (i=1000@c-66-177-224-235.hsd1.fl.comcast.net) joined #forth 18:18:39 Hello 18:25:45 goodnight 18:25:55 night! 18:47:02 --- quit: ayrnieu (Nick collision from services.) 19:19:50 --- quit: saon_ ("Lost terminal") 19:21:44 --- join: saon_ (i=1000@c-66-177-224-235.hsd1.fl.comcast.net) joined #forth 19:43:38 --- join: amca (n=plump@as-bri-4-1-63.ozonline.com.au) joined #forth 19:57:31 Any revelations to day, amca? 19:57:51 No, but I had one yesterday 19:58:02 Oh? 19:58:16 Ive done a lot of reading about Forth, but I need to do a lot more coding to get my memoryt model of the stck up to scratch. 19:58:25 Or maybe Im just not factorising enough 19:58:42 I find I lose track of what is happening in the stack after a few items 19:58:42 You'll love my response. The stack does not necessarily have a memory model; it may not be implemented as an addressable array on some systems. :) 19:59:10 No, I meant model of the stack in my brains memory :) 19:59:23 hehe 19:59:38 If forgot computers have memory too. ;) 20:00:17 Ah ok. 20:00:45 Well, you should rarely have to deal with more than four items on the stack at one time. 1, 2, or 3 is the norm. If you have more, then you need to factor further. 20:01:29 * amca nods 20:01:59 So when you've mastered dup, drop, swap, rot, over, and 2swap, you're pretty much set. 20:02:09 * amca nods 20:02:30 There may be more items than that on the stack at one time, depending on what's calling what, but the ones you care about are the ones that the current factored word is dealing with. 20:03:04 Im tempted to use variables as local variables instead of using the stack - I have to get used to it more. :) 20:03:23 There's an exception to this when it comes to dealing with god-awful OS routines (there's one in the Palm OS that takes 13 parameters, for instance). Gets trickier then; it's about the only time I recommend locals. 20:03:37 for some reason my mind seems to read other ppls code and keep track better than when Im coding and trying to keep track 20:03:44 O_O 20:03:45 ouch 20:03:48 It gets better with practice. 20:04:01 * amca nods 20:04:08 Which is why I need to code more :) 20:04:17 Here's a factor I just wrote: : power-of-2? ( u -- bool ) dup 1- and 0<> ; 20:05:01 --- join: crc2 (i=crc@pool-70-110-194-247.phil.east.verizon.net) joined #forth 20:05:02 --- quit: crc (Read error: 104 (Connection reset by peer)) 20:06:17 Im just nopasting my code now... 20:06:28 http://www.rafb.net/paste/results/VuQyU323.html 20:07:27 The filter function I had no trouble with, but the one that takes the stack as input is where Ive had the trouble 20:07:32 There's something wrong with that factor, in fact. 20:07:53 What is it? 20:08:08 Can you see it? 20:08:35 yep 20:08:36 What's !current-char in your code? 20:08:52 no actually 20:09:12 And you appear to not be terminating your conditional structure. 20:09:31 It is a work in progress 20:10:14 Ah. 20:10:53 I was just making sure what I had written is using the stack properly :) 20:11:04 I havent started filling out the else yet 20:11:11 It's prudent to put a stack diagram on every line, while you're learning. 20:11:32 I was gonna ask actually if that would be a good adea ) 20:12:15 it takes in the c-addr, new char and char-offset, and puts the new char in the string. ( c-addr new-char char-offset -- ) 20:12:45 Actually, now I think of it, I should make it ( c-addr char-offset new-char -- ) 20:13:03 Do you htink that would be better? 20:13:17 Generally words that store things use a ( what where -- ) ordering. 20:14:10 so more ( new-char c-addr char-offset -- )? 20:14:18 Right. 20:14:27 Thanks. :) 20:14:29 That word should be very very short. 20:15:36 yeah, it is gonna be something like "+ !" 20:15:44 In fact -- chars + ! 20:15:49 sorry. chars + c! 20:15:53 (late for me) 20:16:07 oops! yes :) 20:16:57 I had tried to write that all "inlines", but it was just confusing me, so I started topdown design in comments and converted them into the fnctions/words 20:17:12 Inlines? 20:17:34 As in written in verbatim, instead of factoring it 20:18:10 Factor factor factor. Some things are idioms and as you develop experience, you'll read them as idioms and not need to necessarily factor them, but for now factor like mad. 20:18:19 * amca nods 20:18:48 --- join: virsys (n=virsys@or-65-40-180-29.dyn.sprint-hsd.net) joined #forth 20:19:00 When I do top-down design I do that automatically, but when I sit down and code I tend to get causght up in details, which is why I prefer to do my design on pen &paper 20:19:41 I should know better by now - I did structured design at uni. :) 20:19:57 Too much bad influence reading about the hacker culture. :) 20:20:16 maybe! For now factor everything, try to get all definitions down to one or two lines. 20:20:23 * amca nods 20:22:54 With what I have done in the definition so far, can you see where I could have factored it even more? 20:23:43 Yes. What you've written is a multi-case conditional that would have to be manually maintained to add new cases. A translation like this would be better handled by a lookup table. 20:23:58 --- quit: sproingie (Remote closed the connection) 20:25:00 There are only 3 conditions in it: old-flush, new-flush, every other character. Should I bother with a lookup table for just 2 chars? 20:25:24 --- quit: Quartus (Remote closed the connection) 20:26:35 --- join: Quartus (n=trailer@ansuz.pair.com) joined #forth 20:26:43 sorry, missed whatever you said after I mentioned the lookup table. 20:26:51 sokay 20:26:55 There are only 3 conditions in it: old-flush, new-flush, every other character. Should I bother with a lookup table for just 2 chars? 20:27:28 If you think this will only ever translate two characters, then it's a throwaway and it matters very little how you code it. 20:27:39 --- join: OrngeTide (i=orange@rm-f.net) joined #forth 20:28:59 * amca nods. Its only purpose is to translate the old False program characters into the new False program characters, so it is like a specific utility function. 20:29:37 A useful exercise would be to write a general-purpose table-driven translator, with words to easily describe the translation. 20:29:48 Ah. Yes, I see. 20:29:59 That could have a lot of uses. 20:30:08 Dont program apps, program tools that you put together to make apps 20:30:46 I could use one that translated IBM codepage 866 to Windows codepage 1251, if you're feeling in the mood to try. 20:31:17 where can I get the definitiojn for those code pages? 20:31:32 What, you students want everything handed to you? :) 20:31:45 Only cause we cant be bothered googling :) 20:32:39 what I am going to do is implement my current function with if-else-then, and then implement it with a table lookup 20:32:48 Hmmm 20:32:51 One problem 20:32:55 Ah, fixed it 20:33:24 A table should return 2 values shouldnt it: the data, and an error code? 20:33:45 Ok. Nested conditionals are not especially Forth-like. I'm not the shining star in that area, I use them when I have as many as six alternatives, and I've even been known to use case/of/endof without blushing. 20:33:55 amca, I don't follow. 20:34:43 A table is a region of memory structured to hold data. 20:34:52 Table as in lookup table 20:35:08 Sorry, I was referring to the lookup word/function 20:35:18 not the actual data structure 20:35:27 I tend to think OO 20:35:35 Suppose your table has 256 entries. The lookup words finds the one you ask for. It can't fail to return a value. 20:36:10 But say only 128 of 156 possible values need translation? 20:36:31 Set the others equal. 20:36:50 Or leave them null and assume the equality. I prefer pre-initializing the table. 20:37:29 I feel bad about having a table that large and wasting half the space. 20:37:50 256 characters is a pretty small table, unless you're writing code for a hand-calculator in 1976. 20:37:57 True 20:39:07 But I like mentally expand it in my head and think something like "okay, what if I have 1M possible values, and only 1K of them need translating". In a generic table lookup util, wouldnt be better to not require 1M cells being alloted? 20:39:51 You can think astronomical thoughts, but I can't think of an application that fits anything close to those numbers. In that case, though, I'd use a different data structure to represent the required translations. 20:40:21 As in a sparse linked list or such? 20:40:23 I see 20:40:36 Maybe, depends on how fast I need to perform the operation. 20:41:21 Cool. Thanks for that advice. Yoiu have given something for me to think about now :) 20:41:39 * amca google for some code pages 20:41:40 Ok :) 20:43:34 RUssian codepage eh? 20:43:40 Both of them. 20:44:22 * amca nods 20:44:31 Windows one being the windows mapping 20:44:48 Coicidentally, yes. :) 20:46:23 hehe. Okay, that was s tupid statement. "So have you noticed that white is white?" 20:47:22 Heh. 20:49:30 are http://www.kostis.net/charsets/trans130.htm and http://www.kostis.net/charsets/cp1251.htm accurate references from what you can see? 20:51:12 --- join: sproingie (i=foobar@64-121-15-14.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #forth 20:54:50 erm - you dont happen to have a pre-setup translation string or such for the table do you? 20:59:21 --- join: aum (n=aum@60-234-156-82.bitstream.orcon.net.nz) joined #forth 20:59:50 Sorry, I was off looking at something. The codepages look ok I think. 21:00:01 No, I don't have the table pre-initialized here. 21:01:09 ah well. By hand it will have to be then 21:01:26 Such a table may already exist out there. 21:02:16 With those code pages, the 4th column just says "code". Do you know if it refers to the unicode equivalent? 21:03:12 No, it's not unicode -- in this case it's the character code. 21:03:31 character code? 21:03:39 in what coding system? 21:03:53 well hang on, I take that back. Maybe it is a unicode encoding. It's not of any particular use to me presently, regardless. 21:04:06 ok 21:06:03 What would you think of a system that uses unicode as "lingua franca" and translates from either code page to unicode brfore translating to another? That way if other codepages are added, then it makes less combiations of codepage translations? 21:06:25 I'm not sure that it does make less combinations. 21:06:53 well say you have four different codepages you want to translate between 21:06:58 It would give you unicode translation as a bonus, however. 21:07:48 That makes 8 different translation tables to and from unicode, but if you just have the translations between each of them it is something like 4! isnt it? 21:08:16 It is if you have them all established simultaneously, yes. 21:08:23 * amca nods 21:08:28 thats what I meant 21:08:48 You don't need to maintain them all, however. You'll be converting from one codepage to another, in one direction at a time. 21:09:15 On the other hand, would having the unicode translation add too much "bulk" to your implementation? 21:09:36 It does seem a bit over the top for an exercise, but if it interests you, go for it. 21:10:07 Well whether I actually get to finish any of this is another Q :) 21:10:44 Got to finish. Be a closer. Always Be Closing. 21:10:57 huh? 21:11:49 Line from a movie. :) 21:11:56 Sounds familiar 21:12:16 As in only ever work on one thing at a time and finish it before moving on? 21:12:32 (Im only capable of doing one thing at a time) 21:12:51 Well, it applies more to work ethic. 21:13:00 * amca nods 21:13:19 Well I am truying to increase my self discipline - I have trouble with it. 21:13:32 So it probably would be a good line to keep in mind 21:14:23 Talking about finishing things that you start, I better finish my housework. 21:14:37 Ok. 21:14:52 Thanks for the chat. I shall catch you later (hopefully with the if-else-then code at least finished. 21:14:54 Cya 21:14:59 --- quit: amca ("d34d") 21:27:58 --- join: LOOP-HOG (n=chatzill@sub22-119.member.dsl-only.net) joined #forth 21:32:53 hi 21:44:28 Hi. 21:44:50 --- join: YoyoFreeBSD_ (n=yoyofree@219.145.81.64) joined #forth 21:48:48 hello again 21:56:52 hi LOOP-HOG :) 21:57:06 :^) 21:57:13 hehe 22:01:26 --- quit: JasonWoof ("off to bed") 22:21:50 --- quit: sproingie (Remote closed the connection) 22:55:24 --- join: amca (n=plump@as-bri-4-1-234.ozonline.com.au) joined #forth 22:55:52 Hello 23:00:15 hi 23:01:49 How are you today? 23:30:18 --- quit: aum () 23:55:46 Anyone here know about return stack operations in gforth? 23:59:59 --- log: ended forth/05.08.31