Why I sometimes hate JavaScript - <AUTHOR> http://geekregator.com/2015-02-27-why_i_sometimes_hate_javascript.html

<comment><USER2> The "JSlint catches this" argument is valid, but not to defend JS. When you say: "with a linter this doesn't happen," you're defending (Javascript + linter), not Javascript.

Just as when someone says: Typescript would not allow this, or that. Or use strict mode would not allow that. Yes! True. They would not. But they are not JS: they are Typescript, or JS strict mode, or...

There was an article here a while back about "tabooing your words"[0], and I think it applies very well here. Instead of talking about just "Javascript", let's try to not mention it. Say "Ecmascript 5 without any tooling," or "ES 6 with 6to5", or "Ecmascript 5 with a linter", or "Ecmascript 5 in strict mode with a linter."

Suddenly, you will find that everyone in this thread agrees: "Ecmascript 5 in non-strict mode, without special tooling" is a shitty language for humans to write because mistakes so easily go unnoticed. And humans make mistakes.

And if you do use linting, or whatever, no need to feel offended: we're not talking about that language!

In essence, saying "the linter would have caught this" is like saying "Typescript doesn't allow that". It's completely true, but it's a different language.

The author was not talking about "Javscript", but about "Ecmascript 5 in strict mode without tooling." And I think we can all agree: that language is problematic.

