HN user

flysand7

141 karma

Low-level programmer, like C and stuff

Posts0
Comments97
View on HN
No posts found.
Meow.camera 4 months ago

Cats aren't social species, they don't have the capability to understand what is and isn't private. If a cat wants to lick its balls it'll do that, even if the owner is watching.

Also, even if we wanted to push for some sick agenda that cats should have rights too, you can't really make a cat aware of said rights. Cats dont give a shit about cameras watching them

Meow.camera 4 months ago

A chinese company Hello has created an app called Hello Street Cat - a livestreaming app that allows viwers to donate money to feed stray cats. Presumably, since it's the same company, maybe they purchased the feeders in bulk, that'll explain why the feeders look the same

But I wonder why some feeders are more decorated than others. For example Mr. Happy doesn't seem to have a container at all.

This reminds me a Russian localization of the "Search" bar on some version of Windows 10, which reads something like "Type the prompt to perform search". Also weirdly infantilizing, overly verbose and just plain weird. Had a couple overseas friends ask me a few times why the text on the search bar is so long haha

This article, although is trying to provide some arguments as for why package managers are "evil", I found the argumentation pretty weak/non-descriptive. It's good if you have the experiences that confirm a specific point of view, but I think these experiences need to be explained in some more detail, because people reading your article may have similar experiences and therefore would find it hard to agree with your points - just like me.

To give a concrete example, you said that javascript does not have a definition of a "package" in its langauge. But what does that really mean, and why should it lead to package manager managers? Because for me, a person who has worked with javascript just a little bit, I know package.json exists and most of the package managers I've worked with agree on what the contents of this file mean. If we limit our understanding to just npm, yarn and probably bun, we don't see how that causes or contributes to the dependency hell problem (sure it exists, but how?).

You said that Go mitigates the issue of dependency hell to some degree, but this is an interesting thought, give it more exploration! Why should something like Go not have this problem not be not as severe as in Javascript?

I may not remember the details of what you said in the article and I would like to check, but currently I can't access the site because it times-out for me.

There's something similar I've done programming on linux. I've been working on some things in Odin programming language for a while and there are a ton of changes I've made where the commit contained an executable, because when Odin compiler makes the executable it names it after the main package's directory, without suffix.

Once I complained about this to the community someone suggested a clever gitignore hack:

    *
    !*/
    !*.*
This by default ignores all files, except those that have a suffix and directories. I think this is a useful lesson - if you flip which files you ignore you can change the failure mode from "I accidentally committed a huge file into a repo" to "why isn't it working?". The latter can be pretty much be answered by good CI testing (maybe not always though).

As someone who knows what they're talking about, I'm curious to hear from you, why you consider use-after-free an undefined behavior and not an unspecified behavior instead?

Because as far as I know both undefined behavior and unspecified behavior are the behaviors that aren't specified in the language standard nor the implementation. So what's the difference?

Watched this video yesterday, and damn, it's really delightful watching experts make content about things they are passionate about. This love and passion is contageous, and even me, who up to this point knew almost nothing about birds has gained a new appreciation and love for these creatures. The fact that they can copy sounds is kinda incredible, and makes me want to listen more to them singing.

Speaking of postgres, you don't even need a function, you can just use RETURNING clause of a modifying query to provide data source for the select:

    select *
    from (
        delete
        from users
        returning id
    )

I really suggest not removing them as they are a great way to estimate the length of the article (which was the first thing I tried to do on your page and had to spend a good minute first looking for a scroll bar, and then holding Page Down key).

The analysis seems to disagree with the data shown in the graphs about the labels of "left" and "right". The author seems to be confusing left/right? It's not just the first stacked bar, but also the third (avg %bias)

The biggest thing I'd want from a calculator -- having to calculate numeric expressions involving units, and getting the result in a specific unit. This is something I've used the google search prompt for because it can do these things to some degree, but google isn't a calculator and it will refuse to give you an answer right away if it doesn't think you entered a valid numeric expression.

Most of the time I'm looking for an answer in questions like:

    4 weeks + 59*3 hours in days
    1/2 * 36g * (900 m/s)^2 in joules
Other times when I'm working with memory and want to get a specific finite representation in hexadecimal:
    1 megabyte as hex
This might be off-topic because you're building a suite of calculators that I'd have to switch between to perform these tasks, rather than a single calculator that can do all / most of these things, but this kinda raises a point - if you want to switch between the calculators, maybe the UI should allow going from one to the other without performing the navigation, I'm thinking something like a sidebar that you can click on to switch to a different calculator.

Ideally when you switch and switch back the state should be saved because you might need to copy multiple values between calculators. EDIT: I forgot browsers have tabs, but still.

But really for me personally, nothing would beat a single thing that can do units and bases

I'm kinda wondering are there any countries that still use the long scale nowadays? For me the biggest thing I've had to learn is that in Russian we use a short scale, except we don't have "billion" and instead it's "milliard". So it's just that you need to be careful with translating that one word. Are there other countries where the scale "shifts"?

So I've got some things that seem a little bit weird to me:

1. Typing uppercase characters counts as a mistake

I'm not sure how that got to be the case, but somehow typing an uppercase letter instead of the lowercase is a mistake, despite the fact that sentences start with a lowercase letter. This conflicts with my muscle memory of starting sentences with a capital letter.

2. WPM is not a useful metric on its own

WPM can rise and fall depending on the length of the word. The bigger the word the less likely you are to type that word correctly from muscle memory, so the speed drops. The speed also drops due to the word being longer. I believe having both metrics would yield more useful data, such as when do you slow down etc.

Speaking of which, there are some more statistic things that could help, like measuring how fast you are at fixing the mistakes, or measuring three-letter combinations instead of two-letter combinations, because the context of the third letter might help, but you do need more data to gain a statistically significant result. Maybe trying to classify mistakes by the side of keyboard they happen on -- i.e. are they simple typos or a miscoordination of your hands.

---

Also, as pointed out by another commenter, hands also threw me off. I've been observing them and it's interesting that I don't use my little finger for the left row -- it's used in case I need to press shift.

Yeah, this kinda becomes a problem when the library you are using does not distribute its source code, so even if you get the line, this information is practically useless to you.

This has been my biggest problem with exceptions, one, for the reason outlined above, plus it's for how much time you actually end up spending on figuring out what the exception for a certain situation is. "Oh you're making a database insertion, what's the error that's thrown if you get a constraint violation, I might want to handle that". And then it's all an adventure, because there's no way to know in advance. If the docs are good it's in the docs, otherwise "just try it" seems to be the way to do it.

RemedyBG might also be worth looking at. It is my go to debugger that I've used on Windows and it's made to look and feel like the debugger that comes with Visual Studio, except that it works way faster and you can hold the "Go to next line" key and see the watch window update in real time. Unfortunately you have to pay for it and it doesn't work on linux, but oh well.

Binary Wordle 1 year ago

Knuth's "Art of Programming" had a hypothetical machine with 5-bit words.

Oh that's what it was! I actually didn't think much of it until you pointed it out. At a glance looked like some random arrangement of squares