summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2021-05-19 12:41:00 +0100
committerPaul Buetow <git@mx.buetow.org>2021-05-21 05:11:05 +0100
commit680e1f5940b37db75824215153a6a92f1841b01b (patch)
tree581506c5d80853cdbcf31c7c6058cfe80ea121fe
parent03c974ec4e26888ec0ea1bca3ccf51af29d8bc9d (diff)
html is now a submodule
-rw-r--r--.gitmodules3
m---------content/html6
-rw-r--r--content/html/contact-information.html76
-rw-r--r--content/html/favicon.icobin1077 -> 0 bytes
-rw-r--r--content/html/gemfeed/2008-06-26-perl-poetry.html202
-rw-r--r--content/html/gemfeed/2010-04-09-standard-ml-and-haskell.html192
-rw-r--r--content/html/gemfeed/2010-05-09-the-fype-programming-language.html453
-rw-r--r--content/html/gemfeed/2011-05-07-perl-daemon-service-framework.html184
-rw-r--r--content/html/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html146
-rw-r--r--content/html/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.html202
-rw-r--r--content/html/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.pngbin576510 -> 0 bytes
-rw-r--r--content/html/gemfeed/2016-04-03-offsite-backup-with-zfs.html79
-rw-r--r--content/html/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html418
-rw-r--r--content/html/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.html74
-rw-r--r--content/html/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.html263
-rw-r--r--content/html/gemfeed/2016-11-20-methods-in-c.html118
-rw-r--r--content/html/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.html177
-rw-r--r--content/html/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure1-ioriot-io-recording.pngbin220247 -> 0 bytes
-rw-r--r--content/html/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure2-ioriot-test-preparation.pngbin208235 -> 0 bytes
-rw-r--r--content/html/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure3-ioriot-replay.pngbin417034 -> 0 bytes
-rw-r--r--content/html/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure4-ioriot-read-latency.pngbin39552 -> 0 bytes
-rw-r--r--content/html/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure5-ioriot-write-latency.pngbin26547 -> 0 bytes
-rw-r--r--content/html/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux/figure6-iostat.pngbin294346 -> 0 bytes
-rw-r--r--content/html/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html119
-rw-r--r--content/html/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dgrep.gifbin142329 -> 0 bytes
-rw-r--r--content/html/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/dtail.gifbin1984520 -> 0 bytes
-rw-r--r--content/html/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program/title.pngbin84933 -> 0 bytes
-rw-r--r--content/html/gemfeed/2021-04-24-welcome-to-the-geminispace.html105
-rw-r--r--content/html/gemfeed/2021-04-24-welcome-to-the-geminispace/amfora-screenshot.pngbin154951 -> 0 bytes
-rw-r--r--content/html/gemfeed/2021-05-15-buetow.org.sh-one-bash-script-to-rule-it-all.draft.html185
-rw-r--r--content/html/gemfeed/2021-05-16-personal-bash-coding-style-guide.html346
-rw-r--r--content/html/gemfeed/atom.xml2517
-rw-r--r--content/html/gemfeed/index.html69
-rw-r--r--content/html/index.html106
-rw-r--r--content/html/resources.html155
35 files changed, 9 insertions, 6186 deletions
diff --git a/.gitmodules b/.gitmodules
index 8d88bbc6..1d5d0402 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "content/gemtext"]
path = content/gemtext
url = git@github.com:snonux/buetow.org
+[submodule "content/html"]
+ path = content/html
+ url = git@github.com:snonux/buetow.org
diff --git a/content/html b/content/html
new file mode 160000
+Subproject 27ed46c9129db86669052d4e7211340da1081d8
diff --git a/content/html/contact-information.html b/content/html/contact-information.html
deleted file mode 100644
index 5f9ebb94..00000000
--- a/content/html/contact-information.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Contact information</title>
-<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
-<style type="text/css">
-body {
- margin: auto;
- max-width: 900px;
- background-color: #FFFFEF;
- border: 1px dashed #880000;
- border-radius: 8px;
- padding: 5px;
-}
-img {
- display:block;
- max-width: 80%;
-}
-a.textlink:before {
- content: " ⇒ ";
- padding-left: 2px;
-}
-a.textlink {
- text-decoration: none;
- color: #FF0000;
-}
-a.textlink:hover {
- text-decoration: underline;
-}
-i {
- color: #48AAAD;
-}
-pre {
- background-color: #F1F8E9;
- border: 1px dashed #BB0000;
- border-radius: 8px;
- padding: 5px;
- font-family: "Lucida Console", "Courier New", monospace;
-}
-h1 {
- text-align: center;
- color: #880000;
-}
-h2, h3 {
- color: #BB0000;
-}
-</style>
-</head>
-<body>
-<h1>Contact information</h1>
-<h2>E-Mail</h2>
-<ul>
-<li>Secure E-Mail: paul.buetow at protonmail dot com</li>
-<li>E-Mail: paul at buetow dot org (forwards to the ProtonMail address)</li>
-</ul>
-<p>Why did I just mention 2 E-Mail addresses here? The buetow.org address will always stay. It is my lifetime E-Mail address as I own the domain name. The address will stay even when I decided to change my email provider.</p>
-<p>Use the ProtonMail address if you care about security for now. The address stays valid as long as I am ProtonMail user. Especially if you are ProtonMail user too we could have real E-Mail end-2-end encryption for our conversation.</p>
-<h2>Quick Links</h2>
-<h3>Social Media</h3>
-<p>I am sharing articles which I found interesting regularly on all the social media channels. To get you navigated quickly, here are the links:</p>
-<a class="textlink" href="https://www.linkedin.com/in/paul-buetow-b4857270/">My LinkedIn profile</a><br />
-<a class="textlink" href="https://twitter.com/snonux">My Twitter profile</a><br />
-<a class="textlink" href="https://t.me/snonux">My Telegram channel</a><br />
-<h3>My Open Source code repositories</h3>
-<a class="textlink" href="https://github.com/snonux">My personal GitHub page</a><br />
-<a class="textlink" href="https://github.com/mimecast/dtail">DTail at Mimecast</a><br />
-<a class="textlink" href="https://github.com/mimecast/ioriot">I/O Riot at Mimecast</a><br />
-<h3>My old personal website</h3>
-<p>It's still there for fun + profit.</p>
-<a class="textlink" href="http://paul.buetow.org">http://paul.buetow.org</a><br />
-<p>It's powered by Xerl, my own CMS:</p>
-<a class="textlink" href="http://xerl.buetow.org">http://xerl.buetow.org</a><br />
-<a class="textlink" href="./">Go back to the main site</a><br />
-</body>
-</html>
diff --git a/content/html/favicon.ico b/content/html/favicon.ico
deleted file mode 100644
index 999c023e..00000000
--- a/content/html/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/content/html/gemfeed/2008-06-26-perl-poetry.html b/content/html/gemfeed/2008-06-26-perl-poetry.html
deleted file mode 100644
index 0f5b5121..00000000
--- a/content/html/gemfeed/2008-06-26-perl-poetry.html
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Perl Poetry</title>
-<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
-<style type="text/css">
-body {
- margin: auto;
- max-width: 900px;
- background-color: #FFFFEF;
- border: 1px dashed #880000;
- border-radius: 8px;
- padding: 5px;
-}
-img {
- display:block;
- max-width: 80%;
-}
-a.textlink:before {
- content: " ⇒ ";
- padding-left: 2px;
-}
-a.textlink {
- text-decoration: none;
- color: #FF0000;
-}
-a.textlink:hover {
- text-decoration: underline;
-}
-i {
- color: #48AAAD;
-}
-pre {
- background-color: #F1F8E9;
- border: 1px dashed #BB0000;
- border-radius: 8px;
- padding: 5px;
- font-family: "Lucida Console", "Courier New", monospace;
-}
-h1 {
- text-align: center;
- color: #880000;
-}
-h2, h3 {
- color: #BB0000;
-}
-</style>
-</head>
-<body>
-<h1>Perl Poetry</h1>
-<pre>
- '\|/' *
--- * -----
- /|\ ____
- ' | ' {_ o^&gt; *
- : -_ /)
- : ( ( .-''`'.
- . \ \ / \
- . \ \ / \
- \ `-' `'.
- \ . ' / `.
- \ ( \ ) ( .')
- ,, t '. | / | (
- '|``_/^\___ '| |`'-..-'| ( ()
-_~~|~/_|_|__/|~~~~~~~ | / ~~~~~ | | ~~~~~~~~
- -_ |L[|]L|/ | |\ MJP ) )
- ( |( / /|
- ~~ ~ ~ ~~~~ | /\\ / /| |
- || \\ _/ / | |
- ~ ~ ~~~ _|| (_/ (___)_| |Nov291999
- (__) (____)
-</pre>
-<p class="quote"><i>Written by Paul Buetow 2008-06-26, last updated 2021-05-04</i></p>
-<p>Here are some Perl Poems I wrote. They don't do anything useful when you run them, but they don't produce a compiler error either. They only exist for fun and demonstrate what you can do with Perl syntax.</p>
-<p>Wikipedia: "Perl poetry is the practice of writing poems that can be compiled as legal Perl code, for example the piece known as Black Perl. Perl poetry is made possible by the large number of English words that are used in the Perl language. New poems are regularly submitted to the community at PerlMonks."</p>
-<a class="textlink" href="https://en.wikipedia.org/wiki/Perl">https://en.wikipedia.org/wiki/Perl</a><br />
-<h2>math.pl</h2>
-<pre>
-#!/usr/bin/perl
-
-# (C) 2006 by Paul C. Buetow (http://paul.buetow.org)
-
-goto library for study $math;
-BEGIN { s/earching/ books/
-and read $them, $at, $the } library:
-
-our $topics, cos and tan,
-require strict; import { of, tied $patience };
-
-do { int'egrate'; sub trade; };
-do { exp'onentize' and abs'olutize' };
-study and study and study and study;
-
-foreach $topic ({of, math}) {
-you, m/ay /go, to, limits }
-
-do { not qw/erk / unless $success
-and m/ove /o;$n and study };
-
-do { int'egrate'; sub trade; };
-do { exp'onentize' and abs'olutize' };
-study and study and study and study;
-
-grep /all/, exp'onents' and cos'inuses';
-/seek results/ for @all, log'4rithms';
-
-'you' =~ m/ay /go, not home
-unless each %book ne#ars
-$completion;
-
-do { int'egrate'; sub trade; };
-do { exp'onentize' and abs'olutize' };
-
-#at
-home: //ig,'nore', time and sleep $very =~ s/tr/on/g;
-__END__
-
-</pre>
-<h2>christmas.pl</h2>
-<pre>
-#!/usr/bin/perl
-
-# (C) 2006 by Paul C. Buetow (http://paul.buetow.org)
-
-Christmas:{time;#!!!
-
-Children: do tell $wishes;
-
-Santa: for $each (@children) {
-BEGIN { read $each, $their, wishes and study them; use Memoize#ing
-
-} use constant gift, 'wrapping';
-package Gifts; pack $each, gift and bless $each and goto deliver
-or do import if not local $available,!!! HO, HO, HO;
-
-redo Santa, pipe $gifts, to_childs;
-redo Santa and do return if last one, is, delivered;
-
-deliver: gift and require diagnostics if our $gifts ,not break;
-do{ use NEXT; time; tied $gifts} if broken and dump the, broken, ones;
-The_children: sleep and wait for (each %gift) and try { to =&gt; untie $gifts };
-
-redo Santa, pipe $gifts, to_childs;
-redo Santa and do return if last one, is, delivered;
-
-The_christmas_tree: formline s/ /childrens/, $gifts;
-alarm and warn if not exists $Christmas{ tree}, @t, $ENV{HOME};
-write &lt;&lt;EMail
- to the parents to buy a new christmas tree!!!!111
- and send the
-EMail
-;wait and redo deliver until defined local $tree;
-
-redo Santa, pipe $gifts, to_childs;
-redo Santa and do return if last one, is, delivered ;}
-
-END {} our $mission and do sleep until next Christmas ;}
-
-__END__
-
-This is perl, v5.8.8 built for i386-freebsd-64int
-</pre>
-<h2>shopping.pl</h2>
-<pre>
-#!/usr/bin/perl
-
-# (C) 2007 by Paul C. Buetow (http://paul.buetow.org)
-
-BEGIN{} goto mall for $shopping;
-
-m/y/; mall: seek$s, cool products(), { to =&gt; $sell };
-for $their (@business) { to:; earn:; a:; lot:; of:; money: }
-
-do not goto home and exit mall if exists $new{product};
-foreach $of (q(uality rich products)){} package products;
-
-our $news; do tell cool products() and do{ sub#tract
-cool{ $products and shift @the, @bad, @ones;
-
-do bless [q(uality)], $products
-and return not undef $stuff if not (local $available) }};
-
-do { study and study and study for cool products() }
-and do { seek $all, cool products(), { to =&gt; $buy } };
-
-do { write $them, $down } and do { order: foreach (@case) { package s } };
-goto home if not exists $more{money} or die q(uerying) ;for( @money){};
-
-at:;home: do { END{} and:; rest:; a:; bit: exit $shopping }
-and sleep until unpack$ing, cool products();
-
-__END__
-This is perl, v5.8.8 built for i386-freebsd-64int
-</pre>
-<h2>More...</h2>
-<p>Did you like what you saw? Have a look at Github to see my other poems too:</p>
-<a class="textlink" href="https://github.com/snonux/perl-poetry">https://github.com/snonux/perl-poetry</a><br />
-<p>E-Mail me your thoughts at comments@mx.buetow.org!</p>
-<a class="textlink" href="../">Go back to the main site</a><br />
-</body>
-</html>
diff --git a/content/html/gemfeed/2010-04-09-standard-ml-and-haskell.html b/content/html/gemfeed/2010-04-09-standard-ml-and-haskell.html
deleted file mode 100644
index 307c3593..00000000
--- a/content/html/gemfeed/2010-04-09-standard-ml-and-haskell.html
+++ /dev/null
@@ -1,192 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Standard ML and Haskell</title>
-<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
-<style type="text/css">
-body {
- margin: auto;
- max-width: 900px;
- background-color: #FFFFEF;
- border: 1px dashed #880000;
- border-radius: 8px;
- padding: 5px;
-}
-img {
- display:block;
- max-width: 80%;
-}
-a.textlink:before {
- content: " ⇒ ";
- padding-left: 2px;
-}
-a.textlink {
- text-decoration: none;
- color: #FF0000;
-}
-a.textlink:hover {
- text-decoration: underline;
-}
-i {
- color: #48AAAD;
-}
-pre {
- background-color: #F1F8E9;
- border: 1px dashed #BB0000;
- border-radius: 8px;
- padding: 5px;
- font-family: "Lucida Console", "Courier New", monospace;
-}
-h1 {
- text-align: center;
- color: #880000;
-}
-h2, h3 {
- color: #BB0000;
-}
-</style>
-</head>
-<body>
-<h1>Standard ML and Haskell</h1>
-<p class="quote"><i>Written by Paul Buetow 2010-04-09</i></p>
-<p>I am currently looking into the functional programming language Standard ML (aka SML). The purpose is to refresh my functional programming skills and to learn something new too. Since I already know a little Haskell, could I do not help myself and I implemented the same exercises in Haskell too.</p>
-<p>As you will see, SML and Haskell are very similar (at least when it comes to the basics). However, the syntax of Haskell is a bit more "advanced". Haskell utilizes fewer keywords (e.g. no val, end, fun, fn ...). Haskell also allows to explicitly write down the function types. What I have been missing in SML so far is the so-called pattern guards. Although this is a very superficial comparison for now, so far I like Haskell more than SML. Nevertheless, I thought it would be fun to demonstrate a few simple functions of both languages to show off the similarities. </p>
-<p>Haskell is also a "pure functional" programming language, whereas SML also makes explicit use of imperative concepts. I am by far not a specialist in either of these languages but here are a few functions implemented in both, SML and Haskell:</p>
-<h2>Defining a multi data type</h2>
-<p>Standard ML:</p>
-<pre>
-datatype ’a multi
- = EMPTY
- | ELEM of ’a
- | UNION of ’a multi * ’a multi
-</pre>
-<p>Haskell:</p>
-<pre>
-data (Eq a) =&gt; Multi a
- = Empty
- | Elem a
- | Union (Multi a) (Multi a)
- deriving Show
-</pre>
-<h2>Processing a multi</h2>
-<p>Standard ML:</p>
-<pre>
-fun number (EMPTY) _ = 0
- | number (ELEM x) w = if x = w then 1 else 0
- | number (UNION (x,y)) w = (number x w) + (number y w)
-fun test_number w = number (UNION (EMPTY, \
- UNION (ELEM 4, UNION (ELEM 6, \
- UNION (UNION (ELEM 4, ELEM 4), EMPTY))))) w
-</pre>
-<p>Haskell:</p>
-<pre>
-number Empty _ = 0
-number (Elem x) w = if x == w then 1 else 0
-test_number w = number (Union Empty \
- (Union (Elem 4) (Union (Elem 6) \
- (Union (Union (Elem 4) (Elem 4)) Empty)))) w
-</pre>
-<h2>Simplify function</h2>
-<p>Standard ML:</p>
-<pre>
-fun simplify (UNION (x,y)) =
- let fun is_empty (EMPTY) = true | is_empty _ = false
- val x’ = simplify x
- val y’ = simplify y
- in if (is_empty x’) andalso (is_empty y’)
- then EMPTY
- else if (is_empty x’)
- then y’
- else if (is_empty y’)
- then x’
- else UNION (x’, y’)
- end
- | simplify x = x
-</pre>
-<p>Haskell:</p>
-<pre>
-simplify (Union x y)
- | (isEmpty x’) &amp;&amp; (isEmpty y’) = Empty
- | isEmpty x’ = y’
- | isEmpty y’ = x’
- | otherwise = Union x’ y’
- where
- isEmpty Empty = True
- isEmpty _ = False
- x’ = simplify x
- y’ = simplify y
-simplify x = x
-</pre>
-<h2>Delete all</h2>
-<p>Standard ML:</p>
-<pre>
-fun delete_all m w =
- let fun delete_all’ (ELEM x) = if x = w then EMPTY else ELEM x
- | delete_all’ (UNION (x,y)) = UNION (delete_all’ x, delete_all’ y)
- | delete_all’ x = x
- in simplify (delete_all’ m)
- end
-</pre>
-<p>Haskell:</p>
-<pre>
-delete_all m w = simplify (delete_all’ m)
- where
- delete_all’ (Elem x) = if x == w then Empty else Elem x
- delete_all’ (Union x y) = Union (delete_all’ x) (delete_all’ y)
- delete_all’ x = x
-</pre>
-<h2>Delete one</h2>
-<p>Standard ML:</p>
-<pre>
-fun delete_one m w =
- let fun delete_one’ (UNION (x,y)) =
- let val (x’, deleted) = delete_one’ x
- in if deleted
- then (UNION (x’, y), deleted)
- else let val (y’, deleted) = delete_one’ y
- in (UNION (x, y’), deleted)
- end
- end
- | delete_one’ (ELEM x) =
- if x = w then (EMPTY, true) else (ELEM x, false)
- | delete_one’ x = (x, false)
- val (m’, _) = delete_one’ m
- in simplify m’
- end
-</pre>
-<p>Haskell:</p>
-<pre>
-delete_one m w = do
- let (m’, _) = delete_one’ m
- simplify m’
- where
- delete_one’ (Union x y) =
- let (x’, deleted) = delete_one’ x
- in if deleted
- then (Union x’ y, deleted)
- else let (y’, deleted) = delete_one’ y
- in (Union x y’, deleted)
- delete_one’ (Elem x) =
- if x == w then (Empty, True) else (Elem x, False)
- delete_one’ x = (x, False)
-</pre>
-<h2>Higher order functions</h2>
-<p>The first line is always the SML code, the second line always the Haskell variant:</p>
-<pre>
-fun make_map_fn f1 = fn (x,y) =&gt; f1 x :: y
-make_map_fn f1 = \x y -&gt; f1 x : y
-
-fun make_filter_fn f1 = fn (x,y) =&gt; if f1 x then x :: y else y
-make_filter_fn f1 = \x y -&gt; if f1 then x : y else y
-
-fun my_map f l = foldr (make_map_fn f) [] l
-my_map f l = foldr (make_map_fn f) [] l
-
-fun my_filter f l = foldr (make_filter_fn f) [] l
-my_filter f l = foldr (make_filter_fn f) [] l
-</pre>
-<p>E-Mail me your thoughts at comments@mx.buetow.org!</p>
-<a class="textlink" href="../">Go back to the main site</a><br />
-</body>
-</html>
diff --git a/content/html/gemfeed/2010-05-09-the-fype-programming-language.html b/content/html/gemfeed/2010-05-09-the-fype-programming-language.html
deleted file mode 100644
index 7cbd0fb0..00000000
--- a/content/html/gemfeed/2010-05-09-the-fype-programming-language.html
+++ /dev/null
@@ -1,453 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>The Fype Programming Language</title>
-<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
-<style type="text/css">
-body {
- margin: auto;
- max-width: 900px;
- background-color: #FFFFEF;
- border: 1px dashed #880000;
- border-radius: 8px;
- padding: 5px;
-}
-img {
- display:block;
- max-width: 80%;
-}
-a.textlink:before {
- content: " ⇒ ";
- padding-left: 2px;
-}
-a.textlink {
- text-decoration: none;
- color: #FF0000;
-}
-a.textlink:hover {
- text-decoration: underline;
-}
-i {
- color: #48AAAD;
-}
-pre {
- background-color: #F1F8E9;
- border: 1px dashed #BB0000;
- border-radius: 8px;
- padding: 5px;
- font-family: "Lucida Console", "Courier New", monospace;
-}
-h1 {
- text-align: center;
- color: #880000;
-}
-h2, h3 {
- color: #BB0000;
-}
-</style>
-</head>
-<body>
-<h1>The Fype Programming Language</h1>
-<pre>
- ____ _ __
- / / _|_ _ _ __ ___ _ _ ___ __ _| |__ / _|_ _
- / / |_| | | | '_ \ / _ \ | | | |/ _ \/ _` | '_ \ | |_| | | |
- _ / /| _| |_| | |_) | __/ | |_| | __/ (_| | | | |_| _| |_| |
-(_)_/ |_| \__, | .__/ \___| \__, |\___|\__,_|_| |_(_)_| \__, |
- |___/|_| |___/ |___/
-</pre>
-<p class="quote"><i>Written by Paul Buetow 2010-05-09, last updated 2021-05-05</i></p>
-<p>Fype is an interpreted programming language created by me for learning and fun. The interpreter is written in C. It has been tested on FreeBSD and NetBSD and may also work on other Unix like operating systems such as Linux based ones. To be honest, besides learning and fun there is really no other use case of why Fype actually exists as many other programming languages are much faster and more powerful.</p>
-<p>The Fype syntax is very simple and is using a maximum look ahead of 1 and a very easy top down parsing mechanism. Fype is parsing and interpreting its code simultaneously. This means, that syntax errors are only detected during program runtime. </p>
-<p>Fype is a recursive acronym and means "Fype is For Your Program Execution" or "Fype is Free Yak Programmed for ELF". You could also say "It's not a hype - it's Fype!".</p>
-<h2>Object oriented C style</h2>
-<p>The Fype interpreter is written in an object oriented style of C. Each "main component" has its own .h and .c file. There is a struct type for each (most components at least) component which can be initialized using a "COMPONENT_new" function and destroyed using a "COMPONENT_delete" function. Method calls follow the same schema, e.g. "COMPONENT_METHODNAME". There is no such as class inheritance and polymorphism involved. </p>
-<p>To give you an idea how it works here as an example is a snippet from the main Fype "class header":</p>
-<pre>
-typedef struct {
- Tupel *p_tupel_argv; // Contains command line options
- List *p_list_token; // Initial list of token
- Hash *p_hash_syms; // Symbol table
- char *c_basename;
-} Fype;
-</pre>
-<p>And here is a snippet from the main Fype "class implementation":</p>
-<pre>
-Fype*
-fype_new() {
- Fype *p_fype = malloc(sizeof(Fype));
-
- p_fype-&gt;p_hash_syms = hash_new(512);
- p_fype-&gt;p_list_token = list_new();
- p_fype-&gt;p_tupel_argv = tupel_new();
- p_fype-&gt;c_basename = NULL;
-
- garbage_init();
-
- return (p_fype);
-}
-
-void
-fype_delete(Fype *p_fype) {
- argv_tupel_delete(p_fype-&gt;p_tupel_argv);
-
- hash_iterate(p_fype-&gt;p_hash_syms, symbol_cleanup_hash_syms_cb);
- hash_delete(p_fype-&gt;p_hash_syms);
-
- list_iterate(p_fype-&gt;p_list_token, token_ref_down_cb);
- list_delete(p_fype-&gt;p_list_token);
-
- if (p_fype-&gt;c_basename)
- free(p_fype-&gt;c_basename);
-
- garbage_destroy();
-}
-
-int
-fype_run(int i_argc, char **pc_argv) {
- Fype *p_fype = fype_new();
-
- // argv: Maintains command line options
- argv_run(p_fype, i_argc, pc_argv);
-
- // scanner: Creates a list of token
- scanner_run(p_fype);
-
- // interpret: Interpret the list of token
- interpret_run(p_fype);
-
- fype_delete(p_fype);
-
- return (0);
-}
-</pre>
-<h2>Data types</h2>
-<p>Fype uses auto type conversion. However, if you want to know what's going on you may take a look at the following basic data types:</p>
-<ul>
-<li>integer - Specifies a number</li>
-<li>double - Specifies a double precision number</li>
-<li>string - Specifies a string</li>
-<li>number - May be an integer or a double number</li>
-<li>any- May be any type above</li>
-<li>void - No type</li>
-<li>identifier - It's a variable name or a procedure name or a function name</li>
-</ul>
-<p>There is no boolean type, but we can use the integer values 0 for false and 1 for true. There is support for explicit type casting too.</p>
-<h2>Syntax</h2>
-<h3>Comments</h3>
-<p>Text from a # character until the end of the current line is considered being a comment. Multi line comments may start with an #* and with a *# anywhere. Exceptions are if those signs are inside of strings.</p>
-<h3>Variables</h3>
-<p>Variables can be defined with the "my" keyword (inspired by Perl :-). If you don't assign a value during declaration, then it's using the default integer value 0. Variables may be changed during program runtime. Variables may be deleted using the "undef" keyword! Example:</p>
-<pre>
-my foo = 1 + 2;
-say foo;
-
-my bar = 12, baz = foo;
-say 1 + bar;
-say bar;
-
-my baz;
-say baz; # Will print out 0
-</pre>
-<p>You may use the "defined" keyword to check if an identifier has been defined or not:</p>
-<pre>
-ifnot defined foo {
- say "No foo yet defined";
-}
-
-my foo = 1;
-
-if defined foo {
- put "foo is defined and has the value ";
- say foo;
-}
-</pre>
-<h3>Synonyms</h3>
-<p>Each variable can have as many synonyms as wished. A synonym is another name to access the content of a specific variable. Here is an example of how to use is:</p>
-<pre>
-my foo = "foo";
-my bar = \foo;
-foo = "bar";
-
-# The synonym variable should now also set to "bar"
-assert "bar" == bar;
-</pre>
-<p>Synonyms can be used for all kind of identifiers. It's not limited to normal variables but can be also used for function and procedure names etc (more about functions and procedures later).</p>
-<pre>
-# Create a new procedure baz
-proc baz { say "I am baz"; }
-
-# Make a synonym baz, and undefine baz
-my bay = \baz;
-
-undef baz;
-
-# bay still has a reference of the original procedure baz
-bay; # this prints aut "I am baz"
-</pre>
-<p>The "syms" keyword gives you the total number of synonyms pointing to a specific value:</p>
-<pre>
-my foo = 1;
-say syms foo; # Prints 1
-
-my baz = \foo;
-say syms foo; # Prints 2
-say syms baz; # Prints 2
-
-undef baz;
-say syms foo; # Prints 1
-</pre>
-<h2>Statements and expressions</h2>
-<p>A Fype program is a list of statements. Each keyword, expression or function call is part of a statement. Each statement is ended with a semicolon. Example:</p>
-<pre>
-my bar = 3, foo = 1 + 2;
-say foo;
-exit foo - bar;
-</pre>
-<h3>Parenthesis</h3>
-<p>All parenthesis for function arguments are optional. They help to make the code better readable. They also help to force precedence of expressions.</p>
-<h3>Basic expressions</h3>
-<p>Any "any" value holding a string will be automatically converted to an integer value.</p>
-<pre>
-(any) &lt;any&gt; + &lt;any&gt;
-(any) &lt;any&gt; - &lt;any&gt;
-(any) &lt;any&gt; * &lt;any&gt;
-(any) &lt;any&gt; / &lt;any&gt;
-(integer) &lt;any&gt; == &lt;any&gt;
-(integer) &lt;any&gt; != &lt;any&gt;
-(integer) &lt;any&gt; &lt;= &lt;any&gt;
-(integer) &lt;any&gt; gt &lt;any&gt;
-(integer) &lt;any&gt; &lt;&gt; &lt;any&gt;
-(integer) &lt;any&gt; gt &lt;any&gt;
-(integer) not &lt;any&gt;
-</pre>
-<h3>Bitwise expressions</h3>
-<pre>
-(integer) &lt;any&gt; :&lt; &lt;any&gt;
-(integer) &lt;any&gt; :&gt; &lt;any&gt;
-(integer) &lt;any&gt; and &lt;any&gt;
-(integer) &lt;any&gt; or &lt;any&gt;
-(integer) &lt;any&gt; xor &lt;any&gt;
-</pre>