💾 Archived View for station.martinrue.com › smokey › 99e7cef117f84015b23fbdb6413e1d6b captured on 2023-09-28 at 17:46:45. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-19)

➡️ Next capture (2024-05-12)

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

👽 smokey

gemini capsule owners familiar with scripting, in your opinion what is the best scripting language to learn for making an interactive gemini capsule? Ive heard that GO is a good one but what kinds of languages do you use?

2 years ago · 👍 hyperlinkyourheart

Actions

👋 Join Station

14 Replies

👽 hedy

As to other languages, I personally use Go primarily. Python is good for beginners, and bash is ok but not good for all use cases. If I was building a gemini server I would either use Go, or Jetforce (python) if it has something I specifically need. · 2 years ago

👽 hedy

If you need more interactiveness and control for your server, https://github.com/pitr/gig is an interesting thing to look into. It provides an API that lets you write interactive servers in Go. There used to be a pasting service that was made with it. The go-gemini library is fine too, afaik used by gemfeed. · 2 years ago

👽 marmaladefoo

Whatever your favourite language is. Gemini server scripting is so straightforward, why not try a few... · 2 years ago

👽 mntn

sigh* my escaped spaces were turned into real spaces, "Unix shell scripting" should have %20 instead of spaces · 2 years ago

👽 mntn

@maria Since you mentioned Lisp, https://www.cliki.net/Unix shell scripting looks interesting and is something I need to investigate more. · 2 years ago

👽 maria

look at my floppy drive, it has a very minimal code for running a Gemini server in ruby. it requires ssl termination in another server like nginx or haproxy, but ruby can easily terminate that too · 2 years ago

👽 maria

as for interactive capsules, you need to decide whether to cgi or not to cgi. cgi are certain urls that end up inside your code, others are just plain files that get served to the client. most web server software can do this. if you don't go cgi you need to write your whole server code yourself. I guess python or ruby works well here · 2 years ago

👽 maria

I think we need to talk about semantics here. There is compiled and interpreted languages, technically interpreted languages run inside a virtual machine and can have compilation into a bytecode too. a scripting language is usually something that extends a running program and can dynamically change, but that is also true for compiled things. Lisp for instance can be all of this, it's awesome · 2 years ago

👽 mntn

@lykso Haven't tried it but perhaps I should. It's probably fairly safe and easy to approach since it's used so much as an internal language in games. · 2 years ago

👽 hyperlinkyourheart

I would use Python personally, just because I like that language a lot. Same if I was making a website. I think the Jetforce gemini server has an API for building custom Gemini applications in Python, and it is what Astrobotany was built with AFAIK. It can also just run anything as a CGI script though · 2 years ago

👽 lykso

@mntn Not even Lua? I've been seeing a lot of love for that one lately. · 2 years ago

👽 mntn

Honestly I haven't really found a traditional scripting language that I love. Everything either has too much overhead, is too loose, or too arcane and full of odd corner cases (Bash). · 2 years ago

👽 mntn

Go is a great language, but it's not really a scripting language per se. Python would be a good choice if you're new to programming. It's very forgiving and there's a lot of libraries available. · 2 years ago

👽 smokey

By 'interative' i mean things like user input queries and http response gathering/display · 2 years ago