diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-06-03 06:43:59 -0700 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-06-03 06:43:59 -0700 |
| commit | bca1916d29000c38c6ebf032120edcc83323549e (patch) | |
| tree | cfe108940c7930d74b9e30c90fcf06d426f35392 /cmd | |
| parent | fef70c0c27a39480dd4559b9e8cb97e5b67e3fa9 (diff) | |
| download | x-bca1916d29000c38c6ebf032120edcc83323549e.tar.xz x-bca1916d29000c38c6ebf032120edcc83323549e.zip | |
cmd/hlang: fix source link
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/hlang/hlang.templ | 2 | ||||
| -rw-r--r-- | cmd/hlang/hlang_templ.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/hlang/hlang.templ b/cmd/hlang/hlang.templ index b5fe57b..15931dc 100644 --- a/cmd/hlang/hlang.templ +++ b/cmd/hlang/hlang.templ @@ -63,7 +63,7 @@ templ homePage() { </ul> <hr/> <h2>Open-Source</h2> - <p>The h compiler and default runtime are <a href="https://tulpa.dev/cadey/hlang">open-source</a> free software sent out into the <a href="https://creativecommons.org/choose/zero/">Public Domain</a>. You can use h for any purpose at all with no limitations or restrictions.</p> + <p>The h compiler and default runtime are <a href="https://github.com/Xe/x/tree/master/cmd/hlang">open-source</a> free software sent out into the <a href="https://creativecommons.org/choose/zero/">Public Domain</a>. You can use h for any purpose at all with no limitations or restrictions.</p> <hr/> } diff --git a/cmd/hlang/hlang_templ.go b/cmd/hlang/hlang_templ.go index 81d01e8..3541a09 100644 --- a/cmd/hlang/hlang_templ.go +++ b/cmd/hlang/hlang_templ.go @@ -71,7 +71,7 @@ func homePage() templ.Component { templ_7745c5c3_Var3 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<p><big>A simple, fast, open-source, complete and safe language for developing modern software for the web</big></p><hr><h2>Example Program</h2><code><pre>h</pre></code><p>Outputs:</p><code><pre>h</pre></code><hr><h2>Fast Compilation</h2><p>h probably compiles hundreds of characters of source per second. I didn't really test how fast it is, but when I was testing it the speed was fast enough that I didn't care to profile it.</p><hr><h2>Safety</h2><p>h is completely memory safe with no garbage collector or heap allocations. It does not allow memory leaks to happen, nor do any programs in h have the possibility to allocate memory.</p><ul><li>No null</li><li>Completely deterministic behavior</li><li>No mutable state</li><li>No persistence</li><li>All functions are pure functions</li><li>No sandboxing required</li></ul><hr><h2>Zero* Dependencies</h2><p>h generates <a href=\"http://webassembly.org\">WebAssembly</a>, so every binary produced by the compiler is completely dependency free save a single system call: <code>h.h</code>. This allows for modern, future-proof code that will work on all platforms.</p><hr><h2>Simple</h2><p>h has a <a href=\"/grammar/h.peg\">simple grammar</a> that gzips to 117 bytes. Creating a runtime environment for h is so trivial just about anyone can do it.</p><hr><h2>Platform Support</h2><p>h supports the following platforms:</p><ul><li>Google Chrome</li><li>Electron</li><li>Chromium Embedded Framework</li><li>Microsoft Edge</li><li>Pa'i</li></ul><hr><h2>International Out of the Box</h2><p>h supports multiple written and spoken languages with true contextual awareness. It not only supports the Latin <code>h</code> as input, it also accepts the <a href=\"http://lojban.org\">Lojbanic</a> <code>'</code> as well. This allows for full 100% internationalization into Lojban should your project needs require it.</p><hr><h2>Testimonials</h2><p>Not convinced? Take the word of people we probably didn't pay for their opinion.</p><ul><li>I don't see the point of this.</li><li>This solves all my problems. All of them. Just not in the way I expected it to.</li><li>Yes.</li><li>Perfect.</li><li>h is the backbone of my startup.</li></ul><hr><h2>Open-Source</h2><p>The h compiler and default runtime are <a href=\"https://tulpa.dev/cadey/hlang\">open-source</a> free software sent out into the <a href=\"https://creativecommons.org/choose/zero/\">Public Domain</a>. You can use h for any purpose at all with no limitations or restrictions.</p><hr>") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<p><big>A simple, fast, open-source, complete and safe language for developing modern software for the web</big></p><hr><h2>Example Program</h2><code><pre>h</pre></code><p>Outputs:</p><code><pre>h</pre></code><hr><h2>Fast Compilation</h2><p>h probably compiles hundreds of characters of source per second. I didn't really test how fast it is, but when I was testing it the speed was fast enough that I didn't care to profile it.</p><hr><h2>Safety</h2><p>h is completely memory safe with no garbage collector or heap allocations. It does not allow memory leaks to happen, nor do any programs in h have the possibility to allocate memory.</p><ul><li>No null</li><li>Completely deterministic behavior</li><li>No mutable state</li><li>No persistence</li><li>All functions are pure functions</li><li>No sandboxing required</li></ul><hr><h2>Zero* Dependencies</h2><p>h generates <a href=\"http://webassembly.org\">WebAssembly</a>, so every binary produced by the compiler is completely dependency free save a single system call: <code>h.h</code>. This allows for modern, future-proof code that will work on all platforms.</p><hr><h2>Simple</h2><p>h has a <a href=\"/grammar/h.peg\">simple grammar</a> that gzips to 117 bytes. Creating a runtime environment for h is so trivial just about anyone can do it.</p><hr><h2>Platform Support</h2><p>h supports the following platforms:</p><ul><li>Google Chrome</li><li>Electron</li><li>Chromium Embedded Framework</li><li>Microsoft Edge</li><li>Pa'i</li></ul><hr><h2>International Out of the Box</h2><p>h supports multiple written and spoken languages with true contextual awareness. It not only supports the Latin <code>h</code> as input, it also accepts the <a href=\"http://lojban.org\">Lojbanic</a> <code>'</code> as well. This allows for full 100% internationalization into Lojban should your project needs require it.</p><hr><h2>Testimonials</h2><p>Not convinced? Take the word of people we probably didn't pay for their opinion.</p><ul><li>I don't see the point of this.</li><li>This solves all my problems. All of them. Just not in the way I expected it to.</li><li>Yes.</li><li>Perfect.</li><li>h is the backbone of my startup.</li></ul><hr><h2>Open-Source</h2><p>The h compiler and default runtime are <a href=\"https://github.com/Xe/x/tree/master/cmd/hlang\">open-source</a> free software sent out into the <a href=\"https://creativecommons.org/choose/zero/\">Public Domain</a>. You can use h for any purpose at all with no limitations or restrictions.</p><hr>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -156,7 +156,7 @@ func playgroundPage() templ.Component { templ_7745c5c3_Var7 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<p><small>Unfortunately, Javascript is required to use this page, sorry.</small></p><h2>Program</h2><input id=\"program\" type=\"text\" value=\"h\"> <input onClick=\"runProgram()\" type=\"button\" value=\"Run\"><p id=\"status\"></p><h3>Output</h3><code><pre id=\"output\"></pre></code><h4>AST</h4><code><pre id=\"ast_box\"></pre></code><p>Gas used: <span id=\"gas_used\"></span></p><p>Execution time (nanoseconds): <span id=\"exec_time\"></span></p><script>\n function runProgram() {\n const programData = document.getElementById(\"program\").value;\n const output = document.getElementById(\"output\");\n const astBox = document.getElementById(\"ast_box\");\n const execTime = document.getElementById(\"exec_time\");\n const status = document.getElementById(\"status\");\n\n status.innerHTML = \"submitting to the server...\";\n\n postData(\"/api/playground\", programData)\n .then(function(data) {\n if (data.err != null) {\n status.innerHTML = data.err;\n return;\n }\n\n status.innerHTML = \"success\";\n astBox.innerHTML = data.prog.ast;\n output.innerHTML = data.res.out;\n execTime.innerHTML = data.res.exec_duration;\n })\n .catch(function(error) {\n console.log(error);\n status.innerHTML = error + \". Please try again later?\";\n });\n }\n\n function postData(url = \"\", data = \"h\") {\n return fetch(url, {\n method: \"POST\",\n mode: \"cors\",\n cache: \"no-cache\",\n headers: {\n \"Content-Type\": \"text/plain\",\n },\n referrer: \"no-referrer\",\n body: data,\n }).then(response => response.json());\n }\n </script>") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<p><small>Unfortunately, Javascript is required to use this page, sorry.</small></p><h2>Program</h2><input id=\"program\" type=\"text\" value=\"h\"> <input onClick=\"runProgram()\" type=\"button\" value=\"Run\"><p id=\"status\"></p><h3>Output</h3><code><pre id=\"output\"></pre></code><h4>AST</h4><code><pre id=\"ast_box\"></pre></code><p>Execution time (nanoseconds): <span id=\"exec_time\"></span></p><script>\n function runProgram() {\n const programData = document.getElementById(\"program\").value;\n const output = document.getElementById(\"output\");\n const astBox = document.getElementById(\"ast_box\");\n const execTime = document.getElementById(\"exec_time\");\n const status = document.getElementById(\"status\");\n\n status.innerHTML = \"submitting to the server...\";\n\n postData(\"/api/playground\", programData)\n .then(function(data) {\n if (data.err != null) {\n status.innerHTML = data.err;\n return;\n }\n\n status.innerHTML = \"success\";\n astBox.innerHTML = data.prog.ast;\n output.innerHTML = data.res.out;\n execTime.innerHTML = data.res.exec_duration;\n })\n .catch(function(error) {\n console.log(error);\n status.innerHTML = error + \". Please try again later?\";\n });\n }\n\n function postData(url = \"\", data = \"h\") {\n return fetch(url, {\n method: \"POST\",\n mode: \"cors\",\n cache: \"no-cache\",\n headers: {\n \"Content-Type\": \"text/plain\",\n },\n referrer: \"no-referrer\",\n body: data,\n }).then(response => response.json());\n }\n </script>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } |
