HNHacker News
TopNewBestAskShowJobs

ahoge

1,026 karma · joined December 11, 2011

submissionscomments
ahoge··on “var functionName” vs “function functionName”
http://kangax.github.io/nfe/
ahoge··on Firefox 29
Quite different, but... you could try ShortcutKey2URL [1].

Then you could, for example, use Ctrl+Q followed by:

Y for YCombinator, F for Facebook, and so forth.

Pressing Ctrl+Q not only switches into that "trigger once mode", it also displays the list of available shortcuts.

[1] https://addons.mozilla.org/en-US/firefox/addon/ShortcutKey2U...

ahoge··on Firefox 29
Press Alt -> History -> Recently Closed Tabs

The one at the very top (with "Ctrl+Shift+T" next to it) is the most recently closed one.

You can of course also just use that shortcut.

ahoge··on How slow is Python really? Or how fast is your language?
Numpy is written in C. That's why it's fast.

Better: http://benchmarksgame.alioth.debian.org/

ahoge··on The Birth and Death of JavaScript [video]
http://en.wikipedia.org/wiki/CINT
ahoge··on The Birth and Death of JavaScript [video]
A bit less annoying with ES6:

  >>> ['10', '10', '10'].map(x => parseInt(x, 10))
  [10, 10, 10]
ahoge··on Rendering Head in WebGL
Humans actually can't do this:

http://i.imgur.com/Ul3ti69.jpg

As we look down, the upper eyelid automatically follows.

Try it in front of a mirror. Tilt you head back and try to open your eyes as shown in the image above. You won't be able to do it.

ahoge··on Hack: a new programming language for HHVM
> No: because Hack is bringing some additional language features [...]

TypeScript added classes, interfaces, modules, and arrow functions.

ahoge··on Mozilla and Unity Bring Unity Game Engine to WebGL
Because it uses JSC instead of V8.
ahoge··on Pop-Up House: The affordable passive house
But you want the air to be warm, not the walls.

Also, passive houses do have proper ventilation:

http://en.wikipedia.org/wiki/Passive_house#Airtightness

> most of the air exchange with exterior is done by controlled ventilation through an heat-exchanger in order to minimize heat loss (or gain, depending on climate)

Without tricks like that, you'll have a hard time getting below 15 kWh/m² per year.

ahoge··on How to create 2D visibility/shadow effects for your game
Well, it's not like the unlit parts must be completely black.

Having some dynamic lighting does not mean that you must make it part of your game's mechanics. It's perfectly fine to do that kind of thing just for polish.

ahoge··on DEC64: Decimal Floating Point
He's just proposing it. It doesn't carry any weight.
ahoge··on JXCore LLVM JavaScript Frontend
They should have used one or several of the existing benchmark suites instead of creating their own micro benchmarks.
ahoge··on Imgur is Covertly Redirecting Image Links on Facebook and Twitter
> Error Code 302

It's a status code. 3XX is redirection.

4XX is client error and 5XX is server error.

ahoge··on Firefox 27 Released
I recommend to use a site-specific browser (SSB) for internal stuff. This way you get a fixed platform which can be updated as needed. For the internet, you can continue to use an auto-updating browser.

Take a look at XULRunner and the Chromium Embedded Framework (CEF).

If you want to see CEF in action, try Brackets:

http://brackets.io/

ahoge··on Firefox 27 Released
Looks much better now: https://www.howsmyssl.com/
ahoge··on A Reintroduction to JavaScript
> Also, how do NaN and infinity fit in? I'm guessing they're special cases of Number types?

Those are magical values from IEEE 754.

IEEE 754 is also the reason why there is a signed zero or why division by zero results in +/- Infinity.

  >>> 0 === -0
  true
  >>> 1/0 === 1/-0 // compares Infinity with -Infinity
  false
ahoge··on Strangest Programming Language Feature?
It kinda made sense, because there wasn't anything fancy like Notepad. If you wanted to read some section, you had to specify the range. If you wanted to change a line, you overwrote it by using the same line number. If you wanted to insert a line, you had to pick a line number which lies between those other two line numbers. That's why you used an increment of 10 (or whatever) instead of 1.
ahoge··on Patterns For Large-Scale JavaScript Application Architecture
Yes, that's the right talk.
ahoge··on JavaScript: The Right Way
jQuery is a library for things like DOM manipulation, AJAX, animation, and events.

Ember and Backbone depend on jQuery, for example.

ahoge··on JavaScript: The Right Way
The most popular one right now is probably Angular.

http://www.google.com/trends/explore#q=angularjs%2Cbackbonej...

ahoge··on 1% rule (Internet culture)
In the past, there was Deletionpedia:

http://en.wikipedia.org/wiki/Deletionpedia

ahoge··on 1% rule (Internet culture)
If an article gets deleted, it's gone.
ahoge··on 1% rule (Internet culture)
I wasn't talking about vandalism. I mean real irreversible destruction of content.
ahoge··on 1% rule (Internet culture)
> in a collaborative website such as a wiki, 90% of the participants of a community only view content, 9% of the participants edit content, and 1% of the participants actively create new content.

In Wikipedia's case, there are also those who destroy content.

ahoge··on The Friends Of My Friends Are Not My Friends
The important bit is "people you know from the internet".

For example, I really like survival horror and horror-themed action games. That's what connects me with one particular woman who shares these interests. However, she's also into My Little Pony and other furry stuff. I don't care about those things or people from those circles.

All those communities are very narrow in focus. They only share one particular interest.

ahoge··on The Friends Of My Friends Are Not My Friends
Yea, "friends of friends" is a really weird concept when it comes to people you know from the internet. It creates connections between disjoint communities. Those communities are disjoint for good reasons. They don't have anything in common.
ahoge··on CoffeeScript's Time is Waning For Me
> since the main advantage of JavaScript is not having to supply types.

With TypeScript and Dart, the type annotations are optional. You don't have to use them.

With JavaScript, you can't add any type information. Using non-standard doc comments is the only option.

Also, the main advantage of JavaScript is that it's available in browsers.

ahoge··on CoffeeScript's Time is Waning For Me
> [tooling] is perfect with JavaScript

Tooling is terrible with JavaScript. Even if you use something like Tern, it's still really bad.

You can pass arbitrary arguments to functions. Types and arity isn't checked. Optional positional/named arguments (with default values) don't exist. Passing some options object and "foo = foo || 5" is the best you can do. You can't tell, with absolute certainty, that some object doesn't have some particular property. A string might have a "lenght" property (should have been "length", that was a typo).

Your IDE can make some educated guesses and offer some auto-complete suggestions based on that.

There is also type coercion. Maybe you really wanted to create NaN in a very elaborate manner. Multiplying some array with some object is totally legit. No squiggly line for that.

That's a far cry from being perfect.

Never used something like C# or Java? Dart's tooling is also pretty good, for example. Even AS3 offers much better tooling than JS. TypeScript does of course also offer way better tooling.

JavaScript's tooling is terrible, really.

ahoge··on Swatch Internet Time
It should have been based on UTC ("zulu time"), not UTC+1.

Zulu Beats.

There, I fixed it.

← PreviousPage 8 of 16Next →