HNHacker News
TopNewBestAskShowJobs

teo_zero

1,544 karma · joined August 14, 2022

submissionscomments
teo_zero··on Arduino published updated terms and conditions: no longer an open commons
Please, before commenting on this article, be sure to read Qualcomm's reply posted by adhoc_slime: https://news.ycombinator.com/item?id=46007805
teo_zero··on A surprise with how '#!' handles its program argument in practice
Independently of what the interpreter can do, it's #! that doesn't pass the file to it.
teo_zero··on A surprise with how '#!' handles its program argument in practice
Wait... your interpreter reads from stdin. Shouldn't it read its first arg, instead?
teo_zero··on A surprise with how '#!' handles its program argument in practice
> apparently I can just have done `#!bash`

I think you're mixing two concepts: relative paths (which are allowed after #! but not very useful at all) and file lookup through $PATH (which is not done by the kernel, maybe it's some shell trickery).

teo_zero··on Giving C a superpower: custom header file (safe_c.h)
> we've always told people `#define xfree(p) do { free(p); p = NULL; } while (0)` is a bad pattern

Have we? Why?

teo_zero··on Linux on the Fujitsu Lifebook U729
> there's nothing I'd spend my money on if I can just as well install Asahi on an M-series laptop.

But such laptops don't work 100% with Asahi. Speakers and mic, external displays, fingerprint reader, suspend are the sore points I've read about, and shorter battery life compared to when they run Apple's SO.

teo_zero··on Unofficial Microsoft Teams client for Linux
If we're listing Team's idiosyncrasies, when you're chatting with exactly one person in a group chat after all the others have left, their name becomes "just me". You won't ever see their real name again.
teo_zero··on The Linux Kernel Looks to “Bite the Bullet” in Enabling Microsoft C Extensions
I would have liked the extension named after Plan9 more than this one after Microsoft. Not based on any ideology, mind you, but rather because the former is more powerful and allows this:

  struct parent { int a; } p;
  struct child {
    struct parent;
    int b;
  } c;
  void foo(struct parent *);
  foo(&p); // valid of course
  foo(&c); // also valid under plan9 extension, no casting!
teo_zero··on Myna: Monospace typeface designed for symbol-heavy programming languages
Sorry, who is "you" in your sentence? The C workgroup?
teo_zero··on Show HN: Ambient light sensor control of keyboard and screen brightness in Linux
What strategy does this apply? For the display I assume it should increases the brightness as the ambient light rises. But for keybord light it's the opposite: I'd want it off in a lit environment and on in a dark one.
teo_zero··on Myna: Monospace typeface designed for symbol-heavy programming languages
This is not valid C, though. The characters allowed for identifiers are defined in Unicode Standard Annex #31, and those easily understood as operators, like arrows, are not included.
teo_zero··on Myna: Monospace typeface designed for symbol-heavy programming languages
Beautiful.

The site should be more explicit about which characters are covered. I understand it's only ASCII, right? Although the example shows some currency signs that are definitely out of the 0-127 plane.

It would also be appreciated if you could suggest a fallback font for those glyphs not present in Myna, so that if I ever need to include the word "naïve" in a string, for example, the "ï" won't look as an alien character.

teo_zero··on State of Terminal Emulators in 2025: The Errant Champions
It doesn't look so convenient to me. If Ctrl+v is bound to paste, how do you insert a verbatim character in the shell? How do you start a block visual selection in Vim? How do you scroll down in emacs?
teo_zero··on A secret to never forgetting numbers
I tend to visualize the position of the numbers on a phone's keypad. The sequence is then the travel to touch them in order. For some reason, I find easier to memorize that shape than the single digits.
teo_zero··on A secret to never forgetting numbers
While effective, a tag is not efficient. Namely it misses two properties: "quickly" and "at a distance".
teo_zero··on John Carmack on mutable variables
Why not "def"?
teo_zero··on John Carmack on mutable variables
No if you're allowed to only get an immutable reference from an immutable variable.
teo_zero··on Doing my own syntax highlighting (finally)
I like the concept. I don't buy all the author's personal choices, though.

