HNHacker News
TopNewBestAskShowJobs

jbert

1,244 karma · joined February 20, 2007

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.

submissionscomments
jbert··on Webhooks do’s and dont’s: what we learned after integrating APIs
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.

jbert··on Show HN: TCP/UDP over sound
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.

jbert··on How CPU load averages work, and using them to triage webserver performance
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)

jbert··on Remove the ++ and –- operators
I disagree. Names are comments. You don't want more mutable state across large scopes, but using intermediate names can help comprehension.
jbert··on Tech Startup Crowdfunding Isn’t All It’s Cracked Up to Be
> 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?

jbert··on Remove the ++ and –- operators
> 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.

jbert··on Remove the ++ and –- operators
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?
jbert··on Can Economic Growth Last?
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?

jbert··on Pingfs – a filesystem where the data is stored only ICMP Echo packets
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...

jbert··on Farewell to America: Returning to England After 12 Years in the US
> 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?

jbert··on The Three Great Virtues of a Programmer: Laziness, Impatience, and Hubris
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).
jbert··on The Three Great Virtues of a Programmer: Laziness, Impatience, and Hubris
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.]

jbert··on How mosquitos deal with getting hit by raindrops
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?

jbert··on No One Knows What to Do with Fukushima’s Endless Tanks of Radioactive Water
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?

jbert··on Show HN: Calc, a simple command-line calulator in C
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...

jbert··on When a+b+c does not equal c+b+a
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.

jbert··on Walking Through a Doorway Makes You Forget (2011)
Not entirely unlike running a garbage collection cycle (or freeing a pool) after each HTTP request...
jbert··on Show HN: This page exists only if someone is looking at it
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.

jbert··on Why Energy Storage Is About to Get Big – And Cheap
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. :-)

jbert··on Why the sun is a poor dumping ground for nuclear waste (2010)
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?

jbert··on elgooG
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/

jbert··on Why are glasses so expensive? (2012)
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.

jbert··on Gamma-ray bursts are a threat to life
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)?

jbert··on The “too small to fail” memory-allocation rule
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.

jbert··on The “too small to fail” memory-allocation rule
> 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.

jbert··on The “too small to fail” memory-allocation rule
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.

jbert··on The “too small to fail” memory-allocation rule
> 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.

jbert··on Brazen Attempts by Hotels to Block Wi-Fi
Can you just use their ssid, if you're the strongest signal your device should prefer yours?
jbert··on Environment Variables Considered Harmful for Your Secrets
Stock ubuntu here has a /proc/keys file, so I think it's generally available.
jbert··on Ruby compiled with Clang is 8% faster than with GCC 4.9, 44% faster than GCC 4.7
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.

Page 1 of 17Next →