Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Agate, a simple Gemini server written in Rust (github.com/mbrubeck)
196 points by Funes- on March 10, 2021 | hide | past | favorite | 34 comments


Oh, hi! Original author of Agate here.

The code in Agate is a bit weird, because it started as a 100-line toy server I wrote for my personal use. A lot of the early code was optimized for conciseness rather than maintainability. It also had various micro-optimizations that were probably totally unnecessary, just because my idea of fun involves minimizing allocations and copying everywhere.

As other people started actually using the code, and submitting feature requests and patches, I mostly gave up on minimalism as a goal. The newer code is more focused on maintainability, but it's still mixed together with the old code.

My favorite thing about this project is that, as the community grew beyond my own motivation to manage it, the most active contributor @Johann150 stepped up to maintain it [1], and has done a great job!

[1]: https://github.com/mbrubeck/agate/issues/6#issuecomment-7677...


For anyone looking for a fast way to dive into the "Geminispace", I recommend you check out this list of resources (clients and whatnot): https://github.com/kr1sp1n/awesome-gemini.

I personally prefer Amfora (Go), which uses the GUS search engine by default on top of being aesthetically pleasant and minimal.


Amfora is great and has pre-built binaries for most oses, including Win10, which I hadn't expected for this sort of project. Also worth mentioning is Lagrange, which is graphical and vaguely resembles the original Mosaic browser.


Glad to hear you like it!

Here's the link to it for the lazy:

https://github.com/makeworld-the-better-one/amfora


Do you know if there is a web to gemini bridge somewhere so I can just see what is available? I couldn't see "the simple way in" from the clients.


Never mind, found some on the gemini page - https://proxy.vulpes.one/gemini/gemini.circumlunar.space


What’s a gemini server?


It's an internet protocol with the intent of being extremely simple and with the goal of fostering an alternative internet space.

https://gemini.circumlunar.space/docs/faq.gmi https://drewdevault.com/2020/11/01/What-is-Gemini-anyway.htm...


It's for the gemini:// protocol,

>Gemini is a new application-level internet protocol for the distribution of arbitrary files, with some special consideration for serving a lightweight hypertext format which facilitates linking between files.

https://gemini.circumlunar.space/docs/faq.gmi


Gopher on TLS.


> Gopher on TLS.

Going through the docs, it's apparent that Gemini is a bit more than just that. A description that is almost as succinct but more accurate would be 'A Gopher inspired protocol, over TLS'.

It is worth noting that using TLS doesn't seem like an afterthought (it's required, not optional), and more closely resembles SCP rather than HTTPS, with the use of client certs a first-class feature for example.

It would be an interesting project to implement a REST-like API over Gemini.


My understanding is that the designers explicitly do not want applications to be possible/practical over Gemini. The request format is intentionally not extensible, and consists exclusively of a URL.


> It would be an interesting project to implement a REST-like API over Gemini.

URLs are limited to 1024 characters according to the spec, and query strings look like it's the only way for clients to talk to servers outside of the URL, so you have a pretty narrow pipe.


It would be neat, but it's impossible, because Gemini explicitly forbids any request types other than GET, or rather a practical clone of GET that isn't called that because there isn't anything else anyways. Without a POST or other support for sending larger bodies, there's a ton of interesting stuff you just can't ever do.

If they know they don't ever want that to be possible, well fair enough it's their protocol, but I don't see the point of a cool feature like identifying clients explicitly by client TLS certs only when clients can never do anything but view documents and maybe do a simple search anyways.


A server for the gemini protocol (kinda like a web server for http). Info on gemini can be obtained here: https://gemini.circumlunar.space/


A poorly thought of protocol, with political goals.

It's supposed to be simple in order to support trivial clients, and to prevent it from suffering the web's ill fate.

But it forces complexity into clients, by making TLS (of all possible ways to do e2ee!) mandatory and by not even giving the client the length of a response before the response is sent.

Of course, for political reasons, protocol can't be extended, and while it's still new and could be made sane, it won't; The authors don't want outside input.

I'd look into Gopher instead. It's old and tested, not to mention free of political bullshit.


why does it matter that response length isn't included? Gemini aims to be a small protocol that doesn't need to handle all types of content. if another protocol is more appropriate for whatever thing you want to link just use that.

I'm really confused by how vehemently against Gemini you seem to be and by the claim that the Gopherspace has no politics.


>I'm really confused by how vehemently against Gemini you seem to be

I don't like it, and I explained why.

Can you be specific on what it is you're confused about?

>and by the claim that the Gopherspace has no politics.

A claim made by whom exactly?


What political bullshit?


>What political bullshit?

Refer to "non-extensibility" in the FAQ[0]. Particularly, as applied to content length in 2.12.

[0]: https://gemini.circumlunar.space/docs/faq.html


I don't see what's political about that. It seems like a design decision you don't agree with (and neither do I at a first glance) but I fall to see any political intent.


Their whole decision-making process seems to be political. See 1.1 for their rationale against extensions.

Whereas 2.x is full of examples of bad decisions which they're stubborn about not fixing.

It is basically somebody's pet project, opinionated and full of rough edges they refuse to ever polish.

It lacks the processes and, at the core, the quality expected of a standard, and thus we should be very careful not to mislabel it a standard.


I think the OP means "political" as in its broader definition, meaning that it makes strong decisions about what it is and how it should be implemented. In other words, "opinionated".

AFAIK Gemini is not and has not yet been heavily used for the politics of government or social issues. If your concern is whether it's a new haven for left-wing/right-wing/whatever-wing nuts to spew vitriol and hate, I don't think that is the case.


Gemini, or that shitty protocol that won't tell the client the length of what it is about to receive. By design. To make things "simpler".

Of course, for political reasons, protocol can't be extended, and while it's still new and could be made sane, it won't; The authors don't want outside input.


I really enjoy working with the go-gemini library:

https://sr.ht/~adnano/go-gemini/


The problem I have with Gemini is the I insistence on TLS and constantly opening new connections.

Which I suspect that many clients just ignore the second part.


Is there a good Firefox plugin for gemini://? The only one I can find (geminize) requires connecting to a http -> gemini proxy.


Why does Gemini need to exist?


Because advertising broke http.

You need more power in your computer to read a recipe for Yorkshire Puddings than you do to run a spaceship to Mars.

Taking out a lot of tracking and malware, just serving content, goes back to the 90's Interwebs.

Some of us would very much appreciate that.


I would really appreciate that, but I wonder if the right incentives are there to support its broad adoption.

Also wonder if the easiest way to fix online advertising is indeed to replace HTTP altogether.


I suppose it doesn't, but some people want it to exist, and so it does.


Thanks. I was really asking an honest question, so appreciate you replying.

I do think ideas need a compelling reason to exist in order to be successful, but then again the people behind Gemini may not have my definition of "success" as one of their stated goals.


It's perfectly valid to just want to serve a limited niche, rather than take over the whole world.

OpenBSD might be another example of such a project.


It doesn't. It literally provides no value over Gopher.

And it is broken by design; By not providing a length field in the response, it does force complexity into clients.

Of course, for political reasons[0], protocol can't be extended (refer to 2.12), and while it's still new and could be made sane, it won't; The authors do not want outside input.

[0]: https://gemini.circumlunar.space/docs/faq.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: