00:00:00 --- log: started forth/05.07.06 00:15:53 slava: ah, i didn't know you wrote jEdit, i used to use that 00:42:52 --- quit: slava (Remote closed the connection) 02:06:25 --- quit: virl (Read error: 131 (Connection reset by peer)) 02:06:46 --- join: virl (icechat5@chello062178085149.1.12.vie.surfer.at) joined #forth 02:42:34 --- join: Minataku (~Ed@payphoneed.user) joined #forth 02:53:59 --- join: Topaz (~top@host81-157-97-213.range81-157.btcentralplus.com) joined #forth 02:55:17 --- quit: Topaz (Client Quit) 02:58:01 --- quit: kunphuzil ("Download Gaim: http://gaim.sourceforge.net/") 03:05:42 --- quit: PayphoneEd (Read error: 110 (Connection timed out)) 05:01:09 --- join: PoppaVic (~pete@0-2pool198-72.nas30.chicago4.il.us.da.qwest.net) joined #forth 05:01:22 hi PoppaVic 05:01:40 hiya 05:59:41 --- join: yGREK (~ygrekhere@ip.85.202.152.96.dyn.pool-3.broadband.voliacable.com) joined #forth 06:00:26 --- quit: yGREK (Client Quit) 06:00:41 --- nick: Raystm2 -> nanstm 06:13:55 --- join: Robert (~snofs@c-f778e055.17-1-64736c10.cust.bredbandsbolaget.se) joined #forth 06:25:46 --- join: PoppaVic_ (~pete@0-1pool75-5.nas24.chicago4.il.us.da.qwest.net) joined #forth 06:26:39 --- quit: PoppaVic (Nick collision from services.) 06:26:42 --- nick: PoppaVic_ -> PoppaVic 06:26:54 damned telco 06:31:16 --- join: JasonWoof (~jason@Herkamire.student.supporter.pdpc) joined #forth 06:31:16 --- mode: ChanServ set +o JasonWoof 06:33:30 lo, herk 06:40:36 mornin 06:40:47 I'm up unpleasantly early 06:40:59 but hopefully some good breakfast will make it all better 06:41:05 It's "one of those days" with the telco *sigh* I'll prolly be in and out 06:41:46 I wanted to sleep right until 10am and get almost 8 hours 06:41:57 heh - good luck 06:42:03 but rain blew into the windows onto me around 7 06:42:19 I'm on the goddamned east side of the house, in the country - I suffer it every morning. 06:42:26 and it was a bit hot after that when I closed the window mostly 06:42:44 * PoppaVic hugs central air 06:42:54 then my mom called shortly after 9 06:43:04 oy, geezus - PHD day 06:43:05 anyway. 06:43:08 afk cooking 06:43:14 np 06:47:06 Man, I am in dire need of an asm-whiz for at least one set of funcs.. SHitbags 07:02:27 --- quit: PoppaVic ("brb") 07:06:30 --- join: PoppaVic (~pete@0-1pool46-38.nas30.chicago4.il.us.da.qwest.net) joined #forth 07:09:46 --- join: sproingie (foobar@64-121-15-14.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com) joined #forth 07:10:18 --- join: PoppaVic_ (~pete@0-1pool46-67.nas30.chicago4.il.us.da.qwest.net) joined #forth 07:10:47 --- quit: PoppaVic (Nick collision from services.) 07:10:51 --- nick: PoppaVic_ -> PoppaVic 07:12:08 --- quit: saon|smgl ("Lost terminal") 07:58:58 --- join: saon_ (~saon@c-66-177-224-222.hsd1.fl.comcast.net) joined #forth 07:59:13 --- nick: saon_ -> saon|smgl 08:14:13 arrg 08:14:30 herk? you alive? 08:14:53 still breathing 08:14:57 fighting a virus 08:15:40 I think I got it off 08:15:41 OK... query... Given that libc is around, how would you set up for calls upon the C lib? 08:15:47 now I have to make it so it can't get on again 08:16:05 I only know the PPC calling conventions 08:16:14 ahhhhhh 08:16:28 rf has a FFI in asm you could use 08:16:31 See, that just won't help - I've been cogitating this for 2 days 08:16:45 FFI I just downloaded - still not universal, though 08:17:02 there's no such thing as a "universal ffi" 08:17:16 I know - cute, ain't it? 08:17:28 rf can invoke c functions. structs are still up to you 08:17:36 yup 08:18:00 structs are pretty simple, just a lot of busywork to get a nice syntax 08:18:18 i'm a fan of factor's ffi. looks almost exactly like C 08:18:33 gimme an url, in case I got something else 08:18:43 for rf or factor? 08:18:51 whomever 08:19:05 factor's ffi docs are out of date 08:19:17 http://factor.sourceforge.net/handbook.pdf 08:19:23 search down for "alien" 08:19:37 alien is what factor calls most things associated with ffi 08:19:56 rf's ffi is much simpler. 08:19:59 from libc.so 08:20:02 1 cimport system 08:20:09 " /bin/sh" system 08:21:07 the implementation is all in rf.asm 08:21:47 it's your basic "calling c functions in asm" tutorial stuff, using dlopen and dlsym 08:21:49 well, if you know the home url for that particular mess, I'd love to see it. 08:22:18 dont think the source is browsable online. 08:22:19 http://retroforth.org/release/rf8-generic_ffi.tar.gz 08:22:33 sure. and I can do that now.. What I can't do well is demarcate the dstack args I need to get over before the call 08:22:55 grabbing 08:23:55 rf requires you to specify how many args the c function takes when importing 08:24:30 nothing to demarcate. it just pushes eax down, the rest are already on the stack, and then pops off that many when done 08:25:26 eax is asm/reg; nonportable in the extreme 08:26:22 rf's FFI is in asm 08:26:26 rf is written in asm 08:26:31 sure, I expect that 08:26:42 however, it's also prolly for one cpu 08:27:08 SO, I end up back in the same hole 08:27:12 intel, of course. however, C on most CPU's will have you push args onto the stack 08:27:29 no 08:27:51 we can't insure they push in a given order, or the number (with ...) 08:28:08 we rely on C to "know" all this stuff 08:28:19 the c standard specifies a stack, and there is a standard order 08:28:37 compilers can implement other calling conventions, but there is a standard one 08:28:39 ahh, is there an url I should know of? 08:29:04 well there's the c00 standard, which is impenetrably dense 08:29:06 I know we've cdecl and pascal, of course 08:29:22 right. cdecl is quite standard about order of args 08:29:28 i believe it's right to left 08:29:50 sure... it parses r->l and pushes l->r 08:30:03 ..at least, last I looked 08:30:37 BUT, you cannot insure this: there is nothing about a compiler like that you can insure 08:30:49 ah yes, it is pushed left to right 08:30:56 yes you can. cdecl is cdecl 08:31:22 some embedded systems might not bother with cdecl, those you're going to just have to puzzle out 08:31:28 once again: think (fmt, ...) - where is the 'end'? 08:31:41 oh you're talking about varargs 08:31:46 yah 08:31:51 lots of luck. varargs suck heavily 08:31:56 we've a lot of c-func with them 08:32:23 they are great, as far as PASSING args - but they ain't pretty in terms of stack/limits 08:32:23 rf doesn't have any way to do varargs, nor does factor. i believe it's still the same order tho, just push the format and all the args 08:32:37 you'll have to either parse the format string yourself or require the caller to specify how many args they use 08:32:49 yeah, I was afraid of that 08:32:52 the C function will figure out how many args to use, it parses the format string 08:33:13 so, let's say... 08:33:21 a lot of ffi's never bother to support varargs 08:34:06 ." %s %d %p" foo bar snafu 4 CCALL printf 08:34:13 if it's printf, you could always count the number of %'s in the string 08:34:21 you might overallocate, but that won't hurt anything 08:34:26 we'd push as we pop, sans limiter 08:34:52 oh come to think of it, overallocating might underflow the dstack, so i guess that could "hurt" :) 08:35:02 yep 08:35:23 remember: I leave the real SP alone, and use a struct/queue 08:35:30 in rf it wouldn't, but that's owing to rf's one-section architecture 08:36:30 I'm trying to see a downside to "CCALL ( ... args -- ret )" 08:37:11 for declaring them? 08:37:32 I can even see: "(CCALL" .... "CCALL) foo" 08:38:10 yeah, demarcation/number/etc 08:39:00 we ALMOST need to keep a fmt-string for input/output for these calls. 08:39:32 i support. i personally like factor's syntax the best. 08:39:34 FUNCTION: int PQgetlength ( PGresult* res, int tup_num, int field_num ) ; 08:39:49 wtf? 08:40:07 that's factor's FFI declaration syntax 08:40:31 FUNCTION: void glRasterPos3d ( GLdouble x, GLdouble y, GLdouble z ) ; 08:40:33 and so on 08:40:36 hmm... That was almost amusing for C, how about for forthish? 08:41:02 you want to call a C function, you use a C style declaration. makes perfect sense to me 08:41:18 x y z glRasterPos3d 08:41:44 now try a varg 08:41:47 if you want, you could always make it parse stack comments 08:42:04 slava wanted something you could copy and paste a .h file into and tweak a little 08:42:05 yes, I am thinking about it 08:43:30 factor doesn't do varargs afaik. nor does retro. the principle's straightforward tho, you have a ... type. you approach delimiting the same way you do in C 08:43:39 parse a format string, use a count, or use a sentinel 08:43:44 The only prob I see with "(CCALL" is the marker.. Icould be wrong 08:44:07 yeah, the sentinel 08:44:21 syntax is entirely up to you 08:44:37 as for how, varargs are pretty ad hoc, you'll probably end up doing all three 08:45:09 obviously if you want to support printf, you'll need to parse a format string. or require delimiters or a count in the caller 08:45:30 there's a reason pascal doesn't do varargs 08:45:37 Yeah, I think I have the right "flavor" 08:46:05 varargs are the bane of many a compiler writer's existence 08:46:15 anyway, gotta go 08:46:23 yep, and lord are they necessary - stay well 08:47:42 madworks ideas are going to simplify THIS, while complicating the universe 08:50:37 --- quit: PoppaVic ("Pulls the pin...") 09:28:20 --- nick: arke -> grammar_nazi 09:29:37 --- nick: grammar_nazi -> ENGLISH_SUCKS 09:30:03 --- nick: ENGLISH_SUCKS -> arke 10:42:01 --- quit: madwork (Read error: 104 (Connection reset by peer)) 10:43:32 --- join: kunphuzil (~Jason@ip-69-10-102-124.cableaz.net) joined #forth 10:44:00 --- join: madwork (~madgarden@derby.metrics.com) joined #forth 10:45:50 --- quit: arke ("OFF TO GERMANY!!!") 11:27:22 --- join: KB1FYR (~Alex@d-66-63-85-222.suscom-maine.net) joined #forth 11:36:40 --- join: tathi (~josh@tathi.bronze.supporter.pdpc) joined #forth 12:01:10 --- quit: KB1FYR () 13:23:47 --- join: slava (~slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 13:37:55 --- quit: virl (Read error: 104 (Connection reset by peer)) 13:38:52 --- join: virl (icechat5@chello062178085149.1.12.vie.surfer.at) joined #forth 13:59:17 --- join: KB1FYR (~Alex@d-66-63-85-222.suscom-maine.net) joined #forth 14:07:43 --- quit: KB1FYR () 14:07:54 --- join: KB1FYR (~Alex@d-66-63-85-222.suscom-maine.net) joined #forth 14:37:44 --- quit: KB1FYR () 15:01:12 I440r, hay 15:03:10 I440r, what ARM are you targeting? 15:10:16 my LEFT ARM 15:20:28 * OrngeTide shoots JasonWoof in the LEFT ARM 15:21:33 I440r is doing stuff with ARMs? 16:18:56 tathi thanks for helping me see virl's question ;) 16:19:15 sure 16:19:54 --- nick: nanstm -> Raystm2 17:07:39 --- quit: virl (Read error: 104 (Connection reset by peer)) 17:07:50 --- join: virl (icechat5@chello062178085149.1.12.vie.surfer.at) joined #forth 18:11:32 http://home.pipeline.com/~hbaker1/ForthStack.html 18:15:37 --- quit: virl (Read error: 104 (Connection reset by peer)) 18:18:40 interestingly it comes to the defense of "roll" over 18:18:50 er instead of "pick" or "over" 18:33:48 --- nick: kunphuzil -> Tervekalroghklat 18:35:38 --- nick: Tervekalroghklat -> Gloeshaffen 18:40:43 --- nick: Gloeshaffen -> Garjktav 18:46:55 sproingie: thanks for the link. I think the author was using `roll' as a stand-in for `bring-to-the-front-of-stack' type words that would included pick, over, swap, what-not. 18:48:13 In the appendix he codes several examples of roll(n) in a lisp. 19:10:59 --- nick: Garjktav -> kunphuzil 19:24:03 --- join: kunphuzi1 (~Jason@ip-69-10-102-124.cableaz.net) joined #forth 19:24:22 --- join: snoopy_16 (snoopy_161@dsl-084-058-132-083.arcor-ip.net) joined #forth 19:30:18 --- quit: danniken (Read error: 54 (Connection reset by peer)) 19:32:23 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 19:32:35 --- nick: snoopy_16 -> Snoopy42 19:39:27 --- quit: kunphuzil (Read error: 110 (Connection timed out)) 20:09:51 --- nick: kunphuzi1 -> kunphuzil 21:16:59 --- join: LOOP-HOG (~chatzilla@sub22-119.member.dsl-only.net) joined #forth 21:19:21 hi 21:28:15 howdy slava, how are you ? 21:28:23 fine 21:38:30 --- join: danniken (CapStone@ppp-70-249-186-85.dsl.ltrkar.swbell.net) joined #forth 22:00:44 --- quit: LOOP-HOG ("ChatZilla 0.9.61 [Mozilla rv:1.7.1/20040707]") 23:59:59 --- log: ended forth/05.07.06