00:00:00 --- log: started forth/16.04.06 00:43:32 --- quit: ASau (Remote host closed the connection) 00:43:51 --- join: ASau (~user@netbsd/developers/asau) joined #forth 00:55:55 --- quit: ASau (Ping timeout: 276 seconds) 02:19:49 --- quit: DocPlatypus (Quit: Leaving) 02:46:57 --- quit: wa5qjh (Quit: wa5qjh) 03:08:46 --- join: novaskell (~novaskell@31.205.156.216) joined #forth 03:16:04 --- quit: novaskell (Read error: Connection reset by peer) 03:16:14 --- join: novaskell (~novaskell@31.205.156.216) joined #forth 03:18:33 --- join: true-grue (~true-grue@176.14.216.104) joined #forth 05:49:04 --- quit: DGASAU (Ping timeout: 276 seconds) 05:52:32 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 05:55:19 --- quit: novaskell (Ping timeout: 246 seconds) 06:10:49 --- quit: rpcope (Ping timeout: 260 seconds) 06:13:56 --- join: rpcope (~rpcope@162.245.217.4) joined #forth 06:14:41 --- quit: DGASAU (Read error: Connection reset by peer) 06:16:24 --- join: DGASAU (~user@lmpc.drb.insel.de) joined #forth 06:20:01 --- quit: mnemnion (Remote host closed the connection) 06:31:17 --- join: picobit (~tomkl@unaffiliated/tomkl) joined #forth 06:55:03 --- quit: picobit (Quit: leaving) 08:16:56 --- quit: dys (Ping timeout: 240 seconds) 08:23:11 --- join: dys (~dys@ip-109-44-1-134.web.vodafone.de) joined #forth 08:31:41 --- quit: dys (Ping timeout: 250 seconds) 10:18:13 --- join: kc5tja (~sfalvo@166.78.62.138) joined #forth 10:18:13 --- mode: ChanServ set +v kc5tja 10:39:22 --- quit: bb010g (Quit: Connection closed for inactivity) 10:56:35 --- join: ErhardtTheWhite (~quassel@178.167.254.41.threembb.ie) joined #forth 10:57:13 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 10:58:55 --- quit: ErhardtTheWhite (Remote host closed the connection) 11:32:25 --- join: bedah (~bedah@host-091-097-171-168.ewe-ip-backbone.de) joined #forth 12:04:08 --- join: real-grue (~true-grue@176.14.216.104) joined #forth 12:14:48 --- join: JDat (JDat@89.248.91.5) joined #forth 13:03:29 --- join: mnemnion (~mnemnion@c-98-207-249-139.hsd1.ca.comcast.net) joined #forth 13:18:14 --- join: mat4 (~Claude@ip5b40bd37.dynamic.kabel-deutschland.de) joined #forth 13:19:51 --- quit: bedah (Quit: Ex-Chat) 13:20:59 hello 13:26:07 --- join: starq (8115888e@gateway/web/freenode/ip.129.21.136.142) joined #forth 13:26:41 Hello, anyone available for a few questions? I've hit a wall 13:27:05 probably I can answer your questions 13:28:06 ok! I have a tree of 2 different structs, and I need to be able to tell the structs apart 13:28:44 I tried putting an id cell in the beginning of the structs but I don't think that's working 13:29:51 --- quit: JDat (Ping timeout: 244 seconds) 13:30:20 if both structures are static and does nkt change you know both data representations, right ? 13:30:42 ^nkt=not 13:33:11 Yes, I think? one struct is a terminal node of the tree, and the other is a non-terminal node. Each hold different data 13:35:37 --- join: novaskell (~novaskell@31.205.156.216) joined #forth 13:40:41 --- join: picobit (~tomkl@unaffiliated/tomkl) joined #forth 13:41:33 so you can differenciate both nodes by its format (probably both structures are different in size) 13:42:29 sorry, I mean you can identify both structures by there format or size 13:43:20 yes, they are different sizes 13:46:18 for me it seems an ID makes sense (how about the structure size?) 13:48:30 I thought so too, but something is going wrong. Maybe it's because the ID word is the same for both structures? 13:49:06 I think size might be easier, is there any way I can tell the size of an instance of a struct if I have its memory address? 13:53:41 what Forth system do you use ? 13:53:53 gforth 0.7.0 13:54:38 starq: I would use tags, and map tag to size. 13:55:05 I guess you use the Gforth structure word set. If so just add a structure field for the size (use it as tag) 13:55:33 you can also define some words implementing tagged pointers 13:56:04 the tags need to be at the same alignment, right? 13:56:19 mat4: maping size to tag doesn't make sense to me :) . 13:57:02 sorry, I mean using the structure size as tag 13:58:04 mat4: That is what I thought. What if there are 2 types having same size?! 13:58:42 luckily that isn't the case, one of my structs has a few more cells than the other 13:58:57 --- join: eazar001 (~idpispopd@2602:306:3970:760:d8ed:b0d:3898:dfc7) joined #forth 13:59:04 DKordic: use an unique identifer 14:01:17 starq: DKordic is right though that this approach is not general applicable. However, in your case using the structure size as tag can be of advantage because it allows indexed access to structure member with small overhead) 14:01:30 mat4: You mean Tagged Pointers? 14:02:19 --- join: ASau (~user@netbsd/developers/asau) joined #forth 14:03:03 it is odd then that I couldn't get it to work when I tried using unique IDs 14:03:13 tagged pointers would help in a more general way, yes 14:04:57 starq: Minimal example would help (https://paste.debian.net/). 14:05:05 yes 14:06:04 --- join: vsg1990 (~vsg1990@pool-74-110-57-203.bflony.fios.verizon.net) joined #forth 14:09:48 I will show you my 2 structures and their defining functions, and the function I call to determine the type of the structure? 14:12:06 just post your code to Gist for example, so we can take a look: https://gist.github.com/ 14:15:10 https://paste.debian.net/hidden/79f9c96a/ 14:17:09 Ha-ha-ha! 14:17:13 Forth is easy to use! 14:17:32 starq: check if %allot returns the address which you expect. 14:22:34 I'm not sure what you mean 14:24:37 Plus you have space in "make-struct 2". 14:25:19 oh, that was because I renamed it for clarity when I pasted it in, my mistake 14:25:43 :D 14:26:27 You're using a language with very weird syntax where each space matters. :) 14:26:47 yes, I've noticed :P 14:27:50 chuck moore is a martian, btw. 14:32:36 --- join: BitPuffin|osx (~isak@15.54.99.195.dyn.plus.net) joined #forth 14:39:09 starq: ``sstrut%'' is another type? WTF is ``end-struct struct1%'' on line 27?! 14:39:26 :D 14:40:09 WTF is ``Structure 1'', ``Structure 2'' and ``?isstructure1 Function''? 14:40:22 bweh, I made a few errors when I renamed things 14:40:22 s/another type/another typo/ 14:40:43 they were just labels for your benefit 14:41:10 You're using a language with very weird syntax where each space matters. 14:41:11 ``Labels''?! Comments? 14:46:13 --- join: wa5qjh (~Thunderbi@203.111.224.33) joined #forth 14:48:17 starq: because the index returned you will need a base address of a specific structure defination to access it members 14:49:00 every member reserve also one cell 14:51:26 also remember end-struct return the index to the following memory location after the last element which is also the size of a structure 14:53:40 hope this helps 14:53:41 ciao 14:53:49 --- part: mat4 left #forth 14:53:49 yes, thank you mat4 14:54:00 what is the struct for? 14:57:06 a tree 15:00:07 --- join: mat4 (~Claude@ip5b40bd37.dynamic.kabel-deutschland.de) joined #forth 15:00:17 --- part: mat4 left #forth 15:00:25 ah 15:01:04 right... can't help much there (I'll see if I can implement it) 15:16:13 --- quit: real-grue (Read error: Connection reset by peer) 15:16:13 --- quit: true-grue (Read error: Connection reset by peer) 15:17:08 --- quit: karswell (Read error: Connection reset by peer) 15:18:17 --- join: karswell (~user@76.153.208.46.dyn.plus.net) joined #forth 15:23:25 --- quit: Zarutian (Ping timeout: 240 seconds) 15:32:51 --- quit: wa5qjh (Quit: wa5qjh) 16:00:51 I'm looking for a list of the bare minimum amount of Forth words that would need to be defined if writing a new Forth implementation in another language. 16:01:29 So a list of words that cannot be defined by using other words. 16:01:39 If that makes sense. 16:11:04 vsg1990: How about [[http://www.excamera.com/sphinx/fpga-j1.html][J1]] :) ? 16:12:12 I'll take a look through those links. Thanks. 16:49:13 --- quit: karswell (Ping timeout: 248 seconds) 16:52:24 --- quit: starq (Ping timeout: 250 seconds) 16:59:57 vsg1990: You should look up C. H. Ting's Zen of Forth book, which includes a guide to EForth. He lists about 31 primitives which are best implemented as primitives, and on which the remainder of the entire EForth dictionary is built. 17:00:53 I've does it in 6 or 7 absolute primitives. 17:02:52 0bra, swap, nand, +, >r, r>, dup. 17:03:21 xor was horrible to make out of nand. 17:03:30 You only really need one: decrement and branch. That doesn't make it a good idea. ;) 17:03:45 it was slow-slow-slow. 17:04:09 I think 25 to 40 primitives is a reasonable range for a reasonably performing Forth system. 17:04:14 I think about 30 primitive words is a nice balance. 17:04:21 (And, yes, it'll still be slow. But it'll be usably slow. :) ) 17:04:48 * kc5tja nods 17:05:12 or... just expose all the asm ops. 17:30:20 --- quit: eazar001 (Quit: Leaving) 18:04:13 --- join: Kumool (~kumool@adsl-72-50-87-28.prtc.net) joined #forth 18:58:28 --- quit: novaskell (Ping timeout: 244 seconds) 18:59:25 --- join: novaskell (~novaskell@31.205.156.216) joined #forth 19:00:44 --- join: nighty (~nighty@202.224.50.1) joined #forth 19:24:16 --- join: tangentstorm (michal@2600:3c03::f03c:91ff:fec8:caab) joined #forth 19:58:42 --- quit: Keshl (Quit: Konversation terminated!) 20:15:51 --- quit: bluekelp (Ping timeout: 250 seconds) 20:17:15 --- join: bluekelp (~bluekelp@bluekelp.com) joined #forth 20:18:20 --- quit: nighty (Ping timeout: 268 seconds) 20:20:03 --- join: nighty (~nighty@202.224.50.1) joined #forth 20:32:09 --- quit: BitPuffin|osx (Ping timeout: 248 seconds) 20:48:09 --- quit: Kumool (Read error: Connection reset by peer) 21:22:02 --- quit: vsg1990 (Quit: Leaving) 22:47:09 vsg1990, Check out "FIRST & THIRD almost FORTH" http://www.ioccc.org/1992/buzzard.2.design 23:06:52 --- join: JDat (JDat@89.248.91.5) joined #forth 23:15:21 --- quit: JDat (Ping timeout: 248 seconds) 23:28:26 --- quit: picobit (Ping timeout: 264 seconds) 23:59:59 --- log: ended forth/16.04.06