All Projects → susam → may4

susam / may4

Licence: MIT License
Celebrating Star Wars Day with some Forth code! May the Forth be with you!

Programming Languages

forth
179 projects
Makefile
30231 projects

Projects that are alternatives of or similar to may4

StarWarsIntroCreator
A website to create your own Star Wars opening crawl.
Stars: ✭ 56 (+100%)
Mutual labels:  star-wars
tts
Table Top Simulator Mod for Star Wars: Legion
Stars: ✭ 32 (+14.29%)
Mutual labels:  star-wars
imperial-assault-data
An easy-to-use collection of data and images from the Imperial Assault Game by Fantasy Flight Games.
Stars: ✭ 16 (-42.86%)
Mutual labels:  star-wars
YodaSpeak
Translating English to Yoda English using Sequence-to-Sequence with Tensorflow.
Stars: ✭ 25 (-10.71%)
Mutual labels:  yoda
StarWarsArrays.jl
Arrays indexed as the order of Star Wars movies
Stars: ✭ 93 (+232.14%)
Mutual labels:  star-wars
SWLOR NWN
Star Wars: Legends of the Old Republic server code, a persistent world for Neverwinter Nights
Stars: ✭ 31 (+10.71%)
Mutual labels:  star-wars
JediKnightPlus
Game modification for Jedi Knight II: Jedi Outcast Multiplayer with useful stuff and custom features
Stars: ✭ 19 (-32.14%)
Mutual labels:  star-wars
IA-Imperial-Commander
This is a repository for concept and documentation of a companion app for FFG's Star Wars: Imperial Assault.
Stars: ✭ 16 (-42.86%)
Mutual labels:  star-wars
jedi-faker
Faker extension for Star Wars junkie
Stars: ✭ 15 (-46.43%)
Mutual labels:  star-wars
yoda
GitHub extension for agile project management, using the issues subsystem.
Stars: ✭ 86 (+207.14%)
Mutual labels:  yoda
yoda
Simple tool to dockerize and manage deployment of your project
Stars: ✭ 69 (+146.43%)
Mutual labels:  yoda
Imperial-Assault-Skirmish-Map-Project
Maps for Imperial Assault skirmish scenarios: check missions or print for playmats
Stars: ✭ 69 (+146.43%)
Mutual labels:  star-wars
dark-mode-example
Simple and fun dark-mode detection. JavaScript with a user mode toggle.
Stars: ✭ 27 (-3.57%)
Mutual labels:  star-wars
yoda
A system for reliable, long-term storing and archiving large amounts of research data during all stages of a study.
Stars: ✭ 29 (+3.57%)
Mutual labels:  yoda
Openjk
Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
Stars: ✭ 1,641 (+5760.71%)
Mutual labels:  star-wars
Starwars.ios
This component implements transition animation to crumble view-controller into tiny pieces.
Stars: ✭ 3,685 (+13060.71%)
Mutual labels:  star-wars

May the Forth Be With You

This project celebrates the Star Wars Day with the Forth programming language.

View Source View Output MIT License Twitter

May 4 is the Star Wars Day. The date (May the fourth) is a pun on the popular Star Wars catchphrase, "May the Force be with you." Forth, the programming language, is named so as a shortened form of the word "Fourth". The name stood for "fourth generation". Quoting from Forth - The Early Years:

The file holding the interpreter was labeled FORTH, for 4th (next) generation software - but the operating system restricted file names to 5 characters.

So this repository consisting of Forth source code to print a slightly altered Star Wars catchphrase using ASCII stars (asterisks) is like a double pun! Or is that a triple pun?

Also, if Yoda were a programmer, I think Forth would be his most favourite programming language. Yoda would say, "A Forth programmer I am. Hrmmm," and he would add two and two with, 2 2 +. It just makes a lot of sense to celebrate May the 4th with some Forth code.

Source

[may4.fs]

: stars
   0  do  [char] * emit  loop  ;

: lines
   0  do  cr  loop  ;

: print
   dup 40 > if  40 - lines  else
   dup 20 > if  20 - spaces  else
      stars
   then then  ;

