Sonotsugipaa

joined 2 years ago
[–] Sonotsugipaa 13 points 11 months ago (3 children)

The distant cousin on "16384 is a nice round number"

[–] Sonotsugipaa 7 points 11 months ago* (last edited 11 months ago) (1 children)

Here it is:

#!/usr/bin/zsh

nl=$'\n'
dnl=$'\n\n'

url=$1
msgcontent=$url; shift
argi=1
for arg ($@); do
    argi=$(($argi + 1))
    msgcontent=${msgcontent}${nl}Argument\ ${argi}': '${arg}
done

title="${0:A}"
msg="An application attempted to open a web page:${dnl}\"${msgcontent}\"${dnl}Copy the URL to clipboard?"

kdialog --title $title --yesno $msg
answer=$?

if [[ $answer = 0 ]]; then wl-copy $url; fi

If you want to translate it to Bash, keep in mind that arrays behave differently between the two shells, and syntax like for arg ($@); do would likely misbehave or not work at all.

Also, there's an issue where some applications do something weird, and the URL seems to be a zero-length argument. I have absolutely no idea what's up with that.

[–] Sonotsugipaa 10 points 11 months ago (3 children)

You can set some browser-unrelated program or script as your desktop environment's default browser, for example I wrote a Zsh script that creates a KDE dialog and asks me to copy the URL to the clipboard.

I'm not currently at my PC, but if you want it I can paste it in a comment here when I get to it - it shouldn't be too hard to translate it to Bash, either.

Other than that? /usr/bin/true is a pretty nice default browser for applications to start without your consent, very minimal and lightweight.

[–] Sonotsugipaa 2 points 11 months ago

Also gamers when any scene at any point has less than 500000 polygons and UINT32_MAX particles, each with its own material

[–] Sonotsugipaa 2 points 11 months ago

Oh, std::enable_if is straight up worse, they're unreadable and don't work when two function overloads (idk about variables) have the same signature.

I'm not even sure enable_if can do something that constraints can't at all...

[–] Sonotsugipaa 2 points 11 months ago* (last edited 11 months ago) (2 children)

I imagine reflections would make the process more straightforward, requires expressions are powerful but either somewhat verbose or possibly incomplete.

For instance, in your example foo could have any of the following declarations in a class:

  • void foo();
  • int foo() const;
  • template <typename T> foo(T = { }) &&;
  • decltype([]() { }) foo;
[–] Sonotsugipaa 16 points 11 months ago

No, that's Vim

[–] Sonotsugipaa 3 points 11 months ago* (last edited 11 months ago)

A bit worse, the missile precision is better and there are 3 missiles per salvo; additionally, they move and they can shoot in a straight line AND, unlike with the two other tanks, you're still perfectly unsafe if you get close and prone.

Couple all that with the fact that mortar shells really have to hit you dead-on to one-shot you, while the tank's missile have ~ double the AoE and knockback. Supposedly they nerfed them a bit, but I can't tell the difference from three weeks ago.

[–] Sonotsugipaa 1 points 11 months ago

That still limits your choices.

[–] Sonotsugipaa 15 points 11 months ago (3 children)

More of a threat? They're invulnerable to bullets, I'd expect some weakpoint before buffing them...

[–] Sonotsugipaa 1 points 11 months ago (1 children)

Spaces between paragraphs should work, you have to use two new lines for them.

They seem to work on my instance's web interface and on Jerboa...

[–] Sonotsugipaa 2 points 11 months ago (3 children)

Tip:
you can replace your periods with three dashes to get a horizontal separator, which I think is what you were going for. It's markdown syntax, it should work for most clients.

view more: ‹ prev next ›