• 0 Posts
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2024

help-circle


  • But Nix uses a normal string when passing into TOML, so I do have to escape anyways

    What do you mean by that? You are always able to just use the '' strings instead of the " strings, they are just different syntax for the same underlying type. Or are you just using lib.generators.toINI without any arguments? Maybe try something like this:

    toTomlEscapeBackslashes = toINI {
      mkKeyValue = mkKeyValueDefault { mkValueString = x: lib.escape [ ''\'' ] (toString x); } "=";
    }
    

    This will escape the values, like this:

    nix-repl> :print toTomlEscapeBackslashes { my.regex = ''foo\nbar''; }
    [my]
    regex=foo\\nbar
    

  • I think they’re often the same client.

    When you spend a couple months making sure that your app is formatted, linted, memory-safe, is modular and extensible, has 100% unit test coverage and a comprehensive integration test suite, checks all that on CI, has fully automated CD, blue-green deployments, deployment monitoring, and finally paid an external consultant for a security audit, but it lacks that one feature that the client actually wanted (but didn’t tell you to focus on), they will get angry. After all, they paid you a bunch of cash and all you have to show for it is an unfinished product.

    But then if you quickly slap together two perl scripts which spit out non-compliant HTML and then plop it on Apache running on a Ubuntu box in your garage last updated 3 years ago, the client is super happy because it actually does what they want and you did it for cheap.

    And this sums up the state of current technology.