HNHacker News
TopNewBestAskShowJobs

wingspan

266 karma · joined September 12, 2011

Software Engineer at Netflix, building components for TV.

https://ianobermiller.com

submissionscomments
wingspan··on Collections (YC S12) is remaking the most basic part of the OS: The Finder
I am not sure how iOS or Android handles the file system (officially), but I do know that Windows 8 could use a clean, simple, touch-friendly File Explorer replacement.

I don't believe that the growing scheme of ignoring the file system, especially on mobile devices, and in some cases even forcing you to use cloud storage (to share data between apps, for instance) is an effective solution in the short-term.

wingspan··on Show HN: box2d-jquery - physics-engine for your DOM
Great explanation, thank you. Always fun to know about non-determinism at the hardware level.
wingspan··on The Node Beginner Book
Or just click the link below the buy button that says "Continue reading the free version", which just removes the hiddenhalf div.
wingspan··on TypeScript: a language for application-scale JavaScript development
When you paste this into the Playground, and hover over the `var
wingspan··on TypeScript: a language for application-scale JavaScript development
Ah right, misread your post. I was just commenting in general on the VS support, you are right that it would not be as nice on other platforms.
wingspan··on TypeScript: a language for application-scale JavaScript development
Please read the whole post for context. I am talking about the type system in TypeScript thinking that `l` is a string (which you can find out, for instance, by hovering over the `var` keyword in Visual Studio), when in fact, as you pointed out, it is a number. I assume this is because TypeScript caters to the most common case of indexing a string to obtain a single character (another string, basically).
wingspan··on TypeScript: a language for application-scale JavaScript development

  I have more than a sneaking suspicion that this project is essentially a proof-of-concept, and that it is not heavily used at Microsoft.
My team has been dogfooding TypeScript for several months now, providing lots of feedback and writing > 30,000 lines of code (in many cases the new TypeScript code is shorter than the original Javascript).
wingspan··on TypeScript: a language for application-scale JavaScript development
TypeScript will eventually support generics, as per the spec [1]:

  NOTE: TypeScript currently doesn’t support Generics, but we expect to include them in the
  final language. Since TypeScript’s static type system has no run-time manifestation, Generics
  will be based on “type erasure” and intended purely as a conduit for expressing parametric type
  relationships in interfaces, classes, and function signatures.
[1] http://go.microsoft.com/fwlink/?LinkId=267121
wingspan··on TypeScript: a language for application-scale JavaScript development
With reference to AMD and CommonJS modules, the spec has more info [1]:

  TypeScript implements modules that are closely aligned with those proposed for
  ECMAScript 6 and supports code generation targeting CommonJS and AMD module systems.
It also looks like you can consume CommonJS and AMD modules using familiar constructs.

[1] http://go.microsoft.com/fwlink/?LinkId=267121

wingspan··on TypeScript: a language for application-scale JavaScript development
I'd have to defer this one to the language designers, I'm sure they've done such a comparison.

Per the spec [1]:

  TypeScript syntax includes several proposed features of Ecmascript 6 (ES6), including classes and modules.
[1] http://go.microsoft.com/fwlink/?LinkId=267121
wingspan··on TypeScript: a language for application-scale JavaScript development
I tried to get around this by creating overloads of almost all methods when you are operating on an array. `each` for instance, has a standard implementation using moveNext, and then an array implementation using a fast for loop. In some cases you could even drop down to native function calls.
wingspan··on TypeScript: a language for application-scale JavaScript development
The language support in VS is really great, and getting better with each release. Go to definition, code outlining, folding, type information on hover, intellisense; all these make writing code much less easier and error prone, especially if you are used to writing in a language like C# or Java in a good IDE.
wingspan··on TypeScript: a language for application-scale JavaScript development
Typo, updated. Should have been n * n
wingspan··on TypeScript: a language for application-scale JavaScript development
Ah yeah, typo, updated.
wingspan··on TypeScript: a language for application-scale JavaScript development
I did look at underscore when figuring out how to design the library, along with many JS LINQ variants (http://ianobermiller.com/blog/2012/09/19/linq-for-javascript...).

It should be pretty straightforward to provide Underscore bindings for TypeScript.

One big difference in the library I was working on is that it is lazy, and modeled after .NETs IEnumerable. Whether this is a good thing or not, I'm not yet sure.

wingspan··on TypeScript: a language for application-scale JavaScript development
Yes I see what you mean, it'd be interesting to see what the exact rules around type checking are; especially when dealing with []. The string type for example, always give you a string when indexed, even when incorrect:

  var s = 'foo';
  var l = s['length'];
  // type of l is `string`
I also agree about non-nullable types, and I've found even with TypeScript, having to make sure your vars are defined and not-null is still a pain.
wingspan··on TypeScript: a language for application-scale JavaScript development
I believe the monaco editor is already being used in Azure Websites and possibly the TFS preview. I wouldn't be surprised if more information about it would be released soon, they are also a major dogfooder of TypeScript.
wingspan··on TypeScript: a language for application-scale JavaScript development
A team member could comment better than I, but unless TypeScript adds some kind of operator overloading, supporting a new type would be difficult since it compiles to normal JavaScript. Even then, creating a performance decimal type without native code support might be difficult.
wingspan··on TypeScript: a language for application-scale JavaScript development
Debugging would be helped greatly if they supported source maps (http://www.html5rocks.com/en/tutorials/developertools/source...).
wingspan··on TypeScript: a language for application-scale JavaScript development
`7[2]` is valid Javascript, so it is also valid TypeScript (fetching the '2' member of the `7` object).

Detecting null expressions at compile time might help. There are "nullable" types, but afaik only in signatures:

  foo(x?) {
      alert(x);
  }
If `x` is not passed in, it will be `undefined`.
wingspan··on TypeScript: a language for application-scale JavaScript development
Would be a good thing to suggest to the team, it is the first release of the language, after all.

In the interim, a simple library like underscore is quite succinct:

  _.map([1,2,3], n => n * n)
With more library support you could even do infinite lists with something like this:

  _.generate(index => 1.0 / index);
wingspan··on TypeScript: a language for application-scale JavaScript development
I've written a LINQ style library for TypeScript that allows you to write something like this:

  from([1,2,3]).select(n => n * n).where(n >=2).toArray()
which outputs

  [4, 9]
Hoping to open source it soon.

Edit: typo, n * 2 should have been n * n, sorry for the confusion

wingspan··on TypeScript: a language for application-scale JavaScript development
If you have a small sample, you could try it out in the playground (http://www.typescriptlang.org/Playground/) and see what TypeScript can recognize. Generally, I've seen TypeScript plays well with other OO forms and gives you intellisense on quite a lot.
wingspan··on TypeScript: a language for application-scale JavaScript development
Here are some off the top of my head:

1. Lambdas (as you mentioned) are not only shortened syntax, but also capture the `this` variable automatically for you. Try typing in the following at the playground in the body of the `greet` method to see what I mean (http://typescriptlang.org/playground):

  var x = a => this.greet();
2. Classes with inheritance are a big one, implemented using the IIFE pattern as well, with support for static and class members.

3. Interfaces with duck typing are very lightweight and easy to use:

  interface IGreeter { greet(); }
  class Greeter /* implements IGreeter */ {
      greet() { ... };
  }
4. Extensive type inference. In the following example, the function greet will be typed () => string:

  class Greet {
    greet(x: number) {
        var s = ' greetings';
        return x + s;
    }
  }
Static and member vars, return types, local variables, all are type inferred.

5. Javascript is TypeScript, just without typing, so converting your codebase is instance, and then you can begin adding type annotations to get more robust checking

wingspan··on TypeScript: a language for application-scale JavaScript development
Awesome, great to see this finally released. I'm a dev in FUSE Labs (http://fuse.microsoft.com) and we've been dogfooding TypeScript for a while now. I'd be happy to answer any questions about using TypeScript vs vanilla JS, converting a large codebase, etc.
wingspan··on Microsoft employees getting free Surface tablets, new work PCs, Windows Phone 8
Like others have already pointed out, the experience of one person in a 100k+ employee company is not broadly applicable. Many employees have iPhones, yes, but many also have Windows Phones as well. I agree with you that since there is really no mandate to use MS products, it is a good sign if employees do use them, since it can signal that they truly are better than the competition.
wingspan··on Microsoft employees getting free Surface tablets, new work PCs, Windows Phone 8
In some orgs it is actually relatively easy for a PM to get a MacBook Air, for instance. You don't even need a bulletproof justification. Although with the new crop of ultrabooks, the MacBook Air is no longer so unique, so it may be more difficult.
wingspan··on Microsoft employees getting free Surface tablets, new work PCs, Windows Phone 8
It's a small gesture when you look at the big picture (total compensation, etc), but this means a lot to me as an employee, and really shows Microsoft's commitment to the new era of Windows 8 on beautiful devices.

It will be interesting to see how the Windows Phone 8 devices are distributed, as the previous deal for 7 was a free device only if you sign up for a 2-year contract.

Unfortunately I just moved teams, so I was in the process of ordering a new machine anyway; but still, a new Surface tablet will be awesome.

wingspan··on Microsoft employee on stack ranking and its 'most universally hated exec'
Personally, the new stack ranking bit doesn't bother me much, as it doesn't seem a whole lot different than before (transposed system of assigning numbers 1-5 and different sized buckets).

The healthcare changes are most upsetting to myself and my wife, especially since we always looked at healthcare as an amazing benefit and competitive advantage to Microsoft. For anyone who doesn't know, there is currently a healthcare plan available that basically covers everything, all the time, with no out-of-pocket costs ever. No copays, no prescription costs, nothing. Of course there are limits, but for many typically cases, like myself, I never pay anything. This plan is going away in 2013 and being replaced by a more typically, less comprehensive option.

wingspan··on Ask HN: Which tools are you using to edit graphics for web?
I used to use Fireworks all the time, I love the export comparison and slicing.

Recently though I've taken to some free options (I'm on Windows mainly):

1. Inkscape for all vectors

2. Paint.NET for everything else

3. PNGGauntlet for optimization (mashup of PNGOUT, DeflOpt, and OptiPNG).

4. http://instantsprite.com/ for sprites

← PreviousPage 3 of 4Next →