fddl.dev/index.html

148 lines
8.6 KiB
HTML
Raw Permalink Normal View History

2024-09-15 03:58:54 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
2024-09-15 06:48:28 +01:00
<title>fddl Programming Language</title>
2024-09-15 07:19:32 +01:00
<!-- Meta Tags for SEO -->
<meta name="description" content="fddl is a small programming language inspired by various languages, designed to help learn language implementation concepts in Rust.">
<meta name="keywords" content="fddl programming language, Rust, hobby language, lexer, parser, interpreter, custom syntax, language implementation">
<meta name="author" content="Tristan">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Open Graph Meta Tags for Social Sharing -->
<meta property="og:title" content="Fiddle Programming Language">
<meta property="og:description" content="A small programming language designed to help learn language implementation concepts in Rust.">
<meta property="og:url" content="https://fddl.dev/">
<meta property="og:type" content="website">
<!-- Twitter Card Meta Tags -->
<meta name="twitter:title" content="Fiddle Programming Language">
<meta name="twitter:description" content="A Rust-based hobby programming language with custom syntax and unique features.">
<meta name="twitter:card" content="summary_large_image">
2024-09-15 03:58:54 +01:00
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700|Source+Code+Pro" rel="stylesheet">
2024-09-15 06:48:28 +01:00
<!-- Highlight.js Styles -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css">
<!-- Custom Stylesheet -->
<link rel="stylesheet" href="styles.css">
2024-09-15 03:58:54 +01:00
</head>
<body>
<header>
2024-09-21 03:27:28 +01:00
<img src="logo-small.png" class="logo" alt="fddl temporary logo">
2024-09-15 06:48:28 +01:00
<h1>fddl Programming Language</h1>
2024-09-15 03:58:54 +01:00
</header>
<main>
<section class="images">
2024-09-15 06:48:28 +01:00
<img src="01.png" alt="Lexer Screenshot">
2024-09-15 03:58:54 +01:00
<img src="02.png" alt="Lexer Tests Screenshot">
2024-09-15 04:17:31 +01:00
<img src="03.png" alt="REPL Screenshot">
2024-09-15 06:48:28 +01:00
<img src="04.png" alt="Parsing 'hello, world'">
2024-09-15 03:58:54 +01:00
</section>
<h2>Overview</h2>
2024-09-15 04:17:31 +01:00
<p>fddl is a small programming language inspired by various languages, designed to help learn language implementation concepts in <a href="https://rust-lang.org">Rust</a>.</p>
2024-09-16 07:38:41 +01:00
<p>For years, Ive tried to learn various programming languages, and while I could master the basics, the real-world projects often eluded me. And I wouldn't know who to turn to even if I knew where to start.</p>
<p>fddl was born out of this journey. fddl is my attempt to combine the aspects I appreciate from many languages into something uniquely my own.</p>
<p>I started learning Rust and have really liked it. I've been following tutorials and the <a href="http://craftinginterpreters.com/">Crafting Interpreters</a> site as guides for this very problematic programming language.</p>
2024-09-15 03:58:54 +01:00
<p>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.</p>
2024-09-15 06:48:28 +01:00
<p>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.</p>
2024-09-15 04:17:31 +01:00
<p>The fact that I have a REPL working in this language is nothing short of amazing to me. It's fucking magic.</p>
2024-09-15 03:58:54 +01:00
<h2>Features</h2>
<ul>
2024-09-16 08:12:35 +01:00
<li><strong>Custom syntax</strong> fddl introduces unique operators and keywords to make programming more intuitive and fun (at least for me)</li>
2024-09-16 07:38:41 +01:00
<li><strong>Lexer</strong> currently is the only thing working. It tokenizes fddl scripts into understandable pieces of the language.</li>
<li><strong>Tilde Operator</strong> (<code>~</code> and <code>~=</code>) when something almost equals something else. I had the idea from watching a video on <a href="https://www.youtube.com/watch?v=_ZSFRWJCUY4">Non-Euclidean Doom</a>.</li>
2024-09-15 03:58:54 +01:00
</ul>
<h2>Getting Started</h2>
2024-09-15 20:59:42 +01:00
<p>Keep in mind, this is only at the lexer stage currently. It'll read your inputs and that's it.</p>
2024-09-15 06:48:28 +01:00
<p>To clone the repo:</p>
2024-09-15 21:03:38 +01:00
<pre><code class="language-bash">git clone https://git.fddl.dev/fddl/fddl.git</code></pre>
2024-09-15 03:58:54 +01:00
<p>To run the REPL:</p>
2024-09-15 06:48:28 +01:00
<pre><code class="language-bash">cargo run</code></pre>
2024-09-16 07:38:41 +01:00
<p>To parse a fddl script:</p>
2024-09-15 06:48:28 +01:00
<pre><code class="language-bash">cargo run path/to/script.fddl</code></pre>
2024-09-15 03:58:54 +01:00
2024-09-20 06:49:24 +01:00
<h2>Examples:</h2>
2024-09-16 07:38:41 +01:00
<pre><code class="language-rust">func main() {
2024-09-20 06:49:24 +01:00
// print statement
print("hello, world in fddl");
// variable declaration
let y = 5;
// if statement
if (x > 10) {
print("x is greater than 10");
}
// while loop
while (x < 100) {
print(x);
let x = x + 1;
}
}</code></pre>
2024-09-16 07:38:41 +01:00
<p>At least for right now. I still want to do something odd.</p>
2024-09-15 03:58:54 +01:00
2024-09-16 07:38:41 +01:00
<h2>Running the Project</h2>
<p>Make sure your project compiles and the tests pass:</p>
<pre><code class="language-bash">cargo build
cargo test
cargo run</code></pre>
<p>Again, <code>cargo run</code> only starts the REPL for testing.</p>
2024-09-20 06:49:24 +01:00
<p>running <code>fddl examples.fddl</code> (from the git repo) produces <a href="examples-output.txt">the following</a>.</p>
2024-09-15 03:58:54 +01:00
<div class="notes">
2024-09-16 07:38:41 +01:00
<h2>Goals and Projections:</h2>
<p><strong>Note:</strong> This is not a final list; it's words on paper (metaphorically) at the time of writing.</p>
<p><strong><code>Lexer</code>:</strong></p>
<ul>
<li class="task-list-item"><input type="checkbox" checked disabled> Built and tested for basic syntax and operators.</li>
<li class="task-list-item"><input type="checkbox" checked disabled> Supports single-line and documentation comments.</li>
<li class="task-list-item"><input type="checkbox" disabled> Add support for more complex syntax and features.</li>
</ul>
<p><strong><code>Parser</code>:</strong></p>
<ul>
2024-09-20 06:49:24 +01:00
<li class="task-list-item"><input type="checkbox" disabled> Working on building out functions to parse simple functionality in the language (if, while, for), and to read their expressions and values</li>
<li class="task-list-item"><input type="checkbox" disabled> Implement parsing for function calls, expressions, checks, literally everything.</li>
2024-09-16 07:38:41 +01:00
</ul>
<p><strong><code>Compiler</code>:</strong></p>
<ul>
2024-09-20 06:49:24 +01:00
<li class="task-list-item"><input type="checkbox" disabled> Currently a placeholder. We're a long way from here. If I see this step I'll be lucky.</li>
2024-09-16 07:38:41 +01:00
</ul>
<p><strong>Comments:</strong></p>
<ul>
<li class="task-list-item"><input type="checkbox" checked disabled> Added support for single-line and documentation comments.</li>
<li class="task-list-item"><input type="checkbox" disabled> Implement multi-line comments.</li>
<li class="task-list-item"><input type="checkbox" disabled> Implement document building comments.</li>
</ul>
<p><strong>Error Handling:</strong></p>
2024-09-15 03:58:54 +01:00
<ul>
2024-09-16 07:38:41 +01:00
<li class="task-list-item"><input type="checkbox" disabled> Replace <code>stderr</code> with a more robust error handling mechanism..</li>
</ul>
<p><strong>Testing:</strong></p>
<ul>
<li class="task-list-item"><input type="checkbox" checked disabled> Added initial <code>lexer</code> tests.</li>
<li class="task-list-item"><input type="checkbox" disabled> Expand tests to cover more syntax and edge cases.</li>
2024-09-15 03:58:54 +01:00
</ul>
</div>
2024-09-16 07:38:41 +01:00
<h2>License</h2>
<p>This project is licensed under the MIT License.</p>
2024-09-15 03:58:54 +01:00
<div class="contact">
2024-09-15 06:48:28 +01:00
<p><a href="/cdn-cgi/l/email-protection#cabeb8a3b9beaba48aacaeaea6e4aeafbc">Contact</a></p>
2024-09-15 21:03:38 +01:00
<p><a href="https://git.fddl.dev/fddl/fddl">Git repo</a></p>
2024-09-15 03:58:54 +01:00
</div>
</main>
<footer>
2024-09-15 06:48:28 +01:00
&copy; 2024 fddl Programming Language
2024-09-15 03:58:54 +01:00
</footer>
2024-09-15 06:48:28 +01:00
<!-- Highlight.js Scripts -->
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
<!-- Cloudflare Email Protection Script -->
<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>
2024-09-15 03:58:54 +01:00
</body>
2024-09-15 06:48:28 +01:00
</html>