HN user

transfire

1,145 karma

The Truth can often hurt, and leads to negative karma in a world that prefers the security of blinders.

Posts3
Comments1,484
View on HN

Holy Deep Dive, Batman. This has to be the most mathematically heavy design for creating TUIs ever conceived. The name makes sense.

But does it blend? (Actually useable?)

[dead] 6 months ago

CLI is an API, so I decided to treat it as such and created Jargon (for Crystal). Define CLI in JSON Schema, get argument parsing, validation, help text, and shell completions for free. Supports nested options with dot notation, subcommands, config file loading and merging, env vars, XDG base dir compliant, and JSON to stdin.

Honestly if it were not for my extensive Ruby background that I have now been able to carry over to Crystal, I probably would have dived into Guile.

(I have been enjoying Elixir too, but at the end of the day it doesn’t quite sit right with me — just feels a bit clunky. Gleam seems an attractive alternative though. The BEAM rocks, but it is a heavy dependency that doesn’t fit all distribution needs.)

FOR loops?

YAML has a merge key <<:, which might be helpful.

The merge key is a clever little trick, but it depends of the special hash key, so lists can’t be merged.

Syntax does matter, which is why YAML matters — even if imperfect.

IDK. They all look a little atrocious to me.

But readability has a lot to do with what you are used to.

The only exception might be FORTH. A very well written FORTH implementation (and I mean very well written) probably would be fairly readable to anyone — at least at the higher levels of abstraction.

Do we really need a new “code container” type for this? Could modules not serve the purpose by localizing require. e.g.

    module Foo
      require “bar”
      …
    end
So everything bar.rb loads in safely within Foo?

It was almost exactly the same expect in VB you had use some esoteric code to access databases — and they kept changing what was the “proper” way to do it. (I think by the time I quit VB it was ADO?)

Absolutely correct! Please correct me if I am wrong, but as far as I know, no one has implemented YAML completely according to spec.

The tag schema used is supposed to be modifiable folks!

And why anyone would still be using 1.1 at this point is just forehead palming foolishness.

Between this and other changes I worry they are just throwing more and more stuff at the wall to widen their browser moat.

Is command and commandfor actually a good idea? I understand the point of it, but it seems like yet another layer of cognitive load.

Instead why not just apply the same principle to CSS? If I could make a CSS selector for one element but have the result target other elements, then one could achieve the same results and more. It would require only a few more pseudo-selectors. And while it probably isn’t necessary, I think it might be prudent to mark the properties that undergo state changes. Something like:

    #my-popover { display:= none; }
    #my-button:click {
      |> #my-popover {
        display:= block;
      }
    }
Where `|>` retargets and the `=` indicates the property can undergo state changes. (Maybe the syntax could be better, but you get the idea.)