09:54:31
##forth
<user51>
What words should I focus on writing first?
09:55:42
##forth
<user51>
I've got a not-quite-forth seemingly working, not super happy with it but I've tuned the code way too much instead of solving the problem I have.
09:56:05
##forth
<user51>
Alternatively, I could just focus on doing some simple programming tasks in it and see what comes up.
11:44:17
##forth
<xentrac>
veltas: condolences
11:44:56
##forth
<xentrac>
user51: my suggestion would be to write a game
11:45:43
##forth
<xentrac>
AoC is a fine alternative if you like solving puzzles more
14:07:22
##forth
<vms14_>
user51 you can just try to make some program and add whatever you need on the fly
14:07:49
##forth
<vms14_>
that's what I usually do
14:08:06
##forth
<vms14_>
then I go to a corner to cry because using my lang is hard
14:09:13
##forth
<vms14_>
at the end it is your lang so you can do whatever you want, which is the cool part
14:09:32
##forth
<vms14_>
also if you are curious on how to add some programming concept you can just do it
14:09:50
##forth
<vms14_>
like if you want to add objects, or some sort of metaprogramming, etc
14:10:52
##forth
<vms14_>
that said, forr a forth like I would try to make words that mess with the dictionary and memory
14:11:12
##forth
<vms14_>
making a simple todo list might be a good start
14:18:34
##forth
<vms14_>
I guess in your case I would start by having ':' then stack operators, create does>, ." s" dump move fill erase variable constant etc
14:19:04
##forth
<vms14_>
debugging words would be helpful, dump being one of them
14:19:50
##forth
<vms14>
I'm going to add a word named 'debug' that will take a list and will evaluate every element one by one, printing the stack and additional info
14:20:04
##forth
<vms14>
you could make something similar
14:20:45
##forth
<vms14>
I have a cool word named 'check-stack' that takes a number and checks if the stack has that number of elements
14:21:54
##forth
<vms14>
but I have no more ideas for words that help to debug
14:23:48
##forth
<xentrac>
F83 has a single-stepping debugger
14:24:17
##forth
<vms14>
I have also decided to not waste time documenting it and not publishing since I loose a lot ot time trying to explain everything to anyone and the end
14:24:40
##forth
<vms14>
when I have to focus on making it usable for me
14:25:07
##forth
<vms14>
at the end*
14:26:58
##forth
<vms14>
oh I already had the debug word xd
14:55:51
##forth
<crc>
update on my bot project: the vm now starts, runs a per-user session with the provided input, saves the ram & stacks, then prints a stack dump. Each run resumes the ram stacks from the prior run, so it has persistence w/o needing any long running processes.
14:57:31
##forth
<crc>
I'll be working on finishing the per-user block storage tonight or tomorrow, then will get this documented & active for general testing
14:57:44
##forth
<deadmarshal_>
crc: cool!
15:06:09
##forth
<cleobuline>
ForthBot: 1 2 3 4 5 DEPTH ROLL .S
15:06:09
##forth
<ForthBot>
Stack: 1 2 3 4 5
15:06:24
##forth
<cleobuline>
ForthBot: FLUSH
15:06:30
##forth
<cleobuline>
ForthBot: 1 2 3 4 5 DEPTH ROLL .S
15:06:30
##forth
<ForthBot>
Stack: 2 3 4 5 1
15:12:54
##forth
<cleobuline>
ForthBot: 1 2 3 4 5 DEPTH PICK .S
15:12:54
##forth
<ForthBot>
Error: PICK: Stack underflow or invalid index
15:16:04
##forth
<cleobuline>
ForthBot: FLUSH 1 2 3 4 5 DEPTH 1 - PICK .S
15:16:04
##forth
<ForthBot>
Stack: 1 2 3 4 5 1
15:47:23
##forth
<vms14>
I guess I will add a word to check that the elements on the stack are what I expect
15:48:34
##forth
<vms14>
like: 1 2 (1 2) expect-stack
15:50:53
##forth
<vms14>
and I can make it check only the last elements and combine it with check-stack
15:59:19
##forth
<vms14>
what debugging words did you add to your own forths that I could steal?
15:59:45
##forth
<vms14>
or how to give more control over the stack
16:00:05
##forth
<vms14>
I have no problems for operating with the stack, but I have problems to control it
16:00:48
##forth
<vms14>
it is so easy for the stack to start having garbage or missing elements at different points of execution
16:02:37
##forth
<vms14>
that's why I added the debug and check-stack word and I'm going to add expect-stack and : prove-stack dup >r expect-stack r> length expect-stack ;
16:03:26
##forth
<vms14>
although I have no r> >r, but temporary variables that will be destroyed once the colon word ends execution
16:18:52
##forth
<crc>
vms14: the main things I use are just .s and a memory dump word
16:20:01
##forth
<vms14>
crc what advice do you have on managing complexity in a concat lang more than factor, factor, factor?
16:20:41
##forth
<crc>
Retro has a debugger with single stepper, execution tracing, and disassembly/decompilation, but I only ever use it when working on compiler extensions
16:21:37
##forth
<crc>
vms14: for me, practice over the years, and building up useful abstractions
20:49:42
##forth
<user51>
Any videos of F86 in action? I can't find any on YT
20:56:10
##forth
<xentrac>
F86?
20:56:55
##forth
<user51>
xentrac: forth86
20:57:02
##forth
<xentrac>
never heard of it
20:58:36
##forth
<user51>
Maybe it was 83?
21:00:09
##forth
<vms14>
crc now that I think of, I have something similar.to your sigils, although I name them special chars
21:00:49
##forth
<vms14>
and just make return them as a whole word without needing spaces
21:01:26
##forth
<vms14>
'(' and ')' are special so I can (oh)
21:01:36
##forth
<vms14>
but '(' is just a defined word
21:02:40
##forth
<vms14>
for example this creates comments with < and > like <this is a comment>
21:02:52
##forth
<vms14>
: < source '> skip ; '< special
21:03:23
##forth
<vms14>
source is the source code file handle being pushed on the stack, and skip just skips until it finds the >
21:03:43
##forth
<vms14>
'< special would be similar in your lang to make it a sigil
21:04:09
##forth
<vms14>
well also < has to be immediate
21:04:51
##forth
<vms14>
to work in : and ( and any reader word that is aware of immediate words
21:05:40
##forth
<vms14>
not sure about using <for comments> but I'm already using a lot of symbols
21:05:42
##forth
<xentrac>
F83 and Forth-83 are two different things; Forth-83 is a standard, and F83 is a model implementation of it
21:05:59
##forth
<xentrac>
I have F83 here running in Dosbox
21:16:56
##forth
<amby>
vms14: you might want your block comment word to count nesting
21:17:27
##forth
<amby>
in jonesforth `(` counts additional ( and ) and only ends the comment on the matching )
21:49:20
##forth
<vms14>
maybe in the future I might want that feature
21:49:41
##forth
<vms14>
but for now I do not have a reason
21:49:50
##forth
<vms14>
although I do not really like <> to be comments
21:50:51
##forth
<vms14>
I suppose I should change one of the ones I use already
21:51:42
##forth
<vms14>
maybe [ ]
21:52:35
##forth
<xentrac>
Lua, Ada, and VHDL use -- to end of line
21:53:16
##forth
<xentrac>
OCaml uses (* *) which I think it got from Pascal
21:53:22
##forth
<xentrac>
(and they do nest)
21:53:49
##forth
<xentrac>
Pascal uses { } as well, but (* *) lets you do Pascal in character sets that lack { }
21:54:56
##forth
<xentrac>
traditional block-structured Forths have "shadow blocks" with commentary on corresponding code blocks, which are conventionally printed out on the right side of a page
21:55:04
##forth
<vms14>
I guess I will forget about multiline comments for now and just use --- for line comments
21:55:18
##forth
<xentrac>
so it's something like the first 64 columns are code and the next 64 columns are comments
21:55:36
##forth
<vms14>
they will require a space between, but I like that also
21:56:19
##forth
<xentrac>
yeah, normally there were more columns devoted to line numbers and separators
21:56:27
##forth
<vms14>
but the main use for a comment in my lang would be to disable code
21:56:42
##forth
<xentrac>
ColorForth uses a different color for comments
21:56:54
##forth
<xentrac>
you could also use a different font
21:57:02
##forth
<vms14>
I can make a word that ignores stuff at any moment