r/Forth • • Jul 26 '20

How long until we have full plutocratic totalitarianism?

2 Upvotes

I just noticed the great search G_d has slammed the door on C.L.F.

Aside from some particularly argumentative people it was harmless. Forth programmers would never plan to overthrow the world. If they tried, they would never be able to agree on what language extensions would be used to write their manifesto. :-)

I fear for the world where thought police rule.


r/Forth • • Dec 14 '22

Peter Forth's Toxic Behavior

4 Upvotes

I joined the Facebook group "Forth2020 forth programming language legacy group", for which Peter Forth is an administrator.

A group member posted an interesting question, so I replied with some helpful information and links about Mitch Bradley's solution to immediate mode control structures in Forthmacs, CForth, and OpenFirmware.

Then another user replied with more interesting information to contribute to the discussion. We were all enjoying ourselves having an interesting discussion about open source Forth code, including links to example code, an interview, and another article I wrote about Mitch Bradley's Forth.

Then out of the blue, Peter Forth contacted me and started accusing me of violating an unwritten rule that he refused to define or quote, having to do with "posting links to other groups". And he falsely accused me of posting a link to comp.lang.forth, which I didn't do.

Then he blocked me and kicked me out of the group, without answering any of my questions.

So I asked other people about him, looked up who he was, and found out that I was not the first person to be the subject of his toxic behavior and irrational censorship.

Below are screen snapshots of the interesting discussion I and other members were having that he so rudely interrupted, censored, and blocked me for, and also screen snapshots of the private messages he sent me, and the simple straightforward questions I asked that he refused to answer, so you can judge for yourself.

Toxic People in the Forth Community: John Draper and Peter Forth

https://donhopkins.com/home/PeterForth/

comp.lang.forth: Is the FORTH language under the control of Mr Peter FORTH?

https://groups.google.com/g/comp.lang.forth/c/aJ790u-wXIw


r/Forth • • Aug 05 '19

Improvements to the 8th help system

0 Upvotes

8th's has had a 'help' word from the very beginning, available in the REPL, which displays help on the word after it on the line. So for example:

help a:@

Shows

