mirror of
https://git.fddl.dev/fddl/fddl.dev.git
synced 2024-12-25 15:10:26 +00:00
updates
This commit is contained in:
parent
8b4009fba1
commit
eb36fad846
4 changed files with 131 additions and 120 deletions
BIN
03.png
BIN
03.png
Binary file not shown.
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 37 KiB |
BIN
04.png
Normal file
BIN
04.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
156
index.html
156
index.html
|
@ -1,119 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- implement highlight.js soon -->
|
||||
<meta charset="UTF-8">
|
||||
<title>fddl programming language</title>
|
||||
<title>fddl Programming Language</title>
|
||||
<!-- Google Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700|Source+Code+Pro" rel="stylesheet">
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
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: #dcdcdc;
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<!-- 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">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>fddl</h1>
|
||||
<h1>fddl Programming Language</h1>
|
||||
</header>
|
||||
<main>
|
||||
<section class="images">
|
||||
<img src="01.png" alt="Lexer Screenshot">
|
||||
<img src="01.png" alt="Lexer Screenshot">
|
||||
<img src="02.png" alt="Lexer Tests Screenshot">
|
||||
<img src="03.png" alt="REPL Screenshot">
|
||||
<img src="04.png" alt="Parsing 'hello, world'">
|
||||
</section>
|
||||
|
||||
<h2>Overview</h2>
|
||||
|
@ -121,25 +27,33 @@
|
|||
<p>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.</p>
|
||||
<p>So I started learning Rust and really like it. I've been following some tutorials and the <a href="http://craftinginterpreters.com/">Crafting Interpreters</a> site as guides for this very problematic programming language.</p>
|
||||
<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>
|
||||
<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.</p>
|
||||
<br />
|
||||
<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>
|
||||
<p>The fact that I have a REPL working in this language is nothing short of amazing to me. It's fucking magic.</p>
|
||||
|
||||
<h2>Features</h2>
|
||||
<ul>
|
||||
<li>Custom syntax with unique (and possibly deranged) operators and keywords</li>
|
||||
<li>Custom syntax with unique (and arguably deranged) operators and keywords</li>
|
||||
<li>Documentation comments using <code>#</code>, similar to Rust's style</li>
|
||||
<li>Lexer and parser built from scratch in Rust</li>
|
||||
<li>Lexer and parser built from scratch</li>
|
||||
</ul>
|
||||
|
||||
<h2>Getting Started</h2>
|
||||
<p>To clone the repo:</p>
|
||||
<pre><code class="language-bash">git clone https://git.fddl.dev/tristan/fddl.git</code></pre>
|
||||
<p>To run the REPL:</p>
|
||||
<pre><code>cargo run</code></pre>
|
||||
<pre><code class="language-bash">cargo run</code></pre>
|
||||
<p>To run a fddl script:</p>
|
||||
<pre><code>cargo run path/to/script.fddl</code></pre>
|
||||
<pre><code class="language-bash">cargo run path/to/script.fddl</code></pre>
|
||||
|
||||
<h2>Examples</h2>
|
||||
<pre><code>##! This is a sample module
|
||||
<p>Your basic hello, world:</p>
|
||||
<pre><code class="language-rust">
|
||||
func main() {
|
||||
print(`hello, world in fddl`);
|
||||
}
|
||||
</code></pre>
|
||||
<p>Defining a function inside a module, squaring a number:</p>
|
||||
<pre><code class="language-rust">##! 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)}`);
|
||||
</code></pre>
|
||||
print(`The square of $number is ${math.square($number)}`);</code></pre>
|
||||
<p>(At least for right now.)</p>
|
||||
|
||||
<h2>License</h2>
|
||||
|
@ -158,7 +71,7 @@ print(`The square of $number is ${math.square($number)}`);
|
|||
<div class="notes">
|
||||
<h2>Notes and Next Steps</h2>
|
||||
<ul>
|
||||
<li class="task-list-item"><input type="checkbox" checked disabled> Added first new set of tokens and features, added the first <code>lexer</code> tests.</li>
|
||||
<li class="task-list-item"><input type="checkbox" checked disabled> Added first new set of tokens and features, added the first lexer tests.</li>
|
||||
<li class="task-list-item"><input type="checkbox" disabled> <code>parser</code> module is a placeholder.</li>
|
||||
<li class="task-list-item"><input type="checkbox" disabled> <code>interpreter</code> module is a placeholder.</li>
|
||||
<li class="task-list-item"><input type="checkbox" disabled> Implement a more robust error handling mechanism instead of using <code>stderr</code>.</li>
|
||||
|
@ -170,18 +83,21 @@ print(`The square of $number is ${math.square($number)}`);
|
|||
|
||||
<h2>Running the Project</h2>
|
||||
<p>Make sure your project compiles and the tests pass:</p>
|
||||
<pre><code>
|
||||
cargo build
|
||||
cargo test
|
||||
</code></pre>
|
||||
<p>Although there's not much there right now. But the REPL works!</p>
|
||||
<pre><code class="language-bash">cargo build
|
||||
cargo test</code></pre>
|
||||
|
||||
<div class="contact">
|
||||
<p><a href="mailto:tristan@fddl.dev">Contact</a></p>
|
||||
<p><a href="/cdn-cgi/l/email-protection#cabeb8a3b9beaba48aacaeaea6e4aeafbc">Contact</a></p>
|
||||
<p><a href="https://git.fddl.dev/tristan/fddl">Git repo</a></p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
© 2024 fddl.dev
|
||||
© 2024 fddl Programming Language
|
||||
</footer>
|
||||
<!-- 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>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
95
styles.css
Normal file
95
styles.css
Normal file
|
@ -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;
|
||||
}
|
Loading…
Reference in a new issue