00:00:00 --- log: started forth/17.03.22 00:07:32 --- join: dys (~dys@ip-109-40-1-30.web.vodafone.de) joined #forth 00:36:06 So here's my current thing 00:36:31 For my type system each type will be represented as a number 00:36:40 and I will save a variable which stores the next available type 00:37:03 in order to make an array of a certain type, rather than put the type in index 0, I will simply put a pointer to a separate array with metadata on the first array 00:37:33 That way I don't just keep making these arrays with arbitrary number of metadata in them 00:39:12 So this means all of my arrays will come with the array length at index 0 and if you want to store any more medata about the array you need to store it in the array at pointer index 1 00:40:02 the metadata array will be as follows 00:41:07 index 0 is the length of the metadata array, and index 1 is a string explaining in human terms what is in the array, and at index 2 is an optional place for the type, and I believe after that I may make it a linked list so that people can keep on adding metadata if they want 00:41:49 With this sort of structure I can make trees as follows 00:42:30 each time the tree forks those new branches of a tree have a fixed type, such that a branch of a tree that contains pointers to arrays must only contain pointers to arrays, and branches of the tree that contain bools must only contain bools 00:42:41 not that I will enforce this but I will automate it to be this way 00:46:57 John[Lisbeth]: I'd suggest you to take a look at existing solutions. you don't have to reinvent the wheel 00:50:29 I am simply programming forth to do what I want 00:57:35 how do I take a number that is on the top of my stack and store it in a word? 01:02:58 basically what I've done is: 01:03:55 here cell allot variable end-of-list end-of-list ! : end-of-list end-of-list @ ; 01:04:03 --- quit: ACE_Recliner (Remote host closed the connection) 01:37:11 --- quit: joneshf-laptop (Ping timeout: 256 seconds) 01:46:00 John[Lisbeth]: CONSTANT or VALUE will do what you want, i think but i don't understand the purpose of the line you pasted 01:46:47 constant seems to be fine for my purposes 01:47:13 it allocates a cell of storage and creates a word that returns a pointer to that cell, but just variable foo will do that 01:51:00 this is true 01:52:37 I merely needed to tyep const end-of-list 01:52:50 the reason is I wanted a unique pointer 01:53:09 unique pointer? 01:53:11 that way I could create and end condition when processing an arbitrary amount of pointers 01:53:20 in other words how do you know which pointer means the last pointer 01:53:38 const last-pointer 01:56:47 oh, so the line you pasted isn't literally what appears in the program and there the pointer comes out of some other allocation routine? 01:59:46 no that was a literal line of code now replaced with const end-of-list 02:00:18 basically my linked lists work with cons cells witht he first cll being the value and the second cell being the pointer to the next cons cell 02:00:31 and so I needed to create a pointer which the program would know means the end of the list 02:00:50 a unique pointer with a name 02:01:05 variable foo 02:01:27 sure or const foo either way. Const is four letters so I guess that's simpler 02:01:28 unless you are using some super bizarre implementation that moves allocated storage around 02:01:38 --- join: gravicappa (~gravicapp@ppp83-237-161-161.pppoe.mtu-net.ru) joined #forth 02:01:38 nah I hate moving storage around 02:02:02 variable allocates a cell and creates a word that returns a pointer to that cell 02:02:06 in one step 02:05:17 const seems to also do that 02:06:12 *sigh* 02:08:22 here cell allot constant foo foo . 140437302419824 ok 02:08:37 variable bar bar . 140437302419920 ok 02:09:30 create baz cell allot baz . 139623066685848 ok 02:10:11 all of those create a word that returns a pointer to an allocated cell. one of those is more concise than the others 02:18:07 --- join: xek (xek@nat/intel/x-zfeetptpgbmabggz) joined #forth 02:24:34 --- join: impomatic_ (~impomatic@host81-136-109-20.range81-136.btcentralplus.com) joined #forth 02:25:26 --- quit: impomatic (Ping timeout: 240 seconds) 02:25:29 --- nick: impomatic_ -> impomatic 02:57:46 I dunno it seems like const bar is as concise as variable bar 03:05:25 ehm. which forth are you using? 03:08:43 (for CONST to do anything like that) 03:21:49 --- quit: smokeink (Ping timeout: 240 seconds) 03:30:20 --- join: mtsd (4d6e3d64@gateway/web/freenode/ip.77.110.61.100) joined #forth 03:30:27 --- quit: nighty- (Quit: Disappears in a puff of smoke) 03:56:10 --- join: smokeink (~smoke@175.22.22.0) joined #forth 04:25:00 --- join: nighty (~nighty@220.157.229.123) joined #forth 05:06:35 --- part: mtsd left #forth 06:36:28 --- nick: koisoke_ -> koisoke 06:54:41 --- join: true-grue (~true-grue@176.14.222.10) joined #forth 07:01:49 --- quit: dual (Ping timeout: 240 seconds) 07:20:43 --- join: X-Scale (~ARM@214.20.108.93.rev.vodafone.pt) joined #forth 07:27:04 --- join: BPL (~BPL_@215.2.165.83.dynamic.reverse-mundo-r.com) joined #forth 07:27:17 Hi everyone 07:28:21 I'd like to start learning forth today so I can include it on some c software to eval forth code at runtime. would it be possible to call c external functions using https://github.com/zevv/zForth ? 07:32:38 BPL: from the README it looks like a one-way street from from C to Forth 07:33:20 bavier`: You mean this `Ease interfacing: calling C code from forth is easy through a host system call primitive, and code has access to the stack for exchanging data between Forth and C. Calling forth from C is easy, just one function to evaluate forth code` i guess 07:34:15 oh, I guess I misunderstood 07:34:35 looks like what you want then 07:35:27 bavier`: Yeah... i guess I'll write a simple gui to execute forth scripts to see what this baby can do. Btw, any recommended tutorial/examples to get started with forth? 07:38:43 BPL: https://www.forth.com/starting-forth/ or "Thinking Forth" 07:40:24 --- join: smokeink_ (~smoke@175.22.22.35) joined #forth 07:41:22 bavier`: Cool, ty! 07:42:26 btw, any recommended forth package ready to test stuff on windows? 07:43:41 i mean, i see quie a lot of them here http://www.forth.org/compilers.html , any recommendation to get up & running? 07:49:17 BPL: I think Gforth has a windows port, installable via cygwin 07:50:41 bavier`: Gforth... ok, google was mentioning quite a lot this one, found this --> https://github.com/mcandre/gforth-win 07:52:27 --- quit: smokeink_ (Quit: leaving) 07:53:39 --- quit: MrBusiness (Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel) 07:54:15 --- join: joneshf-laptop (~joneshf@c-73-220-86-28.hsd1.ca.comcast.net) joined #forth 07:55:31 --- join: MrBusiness (~ArcMrBism@104-50-90-48.lightspeed.brhmal.sbcglobal.net) joined #forth 08:07:53 what's really cool is that links in a linked list are recyclable simply by pushing them onto a really long linked list of deleted links 08:08:20 and also that you can implement doubly linked lists out of singly linked lists creating a uniform size for both 08:09:34 that's called pooling 08:10:19 memory pooling* 08:16:53 yeah pooling is good whenver you can do it. And pooling for linked lists is especially nice 08:17:44 any time I have an array with an even number I can recycle it as linked lists 08:18:36 what is really hard is recycling arrays themselves 08:19:12 I could try to keep large arrays together as large arrays are very valuable for recycling 08:19:30 for that you would need some kind of real memory management, like heap allocation 08:20:15 well if I have an array of 500 cells waiting to be recycled and I need to make an array of of 200 cells then I can eat up 200 of that 500 cell array and I am left with a 300 cell array waiting to be recycled 08:20:52 but that would mean I would have to sort the pointers to all of my arrays waiting to be recycled based on arraysize 08:21:03 yes, like I said - now you're getting into something like heap allocation 08:22:28 --- quit: bavier` (Quit: Leaving) 08:23:42 so I basically need a min heap 08:23:53 of arrays 08:31:31 --- join: neceve (~ncv@86.125.247.109) joined #forth 08:31:32 --- quit: neceve (Changing host) 08:31:32 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 09:22:08 --- quit: smokeink (Remote host closed the connection) 09:33:14 --- join: GeDaMo (~GeDaMo@212.225.82.133) joined #forth 11:05:41 --- quit: neceve (Quit: Konversation terminated!) 11:18:18 --- quit: gravicappa (Ping timeout: 240 seconds) 12:33:51 --- join: gravicappa (~gravicapp@ppp83-237-165-223.pppoe.mtu-net.ru) joined #forth 12:56:11 --- join: circ-user-cEMst (~circuser-@68.21.148.119) joined #forth 14:12:36 --- quit: GeDaMo (Remote host closed the connection) 14:22:22 --- quit: gravicappa (Ping timeout: 260 seconds) 14:26:49 --- quit: proteusguy (Remote host closed the connection) 15:05:13 --- quit: true-grue (Read error: Connection reset by peer) 15:08:31 --- quit: tangentstorm (Ping timeout: 264 seconds) 15:15:20 --- quit: impomatic (Read error: Connection reset by peer) 15:18:46 by any chance, anyone here familiar with zforth https://github.com/zevv/zForth? 15:21:52 --- join: tangentstorm (~michal@li1285-84.members.linode.com) joined #forth 15:33:03 --- join: ACE_Recliner (~ACE_Recli@c-50-165-178-74.hsd1.in.comcast.net) joined #forth 16:30:01 --- quit: nighty (Remote host closed the connection) 17:05:35 --- join: luser1 (~luser1@h69-21-248-248.crlbnm.broadband.dynamic.tds.net) joined #forth 17:06:11 --- quit: karswell` (Read error: Connection reset by peer) 17:08:05 --- join: karswell` (~user@209.93.49.216) joined #forth 17:25:41 BPL: I don't, but it looks interesting. 17:26:14 --- quit: karswell` (Ping timeout: 260 seconds) 17:27:10 pointfree[m]: Yeah, indeed, I was asking cos maybe some of the devs were around the channel. I wanted to know to know how to execute a whole script instead of evaluating line per line 17:35:40 --- join: dual (~bonafide@cpe-74-75-153-119.maine.res.rr.com) joined #forth 17:46:36 --- join: vsg1990 (~vsg1990@static-72-88-80-103.bflony.fios.verizon.net) joined #forth 17:47:50 --- join: nighty- (~nighty@d246113.ppp.asahi-net.or.jp) joined #forth 17:56:20 --- join: hobbes- (~hobbes@bnc.jfng.fr) joined #forth 18:14:47 --- join: neceve (~ncv@86.125.247.109) joined #forth 18:14:47 --- quit: neceve (Changing host) 18:14:47 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 20:00:07 --- quit: circ-user-cEMst (Ping timeout: 264 seconds) 20:02:11 --- join: smokeink (~smoke@171.37.133.39) joined #forth 20:20:17 --- quit: luser1 (Ping timeout: 260 seconds) 20:57:35 --- quit: neceve (Quit: Konversation terminated!) 21:13:06 --- quit: BPL (Read error: Connection reset by peer) 21:39:35 --- join: Zarutian (~zarutian@46.22.110.168) joined #forth 21:56:13 --- join: circ-user-cEMst (~circuser-@68.21.148.119) joined #forth 22:00:09 --- quit: circ-user-cEMst (Ping timeout: 240 seconds) 22:01:41 --- quit: smokeink (Ping timeout: 268 seconds) 22:22:03 --- quit: vsg1990 (Quit: Leaving) 22:45:40 --- join: smokeink (~smoke@182.88.36.83) joined #forth 23:05:48 --- join: nighty-__ (~cp@www.taiyolabs.com) joined #forth 23:09:41 --- join: crypto (~z0d@unaffiliated/z0d) joined #forth 23:10:04 --- nick: crypto -> Guest59140 23:13:25 --- quit: nighty-_ (Ping timeout: 240 seconds) 23:13:25 --- quit: z0d (Ping timeout: 240 seconds) 23:52:35 --- quit: Zarutian (Quit: Zarutian) 23:59:59 --- log: ended forth/17.03.22