: start
   0  do  print  loop  ;

                      41 11 37 11 36 5 28 41 5 27 5
                     31 5 27 5 33 5 28 41 5 31 5 27
                    5 31 5 31  5 28 41 5  33 5 25 5
                   33 5 30 5 28 41 5 35 5 23 5 35 5
                  29 5 28 41  5 35 5 23 5 35 5 27 9
                 26 41 5 35  5 23 5 35  5 26 5 21 5
                25 41 5 35 5 23 5 35 5 25 5 23 5 24
               41 5 35 5 24 5 33  5 25 5 25 5 23 41
              5 35 5  25 5 31 5   25 5 27 5 22 41 5
             35 5 27 5 27 5 26    5 29 5 21 41 5 35
            5 30 11 28 5 31 5     43 2 24 2 25 2 25
           2  26 1 26 1 28 8      23 7 33 41 2 24 2
          25 2 25 2 25 3 24       3 33 2  22 1 25 2
         33 41 8 25 2 25 2        24 2 21 2 22 2 21
        2 29 5 23 7 33 41         2 24 2  25 2 25 2
       23 2 24 3 23 2 31          2 22 1 25 2 33 41
      2 24 2  22 8 22 2           22 2 26 1 25 2 24
     8 23 7 22 11 43 3            27 3 27 3 26 3 28
    3 26 8  35 3 41 3             27 3 27 3 27 3 27
   3  24 3 26 3 33 3              41 3 27 3 27 3 28
  3 26 3 23 3  28 3               32 3 41 3 27 3 27
 3 29 3  25 3 22 3                30 3 31  3  41 13
27 3  29 11  22 3 30 3 25 9 41 13 27 3 27 13 22 3 30 3 25 9
41 3 27 3 27 3 26 3 28 3  22 3 30 3 31 3  41 3 27 3 27 3 26
3 28 3 23 3 28 3 32 3 41 3 27 3 22 13 22 13 24 4 25 3 23 13
41 3 27 3 22 13 24 11  26 8 25 13 43 11 22 8 22 2 24 2 25 2
30 2 23 2 25 2 22 2 23 1 23 2 41 2 22 2 24 2 25 2 30 2 24 7
23 2 22 3 22 2 41 5 22 8 25 2 29 4 24 2 21 2 24 2 21 2 21 2
                                  21  2 41 2  22  2
                                  24 2 25 2 28 2 22
                                  2 24 3 25 4 23  4
                                  41  8 22 2  24  2
                                  22 8 24 2 24 2 24
                                  1  26 3 25  3 473
start
bye

Output

[may4.txt]

***     ***      *    **    **    ********  **    **  ********
****   ****     ***    **  **        **     **    **  **
** ** ** **    ** **    ****         **     ********  *****
**  ***  **   *******    **          **     **    **  **
**   *   **  **     **   **          **     **    **  ********  ***********


*************     ********      ***********    *************  ***       ***
*************   ***     ****    *************  *************  ***       ***
***            ***        ***   ***        ***      ***       ***       ***
***           ***          ***  ***        ***      ***       ***       ***
*********     ***          ***  *************       ***       *************
*********     ***          ***  ***********         ***       *************
***           ***          ***  ***     ***         ***       ***       ***
***            ***        ***   ***      ***        ***       ***       ***
***             ***      ***    ***       ***       ***       ***       ***
***               ********      ***        ***      ***       ***       ***


***********  *******   ********    **     *      **  **  ********  **    **
             **     *  **           **   ***    **   **     **     **    **
             *******   *****         ** **  ** **    **     **     ********
             **     *  **             ***    ***     **     **     **    **
             *******   ********        *      *      **     **     **    **


*****           *****        ***********          *****               *****
 *****         *****      *****       *****       *****               *****
  *****       *****     *****           *****     *****               *****
   *****     *****     *****             *****    *****               *****
    *****   *****     *****               *****   *****               *****
     ***** *****      *****               *****   *****               *****
      *********       *****               *****   *****               *****
        *****         *****               *****   *****               *****
        *****          *****             *****     *****             *****
        *****           *****           *****       *****           *****
        *****             *****       *****           *****       *****
        *****                ***********                 ***********

How to Run

  1. Install GForth.

    On macOS, enter the following command if you have Homebrew:

    brew install gforth

    On Debian, Ubuntu, or another Debian-based Linux system, enter the following command:

    sudo apt-get install gforth
    

    For other systems, see https://gforth.org/.

  2. Run the Forth program in this repository:

    gforth may4.fs
  3. Enjoy!

You can also run it online on Replit here:

Thank You

Thank you for visiting this project. I hope this encourages you to learn a little bit of Forth.

Follow me on Twitter.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].