In general, how does a DFA know how to successfully process a string the intended way?

Suppose we have:

$ $ A\text{ }\colon=\{x, y, z\}$ $

$ $ M\text{ }\colon=\text{some DFA using A}$ $

$ $ S\text{ }\colon=xyzxyzxyz$ $

Intuitively, one might say $ S$ is fed to $ M$ on a per-character basis.

This means that somehow we have an undisclosed mechanism that can tell where a symbol starts and ends.

One might say, simply use the maximum valid substring similar to how Lexers tokenise plaintext. To that I say, suppose instead that we defined $ A$ as: $ $ A\text{}\colon= \{x, xx, xxx\}$ $

Now we have 3 unique symbols, that, as it so happens, using the maximum valid substring will yield in a restriction to what our our $ M$ can actually process, because any string longer than 2 characters will always be assumed to start with $ xxx$ rather than perhaps, $ x$ and $ xx$ .

One way I see around this is to actually have a character synonymous to a symbol. That is, $ x$ and $ xxx$ (from $ A$ ) are both a single character each.


Who (Designer or User) Should be Resposible for the Correct/Secure Usage of a Tool Intended for Developers/Admins?

There is a healthy debate around a series of stack overflow posts that refer to the "RunAs" command. Specifically the discussion is in reference to design decision that the folks at Microsoft made a long time ago, to users of this command to enter the users password in one specific way, Raymond Chen accurately summarizes one side of the argument quite clearly:

The RunAs program demands that you type the password manually. Why doesn’t it accept a password on the command line?

This was a conscious decision. If it were possible to pass the password on the command line, people would start embedding passwords into batch files and logon scripts, which is laughably insecure.

In other words, the feature is missing to remove the temptation to use the feature insecurely.

If this offends you and you want to be insecure and pass the password on the command line anyway (for everyone to see in the command window title bar), you can write your own program that calls the CreateProcessWithLogonW function.

