-- Leo's gemini proxy

-- Connecting to bbs.geminispace.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; charset=utf-8

[SOLVED] Was: Can I get an extra pair of eyes on some code I wrote?


Edited:


~ew pointed out that there was a naming conflict in the temporary files generated by the geminispace script and the webspace script; they both outputted to a file called 'shuffle', and the webspace script ran before the geminispace script so on occasion there would be some mangling of the latter.


This also explains why both pages were consistently outputting the same relationship, aside from the occasional error. I'd noticed that but just assumed it was something weird to do with RNG.


Thanks for the help!


gemini.locrian.zone/tech/xivships.gmi


The previous text of this post, for posterity:


[I wrote a very simple little ship generator in bash. It takes a list of characters as input, shuffles it, and then outputs two names with an "x" between them. Very simple stuff. I am a serious coder and definitely not fandom trash.


Then, just because I could, I set up working examples on the web and here on geminispace, with a cron job running to update the pages once every minute. The script works perfectly on the web (a .shtml file that includes the output .txt file produced by the script) and when I run it in the terminal as originally intended.


I had to do something different for the Gemini page, since my capsule is static. Once per minute, the cron job runs a script that generates the full page. But fairly often the second character name will be missing from the output. There's definitely not any blank lines in the input file, so I can't figure out what's going on here.


I was hoping maybe someone with more experience could take a look and see what I did wrong. I've attached to this post the character list and the script that generates the .gmi page if anyone wants to take a look.]


/u/november/file/188

/u/november/file/189


Posted in: s/bash

๐Ÿ november [he/fae]

2023-09-28 ยท 8 months ago ยท ๐Ÿ‘ ed

-- Response ended

-- Page fetched on Sun May 19 13:14:04 2024