aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhovertank3d <[email protected]>2025-05-24 10:58:06 +0000
committerhovertank3d <[email protected]>2025-05-24 10:58:06 +0000
commit588cedf699de1eda2c476133193cc2bb1e9d5dbc (patch)
tree6c4354fb2d38e6e80262351788cef02a3685cc58
parent1a5a86a5d4557200db20e20206bcdd7b9b2a7e55 (diff)
downloadlzcnt.space-588cedf699de1eda2c476133193cc2bb1e9d5dbc.tar.xz
lzcnt.space-588cedf699de1eda2c476133193cc2bb1e9d5dbc.zip
update about and link to the source code
-rw-r--r--Dockerfile12
-rw-r--r--about.go13
-rw-r--r--log2.s2
-rw-r--r--templates/about.go.html16
-rw-r--r--templates/log2.s.html14
5 files changed, 45 insertions, 12 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c6c0b2e
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,12 @@
+FROM golang:1.23
+
+WORKDIR /app
+COPY go.mod .
+
+RUN go mod download
+
+COPY . .
+
+RUN GOOS=linux go build -o /lzcnt ./cmd
+
+CMD ["/lzcnt"]
diff --git a/about.go b/about.go
index e005d55..3d675c9 100644
--- a/about.go
+++ b/about.go
@@ -1,14 +1,5 @@
-// i made this site to serve some of my future demos and fuuny
-// projects. currently there are only couple of interesting things i wrote:
-
-// * {{ template "link.html" (arr "46load" "https://github.com/hovertank3d/46load")}},
-// * {{ template "link.html" (arr "fire" "https://github.com/hovertank3d/fire")}},
-// * {{ template "link.html" (arr "bfc" "https://github.com/hovertank3d/bfc")}},
-// * {{ template "link.html" (arr "enigma16" "https://github.com/hovertank3d/enigma16")}},
-
-// so, come back when i'll write something
-
-// also, this site uses {{ template "link.html" (arr "genhl" "https://github.com/hovertank3d/genhl")}} to go:generate syntax highlight
+// about page is yet to be written ;)
+// come back later
package lzcnt
diff --git a/log2.s b/log2.s
index cae631b..b7040e5 100644
--- a/log2.s
+++ b/log2.s
@@ -10,4 +10,4 @@ log2lzcnt: # log2lzcnt({{.Requests}});
ret # 2^{{.Log2lzcnt}} requests handled
# copyleft 2025 iskrim46
-# {{template "link.html" (arr "source" "https://github.com/hovertank3d/lzcnt.space")}}
+# {{template "link.html" (arr "source" "https://git.ancap.in.ua/lzcnt.space")}}
diff --git a/templates/about.go.html b/templates/about.go.html
new file mode 100644
index 0000000..ebd212f
--- /dev/null
+++ b/templates/about.go.html
@@ -0,0 +1,16 @@
+<style>.stx_root{color: rgb(255,255,255);background-color: rgb(33,33,33);}.stx2{color: rgb(220,150,28);font-weight: bold;}.stx3{color: rgb(181,120,206);}.stx4{color: rgb(70,70,240);}.stx5{color: rgb(254,254,91);font-weight: bold;}.stx6{color: rgb(115,158,213);font-weight: bold;}.stx7{color: rgb(24,212,236);}.stx8{color: rgb(139,15,127);font-weight: bold;}.stx9{color: rgb(11,84,118);}.stxa{color: rgb(31,145,31);font-weight: bold;}.stxb{color: rgb(0,0,0);}</style><div class="stx_root"><pre><code><span class="stxa">// about page is yet to be written ;)</span>
+<span class="stxa">// come back later</span>
+
+<span class="stx4">package</span> <span class="stx4">lzcnt</span>
+
+<span class="stx4">import</span> <span class="stx2">"net/http"</span>
+
+<span class="stx4">func</span> (<span class="stx4">s</span> *<span class="stx4">Server</span>) <span class="stx5">aboutPage</span>(<span class="stx4">w</span> <span class="stx4">http.ResponseWriter</span>, <span class="stx4">r</span> *<span class="stx4">http.Request</span>) {
+ <span class="stx4">payload</span> := <span class="stx4">map</span>[<span class="stx4">string</span>]<span class="stx4">any</span>{
+ <span class="stx2">"Page"</span>: <span class="stx2">"about.go.html"</span>,
+ <span class="stx2">"Title"</span>: <span class="stx2">"About"</span>,
+ }
+
+ <span class="stx5">tmpl.ExecuteTemplate</span>(<span class="stx4">w</span>, <span class="stx2">"index.html"</span>, <span class="stx4">payload</span>)
+}
+</code></pre></div> \ No newline at end of file
diff --git a/templates/log2.s.html b/templates/log2.s.html
new file mode 100644
index 0000000..aad76fd
--- /dev/null
+++ b/templates/log2.s.html
@@ -0,0 +1,14 @@
+<style>.stx_root{color: rgb(255,255,255);background-color: rgb(33,33,33);}.stx2{color: rgb(220,150,28);font-weight: bold;}.stx3{color: rgb(181,120,206);}.stx4{color: rgb(70,70,240);}.stx5{color: rgb(254,254,91);font-weight: bold;}.stx6{color: rgb(115,158,213);font-weight: bold;}.stx7{color: rgb(24,212,236);}.stx8{color: rgb(139,15,127);font-weight: bold;}.stx9{color: rgb(11,84,118);}.stxa{color: rgb(31,145,31);font-weight: bold;}.stxb{color: rgb(0,0,0);}</style><div class="stx_root"><pre><code><span class="stxa"># {{template "link.html" (arr "about" "/about")}}
+</span><span class="stxa"># {{template "reset.html" .}}
+</span> <span class="stx8">.section</span> <span class="stx3">.text</span>
+ <span class="stx8">.global</span> <span class="stx3">log2lzcnt</span>
+ <span class="stx8">.type</span> <span class="stx3">log2lzcnt</span>, <span class="stx3">@function</span>
+<span class="stx9">log2lzcnt:</span> <span class="stxa"># log2lzcnt({{.Requests}});
+</span> <span class="stx5">lzcnt</span> <span class="stx6">%rdi</span>, <span class="stx6">%rdi</span>
+ <span class="stx5">movq</span> <span class="stx3">$63</span>, <span class="stx6">%rax</span>
+ <span class="stx5">sub</span> <span class="stx6">%rdi</span>, <span class="stx6">%rax</span>
+ <span class="stx5">ret</span> <span class="stxa"># 2^{{.Log2lzcnt}} requests handled
+</span>
+<span class="stxa"># copyleft 2025 iskrim46
+</span><span class="stxa"># {{template "link.html" (arr "source" "https://github.com/hovertank3d/lzcnt.space")}}
+</span></code></pre></div> \ No newline at end of file