I’m doing exactly what is being suggested in the last line of Raymond’s comment, implementing my own (C#) version of this application that complete circumvents this restriction. There are also many others who have done this as well. I find this all quite irritating and agree with sentiment expressed by @AndrejaDjokovic who states:

Which is completely defeating. It is a really tiresome that idea of "security" is invoked by software designers who are trying to be smarter than the user. If the user wants to embed the password, then that is their prerogative. Instead all of us coming across this link are going to go and search other ways to utilize SUDO equivalent in windows through other unsavory means, bending the rules and wasting times. Instead of having one batch file vulnerable, i am going to sendup reducing overall security on the machine to get "sudo" to work. Design should never smarter than the user. You fail!

Now while I agree with the sentiment expressed by Microsoft and their concern with "embedding passwords into batch files" (I personally have seen poor practice myself way too many times), it really does strike me as wrong what Microsoft has done here. In my specific example I’m still following best practices and my script won’t store credentials, however I’m forced to resort to a workaround like everybody else.

This decision really follows a common pattern at Microsoft of applications acting in ways that are contrary to the needs of the specific users with the intention of "helping" the users by preventing them from completing a action that is viewed as unfavorable. Then obfuscating or purposely making the implementation of workarounds more difficult.

This leads us to a broader question, extremely relevant to this issue, who is the true responsible party when it comes to security around credentials, the user of the software or the designer of the software? Obviously both parties hold some responsibility, but where is the dividing line?

When you create tools for other developers should you seek to the best of your ability to prevent them from using your application in an insecure manner, or do you only need to be concerned about the application itself and whether it’s secure internally (irregardless to how the user invokes it)? If you are concerned about "how" they are using your application, to what extent do you need validate their usage (example: should "RunAs" fail if the system is not fully "up to date" i.e. insecure in another way), if that example seems far fetched, then define that line, in the case of "RunAs" the intention is quite clear, the developers who created it are not only concerned about managing credentials securely internally with their application but also care deeply about the security implications of how you use it. Was their decision correct in validating the usage in this case, and if so/or not where should that dividing line be for the applications that are created in the future?

Can a spell be readied to trigger when its intended target comes into view?

Can I ready witch bolt, for instance, with the condition of attacking “the first goblin to come out of the cave” if I cannot see the goblin at the time of my (Ready) action? To be perfectly clear: at the time of the Ready action, the goblin is around a corner, in darkness: not targetable by witch bolt.

On the one hand: the Ready action states that (PHB p.193)

when you ready a spell, you cast it as normal but hold its energy….”

Part of casting a spell is targeting (inferred from “Targeting” as a sub-heading under “Casting a Spell”, PHB pp.202-204).

You can’t target something that you can’t see, so it would seem that since you can’t target the goblin at the time of the Ready action you can’t cast the spell in the first place.

On the other hand: isn’t this use of “Ready” the same as the “I’ll attack the first goblin to come out of the cave” that is the classic use-case for Ready? Picking a target is part of the Attack action, after all.

Is the Oath of the Ancients Paladin’s Elder Champion feature intended to still work while unconscious?

The Paladin’s Oath of the Ancients Level 20 Elder Champion feature states:

Using your action, you undergo a transformation. For 1 minute, you gain the following benefits:

  • At the start of each of your turns, you regain 10 hit points.

  • Whenever you cast a paladin spell that has a casting time of 1 action, you can cast it using a bonus action instead.

  • Enemy creatures within 10 feet of you have disadvantage on saving throws against your paladin spells and Channel Divinity options.

Once you use this feature, you can’t use it again until you finish a long rest.

What it does not state is that the transformation ends or you lose the benefits of the transformation when you are unconscious or incapacitated.

If the Paladin is knocked unconscious while it is transformed, does that mean the Paladin will be able to regain consciousness at the start of next turn?

To contrast, the Oath of the Crown’s Exalted Champion includes this statement:

This effect ends early if you are incapacitated or die. Once you use this feature, you can’t use it again until you finish a long rest.

Emphasis mine.

The Paladin’s Auras of Protection specifically state that:

Starting at 6th level, whenever you or a friendly creature within 10 feet of you must make a saving throw, the creature gains a bonus to the saving throw equal to your Charisma modifier (with a minimum bonus of +1). You must be conscious to grant this bonus.

Emphasis mine.

Aura of Courage states:

Starting at 10th level, you and friendly creatures within 10 feet of you can’t be frightened while you are conscious.

Emphasis mine.

This seems to imply most of the Paladin’s Level 20 features continue working even while unconscious. The Oath of Ancients Paladin would be able to regain consciousness at the start of the turn. Similarly, the Oath of Vengeance Paladin would still frighten their enemies despite being unconscious on the ground. The Oath of Devotion Paladin would still give off sunlight and damage enemies despite being unconscious.

Is this Rules as Written and/or Intended?

Is Shadow Pin intended to be prevented by Freedom of Movement?

I know, Rules-as-Intended questions are hard, but it has been estabilished that Freedom of Movement RAW is a mess and we don’t know what it stops exactly (relevant 3.5e question, but applicable to Pathfinder 1e as far as I know).

Moreover, maneuvers do not exist in regular Pathfinder 1e and it’s understandable that a core PF spell makes no special note about them.

I think the only possible way to know how they interact is to ask for author intent. Luckily, one of the authors often answers questions here on RPG.SE

Shadow Pin is a really good counter, it stops melee characters from charging and getting near in general, it stops recurring NPCs from teleporting away. No wonder one of my players took it.

The Freedom of Movement spell is meant to counter movement-blocking effects, but it only explicitly mentions making the recipient immune to mundane and magic impediments (emphasis mine):

This spell enables you or a creature you touch to move […] normally for the duration of the spell, even under the influence of magic that usually impedes movement

Food for thought: It’s magic, not “spells”. Is “supernatural” magical enough to be included, given that it goes away in an antimagic field?

Was Shadow Pin intended to bypass Freedom of Movement effects, or to be stopped by it?

(Since, as it is usually assumed, Freedom of Movement only helps with physical movement impairments, is the answer different for the teleportation part?)

Does this homebrew incarnum feat work as intended?

Does this homebrew feat work as intended, i.e. granting a class the incarnum class level advancing ability of an incarnum prestige class (minus most of the essentia and plus new tiers of chakra binds):

Shape Innate Incarnum [Incarnum]

Prerequisites: Must have the incarnum subtype.

Benefit: Choose one class you possess then one incarnum class. You shape soulmeld (including essentia capacity and meldshaper level) as the chosen incarnum class as if you had as many level as the chosen class -2. This feat do not grant extra essentia by leveling as the class normally would, just the ability to shape soulmeld. If a prestige class specifically advance the chosen class add it level to the chosen class for determining the effect of this feat. You gain 1 point of essentia per three character levels.

Example: An azurin wizard 10 take this feat, he choose his wizard class as part of this feat and then choose the soulborn class as the incarnum class. He can shape souldmeld as a level 8 soulborn, granting him access to the soulborn meldshape list and all chackra a soulborn of 8th level would be able to bind. However he does not receive any extra essentia, thus limiting him to his innate reserve (and the essentia granted by feats).

Was USB-A always intended to be reversible?

We all know one of the problems (one might say major UX design flaws) with USB-A connectors is that it is difficult to know which way is the top leading to users plugging connectors in upside down.

usb paradox

Recently, reversible USB-A connectors have found their way to market. But the fact that this is possible leads one to wonder if USB-A had from the start been designed as a reversible standard but for whatever reason it was only implemented now. Is this the case?

Question: was USB-A’s symmetry supposed to be part of a reversible design that was not implemented until now? I.e. , it’s not a bug but a feature?

reversible USB a

Does this Sorcerer homebrew feature have more efficient than intended uses?

The following is a homebrew Sorcerer feature that is part of a Sorcerous Origin I’m experimenting with.

Wax & Wane

When you cast an applicable spell, you may choose to use the Heightened Spell Metamagic option for no sorcery point cost. You may do so even if you don’t have the Metamagic feature yet or don’t have Heightened Spell as a known metamagic option. Once you do so, you must finish a long rest before you can use this feature again.

Before you regain the use of this feature, if you cast a spell of first level or higher that forces one or more creatures to make a saving throw to resist its effects, those creatures make their first saving throw against the spell with advantage. You regain the use of this feature after the first such saving throw from the spell.

(Note: I refer to the first paragraph’s effect as “Wax” and the second paragraph’s effect as “Wane” below)

Additional context: I intend this as a first level feature as part of a homebrew Sorcerous Origin, hence the odd sentence about not having the Metamagic feature in the Wax description. I originally just duplicated the text of Heightened Spell for Wax’s effect, but erred on the side of this being simpler & ensuring that the non-stacking metamagic rules apply.

I’m curious if there are any uses of this that are effective beyond my expected uses (enumerated below), or if there are any loopholes in the text that allow non-obvious means of use.

Expected potential uses:

  1. Throughout combat, cycle between using Wax to boost powerful spells and then getting rid of the Wane effect by casting weaker/lower level ones.
    • Optimizable somewhat by targeting enemies with lower saving throw bonuses with Wane’d spells.
    • Note: This is more or less the ‘main’ intended use, with the sorcerer counterbalancing strong Wax turns with followup low-impact Wane turns that still require burning resources.
  2. Use Wax once at an appropriate time, then use non-saving-throw spells for the rest of the day.
  3. Use Wax on your last level 1+ spell of the day.
  4. Use Wax in combat, then get rid of the Wane effect later out of combat on an ally/critter/easy fight to avoid losing an important combat action on it and (more or less) wasting a low level spellslot to do so.

Note that I’m specifically not asking about the general balance quality of this at the moment, though if that’s relevant to your answer feel free to include it. I’m just trying to find out if there are any holes in my expectation of how it would be used.

How to install an older version of a package not entirely intended for your Ubuntu version?

I have Lubuntu 19.04. The latest Inkscape is unstable (crashes often) even though it’s from the stable package.

The latest Gimp 2.10 is very stable (as are most versions I’ve tried through the years with Ubuntu), but threw me for a loop in how the theme and icons have to be switched to make them more legacy, and the blur filter functionality has changed dramatically and is not as easy.

The last Inkscape I loved and which was stable was the following, and it came from Ubuntu 14.04:

inkscape 0.48.4 r9939 Jan 22 2014 0.48.4-3ubuntu2 

The last Gimp I loved and which was stable was the following, and also shipped with Ubuntu 14.04:

gimp 2.8.10 2.8.10-0ubuntu1.2 

I tried installing only the old versions of these by doing:

sudo su apt-get update apt-get upgrade apt-get dist-upgrade apt-get --purge remove inkscape apt-get --purge remove gimp apt-get install inkscape=0.48.4-3ubuntu2 apt-get install gimp=2.8.10-0ubuntu1.2 

However, it said that it couldn’t find these versions in the default PPA.

How do I get around this to install the version I want, even though it’s Lubuntu 19.04? Or, is there a way I can do this with a snap instead of an apt package ?