Remove this in production - <AUTHOR> https://github.com/search?q=%22remove+this+in+production%22&type=Code&utf8=%E2%9C%93 <comment><USER2> These are my favorite Github queries:

filename:id_rsa: [https://github.com/search?utf8=%E2%9C%93&q=filename%3Aid_rsa](https://github.com/search?utf8=%E2%9C%93&q=filename%3Aid_rsa)

filename:secring.gpg: [https://github.com/search?utf8=&q=filename%3Asecring.gpg](https://github.com/search?utf8=&q=filename%3Asecring.gpg)

extension:.pem BEGIN [https://github.com/search?utf8=&q=extension%3A.pem+BEGIN](https://github.com/search?utf8=&q=extension%3A.pem+BEGIN)

<comment><USER3> A nice, quick security audit.

</comment></comment><comment><USER4> The vast majority of GitHub projects are _not_ in production. I'm surprised there aren't more hits, although it is an awfully specific search query.

<comment><USER5> I just got another 4k odd hits with "remove in production" [1]. I think that with enough variation, you can get a lot of hits.

1: [https://github.com/search?utf8=%E2%9C%93&q=%22remove+in+prod...](https://github.com/search?utf8=%E2%9C%93&q=%22remove+in+production%22&type=Code&ref=searchresults)

</comment></comment><comment><USER6> My favorite: "In 2038 I will be either too dead or too rich to care about this"

[https://github.com/libgit2/libgit2/blob/7adca53ed65380266309...](https://github.com/libgit2/libgit2/blob/7adca53ed653802663096b8c2977a03dbe39c601/src/index.c#L2549)

</comment><comment><USER7> Some personal favorites:

proprietary and confidential: [https://github.com/search?utf8=%E2%9C%93&q=%22proprietary+an...](https://github.com/search?utf8=%E2%9C%93&q=%22proprietary+and+confidential%22&type=Code&ref=searchresults)

do not distribute: [https://github.com/search?utf8=%E2%9C%93&q=%22do+not+distrib...](https://github.com/search?utf8=%E2%9C%93&q=%22do+not+distribute%22&type=Code&ref=searchresults)

</comment><comment><USER8> Is anyone else getting tired of these github search posts? It would be nice if they were all in just one post. Actually the comment threads on this post are all that are needed.

<comment><USER3> Yup, tried to get a critical mass going here because, well, there are so many phrases that could be posted individually. I think we've proven that interesting phrases exist in code on Github, and now let's let people discover that on their own and free up space for other types of submissions. ([https://news.ycombinator.com/item?id=11399790](https://news.ycombinator.com/item?id=11399790))

</comment></comment><comment><USER9> A great one for finding potential buffer overflow shenanigans:

"Should be big enough" [https://github.com/search?utf8=&q=%22should+be+big+enough%22...](https://github.com/search?utf8=&q=%22should+be+big+enough%22&type=Code&ref=searchresults)

</comment><comment><USER3> More intriguing, entertaining, and humorous phrases! I'm sure many of have thought, seen, or typed such things (perhaps not committed though).

Let's max out this concept.

1\. "Fire me": [https://github.com/search?utf8=%E2%9C%93&q=%22Fire+me%22&typ...](https://github.com/search?utf8=%E2%9C%93&q=%22Fire+me%22&type=Code&ref=searchresults)

2\. "This will break": [https://github.com/search?utf8=%E2%9C%93&q=%22This+will+brea...](https://github.com/search?utf8=%E2%9C%93&q=%22This+will+break%22&type=Code&ref=searchresults)

3\. "Never do this": [https://github.com/search?utf8=%E2%9C%93&q=%22never+do+this%...](https://github.com/search?utf8=%E2%9C%93&q=%22never+do+this%22&type=Code&ref=searchresults)

4\. "This is evil": [https://github.com/search?utf8=%E2%9C%93&q=%22this+is+evil%2...](https://github.com/search?utf8=%E2%9C%93&q=%22this+is+evil%22&type=Code&ref=searchresults)

5\. "This is insane": [https://github.com/search?utf8=%E2%9C%93&q=%22this+is+insane...](https://github.com/search?utf8=%E2%9C%93&q=%22this+is+insane%22&type=Code&ref=searchresults)

6\. "Insanity will follow": [https://github.com/search?utf8=%E2%9C%93&q=%22insanity+will+...](https://github.com/search?utf8=%E2%9C%93&q=%22insanity+will+follow%22&type=Code&ref=searchresults)

7\. "Why?": [https://github.com/search?utf8=%E2%9C%93&q=%22why%3F%22&type...](https://github.com/search?utf8=%E2%9C%93&q=%22why%3F%22&type=Code&ref=searchresults)

8\. "For the love of god": [https://github.com/search?utf8=%E2%9C%93&q=%22for+the+love+o...](https://github.com/search?utf8=%E2%9C%93&q=%22for+the+love+of+god%22&type=Code&ref=searchresults)

9\. "If I could do": [https://github.com/search?utf8=%E2%9C%93&q=%22if+i+could+do%...](https://github.com/search?utf8=%E2%9C%93&q=%22if+i+could+do%22&type=Code&ref=searchresults) (the hopeful ones)

10\. "What the hell am I doing?" : [https://github.com/search?utf8=%E2%9C%93&q=%22what+the+hell+...](https://github.com/search?utf8=%E2%9C%93&q=%22what+the+hell+am+i+doing%3F%22&type=Code&ref=searchresults) (the confused ones)

11\. "Why doesn't this work?": [https://github.com/search?utf8=%E2%9C%93&q=%22why+doesn%27t+...](https://github.com/search?utf8=%E2%9C%93&q=%22why+doesn%27t+this+work%3F%22&type=Code&ref=searchresults) (more confusion)

12\. "Call me": [https://github.com/search?utf8=%E2%9C%93&q=%22call+me%22&typ...](https://github.com/search?utf8=%E2%9C%93&q=%22call+me%22&type=Code&ref=searchresults)

13\. "Call me maybe": [https://github.com/search?utf8=%E2%9C%93&q=%22call+me+maybe%...](https://github.com/search?utf8=%E2%9C%93&q=%22call+me+maybe%22&type=Code&ref=searchresults)

14\. "Terrible idea": [https://github.com/search?utf8=%E2%9C%93&q=%22terrible+idea%...](https://github.com/search?utf8=%E2%9C%93&q=%22terrible+idea%22&type=Code&ref=searchresults)

15\. "This code is awful": [https://github.com/search?utf8=%E2%9C%93&q=%22this+code+is+a...](https://github.com/search?utf8=%E2%9C%93&q=%22this+code+is+awful%22&type=Code&ref=searchresults)

<comment><USER4> Two of my favorites from Google code I used to work on (one that I wrote myself, and one that I ended up reviewing) were:

"I am going to hell for this."

"If this is not removed by xx-xx-2008, beat me over the head with a shovel." (Seen and removed in 2010.)

<comment><USER3> Heh, those are two rarer phrases:

1\. "I am going to hell for this": [https://github.com/search?utf8=%E2%9C%93&q=%22i+am+going+to+...](https://github.com/search?utf8=%E2%9C%93&q=%22i+am+going+to+hell+for+this%22&type=Code&ref=searchresults)

2\. "Beat me over the head with a shovel": [https://github.com/search?utf8=%E2%9C%93&q=%22beat+me+over+t...](https://github.com/search?utf8=%E2%9C%93&q=%22beat+me+over+the+head+with+a+shovel%22&type=Code&ref=searchresults)

Was an image of a shovel emailed to the committer? :)

</comment></comment></comment><comment><USER10> "ugly but works" has many thousands of results!

[https://github.com/search?utf8=&q=%22ugly+but+works%22&type=...](https://github.com/search?utf8=&q=%22ugly+but+works%22&type=Code&ref=searchresults)

</comment><comment><USER11> [https://github.com/search?utf8=%E2%9C%93&q=%22remove+this+fr...](https://github.com/search?utf8=%E2%9C%93&q=%22remove+this+from+production%22&type=Code&ref=searchresults)

[https://github.com/search?utf8=%E2%9C%93&q=%22remove+from+pr...](https://github.com/search?utf8=%E2%9C%93&q=%22remove+from+production%22&type=Code&ref=searchresults)

</comment><comment><USER12> A lot of them were ".example" which is OK.

And others said "WILL remove this in production" \- i.e. basically a TODO in code which is quite normal for code in development.

Pitchforks down.

</comment><comment><USER13> They're mostly demos, as expected. Is anyone surprised?

<comment><USER3> Nope. Such comments are interesting to see the shared experiences and thoughts while writing code, and others are for snickering at the irony, especially when it's not a demo.

</comment></comment><comment><USER14> I wonder why some of the exact matches are not highlighted in yellow?

<comment><USER15> It seems to depend on the highlighting rules for different languages.

</comment></comment><comment><USER16> Is anyone going to do a search for usernames and passwords?

</comment><comment><USER17> careless developers

</comment><comment><USER18> This is interesting :)

</comment><comment><USER19> haha funny :D

</comment><comment><USER20> While vastly entertaining ( personal fav is "Call Me Maybe" ) does this create a moral obligation to audit some of these repos that might be in prod and alert the owners of possible security flaws?

<comment><USER3> We could check used lyrics for sure...then who owns the code?

Oops I did it again: [https://github.com/search?utf8=%E2%9C%93&q=%22oops+i+did+it+...](https://github.com/search?utf8=%E2%9C%93&q=%22oops+i+did+it+again%22&type=Code&ref=searchresults)</comment></comment>


Today's Internet Still Relies on Arpanet-Era Protocol: The Request for Comments - <AUTHOR> https://spectrum.ieee.org/tech-history/cyberspace/todays-internet-still-relies-on-an-arpanetera-protocol-the-request-for-comments <comment><USER2> The internet was designed according to its ability to 'push' critical DoD 'notifications' and facilitate continuity of governance and command in the event of a large-scale nuclear war where most communications links had already been destroyed or disrupted.</comment>


The Data Science of MathOverflow - <AUTHOR> https://blog.wolfram.com/2019/02/01/the-data-science-of-mathoverflow/ <comment><USER2> I find that wolfram mathematica is incredibly painful to use except for symbolic math. And even then.. the kernel often crashes, syntax (and the combination of how it is entered) is weird, and overall often things (like dynamic graphics) would just stop working altogether. Mind you, I was basically just doing some symbolic functions and manipulate functions.

I can not imagine actually using it with data and more complicated programs. That must be... really tedious.

It's great for solving equations and such, but I seriously wonder why anyone would do "data science" with it.

<comment><USER3> Somewhat offtopic but it is strange that special-purpose languages for scientific computing even exist. It seems far saner to just have these tools available as a set of libraries for a general purpose programming language and indeed the world seems to be heading that way with python as the chosen language.

Maybe when matlab and mathematica were first created the existing dynamic languages were not very good?

<comment><USER4> Fortran was released in 1957 as the first compiled language. Guess what it was for ... scientific computing.

<comment><USER5> I don't think that Fortran was the first compiled language. Wikipedia says the first language to be compiled was Autocode for the Mark 1.

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

</comment></comment></comment></comment><comment><USER6> I don't think I've ever seen the term "data science" used in a sentence like this. Does the word "statistics" not sufficiently describe things anymore?

<comment><USER7> Statistics is "the practice or science of collecting and analyzing numerical data in large quantities"

<comment><USER8> > Statistics is "the practice or science of collecting and analyzing numerical > data in large quantities"

That's not true.

Statistic can analyze data in small quantities you can read up on it with nonparametric statistic. At least half of nonparametric statistic deal with small data (mostly through use of ranking). With Bayesian stat you can just assign a prior distribution.

I think the best way to describe statistic is that it uses data to infer the population. A subset data via sampling and infer a statistic (mean, median, whatever) about the population at large.

More often than not I'm just surprise as to why Data Science is so big when seemingly it seems like statistic does every freaking thing with data. From how to correctly sampling, designing experiment to collect the correct data to answer a hypothesis, making sure the data aren't bias, etc.. It deals with designing the data from inception to end, including either collecting the data or data given to you already. On top of dealing with problematic data such as missing data, imputation, etc..

</comment></comment></comment><comment><USER9> Although a very cool and thorough approach to the data, it's very _complicated_ code-wise and doesn't help sell the Wolfram Language. (Python/R admittingly can't do as much with LaTEX equations formatting for data analysis/visualization.)

<comment><USER10> Mathematica user here. It is nice that the Wolfram language has an insane amounts of builtin features (graphics, charts, massive amount of math functionality, tables, database stuff, GPU, 3D printing, blockchain, audio analysis, web scraping, one load function that can interpret over 100 different file formats...etc) it is insanely powerful for a lot of things.

Some of the drawbacks are that it is closed source, costs money (although cheap as far as this kind of software generally goes), but most importantly the succinct benefits of the language can make it painful to deal with. Yes, I can probably write 3 lines to do something that would take a 1/2 page of Python, but I first need to know which of thousands of functions to use and the eccentricities of the language. I'm sure Wolfram employees are that skilled, but I'm not and will not be anytime soon.

With that being said, I spent a few hours writing a notebook demonstrating key fundamental and scientific formulas in my industry this weekend. It was easy and the resulting code, pictures, and graphs look fantastic. I exported it as a PDF for others to use. Even the console is pretty cool. I think it would be a very popular language and environment if it was free and open source. Another problem is running something in production. My solution is to not even bother and just write the final solution in Julia if I need it. I think Mathematica really makes sense though if you're at a lab where everyone else uses it and can pass around Notebooks. In short I really like having it around, but don't like dealing with licensing issues.

</comment></comment><comment><USER11> I didn't know Wolfram Language had support for RDF and SPARQL!

I'm always baffled by the expressiveness of the language. I think the platform is extremely underrated. How is it not the silver bullet we're all looking for?

<comment><USER12> It's closed source, for starters.

</comment></comment><comment><AUTHOR> It would be nice to see versions of this analysis in other languages such as Python.

<comment><USER11> I would like to see a version with Javascript and [http://observablehq.com](http://observablehq.com).

<comment><USER13> I would like keep js out of data science. Why should anyone like this?

<comment><USER11> JavaScript is ruling the world and will soon replace Python for AI-related stuff.

<comment><USER13> It won't. Scientific computing is not web development, python probably replaced by a saner language, like Julia, but js is not saner anyway. It's little messy language that becomes bytecode of browsers.</comment></comment></comment></comment></comment>


Catch 22: You Don't Have Barriers Until You Scale - Can You Raise Capital?  - <AUTHOR> http://www.markpeterdavis.com/getventure/2009/12/catch-22-you-dont-have-barriers-until-you-scale-can-you-raise-capital.htmlhttp://www.markpeterdavis.com/getventure/2009/12/catch-22-you-dont-have-barriers-until-you-scale-can-you-raise-capital.html

<comment><USER2> Correct link: [http://www.markpeterdavis.com/getventure/2009/12/catch-22-yo...](http://www.markpeterdavis.com/getventure/2009/12/catch-22-you- dont-have-barriers-until-you-scale-can-you-raise-capital.html)</comment>


Facebook's badly received Japanese TV comercial - <AUTHOR> https://www.youtube.com/watch?v=fZTu_S3-sn0

<comment><USER2> Can someone explain why this is badly received? I don't speak Japanese but it seemed fine to me.</comment>


How SV Startup Ifeelgoods Prevents Fraud Using Social Data - <AUTHOR> http://g33ktalk.com/?p=41

<comment><AUTHOR> As always, any/all feedback much appreciated by the HN community.</comment>


Design Patterns in Dynamic Languages (1996) - <AUTHOR> https://norvig.com/design-patterns/ <comment><USER2> [https://news.ycombinator.com/item?id=20468164](https://news.ycombinator.com/item?id=20468164)

</comment><comment><USER3> I wonder if there is an updated version of this wonderful resource by Norvig. I read it about 12 years ago, and I still found it so useful. In general, all the work by Peter Norvig is so clear, simple to read, and enjoyable.

</comment><comment><USER4> I would love a guide to design patterns in dynamic languages that doesn't presuppose a familiarity with design patterns in static languages. Most of the design pattern guides I've read, it tried to read, follow this same assumption.

I suppose a workaround would be to learn a static language well enough to understand the need for the full set of design patterns, and then read a guide like this, but it seems like there should be a more elegant way.

<comment><USER5> Harry Percival's upcoming Python book might interest you, although I think it's focused more on patterns for structuring the application than patterns for the small details: [https://www.cosmicpython.com/](https://www.cosmicpython.com/)

<comment><USER3> Cool. I'll take a look at the book. I was specifically interested in Python design patterns. I still remember the talk from Alex Martinelli at Google: [https://www.youtube.com/watch?v=0vJJlVBVTFg](https://www.youtube.com/watch?v=0vJJlVBVTFg), and I just saw there is an updated version: [https://www.youtube.com/watch?v=LeuChRCByZc](https://www.youtube.com/watch?v=LeuChRCByZc)</comment></comment></comment>


What If the Moon Were Bigger? - <AUTHOR> https://fivethirtyeight.com/features/what-if-the-moon-were-bigger/ <comment><USER2> The article mentions that the rotation of the Earth has slowed down over its history as energy has been transferred to the Moon and increased its orbit, a process that continues today at a rate that we are able to measure.

It failed to mention an awesome confirmation of this process from the fossil record, which is one of my favorite facts to bring up with young-earth creationists: there are fossil corals with both daily and annual growth indicators, and the older you go, the more days you'll find per year. And the math matches up to what you'd expect to see from a steady rate of losing about 1 second every 50,000 years, thanks to the Moon.</comment>


Don't Worry About Content Farms: The Web Has Always Been Filled With Crap - <AUTHOR> http://techdirt.com/articles/20100708/01430610119.shtml <comment> bsnss-mn-cdr A lot of people scream loudly and organize an authoritative body to 'validate' or determine the 'quality' of services, or content, in many industries... They are normally called an 'agency' or a 'cooperative' where members apply, become accredited and then get the right to use a trademark, or other protected mark, in their advertisements. This method only works when there is a restricted outlet for those services ( such as a newspaper who only puts in stories they want or a directory of 'accredited' service providers supplied by the org that does the 'accreditation' ) or when it is such a specialized service that it is in the ENTIRE groups best interest to protect their skills ( nuclear welding comes to mind ). The reason this will never work on a large scale on the internet is because there are over 180 counties where billions of new digital content items are created every day ( See Google Blog post: [http://googleblog.blogspot.com/2008/07/we-knew-web-was- big.h...](http://googleblog.blogspot.com/2008/07/we-knew-web-was-big.html) and this was in 2008... ) and it is not in EVERYONES best interest to have a singular body 'validating' the 'quality' of every piece of content. The human resources alone to accomplish this task are not economically feasible and the 'quality' of any one individual's writing is just like art, in the eye of the beholder.

</comment><comment><USER2> Does this foreshadow what having true AI would be like? It seems it's better to be in the business of automating being human than being an actual one.</comment>


Show HN: Vimer - Convenience wrapper to open files in existing instance of GVim - <AUTHOR> https://github.com/susam/vimer <comment><USER2> This tool opens files in new buffers by default. I like to open files in new tabs. So I'd prefer new tab as default. But MacVim also adds "New MacVim Buffer Here" context menu option to open files in new buffers. Why is new buffer the default everywhere? Why new tab isn't the default?

</comment><comment><USER3> Honest question: What is the benefit of using this over a simple alias like:

      alias timer='gvim --remote-silent'

Looks like the alias would do the same thing.

<comment><AUTHOR> This has been explained in the "Necessity" section of the README at [https://github.com/susam/vimer#necessity](https://github.com/susam/vimer#necessity) (see the 2nd point).</comment></comment>


Using Vagrant and Chef for Reproducible, Isolated Rails Development Environments - <AUTHOR> http://gofullstack.com/articles/using-vagrant-and-chef-for-reproducible-rails-development-environments.html

<comment><USER2> This is pretty much what I do when developing as it's a good idea to make your dev environment as close to production as possible.

I do however substitute chef for ansible as I found chef difficult to use on a single server (chef-solo was flakey) and bootstrapping is a pain.

For writing anisble playbooks to use with Vagrant I found the following post very useful - [http://hakunin.com/six-ansible- practices](http://hakunin.com/six-ansible-practices)

<comment><USER3> I have the same setup. Vagrant for VMs with an Ansible provisioner. I reuse about 80% of my playbooks between production and development, and the places they differ is primarily in setting up my dev environment nicely with the shell and SSH access to prod and all that. It really helps to have everything both locally and in prod "disposable"... a couple of times I've run into hairy slightly strange behavior locally and it's great to be able to blow it away, run "vagrant up" again and in 20 minutes have a pristine, matching-prod dev environment.

</comment></comment><comment><USER4> Just want to point out that if you're using an encrypted filesystem, vagrant up will fail if NFS is enabled. The workaround is to use rsync to maintain the synced folders, a feature introduced in Vagrant 1.5. Just use vagrant rsync- auto to keep the guest folder in sync automatically with your local folder. If you modify files within the VM (like with a bundle install that modifies your Gemfile.lock or with rails generators), I recommend installing the vagrant- rsync-back plugin ([https://github.com/smerrill/vagrant-rsync- back](https://github.com/smerrill/vagrant-rsync-back)).

<comment><AUTHOR> Good to know. My filesystem is encrypted, running Mac OS X Yosemite, and it does work but I know there are a few other cases where NFS will crap out. As I mention this setup is pretty naive but could see making NFS optional using environment variables. That plugin looks pretty cool though, will look into it.

</comment></comment><comment><USER5> We use this at work and it's awesome. Solved a lot of big problems and a lot of little problems, like "works on my machine but not prod" and rebuilding your dev env when you switch machines. etc.

The one thing that became a problem was managing vmware (the plugin is a closed source one, so it was hard to debug any issue that came up with it - easily solved by writing our own open source one)

</comment><comment><USER6> My workflow is very similar, except with Vagrant + SaltStack for all my development images, which has saved me _so_ much time when bringing new developers onto a project. Thumbs-up.

One thing that's bitten me a few times is case-sensitivity when using NFS and HFS+ -- still wishing I could find a solution that didn't require setting up an additional partition on my host machine.

</comment><comment><USER7> I tried using Vagrant on my company Macbook but found it much slower than just running everything on OSX. Does anyone have any tips for improving the performance?

<comment><AUTHOR> If you haven't tried it with NFS that'd be the first place to start, it makes a _huge_ difference.

</comment></comment><comment><USER8> I use a fairly simple bash script to initialize my rails vagrant instances. Total of 34 lines including comments and didn't require learning any new config tools.

While I'd favor using proper config management this was a much better use of my time.

<comment><USER9> Those 'quick n dirty scripts' will work for you (and work well) but when others need to rely on them it gets messy. At my company we have 50 developers and everyone relies on "Jeff's script". No one really touches it because no one really gets it and Jeff might move across the country soon. :(

</comment></comment><comment><USER10> We're using Fig (and docker-osx) for this. One command to set up the environment and another to bring in a database copy. I recently formatted and upgraded to Yosemite and was able to get back to work in under a half hour.

</comment><comment><USER11> Haha I was literally studying this yesterday. Vagrant Cloud's search function is surprisingly broken, it was surprisingly hard to find a box running Ubuntu Trusty, Rails 4.1 and rbenv.

</comment><comment><USER12> I may be missing something, but isn't this what Docker is for?

<comment><USER13> Things have changed some since these answers were posted, but answers 2 and 3 here are written by the authors of vagrant and docker, respectively.

[http://stackoverflow.com/questions/16647069/should-i-use- vag...](http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or- docker-io-for-creating-an-isolated-environment)</comment></comment>


Why you should never feel threatened by an Indian programmer - an Indian speaks - <AUTHOR> http://susam.in/blog/infosys-tcs-or-wipro/

<comment><USER2> "The rest 199 do not understand why a bitcount of 1's complement of bitwise XOR of two variables would give you the number of similar bits in corresponding positions in both variables"

That seems like a pretty skewed test of what makes someone a "real engineer".

<comment><AUTHOR> That alone is definitely a very skewed test of what makes someone an engineer. But the author writes:

"The rest 199 do not understand why a bitcount of 1's complement of bitwise XOR of two variables would give you the number of similar bits in corresponding positions in both variables, why one can not create a regular expression to match only strings with balanced parentheses, or how to find the shortest chain of connections between two friends in a tiny social network. Note that I have used 'or' as the conjunction and not 'and'."

If I understood it correctly, anyone who knows at least one of those three problems passes your hypothetical test. This is not very skewed IMHO. If someone doesn't understand either one or two of those things, he may be a good engineer. But do you think any programmer worth his title would not know all three of those?</comment></comment>


Maud: a fast, safe template engine for Rust - <AUTHOR> http://lfairy.gitbooks.io/maud/content/ <comment><USER2> It's interesting to see how Maud's approach uses syntax extensions, in contrast to the less-powerful (but more stable) macro-based approach that Horrorshow uses: [https://users.rust-lang.org/t/horrorshow-a-no-longer-poc- htm...](https://users.rust-lang.org/t/horrorshow-a-no-longer-poc-html- template-library/1603)

I also wonder if Maud could benefit from the Syntex library ([https://github.com/erickt/rust-syntex](https://github.com/erickt/rust- syntex)) which uses a fork of Rust's (currently unstable) parsing library to enable syntax extensions to work on the stable Rust release via code generation.

</comment><comment><USER3> Very glad to see this. I've used type-safe templates in Haskell, and I've been hoping to see something similar in Rust. It looks like Maud has good defaults as well, such as escaping HTML by default.

I wonder if it would make sense to have splicing of previously created Maud values _not_ escape them. That seems like the most common case where you'd end up using $$ otherwise: piecemeal generation of HTML fragments. Since Maud has a special type to represent the result of a template, it could recognize that type in a splice.

Also, the need to handle control structures inline (such as $if and $for) seems like it could be replaced with a mechanism to splice in arbitrary Rust code of the appropriate type. Because otherwise, Maud would need to handle things like $match.

Props for the name and documentation as well.

<comment><USER4> In what way is the "Maud" name appropriate? I mean, I like it, but your comment makes me wonder if there's more to it. All I can think of is that Tennyson poem... I guess it's been described as "ironic"!

<comment><USER3> It doesn't necessarily match the software, but if you read the documentation, the source of the name (and many others) should quickly become evident.

</comment></comment></comment><comment><USER5> Oh, an _HTML_ template engine, like PHP. Not a Rust code generator, like "go generate". The HN article title should specify that.

</comment><comment><USER6> I started (and put aside) quite some times ago something with the similar approach, i.e using syntax extension but to actually write "real" html, in a template-language flavor

[https://github.com/allan-simon/rust-http-template](https://github.com/allan- simon/rust-http-template)

I first wanted it to be used with Iron, but unfortunately I lost motivation when I saw that syntax extension will not be part of 1.0 . if people are interested I can revive it.

</comment><comment><USER7> In "basic syntax" I suggest you to move the doc about "Splices" after "Elements", since the latter it's used in the former example (or even later since it's more complex than other things).

</comment><comment><USER8> I wonder if there is a way to write a macro library that can use regular `if` and `for` instead of `$if` and `$for`.

<comment><USER6> if you write a syntax extension, you can use if and any other rust keywords / operator / token (see the template language i started which use if directly)

<comment><USER9> The one thing I like about React's JSX "html in javascript", is that it lets you reuse all of the host language (javascript in React's case) control structures.

Otherwise Maud has to re-implement if/then/else, iterator methods, etc. But perhaps you could use 'if/then' and other structures inside a $() block.

</comment></comment></comment><comment><USER10> sorry to high jack the topic, whats the big deal with Rust? I have heard it has memory safety, but are the language syntax and standard library stable?

<comment><USER6> just my opinion, but at first I was mostly a C/C++ developer, I like the idea of controlling everything and not wasting memory, and the idea of being really fast as well as the idea of compile time type checking . But for a living I have to write websites/webservices etc. so most I have to use PHP etc.

So Rust is hype (let's admit it, new is always better, like your new toy for christmas) and its standard library come with enough webservices-friendly things to make it sexy to develop small webservices with it. Also it introduces a lot of interesting features (functionnal programming, immutability by default, primitives to write parallel code) in a C-syntax language that was before in some more exotic language.

<comment><USER11> Learning Rust is just fun. The Rust book teaches me thread safety in the first place through the ownership and borrowing system.

And I am going to see more titles about Rust with "fast and safe". But it doesn't mean the program is stable. :P</comment></comment></comment>


Why we are crazy enough to build another Help Desk Software - <AUTHOR> http://blog.supportbee.com/2011/07/13/why-we-are-crazy-enough-to-develop-another-help-desk-software/

<comment><USER2> Enterprise help desk tool design manifesto:

* Screen should always be filled with buttons and menu options which are never used or understood.

* We love Google and feel search belongs to them so we go to that extra mile to make searching hard.

* Email Integration will make life easy for the support staff so lets make it impossible.

* Support staff is lazy so lets force them to click at least 5 buttons before they are allowed to make an update. By making them click though those button we are bringing them back to reality.

* We love excel so lets make reporting so tough that Microsoft excel stays in business forever.

* Categorization should be multilevel so Support staff should always end up categorizing it wrong. Remember we love Google.

* Of Course our hidden agenda is to sell our support and consulting services.

<comment><USER3> An interesting corollary that we have observed is that after using such softwares for many years, organizations start believing that there support workflows (and hence the tools they use) have to be complex. Anything simple will just not do :)</comment></comment>


Redis weekly update #6 - 2.2 and VM - <AUTHOR> http://antirez.com/post/redis-weekly-update-6.html <comment><USER2> Please bring support for windows. @ keytweet.com we are compiling the source against cgwin. I have been using redis in place of mysql for certain tasks. I don't think I would go full redis unless the virtual memory could write keys to the filesystem as well. Hard disks are always going to be bigger than ram and machines with gigs of ram are expensive. Thanks for the hard work. We're making good use of redis

<comment><USER3> why Windows? Redis is a service over socket, thus, you can have a *nix box running Redis and talk to the box with your asp.net/c# I suppose. Windows has a very different socket model, I think that supporting Windows will scarify to much for Redis.

<comment><USER4> Windows has pretty the same socket model, from BSD. The difference is in the I/O event notification facility, for asynchronous network programming one would use "epoll" in Linux, "kqueue" in FreeBSD, they are conceptually pretty similar, while Windows has only the classic "select" and "poll", maybe something new windows-only thing (IOCP?) as well, but who cares.. Free Software rule.

<comment><USER3> iocp and epoll is the difference I am talking about.

</comment></comment></comment></comment><comment><USER3> When will be a good time to update from 1.26 to 2.0? It is always a good idea to have VM when I am planing to dump all logs to redis as well.

<comment><USER5> 2.0.0 is Release Candidate 2, and there are no critical bugs since months, so I guess it's ok to use it.</comment></comment>


Mysterious 'Error 53' is bricking iPhones, rendering them useless - <AUTHOR> http://mashable.com/2016/02/05/iphone-error-53/ <comment><USER2> "...after having their home buttons repaired by non-Apple authorized technicians"

Enough said.</comment>


America's Real Criminal Element: Lead - <AUTHOR> http://www.motherjones.com/environment/2013/01/lead-crime-link-gasoline

<comment><USER2> This is a tour de force of reporting on empirical research in an area that could hardly be of greater social importance. Drum deserves 100x more attention for this than he got for breaking the Romney 47% video in September.

Concidentally via [http://election.princeton.edu/2012/12/22/scientific- american...](http://election.princeton.edu/2012/12/22/scientific-americans- gun-error/) from a couple weeks ago, here's a link to Reyes' paper on the lead/crime theory:

<http://www3.amherst.edu/~jwreyes/papers/LeadCrimeBEJEAP.pdf>

And here's a striking critique of the Freakonomics abortion/crime theory, which I suppose most people here have heard of:

<http://www.economist.com/node/5246700?story_id=5246700>

Someone inspected Donohue and Levitt's code and found a bug that meant they hadn't controlled for what they claimed they had. "Fixing that error reduces the effect of abortion on arrests by about half, using the original data, and two-thirds using updated numbers."

<comment><AUTHOR> Slight nitpick - David Corn, the DC Bureau Chief broke the 47% video.

But yeah, Kevin Drum does great work.

> And here's a striking critique of the Freakonomics abortion/crime theory, > which I suppose most people here have heard of:

I have not heard of this! Thank you for sharing!

<comment><USER2> Bah, you're right! "David Corn", "Kevin Drum" — I plead isomorphic syllables and similar ideologies. But I'm still an idiot. Thanks.

<comment><AUTHOR> It's impossible to be an idiot and read MJ. Cheers!</comment></comment></comment></comment>


Language Learning Difficulty for English Speakers - <AUTHOR> http://en.wikibooks.org/wiki/Language_Learning_Difficulty_for_English_Speakers <comment><USER2> Four out of five of the most difficult languages are east Asian; not too surprising there. The fifth, however, is Arabic, which I didn't anticipate.

Anyone know why it's apparently dramatically more difficult for a native English speaker to learn Arabic compared to other languages which would seem (to me, at least) equally remote from English in terms of geography, syntax, phonology, and lexicography?

<comment><USER3> _Anyone know why it's apparently dramatically more difficult for a native English speaker to learn Arabic compared to other languages which would seem (to me, at least) equally remote from English in terms of geography, syntax, phonology, and lexicography?_

I might hazard some informed response on that, as a native speaker of English and student in classroom instruction at various times of German, Russian, Modern Standard Chinese, Cantonese, Literary Chinese, Biblical Hebrew, Attic Greek, Biblical Greek, Taiwanese, Japanese, and Hakka. But what other languages did you have in mind that seemed to be rated as surprisingly easy by contrast with Arabic?

P.S. Being quite the language hobbyist, I have also self-studied a variety of other languages, including several more that are on the list included in the submitted article. Modern Standard Chinese is by far my strongest acquired language, but I would agree that it does not come easily for a native speaker of English--and arguably not for most native speakers of Sinitic languages.

[http://news.xinhuanet.com/english/2007-03/07/content_5812838...](http://news.xinhuanet.com/english/2007-03/07/content_5812838.htm)

<comment><USER2> _I might hazard some informed response on that, as a native speaker of English and student in classroom instruction at various times of German, Russian, Modern Standard Chinese, Cantonese, Literary Chinese, Biblical Hebrew, Attic Greek, Biblical Greek, Taiwanese, Japanese, and Hakka. But what other languages did you have in mind that seemed to be rated as surprisingly easy by contrast with Arabic?_

Disclaimer: I am almost completely uninformed about other languages beyond assorted superficial details about a handful. That said, I would have expected Arabic to be of no greater relative difficulty than, say, Hindi, Persian, Hebrew, Mongolian, or such.

I mostly expected Mandarin, Cantonese, and Japanese to be of greatest relative difficulty, from what little I know about those languages, and would have expected Arabic (and many other languages) to be in the second category.

<comment><USER3> What's brutal about Chinese for a native speaker of English is phonemic tone for speech and lack of cognate vocabulary, coupled with a writing system that reflects a stage of development of writing from 2,000 years ago. But what is forgiving about Chinese is that the grammatical relationships are mostly shown by word order and function words, as in English, rather than by inflection of words. That, to me at least, makes speaking Chinese "easier" than speaking Russian, even though Russian is much more cognate with English.

Arabic may be especially difficult (even as compared to Hebrew, a language I have studied much more) because the standard form of the language is so divergent from the day by day vernacular forms, as noted by a more informed participant who has kindly posted another comment.

The United States federal government language proficiency rating system attempts to identify equal levels of real-world functional proficiency for ratings of interpreters and the like. When I was last tested, the rating scale went from 0 (with a readily apparent meaning) to 5 (a rating in principle reserved for educated NATIVE speakers of the language) in the functional domains of speaking, listening, reading, and writing. I was quite proud of my 4+ rating in speaking and listening to Modern Standard Chinese, but I took quite a few years out of my life to get to that level, as have most westerners I have ever met who have done the same.

<comment><USER4> Is the state of development of writing from 2000 years ago referring to the Chinese or Latin alphabet?

<comment><USER5> The Latin alphabet, or rather Phoenician, from which Hebrew, Arabic, Latin, Greek and Cyrillic scripts are descended, is more like 3500 years old.

<comment><USER3> But both the specific letter forms of the Roman alphabet and, more relevantly, the general spelling patterns of English are much more recent than that (as they would have to be). But, yes, writing is more ancient in the Near East than it is in China, for sure. It's just that it has gone through more language-specific adaptations, especially in the direction of exhaustively spelling all speech sounds with a minimal number of writing characters, than writing in China has.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> Having acquired Finnish (twelve years ago) and German (in the last two years), coming from a Bulgarian background, I've been thinking about language transfer. I don't think this list is very specific to English.

My own limited inquiry into the matter (collecting general opinions from people who have learned foreign languages and ordering them by subjective difficulty) seems to generate a list where difficulty correlates strongly with distance from Latin. I suspect this is related to the way languages are taught, rather than the way they are structured. Our formal grammars appear to fit Latin very well, probably for historical reasons. Here's some ideas:

1\. Finnish is known worldwide as a difficult language to learn. It has an extremely complex grammar (when put in Latin terms). Finnish-born children acquire Finnish in about the same time Spanish-born children acquire Spanish, but Spanish adults have much more difficulty learning Finnish than Finnish adults have learning Spanish. This suggests that teaching methods might favour Latin-like languages. A further supporting data point is that foreign people living in Finland who take Finnish courses do better at tests than people who don't, but take much longer (many years) to start actively using Finnish in casual situations (conversation) and are never as comfortable as people who acquire it without courses. This might of course be a factor of what kind of people take courses.

2\. Finnish sentences are structurally some of the simplest, possibly the simplest of any European language.

3\. The European languages furthest away from Latin appear to have the most complex case systems. Cases appear to be a hack to fit a language into a Latin grammar. Cases in point are Russian, Hungarian and Finnish.

4\. Constructing a Finnish grammar that is almost entirely correct is possible without the use of cases.

5\. This sort of grammar is more than sufficient for everyday casual communication.

This leads me to think that people who take Finnish courses might be too afraid of making mistakes to actually communicate. People who don't know they're "doing it wrong" focus more on the result of communication rather than the formal correctness. I know I am consciously ignoring a lot of the grammatical rules in German, but I can communicate in it freely. Native German speakers may get confused by me switching cases and articles at times, but I am always understood. I tend to prefer German to all other languages I know (all of which I have used for many more years than German) when speaking to native German speakers. I wonder how the list in the OP would look like if the target was a "conversation-sufficient" subset of the language. This would be much more meaningful than "general proficiency" (and much less testable).

<comment><USER7> When you go to school in Sweden, you get taught a Swedish grammar that is also slightly wrong, but one that makes Swedish to be closer to Latin than what it is. The purpose of this is to make it easier to learn the other big European languages like English, German, French or Spanish.

However, if you take linguistics at university level in Sweden, the first thing they tell you is to forget everything you were taught earlier, because a lot of it is wrong.

I'm really curious if this actually works, if it really makes it easier for kids to learn the other languages by learning a wrong version of grammar for their own language.

<comment><USER6> Actually, I meant it the other way around. Teaching a grammar that is constructed from the language, not one that fits better to Latin. I think it would help if each language was thought with a specialized grammar for that language rather than through subsets and hacks on top of a "universal" one.

</comment></comment></comment><comment><USER7> It would be very interesting to see this list from the perspective of other languages. This list only shows their "distance" from English and not from each other, but would it for example be easier for a Chinese person to learn Japanese or English?

And if you take it further, could you make a generic ranking list and see which languages are generally the easiest to learn?

<comment><USER8> Here in Taiwan, I meet tons of Mandarin speakers learning Japanese. In general, I'd say it's pretty easy for them. There are a limited number of sounds in Japanese only a few of which pose difficulty for Mandarin speakers and the kanji are a slightly simplified version of Chinese characters.

There are a _lot_ of cognates between Chinese and Japanese, there's a good deal of overlap in terms of history, food and religion and best of all there's nearly as much Japanese media available for those who want it as there is English media.

However, the Japanese people I've met here studying Mandarin usually have a tough time of it. They can usually read pretty well, but their pronunciation and general communication abilities tend to be far worse than those of the students of every other nationality I've met at the language centers. The difference was absolutely shocking when I first started studying here.

</comment></comment><comment><USER5> Their "languages closely related" is way off. They should have just labeled it "easy languages", since that's apparently what they mean. Icelandic, in the third category, is uncontroversially more _related_ to English than most of the (predominantly romance) languages in the first category, as English and Icelandic are both Germanic languages.

<comment><USER9> While grammatically, English is Germanic, it did borrow a ton of vocabulary from French after the Norman invasion, so from a lexical perspective it's related to the romance languages by proxy.

<comment><USER5> Yes -- and it also inherited French-style plurals (blessedly), and I believe is the only Germanic language with a gerund.

</comment></comment></comment><comment><USER10> I like the way they've arranged all the vocab, pronounciation, grammar links together for each language in a nice organised fashion.

I'm a little skeptic though of their classification of difficulty. I understand that they're categorising it based on English being a starting point, but after a certain level of proficiancy (what most people would classify as "intermediate" level), language learning just becomes a matter of constant exposure. I'm sure this would hold equally for both French or Japanese (apart from writing).

<comment><USER11> Yes, but it still requires _more_ exposure for the more difficult languages.

</comment></comment><comment><USER12> I am by no means proficient in anything other than my first language, but I found other languages _much_ easier to start on once I'd learned lojban. it "untaught" lots of things that I took for granted, and gave me some new structures and ideas that served me in good stead.

It is said that your first acquired language takes four years, subsequent ones take two each. Lojban takes about six months. Perhaps if you want to learn a language, learn lojban first.

<comment><USER9> They've actually done studies on that - not with lojban, but with another simple constructed language: Esperanto. They found that students studying Esperanto for a year followed by French for 3 years fared better than students studying French for 4 years:

<http://en.wikipedia.org/wiki/Esperanto#Language_acquisition>

<comment><USER3> Any such claim about Esperanto should be regarded as a claim that needs further verification.

<http://norvig.com/experiment-design.html>

<http://www.xibalba.demon.co.uk/jbr/ranto/>

Anyway, it is very doubtful that such a claim, even if true for speakers of English learning French in England, would be true for speakers of Chinese learning Japanese in China (or the other way around) or for any number of other likely pairs of native and acquired languages.

<comment><USER9> I only mention the Esperanto studies because (1) they seem to confirm RiderOfGiraffes' intuition (2) AFAIK Esperanto is the only auxlang for which such studies have been done.

I suspect similar effects could be found with lojban, and would love to see more research in that area. However AFAIK no such research currently exists.

I read the _ranto_ ages ago and while it makes many good points, none of them are particularly relevant to the suggestion that the studies were faked. In fact imperfections like sexism could be advantageous if the student then proceeds to a similarly sexist European language (i.e. most of them).

</comment></comment></comment></comment><comment><USER11> I wonder what is meant by general proficiency?

</comment><comment><USER13> I'm surprised that Arabic and Hebrew aren't in the same category.

(disclaimer/foonote: I'm a native speaker of Arabic)

<comment><USER4> A relative lack of dialectical variation in Hebrew might explain it.

<comment><USER13> Thanks, hadn't even considered that!

</comment></comment></comment><comment><USER14> Everybody in India can speak minimum 3 languages.

</comment><comment><USER15> Interesting list. I can certainly agree that Russian is a difficult language to acquire for native english speakers; far harder than Spanish.

I am curious, however: has anyone found nonobvious ways to make money with language skills (obvious meaning translator, etc)? While some of these, esp eg Arabic or Russian, might be very interesting to learn, and it would probably be a great experience living in an Arabic speaking country, there are high costs -- the education and the time living in a country and not getting much done but language courses. What are good ways of making this a financially sound thing to do, or will it always be solely a cultural experience?

<comment><USER3> In general, the return on investment for a native speaker of English learning any language as a second language is lower than the return for the same person learning a lot of mathematics. People who don't know English usually find better gains by learning English, but they still have to learn some other career skill as well. The least expensive and most effective way to learn a language is to learn a bit of it before foreign residence (so that you'll live in fear of not knowing the language, and study hard) following that by foreign residence and continued part-time focused language study while working and participating in the culture in the new country. And that's just how a lot of second-language speakers of English reach very high levels of proficiency in English.</comment></comment>


Bamboo: An open-source real-time data analysis system - <AUTHOR> http://bamboo.io/docs/index.html

<comment><USER2> The name is not a good choice I believe as Atlassian's CI system is called the same.

<comment><USER3> They also have Stash, which is named after the "git stash" command. I guess we can just call the CI system, Atlassian Bamboo.

<comment><USER4> Yes, and while Atlassian's Stash bears the same name as the git command, bamboo.io has nothing to do with continuous integration or Wacom tablets or any such related software. I'm going to keep calling Bamboo bamboo and if I ever need to refer to this project, I'll call it bamboo.io.

</comment></comment></comment><comment><USER5> I'm currently really struggling against the limits of my analytics provider(mixpanel) and this looks like it might be a great alternative(we've already built our own GUI on top of mixpanels engine). I don't recall seeing any similar projects, have I missed a good one or is this the first of a new breed?

<comment><USER6> Currently evaluating mixpanel... curious what you are you struggling with?

<comment><USER5> Admittedly it's a fairly advanced usage for analytics, but the limitation we've found is that you can only use one value as a unique identifier e.g. you use a user's account number as a unique id for a visit but then if you want to calculate the conversion rate in a funnel all visits by that user have the same id and so there's no way to calculate the conversion rates per visit. It means you have to choose your events and properties incredibly carefully and often it means you have to record the same events multiple times with different values just so that you can run the calculations in the right way. This would be fine except that mixpanel isn't exactly cheap per data point.

Beyond this the other major sticking point is that you can't update data points. You have to get them right first time otherwise you need to blow the whole database away and start again. Depending on your requirements this can be an absolute killer. We've now resorting to using a version id in the event names so that we can blow the old series away (via hiding) and then repopulate using fresh data, far from ideal.

It's really frustrating because overall I think mixpanel has a fantastic product. Not being able to update data points and only being able to use one property as a unique identifier is proving to be a real PITA though. People have been asking for these things for years as well and there just doesn't seem to be any willingness in the team to address these fairly fundamental issues. I'd absolutely love to keep using them but having seen bamboo.io it's starting to get more difficult to justify the loyalty.

</comment></comment></comment><comment><USER7> there is also LIBRE = Libre Information Batch Restructuring Engine [https://github.com/commonwealth-of-puerto- rico/libre/](https://github.com/commonwealth-of-puerto-rico/libre/)

</comment><comment><USER8> What am I missing on the example [1] page? It claims to be interactive, but all I see is a static map image.

1\. [http://bamboo.io/docs/examples.html#an-interactive-map-of- th...](http://bamboo.io/docs/examples.html#an-interactive-map-of-the-egyptian- election)

<comment><USER9> Hi alphakappa, we had used an image because the original did not have a permanent home, but now it does. The image is now replaced with an iframe, [http://bamboo.io/docs/examples.html#an-interactive-map-of- th...](http://bamboo.io/docs/examples.html#an-interactive-map-of-the-egyptian- election), also here is the map site [http://sel- columbia.github.io/egypt-2012/](http://sel-columbia.github.io/egypt-2012/)

</comment></comment><comment><USER10> I meant to say, this project is probably excellent idea struggling to get across... now I see it is open source.

It could use site that would explain faster what it does and to whom it is targeted for. There is definitely need for this, this just needs to be presented better.

</comment><comment><USER11> how is the data stored, is it just aggregated with mongodb's "aggregate" command?

<comment><USER9> Hi lerchmo, writer of bamboo here, the data is stored column-wise in mongo, aggregates are calculated with pandas, hence the name of the library. This is a prototype and using pandas let us quickly perform many common statistical operations. In a future version we plan to decouple the processing engine so we can push calculations into the db layer as appropriate.</comment></comment>


Tableau's Covid-19 Data Hub provides trustworthy data visualizations - <AUTHOR> https://public.tableau.com/en-us/s/covid-19-viz-gallery <comment><AUTHOR> Tableau is working hard to promote their COVID-19 Data Hub to the world. There's good reason too -- There are many misinformed, incorrect, or inaccurate displays of COVID-19 data being presented to the world. Tableau is committed to providing both clean, accurate, trustworthy data sets which any individual can use to produce visualizations. Tableau also carefully reviews all visualizations prior to adding them to the data hub.

See [https://www.tableau.com/covid-19-coronavirus-data- resources](https://www.tableau.com/covid-19-coronavirus-data-resources) for full information!</comment>


Drunken Nation: Russia's Depopulation Bomb - <AUTHOR> http://www.worldaffairsjournal.org/2009%20-%20Spring/full-Eberstadt.html <comment><USER3> This article is complete and utter bullshit.

"history offers no examples of a society that has demonstrated sustained material advance in the face of long-term population decline"

Of course it does: Russia, from 1999-2007. For most of the last decade, Russia was the fastest growing economy in the G8. And it may have been growing even longer than that if you discount the contribution of the sudden drop in weapons production after the fall of the Soviet Union.

<comment><USER4> Much of this growth came from spiking commodity prices, particularly oil and natural gas. That's not long-term sustainable. High energy prices masked the structural problems Russia faces. Now that's over.

<comment><USER3> Does anyone bother to even look up the most basic facts before making proclamations any more? Oil prices were prety much flat through 2003. The rise of oil certainly helped, but you can't explain eight years of growth starting in 1999 with four years of oil price rises starting in 2003.

<comment><USER4> Two things. Developing economies generally have higher rates of growth than more advanced ones, so the fact that Russia had higher rates of growth than the seven most advanced economies in the world is fairly meaningless. In fact, there was debate at the time about whether the G7 should expand to include Russia, since Russia's profile didn't match the others'.

And second, how much of the cumulative growth from 1999-2007 was due to astronomical energy prices? I don't think it's absurd to point out that for half of the period you mention, energy prices made Russia's economy appear much stronger than it was in reality. The same happened in the late 1970s and the early 1980s with the USSR. Many attribute the USSR's implosion in large part to the collapse in energy prices in the late 1980s/early 1990s, since the failings of their centrally planned economy couldn't be concealed any longer.

<comment><USER3> > Developing economies generally have higher rates of growth than more > advanced ones, so the fact that Russia had higher rates of growth than the > seven most advanced economies in the world is fairly meaningless.

Not when the thesis on the table is that "relentless, unremitting, and perhaps unstoppable depopulation" is "a bomb" that "amounts to an ethnic self- cleansing" and "carries with it grim and potentially disastrous implications." Since depopulation began in 1992 Russia has enjoyed eight years of extraordinary economic growth, not all of which can be accounted for by rising oil prices. That is a salient fact, which the article completely ignores. At _best_ it's shoddy journalism.

</comment></comment></comment></comment></comment><comment><USER5> Crap article, intended to put down Russia. It plays on stereotypes and parrots "popular opinion" of Russia.

It is opinion article. It does not cite any sources for its data, for example birthrate grows since 2005 (according to CIA factbook). And please stop the vodka/drunken nation thing, the rest of the world does not write articles that British have problem with gin anymore.

<comment><USER6> > for example birthrate grows since 2005 (according to CIA factbook)

Since 1999, in fact, as the article acknowledges: "Russia's post-Communist TFR hit its low—perhaps we should say its low to date—in 1999, when it was 1.17. By 2005, the total fertility rate in the Russian Federation was up to about 1.3".

Some of its conclusions require more evidence (the contention that Russian standard of living will decline, the attribution of increased accidental mortality to alcohol problems instead of more people driving, etc.) But I'm not sure why you doubt the actual statistics.

</comment></comment><comment><USER7> Depopulation isn't a bad thing and I think it's much better than overpopulation in an already overpopulated world.

<comment><USER8> The world is overpopulated? News to me. The way I see it, it's under-producing food, largely because of irrational resistance to modern techniques.

<comment><USER9> >The way I see it, it's under-producing food, largely because of irrational resistance to modern techniques.

While I do agree that the planet can sustain a much higher population, modern farming practices are causing problems and not necessarily sustainable in the long term. (<http://en.wikipedia.org/wiki/Intensive_farming#Disadvantages>)

Properly thought out food production that utilizes under-used resources (vast swaths in Russia for instance!) is the key.

<comment><USER8> GM is a modern farming practice that is horrendously underused, and GM can wipe out most of the disadvantages of intensive farming - GM crops can fix their own nitrogen and repel pests without pesticide. They can also be designed to grow well in 3rd world climates and contain extra nutrients.

</comment></comment></comment></comment><comment><USER10> "thus it is impossible to predict when, or whether, it [the shrinkage of Russia's population] will finally come to an end"

That's some loopy hyperbole, right there. Babies are still being born in Russia. Even a shockingly huge drop in population due to low replacement will eventually end in a stable population size.

<comment><USER11> I don't understand your math. If the birth rate stays lower than replacement, and the average life span does not increase, at what point would the population stabilize?

<comment><USER10> At the point in which the _number_ of births constitutes replacement. We're not talking 5 babies born annually in the Rodina, we're talking a small number of babies born compared to Russia's population.

Births aren't evenly-distributed. The population segments that are having more births now are the segments likely to have more births down the road. Death, on the other hand, is much more evenly distributed, and the number of deaths per year is directly related to population. As the population shrinks, you have a smaller number of deaths, but births don't decrease as quickly. Eventually, you hit a new equilibrium.

</comment></comment></comment><comment><USER12> Eh. The people with a natural desire to have children will breed and pass on their natural desire to have children. In the past, the desire for sex alone was sufficient. Those people will die out everywhere over the next decades...

</comment><comment><USER13> > To make matters worse, almost half of Russia's treated tubercular cases over > the past decade have been the variant known as extreme drug-resistant > tuberculosis (XDR-TB). This can not be right. XDR (Extreme Drug Resistant > TB) is fairly rare (definitely not 75,000 a year). Multiple Drug Resistant > TB (MDR TB) is a lot more common. Most people with XDR TB die in a month.

>Russia's patterns of death from injury and violence (by whatever provenance) are so extreme and brutal that they invite comparison only with the most tormented spots on the face of the planet today. The five places estimated to be roughly in the same league as Russia as of 2002 were Angola, Burundi, Congo, Liberia, and Sierra Leone.

Congo? Which one?

Russia's murder rate (while appalling) is below Colombia, South Africa, Jamaica and Venezuela:.

<comment><USER8> In context, I think they were including slips and falls, traffic accidents, etc.

</comment></comment><comment><USER14> That is merely soft and polite description. In fact there is literally humanitarian catastrophe. This article is focused mostly on physical heath of society and death rates, while there is a second side of the coin - <USER2> unprecedented rate of alcohol, drugs and stress related mental deceases which no one can count.

And precision statistics is not required anymore - just step down into any station of Moscow's or Saint-Petersburg's subway at friday's night and take a look at the faces. Everything is visible with naked eyes.

</comment><comment><USER15> So yeah, we're all going to die. So what?</comment>


Microsoft apology for code theft may not do, Plurk says - <AUTHOR> http://www.thestandard.com/news/2009/12/16/microsoft-apology-code-theft-may-not-do-plurk-says

<comment><USER3> Plurk's gonna burn a lot of sympathy if they do, and it may not even be a tactically sound decision.

The situation was handled swiftly and correctly by Microsoft. It got Plurk some free press. It wasn't even caused by Microsoft directly, but by a contractor they had hired. And, best of all, although ordinarily you might be able to allege that it cost you sales ... this all happened in a market in which Plurk has been denied access anyway.

This isn't David and Goliath anymore. Plurk was fortunate to get a swift response from Microsoft in their favor; if their next move is to start a fight with Microsoft, I fully expect that Microsoft's expert, well-paid legal team will chew them up and spit them out.

I'd much rather see Plurk issue a press release stating simply the matter has been resolved and they appreciate Microsoft's swift action.

<comment><USER4> So Plurk should roll over and forget anything happened just because Microsoft said they are very sorry? You see such benevolence from big corporations in the same situation almost never. Why should Plurk do any differently?

As for Microsoft's swift reaction, it was not necessarily a result of Microsoft's kindness of hart and honest remorse. It probably is more of an attempt on Microsoft's part to not get themselves into a deeper hole than they already are in. And no mater how expert or well paid their lawyers are it won't change the fact that they are in the wrong here. There is very little chance Plurk will end up being chewed up and spat out.

And lastly, this is big business, not preschool - the excuse "but a contractor did it, it's not my fault" doesn't work. Microsoft are (one of) the legal entity (-ies) behind that service. They are ultimately responsible for things like this copyright violation. They are free to seek compensation for the damages from the contractor, but legally speaking (well, not really, I'm not a lawyer and this is not legal advice, but still), as far as Plurk are concerned Microsoft are the offender. And don't feel bad about Microsoft, there is a good chance they'll end up with a net positive, at least financially.

<comment><USER5>
        So Plurk should roll over and forget anything happened
        just because Microsoft said they are very sorry?

That's exactly it.

        You see such benevolence from big corporations in the
        same situation almost never. Why should Plurk do any
        differently?

What other people do is irrelevant. I suppose it could be something if you were talking about a patent troll, but you're talking about Microsoft.

Microsoft focuses on building software that corners markets. That's a legitimate mode of operation for a company.

MS did the right thing in their response to this issue. Plurk has suffered no damage, and indeed has won press. Plurk should now also do the right thing and get on with trying to build software, and avoid the martydom track.

        And lastly, this is big business, not preschool - <USER2>
        excuse "but a contractor did it, it's not my fault"
        doesn't work.

But that's not what they said. They accepted responsibility for it.

It's also not in their Plurk's interest to go legal as it will be a distraction from building software.

<comment><USER4> You seem to imply that if the situation was reversed, if someone had ripped off Microsoft's code and when caught they stopped the service and apologized, Microsoft wouldn't sue them up the wazoo. How realistic do you think is such statement?

And yes, it probably is in Plurk's best interest to either seek settlement or sue Microsoft over this - for one it will show that they wont tolerate being ripped off (otherwise what's stopping someone else doing it again tomorrow and when caught "sincerely" apologizing) and for two, for a small and relatively unknown company it makes perfect financial sense to do so, they will probably make more money this way than they'll be able to make in 10 years "building software".

</comment></comment></comment></comment><comment><USER6> Assuming U.S. law (or its equivalent) will apply here, the law is clear that Plurk can sue and recover damages for this misconduct, even with Microsoft's rapid action to deal with the issue. Even assuming the unlikely scenario that the contractor did it entirely without Microsoft's knowledge, Microsoft and the contractor would be jointly (and severally) liable, and Microsoft in turn would be able to cross-sue the contractor to get indemnification under the contract between them.

That said, there is such a thing as acting with class even when lawsuit remedies are available and the actions of the parties will undoubtedly be evaluated at that level as well.

This is the type of situation where a company like Microsoft would be highly unlikely to want to defend a lawsuit of this type if it had other reasonable choices and perhaps what is motivating Plurk is the temptation posed by the prospect of being able to push the legal issue in hopes of extracting some settlement money. Undoubtedly, in the background, some stiff demand letter has already been sent asking for some payout in the context of confidential settlement discussions. I actually don't blame Plurk for this - it is a reasonable thing to do in this context, even if their primary desire is not to drag this thing through the courts. How this will look to people is another issue, however, and such a strategy could easily backfire given that Microsoft has tried to deal with this swiftly and decisively and in a way that certainly appears reasonable given what happened.

<comment><USER7> Why would you assume that US law will apply in a situation where a Chinese company lifts code from a Canadian company while contracting for a multinational company headquartered in the US but operating in China?

<comment><USER6> I don't assume that U.S. law will apply. I am predicating my comment with this statement to make clear that the sort of analysis I am articulating would only apply _if_ U.S.-style law applies to the situation. If U.S.-style law doesn't apply, then Plurk's legal remedies might be few, if any. This likely would be one of the trickiest issues in this case if a lawsuit ever sees the light of day.

The doubt on this point, by the way, would be one more reason for Plurk not to push the legal side too hard here.

<comment><USER7> So hypothetically, if Microsoft hired a US based corporation to create a microblogging site, and that corporation copied the source code for Twitter, re-branded it as Microsoft specified, and the site went live, Microsoft would be liable? Where is the line then? Are individuals equally liable if they use software that was lifted unbeknownst to them by a software publisher?

<comment><USER6> Copyright law generally does not excuse "innocent infringers" and is pretty strict in this sense (here is a link to a discussion of copyright that sums this up in the first two paragraphs: <http://www.ladas.com/NII/CopyrightInfringement.html>).

This sort of liability can extend to average people as well, as for example in this news report of a 2-lawyer firm that hired an SEO guy as a contractor for a $1K job and wound up with a $60K+ liability (and certainly must have spent many thousands more in attorneys' fees) as a result of that contractor's having lifted some copyrighted promotional materials wholesale from another law firm's website and used that infringing material as its deliverable for the project ([http://www.law.com/jsp/article.jsp?id=1202432820979&src=...](http://www.law.com/jsp/article.jsp?id=1202432820979&src=EMC- Email&et=editorial&bu=Law.com&pt=LAWCOM%20Newswire&cn=NW_20090806&kw=9th%20Circuit%20Finds%20for%20PI%20Firm%20Over%20Theft%20of%20Firms%20Web%20Site%20Content)).

</comment></comment></comment></comment></comment><comment><USER8> If someone tips off the BSA that you have a bunch of Office installs without licenses, and when the investigators come you say "Oh sorry, we'll uninstall the extra ones.". Is that "case closed"?

</comment><comment><USER9> I think Plurk should have stayed quiet for a few days and let Microsoft negotiate with them privately. Clearly one doesn't want to just let Microsoft off the hook, but there's a decent potential that Microsoft would be willing to pay private, non-disclosed reparations or even license the technology or buy the firm. Once the initial problem is fixed (and that has happened), one can quiet down a little and not create further hostility in the hopes that a good, mutually-beneficial outcome will happen.

Microsoft didn't fight and didn't try to use its market position once they found out what happened and, while that doesn't abdicate one of responsibility, it does mean that you can deal with them a bit more in good faith. Granted, that's easy for me to say - it wasn't my work that was ripped off and so I'm not as emotionally involved as the Plurk people who are probably (rightfully so) angry.

</comment><comment><USER10> Microsoft was caught red-handed stealing and blames a contractor. A company is responsible for its contractors and bears legal liability in most jurisdictions for their actions. While it was good of them to apologize and pull it down immediately, Plurk is right to pursue Microsoft further if they so choose.

If, say, your kid gets caught stealing a car and say "oops, sorry" then walks away, that doesn't make everything ok.

<comment><USER11>
      A company is responsible for its contractors and bears
      legal liability in most jurisdictions for their actions.

I wasn't aware of this, and it doesn't make much sense to me. Can you point me to some example statutes?

<comment><USER12> Work done by a subcontractor is (in most circumstances) considered work-for- hire. So the main company owns the product of that work (in this case code). If the main company decides to publish this work as their own, they take on all the liabilities associated with that action. It is up to Microsoft to police itself and it's contractors. If it doesn't, that then opens them up to legal liability. The fact that they took care of the problem quickly doesn't lessen that liability (it only stops the liability from getting bigger).

If this wasn't the case, what would stop the companies of the world from hiring shady sub-contractors to steal other's IP and code, pass it on to the hiring company, and then let the hiring company sell that IP/code as it's own? Where are the repercussions?

Let's be clear about this: there are two aggrieved parties in this: Plurk and Microsoft. Plurk was aggrieved by Microsoft when MSN China attempted to use Plurk code as their own. Microsoft was aggrieved by the sub contractor used by MSN China when they tried to pass off code stolen from Plurk as a unique work.

Legally (IANAL), Plurk's beef is with Microsoft. If MSFT then wants to sue the contractor, that is up to them.

<comment><USER11> I see, I was reading "A company is responsible for its contractors and... their actions" in much broader terms, like "contractor builds parts using child labor." Thanks for the clarification.

</comment></comment></comment></comment><comment><USER7> A lawsuit does not sound like a good idea. Microsoft has a top notch legal team, the wrongdoing was committed by an outside vendor, and there are three countries involved, each with their own IP laws. A suit will be long and expensive, and MS will do everything in their power to put all liability on that outside vendor, who probably has meager assets to pay damages. Even if they win, the reward will be attempting to collect damages from an uncooperative company somewhere in China.

Plurk: you got your goodwill and free press, don't push your luck. All you will get from a lawsuit is a five year headache and huge bills from your lawyer.

</comment><comment><USER13> It wouldn't totally astonish me if MS eventually settled, perhaps sooner rather than later. The fact that they gave a flat out blunt apology (as opposed to a non-apology apology: "we are sorry you feel that way") shows that they understand the seriousness of the error, and own up to it, even though the contractor did the deed.

<comment><USER14> From a legal perspective, I'm not sure that it matters whether the work was done by a contractor or employee. Whoever asked for the work to be done and paid for it is ultimately responsible for ensuring that it was done within the law. Certainly MS would be able to turn around and sue the contractor, but that's a separate issue.

</comment></comment><comment><USER15> I do hope that Plurk goes to court with this. The situation was handled gracefully by Microsoft but a crucial question remains:

Can you outsource to the lowest bidder and expect to get back untainted code? I don't think so. Producing good original code is hard and cannot be done in sweat shops under a tight deadline. Managers at Microsoft should have known this and be held responsible for their actions.

EDIT:

I do not have a source for the above claims, but I would like these issues to be explored in court. Let's say I would not be surprised if they were true.

<comment><USER16> > Can you outsource to the lowest bidder and expect to get back untainted > code? I don't think so. Producing good original code is hard and cannot be > done in sweat shops under a tight deadline. Managers at Microsoft should > have known this and be held responsible for their actions.

Do you have a source that said Microsoft contracted out to the lowest bidder or that that bidder was a sweat shop. I haven't seen evidence of either.

For all we know they hired a company that came highly recommended. The transgression doesn't give us any insight into this.

</comment></comment><comment><USER17> Just a follow-up for those who downmodded me for pointing out that the original complaint/post mentioned (virtually) nothing about de-obfuscation:

"Speaking technically, what makes our claim a little stronger is that Plurk's client side code was obfuscated to begin with, so someone went in there and had to spend some real effort to unpack/reengineer the JS code and prettify it on their end," [a spokesman for Plurk] said."

</comment><comment><USER18> Stop making this such a big deal, its like every little thing on the internet has to be bracken down into some philosophical principal that was violated.

This is the best thing that could have happen to Plurk. Microsoft could just buy the whole darn thing, which they probably would have anyways.

Bad rep for Microsoft???? I already thought Microsoft's rep was in the dumps seeing as how every internet site trashes them.

Principal? Like this thing doesnt happen all the time, or like how big companies havent already bought up every little company that stood in it's way? At lease Plurk can get more money with all the PR, if they ever sell.

</comment><comment><USER19> Perhaps the BSA could give MS the same deal as everyone else: shut them down for 4 days to inspect their systems for any evidence of pirated software, or fine them something like 2% of revenues.

</comment><comment><USER20> Is it known what the contractor was hired to do? I guess Microsoft didn't just post on rent-a-coder to get the lowest bid on "a microblogging site like Plurk.com".

How deeply was MSFT involved in the project spec and to what degree was that spec based on Plurk?

</comment><comment><USER21> They should just try to get a good licensing deal out of it.

<comment><USER22> Absolutely - If I were Plurk I'd be sellin out to Microsoft right now.</comment></comment>


Libnitrogen: What a network stack should look like for a mobile application - <AUTHOR> http://forum.caffei.net/t/introducing-nitrogen/12

<comment><USER2> Intriguing, but zero technical information.

</comment><comment><USER3> In the title, we replaced the linkbaity "The Correct HTTP for All of Mobile" with a sentence from the article.</comment>


Ask HN: Would you ever use a group buying website for home rentals? - <AUTHOR>

My startup Grosper.com is basically a groupon for home rentals. We tie up with real estate landlords and developers, to get users bulk pricing on home rentals. So if multiple rent at the same time, the price is lower than market price.<p>Would the readers here ever use such a service? If yes, why? If not, why? Comments please. <comment><USER2> Yes, I would seriously consider that - although I would want to think carefully about the division of group and individual terms, to ensure that individual renters did not get stiffed on things like maintenance and so forth (and likewise for the group to be legally insulated from the defaults of individuals who fall behind on the rent).

I've been home-hunting in SF for going on 2 years now, and it's been a miserable experience. The rental market is not much better; a _lot_ of the housing stock in SF is really shitty, and prices are being kept artificially high by irresponsible lenders _and_ borrowers. This market is ripe for disruption and there is definitely room for alternative business models. What you're proposing sounds somewhat similar to housing associations I've seen in some European countries.

<comment><AUTHOR> Well, the group aspect would only be applicable at the time of rent. Once the rental transaction has been completed, each tenant is treated as an individual. The group is not recognized separately as a legal entity. This is only for the purposes of better price and terms at the time of renting

</comment></comment><comment><USER3> I would, but I think it would be difficult to get a bunch of people to rent houses all at once unless you yourself are renting multiple. :)

<comment><AUTHOR> Yeah, that is the main issue. We have over 200 people moving houses a day in the city of Dubai, so that is something to consider.</comment></comment>


Show HN: A Twitter based NCAA Bracket Challenge Built w/ Node - <AUTHOR> http://tweetyourbracket.com

<comment><AUTHOR> Main dev here.

The source is on GitHub for anyone interested. I've also opened a few issues for things that I want to do for next year (and maybe this year depending on popularity), so if you find anything feel free to post an issue.

<https://github.com/lukekarrys/tweetyourbracket.com></comment>


The Zambian "Afronaut" who wanted to join the space race (2017) - <AUTHOR> https://www.newyorker.com/culture/culture-desk/the-zambian-afronaut-who-wanted-to-join-the-space-race <comment><USER2> From wikipedia:

> Nkoloso stated goals of the program were to establish a Christian ministry > to "primitive" Martians, and the hope of Zambia becoming the "controllers of > the Seventh Heaven of Interstellar space". However, he reportedly instructed > the missionary in the space program not to force Christianity onto the > native Martian inhabitants

</comment><comment><USER3> The artist Cristina de Middel, who is mentioned in the article, made a very cool series of works on this subject. It features archived material as well as imagined/staged photographs. Worth checking out even if you don't read the whole article.

[http://www.lademiddel.com/the- afronauts-1.html](http://www.lademiddel.com/the-afronauts-1.html)

</comment><comment><USER4> > Sardanis said, "everybody loved him, but at that stage, he was not being > taken seriously . . . He was insane. Not a normal person." Sardanis > attributed this to what happened in Luwingu. "He was arrested and tortured. > The Northern Rhodesian police tortured him. And after that, he lost it."

The article's really burying the lede there.</comment>


Rust for C++ Programmers Part 7: Data Types - <AUTHOR> http://featherweightmusings.blogspot.com/2014/05/rust-for-c-programmers-part-7-data-types.html <comment><USER2> I would love to see an article like this for error handling in Rust. I was really interested in using conditions, but those were apparently backed out. Which leaves error handling through return values and macros. This seems like a step back from Exceptions to me. I want to be convinced otherwise, but I'm struggling to see how this is better than other mechanisms.

<comment><USER3> Error handling in Rust is actually pretty awesome. There's a standard `Result<T, E>` type. One can write a potentially fail-able function like:

        fn can_fail(arg: bool) -> Result<(), StrBuf> {
            if arg {
                Ok(())
            } else {
                Err(StrBuf::from_str("Oops! Something went wrong."))
            }
        }

Here, there's no value when the function succeeds `()`. When it fails (I don't mean fail as in a `fail!()` or a panic or anything), you get a string back.

You can pattern match the return value:

        match can_fail(true) {
            Ok(_) => {},
            Err(err) => {}
        }

This can get quite cumbersome, however. That's why there's a `try!` macro that adds composability. The idea is that if you have a function returning a `Result`, wherever that function is being called could also return a `Result`.

         fn higher_up() -> Result<(), StrBuf> {
             try!(can_fail(true));
         }

`try!` is simply:

        match $e { Ok(e) => e, Err(e) => return Err(e) }

This allows error to propagate up the chain.

When you're working in big-ish projects, it'd be best to have something better than a simple `StrBuf` for an error. You'd probably want a struct:

        pub struct LibError {
            message: StrBuf,
            error: Error
        }

        pub enum Error {
            One,
            Two,
            Three
        }

Where `Lib` is the library/project name.

You can then create a new result type based on your new error type:

        type LibResult<T> = Result<T, LibError>;

Then you can use `LibResult<T>` everywhere in your app.

You can view this example done in a few of my own libraries ([https://github.com/TheHydroImpulse/gossip.rs/blob/master/src...](https://github.com/TheHydroImpulse/gossip.rs/blob/master/src/gossip/util.rs#L14)) and cargo ([https://github.com/carlhuda/cargo/blob/master/src/cargo/util...](https://github.com/carlhuda/cargo/blob/master/src/cargo/util/result.rs)).

That's a simple overview of it. Error handling is super simple, not verbose (thanks to try!) and in your control. Because of Rust's type system, things like `Result<T, E>` is available and are so much better than simple return values (like integers: -1 vs 0 uhhh)

<comment><USER4> I tend to practice "only catch what you can handle" in exception-enabled languages - I haven't written in a systems language in almost a decade, mostly bad memories of C. How much does error-handling get in the way when you have to live without stack unwinding?

<comment><USER5> "only catch what you can handle" is incredible nonsense. Your code is the only code that knows how the code it's calling might fail -- it MUST catch all exceptions and either handle them, or re-raise them with a well defined type that is documented and declared in your API.

Anything else just leads to buggy software that has a try/catch block at the top level of the event loop/main/thread start function to deal with all the errors that leak out of its implementation and leave the process in an undefined state.

Exceptions are simply broken and awful. Java does them sorta right with checked exceptions, but the only safe thing is to not do them at all.

<comment><USER4> Obviously you should be converting exceptions that leave your library into other areas, but internally? Converting exceptions over and over and over again just means losing information from those exceptions, or worse hiding them. If I'm forced to dump a stack-trace to the text file, I want the exact exception that caused the problem, not some vague "Operation Exception" that quintuply wraps my actual desired exception, or worse completely threw it out to "cleaned it up for me" and tells me nothing about what went wrong.

I just helped a teammate work through a bug the other day where somebody decided to "handle" a case-sensitivity problem in their home-brewed SqlLite data-access code by simply returning null for the data member if you got the wrong case. This resulted in improperly-cased column names producing objects with null members - no error happened because they were valid SQL queries, but the dictionary-reading code was silently failing when it was reading the result-set. If the program had just blown up when there was a miss on the dictionary of column names? We would've quickly found out about that stupid case-sensitivity.

Defensive coding just means your bugs go non-local and become data problems instead of exceptions.

<comment><USER5> That doesn't make any sense. Defensive coding means not silently discarding errors (by returning null, in this case), and has nothing at all to do with exceptions.

As for rewrapping errors, yes, each subsystem should have its own error space. You don't lose data by nesting errors; on the contrary, each level can add additional context to an error result that makes debugging an unexpected issue far easier.

</comment></comment></comment></comment></comment></comment><comment><AUTHOR> I'm curious why this isn't automatically destructured:

        struct IntPoint (int, int);

        fn foo(x: IntPoint) {
            let IntPoint(a, b) = x;  // Note that we need the name of the tuple
                                     // struct to destructure.

<comment><USER6> What do you mean by "automatically destructured"? If you mean the extra step of destructuring in the function body, that's not necessary. You can destructure like that anywhere that a pattern is accepted, which includes function parameter lists:

      struct Foo(int, int);

      fn bar(Foo(a, b): Foo) {
          println!("a: {}, b: {}", a, b);
      }

      fn main() {
          let qux = Foo(1, 2);
          bar(qux);  // a: 1, b: 2
      }

<comment><USER7> What they mean is that there would be special cases for let patterns so that

         let (a, b) = Foo(a,b);

is a fine destructuring. It would be a special case for let, since the pattern would have to be more explicit in function arguments and in match, but I think they have a good point.

<comment><USER6> I should emphasize that tuple structs are a somewhat obscure feature. Their main use case is to support newtyping:

      struct Meters(f64);
      struct Miles(f64);
      let meters = Meters(10.4);
      let miles = metric_to_imperial(meters);
      let Miles(raw_miles) = miles;

The single-arity case above constitutes the vast majority of tuple struct usage. And, as you may expect, in any other context besides tuple structs a single-arity tuple is completely silly (the only reason that we have syntax for single-arity tuples at all is to make writing macros easier).

Ultimately it's just not a feature that would be pulling its weight. If you want a structure with multiple fields where destructuring is not necessary, just use a struct in the first place. Honestly, if we found a better way to support newtyping then I wouldn't be sad if we got rid of tuple structs entirely.

</comment></comment></comment></comment><comment><USER8> I just read the first section, just the section on structs -- what's different here, from C? It provides all of the same features, with a slightly different syntax.

<comment><USER9> With structs, pretty much the only difference is the syntax. Enums are probably where the biggest differences are from C, as far as data types go.</comment></comment>