Better HN
topnewbestaskshowjobs
Log inSign up

MathMonkeyMan

2,676 karma · joined Nov 28, 2019 (7y ago) · 1,131 submissions

Submissions

comment 2y ago · link · parent

What did Bjarne Stroustrup supposedly say? There are two kinds of programming languages: the ones everybody complains about, and the ones nobody uses.

I'll put on my Scheme hat and say "with hygienic macros, people can add whichever language features they want." Maybe Rust is a good experiment along those lines: C++ with hygienic macros.

Everything that people keep using grows into a monster of complexity: programming languages, software, operating systems, law. You must maintain backward compatibility, and the urge to add a new feature is too great. There's a cost with moving to the new thing -- let's just put the new thing in the old thing.

comment 2y ago · link · parent

My dad was asking me a question about backing something up onto Google Drive, or saving space on some cloud storage account, or something.

He was using the mental model of files and folders -- that files exist and refer to stored bytes, and that there can be one or several copies of a file. There can be links to a file that take very little space relative to the file.

I had to tell him that I have no idea what sort of storage model these services expose, if any, and that the concept of a file system backed by a storage device is not the analogy that applications expose to their users these days.

He eventually understood, but I could feel his frustration -- that the mental model he had was really just chosen by a past moment in application design, and that what replaced it is nebulous and disempowering.

comment 2y ago · link · parent

The article refers to one company as being "more stagnant" than another. It also mentions how people can behave "more like workers than like entrepreneurs." It refers to a firm's "growth."

What are the assumptions underlying the article? What does it mean for a firm to be "stagnant"? How do "entrepreneurs" behave? What is "growth"?

My guess is that the model unspoken is how startups work in, say, the US. An entrepreneur is a person focused primarily on securing more funding/customers/exposure for the company. A stagnant company is one whose revenue/profit/funding/headcount is not steadily increasing. Growth, the opposite of stagnation, is one combination of measures that an investor might use to guess whether an investment in the company will yield favorable returns.

Is that what is missing from poor countries?

To play the devil's advocate, I think that those things are more likely to occur in an environment flush with money, where there are many founders who will take a gamble, where there are many rich people who will fund the gambles, and where a corrupt state entity cannot easily be used to steal any good that comes from it.

comment 2y ago · link · parent

If you're administering a server, what else is there?

There are service managers like systemd and shepherd, which use daemonization under the hood. Then there's container orchestration like docker compose, kubernetes, etc. For my toy servers at home I just use screen and have it set up automatically at boot.

What do you use outside of the microservices camp?

comment 2y ago · link · parent

Interviewing is subjective. Tell yourself that it is not. Problem solved.

comment 2y ago · link · parent

Fucked up my phone jeez.

comment 2y ago · link · parent

More accurate might be "I don't know what the language of 2000 will be called, but I know it will look like Fortran."

comment 2y ago · link · parent

Maybe there is a law on the books that the building owner is violating. I'm not sure where you'd look or what you could do about it, but the NYC equivalent would be calling 311 to file a noise complaint.

comment 2y ago · link · parent

I don't know, but I remember reading that curved is better but harder to do in software (at least in the past). Reddit agrees: <https://old.reddit.com/r/AskElectronics/comments/iejapa/why_...>. I wonder if the machines used to print boards play a role, too.

comment 2y ago · link · parent

I often joke that every startup job post <<getting lots of funding>> is you playing <<game about cleaning up gore>> for the <<people who made the MVP>> of the <<before getting lots of funding>> stage.

comment 2y ago · link · parent

No, but if I take caffeine, pseudoephedrine, and diphenhydramine at the same time, my left armpit sweats profusely. Just the left one.

comment 2y ago · link · parent

Because of that, backing up a claim with research adds weight to the claim.

If the claim is false, though, you can still sometimes get research to support it. If you or the researcher stands to profit from the false claim, then there is a conflict of interest.

comment 2y ago · link · parent

There are a bunch of good reasons to believe there really is matter there that we can't detect aside from its gravity. Here's a talk: <https://www.youtube.com/watch?v=h8KV9Ht5o_M>.

comment 2y ago · link · parent

I say "just" because if I'm missing something fundamental about how passwords are properly stored, then defense in depth might not be the point.

I read up a bit more on salting passwords, and now I see that it makes guessing the passwords _way_ harder, because it adds a factor of O(n) to the guessing (n is the number of passwords leaked).

comment 2y ago · link · parent

I've never designed a system that needed to be secure, nor have I been tasked with breaking one, but...

Is plaintext really that much worse than hashed/salted/whatever storage? If the user generated a hard-to-guess password, then the user is also unlikely to reuse it. If the user generated or reused a memorable password, then it would be not too costly to guess most of them using a dictionary attack or whatever the state of the art is for guessing non-random passwords.

