Better HN
topnewbestaskshowjobs
Log inSign up

jbert

1,244 karma · joined Feb 20, 2007 (19y ago) · 509 submissions

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.

Submissions

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

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.

comment 10y ago · link · parent

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)

comment 10y ago · link · parent

I disagree. Names are comments. You don't want more mutable state across large scopes, but using intermediate names can help comprehension.

comment 10y ago · link · parent

> your business plan must make sense to the investors.

Would locking in dividends in the business plan allow the investors to become "directly involved" and make investment in a "going concern but not a unicorn" a rational choice for an investor?

comment 10y ago · link · parent

> 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.

comment 10y ago · link · parent

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?

comment 11y ago · link · parent

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?

comment 11y ago · link · parent

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...

comment 11y ago · link · parent

> 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?

comment 11y ago · link · parent

Thanks - useful point. But, I think that's more of an oddity of nested, named subs than anything else. The usual anonymous subs close as you'd expect (as you say).

comment 11y ago · link · parent

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.]

comment 11y ago · link · parent

Does this places a reasonable selection pressure on the kinds of flying insects we can have?

Big enough to shrug off a raindrop hit, or small enough to surf along the surface tension until it can slide off?

comment 11y ago · link · parent

Does it have to be an open system?

Can't the already-contaminated water be used for cooling in a mostly-closed system?

And if the expansion due to rainwater is significant, perhaps some kind of large tent arrangement?

comment 11y ago · link · parent

Someone did a nice calculator hack a little while back, based upon an old reddit comment of mine:

http://tlrobinson.net/blog/2007/12/presenting-gccalc-a-horri...

http://www.reddit.com/r/programming/comments/62v70/first_cla...

comment 11y ago · link · parent

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.

comment 11y ago · link · parent

Not entirely unlike running a garbage collection cycle (or freeing a pool) after each HTTP request...

comment 11y ago · link · parent

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.

comment 11y ago · link · parent

Perhaps stretch out a flow battery with a pair of pipelines? http://en.wikipedia.org/wiki/Flow_battery

We could repurpose those oil pipelines we no longer need. :-)

comment 11y ago · link · parent

Is there any way to use drag to decay the orbit? We don't have to reach the sun quickly.

The solar wind is blowing past, is it possible to "sail" against that at an angle and - over time - dump orbital velocity and so end up in the sun?

comment 11y ago · link · parent

Huh - the other domains in *.google are hitting a default page. Perhaps the most-robustly-hosted apache default page in the world?

http://foo.google/

http://wewjfkenf.google/

comment 11y ago · link · parent

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.

comment 11y ago · link · parent

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)?

comment 11y ago · link · parent

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.

comment 11y ago · link · parent

> You're right, though; metadata on the allocations themselves marking them as release-on-memory-pressure would be much better.

http://man7.org/linux/man-pages/man2/madvise.2.html - MADV_DONTNEED allows you to provide such meta data now.

comment 11y ago · link · parent

madvise() MADV_DONTNEED allows this - http://man7.org/linux/man-pages/man2/madvise.2.html

It's also a flag in posix_madvise(), so the concept is reasonably portable.

comment 11y ago · link · parent

> 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.

comment 11y ago · link · parent

Can you just use their ssid, if you're the strongest signal your device should prefer yours?

comment 11y ago · link · parent

Stock ubuntu here has a /proc/keys file, so I think it's generally available.

comment 11y ago · link · parent

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.

12345
17