How You Should Go About Learning NoSQL - <AUTHOR> http://openmymind.net/2011/8/15/How-You-Should-Go-About-Learning-NoSQL

<comment><USER2> Step 1 in learning NoSQL: learn SQL very well. There is a good chance it already solves your problems AND ensures your data makes sense.

<comment><USER3> As a bonus, SQL cares about data reliability _.

_ Not that all of "NoSQL" doesn't, but two major "NoSQL" databases, Redis and MongoDB, both seem to care more about performance than durability.

<comment><USER4> MySQL cares about data reliability? Maybe if you spend much time agonizing over the configuration and set it to strict mode.

<comment><USER3> I generally don't use MySQL, but iirc it confirms that nothing went wrong saving the data (whereas with mongo there is no confirmation step, you just have to hope that it was successful), and the data is written to disk. Additionally, i've heard of zero "Oh no, MySQL just lost 50% of my production database!" where it wasn't the user's fault, and i've heard enough of that from Mongo to stay away.

<comment><USER5> Respectfully, this isn't true. Yes, fire and forget is the default behavior, but there is a confirmation step that you can check. It may be implemented a bit differently from driver to driver, but it is generally called a "safe insert". Numerous people use this to ensure their writes across single databases as well as multi-node master-slave and replica sets.

<comment><USER3> Respectfully, this isn't true. Safe inserts are _safer_ , but not safe. There could still be a problem writing the data to disk, and (My|Postgre)SQL just doesn't have this problem.