Is this just defense in depth, or deterrence, or is there something I'm missing that makes the plaintext storage really much more dangerous?

comment 2y ago · link · parent

I use a VPN when bittorrent is running, and I've found that several websites outright block me "for security reasons." They like to show me my IP address, too, like a great secret has been revealed and the SWAT team is on their way.

comment 2y ago · link · parent

I wonder to what extent that can be attributed to its ubiquity versus its quality. I've never worked with WordPress.

For example, I notice that most of the automated "attacks" on my server are WordPress related. Is its defect rate significantly higher than other systems', or is it just that if you're going fishing you should bait for the most common fish? PHP and Apache come up a lot too.

comment 2y ago · link · parent

Also from the article:

> "In addition to help prevent the pen from leaking, [...]"

So maybe the hole somehow prevents leaks, which would prevent drying in the sense of no more ink :) Maybe it prevents leaks by making the ink at the tip dry out.

comment 2y ago · link · parent

I wonder to what extent the supposed user benefits of central control of apps are true.

Maybe arbitrary programs on a phone is akin to a random .exe on Windows 95, but instead of Windows 95 it's a computing platform that a majority of human beings have in their pocket and that can provide direct or indirect access to almost all personal and financial information. I mean, you have to grant the privileges, but of course you will.

Maybe having a locked down library of programs is good, I'm just too much of a cynic to see it as anything but a power grab. On the other hand, maybe the support and legal headaches of customers "screwing themselves up" also plays a part, especially when there's a whole dark industry to trick people into screwing themselves up.

comment 2y ago · link · parent

Hot take: The word is "installing." There's no such thing as "sideloading."

comment 2y ago · link · parent

I've never run a company and probably have a chip on my shoulder, but I also think that it's a reasonable assumption that most employers want to pay as little as possible.

comment 2y ago · link · parent

I've been writing in a certain C++17-like subset of C++20. I like designated initializers, and there are probably some other syntax and library conveniences from C++20 that I'm taking advantage of without knowing (std::string_view::starts_with?), but the rest is just C++17.

One notable exception is that I did a project with C++20's coroutines recently.

comment 2y ago · link · parent

The problem with typedefs is that you have to find the definition. A compiler-aware IDE can help with this, but I keep cycling through intellisense, clangd, etc. and they only work if you configure things just right -- not good for reading through some unfamiliar code.

Consistent naming conventions help a lot, but then that just introduces assumptions that could be wrong.

As with most points of code style, it comes down to taste.

comment 2y ago · link · parent

Yep! <https://github.com/dgoffredo/picoro/blob/main/include/picoro...>

comment 2y ago · link · parent

If array is an array of `N` `T`s (`T array[N]`), then `sizeof array` is `N * sizeof(T)`.

However, if you have a function parameter spelled `T array[N]`, that's really just a `T *array` with a helpful hint that it probably points to the beginning of an array of `N` `T`s. But it might not...

For the case of the function parameter, `sizeof array` is `sizeof(T*)`.

comment 2y ago · link · parent

I wonder if what's going on is that most of the work is done by people who joined within the last two years.

Or maybe somebody leaving and having to be replaced by a new hire kind of rolls the dice on headcount, which low and mid-level managers might find interesting.

The answer I like the most is that, as the article says, when you hire a new person you have to pay, on average, market rate. When you're evaluating whether to change the pay of Joe Lifer, you sometimes have to pay market rate but often you don't have to. Maybe you'd save money by giving raises to Joe Lifer, but who knows? You're hiring people anyway, so if Joe Lifer wants to leave, that's a shame, pay the new guy instead of him.

comment 2y ago · link · parent

A psychiatrist told me that sleep deprivation does have a proven anti-depressant effect, but that the side effects are very severe. Makes sense. He preferred the SSRIs.

There is a moment, when I've been up all night and am engaging with the world, that I feel a lack of anxiety and a mental clarity. It's like I've finally "sobered up." I think it's my body telling me "we need to sleep, none of this shit matters."

Sleep deprivation is very bad for you, though, so try something else instead.

comment 2y ago · link · parent

The author had me with the hook. I wanted to know how this fundamental ethical difference arises and what its psychological and sociological implications are. Maybe I could compare it with other proposed ideological axes.

But I didn't find any of that.

comment 2y ago · link · parent

Apparently I thought so as well. Then again, my display is in night mode...

comment 2y ago · link · parent

Plug: I made <https://waybackinator.com/>. You can just append a URL to the URL path to get a link to the most recent archive snapshot, if there is one. It uses the wayback machine's API.

Example:

1. https://www.newscientist.com/article/2445967-astronomers-puz...

2. https://waybackinator.com/https://www.newscientist.com/artic...

3. "That URL is not available via the internet archive API."

Oh well.

1
192021
38