Is the Unix shell ready for XML? (2006) - <AUTHOR> http://www.lbreyer.com/unix_xml-1.html <comment><USER2> The Juniper libxo [1] library is an interesting approach which preserves the traditional text output but also gives an option to output structured data:

      The libxo library allows an application to generate text,
      XML, JSON, and HTML output using a common set of function
      calls. The application decides at run time which output
      style should be produced.

There is some work ongoing to convert FreeBSD utilities to support libxo [2] and a long thread on freebsd-arch [3]

[1] [https://juniper.github.io/libxo/libxo- manual.html](https://juniper.github.io/libxo/libxo-manual.html)

[2] [https://wiki.freebsd.org/LibXo](https://wiki.freebsd.org/LibXo)

[3] [https://lists.freebsd.org/pipermail/freebsd- arch/2014-July/0...](https://lists.freebsd.org/pipermail/freebsd- arch/2014-July/015633.html)

<comment><USER3> I've just started working with the new AWS CLI, and while in the long term I will probably switch to using boto directly from Python, for now I process the CLI's JSON output in bash scripts. Using structured data in this way is really quite interesting. Because it isn't sensitive to whitespace or newline mangling, the JSON output can safely be stored in an environment variable a la Perl (e.g., ```VAR=$(aws ... -output json)```). Rather than hacking up some rudimentary parsing using sed/awk/etc., I can pipe it to an existing parser (e.g., jshon), which will extract the data I want with minimal effort. I think that if I had an objection to XML, it isn't because it's structured but because it's so verbose relative to simpler serialization formats like JSON or YAML. Then again, I don't know why we even bother with those when we're just a tiny bit of syntax away from sexps. :)

<comment><USER4> I've also found the utility called jq [1] to be a great help working with JSON data on the CLI, such as from the AWS CLI. It's great at parsing and selecting output, or performing simple transformations.

[1] [http://stedolan.github.io/jq/](http://stedolan.github.io/jq/)

</comment></comment></comment><comment><USER5> If you're looking to work with structured, hierarchical data from a CLI, this is where PowerShell really shines. Its OO model is a really excellent fit for Windows, and all of the common utilities in PowerShell are designed around this model. And it solves this problem much more elegantly than trying to massage XML through UNIX-style text processing utilities.

On the one hand, I think it would be interesting to see a truly OO shell for UNIX, but on the other hand I don't know if that's really necessary for a UNIX system.

<comment><USER6> Unfortunately in practice I've found powershell hasn't been much of a panacea. You give up all the problems of parsing text, but now have new problems dealing with tools that don't output objects and getting them to do so.

I used powershell for some moderately complex workflow & reporting stuff but at the end was kind of on the fence about if I should have just scrapped it all and done it with traditional tools. It really felt like powershell made hard things easy but easy things hard. I don't think I would use powershell again unless there was absolutely no other choice.

<comment><USER7> I was all about Powershell, and then a coworker called it a gimped Python. I realized nearly everything I'd ever 'solved' in Powershell was a triviality in Python, and nearly every api and utility that was good in powershell would have been just as well off with a python api. Not to fault Microsoft, it was a huge step forward, but I'd love if they made bindings easy and deprecated, now that they've embraced open source.

<comment><USER8> Sadly, deployment of Python (or Ruby, Perl, etc) is horrific pain at scale.

If you are automating a large organization -- Powershell has one massive edge, already deployed and able to be managed sanely via the domain management tools with a permission model around it.

Some large (30k+ machine) organizations actually have fairly decent sized research projects on best ways to automate deployments and system management. It ends up being far trickier than it appears on the surface and any tool blessed by MS and shipped by default has a huge edge. Powershell might not be great -- but it is already on the machine and the competition is batch files.

</comment></comment></comment></comment><comment><USER6> Where are the UML diagrams and how many sprints will it take to implement all the tools? Has an architect approved all the design patterns that will be used to implement them?

On a serious note though, wouldn't XML sed and awk just be XSLT transforms?

<comment><USER9> XSLT is rather verbose compared to typical sed/awk syntax.

While it's not quite sed/awk (there isn't a programming language per se, just simple edit/select commands) xmlstarlet can do some of the things to an xml document that you might do to a text document with sed and uses xslt internally.

</comment></comment><comment><USER10> Isn't it a solution for a non-problem?. I wish people would let alone unix shell and clear text.

edit: new "Avoid Gratuitous Negativity" complience.

<comment><USER11> I wouldn't say it's a non-problem, but I agree that there is a certain elegance to line-oriented text processing. It's the same design problem as choosing a data structure; sometimes you can get by with a list, but some problems benefit from non-linear data structures.

<comment><USER10> Problem is not xml, json or any other non linear data structure. It's trying to use shell to manipulate data that it's not intended to.

Shell will always have problems with handling bloated/overheaded data structures. In these situations using intermediary higher level languages would help.

PS: I'm sorry my first post is unintentionally against new rule. I just realized.

<comment><USER12> what new rule?

<comment><USER10> [http://blog.ycombinator.com/new-hacker-news- guideline](http://blog.ycombinator.com/new-hacker-news-guideline)

</comment></comment></comment></comment></comment><comment><USER13> It's really too bad that there isn't a standard binary data structure format that we could process the same way we process stdin/stdout/stderr. Stumbled onto BSON the other day, which allows MongoDB to store binary JSON:

[http://bsonspec.org](http://bsonspec.org)

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

The main issue is that it doesn't have arbitrary precision like, say, OpenTNL. That could probably be overcome somewhat with compressed streams.

It would also be nice to have a leaf-first format, or hints for depth-first or breadth-first traversal so that the stream could be processed as it's received.

These are really old ideas so maybe I just haven't stumbled onto a solution.

<comment><USER14> ASN.1 DER? It's very compact and length-delimited.

<comment><USER15> That was my first thought, too. Why do people forget about good old standards? There are so many attempts to do Binary JSON, Binary XML, Binary YaML, ... whatever. Followed by language-specific serialization formats like Python's Pickle, php-serialize, and so on.

What a huge mess!

If any binary format wants to become a universal competitor to those, it:

\- should offer some big advantages over the already established ASN.1, and

\- should be significantly smaller and faster than compression of human- readable formats (e.g. json+gzip or xml+xz)

</comment></comment></comment><comment><USER16> Thankfully, no.

XML, as a medium of transmission of structured data, pales when compared to basically any other commonly used alternative in 2015, in ease of use, readability and available tooling.

Now, I enthusiastically agree with the underlying ideal of having programs communicate on the shell through data structures instead of through eight-bit bytes. Let's do that, be it XML or anything else.

<comment><USER17> I am not the one to promote XML, far from it, but the tooling for it is superb. Like, recently, we had to connect our (Java) app to NetSuite web service. All it took is to point to their web service endpoint, and the tool created strongly-typed (Java) client classes and proxies. That is in Java, and it works with C#, too (Visual Studio). Provide the endpoint, VS reads the WSDL exposed by the service, and generates all the required classes and proxies. And at all times, you see what functions the web service is exposing, and what parameters you need to send, and what kind of response you will get.

Much better then your typical REST API.

<comment><USER18> So it does everything you want, with ease, in every language, better than everything else, but you won't promote it?

<comment><USER17> True. What happened was, back in the 2000-something, XML was so hyped that people pushed XML as a solution for everything.

On the negative side, we had to endure managers coming back from "XML conferences" and recommending we ditch our

Oracle or Sybase or whatever and replace it with an XML database, because XML.

On the plus side, vendors made sure to support it so to this day we have good tooling in Eclipse, VS, etc.

Also on the bad side they have gone crazy overboard so we have security issues like this:

[https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Pr...](https://www.owasp.org/index.php/XML_External_Entity_\(XXE\)_Processing)

So I still have WS endpoint but I rewrote it to manually parse XML and avoid all the crappy extensions that they put in and I cannot disable.

So yeah, this is loaded… I am not promoting XML. It has its issues. Use what you like.

<comment><USER18> Your complaint is about people who don't know what XML is and how to use it and broken tools, not XML. XML does not cause any of the examples you show.

</comment></comment></comment></comment></comment><comment><USER19> Out of curiosity, Google Trends (xml) [https://www.google.com/trends/explore#q=xml](https://www.google.com/trends/explore#q=xml)

<comment><USER20> Cuba is the #1 country interested in XML.

<comment><USER19> Maybe they just got news of its existence.

</comment></comment></comment><comment><USER21> Same now for json. Thankfully there is jq (json path).

</comment><comment><USER22> Be very cautious of texts that start with "this is how we can" instead of "this is why we should"</comment>


The Future of TypeScript Declaration Files - <AUTHOR> https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files/ <comment><USER2> Great News! I was bragging about this everywhere on GitHub [1], [2], [3].

There is a huge problem for me for the last couple of months that will end with TypeScript 2.0, which is >Where should one publish, contribute typescript definition files and how?<.

I'm really happy that TypeScript's team decided to go NPM-only on that.

1 : [https://github.com/typings/typings/issues/223#issuecomment-2...](https://github.com/typings/typings/issues/223#issuecomment-204802254)

2 : [https://github.com/shyiko/tsdm/issues/4](https://github.com/shyiko/tsdm/issues/4)

3 : [https://github.com/DefinitelyTyped/DefinitelyTyped/issues/21...](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/2150#issuecomment-117705706) ( July 2015 )

</comment><comment><USER3> This isnt' a nitpick but a genuine question because I am unsure: Should that be --save-dev rather than --save, given that typings are very much a dev/compile/transpile time concern rather than runtime concern, or is there a reason for using --save?

<comment><AUTHOR> If you're a library author, then our feeling is you want to use `--save` because that saves your consumers the need to install the declaration files themselves.

If you're writing a project that won't be consumed by anyone as a library (e.g. command line tool), it makes sense to make that devDependency.

</comment></comment><comment><USER4> Only slightly related this, but does anyone else have an as intense dislike of definitely typed as me? I much prefer typing's registry based approach and I'm surprised Microsoft is running with definitelyTyped instead.

>Sorry, we had to truncate this directory to 1,000 files. 823 entries were omitted from the list.

Shudder.

</comment><comment><USER5> And if the package supports the "typings" property, you don't even need to separately install types.

<comment><USER6> In my year or so of using TS, I've noticed that this is the only sort of typing that doesn't get out of date, and is high quality. Even something as popular as lodash typings lag behind the newest lodash releases, are missing typings, and have many poorly written types.

I guess until typings are more broadly adopted and are shipped with most popular repos by default, this is the best we can do.

<comment><USER2> I doubt that typings will be shipped with most popular repos. I actually think, this is a dream that will never happen.

What I think TS team did and I'm so happy about it is that they made the easiest possible way for us TS devs to contribute to the definition files in a distributed way.

<comment><USER7> Agreed. Unless everyone starts developing in TypeScript then external types for JS files is always going to be a bit of pain and not quite where we'd like it to be.

<comment><USER8> Or if the TS declaration file format gets widespread adoption among flow, babel, ECMAScript etc.

</comment></comment></comment></comment></comment><comment><USER9> How do people using Flow handle this problem?

<comment><USER10> In the past 2-3 months, various members of the Flow community and I have been working together on flow-typed ([https://github.com/flowtype/flow- typed/](https://github.com/flowtype/flow-typed/)) which is a centralized repository of library definitions.

One bit of feedback we received from many DefinitelyTyped users was that it provides a large repository of definitions to get started, but often the definitions are out of date, un-versioned, not well-tested, use lots of `any`s, etc. What we took away from this was that whatever we do, it needs to have a focus on quality and really leverage the community. It should be as simple as possible for anyone to contribute improvements to libdefs, but also we want to make sure those tweaks and improvements are verified by both people AND automation as much as possible.

We looked at the approach of using npm to define/distribute library definitions, but we decided to go with something more integrated instead for consistent coordination/testing/versioning/tooling/validation/etc.

For example: We use automated CI to ensure that all libdefs are tested and versioned against both the library _and_ the version(s) of Flow they are meant to work with. Additionally, we intend to continue building more ways to automatically verify libdefs. Things like heuristics to detect when an impl doesn't align with interface, well-typed tests to allow community members to do this verification themselves, bots that can offer suggestions on pull requests when they see types that could be better written in a different way -- things like using `any` vs `mixed`, etc.

Also, if a new version of Flow goes out with features that might make a libdef better/more expressive, anyone in the community can contribute an update with the same level of assurances without worrying too much about breaking users who use an older/different version of Flow.

Another thing we want to do is to make sure that packages that use Flow in the first place never have to _write_ implementation/interfaces separately, but are still able to easily publish them separately.

For this, we've started encouraging libraries to publish with a .js.flow "shadow" file alongside their compiled files. In the future, flow-typed will be able to automatically extract a library definition from these shadow files that is versioned against both npm and the version of Flow the library was written with. From there, the community can help maintain that auto-generated type interface for newer/older versions of Flow, etc.

</comment></comment><comment><USER11> This was definitely needed. There has been so much change in regards to type declaration and where to get them (DefinatelyTyped, tsd, typings). I also look forward to the documentation on creating type declaration files as it's all over the place right now. The whole namespace/internal module/external module confusion doesn't help either.

</comment><comment><USER12> Is it going to become easier to contribute? I run into problems occasionally and have zero clue how to contribute improvements back.

I really hope this will be less confusing than typings.. All the sources, ambient(global) vs not, etc. Currently I just read the error and do what it tells me. Why that extra step is necessary is beyond me; "Broken, click to fix!"..

</comment><comment><USER13> Does anyone know if the ECMAScript group is seriously considering adding something like TS? Maybe in ES8 or ES9? TS 2 will be impressive and it seems TS has a lot of momentum (such as Angular 2).

<comment><USER8> Would be nice, but I think we can do much better than what TS gives us right now, on the level of the type system. What's really missing are ADTs / sum types (and pattern matching, though that is more an implementation detail).

<comment><AUTHOR> I agree, ADTs would be nice. In fact, we have a pull request out for it right now. [1] :)

[1]: [https://github.com/Microsoft/TypeScript/pull/9163](https://github.com/Microsoft/TypeScript/pull/9163)

</comment></comment></comment><comment><USER14> I wonder if there is a way for automatic Jsdoc to ts interfaces generation. In that way a lot of libraries can always keep the .d.ts in sync or rather users can just generate from the module.

</comment><comment><USER15> didnt they just consolidate everything to typings?

<comment><USER16> Who's "they"? typings is a third-party tool not developed by the TypeScript team.

<comment><USER15> yes. but it was used in tutorials by MS so it seemed like a de facto thing...

<comment><AUTHOR> To clarify what Ryan's getting at, the TypeScript community has started moving to Typings, but there were still issues and pain points that we needed to address to avoid common problems.

While we did write tutorials using Typings, that content will change to use npm by our next release. Our guides are pragmatic, and are meant to get you working with TypeScript _today_. Making users use nightly releases would've been a major pain.

<comment><USER15> No offense.

I just started using typescript and the the tuts already weren't up to date, which let me believe typings is the "new" way.

I met the pains you talk about and think npm is the right way :)

<comment><AUTHOR> None taken! It's totally a valid question.</comment></comment></comment></comment></comment></comment>


ArXiv Business Model - <AUTHOR> https://confluence.cornell.edu/display/culpublic/arXiv+Sustainability+Initiative

<comment><AUTHOR> They are starting to use a membership fee system as of this month (January 2013).

Just a few choice quotes:

"The annual budget for arXiv is $400,000 for 2010." [1]

Total operating costs for 2013 are projected to be $837,000.[2]

"It has been announced that, beginning in September 2011, Cornell will completely take responsibility for the operation of the project, without the further participation of Ginsparg, who is quoted in the Chronicle of Higher Education as saying it "was supposed to be a three-hour tour, not a life sentence".[10]" [1]

[1] <http://en.wikipedia.org/wiki/Arxiv>

[2] [https://confluence.cornell.edu/download/attachments/12711648...](https://confluence.cornell.edu/download/attachments/127116484/arXiv+Business+Model.pdf)

<comment><USER2> It looks like the membership fee thing isn't a pay-wall.

From lower down the page: "Exclusive benefits for participating organizations include:

Participation in arXiv's ongoing governance through the Member Advisory Board, which provides input for project prioritization, new service offerings, financial planning, use of discretionary funds, future technical developments, and policy decisions; Access to enhanced institutional use statistics; Public acknowledgement of members' role in financial support."</comment></comment>


Breaking Good: How to synthesize Sudafed from crystal meth - <AUTHOR> http://boingboing.net/2012/02/27/scientific-paper-of-the-day-h.html

<comment><USER2> It's a political hack, it's making the point that it is easier to synthesise pseudoephedrine by buying crystal meth (the reason pseudoephedrine is so heavily restricted) than it is to go out and buy pseudoephedrine. It's an effort to change the law. That's the 'hack'. Chemistry enthusiasts will have to judge if it has been successful on its claims about the method outlined or, rather, if the hack is in fact exploiting our expectations that journals generally say intelligent and correct stuff, so the claims made in this journal article are correct. If we are either deceived by it being correct and cheap chemistry, or if we believe the claims within the article, the hack works (it's intent being to change absurd legal controls surrounding pseudoephidrine, not necessarily to show how to synthesise pseudoephidrine). It's necessary for the hack to work, to change our beliefs. If it does this with the truth, all the nicer.

This is a classic - even if the claims in the paper are bullshit. :-)

<comment><USER3> Aren't there clear links between availability the of ephedrine and pseudoephedrine, and the availability of meth on the street?

There's some greta charts somewhere showing drops in purity of meth (along with increased prices) against time, compared to measures taken to reduce the supply of pseudo-ephedrine. There's also some correlation with increased numbers of people seeking treatment.

I'm carefully trying to avoid traditional drug arguments, but to make clear: I am generally in favour of legalisation of drugs.

<comment><USER4> There are clear links with availability of ephedrine, yes, but the links are counter-correlated with the availability of the cold pills.

Keep in mind that most any doctor or nurse will tell you for sinus congestion, pseudoephedrine works while phenylephrine is essentially no better than placebo.

From the timeline linked in other comments, it's clear the media and government are indulging in "drug war theater". Every time you hand over a driver's license for decongestant, you are supposed to thank your government for keeping you safe.

From the timeline:

1990s:

 _The Amezcua cartel in Mexico develops an additional source for ephedrine, buying bulk ephedrine powder overseas from some of the same nine factories (in Germany, Czech Republic, China, and India) from which the American pharmaceutical industry buys their supply of ephedrine/pseudoephedrine for cold medicines. Meth's purity doubles, and a flood of meth spreads eastward from the West Coast. The number of people entering rehab for meth skyrockets._

 _Robert Pennal, head of the Fresno (Calif.) Methamphetamine Task Force, starts seeing large meth labs in California's Central Valley. Four out of every five hits of meth consumed in the United States are coming from these industrial-scale labs._

 _"The Amezcua brothers revolutionized the meth trade. They turned it from a small mom-and-pop backyard operation to an industrial-scale production line. They made possible the super lab, which is capable of producing 1,500 times what an ordinary user can make for himself." - Steve Suo, investigative reporter for The Oregonian_

This is followed by a bunch of misleading stats, such as "blister packs of pseudoephedrine will be found in 47 percent of seized meth labs". They're calling every mom and pop a lab, and failing to seize the mega labs, but by juking the definitions, they can claim they're closing so many labs. Of the 3 guys in a condo "labs" they find, less than half have any Sudafed in the house.

Meanwhile, as the timeline notes for 2004:

 _Mexico legally imports 224 tons of pseudoephedrine -- twice as much as they need to make cold medicine. The extra 100 tons is cooked into meth, then smuggled, like other drugs, across the border into the United States. As a result, meth on American streets is as pure as it's ever been._

2005:

 _The Mexican government admits that drug cartels artificially inflated demand for pseudoephedrine and agrees to reduce imports to a level legitimately needed for cold medicine._

2009:

 _The Mexican government recognizes there is a huge oversupply of pseudoephedrine coming into the country, and most of it is being diverted to the U.S meth trade._

Then they talk about how that realization turned the mega labs into small labs, and how much less meth there is. But now it's...

2011:

 _Other states struggling with the problem begin using electronic tracking systems to monitor behind-the-counter sales. Kentucky is the first to use the system and more than two years in, officials say it's failing to bring rates down._

Imagine that. Despite the best efforts of media sales driven hysteria and government drug war theater, it turns out that preventing Americans from readily purchasing inexpensive sinus medication doesn't stop professionally imported meth.

If the US government can't keep meth out of an ultra max prison, how much freedom do you think you'd have to give up before they can keep it out of your state?

</comment></comment></comment><comment><USER5> I realize it's meant to be funny and the journal title is fake, but is the synthesis valid? I'd be curious to know if this is good organic chemistry in service of the joke or not.

<comment><USER6> I can't say whether the synthesis is actually valid, but I did see a few rather exotic reagents were required, making this not even remotely something an amateur would be capable of doing. Butyl Lithium and "MoOPH" especially are rather specialized and rather dangerous materials, for example.

</comment></comment><comment><USER7> Please use direct link instead: <http://heterodoxy.cc/meowdocs/pseudo/pseudosynth.pdf>

</comment><comment><USER8> (parody)

Edit: You'd have to ask the folks at Boing Boing.

From the end of the article on BB: "* Note the name of the authors, and that of the journal. It's parody, folks."

<comment><USER9> What's it a parody of?

<comment><USER10> Real synthesis documents. Which, by the way, you should be _really_ careful going looking for.

<comment><USER5> I don't think that's what it's parodying...

Also, why would one need to be "really careful" looking up an organic synthesis of Sudafed?

<comment><USER10> There are a lot of... unusual chemistry papers out there which could lead to difficult questions being asked at certain borders I imagine.

Although to be fair I guess every chemistry student goes though a phase of looking these things up when they find out they exist.

<comment><USER11> What an odd sentiment. There's nothing illegal about looking that up, or knowing how people do it. Honestly, I don't think I've ever met a good chemist that _hasn't_ looked it up -- the kind of ingenuity in synthesis that is born from not having access to a laboratory (or good precursors / solvents) is fascinating. Very MacGyver.

Out of curiosity, what do you think happens if you look it up? How did you come by this information without having similar concerns?

(Although I have heard of room 641A, I honestly don't know very much about this)

Thanks

edit: for the curious... <http://www.erowid.org/chemicals/meth/meth_faq.shtml>

<comment><USER10> They find the pdf on your computer at the border, lock you in a room, shout at you for hours, tickle your prostate just for fun and then send you home?

There have been multiple cases of licensed MDMA researchers being denied entry to the US for having such materials, or for having admitted that they took the drugs once. I wish I could find the link, maybe I'll be back with it later.

Then there's this stuff: <http://www.bbc.co.uk/news/technology-16810312>

Obviously not exactly the same, but who can say where it's going next?

<comment><USER11> Hmm. So while I admit you can find examples of people receiving such harassment, I don't think you can make the case that such events are common or likely the experience you will have. People generally get angry when they hear about stuff like your link. It's newsworthy for a reason (rare + outrageous). Government employees are people too, it's not like anyone acts _deliberately_ oppressive.

Besides, that cost benefit ratio sounds worth it. (very rare chance of harassment and molestation) vs (very real chance of learning something awesome)

I guess I'm curious how much money you'd charge to store such pdfs on your hard drive forever -- more than $100? more than $1000?

I'll do it for $10 :p

BTW it sounds like you really should look up Room 641A -- this conversation and your IP were logged. Talking about evading security is probably _way_ worse than taking about meth.</comment></comment></comment></comment></comment></comment></comment></comment>


Much of personality decided at birth, say scientists  - <AUTHOR> http://www.nzherald.co.nz/health/news/article.cfm?c_id=204&objectid=10566320

<comment><USER2> I've come to feel this intuitively over the last five years as I have become my father despite a strong determination not to. Moreover, I've been shocked to realize that I enjoy being him. Its me. Feels like a magnetic, genetic force more so than environment.

<comment><USER3> A large reason to do this research is that our intuitions are often wrong. Your instrospective conclusions could easily have credited your father's early influence on you, instead of genetics.

<comment><USER2> Thats true, the research is valuable. I just feel better if its genetics, because I think I could fight environment better :)

<comment><USER4> Maybe you could. The funny thing is, most of the science on this issue suggests that the "you" that is supposedly fighting either environment or genetics...is entirely composed of environmental and genetic influences. So if there is a "you" that can fight environment, it's the genetic you, and vice versa.

And it's not like you're Mister Spock, with one half of your personality fighting a completely different half. It's more like a smoothie, where you can't tell what part is the banana, what part is the strawberry, and so forth, except it tastes like a mixture of both. So really, what you're saying is a lot less coherent than it sounds.

<comment><USER2> Yeah, ultimately nature/nurture is a 'false dichotomy.' But then the whole concept of 'self' is bupkus :) <http://en.wikipedia.org/wiki/Atman_(Buddhism)>

</comment></comment></comment></comment></comment><comment><USER5> These stories always scare me because, if true, they mean that someday we'll be able to customize not only the physical aspects of a child but the emotional ones as well. That in turn could lead to a devastating change in the makeup of our world.

To give an example, I think a large percentage of people would select an "easy going" kid if given the chance. But if we're honest with ourselves we find the people who have something to prove are the ones who make the major break throughs.

Bottom Line: Society's need for mal-adjusted people might be in conflict with a parents desire to have an affable child.

<comment><USER6> Worse still, it may become illegal, or at least highly socially unacceptable, to have anything _but_ an affable child.

<comment><USER2> I think its far more likely that engineering a better child will be illegal, for the foreseeable future.

<comment><USER7> People already select for desired traits in their children through mate selection (although it is generally a subconscious selection). If I wanted to have a child with dark skin, I would mate with a person with dark skin.

Would genetic modification be that different from the above example I gave?

Additionally, I have the right to reproduce. Who can tell me what I can or cannot do to produce my child?

<comment><USER4> You may have the right to reproduce, but as to "who can tell me what I can or cannot do", the answer is always "whoever has all the guns". Whether or not they're justified, the government usually gets to tell us what we can or cannot do, assuming they catch us. This is generally considered a major risk of having a government.

<comment><USER5> The sad truth is the scenario you describe is not that different from what has been done in countries like China. The difference here is that China had an irrational desire for male children.

Where as here there might be a rational reason for the Government to step in. So the very scary scenario that forms is one in which a parent's right to reproduce as they desire is pitted against a governments understandable need to keep society moving forward.

At least, that's what I'm afraid it might come to.

<comment><USER4> By some accounts, the history of politics consists of a conflict between individual rights and the public good.

<comment><USER8> or some notion of public good, which historically has resulted in the death of millions.

As soon as a country gives up on the concept of individual rights, it seems death follows.

<comment><USER4> I like to think of it as a conflict between different sets of individual rights, such as your right to swing your fists about and my right to an uninjured nose. But there are some tragedy-of-the-commons cases where this model doesn't work out.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> How can a snapshot sampling of (presumably) adult brains yield the conclusion that personality is decided at birth?

I have always assumed that environment is a large factor in personality. What evidence is there in this data set to suggest that it isn't?

It strikes me as entirely plausible that they have the causal relationship reversed.

<comment><USER10> Yet another science article where a vital gap in reasoning is simply left out. I trust scientists over science journalists, so my guess is that the scientist provided an argument, but the writer or editor didn't realize its importance and cut it out of the final piece. Still, you never know. Maybe there will be a better writeup when the study is actually published.

</comment></comment><comment><USER11> You know how we have P and NP problems when it comes to algorithms? Well we need the same thing for real life problems/questions. Some questions are just too difficult to answer in polynomial number of years.

Yes I'm studying for a fourth year algorithms exam! :)

</comment><comment><USER12> The subject of the article is certainly interesting, and the article is well reported. Let's go down the checklist of issues in interpreting scientific research by Peter Norvig

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

to see how many issues need to be checked as other researchers attempt to replicate this finding.

<comment><USER13> Well-reported? I rather hope people were misquoted.

While this is undoubtedly a very interesting field, I found the article as written rather misguided. You need a brain scan to tell if your child is timid? Seriously? Oh and you would shout at your child, if only you hadn't been handed a scan at birth telling you your child's brain is such that it shouldn't be shouted at?

As for the advice about using this kind of information to affect how to raise a child, it runs contrary to all the best current child development advice. The child psychologists maintain that you should in every way avoid pigeonholing children (eg "she is the adventurous one", "he is the creative one"). If that is so, I can't imagine anything worse that "he is the one likely to get addicted to drugs".

This kind of thing is a small glimmer of understanding. Let's not rush to speculating about applications until we've thought about it a bit more, eh?

<comment><USER14> I agree that we shouldn't pigeon-hole children, but they do find their niches, regardless.

Personally, as a father, I think the more interesting application of data like this (if true, I tend to wonder about the order of causality as well) would be around how can I get my child out of their comfort zone. This is not shouting at my timid child, it is exposing the highly methodical child to free-form creative activities.

Also, coming from a family with a history of substance abuse problems, knowing that a child had a particular predisposition towards abuse would be useless without a solid way to do something about it. Otherwise, it just becomes yet another thing a parent needs to fear and become over protective about.

</comment></comment></comment><comment><USER15> I fail to see how measuring adults' brains tells us what they were like at birth. Can't brains change? I can recall recently reading about how neurons actually can be created anew, in contradiction with ancient established fact. Can the structures of brains not change as well? Perhaps the brains of these adults have shifted along with their personalities.

</comment><comment><USER16> Anybody who's watched a number of children grow up knows this is true.

</comment><comment><USER17> but...if some things are decided by biology, that means I _can't_ be anything I want.

This study is clearly unamerican and probably racist.

<comment><USER2> Trollish, but amusing. We do have a lot of resistance to this idea in America.

</comment></comment><comment><USER18> the phrenologists were right all along.

</comment><comment><USER19> Much of you decided by your genetics, news at 11.

Sorry about being so cynical but seriously that article's not exactly insightful. Was there ever an HN full of much better articles and never such as this one? Or it just my memory and wishful thinking fooling me into believing the old times were better? I bet that's genetic too.

<comment><USER2> You missed the point of the article. The interesting part is that personality was strongly correlated with and likely caused by structural differences in the brain that can be measured with a 'ruler.'</comment></comment>


Show HN: Aspen – A web browser built for work - <AUTHOR> https://www.aspen.cloud/ <comment><AUTHOR> Hey HN - I'm excited to share what I've been working on!

I believe that the web is eating the software world and if you don't already spend most of your work day in a web app it's only a matter of time before all of your work apps live on the web. While I was working at Google, I only ever had to use Chrome to get stuff done and many of my coworkers used Chromebooks full-time. However, the browsers we have today are not great productivity tools. Too many tabs, a lackluster bookmarking system, missing collaborative tooling: are just a few of the complaints I've heard about Chrome, Firefox, Safari, etc.

Aspen is designed make you more efficient by cutting down the time you spend poking through tabs, fumbling through links, or endlessly Googling for something that you found once but forgot to bookmark.

I'm looking forward to your hearing your thoughts and happy to answer any questions!

</comment><comment><USER2> Hey just FYI, your webpage is badly designed. Here is my interaction

* Page opens, I wait for unnecessary animations to be able to read stuff

* Scroll around a bit trying to understand, its mostly buzzwords and phrases like 'Stay in the flow'

* Click 'request access'

* Again wait for the unnecessary animation on that page

* Click another unnecessary start button

* First question is asking for work email

* I close the page

</comment><comment><USER3> very cool! I always have a crazy amount of tabs open and eventually just delete my Chrome window and start over... an app dock makes a lot of sense for the apps that are always open for me.

<comment><USER4> Like tab pinning?

<comment><AUTHOR> I used to pin a bunch of apps as my go-to in Chrome and the app dock serves the same purpose but also lets you cycle through any open windows for the app (e.g. if you have multiple Google docs opened you can just click the Google Doc button to jump to each opened docs) but there are also certain actions that can be performed directly from the app icon like how it works in Mac OS.</comment></comment></comment>


China's Mass Internment Camps Have No Clear End in Sight - <AUTHOR> https://foreignpolicy.com/2018/08/22/chinas-mass-internment-camps-have-no-clear-end-in-sight/ <comment><USER2> This is extremely wrong. The official mood in China seems to be swinging ethno-nationalist, which is a recipe for human rights violations in any country, let alone one with limited juridical recourse and free speech. I don't think China will look back at this in a generation and think, _we did the right thing_.

<comment><USER3> > _I don 't think China will look back at this in a generation and think, we > did the right thing._

Honest question: How many people in China currently know, care and/or feel regret about the 1989 Tiananmen Square massacre?

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

<comment><USER4> My question (as an American) is: what ugly thing happened in the US that most of us don't know about?

<comment><USER5> MKULTRA? Difficult to guess how many americans/Chinese know about a topic, however.

<comment><USER6> MKULTRA is my go to, because it sounds just like a crazy conspiracy theory (down to the wacky name), but it actually happened.

</comment></comment></comment></comment></comment><comment><USER7> Where are the responses from Muslim countries?

<comment><USER8> I've found this very strange as well.

Best guess is that it hasn't fully reached their populations / news audiences. It's only in the last four to six months that Western media has begun to actively talk about it and pursue the truth of what's going on there.

Alternatively they don't protest China because they know it does no good.

The Guantanamo Bay detention camp had less than a thousand total detainees over its history (currently an estimated 40 people held there), most of whom were pulled directly off of battlefields. Guantanamo became a global scandal and blackeye for the US, drawing countless mass protests across the Middle East.

Here we're talking about millions of Muslims being tortured, 're-educated,' stripped of their Islamic beliefs, and apparently many are dying or being murdered in the process. An estimated 1,300 camps and growing. All without any external access or oversight, happening under an aggressive rights-denying dictatorship.

These millions of Muslims are not just going to give up their beliefs willingly, so what is China's next step? Vast genocide has to be the concern going forward.

<comment><USER9> > Alternatively they don't protest China because they know it does no good.

One Muslim country at least, Egypt, is doing China's bidding on Uighurs [https://www.aljazeera.com/news/2017/07/fear-panic-egypt- arre...](https://www.aljazeera.com/news/2017/07/fear-panic-egypt-arrests- chinese-uighur-students-170707051922204.html) :

> Egyptian police have detained scores of Chinese students from the Uighur > ethnic minority on Beijing's request, forcing dozens into hiding or to flee > to Turkey, activists have said.

> These millions of Muslims are not just going to give up their beliefs > willingly, so what is China's next step? Vast genocide has to be the concern > going forward.

Certainly all the ones they've put in concentration camps are never going to love China after what's happened. If they let them out, their stories will only spread discontent among the rest of the population. So genocide will have been an option under consideration. On the other hand, they must know that descending to Nazi levels of evil is unlikely to improve China's image.

<comment><USER10> > Certainly all the ones they've put in concentration camps are never going to > love China after what's happened. If they let them out, their stories will > only spread discontent among the rest of the population.

China might be looking at how this played out in Russia in the Soviet era. In the 1930s and 1940s, loads of indigenous minority cultural figures within Russia were either shot or sent to the GULAG. While certainly traumatic for individual families, this crackdown did not spur those minorities to rise up in any meaningful way. Indeed, many of the men who had been sent to camps, came back home a decade or two later as pretty typical Soviet citizens who sought in no way to rock the boat ethnically speaking.

<comment><USER11> A very simple explanation: Soviets worked out ways to find those who would. And after they did so, they killed them.

Because everybody who was capable of putting up a riot was killed, nobody put up a riot.

<comment><USER10> That explanation doesn't fly, because most of these figures were imprisoned on completely trumped up charges, for example, they were accused of being members of counterrevolutionary organizations that did not even exist. The state arrested them for their cultural prominence, not because they had any inclinations towards active separatism that the Soviet Union could have known of.

</comment></comment></comment></comment></comment></comment><comment><USER12> The West condemned Germany, the USSR, South Africa and even China when they did stuff like this a long time ago. Let's hope that China becoming the world's second largest economy, and the world's largest market for a lot of products, hasn't changed that.

</comment><comment><USER13> Why not just call them concentration camps?

<comment><USER14> The term concentration camps referse to any camps where you rounded up a bunch of all people belonging to some group with no due process, and typically including whole families (this is what distinguishes them from prison). By this definition they are concentration camps, as are the camps used by the US when they rounded up the Japanese americans and several other instances going back to the 1800's.

However in the eyes of most people concentration camp refers to the extermination camps where the Nazis systematically kill everyone who was brought into them. I think most people feel that it is important to distinguish between camps that lock people up without recourse, and camps and kill people. That is why we aren't referring to them as concentration camps. If you call them concentration camps people expect that means systematic mass murder, when they realize that is not what is happening you loose credibility and those people end up ignoring the real human rights crisis.

To be more precise under today's usage concentration camps include both the extermination camps, and internment camps. Internment camps is a more precise definition of what this is.

Also I think unfortunately while that while their is wide expression of the belief that extermination camps are immoral and should not happen. I don't think there nearly the same expression around internment camps.

</comment></comment><comment><USER15> China is a communist dictatorship where you can be arrested and possibly murdered for saying the wrong thing. So this is not very surprising.

<comment><USER16> "communist dictatorship" is inexact enough to be outright dishonest.

Their economy is obviously capitalist. And although Xi has been leaning towards more dictator-like behavior, they haven't been a dictatorship since Mao.

It's more like a giant bureaucracy. They have a process, they have regular handovers of power. It's not "I am the law".

<comment><USER15> OK, well, communist is in the name of the only political party allowed to exist in China, so it's not that absurd to say.

<comment><USER17> It's no more absurd than calling North Korea "democratic" because that's literally the first word of the official name.

But also not much _less_ absurd than that.

</comment></comment></comment></comment><comment><USER18> The sinophobia in these comments always makes me uncomfortable because it's usually underlied with overall anti-Asian sentiment. It reminds me that I don't belong in America, we still live in a white world.

<comment><USER19> This is really the main goal of these threads. It's your standard Two Minute Hate [1]: everybody gets together and signals their own virtue by spewing fact-free nonsense (apparently China's entire 11T is run by bribes and no foreign company ever made money there). There are two goals here: signal the ingroup but more importantly signal the outgroup. It's a concerted effort to drive away Asian programmers and, as I've pointed out before, it's working.

Note that despite these highly coordinated, anti-China circlejerks (seriously look at the other thread [2], just two down, all the same people and new accounts spouting the same exact nonsense, virtually all of it baseless propaganda) the moderators are to pounce on any "meta-commentary" that tries to pushback or highlight the stupidity.

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

[2] [https://news.ycombinator.com/item?id=17820157](https://news.ycombinator.com/item?id=17820157)

<comment><USER20> Not that I recommend it, but if you read all my comments on this issue you'll see that people are accusing us of siding with "pro-China shills" much more than "anti-China bigotry" as you have. In reality, of course, it's neither: we're just trying to prevent HN from going up in nationalistic flames. What does it matter whether those flames are red or white or blue or some combo thereof? The point is not to burn to a crisp.

We need you to stop insinuating astroturfing in the threads ("highly coordinated"). People are simply divided on this issue and it's a gross violation of the HN guidelines to insinuate otherwise. All it does is escalate the toxicity and we don't allow people to do that here.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

<comment><USER19> If you think this is not a coordinated effort than you are very naive.

It's worth pointing out what is actually happening here. This story about "massive internment camps" has been pushed relentlessly on HN for the past two weeks. There's been at least five stories on it.

Actual journalists investigated the story and proved quite clearly the story has been entirely fabricated [1].

Post the results of this story on HN and it is immediately flagged: [https://news.ycombinator.com/item?id=17846148](https://news.ycombinator.com/item?id=17846148)

At this point I think it pretty fair to say there is a highly coordinated effort to push a wholly fake anti-China story.

> In reality, of course, it's neither: we're just trying to prevent HN from > going up in nationalistic flames.

Somehow you think being "neutral" is the right strategy when one side is invested in a deliberate propaganda effort.

[1] [https://grayzoneproject.com/2018/08/23/un-did-not-report- chi...](https://grayzoneproject.com/2018/08/23/un-did-not-report-china- internment-camps-uighur-muslims/)</comment></comment></comment></comment>


Please poke holes in my Covid-19 math (SF Bay Area) - <AUTHOR> https://drodio.com/calculating-covid-19s-possible-impact-in-your-region/ <comment><USER2> The biggest hole is that the doubling time is usually closer to 7 days (10% growth in cases per day) than to 3 days (41% growth in cases per day). We do see 41% daily growth in _reported_ cases in times where the testing is catching up to a much larger population of undetected cases, but overall 7 days is a more reasonable doubling time. On that assumption, 2040 × 2⁴·⁴ = 43068 actual cases in the Bay Area in a month.

When you're modeling exponential growth, most of your possible errors are just an _additive_ time shift, a small one if the growth is rapid. For example, if the actual current cases are 4080, a 100% error in the estimate above of 2040, that just moves the time to reach those 43068 cases from 31 days away to 24 days away. But an error in the exponential growth rate is a _multiplicative_ time distortion, leading to an exponentially large error at any given point in the future.

<comment><USER3> I heavily disagree on the doubling time being closer to 7 days.

If you have a look at Germany who is having a very good overview of the spread of the pandemic since testing is free, available, and done rapidly (5h turnaround time ) capacity for 12.000 tests a day ) you get a close to 3 day case doubling time currently if you look at the official German numbers from the Robert Koch Institute. And we'll start seeing in a week or two how good the drastic containment measures they are starting now are impacting the growth or viral spread.

11.03.2020 1,288.00

12.03.2020 1,567.00

13.03.2020 2,369.00

14.03.2020 3,062.00

15.03.2020 3,795.00

16.03.2020 4,838.00

In a country like the US where the Author makes his calculations the government frankly has zero clue how many people are infected already because testing is not free, not available and not rapid ( current turnaround 3 -5 days ) for most citizens. There is a chance that the case doubling time is worse, or bigger, but if Germany who had a lot better reaction to the viral threat is having problems reaching a case doubling time of 6+ days and if you think about that China is at 80.000 cases now but put the most drastic containment measures in at only 600 confirmed cases there is a huge probability we are all in for a very wild ride.

That said every day counts because there are promising randomized control studies going on in China which hopefully give doctors access to a drug they can actually help people with. Right now all they can do is support your breathing and pump you full with a cocktail of meds they have no idea if it will work for the specific patient or not. Everyone who lands into ICU with Covid-19 is basically a guinea pig for the rest of us healthy people at this point.

In the end all that matters right now is that we don't know enough about the illness to treat it effectively, and we are in desperate need of time because no government was prepared for a pathogen like this that usually is a once in a century event.

P.S: This is a current snapshot. If the containment measures like in China are working the case doubling rate rises quite fast. China is at over 21+ days now. But I think it's important to take this day by day and re-evaluate the numbers. The "doomsdays predictions" will most likely be wrong and just a theoretical numbers game.

<comment><USER2> You're probably right that Germany has the most trustworthy numbers. The numbers you give work out to 30% growth per day, a 2.6-day doubling time; [https://en.wikipedia.org/wiki/2019%E2%80%9320_coronavirus_pa...](https://en.wikipedia.org/wiki/2019%E2%80%9320_coronavirus_pandemic) says Germany is at 6245 today, very close to the 6304 you'd predict from your numbers, although the Robert Koch Institut hasn't updated their page yet.

So, what accounts for the difference? The paucity of international travel (but then why is the spread so much slower in every other country — Germany is hardly famous for close physical contact with strangers)? Or is it just that Germany's comprehensive testing is allowing them to detect almost all the cases, while everybody else is underestimating by a factor of 10 to 50 or more — a constantly exponentially growing factor?

It seems unlikely that the pandemic was growing by 30% per day since December; it would have already infected 450 million people. Can we really impute that difference entirely to containment measures?

<comment><USER3> There is a simple explanation why the spread in Germany seems so much higher. If we look at how the virus spread in Germany we get a very good explanation.

It all started with a small cluster around Munich that showed up around the end of January ( 27th ) as the first confirmed case in Germany came back from business travel to China that was contained rather quickly as everyone involved did a great job isolating and breaking the infection chain and everyone involved recovered without severe symptoms just like any other flu for most mid-aged and healthy people. Then for a good month there were no confirmed cases, so no more drastic containment measures were taken.

After that the Government carelessly allowed Carnival in Germany to happen thinking they contained the virus and severely underestimating the threat it could pose. Carnival is one of the biggest celebrations in Germany each year with millions of people from all over the country coming to see, especially the Cologne Carnival on the 24th of February. While in general you are not wrong when you say "Germany is hardly famous for close physical contact with strangers" the carnival season and Oktoberfest are the two occasions where Germans do voluntarily have a ton of contact with strangers and party heavily. The Rhineland is famous for their carnival all over Europe and in some parts of the world. If you look at pictures of it you'll see what kind of nightmare this is if you have a potentially deadly pathogen spreading silently during the celebration from an epidemiologist point of view.

Three days later a couple from the region were the second and third confirmed cases that heavily participated in the celebrations while already being sick. Remember Covid-19 can be contagious up to 14 days before a patient shows symptoms. On top of that there was no chance to break the infection chain because the man is still in critical care and couldn't talk to officials and the woman had no idea where they could have been infected because they had contact with hundreds, possibly thousands of people over the course of the celebration days until the husband fell critically ill. So the lack of care from the Government together with gathering of hundreds of thousands of people from all over the country in close proximity, kissing, drinking and standing head to head in a crowd paired with that there were no tests done on people with covid-19 symptoms for a whole month between the munich and heinsberg cases is most likely the reason for the explosion in case numbers.

Also remember we are basically looking into the past up to 14 days as people who need hospitalization now have been infectious for up to that timeframe and just now start getting very sick. This is an incredible different pathogen to deal with and easy to underestimate because of this. To fight a pandemic you need to know the number of infected people, if you know someone is infected that gives you a fighting chance to break the infection chain if you isolate all people they have been in contact with. Unfortunately because of the huge celebrations this was impossible to do and we are where we are now.

"while everybody else is underestimating by a factor of 10 to 50 or more" this could very well be the case. With the numbers of infected people we see travelling outside Iran there are estimatons that a large part of the population is already infected. 7.5 Million people registered on an Iranian website that allowed for symptom screening. You usually don't register for such a site if you don't have any symptons that could be related to Covid-19. Just to show the difference between the real reported numbers and what could be likely.

If you ask about the containment measures, yes they work incredibly well, but at the cost of gigantic economic damage and right now I don't want to be in the shoes of any leader in any country that basically has to decide between saving lifes now and that there also needs to be a good future for the survivors of this crisis afterwards. It's horrible to think that up to 25% of a certain population and age could die. But it's equally frightening to think that depending how long this takes millions of people and their families could lose their homes, jobs and potentially starve because we have an almost complete economic shutdown across all sectors.

</comment></comment></comment></comment><comment><USER4> > _The Bay area currently has 204 confirmed cases (as of 3 /15). Multiplying > that by either 10x or 50x (Harvard's estimated ratio of > confirmed:unconfirmed cases) to get the actual number of confirmed cases > today: 2,040 - 10,200 actual current cases in the Bay area._

>...

> _80% of those will be "mild" which means "possibly as bad as having > pneumonia but not needing a hostpital stay." 14% will require a hospital > bed._

I have an issue with extrapolating the number of serious cases this way. I assume the 80% figure for non-serious cases is based on the number of formally tested patients.

Therefore the 80% figure doesn't include all the community-spread undiagnosed cases that must also be non-serious (or they would have been in hospital).

The percentage of serious cases amongst the _true number_ of cases is presumably much smaller than 20%?

<comment><USER5> There is also the issue of assuming that social distancing only reduces the number of cases by 90%. Social distancing affects the exponent. Depending on how aggressive it is it could reduce the height of the peak by a lot more than 90%.

I also have no idea the basis for the 10-50x assumption r.e. confirmed/unconfirmed cases.

<comment><USER6> No, social distancing affects the base, not the exponent.

</comment></comment></comment><comment><USER7> Why start today? There were 5 cases confirmed in the US as of Jan 25, 50 days ago, at least some of which appeared to be community transmission. Applying this math for the US as a whole with the 10x initial factor gives 5 * 10 * 2^(50/3) ~= 5.2 million cases TODAY. If we don't believe that number (or do we? Hell, I have no idea at this point), why do we believe the same math with today as initial conditions?

<comment><USER8> I don't think the OP math is sensible. (At the absolute most basic, if you're trying to be "conservative" about modeling the effects of social distancing on exponential growth, you should cut the growth _rate_ rather than cutting the absolute number by some percentage.) However, that said: it makes more sense to model growth as exponential once you've documented community transmission as the primary driver. When the US had 5 cases, they were all imported from China and basically contained.

<comment><USER7> I had recently seen a claim that among the first 5 US cases, some had been apparent community spread, but searching back now I can't find any substantiation for that claim. So yeah, looks like my assumptions here were wrong. Sorry.

Using the same math from feb 26 instead, which is the date I saw a CDC article published about first suspected community transmission, the figures are instead 15 * 10 * 2^(18/3) = 9600, which is more plausible. In any case, the calculations are extremely sensitive to the growth rate which, as you say, is also a thing we can control by modulating behavior. The extent to which we will actually do so is debatable, of course. As far as I'm aware I'm still expected to show up on site for work tomorrow.

<comment><USER9> Using the "Total Cases" graph (logarithmic view) here [0], it looks like Mar 1 is when the US's reported cases became exponential, and is probably a better baseline.

[0] [https://www.worldometers.info/coronavirus/country/us/](https://www.worldometers.info/coronavirus/country/us/)

</comment></comment></comment></comment><comment><USER10> > Multiply the number above by 1,024 (assumes a doubling of cases every 3 > days) if you assume no social distancing measure are put in place: 2.1MM on > the low end, mulitplying by a 10x ratio. _(Just because if I multiply by a > 50x ratio, it returns a number larger than the 7.8MM total residents in the > Bay area.)_

This is why the spread of a virus like this is a logistic curve, not an exponential. An exponential is a good model at first, but extrapolating too far doesn't work like this.

<comment><USER11> > This is why the spread of a virus like this is a logistic curve, not an > exponential.

More on this by 3Blue1Brown: [https://www.youtube- nocookie.com/embed/Kas0tIxDvrg](https://www.youtube- nocookie.com/embed/Kas0tIxDvrg)

<comment><USER12> Somewhere after, or around, thee 5 minute mark:

"true exponentials are basically non-existent in real life"

</comment></comment></comment><comment><USER13> "Multiply the number above by 1,024 (assumes a doubling of cases every 3 days) if you assume no social distancing measure are put in place: 2.1MM on the low end, mulitplying by a 10x ratio. "

Poke -- lots of measures are already being put into place (Stanford is effectively shut down, the big tech companies are making everyone work from home) etc.

Edit oh you have this right after: "Or, multiply it by less if you want to take into account various amounts of social distancing we're all doing. I'll cut that number above down by a huge amount – 90% – on the assumption that we all learn to stay home and self-isolate immediately, just to be super aggressive on my assumptions about how humanity will rise to the occasion"

Still, kinda weird to start with assumption of no measures when there clearly are some already.

<comment><USER14> The 90% might be conservative. If the rate of spread can be reduced by 50%, it will reduce the number of cases after 30 days by 96%.

<comment><USER15> And if it can be reduced by 60%, we will see exponential decay instead of exponential growth. (assuming R=2.4 is the average number of people each victim infects, which is a number I've seen used a lot).

It seems plausible that social distancing can reduce human contact for the average person by 50%, and for people with some flu symptoms by 80%. All this is to agree, the growth rate is by far the biggest factor in getting an estimate of peak impact.

</comment></comment></comment><comment><USER16> The exponential growth-to-the-whole-population makes a major assumption: everyone is susceptible. Given the virulence of COVID-19, and the surprising lack of total population penetration in Hubei (now that we know just how late the quarantining efforts were given the apparent latency between carrier status and symptoms) one wonders if there isn't, say, a genetic factor which makes one more susceptible than others, for starters, and if COVID-19 simply has/will burn itself out in many places.

<comment><USER12> Plus, everyone who got at the beginning, and went through it, will be immune for a certain time. So these interactions have to be taken into account as well. Plus everyone being immune from the beginning. So no, no exponential function. But as the math guy said, "indistinguishable from an exponential in the beginning".

Edit: The math guy being 3Blue1Brown in his video linked elsewhere in this thread.

</comment></comment><comment><USER17> Back of the envelope math... 30,000 cases a few weeks ago in China... use the articles math... (calculating) ... everyone from here to Alpha Centauri is infected and in ICU today.

That may be correct... this could all be a fever-induced hallucination. It's more likely, though, that the articles assumptions are idiotic.

</comment><comment><USER18> Something is missing: the average duration of covid patient in hospital. Hopefully, it is less than 30 days so some patient will go to hospital, stay a few days (then die or go home) and then leave their room in hospital...

I don't think that it was accounted for in the calculation for number of beds in hospital

<comment><USER19> If you wind up in the ICU, it may be 2-4 weeks before you can be released, regular hospital beds don't count. You also have to assume how many assisted breathing systems (respirators/ventilators etc) are available. You can't simply assume the number of beds are available either since people may already have some other serious issue and be in one. In China they constructed massive hospitals out of large spaces on the fly, something I can't see happening in our for profit system, so the capacity is not likely to be very flexible at expanding quickly enough.

<comment><USER20> The US does have the ability to set up large quarantine hospitals on the fly, but they are in tents. These are the same type of military tents that were/are used for migrant internment on the border.

I'm struggling to find a name for the group that I participated in an exercise with, but in my volunteer Search and Rescue days I was a 'victim' for a practice exercise of deploying a tent hospital for a combined human and animal pandemic.

The ability to set up these hospitals is there, what isn't there is the skilled nursing staff for ICU patients, or ventilators for patients who needed them. I'm really not sure how China handled that portion of caring for those that fell ill.

<comment><USER21> The problem being required large number of ventilators which even US will have problems delivering in such case. Only China has the hardware on hand.

</comment></comment></comment></comment><comment><USER22> Another very rough way to estimate this: If COVID-19 requires 10x more hospitalizations than influenza, and peak influenza maxes out hospital resources, then we need at least 10x more capacity.

Because there are so many variables, no one knows yet what the numbers will work out to be. The only safe thing to do is to expand capacity as much as possible by taking extreme measures.

<comment><USER23> This is the right point of view. If you start building hospitals now, you might have a chance when the wave hits. By now, such a post will not get some downvotes as reality trickled in. Have a look at the state of capacity in Italy: it's closed to maxed out with lots of improvised wards.

<comment><USER24> > This is the right point of view. If you start building hospitals now, you > might have a chance when the wave hits.

Probably not unless you have popup / prefab hospitals.

> Have a look at the state of capacity in Italy: it's closed to maxed out with > lots of improvised wards.

Italy is not "close to maxed out", it's way overcapacity. It might seem like it's at capacity if you count the total number of ICU beds in the entire country, but most of the cases for now are in the north, so the actual radio is way higher. Lombardia was at ~200% capacity circa wednesday.

<comment><USER23> > Lombardia was at ~200% capacity circa wednesday.

Source?

Mine is:

[https://www.giornaledibrescia.it/italia-ed- estero/coronaviru...](https://www.giornaledibrescia.it/italia-ed- estero/coronavirus-gallera-siamo-vicini-a-un-punto-di-non-ritorno-1.3467066)

Google Translate:

"«We have very few free places in intensive care, now we are in the order of 15 or 20 available. Every day we get someone new, tomorrow 3 more arrive and San Raffaele is creating an area with 14 seats which will be ready, however, in a week. Today we recover them by closing the operating rooms, where there are respirators that can also be used to support the breath »."

</comment></comment></comment></comment><comment><USER25> " _The Bay area currently has 204 confirmed cases (as of 3 /15). Multiplying that by either 10x or 50x (Harvard's estimated ratio of confirmed:unconfirmed cases) to get the actual number of confirmed cases today: 2,040 - 10,200 actual current cases in the Bay area._"

Er, ah, uh, .... Multiply 204 cases by an estimated ratio of confirmed to unconfirmed cases of 10 to 50 gives 2040 - 10,200 _estimated_ current cases in the Bay Area.

" _Just because if I multiply by a 50x ratio, it returns a number larger than the 7.8MM total residents in the Bay area._ "

As you just discovered, a raw exponential increase cannot continue for very long, if only because infected individuals begin to have difficulty finding uninfected individuals to infect.

" _80% of those will be "mild" which means "possibly as bad as having pneumonia but not needing a hostpital stay." 14% will require a hospital bed._"

You may want to knock down the severity numbers a bit, since it seems likely that severe cases will be reported and confirmed in larger numbers than less severe cases.

" _Potentially, even assuming aggressive social distancing, the Bay area needs 11x more beds than it has available in the next 30 days._ "

You probably should do this calculation in terms of bed-days: how long a given case occupies a bed on average before release/death.

Finally, as far as I know, the severity for old and infirm cases is much, much higher than the severity for those of you who are young and healthy. You may want to modify your model for local demographics.

</comment><comment><USER26> The key thing is to avoid counting cases. Those are affected by the number of test kits and the test kits are just now becoming available. Of course the "cases" will soar.

It's more important to look at ICU bodies and deaths. Those aren't as affected by supply issues.

</comment><comment><USER27> The dynamic in the Bay Area might be different from that in Europe, because of no public transportation.

<comment><USER28> I agree in general for US vs. EU, here far more travel is done via automobiles.

But the Bay Area does have MUNI and BART, it's not a _no_ public transportation situation.

</comment></comment><comment><USER29> maybe im getting old, but this reads like very well-written marketing for drodio.com.

the long-winded introduction, use of caps and sense of urgency it piggybacks on top of and the obvious straw man. i mean if you don't know how to do the math, then following the steps as presented in the article (ie. "add this, then times it by that.." etc) you're not actually reaching your own conclusions; that's just hand waving credence to the conclusion that the reader cannot fairly evaluate.

EDIT: writing my originally short comment i noticed many other subtle cues as well. for example:

the author's prediction of the article going viral (establishing trust because they've been "right" before)

the open invitation to criticize the article (suggesting that what you're reading is essentially the result of consensus)

the claim that it's being written despite any criticism it might receive because the subject is so important (moral authority)

all of these points are presupposed by the author, and not actually derived from the work. the more i think about it the more subtle and manipulative it appears. i hope im wrong, poke holes in it! but given the subject we're discussing it's really rather unsettling. we are indeed in a crisis, drodio be damned.

</comment><comment><USER30> I have a question about test positivity rate. UW Virology has been at about 8%, and that's them soliciting tests from all over the nation over the last week during a time when testing was very constrained. Even then, UW only reached capacity yesterday, they had capacity to spare until then. Divide worldometers "cases per day" stat by the the CDC website testing data as of a few days ago (the most recent day they declare their numbers complete), and you get around 8%. Finally, the Friday press conference mentioned the LabQuest LabCorp tests coming online and adding significant capacity, and that their test positivity rate as of then was about 2%, and this is all during a time when testing is limited, and presumably, only the most urgent or probable cases are being sent off for testing.

I don't have a lot of exponential-math insight, but those rates seem low if the virus has spread like crazy already. How does that reconcile with the math in this article?

</comment><comment><USER31> Take a look at this dashboard, specifically the bottom right section. The last 3 days, it seems that the number of reported cases is going down quite steeply. [https://www.arcgis.com/apps/opsdashboard/index.html#/bda7594...](https://www.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd40299423467b48e9ecf6)

now, I know, today's number's aren't fully in yet, and there are day to day fluctuations. but, if you trust the numbers for the last 3 days, it looks like the number of cases is not increasing exponentially. I know the actual case number is much higher, but, what matters is the relative percent increase or decrease from day to day, and it does not seem to be increasing in the last 3 days. am i wrong?

Starting a few days ago, almost no one is going out, except to do their big shopping. so how can the virus still spread?

<comment><USER32> The Johns Hopkins data (used in your link) has had a lot of problems the last couple of days. They've been doing various refactorings such as switching from per-county to per-state data, and it's causing a lot of issues. (It's a bit alarming that the number of cases is so high that even the people just tracking the data are getting overwhelmed.)

I've been following their data for a while and I admire their work, but I've stopped believing their numbers without double-checking. (Yes, I've filed bugs.) In addition, the last day on the graph has always made it look like cases are tapering off because it's partial data.

[https://github.com/CSSEGISandData/COVID-19/issues/650](https://github.com/CSSEGISandData/COVID-19/issues/650)

<comment><USER31> but what about this one: [https://www.worldometers.info/coronavirus/coronavirus- cases/...](https://www.worldometers.info/coronavirus/coronavirus-cases/#daily- cases)

daily new cases (at the very bottom) shows there's very little increase from the 13th to the 14th.

</comment></comment></comment><comment><USER33> > to get the actual number of confirmed cases today

I think for this part you meant "actual number of cases"? Since the confirmed number was 1/10th of that.

</comment><comment><USER34> The disparity of death rates among countries has more to do with infrastructure than the virus. Germany and Switzerland are proving this is just a flu, albeit a pretty bad one (0.1-0.5% death rate). More testing will prove this out by increasing the denominator by 10x.

<comment><USER35> This does not make any sense. North Italy health care is at least as good as the one in Germany and surely better than the one in Switzerland. Probably these countries are sampling a lot the general population finding many people with mild or no symptoms. In Italy because of the size of the problem the ones getting sampled are now almost solely severe cases.

<comment><USER25> Take a look at [https://www.worldometers.info/coronavirus/#countries](https://www.worldometers.info/coronavirus/#countries), specifically the total deaths and total recovered.

If I take Td / (Td + Tr), I get:

China: 0.05

Italy: 0.44

Iran: 0.14

South Korea: 0.08

Germany: 0.19 (Germany's numbers for both are so low I don't believe this is useful.)

What's up with that?

<comment><USER35> 1\. The population of infected people in Italy for some reason include an incredible amount of old people. If you see the aggregates VS South Corea, they have a lot of young people infected. So you get more fatalities per people infected. (Italy population, together with the one in Japan, is the oldest of the world, but this yet does not explain the difference, it's like if the cluster here originated from people at a certain age and also due to sociality patterns of old people here, or more likely, see "2" below).

2\. Italy, because of the size of the epidemic event we are facing, is sampling only people that go to the hospital in serious conditions. Other countries are sampling the more general population, finding a lot of positive cases with mild symptoms or asymptomatic at all. So there is a selection bias.

3\. It also depends on the way you count people. In Italy we are counting as a COVID19 victim even people severely ill that once dead are positive for the virus.

TLDR: you can't compare such numbers.</comment></comment></comment></comment>


Free Sports Data Program for Startups - <AUTHOR> http://sportradar.us/2016/12/sportradar-introduces-acceleradar-program-fuel-startups-stimulate-innovation-sports/ <comment><AUTHOR> SPORTRADAR INTRODUCES 'ACCELERADAR' PROGRAM TO FUEL STARTUPS AND STIMULATE INNOVATION IN SPORTS.

"Supporting the startup ecosystem has long been a core principle at Sportradar. We believe this is the perfect time to launch a freemium plan for sports data, and our hope is that this program will launch a number of companies and innovative applications for sports fans, teams, brands and other industry stakeholders," said Benn Gurton, Head of Business Development, US at Sportradar.</comment>


Clay: A new language for generic programming (based on LLVM) - <AUTHOR> http://tachyon.in/clay/ <comment><USER2> Hi folks, I'm the author of Clay. There aren't any docs ready yet, but I'll try to answer whatever questions I can. Also, there's a long thread over at reddit with many interesting questions.

[http://www.reddit.com/r/programming/comments/ctmxx/the_clay_...](http://www.reddit.com/r/programming/comments/ctmxx/the_clay_programming_language/)

<comment><USER3> I couldn't help imagining how OO "objects" might be implemented in Clay

Your dispatch code now:

        record Square {
        side : Double;
        }

        record Circle {
            radius : Double;
        }

        variant Shape = Square | Circle;

        procedure show;
        overload show(x:Square) { println("Square(", x.side, ")"); }
        overload show(x:Circle) { println("Circle(", x.radius, ")"); }

My "Objectivizing":

        interface Shape {
            abstract procedure show(self);
        }

        record Square : Shape  {
            side : Double;
            show(self) { println("Square(", self.side, ")"); }
        }

        record Circle: Shape {
            radius : Double;
            show(self) { println("Circle(", self.radius, ")"); }
        }
        variant Shape = Square | Circle;

Here, "abstract" declaration in the parent would make the children's "show" automatically become an overload. 'self' is variable which would be automatically specialized to the containing record. I think the resulting code isn't excessively verbose.

</comment></comment><comment><USER4> At first sight, this looks like a major improvement over C++ and even more powerful than D with less ad-hoc features.

Interesting language features, as far as I can tell:

* Type inference

* First-class functions/closures (interesting compared to C++)

* Overloading is based on compile-time evaluation, with the possibility to have arbitrary values as type parameters, and is similar to predicate dispatch (you can dispatch using arbitrary conditions), with also the possibility to do runtime dispatch.

* Most of the functionality of the language is implemented in libraries, with a small kernel of built-ins.

Library functionality:

* the standard standard library: arrays, vectors, maps, algorithms, sequence abstractions etc.

* tuples, unions, variants

* lazy sequences (streams)

* reference-counting shared pointers (boost::shared_ptr)

* SIMD intrinsics and vectors using SIMD operations

* bindings to the C standard library of Unix and Win32 API

* Green threads, channels

Other:

* C binding generator based on CLang

</comment><comment><USER5> I like the multiple dispatch feature ([http://bitbucket.org/kssreeram/clay/src/b1df8340f2b4/test/va...](http://bitbucket.org/kssreeram/clay/src/b1df8340f2b4/test/variants/3/main.clay)).

It reminds me of clojure multimethods (<http://clojure.org/multimethods>). Can dispatch conditions in Clay be "arbitrary"? (in the example it is on the value of 'x', but can it be as complex as in Clojure multimethods?

</comment><comment><USER6> It looks pretty nice. I'm curious about how the code generation works and whether Clay has the potential to produce the kind of code bloat you sometimes see with C++ templates. Say I have a function

      min(a, b) {
          if(a < b)
              return a;
          return b;
      }

From what I understand, this function can accept two Int32s, or a Uint8 and a Float32, or basically any other combination of numeric types. Is a new function for each type combination generated? I don't think there's any way around this to some degree, but I'm curious if you've been able to do anything to ease the pain.

<comment><USER2> You can control type specialization to a certain extent with overloading. For instance, if a procedure takes two arguments, and if both these types can vary independently, then you can use overloading to ensure that both arguments are converted to a common type.

        procedure foo;

        [T1,T2]
        overload foo(a:T1, b:T2) {
            // by default, convert both arguments
            // to the type of first argument.
            foo(T1(a), T1(b));
        }

        // the following overload specializes for the case
        // when both arguments are of the same type.
        [T]
        overload foo(a:T, b:T) {
            ...
            implement the logic here
            ...
        }

</comment></comment><comment><USER7> As someone who likes high level languages (mostly Lisp and Ruby, and learning Haskell for for the second time), I am surprised how much I like the language: list comprehensions, type inferencing for concise code, etc. There is about zero chance of my using this new language however since my language selection is about 90% driven by what customers want.

<comment><USER7> Hello kssreeram, question: your company web page and quillpad product look interesting; do you use Clay for quillpad development and deployment?

<comment><USER2> We are currently using Clay for a few projects within Tachyon for performance sensitive code. It's simply being used as a better C, and since Clay can generate light-weight C compatible DLLs, it fits in very well.

Quillpad itself predates Clay and hence doesn't use it.

</comment></comment></comment><comment><USER8> It looks like the syntax could use some polishing. Three obvious improvements: use line breaks for semicolons (and backslash at the end of line for multiline statements), do not require parentheses around conditionals in if, while, for, etc. statements, and (slightly more controversially) use significant indentation instead of curly braces. I think each of these changes would make the language undebatably more concise and readable than before (except the last one, which _has_ been debated, but I think it's definitely an improvement).

An example from algorithms/introsort of how the syntax would look:

      overload introSort(first, last)
          if first != last
              introSortLoop(first, last, log2(last-first)*2)
              finalInsertionSort(first, last)

instead of

      overload introSort(first, last) {
          if (first != last) {
              introSortLoop(first, last, log2(last-first)*2);
              finalInsertionSort(first, last);
          }
      }

<comment><USER9> This more than a little vacuous.

<comment><USER10> Not really. Python is famous for its readability, and this interest in reducing "noise" is one of the reasons why. It's definitely something that a language could benefit from at least riffing off, if not stealing outright.

The Python philosophy is that everything is expressed clearly and concisely. Parens around conditionals are just restating information that is already apparent, as are semicolons between lines. Fluent readers actually learn to ignore these syntactic features unless they're debugging (since these useless tokens are a breeding ground for bugs).

Ask yourself: How often do you mentally match the opening and closing parens on a conditional? How often do you rely on semicolons to tell when you're looking at a new statement as opposed to just looking at the lines of code?

<comment><USER9> Yeah, listen. I'm a python programmer as a matter of profession and paycheck.

It's a matter of taste.

Do I prefer significant whitespace ala python/haskell?

Yes.

Does it matter? No.

Does it matter when you're discussing a programming language you've just now encountered for the first time and is rather new and has many novel things to contribute to the world?

Fuck no.

Like I said, it was a vacuous thing to say. There are far more important questions to ask like,

"Are the generics a space-time trade-off similar to C++ templates?"

"Can I use the type system to encapsulate and restrict behavior in powerful ways, allow me to create performant but safe code?"

"Can I make a beowulf cluster out of this?"

Any of those questions have more substance than, "hurr whitespace is bettar why didn't you do tghaaaasdfsdgsg"

Christ-sakes.

<comment><USER10> Your entire response focuses on significant whitespace, which I didn't mention at all in mine.

And no, the time-space tradeoff of the generics is not necessarily a better question than how readable the language is. _That_ is a matter of taste. I will spend more time reading the code than I will worrying about the performance characteristics of generics or creating a Beowulf cluster, so caring about the common case is not exactly vacuous, even if it isn't the #1 most important thing.

<comment><USER9> >Your entire response focuses on significant whitespace, which I didn't mention at all in mine.

Doesn't matter.

>Beowulf cluster

It was a fatuous comment designed to compare with the original fatuous comment.

>the time-space tradeoff of the generics is not necessarily a better question than how readable the language is. That is a matter of taste

No it's not. Taste is preference, whether or not a language is impossible to deploy with generics in an embedded environment has absolutely nothing to do with whining about syntax.

        importance:
            Semantics > syntax

I don't think I've seen sophistry and an obsession with the trivial on hackerne.ws like this in quite some time.

You're complaining about the color of the bikeshed when real discussion and work is to be done concerning the semantics and structure of the language?

<comment><USER10> I think you're unnecessarily trivializing things that you personally care less about. Who cares about embedded environments? People who work in them. Is that group dwarfed by the group of "programmers who have to read and debug code"? Yes it is. So it seems really petty to personally insult me for caring (not much, but a little) about something that makes code less bug-prone and easier to read for everybody while you hold up something that affects a vanishingly small number of people as _what we should be talking about_.

Your complaints seem to reflect an idea that only features and implementations matter, while user interface is fairly trivial. If you believe that, I think you might be interested in this: <http://www.alistapart.com/articles/indefenseofeyecandy/>

<comment><USER9> You linked to a web design website in defense of trival eye candy in a discussion about computer science.

I'll just leave it at that.

<comment><USER8> Web design is the art of creating user interfaces for websites – the website visitors are the users. Language design is the art of creating user interfaces for programs – programmers are the users. The fields are related by the common theme of designing things for users. And I don't see how you can call eye candy trivial without defending that assertion _right after_ reading an article that argues it is not trivial.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> I find it interesting that goto is in the examples. I'm not deeply familiar with program theory and computability, but I thought goto made the program impossible both to reason about and to verify its correctness. Why would one include it in a new programming language? Are there really valid uses of it? I don't think the factorial example here is a good use - he basically used it as a while(true) infinite loop. However, I also couldn't tell you with accuracy why it might be bad here other than the ingrained mentality of goto=evil.

<comment><USER12> goto can be useful for "alarm exits". The linux kernel uses them a lot. See the bottom of this thread for some pseudo code <http://kerneltrap.org/node/553/2131>

<comment><USER13> Sure, but in the factorial example, Clay uses goto to express iteration: [http://bitbucket.org/kssreeram/clay/src/b1df8340f2b4/test/fa...](http://bitbucket.org/kssreeram/clay/src/b1df8340f2b4/test/factorial.clay)

</comment></comment></comment><comment><USER14> Looks like a very interresting language to me. I think it superficially looks a lot like rpython, with way more options to restrict and specify types on top of it. I'm very eager to see more documentation, specifically on types and memory management.

What is the syntax for pointers for example ?

<comment><USER2> Hi. Pointers to type T have the type Pointer[T]. '&' operator is for getting the address of a lvalue, and the '^' operator is for dereferencing. '^' is a better choice than C's '*' for dereferencing because, I can conveniently use the same operator for dereferenced field-access too, whereas C had to invent another operator "->" for that.

        record Point[T] {
            x : T;
            y : T;
        }

        updateViaPointer(ptr) {
            ptr^.x += 1;
            ptr^.y += 2;
        }

        test() {
            var p = Point(10, 20);  // type will be inferred as Point[Int]
            updateViaPointer(&p);
        }

</comment></comment><comment><USER3> Sample code I'd like to see: * How you'd implement a B-tree object * How you'd implement the-equivalent-of-a-class (a list of related functions and structures akin to something you'd see in the GTK documentation).

</comment><comment><USER15> That looks like a hodge-podge of C and Pascal to me.

Sorry about the tone of this comment but I fail to see anything that would make me go 'yes, let's try this'.

Generic programming is something you can do in any language, and most of the (successful) ones out there are created with that goal in mind.

Can someone more in the know enlighten me as to why 'clay' is special in this respect?

<comment><USER2> > Generic programming is something you can do in any language, ...

That's not true.

Generic Programming is about writing re-usable code that is also very efficient. On the whole, it requires the following:

\- Static types

\- Overloading

\- Type-parametric functions (templates)

\- Type specialization.

Not all languages have these features.

Generic programming first took off with C++, when it introduced templates. But a few languages before and after C++ have supported generic programming: Ada, Haskell, D, etc.

edit: formatting.

<comment><USER15> Generic programming is a way of writing code, not a thing that your language supports or you can't do it. I can write perfectly re-usable C code that is also very efficient by relying on the pre-processor to customise the code to the exact types and conditionals required for the situation at hand.

It's a bit like saying you can't write functional code unless you use a functional language.

<comment><USER16> Firstly, using the preprocessor will mean there is code duplication, even if it is not necessary. Secondly, once you are using the preprocessor to do generic stuff, you have probably thrown type-safety away.

That's not to say you can't write C in a generic way, but "generic programming" means something specific to computer scientists and has certain prerequisites.

And you can't write functional code without a functional language, without building a functional language on top of your language (which may not even be possible, e.g. you can do functional-ish stuff in C because of function pointers. Without them, you'd be stuffed.)

You can write functional code in a "non functional language", if by functional language you mean "Haskell, ML or Scala". But you need certain features like function pointers to do it, and in that sense you _do_ need a functional language. Same for generic programming - you need certain features.

<comment><USER14> Function pointers are very far from sufficient because you can't define new functions at runtime, since you can't nest functions or define anonymous ones. That means your functions are not first class citizen of your language and some common functional programming techniques are impossible to use in a clear way.

You can't do that for example :

        def make_adder(num_1):
            def adder(num_2):
                return num_1 + num 2
            return adder

<comment><USER16> Yes. Generally you then start cheating by passing around a function pointer and a void* that is the first argument of the function, i.e. doing closure conversion yourself. You can hide this with some macros and get close to having a functional language, but it's ugly and tedious (Cfront anyone?) Also, what I'm describing here is more similar to object orientation than functional programming. It's worth remembering the following koan though:

The venerable master Qc Na was walking with his student, Anton. Hoping to prompt the master into a discussion, Anton said "Master, I have heard that objects are a very good thing - is this true?" Qc Na looked pityingly at his student and replied, "Foolish pupil - objects are merely a poor man's closures."

Chastised, Anton took his leave from his master and returned to his cell, intent on studying closures. He carefully read the entire "Lambda: The Ultimate..." series of papers and its cousins, and implemented a small Scheme interpreter with a closure-based object system. He learned much, and looked forward to informing his master of his progress.

On his next walk with Qc Na, Anton attempted to impress his master by saying "Master, I have diligently studied the matter, and now understand that objects are truly a poor man's closures." Qc Na responded by hitting Anton with his stick, saying "When will you learn? Closures are a poor man's object." At that moment, Anton became enlightened.

\-- Anton van Straaten</comment></comment></comment></comment></comment></comment>