HNHacker News
TopNewBestAskShowJobs

program

992 karma · joined October 22, 2010

submissionscomments
program··on Do a barrel roll - Google Search
In the movie saga "Back to the future" the DeLorean time machine needs to travel at 88 mph and the flux capacitor needs 1.21 gigawatts of power in order to activate the time circuits.
program··on Apple Inc vs a small Restaurant from Luxembourg
I've read this story back in May:

http://www.lessentiel.lu/fr/news/luxembourg/story/La-pomme-d...

program··on Ixoth
You can send SMS and email directly from the Siri panel, also Siri has been added to the system-wide keyboard and you can use dictation even in third-party apps.
program··on Show HN: Hackerhub.org
It seems that Chrome is indulgent with the font-family declaration. There is an error in the CSS.

  font-family: 'Istok Web' sans-serif;
should be:

  font-family: 'Istok Web', sans-serif;
Firefox 7 ignore the above declaration showing the page in the default font. I have forced 'Istok Web' with firebug and yes it looks ugly.
program··on Show HN: Hackerhub.org
What browser are you using? I can see all the characters. They have specified 'sans-serif' (which most of the times means Helvetica).
program··on JSNES: A JavaScript NES emulator by Ben Firshman
The standard display resolution of the NES is 256 horizontal pixels by 240 vertical pixels. Upscaling on a canvas context can be a very slow operation even if you use the nearest-neighbor approach.
program··on What do we need for HTML5 games to be awesome?
> To be honest – CSS3 animations have terrible syntax

I think that this guy has never heard of the canvas element. Using CSS3 animations for making games is pure madness.

program··on You can't google 9999999..99999999999999999999999
Neither

  1111111..11111111111111111111111
  11111111..1111111111111111111111
  111111..111111 // minimum case
or any other integer combination. 6 digits is the minimum amount that spawn the bizarre error.
program··on Keymaster.js: painless keyboard shortcuts for javascript
I like the fact that this library has no dependencies. I suggest that the _MAP variable in keymaster.js should be equal to the specialKeys variable defined in jquery.hotkeys.js.

https://github.com/jeresig/jquery.hotkeys/blob/master/jquery...

in order to cover all special keys.

program··on New Visual Proportions for the iOS User Interface
In iOS all UI measures are expressed in points and not in pixels. Saying 44 pixels is simply wrong. In the iPhone 4 the screen has the exact same size of the 3G but a scale factor of two so every point is two pixel.
program··on The Shapes of CSS
They will lose money:

  #triangle-up { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red; }
is 143 bytes.
program··on a[5] == 5[a]
I've read this example first time in a storic stackoverflow topic:

http://stackoverflow.com/questions/1995113/strangest-languag...

it will stay forever in my bookmarks.

program··on Iron Man-Like Exoskeleton Nears Production
CYberdyne INC (Japan) has a very advanced Hybrid Assistive Limb project as well. It's not developed for military purposes but for helping the disabled and elderly in their daily tasks. They will begin production in 2012.

http://www.cyberdyne.jp/english/robotsuithal/index.html

program··on 535 ways to reload the page with JavaScript
Given that "window" is the top level object in JavaScript:

location === window.location === self.location

and that objects are also associative arrays:

oneObject.aMethod === oneObject['aMethod'] === oneObject['aMet' + 'hod']

you can write infinite variant of the same function call.

program··on Lion Is a Quitter
It's called auto-termination:

http://developer.apple.com/library/mac/#documentation/Genera...

Only applications that support auto-save AND set NSSupportsAutomaticTermination to YES do quit when there are no open windows.

program··on Move.js
I think that the author took inspiration from Objective C blocks:

  int (^aBlock)(int) = ^(int a) {
    return a;
  };
program··on Apple investigating flat 'key-less' keyboard using acoustic cues
I see two problems regarding the adoption of this device:

1) Non adapt for touch typists. In my opinion it would be very hard to find the home row without raised dots and the feeling of real keys.

2) Can increase the effect of repetitive strain injury (RSI). Hitting an hard surface isn't the same thing that hitting keyboard keys.

program··on HTML5 Fullscreen Video
In Chrome, Firefox and IE the video don't go fullscreen but instead the div with the <video> does span all over the page.
program··on HTML5 Fullscreen Video
Addendum: the 'document' extras: http://tiny.cc/kaktu

webkitCancelFullScreen webkitCurrentFullScreenElement webkitFullScreenKeyboardInputAllowed webkitIsFullScreen onwebkitfullscreenchange

program··on Short array syntax finally in PHP 5.4
Also arrays of arrays have a much more compact syntax:

  $a = [1 => [4, 5, 6], 2 => [7, 8, 9], 3 => [10, 11, 12]];

  $a = array(1 => array(4, 5, 6), 2 => array(7, 8, 9), 3 => array(10, 11, 12));
program··on Emacs follow-mode
The documentation is misleading. You can use follow-mode on an arbitrary number of windows that show the same buffer.
program··on 5 Things To Watch in OS X Lion
How Little Has Changed

Full disk encryption and multi-touch gestures alone are a good buy for 29.99$.

program··on CSS Panic: Game written in HTML/CSS - no Javascript
Works well in webkit-based browser (Chrome 12 and Safari 5 tested). This is due to the extensive usage of -webkit-animation-, -webkit-pointer- and -webkit-transform-.

The crocodiles are radio buttons and animations are controlled via the :checked pseudo-selector, very clever.

program··on 14 Features Mac OS X Lion Stole from iPad (and counting)
Addendum: when using the Magic Mouse/Trackpad in Lion, if you scroll down the window content goes up. Up goes down (you don't scroll the bar, you scroll the window). Just like on iOS.
program··on It's About The Hashbangs
Twitter does this:

  http://twitter.com/#!/twitter
is parsed by the Google crawler as:

  http://twitter.com/?_escaped_fragment_=/twitter
which is a 301 Moved Permanently to the old:

  http://twitter.com/twitter
which in turn redirect to the #! version if you are logged. This is a mixed approach that mantain backward compatibility (and support Bing, Yahoo and other crawlers).
program··on How to understand non-trivial declarations in C. (right-left rule)
I use the well-known "clockwise spiral rule" http://c-faq.com/decl/spiral.anderson.html
program··on Oddities about JavaScript
Actually that is the name that appears in the ECMAScript official language specification:

http://bclary.com/2004/11/07/#a-7.9.1

program··on Oddities about JavaScript
Javascript has automatic semicolon insertion. This function:

  function a() {
    return
      true;
  }
return undefined.
program··on Annoying.js: How to be an asshole
This is so true. Worst of all a company named Tynt has a patent pending for ctrl+c injection:

http://www.google.com/patents?id=4Qx6AQAAEBAJ&printsec=a...

program··on SVG vs Canvas, what format to choose?
I use both. I create SVG files with Inkscape (if and only if I need to draw some complex shapes) and then I display them using the Processing language (the javascript port:)

http://processingjs.org/

The Processing parser generate (fast) javascript code on the fly the can be accessed from external scripts. You can mix processing with javascript.

← PreviousPage 5 of 7Next →