💾 Archived View for gemi.dev › gemini-mailing-list › 000527.gmi captured on 2023-12-28 at 15:48:39. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-11-04)

🚧 View Differences

-=-=-=-=-=-=-

[ANN] Geminiserver ASM

1. Simon (gemini (a) g-n.site)

Hello!

I just want to announce a very little server written in ASM for linux 
x64. It uses only syscalls. Why did I do that? Just for fun :)

More details on (in?) my (new) capsule :
gemini://g-n.site/en/2020-12-03-geminiserver_asm.gmi

Have a nice day,

Simon

Link to individual message.

2. Sudipto Mallick (smallick.dev (a) gmail.com)

On 12/7/20, Simon <gemini at g-n.site> wrote:
> Hello!
>
> I just want to announce a very little server written in ASM for linux
> x64. It uses only syscalls. Why did I do that? Just for fun :)
>
> More details on (in?) my (new) capsule :
> gemini://g-n.site/en/2020-12-03-geminiserver_asm.gmi
>
> Have a nice day,
>
> Simon
>
Yay! Gemini server written in (linux-amd64-nolibc-nasm) assembly.
Really, this is what we were expecting to see given the simplicity of
the protocol. Great job.
I'd suggest two things:


using a symbol that would be defined when assembling like -D
host=my.host.tld -D port=1955 -D errpath=/error etc.


Cheers,
~smlckz

Link to individual message.

3. Simon (gemini (a) g-n.site)


> I'd suggest two things:
>
> * use $-label trick instead of hardcoding string length and
> * a simple way of configuration instead of editing that file: say
> using a symbol that would be defined when assembling like -D
> host=my.host.tld -D port=1955 -D errpath=/error etc.

Thanks for the advises ! The domain, redirection path and max page size 
are now defined with macros :). I've just seen I have forgotten the 
port, I'll do it later.


Cheers,

Simon

Link to individual message.

4. Ben (benulo (a) systemli.org)

Any chance it will get ported to BSD?

-- 
gemini://kwiecien.us/

Link to individual message.

5. Simon (gemini (a) g-n.site)


On 12/8/20 5:16 PM, Ben wrote:
> Any chance it will get ported to BSD?
>
If you want to, changing the syscall numbers would probably enough. You 
can find a table here to do the conversion : 
https://www.lurklurk.org/concordance.html

The syscall numbers are the `mov rax, number` and the syscalls used are 
: getpid, socket, setsockopt, bind, listen, accept, fork, getppid, read, 
write, open and exit.

Let us know, or do a PR if you do it :)

Link to individual message.

6. Ben (benulo (a) systemli.org)

I haven't tried it yet, but it just occurred to me that it probably 
already works with FreeBSD's Linux binary compatibility anyway (and 
other BSD's that have this feature), so it may not even need to be recoded.

-- 
gemini://kwiecien.us/

Link to individual message.

---

Previous Thread: TOFU, OK, but even with an expired certificate?

Next Thread: Small spec change required by RFC for lang params