2023-04-08 13:38:21 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2023-04-08 14:05:48 -04:00
|
|
|
<title>Kraken Quals Presentation</title>
|
2023-04-08 13:38:21 -04:00
|
|
|
<link id="theme" rel="stylesheet" type="text/css" href="recursive.css"/>
|
|
|
|
|
<link href="favicon.png" rel="icon" type="image/png"/>
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
|
|
|
<style type="text/css">
|
2023-04-08 14:05:48 -04:00
|
|
|
// unset recursive.css website version
|
|
|
|
|
body { max-width: unset; }
|
|
|
|
|
.title > h1 { font-size: 4em; }
|
|
|
|
|
h1 { font-size: 2.5em; }
|
|
|
|
|
.rerun_container { position: relative; }
|
2023-04-08 13:38:21 -04:00
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body onload="loadEverything();">
|
|
|
|
|
<textarea id="source">
|
|
|
|
|
|
|
|
|
|
class: center, middle, title
|
|
|
|
|
|
|
|
|
|
# Kraken
|
|
|
|
|
|
|
|
|
|
_FOSS Fexprs: <a title="Kraken on GitHub" href="https://github.com/limvot/kraken">https://github.com/limvot/kraken</a>_
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Agenda
|
|
|
|
|
|
|
|
|
|
1. Introduction
|
|
|
|
|
2. Deep-dive
|
|
|
|
|
3. ...
|
|
|
|
|
|
|
|
|
|
[NOTE]: This file is portable; you don't need any other file, or an internet connection for this presentation.
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Introduction
|
|
|
|
|
|
|
|
|
|
HEre's some test code:
|
|
|
|
|
|
|
|
|
|
.run_container[
|
|
|
|
|
<div class="editor" id="hello_editor">; Of course
|
|
|
|
|
(println "Hello World")
|
|
|
|
|
; Just print 3
|
2023-04-08 14:05:48 -04:00
|
|
|
(println "Math workssss:" (+ 1 2 4))
|
2023-04-08 13:38:21 -04:00
|
|
|
</div>
|
|
|
|
|
]
|
|
|
|
|
--
|
2023-04-08 14:05:48 -04:00
|
|
|
.rerun_container[
|
2023-04-08 13:38:21 -04:00
|
|
|
<pre><code class="remark_code" id="hello_editor_output">output here...</code></pre>
|
2023-04-08 14:05:48 -04:00
|
|
|
<button class="run_button" onclick="executeKraken(hello_editor_jar[1].toString(), 'hello_editor_output')">Rerun</button> <br>
|
|
|
|
|
]
|
2023-04-08 13:38:21 -04:00
|
|
|
---
|
|
|
|
|
|
2023-04-08 14:05:48 -04:00
|
|
|
|
2023-04-08 13:38:21 -04:00
|
|
|
# Another slideo
|
|
|
|
|
|
|
|
|
|
boro
|
|
|
|
|
|
|
|
|
|
</textarea>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="./default.min.css">
|
|
|
|
|
<script src="./highlight.min.js"></script>
|
|
|
|
|
<script type="module">
|
|
|
|
|
import {CodeJar} from './codejar.js'
|
|
|
|
|
window.loadEverything = function() {
|
|
|
|
|
var slideshow = remark.create();
|
|
|
|
|
document.querySelectorAll('.editor').forEach((editor_div) => {
|
2023-04-08 14:05:48 -04:00
|
|
|
if (window[editor_div.id + "_jar"] == undefined) {
|
|
|
|
|
window[editor_div.id + "_jar"] = []
|
|
|
|
|
}
|
|
|
|
|
window[editor_div.id + "_jar"].push(CodeJar(editor_div, hljs.highlightElement))
|
2023-04-08 13:38:21 -04:00
|
|
|
});
|
|
|
|
|
slideshow.on('showSlide', function (slide) {
|
2023-04-08 14:05:48 -04:00
|
|
|
//console.log('Navigated to', slide)
|
|
|
|
|
for (const c of slide.content) {
|
|
|
|
|
if (c.class == "run_container") {
|
|
|
|
|
//console.log("found editor", c)
|
|
|
|
|
const re = /class="editor" id="([^"]+)"/;
|
|
|
|
|
let id = c.content[0].match(re)[1]
|
|
|
|
|
let editors = window[id + "_jar"]
|
|
|
|
|
if (slide.properties.continued == "true") {
|
|
|
|
|
editors[1].updateCode(editors[0].toString())
|
|
|
|
|
//console.log("Got editors", editors, "running kraken")
|
|
|
|
|
executeKraken(editors[1].toString(), id + "_output")
|
|
|
|
|
} else {
|
|
|
|
|
editors[0].updateCode(editors[1].toString())
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-04-08 13:38:21 -04:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
var output_name = ""
|
|
|
|
|
var Module = {
|
|
|
|
|
noInitialRun: true,
|
|
|
|
|
onRuntimeInitialized: () => {
|
|
|
|
|
},
|
|
|
|
|
print: txt => {
|
|
|
|
|
document.getElementById(output_name).innerHTML += txt + "\n";
|
|
|
|
|
},
|
|
|
|
|
printErr: txt => {
|
|
|
|
|
document.getElementById(output_name).innerHTML += "STDERR:[" + txt + "]\n";
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
function executeKraken(code, new_output_name) {
|
|
|
|
|
output_name = new_output_name
|
2023-04-08 14:05:48 -04:00
|
|
|
document.getElementById(new_output_name).innerHTML = "";
|
2023-04-08 13:38:21 -04:00
|
|
|
Module.callMain(["-C", code]);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<script type="text/javascript" src="k_prime.js"></script>
|
2023-04-08 14:05:48 -04:00
|
|
|
<script src="remark-latest.min.js"></script>
|
2023-04-08 13:38:21 -04:00
|
|
|
</body>
|
|
|
|
|
</html>
|