💾 Archived View for krauserd.xyz captured on 2022-04-29 at 12:04:54. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-29)
-=-=-=-=-=-=-
I am a software engineer living in Orlando, FL with my wife, three boys, two cats, and a dog. I love free software, simple technologies, and a good cup of coffee.
If you find anything interesting here, or just want to chat, feel free to reach out:
IRC: davidkrauser on Libera Chat
This capsule is proudly flying in:
Find some other fantastic capsules in orbit:
You are visitor #21 to this capsule today:
This is a collection of random thoughts, hacks, and ideas in reverse chronological order. I don't have an atom feed for these, yet, but I plan to add one at some point.
I forgot to mention in my previous post - I've also written a local script to make creating new entries easier. Unfortunately, this hasn't led me to make many posts over the last year, like I hoped. I still had fun writing it, though:
#!/bin/sh if [ -z "$1" ] || [ -z "$2" ]; then echo USAGE: $0 SLUG TITLE >&2 exit 255 fi slug="$1" title="$2" date_pretty=$(date -u "+%Y-%m-%d at %H:%M %Z") date_slug=$(date -u "+%Y%m%d") # Autofill the header into the new entry tempfile=$(mktemp) echo "### $title" > $tempfile echo $date_pretty >> $tempfile echo >> $tempfile # Count how many lines are in the file initial_count=$(wc -c $tempfile | cut -d' ' -f1) # Let the user create the entry in their editor $EDITOR $tempfile # Count how many lines are in the file again new_count=$(wc -c $tempfile | cut -d' ' -f1) # If the number of lines didn't change # that means the user didn't add any # content to the entry. So discard it. if [ $? -eq 0 ] && [ $initial_count -ne $new_count ]; then echo "Uploading log..." scp $tempfile "root@krauserd.xyz:/srv/gemini/krauserd.xyz/logs/$date_slug-$slug.gmi" else echo "Discarding log..." fi rm $tempfile
I had fun putting this capsule together - mostly because I could use it as an excuse to write some hacky shell scripts to power the thing. As it stands now, all of the pages on this capsule are dynamically generated on-the-fly whenever a user makes a request. The code may not be that useful to others, but I figured that I would share anyway.
How the main index page is built
How each log entry page is built
How the capsule stats page is built
A raw log entry sits in './logs' with a name like 'DATE-slug.gmi'
The actual entry file is just a gemini file with a header like:
### TITLE YYYY-MM-DD at 23:59 UTC
If you haven't been following the news, GitHub recently announced a tool for programmers that eases development by generating contextually-aware code snippets. They trained the system using all of the open source code hosted on their platform:
GitHub Copilot: Your AI Pair Programmer
It seems that (at least right now), Copilot will produce results that are copied verbatim from open source code, and it does not provide any sort of attribution for that code. The legality around this system seems murky, and it's raising some interesting questions:
If you put aside the legal questions, the service itself makes me uncomfortable. As a software engineer that earns a living by putting code to terminal, the idea that a computer can write the same code that I do is concerning. There's no reason to think that a computer couldn't write _better_ code than I can (especially in a domain that I am not familiar with).
I wouldn't be surprised if some time in the not-too-distant-future, the only good software jobs are the jobs writing the code that writes the code. Nobody (mostly) writes in machine code or assembly anymore. It's not unreasonable to think that we'll continue to climb layers of abstraction until the computer does almost everything.
This gemini thing is pretty neat - I'm having a lot of fun playing with it, and I'm having a lot of fun seeing all of the incredible content others are creating. I don't want this to end up being a gemini capsule that only talks about gemini, though, so I'll try to limit this sort of talk to just the occasional post.
Anyway, I'm happy to be here, and I'm excited to see where this goes :-)