Did you know: `jq` can do string interpolation? If your source data is a JSON file, it's a surprisingly competent template engine!

in other news, DE ICE trains have an API, I now have a fish snippet that formats it for my status bar if it detects that I'm on an ICE train's WiFi~


embr πŸ‰ πŸ”œ EMF20 πŸ”œ 37C3

I'm stuck on a delayed ICE Train, so I turned this into a script that tells me how delayed it is from my status bar.

And you can use it too! github.com/liclac/ambient

Β· Web Β· 5 Β· 19 Β· 20

@sindastra is this a Hitman reference, because I’m reading it in That Voice

@embr It wasn't meant to be but... πŸ€·β€β™€οΈ

@embr I’ve spent most of my afternoon on an SJ X2000 and now I’m disappointed that SJ don’t expose an API like that on their in-train Wi-Fi. 😭

@embr also, it’s such a cool idea to have it in your status bar. Nice hack!

Someone pointed out that I forgot to put a license in here

I usually default to MIT for historical reasons, but what are people’s thoughts on FOSS licenses?

@embr I like MPL because it's a nice middle ground between GPL and MIT where you can link my shit to whatever you want, but you can't make your fork of it closed source and most importantly the license document is fairly readable for non-lawyers

@embr use the strongest copyleft you can and keep software free. People having to copyleft their own stuff to use it is a feature, not a bug.

@qyliss strongly agree

what *are* the strongest copyleft licenses out there though? I just want "do whatever, just don't hold me liable" for this tbh, it's a handful of curl commands I reverse engineered out of a webpage on a train

@embr @qyliss lots of big companies avoid Affero GPL like the plague. So that's a benefit to me. πŸ™‚

@embr the strongest copylefts are the AGPL and GPL. If all you wasn’t here is a disclaimer of liability, though, that’s the opposite. You probably want 0-clause BSD or CC0. But I’d urge you to consider at least the MPL. It takes almost no effort to comply with, and you still get freedom protections on your code.

@embr Make it all as proprietary as possible and sue sue sue! 😜 Not being serious of course. But jokes aside, why not write your own license? Or modify an existing one to your needs? Have you tried choosealicense.com/ or something like creativecommons.org/ ?

Going to try and get something out of Thameslink and hopefully other GTR trains

@karina that'd be amazing!

Super happy with the response dump too, I'm gonna wire them up along with my own and make unit tests happen

@embr what would be super neat is if I could get to wherever the on-board displays get their data from

otherwise all I've got so far is bandwidth usage info

@embr Ok nvm I found endpoints with things that are actually useful!!

@embr you can't ask that question on the internet !!! πŸ™ˆ
@embr also the right answer is still MIT/BSD in most cases πŸ₯

@embr it's technically not "free software" because it doesn't allow people to profit off of your labor, but nowadays i use the cooperative software license eunichx.us/c/

free for non-commercial use, with an exception allowing co-ops.

@embr the main project i contribute to prefers 2-clause bsd everywhere. the nice parts are that it's understandable to most humans and doesn't rely on US contract law to be useful, but it doesn't do as much as a lot of people would like.

i also like the unlicense because it carries a strong political message, but sometimes that can be a bit awkward, i guess.
@embr ... strong as in the implications are pretty fucking cool.
@embr i should mention as well: license compatibility is a thing a lot of people have to care about but a lot of people don't understand. it's really easy to run into issues with this because it can even be invalid to mix code under different versions of the same license.

in general, the less complex the license terms, the more likely it is other open source projects will be able to build on your code. this is something i care about a lot!

@embr I don't know if it is a good sign if you can announce/toot more features here πŸ€” 🀣

@embr I politely ask you to not write scripts in bash/fish/…. Write POSIX compatible scripts, please.

Sign in to participate in the conversation

queer.af, your cosy queer space queer.af is a mastodon instance for those who are queer or queer-adjacent who would like a more pleasant social media experience.