IRC Log - 2025-02-13 - ##forth

Channel: ##forth
Total messages: 29
Time range: 00:02:06 - 16:48:37
Most active: vms14 (15), KipIngram (4), xentrac (3)
00:02:06 ##forth <KipIngram> I pretty universally regard "primitives" as words written in machine code, and words that use the return stack as "definitions."
00:02:56 ##forth <KipIngram> Primitives don't modify the return stack - they just thread one to the next to the next.
00:05:03 ##forth <KipIngram> Actually this is going to be code threaded, so it won't really have "definitions." Among the vm instructions will be call instructions, and it'll be fairly conventional at that level.
00:05:31 ##forth <KipIngram> The "return stack" will be the vm's return stack.
03:15:23 ##forth <vms14> what do you guys use as word separator? I see the dot used several times even by chuck it seems and also in the starting forth examples
03:15:32 ##forth <vms14> I see some others using the dash instead
03:15:54 ##forth <vms14> I like the dot but I was trying to use the dash since it seemed to be more common
03:20:42 ##forth <xentrac> I use the dash mostly, but I think you should use the dot if that's what you like more
03:21:08 ##forth <xentrac> I don't think it matters much what's more common
03:21:39 ##forth <xentrac> you could also use underscore, apostrophe, colon, etc.
03:22:16 ##forth <vms14> I.m.not.sure.of which-one-is-better
03:22:38 ##forth <vms14> I guess the dash
04:13:32 ##forth <crc> vms14: generally I use colon for namespaces, a dash in multi-word names, and . as a denotation for words that access fields in a structure. E.g.,
04:14:48 ##forth <crc> d:latest.name (return_pointer_to_contents_of_name_field_in_latest_header)
08:32:36 ##forth <user51> Maybe it's just me, but a lot of 'factored' code ends up looking like an expression tree(?) that you need to manually walk yourself.
10:53:25 ##forth <veltas> user51: Yeah, this is one way to cope with a lack of parens in Forth
10:53:52 ##forth <veltas> It's definitely one of the big reasons to use lots of small word defs, to make balancing easier
14:04:27 ##forth <amirouche> re database: scanning with grep through english wikipedia take 3 hours; that requires some patience
14:17:10 ##forth <vms14> crc your prefixes are actually a smart choice since they provide some sort of namespace in the most simple way
14:17:34 ##forth <vms14> I do not really like to have to prefix everything though
14:18:09 ##forth <vms14> but I could make something to add the prefixes for me
14:19:03 ##forth <vms14> I like the fact you use the dot like "dot notation" in other languages
14:19:48 ##forth <vms14> it will be clear that you are accessing something
14:21:44 ##forth <vms14> I was trying yesterday to follow the starting forth book with my interpreter
14:21:45 ##forth <vms14> https://dpaste.com/5GD9W69U3.txt
14:21:57 ##forth <vms14> this works in my interpreter
14:22:54 ##forth <vms14> I have to keep going to see how much can be the same
14:23:44 ##forth <vms14> I would like to make create and does> behave exactly the same too, not sure if I will be able to
16:48:37 ##forth <crc> vms14: if you have types, namespace prefixes could be made optional (e.g., IIRC 8th uses a similar scheme to me, but has type awareness, so can lookup words in the based on this without requiring the namespace prefix being specified)