diff --git a/03.png b/03.png index ad96e67..6402d50 100644 Binary files a/03.png and b/03.png differ diff --git a/04.png b/04.png new file mode 100644 index 0000000..0f732f1 Binary files /dev/null and b/04.png differ diff --git a/index.html b/index.html index d8c6f04..bdc1d44 100644 --- a/index.html +++ b/index.html @@ -1,119 +1,25 @@ - - fddl programming language + fddl Programming Language - - + + + +
-

fddl

+

fddl Programming Language

- Lexer Screenshot + Lexer Screenshot Lexer Tests Screenshot REPL Screenshot + Parsing 'hello, world'

Overview

@@ -121,25 +27,33 @@

I have, off and on throughout the last 15 or so years attempted to learn a programming language of some sort. I could always get through the basics, but would get stuck with any real-world projects. And I wouldn't know who to turn to even if I knew where to start.

So I started learning Rust and really like it. I've been following some tutorials and the Crafting Interpreters site as guides for this very problematic programming language.

I like aspects of so many programming languages, but I don't really like any of them, so I always found it hard to pick one and stick with it. But I had the same problem playing World of Warcraft, too.

-

So I, like many of you, decided to make a hobby programming language to see what may be able to be done with it.

-
+

So I, like many of you, decided to make a hobby programming language to see what may be able to be done with it. This is a brand new project as of September 2024 and I am one person.

The fact that I have a REPL working in this language is nothing short of amazing to me. It's fucking magic.

Features

Getting Started

+

To clone the repo:

+
git clone https://git.fddl.dev/tristan/fddl.git

To run the REPL:

-
cargo run
+
cargo run

To run a fddl script:

-
cargo run path/to/script.fddl
+
cargo run path/to/script.fddl

Examples

-
##! This is a sample module
+        

Your basic hello, world:

+

+func main() {
+    print(`hello, world in fddl`);
+}                    
+        
+

Defining a function inside a module, squaring a number:

+
##! This is a sample module
 
 module math {
 
@@ -148,8 +62,7 @@ module math {
 }
 
 define $number := 5;
-print(`The square of $number is ${math.square($number)}`);
-
+print(`The square of $number is ${math.square($number)}`);

(At least for right now.)

License

@@ -158,7 +71,7 @@ print(`The square of $number is ${math.square($number)}`);

Notes and Next Steps

+ + + + + - \ No newline at end of file + diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..19e5bee --- /dev/null +++ b/styles.css @@ -0,0 +1,95 @@ +body { + margin: 0; + font-family: 'Roboto', sans-serif; + background-color: #1e1e1e; + color: #c0c0c0; + line-height: 1.6; +} +header { + background-color: #282828; + padding: 20px; + text-align: center; +} +header h1 { + color: #ffffff; + margin: 0; + font-size: 2.5em; +} +main { + max-width: 800px; + margin: 20px auto; + padding: 0 20px; +} +h2 { + color: #ffffff; + border-bottom: 1px solid #444; + padding-bottom: 5px; + margin-top: 40px; +} +p { + margin-bottom: 15px; +} +pre { + background-color: #2e2e2e; + padding: 15px; + overflow-x: auto; + font-family: 'Source Code Pro', monospace; + color: #dcdcdc; + border-radius: 5px; +} +code { + color: #acacac; + font-family: 'Source Code Pro', monospace; + background-color: #2e2e2e; + padding: 2px 4px; + border-radius: 3px; +} +a { + color: #569cd6; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +.images { + text-align: center; + margin: 30px 0; +} +.images img { + max-width: 100%; + border: 1px solid #444; + border-radius: 5px; + margin: 10px 0; +} +footer { + background-color: #282828; + padding: 10px; + text-align: center; + color: #808080; + margin-top: 40px; +} +.contact { + margin-top: 40px; + text-align: center; +} +.notes { + background-color: #2e2e2e; + padding: 20px; + margin: 20px 0; + border-radius: 5px; +} +ul { + list-style: none; + padding-left: 0; +} +li::before { + content: "• "; + color: #569cd6; +} +.task-list-item { + margin-bottom: 5px; +} +.task-list-item input { + margin-right: 10px; + vertical-align: middle; +}