HNHacker News
TopNewBestAskShowJobs

teo_zero

1,544 karma · joined August 14, 2022

submissionscomments
teo_zero··on Almost Always Unsigned
Put the "--" in the condition. It's less ugly.
teo_zero··on Show HN: 18 Words
Timer should be like in chess tournaments: an initial budget of X, increase by Y for each word you guess.
teo_zero··on Decoding the obfuscated bash script on a Uniqlo t-shirt
I don't know... I prefer unobfuscated text that you can immediately grok. The other day I saw this on a T-shirt:

> May the m×s/t² be with you

teo_zero··on My quest to see all of Tetris
> You do seem to get more | shaped pieces when you leave those spaces open on the board.

I don't think this is correct, nor that it can be evinced from the article. What it does say is that the sequences that led them to achieve their target show a higher incidence of I shapes. This is because all the ones that show less I shapes have been "pruned away" by the cost function, which favors I shapes.

This has some relationship with the anthropic principle: isn't it strange that, of all the possible universes, we ended up in the one that seems fine-tuned exactly for life as we know it?

teo_zero··on Asahi Linux 7.1 Progress Report
> What a ridiculous comment

I wonder if starting a comment by despising the parent is just being gruff or it leans on personal attack...

teo_zero··on Ante: A new way to blend borrow checking and reference counting
What if I omit the "uniq" keyword? Is it still valid code, just not protected by the compiler from union types changing underneath?
teo_zero··on Show HN: DRM-Free Books
> More Authors with DRM-Free Books

> On Amazon, look for books that offer EPUB and PDF downloads.

Isn't this like saying "to find a needle in a haystack, just look for anything that's metallic"? Technically correct, but not really helping...

teo_zero··on Bashblog – a single bash script to create blogs
I can't speak for others, but I downvote to recommend other readers that the post is not worth reading. Not because I disagree with it, but because it's off topic in a way or another.

If TFA is about a tool, I tend to downvote comments that don't talk about the merits of tool but rather about the hosting website, the language it's written in, whether or not it "smells AI", English mistakes in the readme, and so on.

On the other side, if I reply to a comment I always upvote it, even if my reply is to refute it. In fact if I felt the need to add anything to it, it was by definition worth dealing with it!

teo_zero··on Fusion Programming Language
Nice idea. I'm just wondering how to debug code written in fusion... probably you must focus on one of outputs, debug that one, and then back-fit the changes to the fusion source. :/
teo_zero··on A C++ implementation of a fast hash map and hash set using hopscotch hashing
The concept is very similar to robin hood. In fact most of the performance charts show that the curves of hopscotch and robin hood are very close. I think I'd prefer robin hood as it's well known.
teo_zero··on Show HN: Chess-Inspired Roguelike
> it's definitely infinite if you play perfectly.

Considering that 2 new pieces are spawned for each captured one, if you keep progressing you will exhaust the real estate, sooner or later. The only way to go on infinitely is not capturing, but that means not scoring points. Hardly satisfying, though.

For example today's board can be played infinitely by moving between a8 and b7. Zero points, infinite game!

teo_zero··on Show HN: Got sick of ads, so I made my own logic puzzle site
Or you could only flag the inconsistencies, for example if the same digit shows up twice in the same row.
teo_zero··on Zig's new bitCast semantics and LLVM back end improvements
> I think you meant to use [400]u6

Of course! I guess it was too early to do the maths correctly... :)

teo_zero··on Zig's new bitCast semantics and LLVM back end improvements
Can I convert a 300-byte message to Base64 with a single instruction? Like:

  in: [300]u8;
  out: [800]u3;
  out = @bitCast(in);
