Show HN: Way.js – Simple, persistent, framework-agnostic two-way databinding - <AUTHOR> http://gwendall.github.io/way/

<comment><USER3> Maybe I'm just missing something, but is there no way to deal with arrays? You know, like looping through data and displaying things for each of them? (also related: what about looping through Object.keys()?)

What about dates? And data parsing/formatting in general?

Those are kind of important for a bi-directional bindings library. Remember that the Javascript data is usually the canonical data and the displayed data is derived from it, not the other way around.

If you want to compare w/ Knockout/Angular/etc then there's even more stuff that could be considered as "missing" (e.g. condiditionals, partials/components, how-do-i-use-select2-with-it, etc). One could argue those are out of scope for a lightweight library, but then again, I think this library has too many dependencies for something that advertises itself as "lightweight".

My own framework Mithril ( [http://lhorie.github.io/mithril](http://lhorie.github.io/mithril) ) for example is ~5kb gzipped, has no dependencies, and allows you to do quite a bit more in terms of templating and data binding.

Incidentally, I wrote a article a while back about how two-way binding isn't even always the best answer to your questions, and that there are often better ways to update javascript data from forms: [http://lhorie.github.io/mithril- blog/asymmetrical-data-bindi...](http://lhorie.github.io/mithril- blog/asymmetrical-data-bindings.html)

<comment><USER4> Correct link for Mithril: [http://lhorie.github.io/mithril/](http://lhorie.github.io/mithril/)

<comment><USER3> Yeah, sorry, I just fixed it :)

</comment></comment></comment><comment><USER5> Why use invalid 'way-data'-attributes when there is data-attributes?

<comment><USER6> +1.

</comment></comment><comment><USER7> Looks very nice indeed. Especially like the low overhead. I've been using an alternative, Cortex[1], recently. It's similar, but with a pubsub based eventing system so your updates don't need to be broadcast to every component that uses the data model (e.g. you can subscribe callbacks to specific changes in the model). It works nicely with React.js. Worth a look if way.js isn't quite enough.

[1] [https://github.com/mquan/cortex](https://github.com/mquan/cortex)

</comment><comment><USER8> Might be worth benchmarking against the others:

[http://jsperf.com/angular-vs-knockout-vs- ember/351](http://jsperf.com/angular-vs-knockout-vs-ember/351)

For me personally I am loving VueJS right now.

<comment><USER9> I'm entirely in love with VueJS. It's just amazing. I only wish I could use it with IE8 so I could replace our old version of Angular that we're stuck with at work, but hey, somethings got to give to get that nice an API.

<comment><USER10> Vue / Ractive / React. I'm not a reactive programming nerd, I just want something simple, and all three of these are implemented so well.

</comment></comment></comment><comment><USER11> I've been working on something pretty similar, but on the server side. It's called 'Neurons', and it's a pre-alpha Python library. It's built on Spyne[3], an RPC framework which is another side project of mine that I've been working on for ~4 years now.

The aim with neurons initially is to let you generate a html form (e.g. [1]) and related services from just a model definition and an instance of this model (e.g. [2]), making it a breeze to publish CRUD pages. It currently handles complex stuff like dates, times, arrays and nested objects just fine.

In Spyne terms, that's "serializing a model instance using the HtmlForm protocol". The same object definition can be used to for other protocols like json as well as for persisting data to a relational database (via SQLAlchemy). You can play with the code generator at [http://spyne.io](http://spyne.io) to get a better feel about how it works.

One could even write a Spyne protocol that renders a given model instance to way.js code.

Help is welcome!

[1]: [https://github.com/plq/neurons/blob/test_output/html/test_si...](https://github.com/plq/neurons/blob/test_output/html/test_simple_array.html)

[2]: [https://github.com/plq/neurons/blob/fccab8fee4c1795f65ac3f9b...](https://github.com/plq/neurons/blob/fccab8fee4c1795f65ac3f9b20d79cb1e9279a3f/neurons/form/test/test_form.py#L193)

[3]: [http://spyne.io](http://spyne.io)

<comment><USER12> Oh man, I've had to work on projects with serverside form generation (python people are really into this stuff for some reason), and it's a huge pain. Backend engineer thinks it's going to be way easier or something not having to write templates, however on the frontend, the code generated by these tools is always weird and different from the rest of the markup. No thanks.

<comment><USER11> FWIW, with neurons, there's always the option to override markup generation on a field-by-field basis, so if you don't like the generated code for a certain part of the document, you can change it to your heart's content.

You'll even be able to pass templates down a certain object hierarchy, but that's further down the pipeline.

</comment></comment></comment><comment><USER13> I applied to the example here the first test I always make of any things like this: HTML injection. Result: failure. ☹

<comment><USER14> yup, my go to test name:

\\_(ʘ_ʘ)_/ "'<!--/*༼ つ ◕_◕ ༽つ

caused it to show

{ "formData": { "name": "\\\\_(ʘ_ʘ)_/ \"'

<comment><AUTHOR> Thanks! Fixed. I added a "way-html" attribute (boolean, false by default) that you can pass to your DOM elements.

</comment></comment></comment><comment><USER15> That's the only javascript framework one needs.

Actually I've been wanting to write something like that for a long time but didn't get around to it. Nice to see someone else did exactly what I wanted...

<comment><USER16> Does anybody have real world examples of websites that use this kind of thing?

Im always under the assumption that the old "post data to server, save it there" model still works best. Am I missing something?

<comment><USER17> If what you're doing is simple enough that "serialise the form, send to server, wait for response, do a full page reload" works for you, then no, you don't need two-way data binding, and in fact wouldn't have any use for it. You only need two-way data binding if you need your client-side code to respond to user input, which a truly basic form doesn't need to do.

Of course, for a good user experience, you probably want to do client-side validation of the form; while you can do that a bunch of ways one of the easier ways (from a developer's point of view) is two-way data binding, and I'm using it on a few contact forms, signup forms, file upload forms, etc., scattered around the web for just that purpose.

And if you're doing something more complicated, then you probably want your client side code to respond to user input. If you're using __ANY __client-side MVC, or if you 're getting real time updates from a server (via websockets or whatever), or if you're basically doing any sort of "app" style functionality in the client, you'll probably need two way data binding or its functional equivalent. I've written a big CRM webapp that uses two-way data binding extensively; the old "every click is a full HTTP round trip" model would deliver a shockingly bad user experience.

That being said, two-way data binding isn't the only way to implement rich client-side functionality, it's just one of the conceptually simplest ways of doing it. Backbone has two-way data binding plugins, but the "default" is to use events instead. Ditto for React. But something needs to tie your client side code to user input, and one of the simple "somethings" is two way data binding.

But again, if your app doesn't have any client side code, obviously you don't need anything to tie user input to the code you don't have. So if your app doesn't need any more client-side functionality than, eg, Hacker News has, then you have no need for two-way data binding (or, hell, any JS code at all). But if you want something a bit more interactive, then you need _something_.

(That being said, I still have no idea what makes this library better than any of the many popular, mature libraries that already exist. I've used Knockout quite a bit; it works well.)

<comment><USER16> Im sceptical. You know why? You wrote all this text instead of giving me a real world example and said "look, this would be shitty without a 2-way-data- binding-library".

<comment><USER17> I listed multiple real world examples. Not sure what else you want.

Again, _IF_ you have client side JS code, _AND_ it needs to respond to user input, _THEN_ you need code to trigger that such as two-way data binding, and event bus, dispatchers, whatever. If you do not have client side JS code, or it does not need to respond to user input, then you don't need any of that. Are you asking why you would have client side JS code at all, or...?

<comment><USER16> > I listed multiple real world examples.

I see no URLs in you text.

> THEN you need code to trigger that

I didnt't say you never need js code that reacts to input. I said: does anybody have real world examples where this type of library is useful?

Because most of the time I get along well with sending input to the server. And in the few cases I needed js to deal with user input I got along nicely with simple event handlers.

<comment><USER17> > I didn't say you never need js code that reacts to input.

Actually, you kinda did:

> Im always under the assumption that the old "post data to server, save it > there" model still works best.

Whatever you were trying to say with that question, I don't think it was coming through. Anyhow, to answer your actual question:

> I wonder who benefits from this kind of library. You can react to user input > with a simple keyup event.

Well, obviously. The use case for two-way data binding is _every single place you would ever use a simple keyup event_. The two approaches do the same thing in very similar ways; and a two-way data binding library is generally nothing more than some simple boilerplate over the plain event binding. For example, with Knockout you could put this in your HTML:

        <input data-bind="event: { keypress: handler}" />

Or if you like jQuery you could put this:

        <input id="field1" />

And then in your JS you could put this:

        $('#field1').keypress(handler);

As far as reacting to user input, they do the exact same thing in the exact same way. The difference is that Knockout example has very slightly less typing, that it's (to my eyes) very slightly clearer what's going on when you look at the HTML.

There's a lot of ways to structure an app. Two-way data binding helps with one of the obvious ways; it's simple and (if you're sane about it), clear. Which is probably why it's a core part of Angular, Knockout, Ember, Mithril, Vue, Ractive, and a bunch more frameworks besides, and provided by popular plugins for Backbone and React.

TL;DR: People who want some boilerplate to hide a bunch of ugly event binding.

Edit: To be clear, two-way data binding is one of many ways of organising an app, and by no means the best way. But if your question is "why not just use some random event bindings", I'm not sure you understand the problem space.

</comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> Github repo: [https://github.com/gwendall/way.js](https://github.com/gwendall/way.js)

<comment><USER18> How does it compare to other framework-agnostic binders such as Rivets.js?

</comment></comment><comment><USER19> I would also suggest looking at Rivets ([http://rivetsjs.com](http://rivetsjs.com)) which is my current go-to solution for this sort of thing.

</comment><comment><USER20> Polluting global scope and a hard dependency on jQuery.. :(

<comment><AUTHOR> It is now stand-alone and doesn't mess with global scope anymore (except for the "way" object allowing you to set watchers, etc)

</comment></comment><comment><USER21> Looks very straight-forward. Good job!

OT: After building a couple of large applications in Angular I've come to realize that I seldom need two-way bindings. The school example where you enter something in an input box and it shows up somewhere else in real-time is not really used in the real world. Or is it? Why do we need two-way data binding?

<comment><USER22> I rarely need _simultaneous_ two-way databinding.

But I do sometimes need databinding from view to model (when I want users to enter data, and it just fills in my object), and I sometimes want databinding from model to view (where my data is nicely displayed).

So rather than doing something fiddly and different for each way, it makes more sense to just have 2-way databinding in the first place.

And that then makes it easier for when I _do_ want 2-way databinding - <USER2> instance allowing users to enter a filter to narrow down a list.

<comment><USER16> > allowing users to enter a filter

Wouldn't it be enough to add a keydown event to the field?

</comment></comment></comment><comment><USER23> Great job, i just wish it was at least no dependent on several other libraries including jQuery.

<comment><USER24> I wrote this library which is similar in many ways and is also standalone

[http://batiste.info/likely.js/](http://batiste.info/likely.js/)

</comment></comment><comment><USER25> This is cool but in real world scenarios you need more functionality to make it useful. So far I've been using KnockoutJS where I don't need full-blown MVC and can get away with MVVM.

</comment><comment><USER26> Is it me, or should the description read: "This form is bound to the 'formData' property" instead of "This form is binded to the 'formData' property"

<comment><USER27> it should, but it doesn't benefit the conversation to point out grammatical errors - plenty of HN users are not natively english-speaking so it's probably best to just let it slide.

</comment></comment><comment><USER28> We're still using HTML attributes, and in this case invalid HTML attributes, to add behavior via JavaScript? When are we going to learn :/

</comment><comment><USER29> How does Way.js detect changes made in JavaScript to the values? E.g. if you set a new property to the object, is it reflected in the DOM?

</comment><comment><USER30> How do you compare this with ractivejs.org?

<comment><USER10> A cursory glance: ractive uses mustache, way uses HTML attributes. Ractive requires you to actually create the binding, way just leverages that HTML.

</comment></comment><comment><USER31> looks damn fine,

less dependencies would be an added bonus</comment>


Stonehenge 1875 family photo may be earliest at monument - <AUTHOR> https://www.bbc.co.uk/news/uk-england-wiltshire-50743523 <comment><USER2> [https://www.newscientist.com/article/dn310-concrete- evidence...](https://www.newscientist.com/article/dn310-concrete-evidence/)

 _Most of the one million visitors who visit Stonehenge on Salisbury Plain every year believe they are looking at untouched 4,000-year-old remains. But virtually every stone was re-erected, straightened or embedded in concrete between 1901 and 1964, says a British doctoral student._

These photos may be good evidence of realignment and alteration since the big sarsen falls in the eighteenth century.

<comment><USER3> It's true of a lot of ancient sites; Newgrange in Ireland is essentially a modern reconstruction, complete with a reinforced concrete substructure: [https://en.wikipedia.org/wiki/Newgrange#Modern_conservation,...](https://en.wikipedia.org/wiki/Newgrange#Modern_conservation,_archaeological_investigation_and_reconstruction)

</comment></comment><comment><USER4> That's pretty early. This supposedly realistic watercolour from the 1570s was created by a Dutch artist.

[https://en.wikipedia.org/wiki/File:Stonehenge_Lucas_de_Heere...](https://en.wikipedia.org/wiki/File:Stonehenge_Lucas_de_Heere.jpg)

There's another drawing here from ~1740.

[https://www.atlasobscura.com/articles/stonehenge- souvenirs](https://www.atlasobscura.com/articles/stonehenge-souvenirs)

<comment><USER5> > The earliest known photograph of Stonehenge, not featuring a family, is > thought to date from 1853 - 22 years earlier.

</comment></comment><comment><USER6> What a difference between the set of photos! The dignified, prim, well-dressed families in the early days, and the more recent photos they showed at the bottom of the piece.

<comment><USER7> It is likely that the people in the earlier photos were more well to do than the people in the later photos.</comment></comment>


Microsoft President to Trump: To Deport a DREAMer, You'll Have to Go Through Us - <AUTHOR> http://www.npr.org/sections/thetwo-way/2017/09/05/548686695/250-apple-employees-among-thousands-at-risk-from-daca-cancellation <comment><USER2> Is this supposed to be a good thing? Who the hell does Microsoft think it is to dictate to a democratically elected government?

<comment><AUTHOR> I guess whether or not it's a good thing would be an interesting discussion. Is civil disobedience sometimes a good thing? I think most people would say "yes". But our examples have been by individuals. Is there a role for civil disobedience by corporations?

<comment><USER2> The critical difference is that we get the chance to kick the government out every now and then. I'm staggered at how relaxed people seem to be about so much power being vested in these unaccountable entities. Sure it might seem fantastic when they happen to be on the same side as you, but let's not forget Enron, tobacco companies, Bhopal, Monsanto, roundup and colony collapse disorder, Exxon Valdez - the list of bad corporate behaviour is not short.</comment></comment></comment>


The Backing Up of the Internet Archive Continues - <AUTHOR> http://ascii.textfiles.com/archives/4636 <comment><USER2> Jason Scott here. Just wanted to address the questions that always come up when this project gets some attention. (Also: Come volunteer to be a client! The more the merrier.)

* We are only backing up public facing data. (Roughly 12pb) * We are only backing up curated sets of data. (So less than that.) * We are stepping carefully to learn more about the whole process as we go, documenting, etc. * The hope is this will produce some real-world lessons and code that other sites can use. * This project uses non Internet Archive infrastructure, and is not an Internet Archive project.

It's going well, and the more people who join up, the better. Oh, and support the Internet Archive with a donation - it's a meaningful non-profit making a real difference in the world. [http://archive.org/donate](http://archive.org/donate)

<comment><USER3> Thanks for doing this. Hopefully, this will help reduce the problem of the Web of Alexandria that Brett Victor talked about:

 _60% of my fav links from 10 yrs ago are 404. I wonder if Library of Congress expects 60% of their collection to go up in smoke every decade.

\---

For someone who's thinking about a library in every desk, going on the web today might feel like visiting the Library of Alexandria. Things didn't work out so well with the Library of Alexandria.

It's interesting that life itself chose Bush's approach. Every cell of every organism has a full copy of the genome. That works pretty well -- DNA gets damaged, cells die, organisms die, the genome lives on. It's been working pretty well for about 4 billion years.

We, as a species, are currently putting together a universal repository of knowledge and ideas, unprecedented in scope and scale. Which information- handling technology should we model it on? The one that's worked for 4 billion years and is responsible for our existence? Or the one that's led to the greatest intellectual tragedies in history? _

[https://twitter.com/worrydream/status/478087637031325697](https://twitter.com/worrydream/status/478087637031325697)

[http://worrydream.com/TheWebOfAlexandria/](http://worrydream.com/TheWebOfAlexandria/)

<comment><USER4> Every cell has a full copy of the current operating plan, not the entire history of all preceding operating plans. Storing the entire commit history of our DNA would be much more space intensive.

<comment><USER5> How much more?

<comment><USER4> Well, poking around the web, it looks like the average bacterial time-between- generations is ~0.1-10 hr, and there are ~0.1-100 mutations/generation. So, if life began 4 billion years ago, I get between 10^11 and 10^16 mutations that need tracking.

The article states that there are 10^9 bases in the human genome.

<comment><USER6> While that's a pretty significant range, it seems that we could store the entire commit-log in the same amount of DNA that 100 cells normally store.. 10,000,000 cells on the high-end. Which is still only a few milligrams of cells. Impratical of course, but interesting.

</comment></comment></comment></comment></comment></comment><comment><USER7> This isn't a lot of data in the general scheme of things.

Why doesn't AWS or Google offer to pop it in glacier/S3 or GCS for free for the PR? They both have a huge multiple of that much unused disk - it would cost them effectively nothing beyond inbound bandwidth.

<comment><USER8> It kind of is a lot of data... trying to archive internet websites whole and keeping multiple snapshots is pretty close to what google and other search engines do, only search engines need to generate distributed indexes as well as some information regarding versioning.

Not to mention, that historically speaking, you cannot trust google to keep this information preserved, or public. Look at what happened to any number of other tools google once offered. TBH, I would like to see funding via a grant from the library of congress towards archive.org.

I'm curious as to how many copies a piece of data is needed to be "safe" in such a flexible unknown as end user/volunteer storage. It's one thing for compute items that can be re-queued for work in a day or two if abandoned... it's another where every copy of a record happens to walk away. Let alone the communications protocol.. this goes way beyond most bigtable implementations.

<comment><USER9> On a purely numerical comparison, the article mentions 27TB which really isn't much in terms of size, especially compared to what some of the companies using AWS produce daily.

EDIT: according to comments below, looks like its about 20+ petabytes which is actually a fairly large amount.

<comment><USER10> The article mentions 27TB _so far_ at a point where they appear to still be focused on making their tools better. 27TB is a tiny proportion of IA.

<comment><USER11> Cite: [https://en.wikipedia.org/wiki/Internet_Archive](https://en.wikipedia.org/wiki/Internet_Archive)

> As of October 2012, its collection topped 10 petabytes.

I'd be curious what it's grown to since, but google didn't immediately tell me.

<comment><USER12> About 21-22 petabytes: [http://archiveteam.org/index.php?title=INTERNETARCHIVE.BAK](http://archiveteam.org/index.php?title=INTERNETARCHIVE.BAK)

</comment></comment></comment></comment></comment></comment><comment><USER13> One of the comments there brought up an interesting point:

 _Is this pure archival, meaning a onetime download and no uploads?_

Imagine a distributed, peer-to-peer style Internet Archive. That would be awesome. It reminds me of a decade ago, when the rapid rise of P2P file sharing (mostly torrents) made it possible to find literally _anything_ that existed and someone felt neighbourly enough to share. Multimedia, software, books, anything that was present in digital form. It was probably the closest we've ever been to a "global library", but too bad antipiracy groups/commercial interests/security focus mostly killed it off and replaced it with locked-down content silos...

<comment><USER14> Since it uses git-annex, it actually can fetch files in a P2P fashion, using Bittorrent: [http://git- annex.branchable.com/special_remotes/bittorrent/](http://git- annex.branchable.com/special_remotes/bittorrent/)

</comment></comment><comment><USER15> I had a crack at running this, and it was quite interesting. I'm certainly up for having some of my spare space for such a worthy cause.

I stopped, however, mostly due to the speed. I have an 80Mb connection but couldn't pull more than ~0.5-1Mb down. At that rate, even filling 500GB would take about two months. Perhaps this was due to the size of the files (downloading music).

For anyone looking to try it out, please do, and see what you get. One thing to be aware of is it asked for the amount of space to leave _free_ not how much to use, and got the size of my disk wrong by about a factor of 10 so I had to be a bit cautious about what I selected.

<comment><USER16> > One thing to be aware of is it asked for the amount of space to leave free > not how much to use, and got the size of my disk wrong by about a factor of > 10 so I had to be a bit cautious about what I selected.

Well, that's a deal-breaker for me.

I can easily dedicate, say, a terabyte or two to the project, but I can't do "Free space minus this number". I need predictability.

<comment><USER15> Perhaps I worded that poorly, it's asking for the amount of space to not use. As in, on a 3TB drive, leave me 2TB for my own purposes and it'll then use a max of 1TB. It's not based on how utilised the drive currently is.

My problem was it thought the drive was 16TB when in reality it was 2TB. That's a minor usability problem though, one I've been meaning to go and submit a PR for.

Edit - As I understand it anyway.

<comment><USER17> I'd be interested in that bug report!

</comment></comment></comment></comment><comment><USER18> Perhaps approaching this with LOCKSS (Lots Of Copies Keep Stuff Safe)[1] or a LOCKSS-like system would be a good idea.

[1] [http://www.lockss.org](http://www.lockss.org)

</comment><comment><USER19> "We've intentionally and _unintentionally_ punched clients in the gut"

Oh come now, you can't drop that in a blog post without elaboration. :) Share your pain!

</comment><comment><USER20> The Internet Archive will still archive your site even if you use their recommended robots.txt suggestions to have them not archive your site. I had several domains where I setup the robots.txt immediately as one of the first things on my sites. While I owned the sites and ran them with the robots.txt Archive.org would not show any archive of them. However once the sites went down/changed domains, etc, the archive of them is now on archive.org. So all they do is block you from seeing what is on the site as of now, not forever. So you'd have to own the domain infinitely to have it not archived by them.

</comment><comment><USER21> what exactly is the objective here? just making sure there's multiple copies of the internet archive?

Nifty stuff in any case

<comment><USER2> There's multiple bits of objectives here - education, research, practice, and awareness. As time goes on, it's obvious that distributed sharing of data is the only real vaccine against the inherent problems of the modern Internet, and learning more about different ways this might be done benefit all.

Plus it's nice to have some of this data scattered about the world.

<comment><USER22> In the sphere of research & practice, are there any long-term plans for distributed processing applied to the data, akin to the Common Crawl in AWS allowing one to run map-reduce jobs against it?

There is a long history of sandboxing the JVM, which means in theory it should be safe to bring the code to the data without running the risk of having your local machine p0wned.

</comment></comment></comment><comment><USER23> I'm curious about how archive.org feel about this. Presumably they are paying for the outgoing bandwidth.

<comment><USER24> This is being done by Jason Scott and the rest of the team that runs archive.org. Presumably they're ok with using their own bandwidth!

<comment><USER2> It's being overseen by Jason Scott (me) but I am not utilizing other employees of Internet Archive - they're quite busy enough as it is.</comment></comment></comment>


Show HN: DeviceReady: Test Your Android App Across 25+ Devices - <AUTHOR> http://www.deviceready.com/test-android-apps-on-multiple-devices/

<comment><USER2> The idea is wonderful. I you haven't built anything yet I feel a little deceived because the wording on the landing and invite page strongly suggests it's already there. I also don't like the fake quote at the bottom, take the quote marks off it if it's not real.

<comment><AUTHOR> Sorry about that. I wanted to test the concept as if the service exists right now.

</comment></comment><comment><USER3> What? Not worthy of a ShowHN, a landing page isn't enough. Would down vote if I could.

</comment><comment><AUTHOR> Note that this is just a landing page that I threw together using Unbounce. What do you guys think? Like Selenium + Browsershots for Android.

Everyone complains about Android fragmentation. Is this a partial solution? Kind of a "smoke test" to see if your app has issues on a particular device?

<comment><USER4> this company has been providing a similar service for 8 years:

<http://www.deviceanywhere.com/>

You can remotely use a real phone to test your app. They actually take apart the phone and connect switches to all the buttons while capturing the screen output.

<comment><USER5> Yeah what would this have over Device Anywhere, which also supports BlackBerry and Symbian plus additional carriers?</comment></comment></comment>


LMDB – Lightning Memory-Mapped Database Manager - <AUTHOR> http://www.lmdb.tech/doc/ <comment><USER2> I've used LMDB as a simpler alternative to SQLite as "an alternative to fopen". The goal was simply robust file writes in the face of unpredictable server reboots for a tiny Python program writing data to be processed later by a tiny C++ program.

That's harder than it sounds to roll by hand with fopen. SQLite with write ahead logging is pretty much as good as it gets for reliablity, but SQL at all was overkill for the task. LMDB is a close second and it's memory mapped key- value interface is much simpler. . Would write again.

[https://lwn.net/Articles/457667/](https://lwn.net/Articles/457667/)

<comment><USER3> LMDB is a storage engine whereas SQLite is a small database. There is even a version of SQLite that used LMDB as the underlying storage engine: [https://github.com/LMDB/sqlightning](https://github.com/LMDB/sqlightning).

</comment></comment><comment><USER4> I like LMDB, but why does ~most sql/nosql use LSM/rocksdb compared to it ? At least the ones going for read-speed ? Cause of missing WAL ?

There is also a fork? who claims is better/more-features than LMDB: [https://github.com/leo-yuriev/libmdbx](https://github.com/leo-yuriev/libmdbx)

<comment><USER5> To understand the tradeoffs between LSMs, B-Trees, and Fractal Trees, see the references in this previous post on TokuDB and Bε trees...

* BetrFS: An in-kernel file system that uses Bε trees to organize on-disk storage [https://news.ycombinator.com/item?id=18202935](https://news.ycombinator.com/item?id=18202935)

Memory model considerations and storage architecture design gets even more interesting now that NVMe has become a thing. For example, in addition to LMDB, how much more interesting have things become for Redis on NVMe?

* Caching Beyond RAM: The Case for NVMe [https://news.ycombinator.com/item?id=17315494](https://news.ycombinator.com/item?id=17315494)

* Intel Optane DC Persistent Memory is officially in Google Cloud [https://news.ycombinator.com/item?id=1834816](https://news.ycombinator.com/item?id=1834816)

And there are a few new forward-thinking DB architectures emerging on the scene, some that have been in the works for more than 10 years. Look at the work being done by the Berkeley RISELab team and the architecture behind Fluent DB.

* Ground: A Data Context Service (2017) [pdf] (berkeley.edu), [https://news.ycombinator.com/item?id=18415456](https://news.ycombinator.com/item?id=18415456)

What might have been conventional wisdom in the realm of DBs years ago will not be the best practices of today. Architectures have changed too much.

And this is not just true for storage, it's true for compute too. The availability of CPU/GPU/TPU accelerators in the data centers is driving a rethink in compute toward parallel algorithms in the form of Vector/Matrix/Tensor multiplication. The best way to store and index these arrays is something to consider too.

<comment><USER4> Can these be used for async filesystem access (AIO) that seastar framework does ? (i don't think so for now)

At least it doesn't support mmap so removes lmdb.

</comment></comment></comment><comment><USER6> LMDB is a very good choice for many well-known reasons. I don't need to expand here, the advantages are well documented, and more and more projects are choosing LMDB.

However LMDB does not solve all problems, and can be a bad choice for some, and I couldn't find this documented anywhere. Specifically write-intensive workload. Why?

\- LMDB by default provides full ACID semantics, which means that after every key-value write committed, it needs to sync to disk. Apparently if this happens tens of times per second, your system performance will suffer.

\- LMDB provides a super-fast asynchronous mode (`MDB_NOSYNC`), and this is the one most often benchmarked. Writes are super-fast with this. But a little known fact is that you lose all of ACID, meaning that a system crash can cause total loss of the database. Only use `MDB_NOSYNC` if your data is expendable.

In short, I would advise against LMDB if you are expecting to have more than a couple of independent writes per second. In this case, consider choosing a database that syncs to disk only occasionally, offering just ACI semantics (without Durability, which means that a system crash can cause loss of only the last seconds of data).

<comment><USER7> Your advice made sense in the age of rotating platter HDDs, limited to a max of ~120 IOPS. Today's world of NVMe SSDs makes your considerations obsolete.

<comment><USER8> There's an even older technology, battery backed RAM cached HDDs, that gives you everything an SSD can, except the thing you aren't actually using here, fast random-access read performance.

</comment></comment></comment><comment><USER9> Is there a design doc or talk about the internals?

In particular are there any good resources about the details of using memory mapping?

I know how to implement persistent data structures (and it seems like lmdb is just a persistent b+-tree). But I don't know how to make it persist to disk. Is it as simple as using a memory mapped file for all memory allocations? Can all data structures be turned into a "database" in this way? If your workload fits in memory is there any performance difference between in-memory data structures? When do writes actually flush? What happens if multiple processes use the same file? etc

<comment><USER5> See these two talks by 'hyc...

LMDB talk at DEVOXX (2013) [video] [https://youtu.be/Rx1-in-a1Xc](https://youtu.be/Rx1-in-a1Xc)

LMDB CMU Databaseology Lecture (2015) [video] [https://youtu.be/tEa5sAh- kVk](https://youtu.be/tEa5sAh-kVk)

</comment></comment><comment><USER10> > Data pages use a copy-on- write strategy so no active data pages are ever > overwritten, which also provides resistance to corruption and eliminates the > need of any special recovery procedures after a system crash.

But I imagine this is somewhat slower than keeping a log (and rewinding it if necessary)?

<comment><USER7> Don't imagine. Test and verify.

[http://lmdb.tech/bench/inmem/](http://lmdb.tech/bench/inmem/)

[http://lmdb.tech/bench/ondisk/](http://lmdb.tech/bench/ondisk/)

</comment></comment><comment><USER11> The web page seems to suggest that robust POSIX semaphores are Linux-specific, while they've been available in FreeBSD for quite some time. I wonder if they detect it properly, or is there some actual problem in FreeBSD's implementation?</comment>


Real life HAL 9000 meets Skynet: AI controlled video surveillance society - <AUTHOR> http://www.networkworld.com/community/blog/real-life-hal-9000-meets-skynet-ai-controlled-video-surveillance-society

<comment><USER2> This will never become very popular until they develop Hypocepts(TM) for "nice racks", "daisy dukes" and "mini-skirts".</comment>


We Stopped Arguing About Chores After Making One Spreadsheet - <AUTHOR> https://www.allencheng.com/we-stopped-arguing-about-chores-after-making-one-spreadsheet/ <comment><USER2> 1\. There are no chores or obligations only things someone wants to get done.

2\. If you want something done that you personally don't want to do at the moment you need to ask. Every time.

3\. Person asked has the right to refuse without any consequences or resentment. If person asked refuses to do it, you need to do it yourself or stop wanting it. If the person agrees and does what you wanted it's polite and effortless to thank for it. If person does something that's beneficial for you even though you didn't ask you should thank as well.

Those rules, even never openly stated, just distilled unilaterally by me resulted in happy domestic life of 14 years between two good persons. Those rules require no bookkeeping and promote positive interactions and instill sense of individual freedom. They are extremely flexible. They adapt easily to switching jobs, homes, schedules.

You don't regret how much you do around the house because it was either to satisfy your own wants or a direct result of specific request you freely chose to satisfy. You also don't resent that other people are doing so little because they do that either because you didn't ask them or they refuse many of your requests (in latter case, should you have that relationship?).

I believe it might be beneficial to apply those rules even to business relationships.

<comment><USER3> I think a factor in the success of your approach is that the two partners should have more or less the same idea of tidiness. If one has more tolerance than the other with say, seeing piles of clothes or plates accumulate, they don't feel as concerned.

<comment><USER2> That or just acceptance that their levels of tidiness differ and awareness that the tidier person will have to keep their environment tidier if he/she keeps wanting it because that's only for his/her benefit.

Trouble pretty much always stems from thinking that your standards and wants are or should be universal and ascribing them to other person.

</comment></comment></comment><comment><USER4> We stopped arguing with a few simple rules:

      Everybody has their own chores. Fixed. No confusion

      Say thanks! each time you see a chore done. Everybody likes to be noticed.

      See a chore undone? Do it. Its easier to do it, than to complain about it.  Corollary: Complaining about a chore, makes it your chore this time.

So we went from fighting about who's doing what, to giving each other the benefit of the doubt. Appreciating what everybody does. And sometimes doing a kindness for another person, just because. (And getting thanked for it!)

<comment><USER5> This wouldn't have worked in the shared appartment I lived in years ago. One person in particular seemed to not do his own share of washing dishes. So everyone else should do his dishes rather than complain? Seems a bit backwards.

<comment><USER4> So how did complaining work out?

Anyway, notice the part about everybody doing _different_ chores. They dislike dishes - work something out, they do something else.

</comment></comment></comment><comment><USER6> Whether it works or not depends on how much your relationship is built on systematic, empirical decisions. Spreadsheets like this are hugely common in larger communal living arrangements.

And there is a harsh quality to it, but I don't think the people knocking this strategy fully appreciate the danger of a relationship built on illusions or delusions. If you come to me saying "true love overcomes all" or somesuch I'd be seriously concerned about gaslighting or codependency taking hold.

</comment><comment><USER7> Chore assignment will become way easier after the divorce, towards which this guy is clearly heading...

<comment><USER8> Why do you suppose that is the case?

<comment><USER9> Unless both partners are thrilled with the idea of logging their chore completion timestamps on a spreadsheet (or weigh this against the cost of resentment one will feel of the other person, as the author suggests), I think it's going to lead to resentment.

It's like clocking in at work. Who the hell _wants_ to do that?

</comment></comment></comment><comment><USER10> OR this spreadsheet will only lead to nitpicking and grief...

I can't think of any high functioning relationship that uses one. The fact that people think they need one spells doom. It says, if only we had some kind technical solution to what is clearly an interpersonal problem.

<comment><USER11> Anectotal evidence but the only time I fought regularly about chores in a long term relationship, it only started in the fourth year of our common life and clearly was a proxy for more deep seated and complicated issues with the relationship.

I will hazard than most of the time when people really fight about chores, the actual problem lies somewhere else.

</comment></comment><comment><USER12> You can also make an Agile team and assign chores in sprints. You can install Jira to help keeping track.

Or you can just discuss and do them when needed.

</comment><comment><USER13> This spreadsheet looks like a chore.

Open communication and mutual assistance is way better than some sort of favor debt economy.

<comment><USER14> When my spouse asks me to do something as a favor, I do it, then tell her it's done and then tell her she doesn't owe me a favor because I love her.

</comment></comment><comment><USER15> Over several marriages, I've developed this strategy: I do _all_ of the chores.

In short order, a decent partner will start taking over a reasonable share.

If that doesn't happen, it's an excellent indicator of deeper problems that will ultimately sink the relationship. Leave.

</comment><comment><USER12> I wonder if there aren't chore counseling and consulting businesses.

<comment><USER14> I outsource chores.

<comment><USER9> You can't outsource chores right now (or shouldn't be able to) unless you have a live-in maid with you.

</comment></comment></comment><comment><USER16> ... do you both work fulltime jobs?

... is exterior/yard work in the sheet?

</comment><comment><USER9> TL;DR create a complex agile-esque process for doing chores with timestamps instead of just setting a calendar reminder or doing it ad-hoc.</comment>


Show HN: Android Autowire - <AUTHOR> https://github.com/CardinalNow/AndroidAutowire

<comment><USER2> Nice idea, but do I read this correctly that this only replaces Activity#findViewById, and does not work with Fragment#findViewById or View#findViewById?

Since Fragments where introduced in API 11, it is very uncommon to call findViewById directly on an Activity.</comment>


Ask HN: Startups Focused on Accounting Automation? - <AUTHOR> Looked through https://www.ycdb.co/ and did the ol' Google searching, nothing stands out. Researching if there's an accounting equivalent of http://superhuman.com but geared towards CFOs to replace the function of staff like Controllers and finance analysts in an accounting department (performing budgeting, forecasting, preaudit work, etc). <comment><USER2> You want finance software not accounting. Even then, I don't know how software is going to budget for you without you entering in all the estimates expenses and coordinating GLs.

<comment><AUTHOR> Thanks for this! I've started reaching out to controllers, financial analysts, and CFOs to get a better understanding how what each role entails, data sources, etc so I can start building an MVP.

</comment></comment><comment><USER3> there is Avalara for automates state-taxes reporting</comment>


Cloudflare was down - <AUTHOR> https://twitter.com/search?f=realtime&q=cloudflare&a=1

<comment><USER2> That explains it -- a great many sites have been returning 504s, for me.</comment>


Ask HN: Why not Wordpress? The case for Web frameworks like Django. - <AUTHOR>

A friend works for a large magazine with highly trafficked website. They're looking to re-develop their site and have someone on staff who handles their micro-sites, which are mostly very small static or Wordpress projects. I'm a Django developer, and mentioned I thought Django would be the most natural fit amongst web frameworks for their transition away from their aging perl-based publishing system.

However, he mentioned they are leaning towards Wordpress simply because of familiarity with the "brand". The site is fairly complex, but could probably be done with Wordpress. I won't be working on this project, but I think it would be a shame for this to happen.  Because I'm totally biased and hate making things in WP.

So, to better prepare my case, I thought I'd ask HN to see if anyone had any opinions as to the advantages of using web-frameworks like Django over Wordpress for a web publishing project.
 <comment><USER2> _I think it would be a shame for this to happen. Because I'm totally biased and hate making things in WP_

You shouldn't let your bias affect their decision to choose something that's right for them. If they don't have any Python/Django developers on staff, it could be tricky to maintain a site developed on that platform. Since they have a few sites on WordPress already and have a staff member who is familiar with WordPress, that may be the best route for them. They'll have an easy time customizing the site with plugins with WordPress. I'm not sure if that would also be the case with Django.

<comment><AUTHOR> Also, from my understanding it's unlikely they'll bring development in-house, at least not in the next few years.

<comment><USER2> Whether they bring development in-house or hire out contractors, it will be cheaper and easier to find WordPress or PHP devs than Python/Django ones. For even light modifications, they won't even have to touch code in WordPress...there is likely already a plugin for it. This exact debate took place at my company (before I got here), and WordPress lost. That is the reason I work here...it takes 3 fulltime developers to support the platform they chose (an obscure CMS and a frontend built with Zend). Of course it is more powerful than WordPress, but more expensive and temperamental at the same time.

<comment><AUTHOR> Right, but programming something in Django is much different then using some obscure php CMS. Django development is incredibly fast, and is more likely to attract good developers. We are also in a very large metropolitan area, with a substantial Python and Ruby communities. I was almost going to suggest the try Expression Engine or something. I just can't see relying on a variety of Wordpress plugins to make the site being a good idea. Especially if they're considering doing any custom work.

I mean Drupal and PressFlow would probably be an even better decision going the PHP route.

</comment></comment></comment></comment><comment><USER3> Got PHP developers? Why not an MVC framework in PHP. Using Wordpress for anything but a blog is a disaster.

<comment><AUTHOR> I guess I'm looking for concrete reasons as to why "Using Wordpress for anything but a blog is a disaster."</comment></comment>


Turning Arabian Desert air into bottled water - <AUTHOR> https://www.bloomberg.com/news/articles/2020-07-13/a-u-s-tech-firm-s-turning-arabian-desert-air-into-bottled-water <comment><USER2> Speaking of water and desert, I have an interesting anecdote to recount.

My wife's grandfather, Ugo, an Italian army officer and engineer, served in Ethiopia and then during WWII as part of the "genio" (logistics) unit.

At some point during the war he was stationed in the desert (I think Libya), where the Italian army was supposed to either attack or mount resistance against the British troops. Well, the Germans had to somehow take over control, because the Italians were poorly organized and managed.

One day Erwin Rommel [0], "the desert fox", shows up at the camp. Consider that this was a camp in the middle of the desert, defended by the Italian garrison and probably some german troops too, with no refrigerators for food, etc.

He examines the place and the troops, and then the Italian commander offers him water to drink. To Rommel's surprise, the water was icy cold. He couldn't believe it. The commander introduces him to Ugo, who then proceeds to show to Rommel how he ingeniously created a system to cool water by using water evaporation in metal bins, and the power of the hot desert sun.

Ugo was impressed by the encounter, shared it with his son, who then shared it with my wife and then with me.

I thought this story was worth sharing.

[0]: [https://en.wikipedia.org/wiki/Erwin_Rommel](https://en.wikipedia.org/wiki/Erwin_Rommel)

<comment><USER3> [https://en.wikipedia.org/wiki/Evaporative_cooler#Application...](https://en.wikipedia.org/wiki/Evaporative_cooler#Applications)

The persian qanat/windcatcher architecture would be easy to spot well after the fact, but although we do know the spaniards in Alta California would hang woven bags in their courtyards to promote evaporative water cooling, because textiles decompose so quickly we wouldn't have known if all we had were their ruins.

[https://www.moonrandolphhomestead.org/homestead- journals/201...](https://www.moonrandolphhomestead.org/homestead- journals/2018/7/16/the-desert-water-bag) is an example of something which my great grandmother had told me about, but I've never seen in practice.

(one of these days I hope I may put into practice the knowledge about how to safely crank-start an automobile.)

<comment><USER4> And then there's this from Australia:

[https://en.wikipedia.org/wiki/Coolgardie_safe](https://en.wikipedia.org/wiki/Coolgardie_safe)

</comment></comment></comment><comment><USER5> If they really want to give people the experience of drinking water in the Desert they should do what the Army did and sit pallets of water bottles in the sun so all the Soldiers could get a nice, plastic-flavored, scalding hot drink of bottled carcinogens.

<comment><USER6> I imagine that the risk of death from enemy fire was a bit higher up on their 'what will kill me' priority list.

<comment><USER5> It was Kuwait so there was no enemy fire. Actually, for most of the conflicts in US history there were more casualties due to illnesses and other health issues than enemy fire. IIRC the Gulf War might have been the first time that wasn't the case. I just think heated plastics causing cancer was just something they hadn't caught up with.

<comment> blaser-waffle Napoleon was generally thought of as the first time were violent casualties exceeded non-violent ones. At least until his march to Russia.

In the US the Civil War in the 1860s was when violent casualties tended to exceed medical ones. Even then, disease was a big deal, even up to WW2 where malaria was a huge problem in the Pacific Theater.

</comment></comment></comment></comment><comment><USER7> There's no way this is cheaper than just shipping water from other parts of the world.

I don't even believe that "comparable to Fiji price"

<comment><USER8> They even admit in the article it's less efficient than desalinization, which is itself hard to make efficient.

</comment></comment><comment><AUTHOR> If interested, this is the company's website: [https://www.zeromasswater.com/rexi/source/](https://www.zeromasswater.com/rexi/source/)

And this provides funding info: [https://www.bizjournals.com/phoenix/news/2020/06/23/zero- mas...](https://www.bizjournals.com/phoenix/news/2020/06/23/zero-mass-water- company-gets-50m-in-funding.html)

</comment><comment><USER9> This reminds me of the Fontus bike water bottle (that didn't end well) [https://www.indiegogo.com/projects/fontus-the-self- filling-w...](https://www.indiegogo.com/projects/fontus-the-self-filling- water-bottles#/)

Whilst it doesn't seem very cost effective - I imagine it's quite a good marketing gimmick for 'eco' bottled water?

</comment><comment><USER10> There are similar products that generate water as a byproduct of airconditioning (which is a must in a desert climate). I know some guys that are selling these in the Middle East and mining operations in the Aus outback.

[https://seas-sa.com/awa-modula-systems/](https://seas-sa.com/awa-modula- systems/)

</comment><comment><USER11> Every time anyone tries to sell you something that pulls water from air, dismiss it offhand. It's a scam. Often by a startup with zero math skills. It's scientifically impossible to do without massive amounts of energy, and never worth it.

</comment><comment><USER12> Atmospheric condensers? Kataan would be proud.

<comment><USER13> Probably one of the best TNG episodes.

</comment></comment><comment><USER14> Hugely inefficient and expensive, but if the energy used is renewable I guess there's no downside. Certainly seems to be more environmentally friendly than desalination which disrupts sea life in coastal waters.

<comment><USER15> There's still externalities to be considered, even if the energy is renewable. But even accounting for that, I don't see why something like this would be preferable to just desalinating ocean water and transporting it via some method.

Unless I'm missing something with the energy needed to pull the water out of the air, or they've made a huge leap in miniaturizing the tech... this whole idea is a non-starter IMO.

<comment><USER16> Desalination has the additional problem that you need to dispose of all that salt somehow. You can't easily dump it back into the ocean without risking the local ecosystem. It needs to be diluted over a fairly large area. That adds some cost.

But it seems like this is more of a novelty and targets rich people, like bottled glacier water.

</comment></comment></comment><comment><USER17> Totally feels like the Dune's Fremens!

</comment><comment><USER18> Oh no. _facepalm_ Another: What are the laws of thermodynamics... Every couple of years people will fall for this particular scam. Listen, you can never ever do this in any way that is even close to efficient, especially in arid regions, because physics.

</comment><comment><USER19> This will make a nice thunderf00t video, unless he got tired of debunking these projects

</comment><comment><USER20> It seems to me that Boy Scout Manual told one how to make a "solar still" to condense water from the air. But it has been a while since I had a copy.

</comment><comment><USER21> [https://www.youtube.com/watch?v=vc7WqVMCABg](https://www.youtube.com/watch?v=vc7WqVMCABg)

Unrealistic scam.

</comment><comment><USER21> Another unrealistic project.

</comment><comment><USER22> LOL, these guys do not know about thunderf00t!

</comment><comment><USER23> This is not possible.

But what would be interesting is if scientists actually watched what happens.

They have done this with cults around the 'end of the world' type scenarios.

How the cult leaders and followers react when the impossible doesn't happen can be psychologically useful to know.

I haven't read this book so don't recommend it, but I think it's cool it exists - [https://www.amazon.com/When-Prophecy-Fails-Leon- Festinger/dp...](https://www.amazon.com/When-Prophecy-Fails-Leon- Festinger/dp/1614272905)</comment>


Vue Intro - <AUTHOR> https://github.com/mjhea0/vue-intro <comment><USER2> lost my attention at

        <button @click="click">Click</button>

Yay!

Nay!

<comment><AUTHOR> were you coding along? or just reading?

<comment><USER2> logic doesn't belong in markup.

<comment><AUTHOR> if that's your stance then i'd steer away from soa</comment></comment></comment></comment>


Bullies have highest self esteem, social status, lowest depression - <AUTHOR> http://news.nationalpost.com/health/provocative-new-study-finds-bullies-have-highest-self-esteem-social-status-lowest-rates-of-depression

<comment><AUTHOR> This story struck me as relevant to HN because I so often see managers who seem to belong to this "successful bully" class. They leverage their natural instincts for microaggressions, superior attitude, etc., to gain social status and climb the corporate ladder, although this is less pronounced in the nerd- dominated world of tech.

</comment><comment><USER2> Bullying seems to work pretty well. Look at the ex-mozilla and Reddit CEO. They were both bullied until they were forced to 'resign'.

But it seems, we want to talk about how bad bullying is when it comes to being gay or transgender, but when it comes to Christians, Republicans, or anyone that has a differing view in many political views (climate change, drug laws), bullying is accepted. Even here on HN.

It's why I can't really take any campaign against bullying seriously. I just don't care anymore.</comment>


Everything a Hacker Needs to Know about Getting Busted by the Feds (1997) - <AUTHOR> http://web.textfiles.com/hacking/agentsteal.txt

<comment><USER2> Interesting excerpt: "They may decide to, for insurance purposes, blame some huge downtime expense on you. I can hear it now, "When we detected the intruder, we promptly took our system off-line. It took us two weeks to bring it up again for a loss in wasted manpower of $2 million." In some cases you might be better off just using the company's payroll system to cut you a couple of $10,000 checks. That way the government has a firm loss figure."

How insane.

<comment><USER3> I used to think the exact same thing. It looks insane from the outside. But when you cause a real incident at a large company, a good chunk of those loss numbers are easily traceable. $2MM on manpower alone is spectacularly high, but remember that a fully-loaded headcount/week could easily range from $3000-$4000. A company with thousands of servers will lose far more than 2 weeks in forensics work after a genuine breakin.

We're talking about companies with cash flows in the tens/hundreds of millions of dollars per day. It doesn't seem real to the kind of people who break into computers in the same way, say, a nuclear reactor does. But it's real.

<comment><USER2> I absolutely agree with you, I can imagine the time I'd spend digging around on my own little VPS after a break-in... I really meant "How insane are the rules for sentencing based on arbitrary $$$ values."

<comment><USER3> The process as a whole would be sane if there was messaging, education, and reliable enforcement. As it stands, it's really just an inverse lottery that you don't find out about until you lose/win.

</comment></comment></comment></comment><comment><USER4> I love reading about the old school hackers, It amazing what you can do with a whistle for example - <https://secure.wikimedia.org/wikipedia/en/wiki/John_Draper>

Too bad the who wrote this article is no longer with us - [https://secure.wikimedia.org/wikipedia/en/wiki/Justin_Tanner...](https://secure.wikimedia.org/wikipedia/en/wiki/Justin_Tanner_Petersen).

In any case my gut feeling is that if you get into trouble - get a real lawyer. Using this or any legal advice you get online might actually make your situation worse.

<comment><USER5> Justin Peterson (the author) was an FBI informant who helped put Kevin Mitnick and Kevin Poulson in jail. I believe he escaped a large portion of his jail time by selling out friends.

</comment></comment><comment><USER6> The latest Phrack also had this article, 'How to make it in Prison'

[http://phrack.com/issues.html?issue=67&id=5#article](http://phrack.com/issues.html?issue=67&id=5#article)

</comment><comment><USER7> Any advice on what a hacker needs to know about getting busted by the swedes?

<comment><USER8> "No means no".

<comment><USER9> Let's all jump on the character assassination bandwagon!

What I've read so far is that "No" means "condom failure" or how dare you not call me back: [http://takimag.com/article/julian_assanges_honey_trap_thats_...](http://takimag.com/article/julian_assanges_honey_trap_thats_rape_in_sweden/print)

<comment><USER10> Here is what the swedes have to say:

[http://www.google.com/hostednews/ukpress/article/ALeqM5iLBCk...](http://www.google.com/hostednews/ukpress/article/ALeqM5iLBCkkC5l0NVV0gEYkAA04x83Wrg?docId=B32488671291733403A00)</comment></comment></comment></comment>


The Empty Nest - <AUTHOR> http://www.foundersatwork.com/1/post/2007/09/the-empty-nest.html

<comment><USER2> I'm sad that the summer is over too. I'll miss the Tuesday dinners quite a bit. I obviously don't have much time to dwell on it, and I'm excited about the future, but I'll always look back fondly on the Y C experience. The atmosphere there was something I'm pretty sure I'll never encounter anywhere else.

I'll probably drop by the dinners in Mountain View so frequently that half of the new founders will think I'm in their batch.

<comment><USER3> I've already worked in free Tues. meals as part of future budgeting.

<comment><USER2> Doesn't it cost you way more than the cost of a meal to get there from the Y Scraper?

</comment></comment></comment><comment><AUTHOR> After a bit of thought: this seems pessimistic.

When you say goodbye to someone with the expectation that you'll never see them in the same way, it's sad. Parents will never have their kids back when the kids go off to college. They'll trade the kids in for adults. The empty nest feels empty in part because parents know it will never again be filled with children.

But business isn't like that. People that fail can and should continue to go off and try to do other great things. It's cyclic.

Even if all the companies in the current batch die, all the founders can continue to go and do good things.

They might be a bit less wide-eyed and optimistic, but that is probably a good thing. You only really die off when you stop working.

The mathematician Paul Erdos took this a bit too literally, and would lament the death of colleagues who retired. He also called children epsilons.</comment>


Round manhole covers, or if Feynman applied for a job at Microsoft - <AUTHOR> http://www.sellsbrothers.com/fun/msiview/#Feynman <comment><USER2> One would actually think round manhole covers have several disadvantages to offset their one purported strength. For example, it would be more difficult to attach a hinge or locking mechanism. Also, the grip hole would not be guaranteed to be in the same alignment every time - if you were using a machine to raise the cover, you might have to manouevre the machine into incovenient angles to properly access the grip, according to the whim of the previous team who replaced the cover. With a square lid, the alignment could be standardised to the most convenient position for machine access. Also, assuming the bars in the ladder are straight, which AFAIK they always are, placing a ladder in a round hole wastes space.

Feynmann's answer about the cylinder being the strongest structure against compression is true but one wouldn't expect this to be a critical factor at typical street-access depths. Maybe if you were going down 50m or more, but even so, dirt is hardly as effective at exerting pressure as a free-to-move liquid.

<comment><USER3> >Also, the grip hole would not be guaranteed to be in the same alignment every time

it is if it's in the center.

<comment><USER4> It is easier to replace a circular cover, since you don't have to worry about it's orientation. I suspect that this is the main reason to use a circular manhole cover over some other shape.

</comment></comment></comment><comment><USER5> I was asked this once during an interview. After I gave several lengthy possible explanations, the interviewer was basically speechless.

The previous question was much more interesting. I was asked to estimate the number of piano tuners there were in my city. I got it right, and it turns out it was one of the the class Fermi questions

[http://mathforum.org/workshops/sum96/interdisc/classicfermi....](http://mathforum.org/workshops/sum96/interdisc/classicfermi.html)

Still, I'm not really a fan of these types of questions. Chances are any curious person who spends a lot of time on the net would have come across them some time or another.

</comment><comment><USER6> That doesn't sound anything like Feynman.

<comment><USER7> I _have_ seen man hole covers that _were_ in the shape of other curves of constant width!! as in the rotary engine shape he describes. Reminds me of the convex solids class I took at UCLA years ago.

Boy, I always wanted to say that! If only _I_ could pull one of those interviews.

<comment><USER8> Where did you see those manhole covers? Its seems a bit over-the-top to manufacture a manhole cover in a weird shape when round or rectangular will do.

</comment></comment></comment><comment><USER9> blogspam: original is here:

<http://www.sellsbrothers.com/fun/msiview/#Feynman>

</comment><comment><USER10> This reminds me about the story where Feynman is being interviewed by a psychologist. He answers each question in a way that is both perfectly reasonable yet would cause the psychologist to become increasingly concerned.

<comment><USER11> That story was in "Surely you are Joking Mr. Feynman".

<comment><USER10> Thanks. I was looking for a "search in book"-type link but couldn't find it. There are some excerpts on e2 that I found, but not of the passage that I was thinking of.

</comment></comment></comment><comment><USER12> For what it's worth, I'm interning at Microsoft this summer, and none of my interviewers (6 or so) asked questions like this. Most of the questions had to do with arrays of integers, with one linked list question and 1-2 C string questions.

</comment><comment><USER13> The only thing worse than this is the trivia questions:

Q: "When using function x does it pull from the thread pool or create a new thread"

A: Don't care, will google

<comment><USER14> This isn't trivia. Creating a new thread is expensive; so understanding the difference can make a huge difference in performance.

Saying "I can google this if I need to" is a cop-out: Yes, you can google if _if you realize that it matters_ , but if you don't know the answer you're probably not going to realize that it matters.

<comment><USER15> I see what you're saying, but in practice I see no correlation between people with great recall of arcane functions and syntax and _good developers_.

And the question wasn't, "What's the difference between pulling a thread from the pool and spinning up a new one?" That's a pretty good question, if you're going to be doing programming with threads.

<comment><USER16> I don't have any meaningful statistics on this myself, but I always found this passage from The Jargon File interesting:

 _Another trait is probably even more important: the ability to mentally absorb, retain, and reference large amounts of 'meaningless' detail, trusting to later experience to give it context and meaning. A person of merely average analytical intelligence who has this trait can become an effective hacker, but a creative genius who lacks it will swiftly find himself outdistanced by people who routinely upload the contents of thick reference manuals into their brains._

<comment><USER17> The cost of someone trying to upload huge quantities of trivia is a failure to update when systems change. Consider the cost of creating and maintaining high quality comments vs readable code.

</comment></comment></comment></comment></comment><comment><USER18> I suspect that Feynman wouldn't have limited himself to two dimensions and would have noted what the presence of the lip means.

</comment><comment><USER19> Feynman would have more fun with this question.

</comment><comment><USER20> And there's a subtle joke at the end - that he's given a MARKETING position rather than a programming one!

</comment><comment><USER21> This was the test page when they turned the internet on for the first time.

<comment><USER22> You are my new hero.

<comment><USER21> Actually, that joke is extremely old too.

<comment><USER22> I searched for it and didn't find it. But, OK. You're not my hero anymore.

(wow, tough room).

</comment></comment></comment></comment><comment><USER23> he definitely would be a microserf then</comment>


Overstock CEO Takes Aim at 'Deep State' After Romance with Russian Agent - <AUTHOR> https://www.nytimes.com/2019/08/15/business/overstock-paul-byrne-maria-butina-affair.html <comment><USER2> Big huh? At the end of the article since there really wasn't a conclusion.

I agree with one of the article commenters - NYT writing about this minor inconsequential story since they are also complicit with the deep state.</comment>


Forgot your Windows 98 password? No problem - <AUTHOR> http://imgur.com/fqjnK <comment><USER2> Was this login screen ever intended to be a security barrier? This bypass method doesn't give you access to the network resources after all, and Windows 9x never had any kind of local security in the first place...

</comment><comment><USER3> …or, if I recall correctly, you could just press _Esc_.

<comment><USER4> Only of the computer doesn't belong to a domain, otherwise you would get an error, as in the OP when he clicked "Cancel".

</comment></comment><comment><USER5> Wow, blast from the past. Reminds me of how we "outsmarted" our admins at the school back then to get around the limitations they put up.

OLE[1] and MS Office were very valuable allies back then ;)

[1] [http://en.wikipedia.org/wiki/Object_Linking_and_Embedding](http://en.wikipedia.org/wiki/Object_Linking_and_Embedding)

<comment><USER6> more is less

</comment></comment><comment><USER7> Was this zero day exploit released under Google's automatic 5,840 day disclosure rule?

</comment><comment><USER8> This brings back memories of installing DOOM into the printer spool folder because it was the one place on the hard drive that anybody could write to. Also stole an admin password or two back in high school because keyloggers, which weren't even installed with local admin privileges, were perfectly capable of logging keystrokes heading for the login prompt.

At least we've moved beyond this level of naivety these days.

<comment><USER9> Old days war story. In the early 90s we had a computer center (we still do) here where we could all use computers if we were with an academic or school institution. This was a few years before web, around 1992. I think.

This primarily consisted of a single SPARCstation with SunOS 4.x. and a bunch of VT320 terminals (and a few IBM ones). I was in grade school, there were high schoolers here and there and mostly people in college using systems for primarily IRC and gopher.

I was learning C at the time and heavily into graphics programming so I wanted to use as much system resources as possible - which of there weren't many. So I had this cunning plan where I wrote a simple (I was grade school) C program that basically malloced as much memory in a loop as it could get and kept it. I figured that there was no quota for memory as there were for hard disk space. I ran the program I wrote into background (&) to get the process id and waited.

Program ate all the available memory and, presumably, started trashing the swap until all of the running processes were extremely slow and/or unresponsive. I watched as people around the room started to close their programs (IRC, gopher mostly) and gave up on using the system. As soon as most of them were gone, I killed the program with pid I had before. It was so effective even things like ls wouldn't work, only kill. I know it was a dick move, but I was a kid and even kind of proud of what I did back then.

</comment></comment><comment><USER10> Windows 9x just stored your password in a pwl file. All you had to do to "hack" into an account was rename this file and it would accept any new password. Of course Windows 9x had no file system security and this hack didn't give you any network resource access but you could brute force the pwl file if you really wanted too. Although it did require quite a bit of CPU for the time obviously.

</comment><comment><USER11> Fortunately, Windows Me fixed all those issues.

<comment><USER12> Unfortunately, it also broke everything else. :)

</comment></comment><comment><USER13> Reminds me of how we had Windows 98 computers at school which required an administrator password to access the internet, else the system was limited to a few applications. We managed by opening a text editor or Word or whatever, file -> open, right-click a file, Explore which gave you access to the file system. Typing in an URL in the address bar changed windows explorer to internet explorer (a feature which MS later had to pay a fine and a browser selection window for), and huzzah, internets!

</comment><comment><USER14> Win7 bypass is fairly similar with the change of utilman to cmd.

</comment><comment><USER15> Jesus.

Just how incompetent were the people behind this OS?</comment>


Untangling The Linux Graphics Stack - <AUTHOR> http://www.carbon-project.org/Untangling_the_Linux_graphics_stack.html

<comment><USER2> When I was 16, I wrote an essay on quantum physics for my Dutch class. It was 10 pages long and then I discovered the instructions were to write a 2 page essay. Desperate not to lose any of the interesting stuff, I took every 10 sentence paragraph and condensed as many of them as I could into single sentences. I kept all the equations, but none of the context. Strictly speaking, none of the information was lost, but the essay became completely incomprehensible, even when adjusting for the expectations one might have for an essay on quantum physics by a 16 year old. Needless to say, I was rather shocked when I got a failing grade.

This article reminds me a little of that essay. As a Linux _user_ , which the first sentence implies is the target audience, this article helps me understand exactly nothing.

P.S. For your own sanity, never read back anything you wrote as a teenager. Dear lord.

</comment><comment><USER3> That probably would have made sense to me if I already knew how the Linux Graphics Stack worked...

</comment><comment><USER4> This is incredibly helpful even if incomplete. Finally somebody took time to write a decent exposure. Now, if only there were something like that about keyboard (geometry, modifiers, layouts, media keys, dead keys, compositing, input methods, capture priorities) and sound.

</comment><comment><USER5> I actually had a pretty decent idea of the userspace graphics stack going into this, and I still understood very little of this article.. It seems to be more of a bunch of notes rather than anything that's supposed to be helpful to someone.

</comment><comment><USER6> Hmm... this is a very basic overview. For e.g. it doesn't explain what Gallium3D actually is and also, how do proprietary (nvidia/fglrx) driver come into this picture.

Does anyone here know more details?

<comment><USER7> nvidia and fglrx have a string of binary blobs that plug in to each spot on the stack: kernel, X server, GLX. The way they communicate with each other is pretty proprietary and beyond what I know.

Gallium is an interface for doing 3D stuff. It's very generalized and describes a very general, shaderful, batched renderer. "Shaderful" means that the renderer has shaders instead of old-school fixed-function TCL and pixel combiners; "batched" means that the renderer prefers to operate on pre-cooked buffers full of data rather than vertex-at-a-time data.

Gallium matters because it is a much more direct and low-level interface for describing hardware which enables hardware-specific optimizations to be decoupled from API-level logic. We have implemented GL, D3D (not open- source!), VG, X11 (EXA, Xv, XvMC, VDPAU), etc. on top of Gallium, without having to write entirely new backends each time. It makes it easier to write drivers. Gallium's actual interface is also less verbose than user-level APIs, which means the actual drivers are smaller by anywhere from 30-50% LOCs.

</comment></comment><comment><USER7> To perhaps supplement the acronyms somewhat...

There are two basic parts to graphics drivers: kernel and userspace. All policy is in userspace; for graphics, this means things like rendering APIs (Cairo, GTK, X11, GL, VG). The kernel part manages the card's low-level state, handling its memory, outputs, onboard audio, power states, and so forth, but doesn't actually control how the card renders things.

The big complexity is how many different userspace clients there are that can ask the graphics card to render something fancy for them. In the X11 world, there's the internal X11 driver, which speaks EXA and uses the card to draw the general desktop, but there's also GLX, which goes through Mesa to get GL commands translated into commands for the specific graphics card. On top of those, there's special drivers for video, with four (!!) different APIs: Xvideo, Xvideo MC, VDPAU, VAAPI, and those each require helper code. VDPAU and VAAPI each require external helper libraries too.

Still with me? Awesome. Your toolkits also have graphics stuff, although they usually target an intermediate API rather than a specific card. These include Cairo, GTK, Qt, Wx, Pango, and so forth. Usually these toolkits speak the neutral X11 protocol, but they might decide to speak GL if they think it can make things go faster.</comment>


CrossTwine linker, ruby, python :several fold speedup possible - <AUTHOR> http://crosstwine.com/index.html

<comment><USER2> <http://news.ycombinator.com/item?id=589677>

Apparently, that thread has comments from crosstwine developer.</comment>


How Reddit ranking algorithms work - <AUTHOR> http://amix.dk/blog/post/19588

<comment><USER2> One of the problems with Reddit in my experience is the spam filter. What happens is in the bigger subreddits (say, /r/pics or /r/funny) is that there seem to be people around who downvote stuff regardless of content, presumably to give their own posts a better chance. When your submissions consistently end up with -1 or -2 scores, the spam filter then decides that you are a spammer and you should be punished. Except in this case it's not for submitting spam, but because other people want their own submissions to have more visibility.

(As an aside, I obviously wouldn't be complaining about this if I had actually tried to spam reddit, my few submissions to date match the typical fare there)

Once the spam filter 'hates' you (as they put it) then subsequent submissions are 'ghosted' in the sense that you see them, but they don't appear in the /new section of the subreddit. Assuming you get wind of this (no downvotes, no comments, nothing) then you get to message the moderators, who may or may not respond in good time and restore your submission. By that time your obvious reaction is to delete and re-submit (because by now the post has drifted down the submission sort order), which apparently makes the spam filter hate you even more.

The problem I have with this is that by no fault of my own I ended up submitting things that were flagged as spam and hidden from view without any indication to me. You can see your posts, but no one else can. This might be a clever solution to deal with systemic spammers, but it's really annoying to normal users like me.

Karma games are fun and internet drama is lame of course; I don't lose sleep over this. But it's unfair to people who want to share something with the community. Of course you see reposts of lame memes that hit the front page and wonder why the picture of your cute hedgehog submitted in good faith ends up in the spam void.

There's supposed to be a user flag that tells the filter you're an approved submitter for a given subreddit; good luck getting that, I guess. So ultimately this makes me not want to submit anything. Right now reddit might not care about that because it has such a large user base, but I would remind them that Slashdot and Digg also thought they were invincible once.

<comment><USER3> Yeah, I think users should have a limited amount of downvote power to spread around, and that each successive downvote diminishes the power of all their previous downvotes in determining spamminess.

Ghosting really, really sucks for legitimate users. Craigslist does the same thing, and normal people are devastated when they realize they've been judged/victimized by a computer somewhere with no appeal.

<comment><USER4> I like the Stack Overflow system of downvoting

      Downvotes remove 2 reputation from the post owner.
      Downvotes on answers remove 1 reputation from you, the voter.
      Downvotes on questions are free.
      You can vote 30 times per UTC day. You get an additional 10 votes on questions only.

On Reddit, people just tend to downvote when they don't agree with something. That's really it. The only times that I've downvoted posts have been when it's a repost from recent, and on comments I only downvote if it's something that's hateful or doesn't contribute to discussion.

</comment></comment></comment><comment><USER5> One thing I wish was different about the way Reddit's algo worked is the way it treats downvotes. Basically, if I am average Joe redditor, there are two potential reasons for a downvote:

1) The post is something I personally disagree with.

2) The post was written by a moron (for various definitions of the word moron).

What I wish is that someone (smarter than myself) could come up with a way to reliably determine the motive behind a downvote. I know that's no simple task. But I actually want posts that are slightly more controversial to rank higher than posts which don't generate a lot of downvotes, simply because I'm more interested in reading something thought-provoking than checking out the latest batch of meme-gen.

Basically I want comment rankings to look like this:

a) Lots of downvotes, few upvotes == total asshole. Maybe racist, maybe a general troll, but I want this ranked at the rock bottom.

b) An equal number of upvotes vs. downvotes == flamebait. I'm not interested in the latest holy wars, so we call this the next lowest in rankings.

c) Lots of upvotes, few downvotes == uninteresting. Rank it lower.

d) The ratio upvotes/downvotes is greater than 1, but less than some finite number N. These are the stories I want to read.

I want a ranking system that works something like the above, albeit with more finesse (e.g. perhaps we swap the ranking position of b and c). I'm just not interested in the latest round of adorable kitten pictures, and on HN, too much emphasis on the sheer number of upvotes manifests as groupthink. Also, I want the downvotes that are received by slightly controversial stories/comments (again, slightly controversial as opposed to PC-vs-Mac style flamebait) to have a smaller effect on the poster's karma, so that people will feel free to express disagreement on sites like reddit and HN.

<comment><USER6> Seeking controversial postings makes sense.

But why do you downvote controversial stuff then? Why not give upvote for interesting postings and downvote for boring postings?

<comment><USER5> I, personally, don't downvote as a way to express disagreement. The average redditor does. I wish it was reasonable to expect that the entire reddit community uses downvotes only in a way I consider appropriate, but I don't think it is.

<comment><USER6> I think every voter should get their own list of sorted stories and comments. That list should form based on voter's upvotes and downvotes. Then readers would quickly stop seeing postings they are likely to downvote and see more postings that they are likely to upvote. Pretty soon people who express their interest in controversy - would get controversial stories on top of their list and people who express their interest in groupthink - would get lots of stories re-confirming their groupthink.

</comment></comment></comment></comment><comment><USER7> Did not expect this post from 2010 to hit HN... Happy to see that my content is still useful :)

To add something new to the discussion I think HN should use Reddit's comment sorting algorithm (the confidence sort). It produces way better results than the current algorithm since it will rank the best comments highest regardless of their submission time. Would probably produces an even better comment section here on HN.

<comment><USER8> Can't find a reference for this at the moment, but I think PG has since modified the HN ranking code a bit to put interesting stuff at the top. (This is since his last arc dump, so I don't know exactly what it is.)

Also, I think the situation on HN is quite different from reddit because vote totals aren't shown here anymore. It's not clear that you necessarily want to use the same ranking system as on reddit, where current vote counts affect how people vote in the future.

</comment></comment><comment><USER9> Note that this article is from 2010. The most recent code for the Reddit ranking algorithms is here:

[https://github.com/reddit/reddit/blob/master/r2/r2/lib/db/_s...](https://github.com/reddit/reddit/blob/master/r2/r2/lib/db/_sorts.pyx)

It looks like they've tweaked the confidence sort algorithm a bit.

</comment><comment><USER10> I wrote a simple jsfiddle page that show you the current stories in /r/all and their associated ratings as calculated by the hot algorithm:

<http://jsfiddle.net/6FVd3/embedded/result/> Source: <http://jsfiddle.net/6FVd3/>

One thing I noticed is that the stories aren't sorted by the algorithmic score in strict descending order. I recall some mentioned that reddit mangles the ups/downs score exposed via their API. Is this the reason?

</comment><comment><USER11>
        This has a big impact for stories that get a lot of upvotes and
        downvotes (e.g. controversial stories) as they will get a lower
        ranking than stories that just get upvotes. This could explain why
        kittens (and other non-controversial stories) rank so high :)

That actually seems backwards to me. A controversial story (that is, one that triggers a lot of votes both negative and positive) would do just fine so long as it continues to receive more upvotes than downvotes.

That's not to say that downvotes don't put a damper on things -- if a story gets 80% upvotes and 20% downvotes it will get 75% the score it would without downvotes, which on a log scale is 87.5% as high a ranking.

But the point is that things are still roughly linear -- you only need to stay positive (> 50% upvotes) to accrue score, and you will do so linearly. Maybe I am underestimating how competitive scores are, and how important upvote rate is. Maybe a small linear damper on upvote rate has a large effect relative to other content? But it definitely seems like this system encourages interesting, controversial content over bland, well-received content.

</comment><comment><USER12> Here's a SQL implementation: [https://github.com/reddit/reddit/blob/master/sql/functions.s...](https://github.com/reddit/reddit/blob/master/sql/functions.sql)

Interesting here to also see their "controversy" algo

</comment><comment><USER13> I've implemented this in one project with the addition that allows entries to 'keep afloat', or resurface if they are suddenly voted a lot. So, the behavior is more like what you would see in 'Popular now' list on Youtube, without having to compute running averages.

The way I did it was to update the post time with fractional of the difference of the old timestamp and current time, i.e:

        post_time += (current_time - post_time)/10

That way, if the post is really old, voting gives a decent boost to it, but if it's more recent, it has negligible effect.

</comment><comment><USER14> Fascinating to see how HN and Reddit differ. I wonder if anyone can provide an analysis on which one is more appropriate for different scenarios, and why. I certainly have no clue.

<comment><USER15> Randall does a pretty good rundown of why the old comment ranking algorithm (which is similar to HN's) was bad here:

[http://blog.reddit.com/2009/10/reddits-new-comment- sorting-s...](http://blog.reddit.com/2009/10/reddits-new-comment-sorting- system.html)

I wonder if pg would consider implementing the confidence sort on HN. It's certainly been effective on reddit.

</comment></comment><comment><USER16> I always like applying statistical theory to things like estimating true average ratings (Bayesian weighted), and logarithms to scores that increase exponentially. Applying suitable functions to transform values is just a great way to fine-tune the measures we use in our sites and give exactly the sort of behavior we want.

Thanks for a great link.

</comment><comment><USER17> One thing that wasn't mentioned was that high scoring submissions are artificially deflated in their viewed score so that the highest scores can get are ~3000 votes. This keeps the massive site seeming less gargantuan and makes your vote feel like it counts.

</comment><comment><USER18> I think I might be missing something about the effect of submission time as described. t_s is a fixed value, and the post says, "The score won't decrease as time goes by, but newer stories will get a higher score than older." So why does the graph[1] show a decreasing scoring as "submission time ago" increases with up- and down-votes fixed? t_s is fixed!

Maybe it's been too long a day. Can anyone explain?

[1]: <http://amix.dk/uploads/reddit_score_time.png>

<comment><USER19> The only thing I can think is that it means newer stories continuously start out with higher scores. So a top story last week might have scored 3000, an equivalently top story this week scores 3100, next week's will score 3200, and on to infinity.

Not sure if that's what it actually means or not, though.

<comment><USER18> I'm an idiot, I guess. I actually understood all along. I recognised that the initial score for new submissions would be monotonically increasing, but the graph's x axis was throwing me, by making it seem as though a single story over time had its score dropping, but that's not it. If it were flipped horizontally, I think that would be more intuitive, maybe, since it might capture "these later (further-to-the-right) bars are newer stories" instead of stepping back. Or maybe not, and I'm just an idiot. :)

<comment><USER20> It's right here in the code, with this odd fixed timestamp: seconds = epoch_seconds(date) - 1134028003 Which happens to be December 8 2005 -- a few months after reddit began and probably the date this scoring system went into effect.

</comment></comment></comment></comment><comment><USER21> I wrote a small npm module containing this algorithm as well as a few other famous ones a while ago for anyone interested in a quick JS implementation. <https://github.com/clux/decay>

</comment><comment><USER22> Ranking in sites like Slashdot, Reddit, and HN is a difficult and fascinating problem. I wasn't aware of the difference between Reddit's ranking methods, nor of Munroe's involvement. Thanks for the input!

<comment><USER23> If you mean difficult in the sense that it probably took some time to find the right algorithm, than you're probably right. But the algorithm itself is rather simple. I have looked at the reddit ranking algorithm and duplicated it for a project of mine. It took some iterations but the result is rather simple.

</comment></comment><comment><USER24> To understand this, I translated it into Racket: <https://gist.github.com/2214978>

</comment><comment><USER25> It is interesting, but I don't think as implemented, the Wilson system is the best. If an article has over 200 comments, you'll (by default) only see the "best" 200 (max 500), so those will be more likely to receive the most votes. It's their default paging that is the problem.</comment>


Doomsday Prep for the Super-Rich - <AUTHOR> http://www.newyorker.com/magazine/2017/01/30/doomsday-prep-for-the-super-rich?lipi=urn%3Ali%3Apage%3Ad_flagship3_feed%3Bg69rzN%2BlSa%2BzrwooyI5kKA%3D%3D <comment><USER2> Discussions of this article from earlier this year

[https://news.ycombinator.com/item?id=13462865](https://news.ycombinator.com/item?id=13462865) (154 points, 173 comments)

[https://news.ycombinator.com/item?id=13482107](https://news.ycombinator.com/item?id=13482107) (136 points, 124 comments)

</comment><comment><USER3> If you really believe in something like a doomsday which you could reasonably escape from using one of these retreats, then really you believe in an extraordinarily specific set of circumstances which might arise. Far more realistic is the general decline in civilization, uptick in conflict, and growing paucity of resources. Frankly I don't see most of that affecting the C-level exec anyway, and if it does I don't see a glorified bomb shelter as the solution, more of a delay to get the guts up to shoot yourself.

It's a really stupid notion at this particular time in human and technological development that we can live without other people and without the biosphere in general. That day may come, but it's probably quite a ways away and in the meantime we do need each other to some extent whether we like it or not, regardless of how wealthy we are. The smartest bet now is not to throw your money into the ground on the shelter, but to invest in the planet and its people.

<comment><USER4> Yes, but if you look to history's example, even during times of relative chaos, if you're a relatively wealthy person in a relatively neutral place, you're likely to have a fantastic life, even while the rest of the world burns. It's not a totally crazy idea, I think, although I do agree with you generally. I think a bunker north of Wichita is the worst idea in the universe, though.

</comment></comment><comment><USER5> We now live in a world where capital is mobile at a global level. We have an increasingly large number of wealthy people who got that way in countries that are political stable and have costs to run and maintain who now don't want to contribute to the upkeep of that same infrastructure.

War is the ultimate means of wealth redistribution. Perhaps instead of prepping for a doomsday that's going to be bad for everyone, buying off more politicians and finding more loopholes to pay no tax, the truly wealthy should be supporting the institutions that make their wealth possible.

Crazy I know.

</comment><comment> FLUX-YOU "Welcome to New Zealand, where you'll find a bunch of doomsday homes on sale for cheap ever since people decided that the world wasn't ending after all."

</comment><comment><USER6> "The media is under attack now. They wonder, Is the court system next? Do we go from 'fake news' to 'fake evidence'?

Well isn't it what happened in Baltimore last month ?

</comment><comment><USER7> maybe the luxury prepper buisiness will stimulate demand, and thereby prevent doomsday.

<comment><USER8> This reminds me of Says Law: [http://www.investopedia.com/terms/s/says- law.asp](http://www.investopedia.com/terms/s/says-law.asp)

</comment></comment><comment><USER9> Who needs other people when you've got lots of money?

<comment><USER10> Well you need people to give that money any real value in the first place.

</comment></comment><comment><USER11> jokes on them, doomsday came and went already.</comment>