[0] [https://news.ycombinator.com/item?id=6855568](https://news.ycombinator.com/item?id=6855568)

EDIT: Author was talking about strict mode. Still problematic.

<comment><AUTHOR> > Or use strict mode would not allow that.

It was in strict mode. It allows that.

<comment><USER2> True, bad example. I was talking in general: the "yes, X has this problem, but if you tweak it to be X', then it doesn't." argument. You're not talking about X but X'.

But you're totally right, use strict is not syntactical. (I think?)

</comment></comment></comment><comment><USER3> The real issue here is it's not an error.

In another language the compiler/parser may have thrown a warning, but the issue here is actually that this is valid Javascript. Poorly composed Javascript, but completely valid.

Of course, jslint will complain about it (and a dozen other style things), so the more people utilize tools like that, the better.

More than anything, it's yet another reason to employ unit testing. Valid code that fails is very hard to debug without unit testing.

<comment><USER4> This is like the

        if (x = true) {}

kind of error. Yeah it sucks, but it's not really the language's fault.

Not to mention that that large a block of addition is bad code smell to me.

<comment><USER5> Yes, it is the language's fault. The language could have been better designed, here are some solutions:

1\. Assignments in conditions could be required to be surrounded with an additional pair of parentheses, like this: `if ((x = true)) {}`. GCC with warnings already requires this for C.

2\. The assignment operator could be something other than the equal signs, for example, it could be `:=`. Assignment is so different from mathematical equality and beginners to programming trip up on this all the time, it's a shame programming languages copy each other for familiarity and keep this bad design.

3\. Assignments in conditions could be banned out right, like Python does.

<comment><USER6> Sure, but detecting assignments inside conditionals is very easy and every compiler worth its salt gives warnings for them.

IMO, the really annoying language faults are the sort of thing that can't be fixed by a simple linter: object keys being converted to strings, the wonky pseudo-classy prototypal inheritance, dealing with libraries that abuse Function.toString or eval, etc.

</comment></comment></comment></comment><comment><USER7> Jshint catches this with 2 warnings: missing semicolon and expected assingment or function call.

In Sublime text 3, you can have inline warnings and as-you-type linting with the sublimelinter jshint plugin:

[https://github.com/SublimeLinter/SublimeLinter- jshint](https://github.com/SublimeLinter/SublimeLinter-jshint)

</comment><comment><USER8> Good programmer, bad programmer. Good code, bad code. Let's not all pretend we don't have stupid bugs in our code regardless of editor, linting or language.

JS is a mediocre language. It is popular because it is ubiquitous, not because it is good. It really does have bad error handling, weird optional rules, problems determining type when adding/concatenating with +, and the list goes on.

His was a syntax error that could have been caught with linting, sure. But there is plenty of well-formed JS that passes linting but still behaves badly due to the language itself.

<comment><USER9> As someone pointed out, the implied semicolon isn't the problem.

The problem is that the code is written in a way that makes it vulnerable to an implied semicolon.

The core syntax of JavaScript won't be changing any time soon, so it's important to teach beginners how to write code that minimises mistakes like these.

I haven't seen many books and tutorials attempt this. So it's unfair to blame beginners when there's so little encouragement to learn a strong defensive coding style.

jshint is nice for basic sanity checks, but it can't deal with bigger structural or stylistic mistakes. You can only fix those by learning from strong examples of good, clean code.

I think this applies to all languages. Being able to solve a problem and write a solution in code symbols isn't enough. I wonder if it would help everyone if there was a store of established best practices with examples for every language.

<comment><USER10> You know that kind of bullying where someone grabs someone else's arm and uses it to hit them in the head with their own hand, while yelling "Stop hitting yourself! Why are you hitting yourself?"?

Javascript's automagic semicolon is that, and you're the kind of person who condones it.

Yes, at the end of the day one has to learn how to deal with the automagic semicolon, if one doesn't just give up on Javascript wholesale and finds a way to write better languages. However the very presence and behavior of that code in every javascript interpreter is still a cruel misbehavior whose implementation was a mistake. It is just as cruel and as much of a mistake to imply even in the slightest way that it isn't.

The correct response is to not blame the coder who stumbles over that, but to gently let them know that yes, Javascript is a bad language, and to gracefully show them how to not fall into that trap.

<comment><USER9> Actually _that 's what I said_.

I wasn't blaming the coder _or_ the language.

I was saying that it would help everyone if there was top quality online help explaining how to code around language deficiencies - the kind of deficiencies that _everyone_ has to deal with it, because no language is perfect, and most languages are quite a lot less than perfect in at least some respects.

Be realistic. js isn't suddenly going to be rewritten with a proper semicolon patch. It's too established, and it would break too much code.

So complaining about it is a waste of everyone's time. It's like complaining about the fact that sometimes it gets cold in the winter.

It's more productive to do something practical about producing quality code that minimise possible problems, surely?

<comment><USER10> I want to make sure that you understand why i wrote that post. I saw you mentioning that the docs need to be better. I actually KNOW the problem, since we have it in Perl too, and i made a site for it. ( perl-tutorial.org )

However, your first two lines were still:

> the implied semicolon isn't the problem.

> The problem is [...] the code [...]

Which is simply not an acceptable thing to say. The first thing to do is admitting that the language is the problem, not the coders or their code. The second thing is, now they're listening instead of being disgusted at you, to tell them solutions.

</comment></comment></comment></comment></comment><comment><USER11> Lots of comments here, and on the blog, essentially stating "It's not Javascript, it's that you forgot to [lint|test|format|.+]"

There are tools to make up for these language deficiencies, but our attitude to those bitten by the language deficiencies it's truly unfortunate.

Even Python, everyone's second favorite dead horse for dynamically typed language problems, would throw an error here.

<comment><USER12> Agreed.

"It's not the language's fault; it's your fault for not using all the tools and best practices that make the language tolerable!"

That, to me, sounds like the language has some deficiencies.

<comment><USER13> These two things are not exclusive. The language can be deficient, and you can be irresponsible not for using well-known, long-established tools for addressing those deficiencies.

Normally I'd toss in a jab about deficiencies in choosing your language, too, but Javascript gets a bit of a free pass here on the browser.

<comment><USER12> Oh, certainly I'm not saying that a developer gets a pass for not using everything at their disposal (especially if it's something the developer had a choice on).

But the implicit requirements in tooling, the fact people are blaming a developer for using the language without also relying on third party tools, tells me a lot about the language's deficiencies. Also a bit about the language's community.

</comment></comment></comment></comment><comment> david-given Optional semicolons is my biggest hate with Javascript --- combined with expression statements silently discarding their result, it makes this kind of mistake far too easy to make.

Personally I've never understood with Javascript strict mode doesn't make semicolons mandatory.

<comment><USER2> Isn't strict mode purely semantical? IIRC you can implement a use strict pass purely on the AST, after the parser.

It's not an excuse, of course.

<comment> david-given Bah. You're absolutely right, of course, that's why strict mode won't help.

Now I find myself wishing there was a stricter mode. <script type="text/sensible-javascript">, perhaps...

</comment></comment></comment><comment><USER14> I think this is a general problem for people used to the comfort of compiled languages. I also struggle with languages like JavaScript. I always have the feeling that I'm actually doing something wrong or non-standard but the webbrowser is smart enough to understand it anyway.

This feels to me like I'm constantly operating in some kind of gray area where everything is "correct enough". But as others have already pointed out, this can be ameliorated by using the right tools. So the problem is actually purely about taste, I guess.

</comment><comment><USER15> Honestly, there should have been a loop there. The author introduced un- necessary complexity and a bug appeared. Not that Javascript is a great language.

</comment><comment><USER16> Sure, this is annoying, but the reality is that this type of stuff is very easily avoided through the use of linters. IMO, you should never work on a dynamic scripted language like JavaScript without constantly running a linter in the background to pick up stuff like this.

<comment><USER17> Exactly my thoughts. Just ran the snippet through JSHINT and while it doesn't recognize the exact error it shows you the location where it happens.

[http://jsfiddle.net/hnxjxyte/](http://jsfiddle.net/hnxjxyte/)

<comment><USER18> Plus, with a text editor plugin like [https://packagecontrol.io/packages/SublimeLinter- jshint](https://packagecontrol.io/packages/SublimeLinter-jshint) it becomes a no-brainer.

</comment></comment></comment><comment><USER19> If you only hate Javascript sometimes, you are definitely new to the language. That said even in a proper language like Ruby this particular bug can happen, that's why communities around these languages strongly encourage proper discipline, enforced by tools.

This bug most definitely should've made your tests go red, your linter give a warning and your code metrics suite should have a thing or two to about the huge expressions and 10+ line function they are in.

<comment><USER20> Is a function longer than 10 lines considered a problem by JavaScript analysis tools (or their users)? Surely you jest?

<comment><USER19> No, by Ruby analysis tools like Rubocop. For my Javascript I use CoffeeScript, and I rarely go over 10 lines for a function. Javascript obviously is a bit weird in this because many Javascript programmers wrap whole prototypes in closures.

If your function is over 10 lines, it's probably bad, just look at your functions. Every 10+ line function I've ever written was only that long because of laziness and reducing them has always resulted in better legibility.

<comment><USER21> I remember Code Complete giving a different recommendation, googled and found this: [http://stackoverflow.com/a/670039](http://stackoverflow.com/a/670039)

>I recently wrote some code for Class::Sniff which would detect "long methods" and report them as a code smell. I even wrote a blog post about how I did this (quelle surprise, eh?). That's when Ben Tilly asked an embarrassingly obvious question: how do I know that long methods are a code smell?

>I threw out the usual justifications, but he wouldn't let up. He wanted information and he cited the excellent book Code Complete as a counter- argument. I got down my copy of this book and started reading "How Long Should A Routine Be" (page 175, second edition). The author, Steve McConnell, argues that routines should not be longer than 200 lines. Holy crud! That's waaaaaay to long. If a routine is longer than about 20 or 30 lines, I reckon it's time to break it up.

>Regrettably, McConnell has the cheek to cite six separate studies, all of which found that longer routines were not only not correlated with a greater defect rate, but were also often cheaper to develop and easier to comprehend. As a result, the latest version of Class::Sniff on github now documents that longer routines may not be a code smell after all. Ben was right. I was wrong.

<comment><AUTHOR> Great. So I could have just left that 100-line function as it was and been spared that 30-minute bug-hunt for the missing "+".

Of course I wouldn't have written that blog-article then, and wouldn't have gotten onto the HN homepage... Oh, well... :)

</comment></comment></comment></comment></comment><comment><USER22> I really don't see why this isn't a syntax error

What is actually being done with the calls after the chain of +'s?

Edit: Something to do with semicolons being optional in js?

<comment><USER7> Javascript has "semicolon insertion".

It tries to parse a newline with no semicolon as continuing the current expression, if it can't, it inserts a semicolon.

It's a 'feature' that's caused too many bugs and is a warning in most linters.

</comment></comment><comment><USER23> Whenever you can't find the bug in javascript, I beg you to run the code through jslint. It would have caught this right away.

</comment><comment><USER7> It's way better to use [values].join('') here... It's probably faster and it coerces all values to string.

If the first couple of results were numbers or booleans, they would be summed:

        > true + 10 + " result"
        11 result

        > [true,10," result"].join('')
        true10 result

<comment><AUTHOR> All the functions in that code return numbers.

<comment><USER24> Making [`.reduce`]([https://developer.mozilla.org/en- US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce)) a significantly better choice.

</comment></comment></comment><comment><USER25> My approach, in any language, would be to collect it in an array and sum (or concatenate) it at once.

        var values = [];
        values.push(phraseValue( result, queryData ));
        ...
        var value = values.reduce(function(prev, next) { return pre + next; });

I understand that COLLECTION.reduce may not be in all javascript implementations (or even in all languages), but that would be my first thought on how to handle that mess. Id probably even make it a function addAllOfTheseValues(result, queryData);

I also dislike direct string concatenation, I always try to use print type functions because it is easier to separate variables from text and spot potential errors. I'm happy that JS is getting this.

</comment><comment><USER26> I had a similar-ish problem just last night. Spent over an hour crawling through some code trying to figure out why it wasn't working like it was supposed to. I ended up doing the divide-and-conquer approach with "console debugging". I was cursing wildly by the end of it.

All to find in the end that I had used ( ) instead of [ ] (or maybe it was the other way 'round?) in a thick spot of code, and Javascript was happy to try to do that without throwing any kind of error.

That sort of thing happens in all languages to some extent, but debugging in Javascript is unmitigated hell.

</comment><comment><USER27> Doesn't JS have a join function?

I realize that problems like this are the reason that my coding is going in a more functional direction (I would still say I write imperative code), but I avoid "doing things manually" like this, as its easy to overlook such errors.

</comment><comment><USER28> You'd spot that right away if you had a visual jshint/jslint plugin in your IDE. It's a real time saver to have one: there are dozens of cases like your example that are valid JS, although it's not what you intended to write.

</comment><comment><USER29> What Node.js taught me is that JavaScript is language like any other. It has good parts, it has quirks and you have to know what are its strenghts and what are its weaknesses to use it properly. And you can say that about any other language.

<comment><USER2> Ehm, yes. Sorry to ask this, but what is your point? I don't understand why you are saying this thing, which nobody here would disagree with.

Does what you just said mean that we shouldn't talk about JS's weaknesses?

Or do you mean that we can, but that the points the author brings up have been beaten to death time and time again here on HN and this post + the inevitable comments it will attract have nothing to offer?

Those are the only two options I can think of for now. Or did you mean something else?

<comment><USER3> As I mentioned in another comment, whether this is inherently a weakness is up for debate. Valid code that fails can happen in any language. The problem here is Javascript can be very, very forgiving, which allows one to make mistakes like this.

There are many totally lucid, on-point criticisms of Javascript and at least once a day the language ticks me off, but this one is not so black-and-white.

</comment></comment></comment><comment><USER30> I agree that JSlint would catch this, but then againg that doesn't seem like a valid argument to defend JS in this specific subject.

</comment><comment><USER31> JSHint is a thing.

Also, I think you are looking for typescript.

</comment><comment><USER32> That title looks rather backwards to me. You don't need a reason to hate JS. You do need a reason to not hate it.

</comment><comment><USER33> I've spotted the error in less than 5 seconds... \+ I personally don't like the way you write code.

</comment><comment><USER34> I saw the error in 30 secs. Advice: try to use dislike instead of Hate.</comment>


What makes a good crypto exchange? What do you look for in a crypto exchange? - <AUTHOR> What are the basic features? The extras? The advanced ones? How do you define a smooth cryptocurrency exchange user experience? What are some dealbreakers?
  I'm looking to create a blog for cryptocurrency exchanges and I would love to get some feedback from the community.
  Thank you. <comment><USER2> Decentralized; low and transparent fees</comment>


Microsoft Internet Explorer security fix released, includes Windows XP users - <AUTHOR> http://business.financialpost.com/2014/05/01/internet-explorer-bug-fix-microsoft/?__lsa=e80b-046a <comment><USER2> Awesome, now we can all go back and start using IE again.

<comment><AUTHOR> No way. But there are corporate environments where IE is needed for certain tasks and with that bug ICT was in the water with sharks.</comment></comment>


A self contained embeddable NoSQL database - <AUTHOR> http://www.unqlite.org/

<comment><USER2> I kind of wonder at the need for this. NoSQL's main advantage is its performance at the cost of a no joins limitation and no ACID.

An embedded database is unlikely to have much in the way of performance requirements, otherwise you would use a full database on a dedicated server.

Seems a bit like NoSQL, just for the sake of it.

<comment><USER3> Imagine the SQLite engine embedded in Lightroom - once you get past a few thousand photos, performance starts becoming relevant.</comment></comment>


The Lambda Papers - <AUTHOR> http://library.readscheme.org/page1.html? <comment><USER2> Links to the three unlinked papers:

 _Compiler Optimization Based on Viewing LAMBDA as RENAME + GOTO_

ftp://publications.ai.mit.edu/ai-publications/pdf/AITR-474.pdf

 _Debunking the "Expensive Procedure Call" Myth, or Procedure Call Implementations Considered Harmful, or LAMBDA, the Ultimate GOTO_

[http://dspace.mit.edu/bitstream/handle/1721.1/5753/AIM-443.p...](http://dspace.mit.edu/bitstream/handle/1721.1/5753/AIM-443.pdf?sequence=2)

 _Design of a Lisp-based Processor_

[http://dspace.mit.edu/bitstream/handle/1721.1/5731/AIM-514.p...](http://dspace.mit.edu/bitstream/handle/1721.1/5731/AIM-514.pdf)

<comment><USER3> Thanks! The main page (<http://readscheme.org/>) has a contact address for the maintainer; maybe they'll add those links to the site if you let them know.

<comment><USER2> ...or result in a takedown. The links appeared on the first page of Google searches for the title. And the ACM appears pretty committed to monetizing articles in PDF format.

<comment><USER3> I don't get it. Are you suggesting one can't link to a paper on a completely legit MIT site, because a version of the paper was later published in an ACM publication?

<comment><USER2> No. I am stating that the copyright status of the files sitting at the end of my links is unknown. They may be hosted legally with the rights holder's permission. They may be hosted legally under fair use.

On the other hand, general access could exceed fair use - e.g. the hosted copy was made for archival purposes of a licensee. Or the hosted file could simply be an illegal copy. While hosting at MIT has some correlation with legitimacy in this particular case, it in no way insures it.

Right now, the papers are there for anyone with a web connection. The risk of breaking that far outweighs the benefits of fixing readscheme.

</comment></comment></comment></comment></comment><comment><USER4> These papers (or those of them that I've read, anyway, mostly the earlier ones) are really fantastic.

</comment><comment><USER5> SICP now free online too (and has been for quite some time)... <http://mitpress.mit.edu/sicp/full-text/book/book.html>

</comment><comment><USER6> Previous discussion about the relative merit of these papers versus the relative number of times a link to them floats about: <https://news.ycombinator.com/item?id=599306>

<comment><USER4> That's from nearly five years ago and consists of three comments.</comment></comment>


U.S Developing Mobile Phone Panic Button for Democracy Activists - <AUTHOR> http://www.readwriteweb.com/archives/us_developing_mobile_phone_panic_button_for_democr.php?sms_ss=hackernews&at_xt=4d990077a299ff9c%2C0 <comment><USER2> As someone pointed out on the last "curthopkins"-submitted story, the account seems to be a blogspammer. It has zero comments, and every submission is from this readwriteweb domain.

Since we're discussing ways to improve HN, I suggest banning both the user and the domain, and restricting the submission of articles to users with over a certain comment threshold karma.

</comment><comment><USER3> Good thing. That's exactly what we need in the US.

<comment><USER4> It'll probably be labeled for export-only, because in the US, we don't need it because we already have democracy, so it would only be used by t'rr'rists.</comment></comment>


1880-1920 the first electric cars (2015) - <AUTHOR> http://mashable.com/2015/07/20/early-electric-cars/ <comment><USER2> Does everything a gas car can 'except tour' aka, long distances. Still the same limitations (and advantages!), even with all these advances.

There is a common sentiment in auto engineering that 'nothing is new', only our intergration and manufacturing skills are getting better. I mostly agree.</comment>


Windows 10 on ARM is being groomed to fail - <AUTHOR> https://www.slashgear.com/windows-10-on-arm-is-being-groomed-to-fail-19519940/ <comment><USER2> All I want is that I'm able to install Linux on these laptops. If they do that, there could, at least, be a niche for them between the Chromebook space and low-end laptops.

In the meantime, a Pinebook is a reasonable ARM device that's not as fast as these Qualcomm based ones, but costs US$ 100.</comment>


Doing Mathematics Differently - <AUTHOR> http://inference-review.com/article/doing-mathematics-differently <comment><USER2> This is a good article, and an important topic, but it mischaracterizes the discipline of mathematics:

> the principle that mathematical truth is black or white and provides > absolute certainty.

> Pure mathematicians like to think that they have absolute truth

Formal mathematics has no concept of absolute truth; this is left for philosophy. It's just concerned with axioms and theorems (and their proofs). Whether an axiom reflects reality or not is out of scope, which is the whole point of their invention. As a philosopher you're welcome to debate them, and as a pragmatist you're welcome to choose them (and be compelled to accept their consequent theorems).

> Because it is easy for mathematicians to ignore Gödel's proof. What lurks in > their heart of hearts is a commitment to absolute truth, and a universal > formal axiomatic theory for all of mathematics.

In one sense it's disheartening that we cannot prove or disprove every proposition in every axiomatic system. This is an unreasonable expectation as Gödel proved, but it doesn't invalidate the theorems we _have_ proven and disproven. It also doesn't invalidate all of the programs we have written, even though there are non-terminating programs and uncomputable numbers.

<comment><USER3> "Formal mathematics has no concept of absolute truth"

This is false. The axioms don't have to be true. You can still talk about their implications in absolute terms.

"Assuming a=0 implies a=0" is absolutely true. Regardless of whether _a_ actually is 0.

<comment><USER4> "The axioms don't have to be true."

No, not at all. Axioms are better thought of as universally accepted truths which everything else depends on. [https://en.wikipedia.org/wiki/Logical_atomism](https://en.wikipedia.org/wiki/Logical_atomism)

<comment><USER5> Acioms are only viewed as true because they are defined as such.

It's obvious when applying math to real world. If you're talking about objects on Earth surface, for example, at first Euclid's geometry will get you good results, because objects you're working with can be assumed to fulfill it's axioms. However, when your scale gets bigger, you'll have apply a more complicated geometry apparatus.

Easiest analogy about axioms is interface in software engineering: you don't care what the object really is, but as long as it shows certain properties, you can prove theorems about it. Which will be true for any objects with these properties, and as true as exactly these properties are fulfilled by the real life object.

</comment></comment></comment></comment><comment><USER6> Just read this part:

> So we have a measure of the complexity of a formal mathematical theory A, > and in theory A you cannot prove that any program is elegant that is larger > in size than A's complexity. That is what the paradoxical program P proves.

And thought: hmm. Sounds like, what was it called again? _Checks Wikipedia, article on Kolmogorov Complexity._ Oh yeah, Chaitin's Incompleteness Theorem. I wonder if it's mentioned in the article. CTRL-F - "Chaitin"

...the writer of this article is Gregory Chaitin.

</comment><comment><USER7> This is the Chaitin of Kolmogorov-Solomonoff-Chaitin complexity, if the argument seems familiar.

I like Grassberger-Crutchfield-Young ([http://www.scholarpedia.org/article/Complexity](http://www.scholarpedia.org/article/Complexity), look for Statistical complexity) complexity, because it can actually be measured.

I had long suspicions that Chaitin was a Leibnitzian, but there you go. I like thinking about the Principle of Sufficient Reason, too, but I have long suspected the phenomenon of causality can be more simply explained by positive feedback effects _only_. ([http://howonlee.github.io/2016/01/21/Poking-20At-20Causation...](http://howonlee.github.io/2016/01/21/Poking-20At-20Causation1.html))

<comment><USER8> The thing is that any computable complexity measure allows one to algorithmically produce an infinite which seems to have a complexity which goes to infinite as it get longer but since it is the product of a finite length computer program has finite complexity.

On the other hand, you can prove that for "nearly all" finite sequences of symbols, the algorithmic complexity is within a constant of naive statistical measures.

<comment><USER9> How is that done? My naive approach would be "always pick the next symbol that most increases complexity" but that doesn't seem guaranteed to diverge and could easily be trapped in local Maxima...

</comment></comment></comment><comment><USER10> Anyone fascinated by the (non-)intelligibility of the world might like one of Chomsky's many talks on the subject. Such as [https://chomsky.info/20060301/](https://chomsky.info/20060301/)

> In fact, if you look at the history of science seriously, in the seventeenth > century there was a major challenge to the existing scientific approach. I > mean, it was assumed by Galileo and Descartes and classical scientists that > the world would be intelligible to us, that all we had to do was think about > it and it would be intelligible.

> Newton disproved them. He showed that the world is not intelligible to us. > Newton demonstrated that there are no machines, that there's nothing > mechanical in the sense in which it was assumed that the world was > mechanical. He didn't believe it — in fact he felt his work was an absurdity > — but he proved it, and he spent the rest of his life trying to disprove it. > And other scientists did later on. I mean, it's often said that Newton got > rid of the ghost in the machine, but it's quite the opposite. Newton > exorcised the machine. He left the ghost.

> And by the time that sank in, which was quite some time, it just changed the > conception of science. Instead of trying to show that the world is > intelligible to us, we recognized that it's not intelligible to us. But we > just say, 'Well, you know, unfortunately that's the way it works. I can't > understand it but that's the way it works.' And then the aim of science is > reduced from trying to show that the world is intelligible to us, which it > is not, to trying to show that there are theories of the world which are > intelligible to us. That's what science is: It's the study of intelligible > theories which give an explanation of some aspect of reality.

</comment><comment><USER3> Omega is an amazing number. We know it has a digit in its binary expansion that is 0 or 1, yet it is impossible to formulate why. It is impossible to come up with a train of thought that explains it. There is no explanation that can be written down on a piece of paper.

So we are left with the weird conclusion:

1\. It has the value it has for no reason.

2\. It has the value it has for a reason that is impossible to formulate.

<comment><USER11> Nah, Omega is just defined as a number which contains countably infinite bits of algorithmic information. Since algorithmic information is equivalent to thermodynamic information (and likewise relates to quantum information if you head in that direction...), the whole "you can't calculate Omega" thing is really just a way of saying, "You can't have an infinite-precision physical measurement encoded into a finite physical system."

Chaitin makes far too much metaphysics of his work.

</comment></comment><comment><USER12> Somewhat related, a physics talk by Susskind about some interesting links between the inside of a black hole and (quantum) computational complexity. The complexity part starts at 20:00. He works with Scott Aaronson on this.

[https://www.youtube.com/watch?v=IuY4RMehdP8](https://www.youtube.com/watch?v=IuY4RMehdP8)

</comment><comment><USER13> The author keeps talking about going through all possible proofs built from the axioms, as if that's a thing that obviously could be done. However, if your system is complicated enough to allow arbitrarily large combinations of axioms in your proofs, then I don't understand how you can expect enumeration of all proofs to be a finite process. Any statement that says "enumerate all possible proofs" followed by "and then do X" is meaningless, because you will never reach the "do X" step!

<comment><USER14> He's not assuming finiteness, just countability.

An example of how this is useful: If it were provable that a program does not halt, an enumeration of all proofs would find the proof that the program does not halt. (If a program _does_ halt, it is necessarily provable that it does so, for obvious reasons.)

Thus either,

\- We can solve the halting problem, or \- There exists something that is true but not provable.

Thus the uncomputability of the halting problem implied Goedel's incompleteness theorem. Proving the other direction can be done by similar techniques.

</comment></comment><comment> Ono-Sendai Counterpoint (from my blog):

[http://forwardscattering.org/post/7](http://forwardscattering.org/post/7)

[http://forwardscattering.org/post/14](http://forwardscattering.org/post/14)

In summary i don't think AIT offers an absolute measure of complexity, due to having to choose the abstract machine.

Not to say the ideas aren't interesting, and that this isn't a nice article, from one of the main figures in the field.

<comment><USER8> I don't think your claims are correct.

If you read a formal definition of Chaitin-Kolmogorov, you can find that the concept are essentially normalized by recursive function theory. By using the Church-Turing thesis, you can see that any program in any language can be simulated up to a constant length-multiple by an abstract Turing machine (speed isn't considered in these definitions so architecture doesn't matter much). Chaintin-Kolmogorov basically considers the log of the length of programs and then thus takes it's values as being plus or minus a constant for a given measure.

<comment> Ono-Sendai have a look at the second post, i address that.

<comment><USER15> I'm sorry to say this, but your second post also doesn't really address the issue and continues to misunderstand the purpose and definitions of Kolgomorov complexity.

The fact that for any specific string S you can find a language L such that the Kolgomorov complexity K(L, S) is 0, is not that interesting.

1\. For any specific L, you can only play this trick (hardcoding a target string) for a finite number of strings. That means for essentially all strings (all but a small finite number) the trick is irrelevant.

2\. There is no free lunch: The trick you use to bring down the Kolgomorov complexity K(L, S) down to 0 increases the complexity of L. This can be taken into account, see "conditional Kolgomorov complexity".

The book "An Introduction to Kolmogorov Complexity and Its Applications" by Li and Vitányi explains this, and much more in great detail, and is highly recommended.

<comment> Ono-Sendai Regarding point 2, I agree, but the question is how to measure the increase in complexity - we are back at square one :)

<comment><USER15> You measure it in the same way, using the idea of shortest decription w.r.t. a fixed universal language. You than show that this is absolute up to a constant. Any results produced that way such as the incompressibility of most strings is independent of such constants, hence the the choice of universal language doesn't matter.

</comment></comment></comment></comment></comment></comment><comment><USER8> "Gödel incompleteness is even unpopular among logicians. They are ambivalent. On the one hand, Gödel is the most famous logician ever. But, on the other hand, the incompleteness theorem says that logic is a failure."

I suspect Gödel himself didn't like the incompleteness for similar being very much an idealist who even created (but didn't) publish a modal-logic proof of the existence of God.

The thing is that if one takes a formalist position, that mathematics is a game played by pencil and paper (or computers) then the completeness and incompleteness theorems mean that foundational questions are simply done. oppositely, the position that foundations-people now have to take is that even though you create a universe compatible with any true-but-unprovable position (like the continuum hypothesis or its negation), some of these true-but- unprovable hypotheses are more plausible, aesthetically appealing or something and these hypotheses should be the one considered "true" in some ideal reality (I'm trying to crudely paraphrase Raymund Smullyan here).

</comment><comment><USER16> In a sense mathematics already is experimental, because we already have, although not formally defined, class of things where we simply don't know their status of being true or false - hypotheses.

I am currently thinking how to make an automated mathematician based on lambda calculus, which would have its own notion of "beauty", and based on this it would try to select interesting definitions. It seems such a system needs to have a notion of experiment.

Since computations are proofs, theorems are basically computations that we know the result of already, i.e. which have already been done (all with respect to some axiomatic system, given by types).

Such system also needs notion of "economy", which lets it allocate computational resources effectively. So it needs to be able to evaluate things only partially, to avoid infinite loops etc.

This naturally leads to experimental approach, where you don't only know true or false, but there is a wide spectrum of what you know about certain statement (lambda expression).

</comment><comment><USER17> What's the point of inserting untranslated French text into an English article?

Is it supposed to just be window-dressing? Is it supposed to promote the (outdated and highly dubious) notion that all educated people speak French? Is it just for the author to show off? Whatever the reason, it's a highly obnoxious practice and it doesn't improve the article.

<comment><USER18> The author just probably like Leibniz a lot and prefer to make the citation in the original language of the text.

Would you have preferred Latin or German ? Leibniz used them too.

<comment><USER17> > Would you have preferred Latin or German?

I could get by with German, but that's beside the point: the essay is written for an English-speaking audience, so it's stupid to insert extended passages of foreign text without providing translation.

<comment><USER19> Obviously nobody is forcing you to read it. Perhaps it's written for an English speaking audience that doesn't mind skipping over some French here and there.</comment></comment></comment></comment>


You don't really need those features... yet. - <AUTHOR> http://garry.posterous.com/you-dont-really-need-those-features-yet

<comment><USER2> If you are starting to lose users because of somewhat simple features you may actual need those features.

In Reference to posterous comments here: <http://news.ycombinator.com/item?id=956118>

In a market as crowded as webblogging one might think that polish and perfection with a healthy set of features would be needed to compete.

<comment><USER3> Have no fear, we are working day and night to bring the ruckus. The list is long.

</comment></comment><comment><USER4> More importantly, you might not need those features ever...

</comment><comment><USER5> Release early, release often?

</comment><comment><USER6> The thing with Start-ups? They're just starting up...

<comment><USER7> Reminds me of this statement (Braveheart):

"The problem with Scotland, is that it's full of Scots"

</comment></comment><comment><USER7> For real. You really don't need those features.</comment>


Ask HN: Federated alternatives to Meetup.com/Facebook Events? - <AUTHOR> Is anyone working on a self-hostable, federated Web application for organizing meetups and events?  What I mean by "federated" is something that allows users registered on one instance to search for and join groups hosted on other instances, RSVP to their invitations, and talk with their users. <comment><USER2> [https://github.com/GetTogetherComm/GetTogether](https://github.com/GetTogetherComm/GetTogether)</comment>


The Rules of the Gun Debate - <AUTHOR> https://www.theatlantic.com/politics/archive/2017/10/the-real-common-sense-tactics-the-debate-is-missing/542229?single_page=true <comment><USER2> To make this more interesting, replace the words gun and weapons with cars. FoxReplace is a good Firefox addon for this.</comment>


Ask HN: Do you use Setters and Getters in PHP?  - <AUTHOR>

I'm ashamed to admit that I have known about setters and getters for a very long time, and used them sparsely, mostly due to what I thought were time constraints.
What I learned a couple years ago is, NOT using them can be a bigger loss of time when you're updating something a lot. In an effort to write better stuff I start doing tons more data hiding, and using setters and getters (like most people do in other languages anyway) and found the following things:
I can sort of enforce type safety in PHP. I can create better interfaces and hide implementation better. Sanitizing the data is far easier. Usually just have to change it one place. Code is much cleaner in many places.
So my question is, are you using them? Is there any good reason not to? <comment><USER2> In a language like PHP where you can't easily always easily refactor direct setting of properties (as opposed to Ruby), it makes sense to make anything where the logic might change in the future into a setter. For simple struct- like objects with no calculation, direct setting is fine.

(I know this isn't strictly true about PHP with `__set()` and `__get()`, but that is hardly ideal.)</comment>


The Agony of Grad School - <AUTHOR> http://false-epiphany.com/2009/07/the-agony-of-grad-school/

<comment><USER2> I feel bad for the guy, but I think his problem is a bit of a personal issue. He should seek out help from a doctor on how to manage his attention disorder.

Lots of people make it through graduate school while teaching and taking multiple classes. It isn't easy, but it certainly isn't impossible.

<comment><USER3> Yeah, I agree. The time fragmentation in grad school makes it a bit difficult to put a lot of time and effort into any one thing, but I never found it as excruciatingly impossible to concentrate as this guy. The environment is definitely manageable.

<comment><USER4> Does he officially have ADHD? I felt increasingly horrified as I read through that post - everyone gets distracted but his level and inability to focus seems to be way past normal and into the pathological.

</comment></comment></comment><comment><USER5> The real agony of grad school starts when the classes are over and you have nothing do distract you from working on your used-to-be-interesting-but-now- not-so-much research project .all. .the. .time...

Plus it was at that exact time that my RSI hit. Classes had apparently proven enough of a variation in tasks that when I started doing research all the time, 99% computer work, it rapidly went downhill.

</comment><comment><USER6> If you have a lot of trouble with deliberately directing your attention, you should probably ask a mental health doctor to evaluate you for ADD ("Attention Deficit Disorder"). It's possible that you've had ADD all your life and covered for it with your high intelligence, but now that the demands on your attention are much higher in grad school, your deficit in allocating attention is becoming a problem.

</comment><comment><USER7> It seems like this author is taking four classes and teaching an additional one. So, he complains that he needs to task switch too often. (How is this different from undergrad?)

He should just wait a year or two for classes to be over with so that he can concentrate more on research ...

<comment><USER8> Actually, as an undergrad I find it troubling too. I usually pick out my hardest class and pretend that's my primary task for the term and regard the others as annoyances.

Summer session--where you only take 1 or 2 classes at a time for six weeks at my school--always worked out better for me.

</comment></comment><comment><USER9> I have had similar experiences, but only when I didn't have enough to do. The more I have to do, the more crammed my time feels. The more crammed my time feels, the more important tasks seem to me, and therefore the more likely I am to do them.

Taking only one or two classes at a time kills me, because I have so much free time I always think "Oh I can just do that later" and then never actually do it. With a full load of classes I think "Geez, I better do that now so I have time for the work I know I'm going to be getting later."

Lastly, I've heard that meditation is supposed to quiet the noise in one's head. It hasn't worked for me yet, though I probably haven't been practicing it as regularly as I ought to.

</comment><comment><USER10> The author sounds extremely stressed. To some extent, this is the big learning of the PhD program that I learned a touch too late : be self directed and manage your time. This line jumped out at me "I could not concentrate. There was too much noise and interruption in my head." I think that there are a variety of meditation techniques that could help you. There is a feedback loop in the brain and I recently saw a talk from a stanford prof detailing how certain kinds of meditation can actually reinforce the executive control process in the brain. The basic types were concentrating on something (e.g. breath) or concentrating on nothing... Here is the substance of the talk by the same fellow : <http://www.youtube.com/watch?v=sf6Q0G1iHBI> Good luck, keep cool and find a good task management program!

</comment><comment><USER11> Now try the agony of _not_ being in grad school.

<comment><AUTHOR> Did you find the work world even more time-fragmented than grad school?

Hmm, the post comes down to saying that grad school is run on the manager's schedule rather than the maker's schedule.

<http://paulgraham.com/makersschedule.html>

<comment><USER11> > Did you find the work world even more time-fragmented than grad school?

Precisely. (Though I know of grad school only through second-hand accounts, it still sounds like Valhalla when compared with nearly any kind of ordinary work I can think of.)

</comment></comment></comment><comment><USER12> Once you get past the initial 2 years of classes, grad school (PhD) is the exact opposite: virtually no interruptions, with vast blocks of time to manage as you will. I often go a few days without having a single interruption -- no meetings, no phone calls, no other annoying tasks to break my concentration.

This is one of the greatest things about grad school, and I think unique among most professions -- I'll miss it once I graduate and have to find a "real" job.

</comment><comment><USER13> Grad school for me is like this: class, sleep, write, and no social life. I question some of the assignments, but find the content interesting. I just wonder sometimes what other people (ladies) my age are doing. I assume marriage, dating, or having children. I do not think of myself as abnormal for not taking that route, but instead realize I just do not have time for these things at the moment.

<comment><USER14> I feel similarly. But I worry that I'll wake up one morning and be 50, not having stopped feeling that way.

</comment></comment><comment><USER15> What makes OP think that it's any different anywhere else. Every single thing he complained about, I have experienced in the work place.

If you have a problem with time, space, noise, others, whatever, you need to find a way to solve that problem. With one big difference: there are no "incompletes" at work.

The problem isn't grad school. It's OP. I sure hope he finds a way to solve it. If he can't hack it there, he surely won't be able to hack it here.

</comment><comment><USER16> I concur. With the title of your blog.

<comment><AUTHOR> The title of the blog, or the title of the article?

</comment></comment><comment><USER17> Yes I also thought school was utter bullshit.</comment>


Show HN: Session–a pomodoro timer app with beautiful analytics - <AUTHOR> https://www.stayinsession.com <comment><AUTHOR> Hello HN! It's been a while and I'm excited to release Session—a pomodoro timer app (work in 25-minutes chunk) with analytics.

Here's my thought process on why I made Session:

* I used pomodoro technique for over the past 5 years

* the offerings on the market are solid, but missing one thing: a way for me to reflect back and analyze where my time went by

Based on that, I decided to made Session. Here are some "features" that I decided to implement:

* Every session has to have an intent. User have to write what they're working on before timer could start.

* Before timer starts, user will be prompted to breathe in and out once.

* Timer starts. Time to focus!

* Timer ends. Session will ask you what you have learned on this Session and whether you're distracted. It's optional. User can skip it.

* Later at the end of the day, you can analyze your progress.

Here's some benefit that I found while using Session:

* With providing intent, I worked with less distraction.

* If I ended up distracted, the reflection prompt at the end of Session gives me time to reflect. Instead of wasting hours meandering around, it'll be limited to 25 minutes max.

* I realize I didn't work as much as I expected to be. About 2-3 hours in, I'm exhausted. With that knowledge, I plan a long break after about 2 hours to re-energize my work Session later.

The app works fully on freemium. Pro features are sync between devices, dark mode, custom interval, and full analytics access.

It syncs between iOS, iPadOS, and macOS.

Creating an account for now gives you 7 days free of Pro feature. Would love to know your honest thoughts!

<comment><USER2> $4/month seems a bit steep, especially when compared to other similar apps. I'm mostly interested in changing the time chunk, which I can't justify paying $4/month continuously for...especially when there are other options.

Maybe a one-time cost for some features and monthly cost for more involved features?

<comment><AUTHOR> Hmmm. Interesting. I'll think about it. Pricing is hard—I'm still looking at the market right now and will adjust as needed. In fact I've dropped it from $5/m and $40/y to $4/m and $30/y before posting to HN.

The reason I made Session is for the analytics and syncing between devices. I want to start and review my progress on any devices I currently on.

If what you need is _only_ changing the time chunk—I think Session is not for you. There's a lot of excellent product on the market that's cheaper or even free for that functionality.

My question: have you tried Session? If so, what do you like about it?

As context, I dislike subscription and prefer one time purchase as any of us. But that business model is proven to be not sustainable—lots of great products that I use died in matter of years because of lack of update. iOS update means breaking change to the API and could introduce new bug. Ideally I would love to sell the product as one time payment with free update for a year. But that's currently not possible on iOS...

<comment><USER2> Yes, I've been trying out Session for the last couple of days. I love the "take a breath" at the start, and I'm intrigued by the analytics (but don't have enough history yet)

I think you're that I'm probably not your target user: I don't pomodoro everyday, mostly when I start stressing out, get anxious, or can't focus. Before using Session I was just setting a timer on my Apple Watch.

I'm in favor of paying (or donating in the case of FOSS) for software that I use, but I know and appreciate pricing can be tricky to figure out.

<comment><AUTHOR> May I know what device are you using it on? I used to not using Pomodoro everyday too—just like you, I only used it when I was overwhelmed with my situation. Maybe I'm biased, but after using Session for the past 5 months, the analytics makes me more honest to myself. The days when I thought I was working hard, The data said I only spent 1 hours with many distractions in between. With that data, I can reflect back what went wrong and plan how to fix it.

When you said using a timer of Apple watch, it gave me an idea. Maybe Siri integration like "Start a Session 'working on X project'" (if it's possible) would make it easier for people to start a task.

Maybe you can try making an account and see if Session might be the right fit for you? It gave you 7 days of pro feature for free—no question asked.

Anyway, if you're still overwhelmed in some point of your life, feel free to still use Session. It'll always be free for the basic timer. :)

</comment></comment></comment></comment></comment><comment><USER2> Random question: why is the publisher listed as "Fatih Kalifa"?

<comment><AUTHOR> Long story short, I tried to apply for apple developer account for the past 3 months with 30 different credit cards (from Twitter friends all over the world).

All failed.

Apple seems to have enrollment problem that affect developers outside US and EU. It's frustrating. I lost more time handling this issue, calling support, etc compared to developing the product.

As a compromise, I ended up borrowed friend's account to upload the app for the time being.

:(

</comment></comment><comment> d-32 Beautiful design, I'm excited to try it out!</comment>


Going Native 2012: Bjarne Stroustrup on C++11 Style - <AUTHOR> http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/Keynote-Bjarne-Stroustrup-Cpp11-Style

<comment><USER2> Great video. The full Going Native conference looks fantastic too: <http://channel9.msdn.com/Events/GoingNative/GoingNative-2012>

I caught Herb Sutter's day 2 C++11 keynote live yesterday and really enjoyed it, especially where Herb talks about all the meta details of a language like how to learn it, library quality, etc. Chandler Carruth's talk on Clang was a real eye opener on how good a compiler should be at helping the programmer find bugs. If you have any interest in C++ check out all the videos from this conference, they are really high quality in content and presentation.</comment>


Ask HN: How do you motivate yourself? - <AUTHOR> <comment><USER2> I find it hard to stay motivated at times as well. But when I do, I like to be inspired by people who worked very hard to achieve their goals in life.

One of these people (that might surprise you) is Arnold Schwarzenegger. There's a very nice speech of him on YouTube called "The 6 rules to success"[0]. I like to re-watch this speech every now and then and it helps keeping me motivated.

Bill Burr can explain very well why Arnold is such an inspiring person[1].

\---

[0]: [https://www.youtube.com/watch?v=9Kg- zbJjlyA](https://www.youtube.com/watch?v=9Kg-zbJjlyA)

[1]: [https://www.youtube.com/watch?v=x0gaYyNk7QA&t=210](https://www.youtube.com/watch?v=x0gaYyNk7QA&t=210)

</comment><comment><USER3> Depending on what you need the motivation for, you might only need willpower. You can get a lot done and work towards a goal by setting mini goals every day and turn them into habits. The trick is to set the goal really low every day, so that you can achieve them even on those rainy days. Willpower alone (and maybe a reminder) will make you achieve it, motivation usually goes down quickly. I found this book really helpful, [http://www.amazon.com/Mini-Habits- Smaller-Bigger-Results/dp/...](http://www.amazon.com/Mini-Habits-Smaller- Bigger-Results/dp/B00JFHLUPI)

</comment><comment><USER4> Here's a similar thread from a couple of years ago that has some great answers:

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

</comment><comment><USER5> I struggled with motivation for many years, primarily because I did not know who I was and what I wanted.

I read books like "Drive, the surprising thruth about what motivates us" and many more, but it was not until I read "start with why" by Simon Sinek I understood my "why" and finally became truly internal motivated.

Now I am more motivated than I have time and energy, but luckily I also have a guidance tool that helps me put energy into stuff that fuels me more.

<comment><USER6> What was your "why", and how did it motivate you?

</comment></comment><comment><USER7> [Putting on my project manager's hat]: Visible progress toward achieving a goal that is important to you makes motivation easy!

* Pick a specific goal that you care about. It can be as simple as I will lose 10 pounds or I will write software that parses a specific data format.

* Create some milestones. Maybe I can't lose 10 pounds all at once, but I bet I can lose 1 pound. Make sure that these are visible.

* Chart your progress, so you can see how your previous work got you closer to your goal. Review this chart regularly.

</comment><comment><USER8> My answer to this question has evolved a fait bit over time, and probably will in the future, but at the moment I find that making sure that I deliver at least one item (however small) every week helps; I feel I am always making progress. So if you have big projects, break it down into simple, manageable steps & tasks. Then work your way down the list.

</comment><comment><USER9> I'll just quote Mr. Swearengen:

"Every step, a fucking adventure."

[https://www.youtube.com/watch?v=OJBpcXmOtwY](https://www.youtube.com/watch?v=OJBpcXmOtwY)

</comment><comment><USER10> I think back to those long past days when I used to complain that I was bored. Then I am happy that I will never feel that way again.</comment>


Reasons to Open a Chinese Bank Account - <AUTHOR> http://online.wsj.com/article/SB10001424052748704307404576080222812076888.html?mod=WSJAsia__MIDDLETopStories

<comment><USER2> It's not a floating currency, it's directly controlled by politicians. Holding yaun is taking a speculative currency bet on the competency of the Chinese Communist Party to successfully manage the Chinese economy.

<comment><USER3> Trust them to do everything they can to keep it growing. People are in China are only generally content with their government because every year everyone gets richer and richer, except the family five blocks down the road that had their house confiscated and compensated only 25% market price because the local council is planning to build a `public facility` on the land.

<comment><USER4> Similar to the United States, except here your house gets seized to build a factory for Pfizer. <http://en.wikipedia.org/wiki/Kelo_v._City_of_New_London>

<comment><USER5> Horrendous action, no doubt. But there was an interesting follow-up:

"Prior to Kelo only eight states specifically prohibited the use of eminent domain for economic development except to eliminate blight: Arkansas, Florida, Illinois, Kentucky, Maine, Montana, South Carolina and Washington.[30] By July 2007, 42 states had enacted some type of reform legislation in response to the Kelo decision. Of those 42 states, 21 enacted laws that severely inhibited the takings allowed by the Kelo decision, while the rest enacted laws that place some limits on the power of municipalities to invoke eminent domain for economic development. The remaining eight states have not passed laws to limit the power of eminent domain for economic development." (from the same link)

I don't think you'll see that in China.

<comment><USER6> One person's blight is another person's economic development opportunity.

</comment></comment></comment></comment></comment><comment><USER7> Much like the tech bubble and housing bubble, by the time you read these articles in the mainstream press, it is FAR too late to invest. You've already missed 10-15 years of explosive growth in the Chinese economy.

<comment><USER8> Simply not true. Laughably so. Listen to yourself. You're telling people not to invest because they'll only do well out of it rather than doing very well out of it. People were saying the same thing about gold two years ago and one year ago.

<comment><USER9> The problem with that sort of thinking is that it relies on you being able to time when when market will go from being irrational in one direction to being irrational in another.

Lets take the dot-com boom as an example. There were people saying that dot- com companies were overvalued in 1997, when the Asian currency crisis hit. Those people were, in retrospect, probably right. However, the next two years made them look like complete fools, as the bubble maintained exponential growth for another two years before completely collapsing.

Same thing with China. Yeah, the bubble might have another couple of years left. If you get in now and get out when the crash hits you'll make a modest profit. But, if you mistime the crash, you could stand to take huge losses, as the value of your currency investments falls far below the price you paid for them.

<comment><USER10> Your argument is a non-sequitur.

The original argument was that there was no point in investing, because if you'd invested 10-15 years ago, you'd have made a lot of money. That argument is wrong for obvious reasons, which I will spell out anyway; just because something did well in the past is no reason to think you'll lose money on it in the future.

Your argument is that if you invest in something and it goes down in value, you lose money. That's true but not relevant.

Eli's point seems to be that it's possible to make money on an investment after it's had an explosive growth stage; the obvious truth in counter to the initial falsehood, and in no way addressed by your comment.

<comment><USER11> I think that the point is that after the explosive growth stage, if something is a bubble you end up in a (possibly) short period before the bust. While you _can_ make money investing during the period, the risk is that much greater that you will miscalculate when the bust will happen and take heavy losses. So:

      1. Explosive growth is over, you can't make money anymore.
      2. That's not true, you *can* still make money.
      3. But attempting to make money at this stage is riskier.

</comment></comment></comment></comment></comment><comment><USER12> >Politically, the country is under international pressure to rein in its huge trade surplus.

The government doesn't feel any of this pressure, as it's not an internal issue they don't care.

I would argue that yes the yuan is likely to rise against the dollar, but because of high inflation (very very high in China) most assets would also rise in comparison to the dollar(Oil, Gold, Silver etc.)

Actually the only good reason to invest in the yuan I would think is diversification. It's not a good idea to keep your investments as cash during a time of high inflation.

In January 2006 Gold was $525, January 2010 it was $1125

Silver, January 2006 $9, 2010 $17, most assets are climbing fast in relation to cash, much faster than 25% over 5 years.

<comment><AUTHOR> Is there much inflation in the US right now? It's really high in the mainland at the moment, particularly with relation to food.

My business partner just sold an apartment in Beijing. I tried to convince her to buy up some land back in the US, but she chose to buy another apartment here instead. Part of her concern was that the US housing market was going to be relatively flat for the next couple of years, which is her desired time range for selling the new property. The future potential weakening of the dollar vis-a-vis the RMB also played a role.

<comment><USER13> US Rent prices rose 12% last year

[http://www.marketwatch.com/story/rent-prices-rose-12-last- ye...](http://www.marketwatch.com/story/rent-prices-rose-12-last-year-report- says-2011-01-07)

Sugar Prices Hit 30-Year Highs

[http://online.wsj.com/article/SB1000142405274870350690457559...](http://online.wsj.com/article/SB10001424052748703506904575591971478795824.html)

Gasoline Tops $3 a Gallon for First Time at Christmas

<http://www.dailyfinance.com/story/3-dollar-gas/19775116/>

Unless you believe the official US CPI, which excludes food/oil

<comment><USER14> CPI doesn't exclude food/oil, only Core CPI does.

<http://research.stlouisfed.org/fred2/series/CPIAUCSL>

<http://research.stlouisfed.org/fred2/series/CPILFESL>

The only major difference between CPI and Core CPI is that CPI is more volatile than Core CPI. This is why, for the purposes of year on year changes, Core CPI is usually reported. If we didn't do this, we'd get headlines like "OMFG, massive inflation, we are all doomed" followed by "OMFG, massive deflation, we are all doomed" 6 months later. Over a period of a year or two, massive inflation x massive deflation = small but stable inflation.

A better way to go would be to use moving averages, but that's too complicated to explain to reporters.

<comment><USER13> Fair enough; a misnomer on my part. However, it's disingenuous to tell the US consumers that the core inflation is 1.2%, when their gas price has doubled (from 2009)

<comment><USER15> You're misrepresenting the data. Gas may have been $1.616 in Dec 2008, but it was $4.114 in July 2008, and ~$3 in Feb 2008.

[http://money.cnn.com/2010/12/23/news/economy/three_dollar_ga...](http://money.cnn.com/2010/12/23/news/economy/three_dollar_gas/index.htm)

The price is volatile (especially on either side of a financial crisis).

</comment></comment></comment></comment></comment></comment><comment><USER16> A better investment (for most people) would be in a mutual fund or index that is tied to the Chinese economy.

<comment><USER17> What are some good examples of this?

<comment><USER18> Not specifically chinese: VGTSX/VTIAX

Plus, rather than speculating on a currency, you're actually purchasing a piece of a foreign company's productivity.

</comment></comment></comment><comment><USER19> This is a friendly reminder that before you throw a ton of money into China, you should probably discuss this with a financial advisor. The WSJ isn't really the best place for advice as they don't know your individual risk tolerance, and listening to advice on a startup-focused forum may not be the best decision either.

</comment><comment><USER20> OK, that's the upside from the depositor's point of view. What is the upside from the Bank of China's point of view? Given the massive dollar reserves that the Chinese government has accumulated from its trade surplus, why should they sell off renminbi in exchange for even more dollars? If the RMB/USD exchange rate is almost certain to increase, why would the bank want to give up an appreciating asset in exchange for a depreciating one?

<comment><USER21> Maybe it is a cheaper way to buy dollars? I couldn't find the interest rates on the accounts anywhere on the site.

</comment></comment><comment><USER22> tl;dr version

It's very unlikely to go down.

It's very likely to go up.

You won't miss out on a lot of interest elsewhere, as nowhere else is paying a lot of interest.

It will diversify your portfolio.

And, finally, it may offer you and your family something of a hedge against the decline of the U.S. economy.

<comment><USER23> Ah yes, the holy trail of investments. This one, we swear, won't go down! Really, look at all the reasons. Just like housing. It's not like their banks have billions of yuan in loans to companies or government investment vehicles which large numbers of economists question the viability if.

<comment><USER24> Your arguments appears to directly contradict your skeptical position. If there are a lot of bad loans on the books of Chinese banks, then the inevitable write offs of these loans will cause massive asset deflation, same as it did in the US in 2008. The result will be currency appreciation, or at least the pressure to appreciate, given the currency peg presently in effect, and holding such currency is appears to be a great idea.

</comment></comment></comment><comment><USER25> Good rundown in article. We were discussing this last night in the freenode #startups IRC channel ;)

The rumor is that the $20K per year investment cap is limited only to individuals and not institutional investors and funds. Furthermore, if there is massive demand, it is expected that those caps will be raised.

What is unclear is how your yuan can be used to make investments in China itself?

<comment><USER26> Why would the Chinese lift the cap for institutional investors? They would be the ones that would try to use the Yuan at some point. With a 20K cap, it's more like a novelty than a real investment.

It seems unlikely the Chinese have a need for many dollars flowing to them. I mean, look how many they have - unless something truly weird is going on...

</comment></comment><comment><USER27> Why would China do that? They already have plenty of foreign reserves ($2.85 trillion and growing - enough to buy Spain's GDP two times over), and they seem to be struggling with inflation. I guess the Chinese government is not as sure as the WSJ that the renminbi will appreciate.

</comment><comment><USER28> I am not an economist, but to me arguments 1,2 and therefore 5 seem specious. 3 and 4 hold water, but they are pretty self explanatory.

China's economy, to me, seems like a leverage play on the US. If the US economy seriously stagnates, China's economy will follow suit, and likely in a much more dramatic fashion. The opposite is also true, when the US consumers get to spending China (at least for now) stands to benefit tremendously.

For me, the best option if you are looking at foreign currencies, is to go buy a brazilian government bond and get 10% on your money in 3-5 years.

</comment><comment><USER29> Looks to me like China is exporting their currency, to export their inflation, and stem the rising consumer costs in China. And I'm sure they have dreams of being the next reserve currency of the world.

</comment><comment><USER30> Speaking of currencies, I'm wondering if anyone more intelligent than me knows what to make of this: <http://research.stlouisfed.org/fred2/graph/?s[1][id]=BASE>

To my untrained eyes, it makes the idea of diversifying into anything other than the US dollar seem like a good idea. But to be honest my understanding of the US monetary system gets fuzzier the more I learn about it.

<comment><USER6> Not claiming to be more intelligent, but my take on your question is:

Just as price is a function of supply and demand, so are exchange rates. The money supply is independent of the price of goods and of the price of currencies (exchange rates).

Seemingly, a larger overall quantity of dollars in existence would seem to predict a decline in the value of the dollar relative to other currencies, but the monetary policy decisions that resulted in increased money supply are intended to achieve relative price stability.

For example, the dollars introduced to the economy and lent to banks had the effect of encouraging banks to make loans, which helped increase demand for products and services, which helped prevent prices from falling.

Also, many of the dollars are being used as reserve capital after the market price of various securities which had been used as reserve capital declined, leaving the entities under-capitalized. All this was done in an attempt to keep interest rates low (in effect a price target) and prevent banks from being forced to stop lending money...

So I think the bottom line is that the behavior of consumers and firms can account for so much variability in supply and demand that the money supply can expand greatly and prices can still say roughly constant... the other side of the coin being that monetary policy was used to keep prices relatively stable, in this case by keeping the credit infrastructure status quo alive.

edit: Of course, if the Fed gets it wrong or lacks the will to raise interest rates when necessary, hyperinflation can result, which would impact exchange rates.

</comment></comment><comment><USER31> Investing in rubles ops.. yuans is very interesting proposition. Especially when inflation rate is skyrocketing and there is housing bubble of enourmous proportion. And China's economy is very much connected to US economy: if dollar collapses and yuans unpeggs, China's economy will suffer.

As always, great advice from WSJ: I will have one million dollar in my account in 5 years - if I start with two millions.

</comment><comment><USER32> I know this won't be popular, but the whole idea of "diversification" has always struck me as a lame attempt by rich people (Stock brokers) to get more money from poor people. So I roll my eyes whenever a guy with a Rolex and a Porsche is telling me I need to "diversify"

<comment><USER6> Let me try to persuade you otherwise:

Imagine average Joe investing in a very non-diversified portfolio of one stock which he has decided he likes, perhaps due to personal knowledge of the firm.

Over time, odds are this stock will do poorly compared to if he'd had a more diversified portfolio.

It's the same general law of markets that is why it's generally better to invest in index funds... they benefit from overall increases in productivity and economic growth, without being subjected to all the risks that less diversified portfolios suffer from.

Of course, it's always possible to formulate a 20/20 hindsight critique of diversification b/c there is always an investment or two that retrospectively looks like it would have been an obvious sure thing to a layperson.

<comment><USER33> _Over time, odds are this stock will do poorly compared to if he'd had a more diversified portfolio._

How are you calculating these odds? I'd naively assume that the average performance would be the same but the volatility would be much higher. Dollar cost average into it and you reduce this somewhat. I've never really understood the magic of diversity either, unless it's just to insulate against risk of ruin.

<comment><USER6> Just look at the top stocks 30 years ago and see which ones are still in business today, and of those which have beaten the market average. No stock will outperform the market over the long term. Nor will any mutual fund!

For medium time horizons it's not impossible but exceedingly unlikely.

For short time horizons it's still not remotely easy for firms to accomplish, and many do not.

<comment><USER34> > No stock will outperform the market over the long term.

So all stocks are below average...Sort of a reverse Lake Wobegon effect?

<comment><USER6> I suppose it's possible for a company to exist indefinitely, but how many companies that existed 1000 years ago exist today?

<comment><USER35> Eleven!

[https://secure.wikimedia.org/wikipedia/en/wiki/List_of_oldes...](https://secure.wikimedia.org/wikipedia/en/wiki/List_of_oldest_companies)

</comment></comment></comment></comment></comment></comment></comment><comment><USER36> Pro-tip: If you're in China, and a Bank of America customer, you can withrdraw money fee-free at the China Construction Bank. Cash may be less convenient than a Bank of China account, but, just saying.

</comment><comment><USER37> In a rather-unrelated matter, does anyone have a Swiss bank account? I'm looking for a bank to open one in but apparently most have a 500k minimum, I just want a personal account...

<comment><USER38> What'd be the point? The days when the Swiss wouldn't rat you out to your own government are long gone.

<comment><USER37> Greek banks are less than reliable at the moment...

<comment><USER39> German. Probably as stable as they get on the continent these days. I've no idea if there are any residency requirements though.

<comment><USER37> Oh, very true. There shouldn't be any, as there are uniting laws for EU banks, thanks.

</comment></comment></comment></comment></comment><comment><USER40> "But will we start banking in a Chinese bank? It's not as crazy as it sounds."

Hasn't HSBC had a fairly significant US/Canada presence for a while?

<comment><USER41> HSBC is headquartered in London, not China, and takes your money in the native currency (USD/GBP/AUD etc), not in yuan.

</comment></comment><comment><USER42> Buy gold instead, for the same reasons: (1) it's very unlikely to go down; (2) it's very likely to go up; (3) you won't miss out on a lot of interest elsewhere; (4) it diversifies your portfolio; and (5) it's a hedge against the decline of the U.S. economy.

</comment><comment><USER43> I don't understand this...are they giving you a better interest rate? Aren't they simply operating as a US bank (if they are FDIC insured). You really aren't investing in the Yuan...

<comment><USER44> see [http://www.bocusa.com/portal/Info?id=649&lang=1&](http://www.bocusa.com/portal/Info?id=649&lang=1&);

Can I buy and sell RMB from/to your bank?

Yes, you can exchange USD for RMB or exchange RMB for USD at our bank.

<comment><USER43> Thanks for the link. Didn't realise that they are allowing you to buy the Yuan and the account is actually in Yuan (though you deposit in USD -- conversion at the time of deposit).

</comment></comment></comment><comment><USER45> May be it is a good idea for american's. I am from india and if i open an account in Chinese bank my phone will be tapped for sure!

</comment><comment><USER46> There is something called 'gold' my friend!

</comment><comment><USER47> Better than relying on the Fed to make the right decisions - "quantitative easing", huh?

</comment><comment><USER48> Wondering if this is possible with a Japanese bank for Yen denominated accounts.

</comment><comment><USER49> The Yuan is pegged to the US Dollar at around 1 yuan = 0.15 USD cents. A graph of exchange rate for Yuan/USD over time produces a horizontal line.

The current president 'Hu Jintau' controls the exchange rate through China's currency policy which dictates how many USD an owner of Yuan can get in exchange.

So buying yuan is a bet that the peg will be removed and the USD will be printed so much that nobody will exchange human labor for it.

It could work, but I'd buy physical gold before the yuan.

<comment><USER50> That's not true. The Chinese government may want to unpeg their currency (1) to give their citizens more purchasing power, (2) because of trade pressures levied by the United States backed up by the threat of tariffs, or (3) because China doesn't want to export to the United States as much. Betting the yuan will rise relative to the dollar is not even remotely close to betting that the dollar will become worthless.</comment></comment>


Public Table of Seed Funding Incubators - <AUTHOR> http://startupmelbourne.com/2009/10/seed-funding-incubators/ I have created a Google Docs Spreadsheet with all incubators/accelerators and their characteristics I have found.
Feel free to correct or extend the data!
The table includes Y Combinator, Seedcamp, Springboard, Start@Spark, DreamIt Ventures, TechStars, Summer@Highland, LaunchBox, iVentures10, NextStart, Capital Factory, Shotput Ventures, NYC Seed, Bootup Labs, You be the VC and Obsidian Launch. <comment><USER2> You have become my new favorite person. This'll be a very useful list in the present and near future...</comment>


Screenshots of the best SaaS Landing pages with all the secrets to convert - <AUTHOR> https://saaspages.xyz/ <comment><USER2> wow. this is awesome</comment>


Show HN: Clientflow – Reduce client delays on all of your projects - <AUTHOR> http://clientflow.io

<comment><USER2> Few things

1\. You say on the site: "Start your 14 day free trial" but there's no clear pricing, so what happens after 14 days?

2\. People are visual, I'd put a whole flow in a gif, something, with the picture (screenshot) of the email that's being sent to the client.

3\. If you have plans for integration with popular systems, like Trello, Github, Basecamp or others, I'd put logos of those with "Integration coming soon"

4\. Inside the systems, the Preview of the emails are too long, when you have a project you usually need 10-20 reminders, I'd cut the length of the preview to 200-300 chars and have a separate page for each of those. (also add an edit option, so if I have a typo, I can fix it easily).

<comment><AUTHOR> Hey there

Thanks for your feedback. Its extremely helpful.

1\. I admit the main website is very bare, but I've done it intentionally to optimize for conversions rather than have users click off..its something I'm testing. I'm going to be adding a pricing page in soon, but this can also be found in your account under settings in the meantime.

2\. Good idea.

3\. This is our MVP, so integrations are on our roadmap but not yet.

4\. When referring to previews, do you mean when you click "preview" when creating a reminder? Or the box created after a preview is in queue to be sent?

Thanks again

M

</comment></comment><comment><USER3> So it's just like outlook: [http://office.microsoft.com/en-us/outlook- help/delay-or-sche...](http://office.microsoft.com/en-us/outlook-help/delay- or-schedule-sending-e-mail-messages-HP001232817.aspx)

<comment><AUTHOR> Hey there - founder here.

Thanks for your reply. Clientflow is a bit different because the goal is to get you out of your inbox and keep you more organized. Outlook does let you schedule, but only for 120 minutes and you have to use Outlook as your email client, which not everyone does.

</comment></comment><comment><USER2> One more thing, the entire process is too manual, I'd look into how I can make it better (Browser extensions in Gmail, send an email to the system, FW emails etc...)

<comment><AUTHOR> Absolutely agree. Still our MVP here so a lot of work to do, but more and more automation is definitely something we're working on.</comment></comment>


John Carmack: Build issues suck the joy out of programming for me - <AUTHOR> https://twitter.com/ID_AA_Carmack/status/1206712272544030727 <comment><USER2> That's exactly why I prefer working with frameworks like PHP and Python... No waiting for code to compile, and updates/corrections are instantaneous... It seems like the industry is constantly fighting to go back to more complex methods to protect jobs and industry expertise. In my book simpler has always meant better, and usually means more reliable.

</comment><comment><USER3> Which is why I code in Common Lisp. My code from the 80s compiles and runs without errors.

On the other project, which compiled to C, apparently some bright spot decided to change the standard C library so my code no longer compiles.

And don't get me started on C++.... standards, so many C++ standards, "breaking" news... your code won't compile anymore.</comment>


Web GL 3D Graphing Calculator - <AUTHOR> http://www.graphycalc.com/#x*x+y*y-0.5

<comment><USER2> Very cute. Desperately needs control over the displayed range if it's going to be useful. And tic marks on the axis wouldn't hurt. But good job.

And unlike every other Web3D demo, it loads instantly to a useful state instead of displaying a blank interface for 3 minutes while it downloads a 100M data set.

</comment><comment><USER3> Nice.

Having the canvas consume the full client area in the browser would be helpful; there's a lot of wasted space in the margins. The title/input area could be top center and z-ordered above the canvas.

</comment><comment><USER4> [http://www.graphycalc.com/#.25%20*%20cos%283*x%29%20+%20.25%...](http://www.graphycalc.com/#.25%20*%20cos%283*x%29%20+%20.25%20*%20sin%283*y%29)

Fun times.

</comment><comment><USER5> Isn't that software rendered, not WebGL?

<comment><USER6> Yeah, pre3d is canvas. Well I haven't checked recently, maybe it's got a web3D backend, now. I know my browser can't handle web3D but likes this ok.</comment></comment>


Shopify ECommerce Development Services - <AUTHOR> http://www.hiddenbrains.co.uk/shopify-development.html <comment><USER2> Frankly speaking, I'm not a huge fan of Shopify. I prefer PrestaShop instead with its super features that help build a powerful yet user-friendly website with no efforts. Btw, here a great PrestaShop theme «Eveprest» [https://www.templatemonster.com/prestashop- themes/eveprest.h...](https://www.templatemonster.com/prestashop- themes/eveprest.html) that can be easily developed into a beautiful and effective website.</comment>


Real-time ASCII Raytracer in Javascript - <AUTHOR> http://demos.twilightparadox.com/demos/AsciiTracer/asciitracer.html

<comment><USER2> while cool, I don't believe those characters are technically ASCII.</comment>


Loren Segal: Too Lazy to "Type" - <AUTHOR> http://gnuu.org/2010/12/13/too-lazy-to-type/

<comment><USER2> The point of the article is that virtually all real Ruby programs could be transformed, after the fact, into statically typed programs.

The significant point missed is that I can start typing the program without having figured out what the types will be. After the fact you can do the translation, but postponing having to work out not immediately relevant details is huge for developers.

<comment><USER3> Except for short scripts I generally start programming by figuring out what the data will look like. In a strongly typed language I have a built in language for describing my data. Of course the data structures change as the program evolves but I find it massively helpful to have that description up front.

What's that quote? Something like:

"Show me your algorithm and I will remain puzzled, but show me your data structure and I will be enlightened."

<comment><USER4> Exactly.

To often, I think we're focused on the _writing_ of code rather than the _reading_ of code. Annotations sometimes seem repetitive, but repetitive can aid the readability.

Type inference might be a very nice compromise. Haskell allows you to annotate with type information, and that may provide more helpful errors, but usually it's optional. But people do it anyway, because type information tells a reader so much about the program.

If we just focus on _writing_ , then clearly the programming language is meant only for unidirectional communication from a human to a computer. But if we focus on reading as well, then it becomes about humans communicating with other humans.

</comment></comment></comment><comment><USER5> The author makes an interesting point about how we can overuse dynamic programming when statically-typed programming can pretty much get us where we want to go. I've wondered why we haven't seen a big contender to Ruby/Python/PHP/Perl that has good type inferencing, but maybe that's what Mirah hopes to do? As much as I love Ruby's runtime code manipulation, I'm not really certain what the heck it's good for in the areas where it's largely used, and why it can't be replaced by code that's verifiable. If a language like ruby lost its type dynamism tomorrow and had it replaced with a type inferencer and all the programs that needed trivial type coercion just worked, what exactly wouldn't continue to work? What is it that's so huge that requires the dynamic aspect, especially in web design?

</comment><comment><USER6> This is something that has bothered me about my Ruby usage. A lot of the time, I feel like I'm writing "dynamic" code that really just needs to be pre- processed.

      class Cool
        [:ice, :soda, :snow].each do |item|
          define_method item do
            #some code
          end
        end
      end

There isn't a real reason why that couldn't be pre-processed. I don't know a ton of Java, but the idea of compile-time code generation is appealing. Does anyone know more about this?

<comment><USER7> Solving this problem in general is a major area of research. Look up "Partial Evaluation."

<comment><USER5> Yes! I second this. Partial evaluation is especially compelling stuff for improving efficiency. I'm glad other people on HN are into it.

</comment></comment></comment><comment><USER8> > Another fairly interesting paper titled "Evaluating the dynamic behaviour of > Python applications", shows that programs in dynamic languages with these > runtime modification behaviours often stop modifying their behaviour after a > certain amount of "load time".

I find that deeply reassuring, since that's _the_ core idea behind Magpie, the language I'm working on. It's a dynamic language with a static type-checker. The idea is that it runs dynamically at load time so you can imperatively and dynamically build your types and then after that, it statically checks the results, then invokes main() and (presumably) runs in a more or less static fashion after that.

</comment><comment><USER9> If these dynamic languages are usually used in a mostly-static manner, just without the typing and some added load-time flexibility, doesn't that just mean they operate at a higher level of abstraction? Isn't that a good thing?

<comment><USER10> Your definition of good may or may not include "do these higher level abstractions preclude, in theory and practice, well-known and cheap optimizations?"

<comment><USER9> Depends if you care about "code fast" or "develop fast".

<comment><USER11> It would be cool if a language could be both, by using this research to create a language that recognises the difference between load time and run time. The dynamic parts would be used to load the program, after which dynamic changes would be turned off, allowing function dispatch or whatever it is that is slow in a dynamic language to be sped up.

<comment><USER9> Basically, a (very!) enhanced preprocessor? That would definitely be useful.

</comment></comment></comment></comment></comment><comment><USER12> As a heavy user of statically typed languages who is learning JS and Scala currently, can anyone with more experience with dynamically typed languages confirm or deny the point of the article. Scala, with it's type inferencing seems like it might be a happy medium between. Thoughts anyone?

<comment><USER8> Type inference is nice and goes a long way, but it's still fundamentally different from being able to modify types imperatively at load time. For example, in Ruby, it's trivial to swap out a method with a version that does some logging, but only on Tuesdays. Scala can't really do that because it presumes all types are locked down before any code (such as code to tell if today is Tuesday) has executed.

<comment><USER13> One of the points in the article is that this kind of behaviour modification is not done _that_ often. Yea, it happens... but not as much as you'd think.

<comment><USER8> I don't think you have that right. I read it as that kind of behavior modification isn't done that often _after load time_. During load time, all sorts of shenanigans are going on (monkey patching, etc.)

<comment><USER13> Well, you're right about that distinction-- but from your comment "only on Tuesdays" I understood you were talking about behaviour modification some time after "load time". Also keep in mind the first paper cited in the article (profile-guided inference) actually points out that in most cases, "load time" can be inferred nearly statically-- as in, you would not need to run a test suite, you would only need to "load" the base code. This is a feasible task, in most cases.

</comment></comment></comment></comment></comment><comment><USER14> For what it's worth, the main points of the article are fairly similar to our reasoning behind the Gosu language's design: type inference helps alleviate a lot (not all, but a lot) of the pain of having to write type annotations in languages like Java, and the addition of the ability to do some kinds of metaprogramming at load time (but not at runtime) gives you a lot of the benefits of the sorts of metaprogramming you traditionally do in a dynamic language like Ruby (again, not all, but a lot of the typical use cases).

</comment><comment><USER15> The problem with java isn't static typing, checked exceptions, XML configuration, type erasure, lack of lambdas, lack of closures, EJB 1.0, 2.0, 3.0, J2EE, JSP, servlets, servlet containers, etc. The problem is ALL of those problems combined. It tries to be everything to everyone, and turns out to be just a pain in the ass to everyone.

Every year they redo the entire infrastructure trying to do something that doesn't suck. I gave up in 2003 and never looked back. Every time I see the code for a java web project, or talk to java devs about the issues they face I want to throw up in my mouth a little. If the language is so great why is half the code written in XML, if I wanted to write code in XML, I'd use XSL.

I don't use ruby because dynamic coding / dynamic typing is a panacea, I use ruby because most of the infrastructure is designed to do something useful out of the box with no configuration. If I want it to do something more, I configure.

I'd use F#/ASP.NET MVC/nhaml in a heartbeat over ruby/RoR if all the gems and things that make life easy were readily available. I really don't think ruby is that great of a language, but the gems, rails, etc are awesome enough that I'll put up with the things I don't like.

I'd prefer that people in the java mindset who think I'm too lazy to type keep thinking that and keep their mindset away from any API/gem/module/library I use. Please for the love of god keep thinking the reason I don't use java is that I'm too lazy to type.

JSRs, JCPs, reference implementations, TCKs, JDKs, J2EE, J2SE, J2ME, etc, they are wonderful, I'm so jealous. Unfortunately, I'm just too lazy to type to experience all the wonderful benefits of such technology, so you'll have to keep all that wonderful technology all to yourselves and away from my crappy dynamically programmed, eval'd, dynamically typed, slow & bloated code.

</comment><comment><USER16> I wonder what the performance benefit of adding optional type hints to ruby or python would be.

<comment><USER13> Read the Starkiller dissertaion (for Python): [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.90....](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.90.268&rep=rep1&type=pdf)

The compiler gives enormous optimizations for certain (admittedly extremely specialized) numerically intensive programs / calculations. Of course, if the compiler was developed further (it might be, actually), you'd probably see optimizations for larger sets of programs.

</comment></comment><comment><USER17> 'Too lazy' makes it sound negative. The fact that we can mine types from production runs can mean less work for us and a more fluid design style.

For what it's worth, I think run-time data mining has the potential to transform the industry.</comment>


Autonomy, Mastery, Purpose. | 5v3n.com - <AUTHOR> http://5v3n.com/2011/06/18/autonomy-mastery-purpose/ <comment><AUTHOR> Being written some month ago, I keep revisting this posting again and again, as it talkes about a lot of the things, I keep thinking about. Therefore I just wanted to share it with a wider community.

<comment><USER2> I'm really happy to read you're inspired by these thoughts. Quite stoked actually. Thanks for being inspired, and thanks for your contributions to the blog. Especially the critical ones concerning big brother ;-)

<comment><AUTHOR> You're welcome... Just thought, Hacker News was a good place to push this post, as maybe others with similar thoughts can have their own look.</comment></comment></comment>


ESET identifies malware with novel installation technique - <AUTHOR> https://www.welivesecurity.com/2019/11/21/deprimon-default-print-monitor-malicious-downloader/ <comment><AUTHOR> In November, ESET researchers identified what they are classifying as a malicious framework used by a North American APT. DePriMon uses multiple advanced techniques, but makes use of a known, but previous unexploited feature of Windows, Port Monitors. This malware does not allow for initial exploitation, but it allows for arbitrary DLL execution at the SYSTEM user level once deployed.

All-in-all, it's an interesting example of well-designed malware, using Living off the Land Binaries (LOLBins), some file-less techniques, and encryption.</comment>


Problems Associated with Scattering Human Ashes at Disney - <AUTHOR> https://gizmodo.com/the-urban-legend-about-scattering-human-ashes-at-disney-1829968093 <comment><USER2> That's really creepy, and I can't believe some people are actually scattering their loved one's remains at Disney parks just so they can "live forever" in there. Didn't they realize that the park employees could just easily sweep them off the floor? If only there was a way we can escape death and live forever, right?</comment>