<comment><USER5> Assuming the changes that were introduced in MongoDB 1.8 for single-server durability, writes are being put to disk with journaling. So, the data is written to disk.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> My approach was to read the Dynamo paper. It's presents the goals of Dynamo and the technology from which it is constructed in a very compact form. From there you have a basis for understanding the engineering tradeoffs made by the other NoSQL databases. Then you can actually make decisions based on what fits your use case, rather than just choosing Mongo because it's popular. (Don't get me wrong, Mongo is great in its niche.)

Reading the Google BigTable paper would also be a good idea, as it represents another major strand of work.

My blog post on Dynamo: [http://untyped.com/untyping/2011/01/21/all-about- amazons-dyn...](http://untyped.com/untyping/2011/01/21/all-about-amazons- dynamo/)

</comment><comment><USER7> From the article:

 _A lot of NoSQL solutions are about solving specific problems. MongoDB is a general solution which can (and probably should) be used in 90% of the cases that you currently use an RDBMS._

As I use don't use any NoSQL solutions today, can someone list out a few of these cases where I am using an RDBMS and I should be using MongoDB?

<comment><USER3> I'm wondering about this too. For almost everything i work on, the data being in the correct format, written to disk, and stored reliably is more important than the speed or other advantages of Mongo.

<comment><USER5> I have a hard time understanding responses like this and, in the end, they make me think that people a) really don't understand some of these new data technologies and b) are just as much on the anti-bandwagon as those that sit on the latter.

For people using MongoDB daily, their data is in the correct format, it is persisted to disk, it is stored reliably and it is fast. On top of that, it gives them flexibility as their web app changes and new features and data structures are added, it is easily viewed and manipulated in JSON-format, and if and when the day comes that they need serious scaling, it helps there as well. Also, in the world of EC2, it is straight-forward to set up replica sets to offer redundancy.

All these conversations sound eerily familiar to the Java guys bashing Ruby and Ruby on Rails about five years ago. If you want to stick with what you have, then no worries. I just think people should be excited that over the last couple of years, the "golden hammer" approach to storing data has finally been overtaken and developers have a choice about what technology best solves their data problem.

<comment><USER8> I have first-hand experience with MongoDB silently eating my data (yes, I was using the 64-bit version) which I realized a week earlier when I noticed half the dataset missing.

The reputation (specifically of Mongo) is probably not undeserved.

<comment><USER5> I am not knowledgeable of your situation, but I am curious about your set up, the intentions you had when you were storing things and other factors in MongoDB not storing your data. Also, I am curious how long ago this was...what version of MongoDB you were using and if you were checking getLastError after the write (assuming you wanted that behavior).

I am not denying your experience, just curious about the whole picture.

<comment><USER8> I have a writeup here:

[http://www.korokithakis.net/posts/using-mongodb-for-great- sc...](http://www.korokithakis.net/posts/using-mongodb-for-great-science- part-2/)

<comment><USER9> I really don't see how you couldn't replace MongoDB in that post with any other database and still be presented with the same issues: \- adding indexes slows writes down and increases memory requirements \- running queries with poor / no indexes will cause you to have I/O constraints and an unhappy CPU \- it seems like your data set was better suited for a graph db like neo4j than a document db or RDBMS.

As for the data corruption, I didnt see you mention if you were checking for a response on saves or not.

I think the problems you experienced were due much more to the fact that you apparently had more data than the machine could handle, not necessarily the database engine used.

<comment><USER10> MongoDB, the "blame the user" database

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> There are several different NoSQLs.

For example, currently MongoDB is a good choice if you're looking for indices, ad-hoc queries and want to get up and running quickly on eg. a web project. Interestingly, with indices and ad-hoc queries, MongoDB becomes a lot like Mysql, only you're writing weird And() and Or() functions instead of "SELECT ... WHERE AND ... OR". Also, indices are tied to the documents themselves, so it's not clear how that scales.

Shameless plug:

Or you could go more bleeding-edge and check out ScalienDB, which is a straight key-value store built on Paxos and sharding. Nevertheless, getting started is easy:

      https://github.com/scalien/scaliendb/wiki

I wrote ScalienDB. The plan going forward is to add a data model and distributed transactions and in general become a low level data layer substrate similar to how Google uses its databases.

</comment><comment><USER12> SQL is (an expression of) relational algebra: <http://en.wikipedia.org/wiki/Relational_algebra>. NoSQL is your (poorly named) ability to cache stuff (flat datasets) in assorted places.

</comment><comment><USER13> It's obvious the author means well — and thanks to him for plugging the NOSQL Tapes! — but there are some seriously leaky assumptions at work here about a) how Mongo, Redis (& RDBMSes) work and b) the extent to which this poorly- digested (or regurgitated) understanding applies to other NOSQL solutions.

Too many shortcuts, inaccuracies, half-truths and implied errors to list here. The core idea of learning about NOSQL through first-hand experience (& dissection) of each project is sound, though.

</comment><comment><USER14> In some RDBMSs, primary and secondary indexes are very different. MsSql clustered tables store the tuples themselves in the primary index B Tree. Traversing the data in the order of the primary index incurs no extra disk seeks. Also, you can add extra columns to secondary indexes to support queries without searching the primary index at all.

The emulation of secondary indexes is inefficient. In a RDBMS without built in index maintenance you would create table ( _LeaderboardId,_ ScoreId), not (*LeaderboardId, ScoreIds). There's no need for comma separated fields.

</comment><comment><USER15> You don't hear as much about it, but RavenDB is an excellent No-SQL solution in MS land. It was written from the ground up with .NET instead of being ported. It's become my first choice ahead of MS-SQL Server for .NET projects.

<http://ravendb.net/>

</comment><comment><USER16> Very light reading, but all the same an excellent overview of MongoDB, Redis and Cassandra. Well done.

</comment><comment><USER17> How can one learn something that is defined by what it is not.

<comment><USER18> This thought is not mine, but I cannot recall the source: NoSQL is a bad name; it should be NotSQL. As a result it is a very large umbrella. When one sees NoSQL it is a safe assumption to think MongoDB. But you could also think DB4O (I like this much more, in an abstract way). So you can go about learning any of these technologies since you find an instance of NotSQL. To learn NoSQL, you are really still able to learn this. You are learning a philosophy rather than a technology.

<comment><USER19> I remember reading something by Erik Meijer where he states he also thinks it is an unfortunate name. I think he suggested coSQL, and gave an interesting perspective on the relationship between SQL and noSQL.

This was the article: [http://cacm.acm.org/magazines/2011/4/106584-a-co- relational-...](http://cacm.acm.org/magazines/2011/4/106584-a-co-relational- model-of-data-for-large-shared-data-banks)

</comment></comment></comment><comment><USER20> The plural of index is indices, not indexes...

</comment><comment><USER21> "Yesterday I tweeted three simple rules to learning NoSQL. Today I'd like to expand on that. The rules are:

        1: Use Mon" CTRL-W

<comment><AUTHOR> What path would you suggest people take in learning something that challenges decades of best practices?

<comment><USER22> 1st, be damned sure that decades old best practices actually aren't the best tool for your current application, developer hype be damned.

<comment><AUTHOR> Hard to know whether they aren't the best tool for the job without at least familiarizing yourself with some alternatives.

</comment></comment></comment></comment><comment><USER23> I've had a great experience with CouchDB as a NoSQL solution, simply because it is NOT like your traditional MySQL/Postgres. I'm not trying to map my existing knowledge to something that is fundamentally different. I think MongoDB might be a mistake in this regard, because users will attempting to deploy it similarly to a SQL solution.</comment>


To understand how societies evolve, read the problem pages - <AUTHOR> http://www.economist.com/news/christmas-specials/21683985-understand-how-societies-evolveread-problem-pages-whatever-should-i-do <comment><USER2> This is your 8th economist.com submission in 10 minutes.

 _Please don 't submit so many links at once that the new page is dominated by your submissions._ [0]

[0] [https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)</comment>


Alex Stamos: Tech's Adversaries vs. Enemies - <AUTHOR> https://medium.com/@alexstamos/techs-adversaries-vs-enemies-a5ca09e09aca <comment><USER2> " _Changing a company, government, industry, or society from the inside is hard. Deciding to get on a massive ship with a tiny oar in your hand and telling yourself that maybe you can help it avoid the iceberg is terrifying._ "

Terrifying??? Delusional would be more like it.</comment>


Show HN: Digit Recognition (MNIST) using my own neural network - <AUTHOR> https://github.com/victorqribeiro/digitRecognition <comment><AUTHOR> It's a little better this time around. I've design my neural network so it can have N hidden layers. It's a work in progress, but I'm improving it every time I take a break from writing my final thesis.</comment>


Ask HN: Do You Use a Web App to Manage Paid Search? - <AUTHOR>

My startup wants to get more serious about SEM.  Do most folks here who spend money on paid search use a management tool (like Clickable, SpeedPPC, Kenshoo, ClickEquations, etc.) or "do it by hand"?  If you use a tool, what do you use? <comment><USER2> The rule of thumb with tools usde in internet marketing is do not start using a tool until you know and have done everything the tool does by hand first. That way you fully understand what you're doing and don't work only with the abstraction level.</comment>


CoinDesk Removes Mt. Gox from Bitcoin Price Index - <AUTHOR> http://www.coindesk.com/coindesk-removes-mt-gox-bitcoin-price-index-2/ <comment><USER2> I am shocked, _shocked_ that anyone could have experienced issues banking with Magic: The Gathering Online Exchange.

<comment><USER3> mtgox is just a domain name. Not only is it not the same service at this point, it isn't even the same _owners_ at this point.

Throwing "lol Magic: The Gathering", is pretty ignorant.

<comment><USER4> If a magic card trading site starts trading bitcoins using mostly it's existing infrastructure and then sells to someone else, the question is are the new owners still using that hacked together infrastructure? The answer would appear to be yes.

<comment><USER5> Judging by the history that appears on the Wayback Machine, there may never have been any card trading infrastructure to begin with. There are a few blips of activity on the domain back in 2007, but it doesn't look like the site ever even came close to going live. All that ever went up was a beta disclaimer and a contact email, but no sign of any actual content, not even any real static content. Next activity's in 2009, when the domain began hosting an online strategy game called Far Wilds. That was apparently an abortive project, too, because nothing happens again until Mt. Gox's launch in February 2011.

No disputing that the domain name itself was an acronym for "Magic: The Gathering Online eXchange", but I'm failing to find any concrete evidence that Mt. Gox's code started out as a card trading platform. Just circumstantial evidence and speculation - that Wired article that the Mt. Gox Wikipedia article cites as its source included.

<comment><USER4> You are correct. As far as I can tell, they never launched as a trading card website. It's unclear if the code is related or not. There's a debate down thread about this and the only thing on it seems to be the wired article. So we don't really know what the code base started as (which is of course the real question, not what the site launched as).

Depending on how the trading card site was constructed, large chunks of the code base for exchanging cards could be used for exchanging Bitcoins (though not, obviously the broken wallet).

It seems like a question one should ask and one that should not be dismissed as merely "ignorant" or with the irrelevant assertion that the site is now owned by someone else when what matters is who built it in the first place and if that code is still in use.

<comment><USER5> I still think that there's little reason to believe there was ever any card trading code to base Mt. Gox on in the first place.

I've only looked into this a little bit, but the more information I find the more it seems like the relationship between Mt. Gox and Magic: The Gathering Online Exchange has been greatly exaggerated, perhaps to a downright comical extent. See: [https://news.ycombinator.com/item?id=7215940](https://news.ycombinator.com/item?id=7215940)

</comment></comment></comment></comment></comment></comment><comment><USER6> A reasonable action at this point, though it's also worth noting Coindesk has been anti-Gox since it started.

Which might also be a reasonable stance.

<comment><USER7> I'm still waiting on bitcoinwisdom to remove Mt.Gox. It must only be a matter of days now.

<comment><USER8> Have you thought of the people with BTC stuck on Mt.Gox?

</comment></comment></comment><comment><USER9> Is it correct to write off a major currency exchange because they are meeting CoinDesk's own requirements? Especially when it's the 3rd largest exchange?

As an outsider it seems like a bias to prevent the perception of BitCoin's value being impacted by a bad large exchange. CoinDesk is basically acting as regulator and transparency provider, which may be exactly what is needed in the realm of crypto-currencies as the community is supposed to be self regulating.

<comment><USER10> If it keeps unwiting people from dumping more money in either USD,EUR,JPY, or BTC into that exchange then I'd say it's the right thing to do.

</comment></comment><comment><USER11> I'm glad to see they're not the biggest player anymore. Their latest shenanigans are probably to cause a big crash but not a complete chaos (hopefully).

</comment><comment><USER12> About time. There's long been a "MtGox price" and a "real price", and a price index should not include MtGox unless and until they're liquid enough not to distort the price.

</comment><comment><USER13> It seems like MtGox is dealing with a technical issue that all the exchanges face. From other exchanges I've received unclear, pretty floppy emails, and some just plain ignore the issue. MtGox isn't handling it particularly well, but isn't this something positive?

<comment><USER14> No, this problem is known for long and it is not a real blocker.

See: [http://www.coindesk.com/gavin-andresen-jeff-garzik-mt-gox- wr...](http://www.coindesk.com/gavin-andresen-jeff-garzik-mt-gox-wrong- bitcoin-isnt-broken/)

</comment></comment><comment><USER15> Good riddance! I never used them but heard nothing but horror stores from those who did!

<comment><USER16> Probably because there's not much of a story in 'Hey, I did a transaction and it went through without problems!'.

Selection bias anyone?

<comment><USER17> Eh, Coindesk found that 70% of users polled were unable to pull money out of MtGox. Even if that number were half the real rate, that's still absurd.</comment></comment></comment>


How to control a machine with your brain - <AUTHOR> https://www.newyorker.com/magazine/2018/11/26/how-to-control-a-machine-with-your-brain <comment><USER2> This tech will someday help turn the masses of heads down zombies staring at their phones into heads up zombies staring at their virtual screens, pointing and clicking with their brains. They'll be almost as zoned out as now but their posture will be better.

<comment><USER3> I'm hoping for something like Ghost in the Shell, where they can interact with everything and communicate with one another with pure thought. Looking at the characters in the series, it seems super convenient. Though, I sure as hell hope it doesn't become popular to have a point-and-click interface for it like it happened with today's consumer computing for sake of being easier and more intuitive. What a waste of bandwidth!

EDIT: Regarding posture, that's the other exciting thought. Today, using a computer for work or otherwise requires sitting still, usually for long periods of time. Sedentary lifestyles are common and tend to wreak havoc in long-term health. It would be so cool to be able to work efficiently while doing other things. I could program while taking a jog or shopping at the supermarket. It's just a lot healthier.

<comment><USER4> Sure, It's all fun and games until someone hacks your cyberbrain.

<comment><USER5> What's the Ready Player One quote? "Studies have determined we can cover 80% of their visual cortex with advertisements before inducing seizures" or something like that..

</comment></comment></comment></comment><comment><USER6> This is incredible, I had no idea neutral electrode sensor technology had advanced so far.</comment>


Your State Is Not Mine: A Closer Look at Evading Stateful Internet Censorship [pdf] - <AUTHOR> http://www.cs.ucr.edu/~krish/imc17.pdf <comment><AUTHOR> The "state" in title stands both for the TCP state, and the country - <USER2> ironic meme in China. It is the opposite of "our country", a phrase usually seen in official media. The government does not even admit the existance of the GFW, which is one of the reasons why people say they are living in a different "state". The meme is explained here: [http://foreignpolicy.com/2015/06/25/chinas-your-country- we-j...](http://foreignpolicy.com/2015/06/25/chinas-your-country-we-just-live- in-it-subversive-meme/)</comment>


Intel discloses new L1 Terminal Fault vulnerability - <AUTHOR> https://newsroom.intel.com/editorials/protecting-our-customers-through-lifecycle-security-threats/ <comment><AUTHOR> Another speculative execution side-channel cache timing vulnerability, a la [https://meltdownattack.com](https://meltdownattack.com)

Related disclosure from DigitalOcean: [https://blog.digitalocean.com/a-message- about-l1tf/](https://blog.digitalocean.com/a-message-about-l1tf/)

Intel is evasive about the precise attack scenario, but DigitalOcean reports "an attacker could theoretically use one Droplet to view another Droplet's memory," implying that the side-channel is invasive (that is, theft of data is possible) rather than cooperative (that is, data can be intentionally leaked between processes, a less harmful sort of side-channel).</comment>


How Mass BitTorrent Lawsuits Turn Low-Budget Movies Into Big Bucks - <AUTHOR> http://www.wired.com/threatlevel/2011/03/bittorrent/

<comment><USER2> Can't wait for US courts to figure out that IP addresses aren't people. [http://arstechnica.com/tech-policy/news/2011/02/court- confir...](http://arstechnica.com/tech-policy/news/2011/02/court-confirms-ip- addresses-arent-people-and-p2p-lawyers-know-it.ars)

<comment><USER3> IP addresses don't _necessarily_ map to people, but we should be wary of creating a massive "get out of court free" loophole.

<comment><USER4> Why?

</comment></comment></comment><comment><USER5> If you are suing 5000 people could they not pool up resources and get a good legal team? I think this might play against the studios in this case, it's large enough that it might start getting real media attention and maybe just maybe some senators would see this a vote grabbing opportunity.

<comment><USER6> If I read this correctly, the "business model" is largely based on nobody wanting to go public about downloading that kind of movies.

</comment></comment><comment><USER7> This is like the RIAA asking LimeWire for $75 Trillion.

</comment><comment><USER8> Where is wired getting the list of IP addresses they're using for their "IP detective" app?

      http://admintools.wired.com:8080/lawsuit_app/

EDIT: Oh, it's from this PDF:

      http://www.wired.com/images_blogs/threatlevel/2011/03/openmind.pdf

</comment><comment><USER9> Interesting concept, more of a PR ploy probably. Actually this is a good thing, will show the ridiculousness of such tactics.

On another note, "Openmind Solutions Does 1-2925" would make an interesting adult film title.

</comment><comment><USER10> This is not real. This is another April Fool's Joke.

<comment><USER4> Are you sure? The timestamp on the article is "March 31, 2011 | 2:36 pm" which, unless they botched timezones, is pretty absurdly early to post an april first joke.

Also, the content is not at all surprising...

<comment><USER10> I'm skeptical - this lawsuit was filed on March 7, 2011, but the only time you hear about it is now?

There's nothing on their website about their lawsuit, additionally, if you google around for it, the only thing on it is this Wired article.</comment></comment></comment>


On the Detection of Kernel-Level Rootkits Using Hardware Performance Counters [pdf] - <AUTHOR> http://www.cs.binghamton.edu/~devtyushkin/asiaccs-2017.pdf <comment><USER2> Me, Nate Lawson, and Peter Ferrie gave a talk at Black Hat 10 years ago about using hardware performance counters to detect virtualizing rootkits (rootkits that install themselves as very small hardware-virtualized hypervisors on top of your kernel).

</comment><comment><USER3> This seems like an extension of the very old antidebugging/antitracing trick of checking the timestamp counter --- the question then becomes, are the HPCs read-only and how are they read? Because a rootkit might just as easily feed the "nominal" values to whatever application is reading them.

</comment><comment><USER4> Abstract:

 _Recent work has investigated the use of hardware performance counters (HPCs) for the detection of malware running on a system. These works gather traces of HPCs for a variety of applications (both malicious and non-malicious) and then apply machine learning to train a detector to distinguish between benign applications and malware. In this work, we provide a more comprehensive analysis of the applicability of using machine learning and HPCs for a specific subset of malware: kernel rootkits.

We design five synthetic rootkits, each providing a single piece of rootkit functionality, and execute each while collecting HPC traces of its impact on a specific benchmark application. We then apply machine learning feature selection techniques in order to determine the most relevant HPCs for the detection of these rootkits. We identify 16 HPCs that are useful for the detection of hooking based roots, and also find that rootkits employing direct kernel object manipulation (DKOM) do not significantly impact HPCs. We then use these synthetic rootkit traces to train a detection system capable of detecting new rootkits it has not seen previously with an accuracy of over 99%. Our results indicate that HPCs have the potential to be an effective tool for rootkit detection, even against new rootkits not previously seen by the detector._

</comment><comment><USER5> Great amount of detail in the paper. Too bad it relies on VTune. Besides being huge it can be buggy sometimes. An open source HPC driver would be awesome.</comment>


Every Pixel, Every Line of Code - <AUTHOR> https://medium.com/short-random-thoughts/every-pixel-every-line-of-code-19ff93ae07af <comment><USER2> As a dev who uses an editor I wrote myself... not having an undo button sucks, and is not terribly simple to build... and I have no one to blame but myself...</comment>


Show HN: Daily email summary of Show HN posts - <AUTHOR> http://www.showhndaily.com

<comment><AUTHOR> Check out ShowHNDaily.com for those who enjoy checking out new side projects and MVPs posted here on HN. Sign up to receive a daily email digest in plain text.

Sample email - <http://www.showhndaily.com/sample-email.txt> RSS feed available also - <http://www.showhndaily.com/rss.xml>

Goals: \- Share a 'quick read' format for Show HN posts. HN is a great community, but it is difficult to filter through hundreds of posts every day. \- Help others to get inspired to create. What is better motivation than to check out the neat ideas others have come up with! \- Give a little extra love to the brave folks who build and ship for fun or profit.

Next Steps: \- We started tracking metrics for Show HN and Ask HN posts on 10/1/12 (points + comments). \- Will share the "Best of Show HN" and "Best of Ask HN" for October at end of month.</comment>


Fulck – Top 1000 Websites in One Place - <AUTHOR> http://fulck.com/ <comment><USER2> Makes for an interesting homepage if nothing else.</comment>


1024cores - kung-fu-master http://www.1024cores.net/ <comment><AUTHOR> The "many core" problem is this decade's C10K. I look forward to more expert discussion on scaling across massively multi-core architectures.

<comment><USER2> Is it really? Scaling today means running on more than one machine (google, facebook, twitter, etc.)

That means no shared memory. He helpfully makes this distinction on his front page ("I'm mostly interested in shared-memory system, so if you are looking for information about clusters, web-farms, distributed databases and the like, it's the wrong place")

According to Google's Jeff Dean, "to Google, multi-core computers look like separate servers with really fast interconnections" (i.e. memory).

So if you are running your applications on many machines anyway, you might as well _drastically_ simplify your code by writing it "single-threaded" and running #cores copies on each machine.

<comment><USER3> > Scaling today means running on more than one machine

Of course it's not. Hundreds of millions of people use just a single computer for a lot of tasks.

>you might as well drastically simplify your code by writing it "single- threaded" and running #cores copies on each machine.

It's not the worst approach. However there may be significant penalties in terms of performance and latency in some contexts. You are definitely don't want to use your approach for games and browsers. As for server software it depends on performance/latency requirements. For example, if you will use it in High-Frequency Trading marker, count you loose all your money.

</comment></comment></comment><comment><USER4> Interesting, but seriously, take those ads off. Are you expecting to make money off of this? Even if you did, it would be pocket change at most.

<comment><USER5> I have ads on my own site, never made much off of them, not even enough to partially cover my hosting costs.

However I leave them there just as a reminder that someone is footing the bill.

If someone doesn't like ads, then they can use an ad blocker :)

<comment><USER3> I am very close to covering a first year of hosting :) As for consulting and, perhaps, paid libraries, well, first I need a good site, right?

</comment></comment></comment><comment><USER6> So far, nobody has mentioned the author's C++ based race detection tool. Conceptually it is similar to Corensic's commercial product, Jinx (<http://www.corensic.com>) but practically Jinx supports more languages, doesn't require recompilation, and is most likely much faster.

<comment><USER3> It's "similar" to a lot of software out there: Intel Thread Checker, Chord, Zing, Spin, RacerX, CheckFence, Sober, Coverity Thread Analyzer, CHESS, KISS, PreFast, Prefix, FxCop. However, what you are missing is that most of these tools (and Jinx as far as I see, can't find clear description on the site, mostly vague marketing stuff) are of help to you if you are an application developer who writes in term of mutexes. While RRD is of help to you if you are implementing mutexes itself. Can you verify involved mutex algorithm down to possible memory access reorderings? I doubt.

> and is most likely much faster. Or an order of magnitude slower.

<comment><USER7> Jinx can help verify mutex implementations themselves, although the example code that ships with the product is a little more advanced (lock-free stack). Some of the underlying technology is described here: [http://s3.amazonaws.com/corensic/whitepapers/DeterministicSh...](http://s3.amazonaws.com/corensic/whitepapers/DeterministicSharedMemoryMultiProcessing.pdf) and here: [http://www.corensic.com/WhyYouNeedJinx/CorensicHasaUniqueTec...](http://www.corensic.com/WhyYouNeedJinx/CorensicHasaUniqueTechnologyforFindingBugs.aspx). Because it's a hypervisor, it can aid in verifying synchronization primitives that are a mix of userspace and kernel code.

<comment><USER3> I do not see anything about memory fences. If Jinx does not support them, then it's pretty much useless for verification of synchronization algorithms. I've implemented dozens of advanced synchronization algorithms, and I may say that it's crucial. Also, if it works on binary level (does not require re- compilation), then it also renders it useless, because on that level you lose information about order of memory accesses, memory fences, atomicity. For example, if you see plain x86 MOV instruction, what is it? non-atomic store? atomic relaxed store? atomic release store?

</comment></comment></comment></comment><comment><USER8> > ..., atomic-free synchronization algorithms

Actually I'm not sure if it was supposed to be funny or serious. I see the funny "everything-free" list, as well as can imagine that there is some action you can do not atomically (relative to other actions) that gives you synchronisation.

Anyone?

<comment><USER9> I'm not quite sure what you mean, but synchronization without atomic operations is possible.

An example of mutual exclusion, without any atomic operations, taken from the book " _The art of multiprocessor programming_ "[1] is (paraphrased) as follows:

Two threads, A and B, want to access some memory. Each thread has a flag.

When thread A wants to access the shared memory:

        Set flag A
        Wait for flag B to become unset
        Access memory
        Unset flag A

When thread B wants to access the shared memory:

        Set flag B
        While flag A is set {
            Unset flag B
            Wait for flag A to become unset
            Set flag B
        }
        Access memory
        Unset flag B

Obviously this isn't a general purpose solution, but rather an easy to understand example demonstrating that atomic operations are not required.

[1] [http://www.amazon.com/Art-Multiprocessor-Programming- Maurice...](http://www.amazon.com/Art-Multiprocessor-Programming-Maurice- Herlihy/dp/0123705916)

<comment><USER10> That only works with coherent in order memory operations. Once you add the appropriate memory barriers, it looks a lot more "atomic".

<comment><USER9> I chose that example because its easy to understand, obviously in modern processors with out of order execution and whatnot, you would need something a lot more elaborate.

 _Once you add the appropriate memory barriers, it looks a lot more "atomic"_

Well, they force in order memory access. That doesn't look terribly "atomic" to me, but I understand your point.</comment></comment></comment></comment>


Microsoft Throws in the Towel on UWP, Elevates Win32 - <AUTHOR> https://www.extremetech.com/computing/291124-microsoft-throws-in-the-towel-on-uwp-elevates-win32 <comment><USER2> How do they expect desktop developers to bet on anything MS does? Since .NET came out they constantly keep changing direction without any cohesive strategy. The server development strategy looks pretty good with MVC and now Core. But desktop development is just terrible. If I have to write a new app I will either think about making it web based or maybe use qt but I think I will avoid any MS UI toolkit.

<comment><USER3> I gave up on chasing every new shiny thing MS produces. Winforms work great. They are stable - there are a million packages for it out there and it can work with the version of the framework that's installed with every copy of Windows.

<comment><USER4> I have seen systems developed over decades and they are a complete mess, the worst had these components:

\- vb com+ \- c++ dcom \- c++ mfc \- .net 1.1 winform \- .net 4 \- wpf \- delphi

Microsoft causes this by events like build which go "we are betting everything on x" then the year later it is "x was cool but look at xx"

Gahhhhhh

<comment><USER3> VB6 forms designer was actually really good. I don't there is still anything that rivals it in terms of stability, customization, speed and round-tripping.

</comment></comment></comment></comment><comment><USER5> Win32's continued popularity (vs UWP) I'm sure has at least partially to do with how it's all plain C, which makes it simple to support with any programming language imaginable via bindings. If they were serious about pushing UWP adoption they should've provided plain C bindings for it so it could be used with Rust or Python or Swift or whatever. C# and C++ aren't everybody's cup of tea.

<comment><USER6> Win32 isn't plain C. Lots of Win32 functionality is only accessible via COM, which is C++ (though using only a small subset of features so as to achieve ABI stability).

<comment><USER7> COM isn't C++. It's a language independent interface. There's no reason why COM (and therefore UWP) can't be used from C.

<comment><USER8> It can be used from C but is a huge pain that makes it obvious whoever designed the interface (or COM in general) really went off the deep end with the abstraction level. There's a major difference between a C API designed to be used from C (Win32, POSIX) and one that only happens to be usable from C.

Compare a sane "C API designed to be used from C":

[https://docs.microsoft.com/en- us/windows/desktop/dlgbox/usin...](https://docs.microsoft.com/en- us/windows/desktop/dlgbox/using-common-dialog-boxes#opening-a-file)

that involves nothing more than initialising a structure and calling a single function, with MS's "recommended replacement" using COM:

[https://msdn.microsoft.com/en- us/library/Bb776913(v=VS.85).a...](https://msdn.microsoft.com/en- us/library/Bb776913\(v=VS.85\).aspx#basic_usage)

That is a _ten level deep nested if_ with just as many function calls, to do essentially the equivalent of the code above. The first time I saw this, I seriously thought they were taking the piss.

<comment><USER6> Also, that code isn't C, it's C++. Method calls are a C++ feature. While you could use COM without language support for method calls, because the ABI is stable, it isn't really something that Microsoft supports.

<comment> Iwan-Zotow Of course Microsoft supports it, why not? There is no magic in COM, had COM object written in C

<comment><USER6> I don't mean that calling COM objects from C doesn't _work_. I just mean that COM isn't designed to be used from C.

<comment><USER9> Actually I think it was, that was the lowest common denominator.

<comment><USER10> Not really, COM is a subset of OLE 2.0, designed to replace VBX as OCX originally.

Naturally OLE was designed as C framework back in Win16 days, with endless pages of boilerplate code.

[https://www.amazon.com/Windows-Programmers-Guide-Book- Disk/d...](https://www.amazon.com/Windows-Programmers-Guide-Book- Disk/dp/0672302268)

As such COM can be called from C, specially since C++ Windows compilers have a VTBL layout as if they were a plain old C struct with function pointers.

However unless one is masochist, it is not sane to use COM from bare bones C.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> I watched the videos for every session from the current Build conference I could find on this topic, but still don't understand the strategy. Like at all. Listing the GUI toolkits that Microsoft is currently investing in, there's UWP, WPF, React Native and also a new thing called WinUI. Not all of them will survive (by which I mean will continue to get significant new feature releases say three years from now).

So it's not clear to me at all why I should bet on any of them and not just use Electron, which is in a lot of ways worse, but at least guaranteed to stick around.

<comment><USER4> Electron gets a lot of stick but you can write good looking cross platform applications easily.

Until someone does something better that isn't single platform it has to be here to stay

<comment><USER8> A lot of people, including me, do not think that "good looking" and "native looking" should be any different, and for that, Electron is a failure --- native applications use the UI of the platform and are consistent with other applications on the platform, while Electron applications obviously look different from them, and have the same look regardless of platform, completely ignoring the standard native UI it provides. They don't conform to the customisations I do to the native UI of the platform, which is very frustrating. There's also the unmistakable RAM usage and general sluggishness.

From that perspective, it's not really "cross platform", since you're just developing for one platform that happens to run inside many others: a web app.

<comment><USER12> I honestly think the days of the cohesive desktop platform are done. It arguably reached its peak with OS X (perhaps circa Snow Leopard), but the idea has been falling into disrepair even on the mac. It's hard to see any strong force moving us back to it, but given the current situation, if I were a desktop app developer I don't think it's something I would consider it worth investing too much effort in.

<comment><USER13> Maybe my memory is bad but I don't think OS X ever really had it. The flag- carrying apps (Adobe, Final Cut, Garageband) had custom UIs. Built ins like Calendar had skeumorphic UIs.

<comment><USER14> > _Maybe my memory is bad but I don 't think OS X ever really had it._

This is not a binary question of either a desert or either a rainforest, but Apple's side of the fence is definitely a lot greener than Microsoft's in terms of UI/UX consistency.

I was a purely PC/MS user up until about 10 years ago, but I haven't suffered as many befuddled facepalm moments from Apple's UI decisions as from the Escheresque nightmare that Microsoft is even now.

> _The flag-carrying apps (Adobe, Final Cut, Garageband) had custom UIs. Built > ins like Calendar had skeumorphic UIs._

However, almost _every_ macOS app has the same standard menus, same standard shortcuts, and most of them support the same OS extensibility features. Even as a developer you just need to build against the latest AppKit and you get not only all the current features, but usually _future_ features for free too (e.g. most of the NSDocument stuff such as autosaving and previous versions.)

Compare this to the hodgepodge of different interfaces even in Windows' builtin apps alone, and championing a different API almost every other year.

</comment></comment></comment></comment></comment></comment><comment><USER15> About 7 years too late. This thing should have been drowned in the bathtub when it was called WinRT. An excellent example of the hubris of the Windows division, leading to the demise of Windows Phone (and Windows in due course).

The genius who convinced Microsoft to throw its weight behind an API completely incompatible with everything they had done before should be lauded for chutzpah. They couldn't have done a better job of destroying Windows, if that was their goal.

<comment><USER16> Ideologically, I'm opposed to the assertions you've made in these two paragraphs primarily because the bloat and backwards compatibility requirements made innovation more difficult given the diversity of hosts which had to be supported.

But I'll acknowledge that I've got a substantial bias here considering I both keenly observed and to a very modest extent contributed to external coverage of the development of the platform reboots conceived during Longhorn/Vista/7/8 (Avalon/WPF, Indigo/WCF, WinFS, WinRT, some of which succeeded, some of which died) and the efforts to shed legacy platforms dating back almost three decades now.

Why do you believe what you believe? Citations would be helpful, but I recognize we're discussing opinions.

<comment><USER15> Fair enough. Let me lay this out as a long time Windows developer and someone who loved Windows Phone 7/8 compared to iOS and Android.

1\. The first version of WP7 was fine. Silverlight was a pretty mature technology and there was developer interest (at least in the Microsoft ecosystem).

2\. WP8 (and Windows 8) came out with WinRT. This was incompatible with existing ways of writing Windows code, so you couldn't bring (almost) any legacy code over. This means that extensive porting efforts were required for code that used to work fine on Win32. This was particularly brutal for open source libraries (like OpenCV/OpenSSL etc.) which were sorely necessary if you wanted to target all 3 mobile platforms.

In addition there was a much smaller API surface. Bluetooth LE or VPN APIs for example never came out until too late. You couldn't even create COM ports (necessary for GPS dongles) in a Windows 8 (not mobile, just regular desktop) WinRT/UAP app. So Win32 applications would work just fine on Windows 8, but if you wanted they fancy new features, you were either SOL or had a long development cycle ahead of you. The forced async paradigm also added massive complexity for cross-platform development.

They failed to see people rapidly losing interest in Windows (Charles Petzold's Windows 8 book sold so badly, he gave up on Windows for Xamarin. This is the guy who literally wrote the Bible of Windows GUI programming) and take action to remedy that. Instead, they spent time and effort on half-assing "Bridges" which they then rapidly lost interest in and stopped supporting.

It's fine to try to shed legacy platforms, but you don't do it at the cost of developer traction, at the very moment when you need them most. They could have done a lot more to make it easier for developers to bring code over. MS OpenTech, for example, was a worthy initiative that again got killed too soon.

So, my opinion is that nothing but hubris explains the decision to go down the road of abandoning Win32 at a time when Microsoft needed its developers more than anything else.

Having worked at Microsoft way back in the day, I've seen many bad ideas get pushed out, but Microsoft always used to treat developers with respect. WinRT was just a massive slap in the face in comparison.

*edited formating

<comment><USER17> I actually bought this particular book to make sense of the mess (i.e. 80% of the API surface missing), but of course it did not help here. The way to brigde UWP and regular Win32 APIs was described in this utterly kafkaesque document[0], which was the point where I decided that this is a complete deadend. I implore anyone to read it, and remember: this was the solution to a problem that could have been solved by importing a DLL in any sane ecosystem.

[0] [https://docs.microsoft.com/de-de/windows/uwp/winrt- component...](https://docs.microsoft.com/de-de/windows/uwp/winrt- components/brokered-windows-runtime-components-for-side-loaded-windows-store- apps)

</comment></comment></comment></comment><comment><USER18> Thank god.

Among other things UWP didn't allow PAGE_EXECUTE on the memory mapping calls, meaning that JITs were disallowed. That's pretty core to general purpose computing in a real way, IMO.

<comment><USER19> I believe this was true at one point, but isn't any more. Whilst you cannot allocate executable memory, you can use VirtualProtectFromApp to remap memory as executable [1]. UWP does enforce W^X though. You do need the codeGeneration capability.

(Disclaimer, work for Microsoft - made LuaJIT run on UWP in my free time, this definitely works :) )

[1] - [https://docs.microsoft.com/en- us/windows/desktop/api/memorya...](https://docs.microsoft.com/en- us/windows/desktop/api/memoryapi/nf-memoryapi-virtualprotectfromapp)

<comment><USER20> VirtualProtectFromApp has the exact same signature as VirtualProtect, just supporting fewer constants and being legal in UWP apps. I don't suppose you have any insight as to why Microsoft forced this kind of API churn? Why I have to lace my code with #ifdef s to support both UWP Apps and earlier OSes? What's the upside? I feel like VirtualProtect could've just supported fewer constants inside the sandbox.

Maybe to limit sandbox attack surface? Or working around KnownDLLs pinning perhaps? But even then, why not provide forwarding stubs instead of forcing all UWP devs to write their own or #ifdef spam? Time constraints before shipping Windows 8?

This style of API churn - not limited to VirtualProtect, and often with only newfangled COM C++/CX bindings for replacement APIs - definitely put me off UWP App dev, and I just don't see what the upside was supposed to be for anyone. Lots of extra work, mostly just to lose functionality.

<comment><USER21> Because the UWP code under the hood calls the real VirtualProtect. It's to avoid the name conflict.

Fun fact: your UWP app also links in gdi.dll and user32 as well.

</comment></comment></comment></comment><comment><USER8> Discussed yesterday on a different article: [https://news.ycombinator.com/item?id=19873198](https://news.ycombinator.com/item?id=19873198)

</comment><comment><USER22> The MS app store and UWP died with the death of Windows Mobile. UWP was MS' strategy to have a united mobile and desktop experience (just like Apple is trying to do now with OSX + iOS). No mobile == no incentive to develop UWP. There were already hacks for Win32 to use the non-UI APIs from UWP (that's a lot of acronyms) so you could already do most or the UWP stuff with Win32. The new strategy starting with UWP islands is just how they are staring to integrate the UWP offerings with WPF/Winforms officially. I like the UWP UI, but developing the apps is a pain due to the sandboxing (as compared with old Win32).

</comment><comment><USER23> I'm not quite sure I know enough to guess, does this suggest that new normal desktop applications may soon be able to take advantage of a unified upgrade mechanism rather than every program rolling their own?

</comment><comment><USER24> Some of my apps moved to the app store but i couldn't use them on Windows 7. So i stopped using them and made sure to never use the windows store even if i get win 10 someday.

</comment><comment><USER25> > One wonders what Gallo thinks Windows applications used to be called.

> Regardless, the idea that consumers would shift their application > acquisition behavior just because Microsoft wanted it was a poor idea that > ought to never have been implemented in the first place. It's good to see > the company catching up to the place its customers never left.

That just about sums it up for me. Good on Microsoft, I guess.

</comment><comment><USER26> UWP isn't dead??? It was demoed at build....

<comment><USER10> Many naysayers love to use any misinformation to spread FUD, although it is clear from BUILD and MSDN, where all is going.

</comment></comment><comment><USER27> Finally. It was a massive mistake from the get-go.</comment>


Evolution: A Complexity View - <AUTHOR> http://rjlipton.wordpress.com/2014/09/22/evolution-a-complexity-view/

<comment><USER2> While it's true "the role of sex is not completely understood" in evolution, most current research points to co-evolving parasites as a major force that makes sex a good evolutionary move. It increases inter-generational variation while at the same time preserving viability (because both parent organisms are viable) which merely adding randomness would not do. Parasites are typically incredibly specialized because the hosts always evolve pretty good first-line defenses, so the additional genetic variability that sex produces from generation to generation becomes a considerable added benefit to the host, because the parasite population is always playing catch-up. Like many things in evolution, the war is never won, but sex tips the strategic balance in favour of the host.

That said, this kind of formal, mathematical approach to evolution is becoming increasingly powerful, and it's worth speculating if there might not be a provable theorem connecting random DNA variation and the laws of probability at the molecular level with the fact of macroscopic evolutionary change, speciation, etc... something like Boltzmann's H-theorem in thermodynamics, which attempts to show how micro-physics (kinetic theory) can be used to prove the macroscopic 2nd Law of Thermodynamics.

This would make evolution not a theory but a theorem, which I call "Darwin's Theorem". I've played around with the math a bit (I'm a physicist, not a mathematician) without getting anywhere, and wrote a what-if novel about the possibility (it plays with even more speculative ideas as well), in part with the thought of popularizing the idea, because I think it's worth people thinking about: [http://www.amazon.com/Darwins-Theorem-TJ-Radcliffe- ebook/dp/...](http://www.amazon.com/Darwins-Theorem-TJ-Radcliffe- ebook/dp/B00KBH5O8K/ref=sr_1_1?ie=UTF8&qid=1411573921&sr=8-1&keywords=darwin%27s+theorem)

<comment><USER3> While the fact that cross-over during meiosis does in fact contribute to increased genetic diversity leading to resistance to disease, parasites, and other adaptational advantages, one still needs to answer why did sexual reproduction evolve at all? Bacteria and protists are quite good at promoting genetic diversity through horizontal gene transfer, and viral infection with natural DNA replication error rates provide enough sources of "random" genetic variation to keep a diverse gene pool. One can think of competition to share genetic material as a primordial form of sexual selection. Getting from this kind of competition to orchestrated sharing and cross over of large genomes is a huge jump. The real question may be, did increasing organismal complexity necessitate a different type of reproduction to maintain genetic diversity? The answer to this may be yes, but alternative, less sexy hypotheses have to be tested as well. Another question to answer would be – What evolved first: multicellularity or sexual reproduction?

<comment><USER4> > enough sources of "random" genetic variation

well, that's the kind of thing the GP wants to put in numbers and a mathematical system, to provide substantial arguments.

</comment></comment></comment><comment><USER3> This paper makes a 0th order assumption that there _is_ an inherent advantage to sexual vs asexual reproduction. There are certainly advantages to both, but the author is correct that the answer may come out of addressing complexity. Algorithmically, there are many approaches to modelling sexual selection (rather than natural selection). Sexual selection occurs much faster than natural selection and may be one of the reasons why we have such apparent gender differences within species. Describing the effect of complexity in terms of "fitness" is one of the largest challenges faced by computer scientists and biologists this century. If you are interested in exploring some different algorithmic models, "Computational Molecular Evolution" is an excellent book ([http://www.amazon.com/Computational-Molecular-Evolution- Oxfo...](http://www.amazon.com/Computational-Molecular-Evolution-Oxford- Ecology/dp/0198567022)).

<comment><USER5> I'm confused by your distinction between natural selection and sexual selection. I always thought the latter was encompassed by the former. Are you talking about random phenomena like genetic drift, or that some complexities are not susceptible to adaptation? Did only browse the article, sorry.

<comment><USER3> Its generally understood that traits that encourage reproduction _regardless of whether or not they encourage fitness_ will outperform other traits ([https://en.wikipedia.org/wiki/Sexual_selection](https://en.wikipedia.org/wiki/Sexual_selection)). This is why you will see the appearance of coloration and seemingly useless adaptations faster than actually beneficial traits within a population (i.e. a giraffe's neck; its not for reaching those high leaves). Natural selection is generally concerning traits that promote survivability over time, a much slower process. A major hypothesis is that sexual selection may be a driving force behind differentiation of the sexes, probably originating from genetic information sharing among single-celled organisms. A competing hypothesis is that there is an _intrinsic_ advantage to sexual reproduction versus asexual reproduction. I generally favor the former hypothesis because it generally fits the "short-sightedness" principle of evolution.

<comment><USER5> I agree with you. I wrote an essay once about the need to be sentient about what characteristics of biological evolution one adopts in genetic programming, arguing that sex is arguably just a serendipitous side-effect or at least a sub-optimal solution to the problem of effectively mixing gene material. Much points to this, such as the short-sightedness principle of evolution, and that group or species selection argument is generally hard to make.

However, I am still reluctant to accept your distinction between natural selection and sexual selection. The article you link to even calls sexual selection "a mode of natural selection". The giraffe neck does not have fitness value in the sense of making it a better food processor, quite the opposite. But it does have fitness value in the sense of prospering those very genes, indeed otherwise the giraffe would not exist. Such a definition of fitness does tend to be tautological, but the alternative is no better, because it is inevitably based on a measure of survivability that in the end is necessarily arbitrary.

<comment><USER6> The basic distinction is this: Natural selection refers to one organism having superior reproduction prospects due to inherent physical factors (strength, speed, height, weight, ability to digest specific foods, ability to detect and respond appropriately to threats, etc.). Natural selection takes place without the awareness of the hosts involved: By the time their relative advantages or disadvantages are in evidence, they are long dead.

In other words, natural selection is about fit, that is, how well an organism "fits" or is suited to and environment. (That it what Darwin meant by fitness: Environmental suitability.)

Sexual selection refers to overt preferences in mating: A female bower bird chooses the male that builds the "best" bower (a completely useless artifice neither ever use), a human male prefers women with larger breasts (pretty much ditto), a peahen prefers the peacock with the more extravagant tail (ditto for sure, in fact, more extravagant tails are liabilities).

Examples are many. The term "runaway sexual selection" is used to refer to exaggerated traits that become prevalent and possibly dominant in specific, local populations (think of human characteristics you associate with certain groups: Sometime, somewhere, someone preferred those slightly larger eyes or slightly curvier hips and over time those became prevalent). These traits are generally completely irrelevant, with zero fitness value.

They exist because we think they look/smell good. Why did we come to prefer one over another? The same random variation that causes changes to fitness causes changes to fitness indicators, but those indicators are not necessarily honest signals.

<comment><USER5> I am familiar with the gene-centered view of evolution proposed by Williams and popularized by Dawkins with the so-called selfish gene theory. Within this school of thought sexual selection by no means stands in contrast to natural selection and is not labeled an alternative to it. Instead, in fact, sexual selection is argued to be a direct consequence of natural selection as a phenomena you would expect with Darwinisitic reasoning when assuming the gene- centered view. As is made the case, the gene-centered view is the extension of Darwin's original argument, that is, Darwin's argument taken to its logical conclusion with the modern facts at hand, the DNA molecule not the least.

One of the central themes in Dawkins's The Extended Phenotype is the putting into question of the validity of traditional role of the organism in Darwinistic reasoning and why Darwin's original definition of fitness does not hold up. There is actually an entire segment on the many modern (back then) definitions of fitness and problems with each of them. I don't recall what the final conclusion is but it is certain it is not the clear-cut case you make it.

I suppose you have background in a field where your definition of fitness is more firmly established. For instance, I know biological mathematics has come a long way, and I'm not up to speed with what definitions they are using.

</comment></comment></comment></comment></comment></comment><comment><USER7> There is an algorithmic technique underlying a lot of this stuff called the "Multiplicative Weights Update Algorithm." It's worth checking out if you want a cool algorithm that applies in lots of different scenarios.

</comment><comment><USER8> This reminds me of Chaitin's "meta-biology", which uses (self-delimiting) computer programs as genomes, a Turing machine as the environment and "fitness" is defined as how big the program's output is, interpreted as a natural number. Unfortunately it relies on a halting oracle to avoid diverging programs :(

<comment><USER9> Here's a copy of Chaitin's metabiology draft notes compiled from a series of lectures he's given over the years: [https://www.cs.auckland.ac.nz/~chaitin/metabiology.pdf](https://www.cs.auckland.ac.nz/~chaitin/metabiology.pdf)</comment></comment>


Fitbit data just undermined a woman's rape claim (2015) - <AUTHOR> http://fusion.net/story/158292/fitbit-data-just-undermined-a-womans-rape-claim/ <comment><USER2> > In March, a Florida woman traveled to Lancaster, Pennsylvania where she > stayed at her boss's home

> Jeannine Risley told police she'd been sleeping and that she was woken up > around midnight and sexually assaulted by a "man in his 30s, wearing boots."

> Risley's boss, who is unnamed in news reports, offered what police > considered further incriminating evidence, telling police that Risley was > about to lose her position with the company

Who thought a boss-employee sleepover right before (as?) the employee got fired was a good idea?</comment>


Zalando Manages 140 Kubernetes Clusters - <AUTHOR> https://srcco.de/posts/how-zalando-manages-140-kubernetes-clusters.html <comment><USER2> > _Each cluster lives in a completely new and isolated AWS account._

Google Cloud does this so well. I still dont understand why AWS cant create project level isolation. Conceptually it is IAM with some namespaces ... or even autogenerated IAM.

But the usability is incredible.

<comment><AUTHOR> True, but at least they now have an API for account creation (AWS Organizations) --- it was really painful in 2015/16 to script (in the browser!) all necessary steps for account creation (add credit card, remove it again [to switch to invoice], etc)

<comment><USER2> No it doesn't work very well. Because AWS organisation absorb billing as well. We use reseller billing in both AWS and GCP.

In GCP, the projects don't affect the billing. However in AWS, I can't have accounts in one organisation and consolidated billing in another (the reseller Organization).

Its a mess.</comment></comment></comment>


Show HN: Cecibot – Censorship Circumvention Bot - <AUTHOR> https://cecibot.com/index.html <comment><AUTHOR> Hello HN, author here!

I am a developer from Turkey, currently residing abroad for studying CompSci. Throughout the years I watched the Internet censorship in my country getting worse and worse each and every day under the Islamist regime of Erdoğan, to the extent that of Wikipedia getting blocked.

As they _improved_ their methods of censoring (and _worsening_ the life of their citizens), such as from DNS blocking to blocking VPNs today, I was afraid that there any _direct_ solution can (and will) one day get blocked (for instance, Tor website is currently blocked in Turkey but it works if you manage to install it somehow, whereas you'll need a bridge to connect to the Tor network in Iran if memory serves me well).

I came up with the idea (though not sure of its uniqueness) to use channels of everyday communication (such as e-mail, Telegram, (Facebook) Messenger...) to circumvent censorship. Because "even under the most repressive regimes, people do need to communicate with others, both within and outside of the country."

I'd love to hear your feedback!

Bora

P.S. [https://github.com/boramalper/cecibot](https://github.com/boramalper/cecibot)

<comment><USER2> Are you afraid for repercussions for writing the software and/or your statement(s) about the regime?

<comment><AUTHOR> On the one hand, yes I am afraid, but on the other, I am sick & tired of silence (which quickly leads into learned helplessness).

I think it's better to speak up and to face the consequences than to see (first) your country (and then the world) ruined. I am currently studying abroad in UK and even though they cannot directly harm me (though they can hurt me through my family and beloved ones living back home).

I kept thinking about the idea of _settling_ in a nicer country, but then, I realise that people (in the West) have paid the price of their freedom (if not their wealth), and then idea of "(e|im)migrating" doesn't feel like a solution any more but postponement of the problem, whose responsibility is on my (our) shoulders and no one else's.

More than what you asked for I assume, sorry. =)

<comment><USER2> Brave of you, good luck with your efforts.

</comment></comment></comment></comment><comment><USER3> The terms of service seem a bit odd to me:

       I do not tolerate:

       - Exploitation of _children_ (including child pornography)
       - _Religious_ terrorism

May I suggest changing this into something a bit less specific? The way it is written now you seem to be OK with political terrorism and exploitation of any other group. Just state you won't hesitate to report obvious criminal activity and leave it to the user to decide whether they feel they can trust you.

<comment><USER4> > Just state you won't hesitate to report obvious criminal activity

Bypassing censorship is a criminal activity in a number of countries. Pick censorship or pick an internet with illegal content. You can't have a world with neither.

<comment><USER3> If you don't trust the tool, don't use it. The fact that '[b]ypassing censorship is a criminal activity in a number of countries' seems to be what drove the creator of this tool to its creation so I assume that he will not report you for 'bypassing censorship'. This does not mean it is impossible of course, a smart Erdolf-follower could make a similar tool (or even this one) with the purpose of catching those who try to escape censorship. In the end it comes down to trust, no matter which tool you use.

</comment></comment></comment><comment><USER5> This is really cool, nice work.

In addition to censorship-circumvention, it also provides a way to read the content of potentially-malicious sites without risk of browser vulnerabilities being exploited, and without revealing your IP address, User-Agent, etc.

Now we can all browse the web like we're Richard Stallman :)

EDIT:

> try downloading it, if it is a file smaller than 5 MiB;

I found that even pages smaller than 5MB get rendered to PDF.

Are you using headless Chrome or similar to implement this? It seems Javascript isn't getting executed (which is probably wise, I was just surprised it renders the pages so faithfully if it's not also running some sort of engine that will execute JS).

(Update: UA is "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/67.0.337")

EDIT2:

It doesn't seem to support chunked transfer-encoding:

> Your request [...] has been unsuccessful due to following error:

> file size unknown: "content-length" header is missing

<comment><USER6> >it also provides a way to read the content of potentially-malicious sites without risk of browser vulnerabilities being exploited

PDFs have the same kind of vulnerabilities, they can even execute JS (JS is probably not contained in the ones generated by the author).

>and without revealing your IP address, User-Agent, etc.

Yep.

>> try downloading it, if it is a file smaller than 5 MiB;

>I found that even pages smaller than 5MB get rendered to PDF.

I believe the text is supposed to mean "if it's not a web page but a file [offered for download], it will download the file if it's less than 5MB".

<comment><USER3> Some PDF _readers_ can execute JS which can be embedded in PDF files. Just use a reader which doesn't support embedded JS (or switch it off if it does support it) to avoid this whole class of vulnerabilities.

</comment></comment></comment><comment><USER7> Seems like this just creates a honeypot where censorship regimes can easily detect people attempting to circumvent their systems. Use this tool and you're liable to be a list.

Maybe combined with a form of stenography, this could be more useful.

</comment><comment><USER8> This is a cool bot. I wonder how well this concept can work for two way communication: not just GETting webpages but also allowing messaging when it's blocked.

</comment><comment><USER9> Excellent idea! Congrats on launching, and I love the minimalist website.

Quick note, /ar/ and /zh/ don't currently seem to work.

<comment><AUTHOR> Thanks. =) It's currently being translated into Arabic, and I'm yet to find a Chinese speaker (who is willing to translate).

</comment></comment><comment><USER10> Religious terrorism... What about domestic terrorism?

<comment><USER11> I think the point is that the label of "terrorist" is often forced upon those using justified force against a violent oppressor.

To use an example from American history, the American revolutionaries (AKA "patriots") were almost certainly seen as terrorists from the perspective of Great Britain and its loyal subjects.</comment></comment>


Show HN: Noise Reduction Machine using Fourier Transforms - <AUTHOR> https://github.com/sanjivsoni/reimagined-computing-machine <comment><AUTHOR> Can anyone give me any suggestions on how to improve on this.</comment>


MongoPress - The High-Performance, Object-Based, PHP, MongoDB CMS - <AUTHOR> http://www.mongopress.org/

<comment><AUTHOR> WordPress's performance bottlenecks lie with its reliance on MySQL. Moving to a NoSQL storage method would propel it beyond what we know CMSs to be.</comment>


The Science That Fueled Frankenstein - <AUTHOR> http://www.nature.com/nature/journal/v535/n7613/full/535490a.html?WT.mc_id=FBK_NA_1607_FHBOOKSARTSFRANKENSTEIN_PORTFOLIO <comment><AUTHOR> Mary Shelly's introduction to the 1831 edition: [https://www.rc.umd.edu/editions/frankenstein/1831v1/intro](https://www.rc.umd.edu/editions/frankenstein/1831v1/intro)</comment>


Avoiding meat and dairy is 'single biggest way' to reduce your impact on Earth - <AUTHOR> https://www.theguardian.com/environment/2018/may/31/avoiding-meat-and-dairy-is-single-biggest-way-to-reduce-your-impact-on-earth <comment><USER2> Disclaimer: I'm vegan

I really don't know how to help attitudes move towards a plant based life- style. I don't bother bringing it up because the second the topic is introduced, people feel attacked and that I'm just doing it to feel superior. Amusingly enough, it's usually omnivores that bring up that topic but still are obviously uneasy about the whole thing.

<comment><USER3> I think the key to vegan food growth is making vegan food so delicious and cheap that people start deciding to go get dinner at By Chloe instead of Five Guys ([https://www.eater.com/2018/4/19/17243780/by-chloe-vegan- chai...](https://www.eater.com/2018/4/19/17243780/by-chloe-vegan-chain-guac- burger)).

I wonder how much vegan restaurants can undercut omni restaurants due to the lower costs of vegetables compared to meats.

Source: anecdata from an omnivore that recently decided to try vegan food and found that there are actually some pretty delicious deals to be found.

If I could get a really great vegan meal for $6-8 rather than the $9-13 I normally pay in NYC I would probably start replacing a lot of my eating out with it.

<comment><USER4> I would think the key would be removing the subsidies to the livestock industry. If a burger at Five Guys cost $20, there'd be a lot more vegans...

<comment><USER5> The subsidies wouldn't create more vegans in my view but it would reduce overall meat consumption. If you look at countries with higher meat costs (relative to income) you see that most have lower per capita meat consumption but they don't necessarily have higher incidence of vegans.

</comment></comment></comment></comment><comment><USER6> To me it would be ideal if plant based food was the default and animal products an expensive luxury. Not unaffordable, let's say a dish with meat costs about twice as much as a vegan dish in most restaurants.

But I would already be perfectly happy and content if all the wonderful places in the world I want to visit had vegan food at all. Of course I understand that people struggling with hunger and poverty have more important things to worry about.

I don't know what it takes to "save the planet". Everyone going vegan might not be enough. But that ship has probably sailed anyway. The planet will have plenty of time to recover and/or become something new after humans disappeared (themselves). What bugs me is seeing animals suffer, regardless of species (including humans ofc).

<comment><USER7> India is mostly vegetarian, grows enough food to feed all its people and still has millions dying of starvation. In most countries that face starving denizens, it is often (although not exclusively) the result of flawed distribution rather than an inability to grow food. I really think we're not focusing on the right problem, but that is my opinion.

<comment><USER6> Is it really? So this article is wrong? [http://www.bbc.com/news/world-asia- india-43581122](http://www.bbc.com/news/world-asia-india-43581122)

And when you say vegetarian, do you mean vegan? I don't know what _real_ Indian food is, but the Indian food I have seen (and enjoyed tremendously) always had dairy/butter/ghee in it (maybe with the exception of dal(sp?)). Which is hilarious considering the whole holy cow thing.

<comment><USER7> I'm uncomfortable about taking BBC articles at face value. If you read it with a critical eye, you can see it giving weight to unspecified surveys a lot more than official Government surveys. There would have been a much easier way to measure meat consumption: measure the production of meat (internal + imports) and average daily consumption of households to see if the data is valid. Until the article provides any kind of proof that the data is flawed, I will continue to trust official figures.

> Which is hilarious considering the whole holy cow thing.

I genuinely don't understand what you mean by this. Milk rearing in India is not done in the industrialized fashion that you see in the US, but by small scale dairy farmers who sell their produce to cooperatives. In a country like India where nutrition is scarce, milk and milk based products are an excellent way to supplement diets. And as you mention they are already a substantial part of Indian cuisine.

<comment><USER6> Interesting. I think it would be even easier to see whether the article is lying or not. Just go to India, visit many different regions and have a look what the shops and restaurants frequented by locals sell.

In my opinion, there is no point in avoiding meat without giving up dairy. With "the whole holy cow thing" I meant that, as far as I know, in one (?) religion that is common in India (Hinduism?), cows are considered sacred animals. Because of that, followers of that religion don't eat them. And in some branches of Buddhism, harming any living being is a no go. I could have gotten all this totally wrong. I didn't even take the time to read up on it right now. I'm not all that interested in religion, barely know anything about Catholicism even though that's the crazy I've been baptized in/on/with/whatever. I exited that club way too late, regrettably, but at least I'm not giving money to child molesters any more.

Sorry, rambling. Back to cows: So eating them is bad, but somehow, perma- raping cows and making them sad by taking their babies away is totally cool. Maybe that not-as-bad-as-in-'murica milk production method avoids this bad karma. That would be great. Regardless of that though, I believe dairy is not healthy at all for adult humans. Cow milk is for cow babies. If you are reading this, you are not a cow baby.

<comment><USER7> > Interesting. I think it would be even easier to see whether the article is > lying or not. Just go to India, visit many different regions and have a look > what the shops and restaurants frequented by locals sell.

That is called anecdotal evidence and cannot be taken as the basis to making informed conclusions about the whole country. India is a HUGE country and incredibly diverse. How many neighborhoods in India will you go to make a spot check? Statistics is your friend, not anecdotes.

> Sorry, rambling. Back to cows: So eating them is bad, but somehow, perma- > raping cows and making them sad by taking their babies away is totally cool. > Maybe that not-as-bad-as-in-'murica milk production method avoids this bad > karma. That would be great. Regardless of that though, I believe dairy is > not healthy at all for adult humans. Cow milk is for cow babies. If you are > reading this, you are not a cow baby.

What the fuck? Whatever pain the cows may face is infinitely less than the absolutely disgusting conditions under which cattle are grown and slaughtered in the US (including cow babies as you so cutely refer to them).

Milk is ABSOLUTELY a good source of nutrition for human beings. Especially in a country like India where a significant fraction of the population faces malnutrition, it is a very effective way to provide nutrition. It also has the side effect of financially enriching farmers who are one of the most vulnerable segments of Indian society.

<comment><USER6> Thank you for responding and putting up with me. :)

You are right, visiting India and having a look would not provide data to base policy decisions on or anything like that. I didn't mean to imply that. It would be enough for me to form an opinion based on experience, is all.

As I said, I don't know how milk is obtained by Indian dairy farmers. I believe you straight away that it is way better than in "efficient" factories. I assume they leave the babies with the mothers and let them have the milk and take whatever is left over. That'd be dope.

However don't you need even more cows then with the "efficient" method? And do those cows not emit the same amount of greenhouse gases as the poor creatures in factories? Not if they eat seaweed, apparently ([https://foodtank.com/news/2017/06/seaweed-reduce-cow- methane...](https://foodtank.com/news/2017/06/seaweed-reduce-cow-methane- emission/)). Do they? Is that their natural diet? If not, is it fine anyway?

If they are treated properly, they won't eat food that humans could use, so that's good.

How much water do they need? Is water scarce around Indian dairy farms?

It's all so complicated. Just eating a plant-based diet is so much simpler. It would also be much easier if all sufficiently wealthy and developed parts of the world finally got the memo that some people want this. Where are you capitalism? Serve the market. Shut up and take my money. Pretty please.

I have no doubt that most of India is not sufficiently wealthy and developed. Obviously I undestand that consuming dairy is better than starving and I would never ever tell someone in that situation what to do. That would be absolutely insane and devoid of any compassion. However, "better than starving" is also a very low bar and not quite the same as "healthy food for adult humans".

It is not just about nutrients. If I mix vitamin C and rat poison, is the result healthy?

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> Killing yourself reduces your impact on the Earth by 100% - that doesn't mean it is a productive thing to do. Individual action isn't going to fix this. Each person's contribution is too small. Systemic change is the only way to address this.

Modern industrialized agriculture has a lot of issues. Other methods of agriculture can have net-negative emissions: grow all of your feedstock onsite and use waste products to produce more feedstock. If all the carbon you emit was previously captured onsite, you're only 'borrowing' carbon, not really producing it. Slightly net-negative carbon as soil is built as a byproduct. See Joel Salatin for further reading.

I think writing articles about how "You, individual, can do something to save the Earth" is ineffective moralizing not unlike Facebook posts asking to "Share this if you want to end human trafficking!" \- the only tangible effect is self-promotion of the author and inflating the self-esteem of the readers who go along with it.

<comment><USER6> I read The Omnivores Dilemma and share your believe that this kind of farming seems fine. I don't know whether this would work for feeding the entire planet. Right now, farms like this are an exception anyway.

In my experience, only consuming animal products from these farms is a bigger hassle than finding vegan food.

<comment><USER8> Highly recommend Joel Salatin's works - he has a really interesting perspective.

Here's a talk of his on Cows and Climate Change [https://www.youtube.com/watch?v=4Z75A_JMBx4](https://www.youtube.com/watch?v=4Z75A_JMBx4)

From my recollected (watched that ~6 mo ago), the amount of land needed to grow food for his herd is less than the amount of land that would be needed to purchase it elsewhere, because the rotation of the animals keeps his fields fertilized and trimmed to the optimum length for fast growth. Plus, by rotating in chickens, he's double dipping a bit.

There are some people doing some interesting research into using herd animals to prep beds for annual vegetables: they let the animal graze as the seeds are starting to germinate, animals eat everything green. The germinating seeds are then able to fill the void left behind faster than anything else, because the farmer timed it properly.

<comment><USER6> Thank you for that link, very interesting! For some reason it hasn't occurred to me to Google the guy who Pollan admires so much in the book.

</comment></comment></comment></comment><comment><USER9> In addition to having fewer children (or none at all), I wonder how much of a difference it makes to have children later in life?

What's the math on starting to have kids at 30 years of age instead of 20, especially if that pattern is repeated by your progeny?

<comment><USER10> All else being equal including the number of children, I think this would increase the age gap between generations and therefore decrease the average number of people alive at any given time. But unless the number of children being born changes, it won't change the trend.

</comment></comment><comment><USER11> Suicide is, absolutely, the single biggest way to reduce your impact on Earth, period.

That doesn't make it a good idea. Likewise, it's not a good idea to pretend you're not an omnivore.

<comment><USER12> One could argue that there's somewhat of a difference between a vegan diet and suicide.

</comment></comment><comment><USER13> Are there any studies regarding the body's absorption of animal protein versus plant-based protein?

I feel like this subject is often very emotional for some people, but what about science?

<comment><USER6> The problem with healthy eating is that you get five opinions when you ask two experts.

However, you can't find a ton of videos on YouTube with plausible sounding explanations why a plant-based diet is healthiest. Just watch those and decide to believe them. Whatever you do, _do not_ read "The Plant Paradox". That book will ruin eating for you if you even so much as consider to ponder the possibility that it might not be total BS.

<comment><USER6> Damn auto complete. That should be "you _can_ find a ton of videos".

</comment></comment></comment><comment><USER14> Having fewer kids, or no kids at all, is actually the single biggest way to reduce impact on Earth.

Also, as can be seen on the graph of the article, the major problem is actually beef, and not meat in general.

Something the article doesn't mention, and maybe the paper doesn't take into account, is distribution. Fruits and vegetables can have a bigger footprint than certain meats because these can be transported off season from very long distances.

[http://the-ecotarian.com/stories/2016/2/26/environmental-imp...](http://the- ecotarian.com/stories/2016/2/26/environmental-impacts-of-food-2-transport)

<comment><USER15> Even more radically than having "no kids at all", one could also commit suicide in order to immediately and more completely "reduce impact" \-- as the end-goal seems to be.

Can you explain how that is not the logical conclusion? Along those lines, some radical environmentalists have been advocating mass slaughter of the human species.

<comment><USER7> Killing oneself is not nearly the same as deciding to not have children. The latter is a choice which will not harm you or your health.

<comment><USER15> The stated purpose is "reduce impact", not "avoid harm to myself".

<comment><USER10> Your logic is correct when we exclude all context and reasonable assumptions.

We could also end poverty by killing the poor.

<comment><USER15> Your analogy would be valid if someone had previously claimed that the single most effective way to end poverty is to prevent the poor from having children. Then one could explore the logical conclusions of their advice.

</comment></comment></comment></comment></comment></comment><comment><USER16> Hm, personally I'd prefer to have an impact on Earth.

Having no impact sounds terrible.</comment>


Chomper: Electric Obstacle Avoiding Snowblower - <AUTHOR> http://transistor-man.com/electric_snowblower_9000.html <comment> transistor-man Small world, thanks for whoever posted this, this is indeed my contraption. This is a bit of last year's documentation, as the vision processing stuff was still mid-testing when the whole newsfolk found me.</comment>


Tax dialysis: How Vanguard avoids paying realised gains tax on their mutual fund - <AUTHOR> https://www.bloomberg.com/opinion/articles/2019-05-01/people-want-to-buy-uber-stock#tax-dialysis <comment><USER2> So, this is the second front page post by the same user this morning. One takes a direct shot at vanguard ("tax dialysis"), and the next an indirect shot ("they don't use your votes right - but we do! Invest with us!"). The user only has four posts in their entire history, and three are on the same topic and posted in the last 24 hours.

This ... looks off to me.

<comment><USER3> If they want to attack Vanguard they're doing it wrong. My takeaway was that Vanguard is the place to go for tax-efficient mutual funds.

</comment></comment><comment><USER4> Matt Levine may be the most clear thinking financial reporter ever.

</comment><comment><USER5> Not sure why a industry publication is effectively throwing a large part of its industry under the bus.

Instead of arguing for treating all mutual/etf's REITS and investment companies in are more sane way - the way the UK does with IT, OIECS and ETF's - that is the individual owning the shares pays the tax.

<comment><USER6> In the case of mutual funds, the individual investors are all subject to capital gains (or losses) whenever the fund sells any shares. Even if the investor hasn't divested any money from the fund.

This loophole now results in investors only being subject to taxation when they actually sell their stake in the fund. IE the same way as how ETFs are designed to work.

Alternatives result in double taxation, which means it's the investor that pays twice anyway - the fund will just add the costs of being taxed itself into the value of the fund, and then the investor will pay a second time when they divest from the fund.

<comment><USER7> > This loophole now results in investors only being subject to taxation when > they actually sell their stake in the fund. IE the same way as how ETFs are > designed to work.

Your phrasing is slightly misleading. The only reason under tax law that EFTs are taxed this way is because EFTs have always used this same tax dodge. So it's not as if Vanguard has patented (and used) a legal loophole for getting EFT tax treatment on a mutual fund, it is that Vanguard has patented (and used) the same loophole for their mutual fund that everyone uses for their EFTs.

<comment><USER5> Not really a tax dodge its the way investment trusts have worked for over a hundred years - and they helped build America :-)

</comment></comment></comment></comment><comment><USER8> > My only complaint is that Vanguard has patented this method, so nobody else > can immunize a mutual fund from taxes by bolting on an ETF

What the...? How is that possible, patenting a _tax loophole_?!

<comment><USER9> It appears they are using an algorithmic process to perform the heartbeat trading, and they are patentable[0] as long as they are not illegal. Tax loopholes are not illegal but very unethical, I think the policy makers share equal if not more blame for this.

[0] [https://www.quora.com/Is-it-possible-to-patent-an- algorithm](https://www.quora.com/Is-it-possible-to-patent-an-algorithm)

<comment><USER10> It is possible to patent a "business method," no algorithm required [1].

Also, TFA addresses the ethics question in this case, and I don't think it's so obviously unethical:

> A lot of middle-class people love investing in ETFs and not paying taxes > until they sell their shares, and politicians and regulators seem pretty > happy to let them do it. It is also quite reasonable: People who buy ETFs > pay taxes on their gains when they sell the ETFs and actually realize the > gains, which feels like the right time to pay taxes, whereas people who buy > mutual funds have to pay capital gains taxes at random times that have > nothing to do with their own investment decisions or cash flows. From that > perspective, the heartbeat trades are not an evil tax dodge but just a > sensible mechanical use of the rules to achieve the logical result that > everyone wants.

[1] [https://en.m.wikipedia.org/wiki/Business_method_patent](https://en.m.wikipedia.org/wiki/Business_method_patent)

</comment></comment></comment><comment><USER11> The article seems to be misleading. Then again, I'm not a US citizen so I'm not as familiar with their parochial tax laws.

When one of my mutual funds disposes of an asset at a profit and recognizes a capital gain it simply retains the earnings and plows them back into some other capital investment, thus growing the net asset value per share (NAVPS). When I sell units of the mutual fund, I am subject to capital gains tax (or can claim a loss) as appropriate. From time to time a fund manager may choose to pay a distribution classed as a capital gains distribution, in which case it's income I treat as capital gains on my taxes. No taxes are paid by the mutual fund and I only pay capital gains tax when I redeem units of the fund.

When one of my ETFs makes a trade of underlying securities and realizes a capital gain, it's a flow-through situation. What happens is the ETF adds up all the gains and losses from transactions over the year and at the end of December I get a special kind of distribution called a "return of capital" which is like a capital gains distribution on which I need to pay taxes, but I also add it to my adjusted cost base so I don't get taxed twice and I don't actually receive any income.

As far as I understand it, that's the way mutual funds and ETFs work in the USA, too. There's no reason a mutual fund couldn't do flow-through like an ETF does, other than it would require a greater understanding of basic accounting so it wouldn't be appropriate for Mom and Pop Sixpack who would probably steer clear of having to recalculate their ACB on an annualized basis let alone understand why they need to pay tax on income they haven't received.

</comment><comment><USER12> Link might be wrong (I got pointed to an Uber article). I think this is the article: [https://www.bloomberg.com/graphics/2019-vanguard-mutual- fund...](https://www.bloomberg.com/graphics/2019-vanguard-mutual-fund-tax- dodge/)

<comment><AUTHOR> The link was intended to point to one of the article subsections, the one called Tax Dialysis.

Can't link straight to it, unfortunately.

<comment><USER13> [https://www.bloomberg.com/opinion/articles/2019-05-01/people...](https://www.bloomberg.com/opinion/articles/2019-05-01/people- want-to-buy-uber-stock#tax-dialysis)

The way you do this is:

      1. Press F12 to open developer tools.
      2. Click the select element button (in Firefox, this is the top-left icon of what just popped up).
      3. Click on the header of the section you want.
      4. If you're lucky, it has an id="tax-dialysis" attribute on it.
      5. If not, find a nearby element which does.
      6. Put that id prefixed by an octothorpe (#) symbol at the end of your URL.
      7. Forget that Hacker News isn't markdown, and doesn't do numbered bullets.

<comment><AUTHOR> Neat, thanks for the tip. It's too late to edit the post now, but it'll come in handy in the future.

<comment><USER13> Glad to be helpful.

I was just thinking that this is really quite a useful feature of HTML, and browsers should expose it to the user somehow.

Then I found this Firefox extension: [https://addons.mozilla.org/en- US/firefox/addon/generate-link...](https://addons.mozilla.org/en- US/firefox/addon/generate-links-for-headers/)

</comment></comment></comment></comment></comment><comment><USER14> While we're on the topic, I've never understood how Berkshire Hathaway isn't triple taxed.

For example they own gieco. Say gieco makes a profit. Gieco pays a corporate tax on that profit. Then they send the money to the parent company, brk. Brk now pays corporate tax (and dividend tax?) on that same money?</comment>