00:00:00 --- log: started forth/01.10.11 03:24:05 --- quit: clog (Ping timeout) 03:24:05 --- log: stopped forth/01.10.11 03:24:25 --- log: started forth/01.10.11 03:24:25 --- join: clog (nef@bespin.org) joined #forth 03:24:25 --- names: list (@clog) 03:24:25 --- mode: ChanServ set mode: +nt 03:24:25 --- topic: set to '' by ChanServ 03:24:25 --- mode: ChanServ set mode: -o clog 08:06:06 --- topic: set to '' by ChanServ 09:13:05 --- join: edrx (edrx@copacabana-ttyS10.inx.com.br) joined #forth 09:36:56 --- quit: edrx ([x]chat) 10:29:25 --- join: Speuler (akhandel@avocado.icafe.spacenet.de) joined #forth 10:29:32 --- part: Speuler left #forth 12:40:09 --- join: MrReach (mrreach@209.181.43.190) joined #forth 13:43:47 --- quit: MrReach () 14:25:19 --- join: futhin (thin@h24-66-209-114.cg.shawcable.net) joined #forth 14:39:26 --- join: MrReach (mrreach@209.181.43.190) joined #forth 14:39:29 hihi 14:47:15 I'm gonna drive out to the lake 14:47:28 be back in about 1.5 hrs 14:47:39 it's now 14:47 PDT 14:49:20 heya 14:49:38 what's at the lake? :) 14:50:01 a quiet place 14:50:09 I want ot get out of the house for a bit 14:52:27 --- nick: MrReach -> MrAway 18:32:43 --- nick: MrAway -> MrReach 18:32:51 well ... that didn't work for shit 18:33:03 I had a blowout 18:33:17 I had a spare, but no jack or lugwrench 18:33:46 waited for wifey to get off work, called her, she could find the 3 ton floor jack, but not the star wrench 18:34:22 so she came and picked me up, took me back to the house, searched the shop, the storage areas, the big truck, the camper .... 18:34:35 finally found the star wrench in the back of her pickup. 18:34:51 I'm home now, doesn't look like I'll make it to the lake at all 18:35:51 figured out a rather elegant way to do timer callbacks in Win32Forth during the 2 hours I was waiting, though 18:37:37 holy cow 18:37:44 heh 18:37:49 at least you got something out of it 18:37:56 i was wondering why you were taking so long to get back heh 18:38:06 heh, I could have done THAT either here or at the lake 18:38:14 heh 18:38:22 glad I wasn't driving to Seattle or Portland, though 18:40:29 so did you get the relaxation you wanted? :) 18:40:36 it'd be pretty annoying to me 18:41:00 no, I was sitting in one of the busiest intersections in town 18:41:24 I'm going to ask I440r to join us, I want to ask him and you about an interface issue 18:41:34 ah cool 18:41:50 he's not on icq, how are you talking to him/ 18:41:58 er 18:42:01 he's on my icq 18:42:08 as "momentarily away" 18:42:09 ah, he's not on mine 18:42:25 you sent me some "bongo" one which was invalid at the time..? 18:42:41 no, that's Speuler 18:42:55 also, the owner of the irritating bot 18:43:09 could you send me i440r's contact to me on icq? :) 18:44:52 thanks 18:45:32 hmm.. weird 18:45:54 the icq is taking a long time to send my message to him.. 18:46:03 ah he's offline? bah 18:47:07 --- join: I440r (mark4@A010-0105.BLMG.splitrock.net) joined #forth 18:47:16 the icq server is WAY lagged 18:47:29 ya 18:47:31 probably ecause they were trying to "improve" it 18:47:36 and the client is way buggy 18:47:58 ok, I wanted your feedback on an API 18:48:05 sure 18:48:25 the concept is about OS driven timers in forth 18:48:50 ok 18:48:51 where a supplied XT is called after a specific time has elapsed 18:49:00 futhin: you following? 18:49:03 ok 18:49:04 yes 18:49:11 heh 18:49:13 elapsed time vectors to specific word' 18:49:24 as an interrupt ? 18:49:35 I had originally figured two words, TIMER and END-TIMER 18:50:03 i'm here.. 18:50:07 but following? heh 18:50:12 hmmmm 18:50:13 well 18:50:17 timer would be ( x xt u-interval -- hdl ) 18:50:24 there creating a timer shouldnt automatically enable it 18:50:41 that was something that occured to me also, later 18:50:45 so you would need a timer enable and timer disable 18:51:11 TIMER would cause xt to be called every u-interval milliseconds with x on TOS 18:51:31 the handle is to hand to END-TIMER to shut it off 18:51:35 only if that particular timer was enabled tho 18:51:39 i got it! 18:51:45 you could have 2 vocabularies 18:51:49 one for enabled timers 18:51:53 one for disabled timers 18:52:03 creating a timer links it to the disabled voc 18:52:14 enabling it relinks it to the other voc 18:52:33 you would need a master heartbeat 18:52:33 I'm asking you guys, because I want something versatile enough to port to most of the forth on "big" platforms 18:53:01 well i don't know anything :) 18:53:06 and every TICK of the heartbeat you execute every word in the enabled dictionary whose interval has expired 18:53:15 ok, most major platforms have a machine code timer that is far more accurate than anything I would write in forth 18:53:31 yes 18:53:55 but most operating systems also have built in timers 18:54:04 that's what I just said 18:54:16 you could use one of these - 18:54:20 and I intend to use those timers where they are available 18:54:37 yes. but 18:54:50 each OS/platform would work differently 18:55:06 however, I'm *NOT* about to call the machine code library manually each time I use one, so I need to write a useful API 18:55:18 hrm 18:55:21 not easy 18:55:28 --- join: edrx (edrx@200.240.18.25) joined #forth 18:55:29 I'm asking you about the API, not the implementation 18:55:37 greetings, edrx 18:55:43 edrx!!! 18:55:47 hi MrReach 18:56:41 ok, the very simplest is TCL's "after" command ... after a specific period of time, the specified word is executed 18:56:47 hi edrx 18:56:54 that's it, no paraters, no frills 18:57:00 somewhere something has to interface with the hardware. your api would have to know how to do this on all platforms 18:57:13 if you need it to repeat, then the called word needs to reschedule itself 18:57:20 hi all... 18:57:24 I440r: that is correct 18:57:51 tcl has lots of good ideas, I don't know why so many people hate it 18:58:25 i don't hate it, but i have a touch of bloatphobia 18:58:52 hehehe 18:58:55 i like that word 18:59:01 bloataphobia :) 19:00:15 yeah :) 19:00:30 it's fun to be a bloatphobic, plus i have my reasons :) 19:00:42 so - mrreach - what ideas do you have on this 19:00:56 i've been emotionally scarred by running win94 on a p75 with 8 megs of ram 19:01:06 the api will be forth definitions that work globally(ish) ? 19:01:38 I440r: correct 19:01:38 yes, Tcl is bloated, but it still has some vague taste of a language that started small and had independent modules added to it -- it is possible to learn only how its "inner intepreter" works, then some of the features 19:01:59 implemented on each system in the way most efficient for that system 19:02:25 TCL has some outstanding ideas 19:02:35 and some new ones coming along 19:02:40 futhin: I haven't touched a Window box (expect for a few periods of 5 minutes that are easy to forget) in the last 5 years 19:02:55 I particularly like the idea of auto-filename translation 19:03:40 edrx: why can't we all start from scratch, throw away Windows! throw away linux! throw away all the languages! and create a new operating system coded in forth! and create different levels of vocabulary.. the highest level of vocabulary should be an EXTREMELY EASY to code in scripting language, ENABLING even the non-coders to be able to CODE!! 19:03:57 ok, so the ver SIMPLEST might be a forth word AFTER ( xt u-ms -- ) 19:04:17 the thing I like most about Tcl is that it had, except in the last 2 (?) years, a very enthusiastic community, just like Forth, only larger and more able to share code and papers 19:04:29 i do not like the idea of NON coders coding 19:04:36 that is why c is so popular 19:04:40 any idiot can code it 19:04:52 heh, except me 19:05:01 i think we should scrap ALL languages except forth and assembler 19:05:03 ALL of them 19:05:06 ok, so the ver SIMPLEST might be a forth word AFTER ( xt u-ms -- ) ... opinions? 19:05:06 grrrr :) 19:05:10 MrReach: agreed -- of maybe shamelessly plugging the AFTER routines from Tcl 19:05:46 how would you create new timers at RUN time 19:05:56 please consider the merits of AFTER on their ... not because of where the idea might have originated from 19:06:11 I440r: I think the x86 assembly and Perl are the two languages that must be scrapped away before all others, because of their ugliness 19:06:11 I440r: that would be a platform-dependant issue 19:06:30 what about java and vb 19:06:42 I440r: never used any of them 19:06:45 these are definatly NOT real coders languages 19:06:46 I agree about perl ... what a chaotic language 19:06:55 I440r: I can't give an opinion 19:07:14 christ ... can we escape from language issues, please? 19:07:35 I thought this might raise OS issues, but the language thing has caught me by surprise 19:07:35 MrReach: and how will the word in the AFTER be executed? in a separate stack? 19:08:00 yes, I assume so ... that is a good question, though 19:08:33 I hadn't considered that execution in a seperate thread may not be possible on all major OSs 19:08:36 the timer granularity wouold be platform dependant too 19:09:07 I440r: yes, it would at a low level ... but the HL Forth can compensate somewhat 19:09:46 these timers wouldnt be useable for very time critical executoin... 19:09:47 Windows, Linux, and MacOS all have 1ms resulotion timer or better, I think 19:09:59 1ms is a very long time 19:10:01 I440r: do you have several computers? I tend to think in a very Chuck Mooreish way about that -- code for one platform, think about portability later 19:10:26 reply i have 3 computers hehe 19:10:30 all x86 tho 19:10:55 1ms is adequate for MOST software purposes ... gets more complicated when working with hardware 19:11:08 in which case you'd want to work closer to the iron anyway 19:11:15 yes :) 19:11:25 at some moment I'll have Linux and Hurd (and some BSDs) on my box, but for the moment only Linux is really usable, though the others are installed 19:11:46 i have dual boot on 2 machines win 98 and linux 19:11:49 and one pure linux box 19:11:53 I need a Mac 19:12:03 edrx: it's relatively easy to code for one platform and porting it later if you just work with the machines themselves.. after all, you only have to port about 30 words in asm and write the rest of the forth in forth :) 19:12:09 (but i'm probably talking nonsense) 19:12:32 no- ur not. 19:12:38 ah good :) 19:12:45 forth is without a doubt the most portable language ive ever worked with 19:12:52 yeah 19:13:01 from a theory perspective it seems REALLY portable 19:13:07 coded definitions in forth are all VERY simple 19:13:11 yup 19:13:18 porting them is trivial 19:13:39 anyone here ever though about writing Forth words to compile Forth-like code to high-level languages? I'm drafting a way to use Forth as a better syntax for Lua... 19:13:51 it's kind of weird how there's not very many "native" forths for windows/linux/macos.. 19:13:59 but i don't really understand what a "native" forth is 19:14:14 ok, another alternative is TIMER ( xt u-ms -- hdl ) ... coupled with END-TIMER ( hdl -- ) 19:14:22 futhin: native = works as a full OS? 19:14:52 in wich xt would be repeatedly executed every u-ms milliseconds until END-TIMER was called 19:14:57 opinions? 19:14:57 another is a creating word that stores a variable with an interval and a vector 19:15:02 some other guy on this chan was talking about creating some kind tcl/forth thingie where the forth was uniform across platform or something.. 19:15:06 futhin: or has an environment, was written specifically for that platform, is written in Forth itself, etc? 19:15:08 and a count 19:15:19 every tick you decrement the count on each word 19:15:27 and when it hits 0 you reset it and execvute the vector 19:15:31 and he checked the forths of linux and windows and macos.. and he didn't like the forths that were coded in c.. claimed something wrong with it or something?? 19:15:33 futhin: that was me 19:15:54 oh heh.. 19:15:56 explain to me 19:15:59 MrReach: so you think like me :) 19:16:04 what's wrong with forths coded in c? 19:16:05 forths written in c are an abimination 19:16:09 abomination 19:16:10 why? :) 19:16:13 heh 19:16:23 'cause I440r hates C 19:16:28 correct 19:16:28 :) 19:16:39 like Arabs hate Americans @:^> 19:16:41 heheh 19:16:45 um 19:16:50 MrReach: everybody hates americans, sorry to say 19:16:54 yup 19:16:55 i think its what makes todays software 99% CRAP 19:16:55 true 19:17:03 a bit less now that they die like everybody else 19:17:06 edrx is right, everybody hates americans :) 19:17:23 --- join: TheBlueWizard (tbw@ip-216-25-202-229.vienna.va.fcc.net) joined #forth 19:17:26 true true 19:17:31 THE BLUE WIZARD hi hi hi ! :) 19:17:32 hiya all 19:17:39 hi TBW 19:17:41 I440r: please come from the perspective of someone who needs to use a timer ... what would be the easiest way? 19:17:45 hiya futhin and edrx :) 19:17:49 a wise man once sand that one should not use violence to solve ones problems as it only serves to generate more voilence 19:17:52 then i shot him 19:17:52 greetings, TheBlueWizard 19:18:00 hiya I440r :) 19:18:02 tbw!!!!!!!!!!!!1 19:18:14 hiya MrReach :) 19:18:20 I440r: not funny 19:18:31 i thunked it was :) 19:18:38 TheBlueWizard: I'd like to ask your opinion on an API for timers ... 19:18:51 hehe...anyway I have a problem with fetchmail...the authentication failed, despite the identical password I have on my Win95 box :( 19:18:54 the goal is to make something very useful ... portable to all the major OSs 19:19:07 I have to go, bye all 19:19:14 --- part: edrx left #forth 19:19:15 ok, edrx, fare well 19:19:17 can i ask why mrreach ? 19:19:29 portability is intended to save time right ? 19:19:32 anyone have an idea why? 19:19:41 because I have need of a timer, and Win32Forth does implement them 19:19:43 but you still spend a great deal of time making your code portable 19:19:49 yes, I440r 19:19:53 somebody explain what's wrong with coding forth in c? and further more, what about coding forth in forth coded in c? :) 19:19:59 I440r: not at all 19:20:27 I440r: take the implementation of AFTER as an example ... 19:20:48 I can sit down at a windows machine and implement AFTER in a couple of hours 19:21:10 then, if I need it in gforth, I can code AFTER using the calls in glibc 19:21:33 futhin: nothing wrong with forth in C ... except personal biases 19:22:34 Win32Forth does NOT implement them, rather 19:22:38 well, as far as i know, the only advantage of coding forth in c is that you _could_ more easily implement some library/dll handling stuff or windows graphics/interfacing 19:22:43 am i wrong? 19:22:44 and the fact that the forth compiler would be totally incapable of compiling itself 19:22:55 futhin: coding Forth in C has some limitations, such as not being able to do CODE ... END-CODE (especially in protected memory OSes) 19:23:09 futhin: library access is easier ... and C is a bit more portable 19:23:22 bullshit :) 19:23:28 bullshit 19:23:28 heh 19:23:32 c is no where near as portable as forth 19:23:39 c is not very portable at all 19:23:48 if a system has an ANSI C on it, then you can run your forth on it 19:23:56 c is only portable because a bunch of wankers coded a bunch of shit in windows and linux 19:24:02 TILE demonstrated that clearly in the 80s 19:24:03 * TheBlueWizard glances at the floor...quite well covered in bovine manure :) 19:24:14 heheheheh 19:24:17 tile is a monstrosity 19:24:25 it's ugly, yep 19:24:31 its worse than the gnu itterative quick sort 19:24:38 never heard of TILE 19:24:40 sphagetti coders are us 19:24:47 gnu forth written in c 19:24:49 is there a reason NOT to talk about timers? 19:24:57 * TheBlueWizard decides no one knows the answer to his fetchmail problems and drops it 19:24:59 no 19:25:16 no reason.... 19:25:25 I'm wondering how complicated/versatile time functions should be 19:25:41 but the forth part is easy - however you do the forth interface to your api 19:26:01 its teh os/hardware specific stuff thats the bottle neck 19:26:06 that's right ... but what should that interface be? 19:26:25 * TheBlueWizard smiles re: I440r's remark on the glorification of spaghetti code...and points to Apple II ROM code as a wonderful example of clever spaghetti code ;) 19:26:32 a variable 19:26:34 I'm ONLY concerned with the Forth high-level interface right now 19:26:37 or 19:26:40 a structure 19:26:46 TBW: why wouldn't no one know the fetchmail problem? i've screwed around with linux and fetchmail 19:26:48 an enable/disable field 19:26:52 a interval field 19:26:54 a count field 19:26:59 and an execution vector field 19:27:15 futhin: you have problem too? 19:27:23 every hearbeat you decrement teh count on all enabled timers 19:27:25 ugh.. "wouldn't no one" bad grammar 19:27:30 that would not be neccessary on all systems ... and besides ... someone wanting to use a timer shouldn't have to know about all that garbage 19:27:45 yes they woulde 19:28:06 "shouldn't" 19:28:11 they would have to know the required interval, weather their timer was active and what the timer did when it timed out 19:28:12 and 19:28:16 TBW: i believe i fetched some mail and it took all my mail off the server and i actually wanted to keep the mail on the server (because it was yahoo) 19:28:20 * TheBlueWizard chuckles re: "bad" grammar...and adds that to the bovine manure mix on the floor 19:28:21 they might want to know "how much time left" 19:28:38 ok, I'm joe coder ... I need a bit of code executed at some point in the future ... how do I do this? 19:28:50 futhin: have you tried the "keep" option in .fetchmailrc? 19:29:16 ok, I440r, I agree 19:29:30 well, it's a longer story than that.. i deeleted my linux partition without remembering to backup my mail that i downloaded heh 19:29:41 but all those funcs can be provided by the interface ... the struct would be an implementation issue 19:29:43 if joe doesnt know enough about the hardware or teh os specific stuff he shouldnt be coding 19:29:50 * TheBlueWizard chuckles 19:29:51 yes 19:30:05 you would supply words taht enabled a timer 19:30:09 disabled it 19:30:16 queried it 19:30:29 etc 19:30:30 so you think that being able to pause a timer in some way besides destorying it and recreating it later is essential? 19:30:43 he woudnt need to know which field of teh structure was where 19:31:06 it MIGHT be 19:31:21 you might want 2 timers of different intervals 19:31:22 well, I need to go....nice chatting...I hope to fix my fetchmail thing so I can really use Linux emailing system for good :P 19:31:32 bye all 19:31:33 and ever time timer 1 counted out you did an action 19:31:41 and every time timer 2 timed out you altered timer 1 19:31:49 cu tbw :) 19:31:59 this is how i would do PWM 19:32:02 --- part: TheBlueWizard left #forth 19:32:50 PWM? 19:32:58 oh, pulse width modulation 19:32:59 pulse width modulation 19:33:16 needed for stepper motor acceleration etc 19:33:27 I would never do PWM in software 19:33:47 you would if that ws teh only way :) 19:34:27 ok, all functionality discussed so far _could_ be done with AFTER 19:34:42 with the minor inconvenience that time would "creep" a bit 19:35:10 time woud creep anyway 19:35:21 not with a repeating timer 19:35:27 timers in most os' s guarantee at least the specified interval 19:36:03 repeating timers are always spot on, less the "jitter" imposed by the OS 19:36:37 erm ... is Linux still suing the 100Hz system clock? 19:36:47 erm 19:36:49 i dunno heh 19:37:11 that would suck ... lemme see what glibc docs have to say about it 19:40:47 what's the URL for the linux syscalls? 19:41:03 do you have a URL for the 2.4.?? kernels? 19:42:02 erm i dont know if there is one 19:42:17 they tend not to doccument the syscalls 19:43:47 ok, nevermind, back to the API 19:44:45 except for the simplest case, AFTER, I'm going to implement the timers with a "handle" by which a particular timer is referenced 19:44:58 what the handle actually is will be system dependent 19:45:28 that would work 19:45:37 (a pointer to a struct in most cases) 19:45:39 why is that? 19:46:00 why is what ? 19:48:54 . 19:48:57 ping #forth 19:49:35 oh, though you said "wouldn't" 19:49:36 ok, so what is NEEDED besides AFTER? 19:49:36 I meant ... what other functionality is desired? 19:49:36 obviously, there's timers that repeat 19:49:36 and a way to pause/restart repeating timers 19:49:36 maybe ... 19:49:36 you want it to fire immediately after creation ... or maybe after the first interval has elapsed ... so a flag then? 19:49:36 or maybe two intervals specified, the initial and the repeating? 19:49:36 that all the functionality I can think to add 19:49:36 can you think of more? 19:49:45 woah.. lag? 19:49:49 yes 19:49:53 big time 19:49:57 or cut'n'paste? 19:51:10 i'm watching e.r right now 19:51:25 "they say you're not a doctor until you've killed a few patients" 19:51:29 now lets apply that to forth 19:51:39 :P 19:51:59 not a forth coder 'till you've crashed a few systems 19:52:10 heh 19:52:15 not extreme enough ;) 19:52:56 well, I installed a native forth once, and it wiped the boot secotr on my hard drive ... lost all my data ... is that extreme enough? 19:54:19 hehehe 19:54:38 I440r: what else might you want a timer to do? 19:54:57 god, more porn ads via ICQ 19:55:16 hehe yea those are pissing me off too hhe 19:55:17 hrm 19:55:21 well. 19:55:24 le me think 19:57:15 i think that just about covers it 19:59:15 ping #forth 19:59:25 argh i hate lag :) 20:00:57 --- mode: ChanServ set mode: +o clog 20:01:01 --- mode: ChanServ set mode: +o futhin 20:01:04 --- mode: ChanServ set mode: +o MrReach 20:01:08 --- mode: ChanServ set mode: +o I440r 20:01:18 --- topic: set to 'do drop >in' by I440r 20:01:30 there's no point because i turn off my comp every night :) 20:07:04 no point in what? 20:07:09 op 20:07:17 unless it's permanent.. hint hint ;) 20:07:23 I440r: now, can all that functionality be implented in one forth word? 20:07:33 in two? six? 20:08:35 AFTER _could_ provide all that functionality ... but the application coder would ahve to really jump some hoops 20:08:39 i think one word could create the timer 20:08:45 but you would need othres to enalbe disable query etc 20:09:31 I was thinking TIMER TIMER-KILL TIMER-PAUSE and TIMER-START 20:09:47 timer-kill wouldnt be needed 20:09:50 you can forget it 20:10:00 then us MS to implement initial delay before issuing TIMER-START 20:10:24 yes it would, to clean up the "handle" and its associated data structures 20:10:31 to not clean them up is a memory leak 20:11:40 oh yea 20:11:53 your timer creating word would return a handle - forgot that 20:11:58 sorry about the delay a moment ago, btw, was watching the intro to Mystery on PBS ... but I've already seen it 20:12:01 i would use open and close tho 20:12:03 topen timer 20:12:04 open timer 20:12:06 close timer 20:12:15 read timer /write timer ? :) 20:12:33 well 20:12:36 i'm gonna go to bed 20:12:41 good night all 20:12:42 nite dood 20:12:45 ok, futhin, pleasant dreams 20:12:48 talk to you all later :) 20:12:52 --- quit: futhin (nighty night) 20:14:09 hrm would open/close/read/write work ? 20:14:16 btw, I don't like the way glibc does timers AT ALL ... it's gonna be a real bitch to port this to it 20:14:20 maybe not.... not the right way of thinking i thinl 20:14:47 I would rather not overload an existing word 20:15:19 ya 20:15:47 and i think create destroy enable and disable etc are better way of thinking about timer functrions 20:15:53 ok, so let's start with TIMER ... and it will return a handle for use by the other words 20:16:09 what info does TIMER need? 20:16:26 it needs an xt and an interval, for sure 20:16:42 interval and count 20:16:57 I would like to add a single stack item that gets passed to the xt 20:16:59 current time left and reset time interval 20:17:03 count? 20:17:49 yes. how much time is left THIS go 20:18:03 ok, can we call that "initial"? 20:18:33 so now we have ( xt data initial interval -- ) 20:18:36 ooops 20:18:41 so now we have ( xt data initial interval -- hdl ) 20:18:55 yes 20:19:44 ok, if initial is present, then I assume that the timer starts as soon as created? 20:19:50 (xt data interval count -- handle) 20:20:05 i would say not 20:20:06 count is confusing 20:20:16 current- count 20:20:25 it implies that the timer will stop firing after n occurances 20:20:39 which is a functionality we hadn't even considered 20:20:47 hah!!!!!!!!!!! 20:20:56 is this a 1 shot timer or a repeating timer 20:21:06 a flag then? 20:21:09 maybe not 20:21:20 TIMER ( xt data initial interval flg -- hdl ) 20:21:21 you could have xt disable its own timer in execution 20:21:27 yes 20:21:37 xt should have one parameter - ( handle --- ) 20:21:44 two 20:21:49 that way one xt can be used by multiple timers 20:21:51 ( hdl data -- ) 20:21:54 no 20:21:58 no data 20:22:02 i would say 20:22:06 where does the data come from 20:22:14 these are going to be interrupts after all 20:22:22 the data might point to a struct for use of the xt 20:22:24 youwould have to specify the data in the timer 20:22:40 it's the data supplied to TIMER 20:22:57 then you have another field to pass to the creat timer function 20:23:07 and it would stop timers from sharing xt's 20:23:15 yes, I had that problem with the standard windows timer function ... which is what got me started thinking about this to start with 20:23:21 no it wouldn't 20:23:37 it might heh 20:23:45 because not all timers would want data 20:23:48 each timer is going to have it's own data structure, anyway 20:23:49 just aq "do this" 20:23:57 not a "do this using this data" 20:24:03 yes, in which case you can pass "0" to TIMER 20:24:07 why 20:24:12 why have the extra field 20:24:27 that is probably not going to be used 20:24:30 ok, in the application that I'm writing ... 20:24:34 i would say it was deadwood in most cases 20:24:53 there are any number of objects that need to refresh something at regular intervals 20:25:30 all the object SHOULD be able use the same xt, but ... 20:25:33 yes. but the xt should not ANY specific type of word 20:25:40 they each need a pointer to their own data 20:25:50 xt should be ANY valid forth word 20:25:57 that is correct 20:26:18 well. it would be silly to execute SWAP every 2 minutes :) 20:26:22 but it should be leval 20:26:24 legal 20:26:30 yep 20:26:47 except it would cause stack underflow with only one parameter @:^> 20:27:11 it would be bad code - but who am I to say it wouldnt work :) 20:27:34 I'm thinking the data item would be used quite a lot 20:27:51 so that the same xt could deal with different data at different times 20:27:53 so your "data" field would be counter productive on this scroe i think 20:28:03 teh xt might not want data 20:28:09 oh? how _counter_ productive? 20:28:30 heh, the xt expects what we write it to expect 20:28:36 your xt might be simply to transmit a character over the seriall line from a buffer if there is anything there to send 20:28:49 right now, we're discussing whether it expects one item or two on a clean stack 20:29:01 you dont want your timer function to have to fetch the data from a timer and then jump to the xt 20:29:08 AH! what if there are several buffers? 20:29:10 you just want it to jumo to th ext 20:29:27 otherwise you will need to code a DROP on all xt's that dont want teh data 20:29:46 then you would need your xt to know where all the buffers were 20:29:58 and which ones should be transmitted where 20:29:59 or 20:30:04 you could have multiple timers 20:30:33 withmultiple xt's i mean 20:31:07 making all timers force some data on the xt weather it wants it or not is bad 20:31:08 but 20:31:15 you could add a USER field 20:31:25 so teh xt could read the user field! 20:31:29 well, I'm sure about "is bad" ... what is a USER field? 20:31:51 its a blank field in the structure that is just there. 20:31:57 its set to null on timer create 20:31:58 oh! ok 20:32:07 create-timer 20:32:19 some-data timer-users-! 20:32:28 the user decides what the data is 20:32:32 and how its used by teh xt 20:32:44 when the timer times out and xt is called 20:32:45 the only diff between your setup and mine is that the machine code handler would load the field from the struct and put it on the stack for the xt 20:32:57 the handle is passed to the xt 20:33:06 and the xt can do a timer-user-@ 20:33:11 or NOT 20:33:15 right, and that has to get pulled from the datastructure anyways 20:33:24 the data is there if the timer wants it but ishnt there if its not wanted 20:33:33 DOESNT have to 20:33:41 teh xt will fetch it if it needs it 20:33:47 I'm thinking that many xts will simply ignore what's on the stack anyway 20:33:53 the FIELD is there - but dada doesnt have to be 20:34:05 the stack would overflow 20:34:19 well, then, the adr of the data struct has to be passed to the xt 20:34:34 xt's are not guaranteed to reentrant 20:34:41 no - the timer handle does 20:34:44 non-reentrant, rather 20:34:50 if the timer doesnt want that data - it can DROP it 20:35:04 but that is one item i think you do need to pass to teh xt 20:35:10 that's what I was thinking initially 20:35:16 the handler can drop it 20:35:18 because this way the timer xt can call disable timer and make itself a one shoit 20:35:21 or just simply ignore it 20:35:30 the stack is destryed wen it exits anyway 20:35:32 drop is better than ignore 20:35:47 leaving litter is a bad habit to get into 20:36:01 it doesn't matter ... drop adds overhead 20:36:33 well. what if you are within a timers xt and a timer goes off 20:36:44 but timer 2 didnt access the handle yet 20:36:49 and timer 2 left its own there 20:36:49 ok, then, we agree that at least TWO items need to be on stack when xt starts? 20:36:57 so when timer one gets UN interrupted 20:37:03 it fetches timer 2's handle 20:37:04 each gets its own stack 20:37:05 not its own 20:37:08 no 20:37:09 one 20:37:12 teh handle 20:37:22 if the timer xt needs more data the user field can point to it 20:37:26 or contain it 20:37:46 ok, rephrase the situation that you just described, please 20:37:56 timer 1 goes off 20:37:57 but 20:38:10 before timer 1 can access the timer handle 20:38:14 timer one and timer two use the same xt? 20:38:17 timer 2 goes off. and interrupts timer 1 20:38:22 maybe 20:38:26 ok 20:38:31 but different timer structures 20:38:37 and therfore have diffeerent handles 20:38:39 well 20:38:40 oh! ok 20:38:44 timer 1 wants to use its handle 20:38:47 but timer 2 doesnt 20:38:57 so timer 2 just leaves its own handle on the stack 20:39:01 timer 2 finishes 20:39:04 and exits 20:39:19 we go back to timer 1 20:39:37 timer 1 has 2 items on teh stack 20:39:37 its own handle 20:39:37 and 20:39:37 above it 20:39:40 timer 2's handle 20:39:48 so when it tries to disable itself 20:39:52 it disables timer 2 instead 20:40:06 tiemr 2 should have DROPPED its own handle 20:40:17 leaving timer 1's on the stack for timer 1 to acccess 20:40:32 ok 20:41:01 timer 1's xt is a serian xmit function 20:41:09 but there are 4 serial lines 20:41:10 I had planned on each xt having its own small stack when it started 20:41:26 all xt's could share one stack 20:41:39 only if can guarantee non-reentrant 20:42:06 well if timer-xt-1 has its own stack 20:42:14 which would then involve a que 20:42:15 you can have 2984928655 timers all using timer-1-xt 20:42:31 you would still have entrancy problems! 20:43:12 oh? 20:43:27 timers 1 2 and 3 all use timer-1-xt 20:43:32 timer1 goes off 20:43:36 timer-2 goes 20:43:40 !!! 20:44:05 at some point, a critical section OS call is going to have to be used 20:44:07 the functiuon would need to guarantee that it cleaned all data it created or all data that was passed to it 20:44:49 maybe 20:44:49 maybe not 20:45:30 ok, I want to make something clear ... the handle is exactly that ... a handle. allowing the xt to acess any type of data structure associated with the handle removes the possibility of recoding the implementation differently for another op sys 20:45:52 nope 20:45:52 because 20:46:03 you would have words that use that handle as a parameter 20:46:16 ( handle --- ??? ) timer-do-this 20:46:18 ( handle --- ??? ) timer-do-that 20:46:22 and 20:46:24 ok, so then we also need TIMER@ ? 20:46:44 there is NOreason why a timers xt cant use those functi0ons on its own or some other timers handle 20:46:55 i would say yes 20:47:09 timer@ fetches the current "time left" 20:47:12 : handler ( hdl -- ) dup TIMER@ access-supplied-data-here ; ???? 20:47:26 no, it would fetch the user data 20:47:26 timer! would set that field 20:47:32 maybe 20:47:43 well i think you have need for these 20:47:46 well, that's what I intended 20:47:48 all using handle as a parameter 20:47:51 timer-enable 20:47:54 timer-disable 20:48:00 timer-read-user-data 20:48:06 timer-write-user-data 20:48:15 timer-start 20:48:18 timer-stop 20:48:22 ok, why not supplie a user parameter ... whatever it is ... to TIMER ... and supplie it on the stack to the xt ??? 20:48:28 timer-read (get current time left) 20:48:43 because not all xt's want it 20:48:47 only a few would 20:48:55 in most cases, it will be the adress of a struct for the xt's use 20:49:03 it would be far better to leave space in the timer structure for any user data 20:49:15 rather than force this data on an xt that has no use for it 20:49:30 thats what the handle is 20:49:30 it WOULD be in the timer sturcture 20:49:46 but the xt is not allowed to toy with the timer struct at all 20:50:03 why not 20:50:07 nit directly noi 20:50:14 ok, I follow 20:50:19 but it can thru use of words that take the handle as a parameter 20:50:29 a 1 shot timer would have an xt that 20:50:38 called timer-disable on itself! 20:50:43 then you could have a second timer 20:50:47 that would do 20:50:51 well, it was conventient to just grab the first two cells of the timer struct and shove them on the stack for the xt 20:51:01 timer-user-fetch (timer 1's handle) timer-enable 20:51:09 it can nip, drop, 2drop, or just simply ignore it 20:51:11 no 20:51:23 it would be far more conveinent to pass the HANDLE to the xt 20:51:25 and nothing else 20:51:39 if the xt doesnt want the xt it can drop it 20:51:49 if it needs extra data it can get it from teh user field 20:52:05 ok, so we agree that AT LEAST one item on stack is essential 20:52:06 99% of the xt;s wont want extra data 20:52:13 so why make 100%of them take it anyway 20:52:35 and we disagree in that user data should be extracted from the xt rather than put on the stack 20:52:38 it would increase timer latancy 20:52:39 is this right? 20:53:24 yes. because it would be put on the stack weather it was wanted or not - thuys slowing you down even before you got to the xt. and teh xt would have to deal with this data it didnt want - thus slowing you down more 20:53:40 you should let teh xt get the data if it wants it 20:53:48 hmmm 20:54:02 thus you interrupt that calls teh xt wont be slowed down getting to teh xt 20:54:07 I will consider this 20:54:17 and if the xt doesnt want the data it wont be there fo it to get the hell rid of heh 20:54:20 prob still put the data on the stack, but you have a vlid point 20:54:31 so, does the timer start when it is created? 20:54:47 oh, we already soved that with the "initial" parameter 20:55:28 this has been interesting, but my dinner is getting cold on a plate 20:55:46 will be back in one hour or two, depending what's on TV tonight 20:55:49 thank you 20:55:54 feel free to type notes 20:56:05 --- nick: MrReach -> MrDinner 20:56:20 bon appitite :) 20:56:33 i only watch fox news these days :) 20:56:36 24 hours a day heh 22:08:51 --- nick: MrDinner -> MrReach 22:08:58 I'm back. Miss me terribly? 22:18:01 how depressing, about Fox news, I mean 22:22:23 brb 22:22:27 --- quit: MrReach () 22:22:58 --- quit: I440r (farmer.openprojects.net sagan.openprojects.net) 22:23:15 --- join: I440r (mark4@A010-0105.BLMG.splitrock.net) joined #forth 22:23:15 --- mode: ChanServ set mode: +o I440r 22:27:07 --- join: MrReach (mrreach@209.181.43.190) joined #forth 22:57:25 sorry man igtg zzz :) 22:57:25 nite dood 22:57:28 --- quit: I440r () 23:59:59 --- log: ended forth/01.10.11