From 588cedf699de1eda2c476133193cc2bb1e9d5dbc Mon Sep 17 00:00:00 2001 From: hovertank3d Date: Sat, 24 May 2025 10:58:06 +0000 Subject: update about and link to the source code --- Dockerfile | 12 ++++++++++++ about.go | 13 ++----------- log2.s | 2 +- templates/about.go.html | 16 ++++++++++++++++ templates/log2.s.html | 14 ++++++++++++++ 5 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 Dockerfile create mode 100644 templates/about.go.html create mode 100644 templates/log2.s.html 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 @@ +
// about page is yet to be written ;)
+// come back later
+
+package lzcnt
+
+import "net/http"
+
+func (s *Server) aboutPage(w http.ResponseWriter, r *http.Request) {
+	payload := map[string]any{
+		"Page":  "about.go.html",
+		"Title": "About",
+	}
+
+	tmpl.ExecuteTemplate(w, "index.html", payload)
+}
+
\ 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 @@ +
# {{template "link.html" (arr "about" "/about")}}
+# {{template "reset.html" .}}
+    .section    .text
+    .global     log2lzcnt
+    .type       log2lzcnt, @function
+log2lzcnt:              # log2lzcnt({{.Requests}});
+    lzcnt   %rdi, %rdi 
+    movq    $63,  %rax
+    sub     %rdi, %rax
+    ret                 # 2^{{.Log2lzcnt}} requests handled
+
+# copyleft 2025 iskrim46
+# {{template "link.html" (arr "source" "https://github.com/hovertank3d/lzcnt.space")}}
+
\ No newline at end of file -- cgit v1.2.3