teo_zero··on A man was gifted his dream car by Kevin Mitnick, who he helped put in prison
Getting caught didn't make him a superstar. Telling his techniques in books and public speeches did.
teo_zero··on Show HN: Got sick of ads, so I made my own logic puzzle site
I hate that it immediately flags your errors. First, because it doesn't forgive the casual finger slipping or forgetting if you are in pen or pencil mode. And then because it partially gives away the solution.
teo_zero··on Linux eliminates the strncpy API after six years of work, 360 patches
> A lot of pain and suffering to avoid having a string datatype

No, a lot of pain and suffering to work around the lack of a string datatype in C.

teo_zero··on How many of the 170k English words do you know?
> Maybe I should consider myself as one

It depends: do you get its and it's right? :)

teo_zero··on How many of the 170k English words do you know?
Oops! I had better revise my theory, then!
teo_zero··on How many of the 170k English words do you know?
Reading through the comments, I've noticed you can tell the native speakers by their scores in the word categories. A native speaker will score 20/20 in the first two bands and progressively less in the following ones. For those who have learned English as a foreign language, the scores are more evenly distributed.

So it's not uncommon to see a native English speaker totaling 90 as 20,20,19,17,14, and a foreigner reaching the same total as 18,18,18,18,18. Strangely enough, the algorithm favors the latter, because it assigns more weight to the higher-end bands.

Is this of any use? I doubt so, but it was fun.

P.S. of course a more reliable clue of nativeness is the use of "its" and "it's" interchangeably, a mistake EFL learners wouldn't do.

teo_zero··on Making ast.walk 220x Faster
The second part, where it says that Rust is faster than Python, is so obvious than doesn't deserve any further comments. What I found interesting, is that idiomatic Python, with generators and all, can be so much worse than "C-style" Python, if you will pardon that term. It's a pity many kids are taught Python before C...
teo_zero··on I Love the Computer
> People will only get to use and experience these tools through their employer

Like in the era of mainframes, before the personal computer was a thing. I wonder if universities will play the same role, though.

teo_zero··on Chopped, Stored, Secured – The Story of the Hash Function
> understand hash functions less after reading this than I did before.

Haha! Same for me (this being tptacek's comment, not the article).

It's like reading an introductory explanation of what an electric vehicle is ("a car with an electric motor that one can recharge at home") and then a comment saying "no, no, no, internally the whole powertrain is completely different, there are inverters and relays, etc."

teo_zero··on A generic dynamic array in C that stores no capacity and needs no struct
Clever!

I don't like the use of uintptr_t, though. Why not storing the array begin in v[0] and a pointer to the first free item in v[1]? You avoid casts by defining len as ptrdiff_t and calculating it as v[1]-v[0].

teo_zero··on Linux 7.1
> (granted, all AMD for compatibility)

I get that you mean that AMD is more compatible than... what? Intel? Arm?

teo_zero··on Lies we tell ourselves about email addresses
Wait! Are you saying that you process new registration attempts without any rate limit, captcha, etc? Because the moment to filter out (or limit) bad actors is before they submit an email address, not through it.
teo_zero··on Lies we tell ourselves about email addresses
> the major email providers will penalize you if you generate too many undeliverable emails.

I suspect the rate at which new users may try to create new accounts and type a wrong email address is too low to be noticed by reputation metrics.

teo_zero··on Lies we tell ourselves about email addresses
The plus sign is a pet peeve of mine, too. But I stopped keeping a list of bad sites when their number has become double digit!
teo_zero··on Mouseless – keyboard-driven control of macOS/Linux/Windows
> you absolutely can navigate Windows + Office keyboard only

Unfortunately in Excel many operations can be done only with the function keys (e.g. F2, Shift-F8). I'd argue that leaving the center of the keyboard to press the function keys is not easier or quicker than reaching for the mouse.

teo_zero··on Branchless Quicksort faster than std:sort and pdqsort with C and C++ API
Writing to array[n] and not incrementing n means that the value just written is outside the "useful" range (from 0 to n-1) and will not be considered (it will be overwritten the next iteration).
← PreviousPage 4 of 31Next →