ns: a
name:  @
stack: a ix -- a z
desc:  Returns the item in the array "a" at number index "ix". If "ix" is negative, get the item from the "end" of the array, e.g. "-1" corresponds to the last element. If "ix" is out of bounds, "null" is returned (though "null" might be a valid element as well!

In (the upcoming) 19.07, I made some improvements to the help word:

  • typing help without a word after it is the same as "help help"

  • in normal terminals (e.g. not Windows "cmd.exe"), the bold and underline attributes are used to make parts of the text more noticeable

  • the layout is improved taking less vertical space, and including word-wrap (at 132 by default, but settable and reducing as the terminal width reduces below the given limit) among other things

So in the new version, "help a:@" looks like:

a:@	\ a ix -- a z
Returns the item in the array a at number index ix. If ix is negative, get the item from the end of the array, e.g.
"-1" corresponds to the last element. If ix is out of bounds, null is returned (though null might be a valid element as well!

The "a:@" is bolded, the SED appears on the same line.


r/Forth • • Jan 26 '19

How Forth helps learning Haskell !!!

Thumbnail groups.google.com
0 Upvotes

r/Forth • • Oct 20 '17

A javascript forth I'm working on

1 Upvotes

I play a competitive hacking video called hackmud where you try to outhack each other with javascript. There is a character limit and you have to get a more powerful character with more money to increase the character limit. You start out with around 500 characters so I try to fit more and more into 500 characters as I can.

https://hastebin.com/ekizilacaf.php

This is my current version of a forth runtime. I have not tested this one yet but it should be able to do just about everything that I need it to be able to do.

It's important to be able to run your own version of forth here because it lets you break the character limit by running code from strings, but because you can't trust that another person's forth is not logging what you do in it in their in game database.

The secret to this particular forth is you have to implement a mockup version of the colon compiler without the colon compiler. Also it will have to be handed functions from other programs in order to do certain tasks.

This is not meant to be a particularly fast forth. Just one with as few characters as possible.

edit: most current version https://hastebin.com/utoxecoxen.pl


r/Forth • • Feb 02 '18

A question for you low levelers - How efficient are local variables in gforth, and when are they appropriate?

1 Upvotes

I've had people tell me that local variables are real great and people tell me they are not necessary or are bulky. I do not really know how they work under the hood and I am wondering where they are useful and where they should not be used.

edit: My concern is that local variables add to the dictionary every time the word is called


r/Forth • • Feb 07 '23

Making your life easier using 8th

1 Upvotes

I have to maintain JSON files in different languages simultaneously, where the layout of the file is used to control UI. Unfortunately, my client's client likes to change things around a lot.

I created a DSL to enforce proper formatting of the JSON, and to ensure the different language versions of the JSON files are semantically the same.

Discussion here


r/Forth • • Nov 04 '17

Wouldn't it be cool if there was a matlab version of the green arrays chip?

0 Upvotes

This way someone could run simulations of a green arrays chip and develop software for it without having to invest in purchasing a chip. For a software guy like me that would be great.


r/Forth • • Feb 04 '18

Iterating towards v1.0

Thumbnail
github.com
0 Upvotes

r/Forth • • Apr 30 '23

pForth

0 Upvotes

To find out more about it.


r/Forth • • Dec 06 '18

Swapless forth

0 Upvotes

I am toying with the idea of a swapless forth here:

https://github.com/johnmorrisbeck/newlangspecification/blob/master/swapless

Afaik if you took something along the lines of gforth or jonesforth it should be possible to write this code so it is integrated and compatible with those versions of code while still having swap inside the system.

In jonesforth the . That I specificied would be something along the lines of this:

load global pointer into eax.

Execute function that gets subobject of foo and load that into eax

Keep loading subobjects into eax until you have the pointer you want.

Push it onto the stack.

Do the same until you have the second object you want.

Pop the stack into both ea registers.

Store one inside the other, and leave the stack minus two items.

. So sorry but not sorry for using the . but it is how subobjects are fetched in javascript.


r/Forth • • Apr 12 '18

Comparing two arrays for (content) equality (in 8th)

0 Upvotes

8th's arrays can contain any other data type (and different data types can be arbitrarily mixed). So an "a:=" word to compare two arrays has to take a comparator word.

Here's an implementation: https://8th-dev.com/forum/index.php/topic,1619.0.html


r/Forth • • Dec 19 '18

What is NOT a stack machine?

Thumbnail
github.com
0 Upvotes

r/Forth • • Dec 28 '18

Proposal: RPN as "super macro" for C/C++ code

0 Upvotes

Proposal: RPN as "super macro" for C/C++ code

RPN (reverse polish notation) is perhaps the only syntax that can be used to simplify C/C++ programs with its macro properties, besides being used to implement a C/C++ interpreter.

RPN macro properties can also be used for two-way translation of code e.g. write  RPN macro, then generate C/C++ code.

RPN macros should give better structure for understanding, as well as testing as tests can be made using submodules, and performed interactively.

I will make the RPN macro for C/C++ as close to Forth as possible so that it can be run and tested as Forth programs. Then this can perhaps become a Forth to C/C++ translation standard.

As an analogy, PHP, JavaScript, Java, Python, Ruby etc all use stack machine as interpreters. However, their stack machine opcodes are rarely used by human programmers as a means to edit the programs, as in Forth.

I intend to test if opencl-info.cc from this link can be simplified to a more understandable format, with better test modules and can be executed interactively with a C/C++ interpreter based on stack machine:

https://github.com/supernovaremnant/bazel-android-opencl/blob/master/opencl-info/opencl-info.cc

This is part of my effort to create an interactive development environment based on stack machine to program mobile GPU using OpenCL -- Stack Machine OpenCL (SMOCL):

https://github.com/udexon/5CSM/tree/master/SMOCL

Comments welcome.

References:
https://www.linkedin.com/pulse/multitiered-stack-machine-nsm-using-5gl-fifth-graph-ng-ph-d-/
https://www.facebook.com/groups/483887212122959/ (Project Fire4X -- Forth in Firefox)


r/Forth • • Jan 06 '19

Graph theory representation for Forth (Stack Machine) features / constructs?

Thumbnail groups.google.com
0 Upvotes

r/Forth • • Nov 13 '24

Forth as a mobile app

0 Upvotes

I did a thing that you may find interesting

Download our app and start programming on your phone right now. RIGHT NOW!

apps.apple.com/gb/app/hencefo…


r/Forth • • Feb 05 '23

💀

3 Upvotes

r/Forth • • Apr 13 '20

How NASA could have prevented a $200m crash with Julia's type system (youtube.com)

Thumbnail
youtube.com
0 Upvotes

r/Forth • • Nov 26 '25

Building a 64-bit OS from Scratch with Claude Code

Thumbnail isene.org
11 Upvotes

r/Forth • • Feb 14 '18

I've written my own forth called 👽 that compiles to c and I have a question about the word datatype

0 Upvotes

So the way it's worked out in my forth my words are unsigned long ints. I am wondering if it is ok for a forth's words to be unsigned.

I am not worried about whether ot not being unsigned makes it more difficult for the user. I just want to know if it is possible to get all my computations done like that, because I don't want to have to change my design.

Here's the source code to the forth compiler in case you are interested: https://github.com/johnmorrisbeck/-.c


r/Forth • • Nov 18 '15

Responsive UI in 8th

Thumbnail 8th-dev.com
0 Upvotes

r/Forth • • Apr 12 '20

I Hate Forth...not for the article, but for the response...how I choose to introduce myself to this group.

Thumbnail
embedded.com
0 Upvotes

r/Forth • • Aug 25 '09

Sam's All New, New and Improved, New News news news

Thumbnail falvotech.com
0 Upvotes