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

It would still be interesting to see how often those companies ghost.

comment 2y ago · link · parent

the latter

comment 2y ago · link · parent

Let's put the rungs closer together.

comment 2y ago · link · parent

That's a good store.

My store has a few different brands of coconut milk. Some of the unit prices are per pound, while others are per quart. I make the approximation that coconut milk has the same density as water, which is two pounds per quart. The unit prices are all odd three digits numbers. It's a pain.

You could have one person who works in an office somewhere who's responsible for itemizing inventory for the whole grocery chain. They could solve this problem (maybe automatically!) with a spreadsheet. They could also solve the problem of tomatillos not being registered in the self-checkout catalog. But what is that person's salary paying for in the company's eyes?

To be fair, maybe the real explanation is "lots of stuff, shit happens." And it's only a factor of two (for watery goods, anyway).

comment 2y ago · link · parent

The compiler is a series of such scripts. With constexpr/consteval/constinit, templates, and reflection, C++ is slowly converging on hygienic macros.

Also "a computation is not and cannot be constant" depends on what is meant precisely by "computation" and "constant." Is "23 * 48" a constant, or is it a computation? What about "2208/2"? What about "1.104e3"?

You can define "constant" as "something that is not computed but that exists in the program as an immediate value." In that case you're right but only by definition. And the compiler must still "interpret" the immediate value. It's a slightly fuzzy distinction in my eyes.

comment 2y ago · link · parent

Good for you. There is no shortage of assholes at the border. It's gotten to the point where when I encounter a polite one, I think "what's his angle?" Maybe he's just not a jerk projecting his sense of powerlessness onto strangers. Imagine!

That said, I don't envy their job. But it seems to be a systemic attractor of asshole.

comment 2y ago · link · parent

My uncle used to be a federal prosecutor. Now he defends clients for a private law firm.

He was describing a case to me that involved the government suing his client over something. It turns out that the prosecutor's case was based on a misunderstanding of the relevant laws. Millions of dollars and potential jail time were on the line.

I asked my uncle "do these prosecutors, their office, or anybody face potential retribution for nearly ruining this guy's life and likely ruining his business?" My uncle replied "no, there is nothing that can be done to them." I asked "so if some asshole in a prosecutor's office doesn't like you or is a dumbass, he can just ruin your life and that's it?" "Yes," he said.

I can understand why this is. If law enforcement, generally, were subject to the same liability as regular citizens, that is all anybody would seek to do when the law looks at them. The result would be "playing it safe," and prosecutors would only seek the easy cases, leaving the bulk of crime to happen without repercussions. I don't know what can be done, and there is likely no general solution, but thinking about this makes me realize that "freedom" is not exactly a thing. At least in this case the guy could hire a good lawyer and avoid the worst.

comment 2y ago · link · parent

I have a laptop and an HDMI cable. The laptop is a really nice remote control. It even has its own screen and keyboard.

comment 2y ago · link · parent

That always chafed me about Scheme. I see the utility of `eq?` and `eqv?`, but I'd prefer that there were only `equal?` and functions were defined to get an object's "id" or "numeric equivalency class," or whatever, instead of having different flavors of data structures that differ only for certain values.

comment 2y ago · link · parent

I ran into this recently writing some C++20 coroutines. The protocol for delivering values from a coroutine that was previously suspended has two flavors: one for values and one for void. My initial draft just implemented the value version and used a struct VoidTODO {} where void should be.

It's too late now. void pointers are used as a pun to mean "type wildcard." If void were a real thing that could have a size and address, that wouldn't work anymore.

comment 2y ago · link · parent

I haven't actually checked the source, but I've heard that clang-format works by assigning "badness" weights to each choice of whitespace between tokens, and then runs Dijkstra's (or some other DP) to find the least bad set of choices. A recent Tom7 video said that Knuth did the same thing for text justification.

How about we do a similar thing for ASTs? Like a peephole optimizer looking for runs of instructions that could be substituted for simpler alternatives, a tree diff could identify diff patterns that "might be trivial." You have a whole catalog of these patterns, and assign to each a weight. Then the displayed diff is the optimal set of choices "consider different or not?"

You would need some additional ingredient, though; some boundary condition. Otherwise "everything is the same" would always minimize badness.

comment 2y ago · link · parent

The business model includes ads, according to their website.

comment 2y ago · link · parent

They differ in the sense that it's easy to imagine how you can reclaim the energy in the stone -- let it roll back down the hill.

It's harder to imagine how you can reclaim the energy of the computation. Overwriting a bit requires a little energy even in principle, and then you can't get it back. Maybe this is what the commenter I was replying to meant by "all energy generated ends up as heat." Even still, I'm tempted to make the distinction between the energy that is needed to perform the computation and the energy that is lost e.g. to Joule heating.

comment 2y ago · link · parent

Eventually, yes, but I don't think that's what they meant. The universe is far from thermal equilibrium :)

If you push a stone up a hill, then some of the calories you burned went into the gravitational potential energy of the stone, and some up it was lost as heat.

If you compute the SHA hash of some string, then some of of the energy from the power supply went into switching the voltages in transistors, and some of it was lost as heat.

comment 2y ago · link · parent

Confess! Confess!

comment 2y ago · link · parent

The null code point? That would be pedantic even by my standards.

comment 2y ago · link · parent

A large org is a totally different beast from a small org, and yet they seamlessly transition into each other. So, a large org is dysfunctional when viewed through the lens of a small org. A large org is also dysfunctional when it is run like a small org, as is a small org when it's run like a large org.

comment 2y ago · link · parent

Your story resonates with me. How did you get into contracting?

comment 2y ago · link · parent

A big ball of mud is never what's needed. It's just what happens when too many people have cared too little for too long.

I suspect that the perspective of "It sucks but it works for us; I'm not idealistic anymore" is really a rationalization of despair, but that's just me.

comment 2y ago · link · parent

maybe GNU Screen

comment 2y ago · link · parent

But then what will you contribute to the hour long weekly meeting where 13 managers present the status of their poorly defined CI metrics and other "action items"?

comment 2y ago · link · parent

Money is a promise about the future. The future can be unexpected, and promises can be broken.

comment 2y ago · link · parent

Show me someone who understands the rules, and I'll show you a compiler engineer... who probably doesn't understand the rules.

comment 2y ago · link · parent

Almost all of the spam calls I receive have the same area code as my phone, which is in a different state from where I currently live.

These people who don't pick up for an unusual area code: don't they know that spammers are more likely to call from a "usual" area code? Am I mistaken?

comment 2y ago · link · parent

> What's more, they are confident [building a new browser from scratch] can be done without taking any funding from corporate deals or advertising revenue.

And what if you succeed? Best of luck on this bold endeavor, and try not to break our hearts.

comment 2y ago · link · parent

Thunderbird's is bad, too. GMail's is pretty good.

comment 2y ago · link · parent

Are McKinsey & Co. acolytes abusive and lacking self-awareness?

comment 2y ago · link · parent

Fair point, it's a false dichotomy; though your example is close to "the org wasn't ready for it," which is itself vague.

Maybe the issue is that it easily comes apart without a dedicated censor, so to speak, and nobody wanted to have that role.

comment 2y ago · link · parent

I wonder if this is a tragedy of "the org wasn't ready for his solution" or more of a "if I were to go back now, I'd notice it wasn't so good."

comment 2y ago · link · parent

feels more distributiony if 2n + 1 > 1
1
212223
38