Better HN
topnewbestaskshowjobs
Log inSign up

phpnode

7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions

Founder of https://codemix.com/ - authoritative product context which makes sure coding agents build the right thing and humans stay in control.

Email: charles@codemix.com

Submissions

comment 12y ago · link · parent

that's unlikely to be the case, JS is pretty fast

comment 12y ago · link · parent

MySQL already supports loading CSVs directly, why convert them first? http://dev.mysql.com/doc/refman/5.1/en/load-data.html

comment 12y ago · link · parent

I think you'll miss the tide on this one, arguably the ice bucket thing has already peaked. But keep that code handy! you'll be able to adapt it next viral video craze with ease

comment 12y ago · link · parent

Your sense of entitlement is simply staggering.

Why do you assume that your attention is so valuable that developers should go out of their way to cater specifically to you? The number of people who disable JS is statistically insignificant.

You have chosen to break your web experience, you have no one to blame but yourself.

comment 12y ago · link · parent

Just wow.

comment 12y ago · link · parent

What do you think would be an appropriate sentence for a crime like this? Society's most vulnerable betrayed by society's most trusted.

comment 12y ago · link · parent

Most people who choose this kind of thing are not experienced with the transpilation target, they're $language developers who want to avoid learning a new $language. But of course the main challenge when learning a new language is learning the standard libraries / eco-system, and these things don't help at all with that, they obscure it.

Another problem is that they never solve the impedance mismatch, idiomatic JS does not map cleanly to idiomatic ObjC, you end up with code that is idiomatic in neither.

some clichés apply here:

"You can write fortran in any language"

"There are no silver bullets"

comment 12y ago · link · parent

Good job for shipping, however this project and others like it (e.g. RubyMotion) set off alarm bells for me personally.

I think the same arguments that people have against CoffeeScript apply here - it's not possible to use CoffeeScript without knowing JavaScript, and in this case it's not possible to use JavaScript without understanding the Objective-C ecosystem. At this point, this is Objective-C with a different syntax, it's not really JavaScript. Existing documentation, blog posts, stackoverflow answers etc use Objective-C, so the programmer will have to do a lot of translation in their heads. If I have to learn all the Objective-C / Cocoa APIs anyway, what am I gaining by using a different syntax?

comment 12y ago · link · parent

famo.us is shockingly bad IMHO. It breaks many common user interactions and goes through a load of hoops to enable "native performance" and then doesn't even get that right, I really don't understand the hype.

comment 12y ago · link · parent

I don't understand this view point. If this is about Free Software, then triviality should be irrelevant, either the code is Free or it isn't. I can write an arbitrarily complicated program within their constraints, license it under a non-free license and this thing will run it.

comment 12y ago · link · parent

Their definition of "non-trivial" includes using computed member expressions, so the following program is not supported:

    var greetings = {world: "Hello World"};
    var subject = 'world';
    console.log(greetings[subject]);

This is zealotry in action, who do they think is going to use this?

comment 12y ago · link · parent

`Kiesza - Hideaway`. Other songs do work and the app is pretty impressive, but I find the UI for lining up lyrics really awkward, it doesn't seem to be possible to move all of them at once so if the start offset is wrong it's really painful to use. For an example see `Le Youth - Cool`

comment 12y ago · link · parent

This seems rather odd from example 14:

    // Boolean expressions need to resolve to either true or false, as no
    // implicit conversions are supported.

I'm sure they have good reason for this, does anyone know of the rationale? I think I'd miss patterns like `if (arr.length) { ... }`

comment 12y ago · link · parent

I couldn't get this to work, after selecting a song it appears to work for ~30 seconds and replies with "This song cannot be analyzed because it is not set as public on YouTube." or "This song cannot be analyzed because it is not set as public on SoundCloud."

comment 12y ago · link · parent

from the top of my head:

UK, USA, Canada, Australia, New Zealand, Netherlands, Germany, Austria, all of Scandinavia

comment 12y ago · link · parent

60 bucks is less than an hour's pay for many developers. We're talking about a tool that gets used for > 8hrs/day in many cases. Other industries would DREAM of having tools this cheap!

* edited to remove the word "most" which seems to be upsetting some people.

1037.

A Rocket To Nowhere (2005)(idlewords.com ↗)

1 points · by phpnode · 12y ago · discuss

comment 12y ago · link · parent

This looks cool but I think your syntax clashes with JS's standard LabeledStatement

comment 12y ago · link · parent

Most of the comments on that article are really depressing, ill considered mumblings from armchair programmers.

comment 12y ago · link · parent

The solution is not at all straightforward, this whole thing has been a game between blackhat SEOs and google for many years. The spammers make a move, google makes a move, spammers respond ad infinitum.

The problem is that spammers / extortionists can adapt their techniques much more so than Google can.

They care solely about getting paid, they don't care about building a brand, offering a good service or anything else. This allows them a huge degree of flexibility when finding ways to attack their less nimble adversary. They can transition from selling viagra to extortion with ease.

If it was straightforward, a company which employs many of the most gifted, technical minds in the world should probably have figured it out by now. Also, it's very unlikely that Pagerank is even in use at all at this point.

comment 12y ago · link · parent

sure, it's just that the open bar is funded by the "lucky" player

comment 12y ago · link · parent

this jsperf revision is slightly more interesting to me http://jsperf.com/json-vs-transit/3

it's effectively the same input, but optimised for JSON.parse() rather than transit. This means it purely decodes into objects with fast properties (in V8 at least), so objects never have to undergo the -> hash table transition. It seems consistently faster, but you can argue that it's not doing quite the same thing.

comment 12y ago · link · parent

It's trivial to do an experiment yourself, copy a load of text from a wikipedia article into a text file then open it in your browser, full screen. Depending on your display size you'll probably find it hard to read when line width exceeds roughly 90 chars

comment 12y ago · link · parent

the issue is that the tobacco companies knew that their product is both addictive and deadly, but they did not warn their customers of either of these aspects. The fact that cigarettes are widely known to be harmful is immaterial. If you sell a product that is going to kill the end user, you should warn them.

comment 12y ago · link · parent

R3 does look fast, but there's a cost to crossing the JS -> C barrier. It's almost certainly possible to beat it using the same algorithm written in pure JS.

comment 12y ago · link · parent

(5).amIFive();

comment 12y ago · link · parent

Agreed, I'm European and I've never seen a refrigerated egg in my life.

comment 12y ago · link · parent

https://news.ycombinator.com/item?id=4722251

comment 12y ago · link · parent

I quite like this suggestion. If we flip the key, value around to make it inline with what forEach etc do, then we don't need the placeholder for iterating without the key:

    fast-each [value] from arr {

    }

    fast-each {value} from obj {

    }
 
    fast-each [value, key] from arr {

    }

    fast-each {value, key} from obj {

    }
The disadvantage is that this looks like array comprehension but isn't.

Alternative:

    fast-properties key, value from obj {

    }

    fast-elements index, value from arr {

    }

    fast-properties value from obj {

    }

    fast-elements value from arr {

    }

comment 12y ago · link · parent

There's something going on with the perf tests - most of that code is being optimised away, in one case I got over a billion cycles per second. The trick to these things is writing code which cannot be optimised away, like returning Math.random() from a function and using the return value to increment another variable.
1
343536
53