HN user

jbert

1,244 karma

Please feel free to email me. My email address has local part: john.berthels

And is hosted at the popular gmail domain used by COMpanies.

Posts2
Comments501
View on HN

One difference is in "dead connection detection". How do you know that your AMQP connection is down? At some level you're polling, whether that be TCP keepalive, application keepalive or something else.

If you're doing polling, you're actually back at the same pre-webhook place - polling their server on some timescale which is a compromise between latency and load.

Yes, a TCP keepalive is generally cheaper than an HTTP long poll request, but only by a constant factor.

The setup process for our Cocoon home security device (https://cocoon.life) uses an audio transfer from the phone to pass wifi details and a token to bootstrap setup and a trust relationship.

After some time spent tuning and with some forward error correction, the reliability is good and it's not too harsh on the ears. Response from beta testers has been pretty positive.

Isn't the calculation (assuming (for simplicity) one CPU, running at 100% only on application load)

60 requests/sec => each request takes 1/60s CPU-second == 16.6ms of CPU time to process? (This is time-on-cpu, and doesn't include time-waiting-for-cpu. I think time-on-cpu is the number you want if you're looking at optimising your codebase)

And with language support I don't have to introduce new names for each occurrence;

Having <LHS> as a name is only useful I think if you don't want to give it another name? I was asking what's the downside of giving it a name.

Is there a significant benefit to this over using a new name for the result?

    y = (x + 1) / atan(x) - x;
    x = y; // If you're in a loop and updating some value
If would hope/imagine that a compiler could reduce the two to the same code - and I don't think it reads any worse. Is there a downside beyond the extra line of code?

Is the "but at that kind of energy output we'll boil the planet" limiting case really a hard limit though?

If we're at the stage of having super-dense energy sources and super-tech, couldn't we we use those to cool the planet effectively?

Use a heat pump to move that heat off-planet? Drop some icy asteroids in the seas? Take compressed hot atmosphere off-planet in super-blimps, run it through a heat exchanger on Titan and then bring it back?

In the pre-smtp days, email links were over UUCP, which was often relayed via dial up lines which connected intermittently, on a schedule (e.g. every hour).

You also specified not just the destination, but also the route for the email to take, via a 'bang path': https://en.wikipedia.org/wiki/UUCP#Bang_path

Add in the situation of disk quotas for university students, but not email quotas, and you get the means, motive and opportunity for people to use the email spools of a mail servers around the world as an annex to their home directory...

The founders of the USA were not immigrants, they didn't immigrate to join Indian tribes, they were founders of a country.

Sorry, I'm afraid I don't understand the distinction you're drawing.

If some people move from one country to another, and the other place has people living there already, what characteristics of the move classify it as founding a country rather than immigration?

I'm interested in the details of the variable scoping problems are. I'd have thought that perl's explicit declaration of lexicals with 'my' was better than "declare at first use" of javascript/python/ruby.

[There's a class of mistake where you typo a variable name which you can make in those languages which gets caught in a language where you have to declare variables.]

A related one which I found is A + B - B != A

In pretty much the same case, where A==some time and B == 1 month

This came up in calculations for monthly subscriptions, trying to reach back in time to work out pro-rata charges for changing subscription details part way through a month.

Yes, but as long as the same method is used to generate the hash, the same browser could connect to multiple services and share the same content.

In that sense there needn't be a single service. Just a bunch of rendevous points for browsers-with-content to connect and announce what they have.

People want to try on several pairs of glasses and see which ones they look best in.

So if you control the retail chain, you've got the monopoly.

They said their competition was walmart. And that they bought Oakley after refusing to stock their product.

Do you know if there is any bias to the orientation of the jets?

e.g. in a spiral galaxy, do they tend to align with the axis of rotation and so do less damage locally (spray out "up and down" from the galaxy)?

You said: "In other words, it's just wouldn't be practically possible to create an application that uses standard memory allocation functions and reliably can free some memory back to the kernel."

So I thought you'd be interested to know that you can do just this with the standard functions mmap() and madvise().

No, it's not a replacement for malloc/free, but it does have value to some applications for some use cases.

No it wouldn't. If a program has memory that it doesn't need and can live without it ought to just release it. Otherwise that is called a memory leak.

I disagree. A process could usefully cache the results of computation in RAM (e.g. a large lookup table). This RAM is useful to the process (will increase performance) but if it is discarded due to a spike in memory pressure it could be rebuilt.

What happens when the kernel yanks a page of memory from über a running process?

There is a madvise() flag for this, MADV_DONTNEED - http://man7.org/linux/man-pages/man2/madvise.2.html

You get zero pages. Which is fine - you can detect that with a canary value and then you know you need to rebuild your cache.

It'd be really interesting to see the methodology used when gains like this are reported, because it's potentially really interesting stuff but without knowing what was measured and changed, it's hard to give it weight.

Which is a shame, because it's probably really useful.

i.e. what's the workload. what was the performance metric which improved. any detail you can give about the likely bottleneck of the system, etc.