ClemaX

joined 2 years ago
[–] ClemaX@lemm.ee 13 points 4 days ago

Eval is bad for security boundaries and the string based approach is a pain to develop and maintain. An alternative that is equally bad for security but better for development would be dynamic imports using importlib.

If you want to support custom scripts while enforcing security boundaries, you could use an embeddable interpreter like lua, or create your own.

[–] ClemaX@lemm.ee 10 points 6 days ago
[–] ClemaX@lemm.ee 13 points 3 weeks ago* (last edited 3 weeks ago) (3 children)

It all makes sense when you think about the way it will be parsed. I prefer to use newlines instead of semicolons to show the blocks more clearly.

for file in *.txt
do
    cat "$file"
done

The do and done serve as the loop block delimiters. Such as { and } in many other languages. The shell parser couldn't know where stuff starts/ends.

Edit: I agree that the then/fi, do/done case/esac are very inconsistent.

Also to fail early and raise errors on uninitialized variables, I recommend to add this to the beginning of your bash scripts:

set -euo pipefail

Or only this for regular sh scripts:

set -eu

-e: Exit on error

-u: Error on access to undefined variable

-o pipefail: Abort pipeline early if any part of it fails.

There is also -x that can be very useful for debugging as it shows a trace of every command and result as it is executed.

[–] ClemaX@lemm.ee 2 points 1 month ago

Rust is special regarding references but Kotlin reads similarly.

[–] ClemaX@lemm.ee 2 points 2 months ago (1 children)

What are you missing on Firebase?

[–] ClemaX@lemm.ee 4 points 3 months ago

This + node_exporter.

[–] ClemaX@lemm.ee 3 points 4 months ago

Ah least they would need to know it first.

[–] ClemaX@lemm.ee 2 points 5 months ago* (last edited 5 months ago)

I don't think that browsers do that. There is HSTS but I think that it only checks if the connection is using TLS.

[–] ClemaX@lemm.ee 4 points 6 months ago

In French, oursin (urchin) seems to be the diminutive of ours, which means bear. So oursin means something like "little bear".

[–] ClemaX@lemm.ee 9 points 8 months ago (1 children)

You wouldn't download a car‽

[–] ClemaX@lemm.ee 3 points 8 months ago

This book was left blank...

view more: next ›