Better HN
topnewbestaskshowjobs
Log inSign up

mojifwisi

71 karma · joined Oct 9, 2022 (4y ago) · 22 submissions

Submissions

comment 9mo ago · link · parent

Anglo likely just means English-language.

comment 9mo ago · link · parent

I'm a big fan of your other app Leader Key: it's the closest equivalent to the Windows+number keyboard shortcuts that I use all the time on my other computer (but better since you're not limited to 10 apps and you can use mnemonic shortcuts). Does the release of Tuna mean that Leader Key is now deprecated/unmaintained?

comment 9mo ago · link · parent

Tree-sitter is merely a tool for generating an AST for a given language. LSPs on the other hand have way more capabilities (formatting, diagnostics, project-wise go to definition, inlay hints, documentation on hover, etc.) as you can see in its specification.[0] They can't really replace one another.

[0]: https://microsoft.github.io/language-server-protocol/specifi...

comment 1y ago · link · parent

That seems more complicated than just adding the info in the commit message. It's not like Git doesn't have flags for trimming commit messages when reading them (--oneline).

comment 1y ago · link · parent

It's syntactically more straightforward to resolve the issue of clashing definitions through namespacing with functions compared to operators.

The following is pretty standard:

    foo::plus(a, b) // or foo.plus(a, b)
    bar::plus(a, b) // or bar.plus(a, b)
Whereas this is more awkward:

    a foo::+ b // or a foo.+ b
    a bar::+ b // or a bar.+ b

comment 1y ago · link · parent

There's always git diff --word-diff, so a website tracking changes in laws in a Git repo could display diffs using that flag by default.

comment 1y ago · link · parent

I am not OP, but I am interested in those tools and tricks.

comment 2y ago · link · parent

Since Neovim 0.10, `:tab term` now opens the terminal window in a new tab. And you could use the exact same command in Vim since they introduced their own terminal emulation feature in Vim 8.0.0693.

comment 2y ago · link · parent

This might be a dumb question, but how would an off-screen cursor work in a terminal? According to my understanding of the way terminal emulators/ncurses work, the cursor must be positioned somewhere in the screen, even if it isn't visible.

comment 2y ago · link · parent

Quite an odd comment to make in the midst of the Ukraine war, another war between Israel and Palestine, and the ongoing civil wars in Sudan and Burma.

comment 2y ago · link · parent

The screenshot in the repo's README suggests this is not the case: Python doesn't have the "struct", "var", "fn", "inout", "trait", or "owned" keywords.

comment 3y ago · link · parent

Link to the full paper: https://web.archive.org/web/20151010141416id_/http://www.res...

comment 3y ago · link · parent

> Slavery was widely confirmed for even longer. Tradition, right?

This is an egregious use of the noncentral fallacy.[1]

Conforming to this 50-year tradition makes the language more familiar and easier to learn, so it's reasonable to question why the language chose differently.

[1]: https://www.lesswrong.com/posts/yCWPkLi8wJvewPbEp/the-noncen...

comment 3y ago · link · parent

The concept is interesting, thanks for sharing. I suggest that in future iterations/versions, it could take the duration of the tracks into account: a two-minute track certainly doesn't cost as much as a track that is almost three hours long (extreme example, I know, but album-length tracks are not that uncommon).[1]

[1]: https://open.spotify.com/track/6jfQOSSQImYlyxeSAi6jh7?si=375...

comment 3y ago · link · parent

> From a European perspective, I was shocked it had to be written.

Not really related to your point, but where in Europe do you come from? In France it is common to have job listings read that they hire handicapped people or women, so I don't see why that would be shocking.

comment 4y ago · link · parent

The article starts with: "This is advice for younger me. It might work as advice for you, if you think about value the way I did." The "you" refers to the younger version of the author.

comment 4y ago · link · parent

Nice! That guy also made this interactive version of Terry Riley's "In C": https://teropa.info/in-c/

comment 4y ago · link · parent

Translations for the few quotes that are in French:

> Je mange donc je chie. — Don Ho

"I eat therefore I shit." It's a pun on René Descartes' "Je pense donc je suis" (I think, therefore I am).

> Mathématiquement, un cocu est un entier qui partage sa moitié avec un tiers.

"Mathematically, a cuckold is a whole who shares his half with a third [party]."

> Si un jour une chaise te dit que t'as un joli cul, tu xtrouveras ça bizarre mais c'est juste un compliment d'objet direct.

"If some day a chair tells you you have a pretty ass, you'll find that weird but it's just a direct object compliment." It's a pun on "complément d'objet direct" (the object that is put directly after a transitive verb), intentionally being misspelled as "compliment d'objet direct" to mean that it's a direct compliment from an object.

> Mon pied droit est jaloux de mon pied gauche. Quand l'un avance, l'autre veut le dépasser. Et moi, comme un imbécile, je marche ! — Raymond Devos

"My right foot is jealous of my left foot. When one goes forward, the other wants to overtake it. And I, like an imbecile, I'm walking!

comment 4y ago · link · parent

> C-style also has a problem in that there is no way to define arbitrary blocks

I might have misunderstood what you mean by "arbitrary blocks", but you can definitely do this in C:

  int main()
  {
    {
      /* arbitrary block */
      return 0;
    }
  }

comment 4y ago · link · parent

Iterate doesn't have either of these problems, so I don't see how it's just a "slight improvement".

> There is no way to iterate over a sequence.

With iterate, you'd do:

  (iter (for item in-sequence seq) ...)
> LOOP is not extensible.

But iterate can be extended with DEFMACRO-CLAUSE.[1] I think that's why iterate added the parentheses in the first place.

[1]: https://iterate.common-lisp.dev/doc/Rolling-Your-Own.html

comment 4y ago · link · parent

May I suggest two things to make <C-U> and <C-D> more usable?

1. Set 'scroll' to a value you're comfortable with, so that <C-D> and <C-U> move fewer lines.

2. Use a plugin that shows a scrolling animation when you use <C-D>, <C-U>, <C-F> or <C-B>. I use vim-smoothie (https://github.com/psliwka/vim-smoothie).

comment 4y ago · link · parent

https://github.com/onivim/oni2/issues/3811#issuecomment-9103...