In-reply-to » @bender Haha, no worries. I do like that you enjoyed your real life and not wasted it online. :-)

@lyse@lyse.isobeef.org when I come around, I normally check, and get busy just reading, under “Discover”, and often forget to even check mentions. Since there is nothing on “Mentions” telling me there are some pending to be read (at the very least, a tiny dot, or something), if often gets ignored. 😅

⤋ Read More
In-reply-to » @xuu Yeah it seems to be quite easy to operate actually 👌 Love the zero configuration!

@prologic@twtxt.net for those ancient, dreaded times, on which I needed to use PHP (shivers), I simply used php-fpm with Caddy. Unless I am missing something, FrankenPHP is a modified Caddy. If I already run Caddy, why would I need another one?

Of course, FrankenPHP might fit @off_grid_living@twtxt.net needs, if he is to switch from Apache to FrankensteinPHP.

⤋ Read More
In-reply-to » And errors out expectedly using dash or ash, very nice POSIX Sh compliant shells:

@prologic@twtxt.net Yeah, that is part of the problem. Bash is so dominant on Linux, it’s hard to avoid. When I use #!/bin/sh, it still gets me a Bash that does NOT enter strict POSIX mode. 🫤 The script below uses Bashisms and requests #!/bin/sh but still runs happily …

#!/bin/sh

foo=1

if [[ "$foo" == 1 ]]
then
    echo match
fi

⤋ Read More

New Research Reveals AI Lacks Independent Learning, Poses No Existential Threat
ZipNada writes: New research reveals that large language models (LLMs) like ChatGPT cannot learn independently or acquire new skills without explicit instructions, making them predictable and controllable. The study dispels fears of these models developing complex reasoning abilities, emphasizing that while LLMs can genera … ⌘ Read more

⤋ Read More
In-reply-to » Media

@off_grid_living@twtxt.net Normally, in the days when I used to run Linux on the Desktop and used Apache once upon a time, the default configuration would mean files served out of your public_html directory in your home directory was the place where the web server looked for to serve files from. This would make something like http://localhost/~your_username work. But it’s been a while since I’ve done any of this myself…”

⤋ Read More

Dear OnlyDomains, part of Team Internet. Do you think you could stop being so incompetent when it comes to Domains, DNS and basic HTTP? I reported this to you on Friday, and you are still arguing with me over Support the legitimatecy of the claims? Seriously?! 😧

$ dig @1.1.1.1 +short onlydomains.com.au a
198.50.252.65

$ nc -vvv 198.50.252.65 443
nc: connectx to 198.50.252.65 port 443 (tcp) failed: Connection refused

#OnlyDomains

⤋ Read More
In-reply-to » I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.

And errors out expectedly using dash or ash, very nice POSIX Sh compliant shells:

$ ./foo.sh
./foo.sh: line 5: [: bar: integer expression expected

So the lessons here are twofold:

  • Always use shellcheck to check your shell code
  • Never use Bash or rely on Bash(isms). Always prefer POSIX Sh

⤋ Read More
In-reply-to » I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.

Which once fixed, removing the extra [ and ] errors out with shellcheck as expected:

Invalid number for -eq. Use = to compare as string (or use $var to expand as a variable). [SC2170]

⤋ Read More
In-reply-to » I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.

Also, why isn’t shellcheck being used here? It would have picked this (contrived) example up?

bar is referenced but not assigned. [SC2154]

⤋ Read More
In-reply-to » I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.

This one got me. I try to stick to POSIX sh so I’m not super familiar with the behavior of [[]]. I definitely should have gotten -eq, though.

⤋ Read More
In-reply-to » I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.

@falsifian@www.falsifian.org Exactly! 🥳

So this works:

$ bash -c 'set -u; bar=1; foo=$bar; if [[ "foo" -eq "bar" ]]; then echo it matches; fi'
it matches

Without the misleading quotes:

$ bash -c 'set -u; bar=1; foo=$bar; if [[ foo -eq bar ]]; then echo it matches; fi'
it matches

As does this:

$ bash -c 'set -u; bar=1; foo=$bar; if (( foo == bar )); then echo it matches; fi'
it matches

What the person originally meant was what bender said:

$ bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
it matches

It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.

⤋ Read More
In-reply-to » I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.

@movq@www.uninformativ.de Variable names used with -eq in [[ ]] are automatically expanded even without $ as explained in the “ARITHMETIC EVALUATION” section of the bash man page. Interesting. Trying this on OpenBSD’s ksh, it seems “set -u” doesn’t affect that substitution.

⤋ Read More
In-reply-to » Kinda cool tool for bringing together all your timeline based data across socials.

yeah its the same dude.

This project is verrrry alpha. all the configuration is literally in the code.

⤋ Read More

I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.

But sadly they’re full of pitfalls. Pitfalls everywhere you look.

Today, a coworker – who’s highly skilled, not a newbie by any means – ran into this:

$ bash -c 'set -u; foo=bar; if [[ "$foo" -eq "bar" ]]; then echo it matches; fi'
bash: line 1: bar: unbound variable

Why’s that happening? I know the answer. Do you? 😂

Stuff like that made me stop using shell scripts at work, unless they’re just 4 or 5 lines of absolutely trivial code. It’s now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.

⤋ Read More
In-reply-to » Jobhunters Flood Recruiters With AI-Generated CVs About half of all job seekers are using AI tools to apply for roles, inundating employers and recruiters with low-quality applications in an already squeezed labour market. From a report: Candidates are turning increasingly to generative AI -- the type used in chatbot products such as ChatGPT and Gemini to produce conversational passages of text -- to assist them in writing th ... ⌘ Read more

@slashdot@feeds.twtxt.net And we are surprised why? 🤔

⤋ Read More
In-reply-to » Kinda cool tool for bringing together all your timeline based data across socials.

Is that from the same guy who made Caddy? Name sounds familiar. It looks neat, let us know what you think of it when you have tried it. 😛

⤋ Read More

Jobhunters Flood Recruiters With AI-Generated CVs
About half of all job seekers are using AI tools to apply for roles, inundating employers and recruiters with low-quality applications in an already squeezed labour market. From a report: Candidates are turning increasingly to generative AI – the type used in chatbot products such as ChatGPT and Gemini to produce conversational passages of text – to assist them in writing th … ⌘ Read more

⤋ Read More
In-reply-to » I like how tags like #reading now actually work correctly on Yarn pods 👌

@bender@twtxt.net No bubbles burst 💥 hehe 😝 All good! 👍 I think I was aware of the search results and the lack of interactivity there, artifact of borrowed template code from the search engine 😢 Just need to refactor it to use the same template as the normal timeline, but also support highlights, something it doesn’t do now either.

⤋ Read More