00:00:00 --- log: started forth/09.09.29 00:03:19 --- join: ASau (n=user@77.246.230.241) joined #forth 00:04:24 --- quit: neceve (Read error: 110 (Connection timed out)) 00:39:35 --- quit: ASau (Read error: 104 (Connection reset by peer)) 00:40:05 --- join: ASau (n=user@77.246.230.241) joined #forth 00:49:31 --- join: w7tek_ (n=w7tek@knowlton.dsl.xmission.com) joined #forth 00:50:25 --- quit: w7tek (Read error: 54 (Connection reset by peer)) 00:50:26 --- nick: w7tek_ -> w7tek 01:13:04 --- quit: ASau (Read error: 104 (Connection reset by peer)) 01:13:34 --- join: ASau (n=user@77.246.230.241) joined #forth 01:22:51 --- quit: nighty^ ("going home") 01:40:19 --- join: sunwukong (n=vukung@business-80-99-161-225.business.broadband.hu) joined #forth 02:07:39 --- quit: ASau (Read error: 104 (Connection reset by peer)) 02:38:14 --- join: ASau (n=user@77.246.230.241) joined #forth 03:06:00 --- join: segher (n=segher@84-105-60-153.cable.quicknet.nl) joined #forth 03:08:05 --- join: DrunkTomato (n=DEDULO@ext-gw.wellcom.tomsk.ru) joined #forth 03:20:04 --- join: GeDaMo (n=gedamo@212.225.115.96) joined #forth 03:43:32 --- join: neceve (n=ncv@unaffiliated/neceve) joined #forth 04:38:24 --- quit: GeDaMo ("Leaving.") 06:49:26 --- log: started forth/09.09.29 06:49:26 --- join: clog (n=nef@bespin.org) joined #forth 06:49:26 --- topic: 'Welcome to #forth. We discuss the Forth programming language and a variety of technical subjects. Introduction and Helpful Reading: http://forthfreak.net/index.cgi?FnFC | ANS/ISO Forth Standard doc: http://tinyurl.com/nx7dx | Gforth compiler: http://tinyurl.com/s8uho | http://quartus.net/search | Paste: http://forth.pastebin.ca | http://www.isforth.com' 06:49:26 --- topic: set by I440r on [Fri Feb 13 08:39:24 2009] 06:49:26 --- names: list (clog ASau mathrick sswam yiyus crc DrunkTomato segher sunwukong gogonkt jauaor Al2O3 schmx ENKI-][ Snoopy_1611 I440r ams` aguaithefreak tgunr malyn foxes nighty_ aguai Frek _Jordan_ scj uiu probonono madgarden kleinjt jimt uiu_ gnomon mahtawkmeister tarbo) 06:50:32 --- join: GeDaMo (n=gedamo@212.225.115.96) joined #forth 07:14:38 --- join: _mathrick (n=mathrick@130.226.87.164) joined #forth 07:15:38 --- quit: mathrick (Read error: 145 (Connection timed out)) 07:29:49 --- nick: _mathrick -> mathrick 07:35:08 --- quit: sunwukong ("bye") 07:43:24 --- quit: ASau ("off") 08:13:16 --- quit: jauaor () 08:26:47 --- join: kar8nga (n=kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 09:06:09 anyone else have trouble getting gforth to compile under macosx 10.6? 09:10:09 --- quit: GeDaMo ("Leaving.") 09:29:49 --- join: pgas (n=user@pdpc/supporter/active/pgas) joined #forth 09:41:46 --- quit: mathrick (Read error: 145 (Connection timed out)) 10:03:14 --- join: foxchip (n=fox@166.187.199.96) joined #forth 10:11:00 --- join: f[x] (n=user@95.133.47.89) joined #forth 10:12:16 --- quit: foxchip (Read error: 145 (Connection timed out)) 10:19:16 --- join: ASau (n=user@83.69.227.32) joined #forth 10:20:20 --- quit: DrunkTomato () 10:20:39 --- join: mathrick (n=mathrick@130.226.70.177) joined #forth 10:33:01 --- join: tathi (n=josh@dsl-216-227-91-166.fairpoint.net) joined #forth 10:34:07 tgunr: I think that's a perennial problem. At least, Dennis Ruffer seems to report it fairly frequently. 10:34:27 You might have a look at the archives of the gforth mailing list to see if any of the discussion is helpful... 10:35:28 yeh, looking at it now 10:35:49 What's the problem? 10:36:00 thanks, does Dennis get on here very often? 10:36:21 compiling gforth on OSX 10:36:26 Hm. 10:36:32 let me run make again 10:36:33 Let me see... 10:36:35 not that I know of. gforth mailing list, and occasionally comp.lang.forth 10:36:56 ok, Deniis used to work for me at Apple :) 10:37:06 Heh. 10:37:20 I don't remember problem building on OSX. 10:37:42 --- join: madwork (n=madgarde@204.138.110.15) joined #forth 10:38:58 Hmm. Well, I don't really know anything about it. I just remember seeing the subject come up on the mailing list a couple of times. 10:39:44 http://paste.lisp.org/+1VTV 10:40:15 Switch to 32 bit ABI. 10:40:15 looks like some config var is wrong 10:40:33 It MAY be unsupported. 10:40:51 We have lots of problems with 64-bit ABI in OSX. 10:41:10 I.e. many packages do. 10:41:12 looking for it in the configure 10:48:47 sigh, setting -m32 causes a different error ./128bit.h:25: error: unable to emulate 'TI' 10:49:25 Yeah, gforth is portable. 10:53:20 --- quit: kar8nga (Remote closed the connection) 10:54:36 where the heck is __mode__ defined? I can't find it in the sources. 10:57:40 I think, it is built-in. 10:57:51 Like __func__, __line__ and likes. 10:58:00 ah 10:58:07 I hate C 11:03:53 I like C 11:04:17 But, it needs a FORTH preprocessor instead of the current crap. ;) 11:04:24 I'm unlike C. 11:04:35 madwork: FICL. 11:04:45 ASau, Forthy 11:04:46 madwork: ATLAST. 11:05:03 i dislike typed languages in general, as soon as you coerce data or typecast you have defeated the purpose 11:05:19 tgunr: learn ML. 11:05:25 I don't really care, as long as I can get the job done with a minimum of effort 11:05:25 ML? 11:05:30 Any dialect works. 11:05:38 F# ? ;) 11:05:42 http://standardml.org/ 11:06:24 Personally, I am now enjoying Marten immensely 11:06:37 http://andescotia.com 11:06:41 reading 11:07:57 * ASau is reading SWIG manual. 12:11:30 --- quit: sswam ("leaving") 12:23:48 --- join: Quartus` (n=Quartus`@74.198.8.57) joined #forth 12:38:46 --- join: jauaor (n=araujo@190.38.49.150) joined #forth 12:41:11 --- join: Judofyr (n=Judofyr@cC694BF51.dhcp.bluecom.no) joined #forth 12:45:51 --- quit: pgas ("/quit") 13:18:19 --- quit: ASau (Remote closed the connection) 13:18:45 --- join: ASau (n=user@83.69.227.32) joined #forth 13:23:32 --- join: impomatic (n=John@nat65.mia.three.co.uk) joined #forth 14:10:27 --- quit: f[x] (Read error: 145 (Connection timed out)) 14:19:29 --- part: impomatic left #forth 14:23:28 --- mode: ChanServ set +o crc 15:14:49 --- quit: ASau (Remote closed the connection) 15:17:21 --- join: ASau (n=user@83.69.227.32) joined #forth 15:28:22 --- quit: tathi ("leaving") 15:42:39 --- quit: jauaor () 16:02:48 anyone seen quiznos? 16:02:59 nope 16:18:33 --- quit: mathrick (Read error: 145 (Connection timed out)) 16:54:34 i THINK this http://dpaste.com/100122/ is a complete opcode table for all "add or adc sbb and sub xor cmp" opcodes in all addressing modes 16:55:16 where p is the operation being performed,. +d and +w are direction and word bits added to the first byte of the opcode 16:55:26 q and r are both registers 16:55:56 dw is a 16 bit word/ dc is a signed 8 bit i? is an immediate byte or immediate word depending on the state of the +w bit 16:56:50 i can compress this entire table down but i expanded it to show each modrm addressing mode separatly 16:57:45 ugh no. i need to remove "byte" form those entries 16:57:56 the +w is whats specifying size now 16:58:02 thats left over from my test assembly 16:58:31 hrm ill replace "byte" with s where s can be byte or word (meaning size) 17:10:19 morning 17:20:14 ASau, are you free to talk about fflib.fs? 17:26:11 --- join: nighty^ (n=nighty@210.188.173.245) joined #forth 17:26:56 --- join: tathi (n=josh@dsl-216-227-91-166.fairpoint.net) joined #forth 17:27:51 foxes: what version of gforth are you using? 17:28:45 0.7.0 17:29:53 What do you want to know about fflib.fs? 17:31:45 I am trying to connect Berkeley DB lib with gforth, use fflib.fs. 17:31:52 but met lots problem. 17:32:15 Ah. You realize that Berkeley DB accesses almost everything through a huge struct that you'd have to duplicate? 17:32:27 What kind of problems? 17:32:33 yesterday, I learned more from http://www.shockfamily.net/cedric/fflib.html 17:32:47 sure 17:33:13 but, i still have some problem. 17:33:38 for example, 17:33:54 how to create a pointer parameter in forth? 17:34:03 create dbp 1 cells allot <--- I did. 17:34:14 it look like ok 17:34:25 or `variable dbp`, basically the same thing 17:34:45 but yeah, should be ok 17:35:17 and, I defined a parameter with NULL 17:35:22 : NULL 0 emit ; 17:35:28 is it right ? 17:36:08 probably not. What it is supposed to do? 17:37:12 db_create(&dbp, NULL, 0) <--- in the c simple 17:37:33 I want to do the same things in gforth 17:37:40 just pass 0 for NULL 17:37:58 you could do `0 constant NULL` and use that if you really want 17:38:07 int db_create(DB **dbp, DB_ENV *dbenv, u_int32_t flags); 17:38:32 0 constant NULL <--- cool 17:38:35 right, so `libdb db-create ptr ptr int (int) db_create 17:38:42 dbp 0 0 db-create 17:38:56 nod 17:39:08 then comes up with the DB->open 17:39:13 0 emit would display the character '\0' 17:39:26 int DB->open(DB *db, DB_TXN *txnid, const char *file, const char *database, DBTYPE type, u_int32_t flags, int mode) 17:39:48 yeah. For that, you have to get the whole dbp structure correct, so you know where the correct function pointer is. 17:40:16 dbp structure.... 17:40:40 The thing that dbp points to. 17:40:46 It's a big huge structure. 17:40:57 -> indexes into it to find open (or whatever else) 17:40:58 ..... 17:41:16 how to indexes into it? 17:41:29 add the correct offset 17:42:20 how to ? I am new to it. 17:42:20 Do you understand what "." and "->" do in C? 17:42:41 no, but I can take a quick look. 17:44:16 Have you used any low-level languages before? 17:44:42 a little assemble, a little C. 17:45:10 ok, open up db.h and find "struct __db {" 17:45:53 found 17:46:18 That's what your dbp is pointing to 17:46:46 so pgsize is at that address, followed by priority, *db_append_recno, and so on. 17:47:04 down 244 lines or so you'll find *open 17:47:47 int (*open) __P((DB *, 17:47:47 697 const char *, const char *, DBTYPE, u_int32_t, int)); 17:48:51 there are , in gforth, ptr ptr ptr DBTYPE int int (int) open 17:49:01 what's the kind of DBTYPE? 17:49:09 Yes, but first you have to find the address of the function 17:49:32 I dunno. What's its type in C? 17:51:10 the first ptr will be the address of the function, isn't it? 17:52:23 what first pointer? 17:53:00 the DB->open first pointer: DB *. 17:53:31 i found another : typedef enum { .... } DBTYPE. DBTYPE is a enum? 17:53:36 Heh. No wonder you're having trouble. 17:53:52 enum is the same as int, basically 17:54:12 or unsigned int. or another integer type. 17:55:05 fflib just has int float double longlong ptr 17:55:13 the separate enumerators are int (or unsigned int, if not all fit int; and some compilers try long long etc. as well) 17:55:48 but the enum can have a smaller type than its enumerators 17:57:01 Sure. But as an argument type to a function, it will be passed as an int, generally. 17:57:08 say you do enum bool { false=0, true=1 }; then a variable of type "enum bool" can be a char, but "false" will be an int 17:57:15 no 17:57:23 it will be passed as the type it is. 17:58:11 :) I read some information about . and -> 17:58:19 understand a little 17:58:24 with most ABIs, any type 32 bits or less will be passed (in the low bits of) a 32-bit entity, sure, if that is what you mean? 17:58:44 Yes. We're talking about using gforth's interface to the ffcall library to do FFI here. 17:59:13 i'll bow out then, i don't know ffcall 17:59:30 He doesn't even know much of anything about C, so I figured there was no point going into details about its type system. :) 17:59:33 let me just say "good luck", ffi isn't always easy :-P 17:59:42 ouch 17:59:50 heh 18:00:21 It was worth a try 18:02:33 I read some about enum, and understand it 18:02:52 foxes: I just realized, I don't even know how to do this. 18:03:09 I could probably come up with a hack to do it with the new libcc interface, but even there... 18:03:20 tathi: when i need to interface between things, i usually make everything unsigned long. saves some headaches :-) 18:03:33 Maybe you should go back to sqlite; it has a much simpler interface. 18:03:43 segher: yeah, ditto. 18:03:49 typedef enum { DB_BTREE=1, DB_HASH,......} DBTYPE; should I just : 1 constant DB_BTREE ? 18:04:35 segher: So there are actually ABIs that pass small types in less than 32 bits? 18:04:50 foxes: sure. 18:04:54 tathi, if you dont know this too, what about have a try on it? 18:05:39 foxes: because it's ugly and I don't have any use for it. I just thought I'd take a few minutes and try to point you in the right direction. 18:05:53 Actually I'm not sure the ffcall lib even has any way to do this. 18:05:55 tathi: yes 18:06:18 segher: for instance? :) 18:06:20 most importantly, some do not sign-extend or zero-extend 18:06:25 ah 18:06:32 that would do it :) 18:07:05 so e.g. when you pass a char 'A' it might arrive as x'abcdef41 in r0 or something 18:07:31 tathi, er.......That sounds terrible. 18:07:34 i think some of the arm abis are like that, but don't quote me on it 18:08:43 segher: I can see that. I was picturing some ABI that passed mixed-size parameters in a stack frame or something, which seemed pretty odd. Not extending the values makes much more sense. 18:09:26 i don't know any ABI that uses param passing stack slots of a different size than its registers 18:09:38 well, unless you count microsoft OSes 18:09:46 next, comes with the DB_CREATE: #define DB_CREATE 0x000001 18:11:32 can I just use: 1 constant DB_CREATE ? 18:11:49 yes 18:14:14 at last, I have string about filename 18:14:23 #define DATABASE "access.db" <--- C 18:14:39 create DATABASE ," access.db" <-- I did in Gforth 18:15:09 DATABASE ftoc <----- follow the TUT, I need convert forth string to c 18:15:14 : DATABASE s" access.db" ; 18:16:26 oh, yes, segher 18:16:50 create.. just has a (addr) but s" has a (addr u) 18:16:57 yeah 18:17:23 you could do DOES> COUNT or something, but if you have only one string, why bother 18:18:14 nod 18:18:17 int DB->open(DB *db, DB_TXN *txnid, const char *file, const char *database, DBTYPE type, u_int32_t flags, int mode); 18:18:24 libdb DB->open ptr ptr ptr ptr ptr n n (int) DB->open 18:18:32 this what I did. 18:18:43 that won't work. 18:18:50 DB->open is not one name in C 18:19:13 tathi: yeah, would be DB->open(DB then :-P 18:19:48 As I said, fflib.fs doesn't handle this sort of thing. 18:19:50 hehe 18:20:04 hehe, yes 18:20:12 it cant handle -> i think. 18:20:16 yes 18:20:17 foxes: if you do not know C well, and do not know Forth well, and do not know ABIs much at all, and are new to FFI, i recommend you give up 18:20:39 sure 18:20:58 just way too big a bite to chew at once 18:21:20 Is there any way to do with gforth + database? 18:22:55 or, just wrote on by myself in forth? 18:24:40 --- join: gogonkt_ (n=info@59.38.201.187) joined #forth 18:27:14 --- quit: gogonkt (Read error: 145 (Connection timed out)) 18:30:09 or, try on sqlite? 18:31:50 Dunno. What are you trying to accomplish? 18:35:21 tathi, i want to use a database with gforth 18:36:04 store some information for later use. or for a forth-cgi use. 18:36:44 sqlite or write by myself? is a question...:) 18:37:21 Oh, write it by yourself. You'll learn more about Forth that way. 18:37:31 :) 18:42:02 sure 18:42:18 I did learn lots from you, thank you. 18:46:06 --- quit: tathi ("leaving") 18:49:12 --- join: w7tek (n=w7tek@knowlton.dsl.xmission.com) joined #forth 19:08:03 --- quit: Al2O3 (Read error: 60 (Operation timed out)) 19:17:17 --- quit: Judofyr (Remote closed the connection) 19:19:38 --- quit: w7tek ("Goodbye!") 19:25:32 Database Design, Elements of V3, 45 19:25:40 http://www.forth.org/fd/FD-V03N2.pdf 20:10:10 --- join: DrunkTomato (n=DEDULO@217.18.135.36) joined #forth 20:14:26 --- quit: DrunkTomato (Client Quit) 20:16:25 --- quit: segher ("This computer has gone to sleep") 20:18:40 --- join: Al2O3 (n=Al2O3@c-24-9-43-112.hsd1.co.comcast.net) joined #forth 20:22:06 --- join: DrunkTomato (n=DEDULO@ext-gw.wellcom.tomsk.ru) joined #forth 20:35:37 --- quit: nighty^ (Excess Flood) 20:36:23 --- join: nighty^ (n=nighty@210.188.173.245) joined #forth 21:14:43 --- quit: DrunkTomato () 21:42:45 --- quit: Al2O3 () 21:43:06 --- join: Al2O3 (n=Al2O3@c-24-9-43-112.hsd1.co.comcast.net) joined #forth 22:15:15 --- quit: Al2O3 (Read error: 110 (Connection timed out)) 22:37:19 --- quit: gogonkt_ (Read error: 60 (Operation timed out)) 22:43:49 --- join: gogonkt (n=info@59.38.201.187) joined #forth 23:08:50 --- quit: ASau (Success) 23:22:24 --- join: f[x] (n=user@151-85-133-95.pool.ukrtel.net) joined #forth 23:42:22 --- join: ASau (n=user@host17-231-msk.microtest.ru) joined #forth 23:59:59 --- log: ended forth/09.09.29