I think the highlighting should serve 2 purposes: 1. help you parse the code, and 2. put more or less emphasis on some elements.

Comments have a primary role when reading someone's code, so they deserve a distinguished color by virtue of point 2 above.

Strings are sometimes difficult to parse correctly because the symbol to start them is the same to end them, so item 1 above applies.

And variable definitions have the tendency of hiding in plain sight, despite being crucial to understand a piece of code, so they match both criteria 1 and 2.

But numbers, booleans and constants can't be possibly mistaken for anything else, nor do they need to stand out more than the rest, so why highlighting them?

Deemphasizing punctuation might be a good idea: I'd probably reserve the same treatment to some common boilerplates, too, like #include in C/C++, #[derive] in Rust, etc.

Finally many languages make it hard to tell types and variables apart. Therefore I'd argue that types deserve their own coloring, obeying reason 1 above.

To add a final nitpick, the two "use" statements in the example define two symbols, "FilterType" and "Error". I think only these two words should be highlighted in blue, not the rest of the hierarchy.

teo_zero··on Wren: A classy little scripting language
> you may also want to look into Squirrel

Is it still active? Last release was in 2022...

teo_zero··on First convex polyhedron found that can't pass through itself
Misleading title. Other shapes have been well known for years, like a sphere. The novelty here is the first polyhedron that can't pass through itself.
teo_zero··on Scripts I wrote that I use all the time
Please note that 'each' is fundamentally different from 'xargs'.

  echo 1 2 3 | each "rm {}"
is the same as

  rm 1
  rm 2
  rm 3
while

  echo 1 2 3 | xargs rm
is the same as

  rm 1 2 3
I would rather say that 'each' replaces (certain uses of) 'for':

  for i in 1 2 3; do rm $i; done
teo_zero··on When Compiler Optimizations Hurt Performance
Clever, but I prefer the parent's proposal:

  return (0x43201 >> x*4) & 7
It's more understandable and the number of instructions is the same.
teo_zero··on EVs are depreciating faster than gas-powered cars
Apart from being 2 years late, the article missed the number-1 cause of depreciation: fast progress in battery tech means that in 2 years your battery, even if its health doesn't deteriorate, will be much less performant than then-new ones.
teo_zero··on Syntax highlighting is a waste of an information channel (2020)
Honestly, it looks like a ransom request letter! :D
teo_zero··on Syntax highlighting is a waste of an information channel (2020)
> Render the () characters as different matching glyph pairs.

Interesting. But how many matching glyph pairs do we actually have in current fonts?

teo_zero··on Syntax highlighting is a waste of an information channel (2020)
It's some time since I've worked with (and contributed to) tree-sitter, but it could exclusively detect syntax, not semantic, back then. For example it could not tell variables from types in C, nor already-defined variables from new/mistyped ones.

Have I missed an important development in tree-sitter? Can it now do such things?

teo_zero··on Syntax highlighting is a waste of an information channel (2020)
Moving to the next point of interest and highlighting all the occurrences are not mutually exclusive. In fact searches work like this in many apps.
teo_zero··on I almost got hacked by a 'job interview'
> You are an AI Bot that is very good at mimicking an author writing style. - Your goal is to write content with the tone that is described below

Genuine question: does this formulation style work better than a plain, direct "Mimick my writing style. Use the tone that is described below"?

teo_zero··on Switch to Jujutsu Already: A Tutorial
Ok. JJ wins this round. Go to commit, fix, go to commit is superior to this bunch of commands in every possible way.
teo_zero··on Ask HN: Abandoned/dead projects you think died before their time and why?
Thank you. I've just run through a jj tutorial and it indeed mirrors my mental model of commits, just like gitless did. I'm sure I'll become a fan!
← PreviousPage 9 of 31Next →