Project Forth Works
Welcome to Project Forth Works
What this project is all about ...
Forth would benefit greatly from an active community sharing sources and solutions. But our problem lies in the saying: When you have seen one Forth, you have seen one Forth. With this project we would like to embrace our differences. And start sharing, despite having all the different Forths-dialects.
The core idea of this project is to use a simple, generic version of Forth to spread ideas, algorithms, protocols, applications and hardware drivers. This generic version of Forth guarantees that it can be understood and used by (almost) everybody in the Forth-community.
Click here for an introduction to Project Forth Works
https://wiki.forth-ev.de/doku.php/en:pfw:welcome
https://github.com/project-forth-works/project-forth-works
Contribute
Contributing to the Project Forth Works is as easy as 1,2,3. All pages are written in Wiki Syntax format and editable once you register with the web site. You can use the playground to make your Wiki experiments.
You can contribute in different ways, your choice:
Leave you remark at the discussion box below.
Add a new implementation at the bottom of any existing idea. That's easy:
You just edit the page using the Edit button at the end of the page or using the pencil icon to the right of the document.
Then you just add your implemtation putting it in between <code> and </code> tags.
Save the page. That's it.
Add a new idea:
Give it a name here in this document (e.g. in the category section above). Save this document.
Follow the red link of your new idea.
Create it using the Pencil to the right of the new document.
Adapt the pre-filled template that assists you in structure.
Preview and edit, repeat until satisfied. (You can save interim versions and continue editing later.)
Save your new idea document. That's it.
Browse Project Forth Works
In order see what ideas are already described, please have a look at wiki site map
A selection of ideas ordered by category ...
Algorithms
XORshift Random-generator, different random number implementations
PiliPlop, an algorithm to move multiple processes, to reach its targets together
String handling, primitive string handling in variations
Changing the number base, instead of modifying the interpreter, this just loads on top
CRC-generation, check whether a set of data, like a string, is unchanged and intact.
Communication Protocols
SPI protocol, general introduction, Serial Peripheral Interface
I2C, The I2C protocol, Inter Integrated Circuit bus
Wireless communication, Transceivers using different frequencies & protocols
Data Structures
Buffer, a simple memory buffer
Array, a simple one dimensional array with implicit indexing
Primitive Circular Buffer, a buffer with a single read/write pointer
Bit array, an array with addressing of individual bits
Map, a map from strings to values aka dictionary
System Software
Programming Tools
multiline comments: comment regions of text, nest-able
DUMP a tool to display memory content
Substitution Phrases: phrases that replace well known but undefined words
Stack Checking: Runtime stack checking of colon definitions
Programming Pearls
Day of the week: work with string sequences, map from number to string
Print Hex: print hex numbers with variable number of digits, w/o <# # #>
Conditional Compilation: process part of the program text depending on conditions and variants, ICE concept
Population Count: counting the number of set bits in a byte or word
2LOG, calculate binary logarithm: The 2LOG routine converts a linear input into something with a more logarithmic character.
Implementation Ideas
Kangaroo method: Using does> outside colon definitions: words with data.
Flyer: Define compiling words by just specifiying their compilation semantics.
Prefix: Defining prefix operators in a portable way
User Application
Forest fire: Siulation of computer generated fire
Cozy: Simulation of agents which, if given the chance, move to a place where they feel more at home.
Curiosities
do_plusloop_curiosity: A high level implementation of DO +LOOP with two limits
Sensors
HC-SR04, Measures distance using Ultrasonic sound
LM75(A), Measures temperature with .5° Celsius resolution
TMP75, Measures temperature with 0.0625° Celsius resolution
APDS9300, Infrared and visual light sensor
PIR, Passive infrared motion detector
Touch, Capacitive touch sensors & slider
Mechanical switch, Touch switch on simple robotic sensor unit
BME280, Measure pressure, temperature and humidity
TCND5000, Reflection sensor, detection of nearby subjects, other examples are IS471F or CNY70, see Ushi book|
On the P.F.W. I2C drivers overview page you may find some more documentation
Miscellaneous
Help us to improve Project Forth Works
Please add your suggestions below.
You could leave a comment if you were logged in.
original document : -- https://wiki.forth-ev.de/doku.php/en:pfw:welcome --