Announcing TypeScript 2.1 - <AUTHOR> https://blogs.msdn.microsoft.com/typescript/2016/12/07/announcing-typescript-2-1/ <comment><USER3> If you still haven't given TypeScript a go as a Javascripter, now is a great time to do so.

Whether you end up adopting it or not, it's interesting to get the types out of your mind and into the code. The first time you feel the speed/confidence of refactoring with accurate 'Find usages', you'll decide if the undeniable overhead of types is worth it.

<comment><USER4> Can anyone weigh in on TypeScript vs Elm?

<comment><USER5> Elm is really cool language that's pushing a lot of boundaries. Use it for learning or for small projects.

TypeScript is a highly practical and pragmatic language. Use it for anything serious.

<comment><USER6> what boundaries do you think Elm is pushing as a language?

It is a cool language and platform, but to me it looks like with time it has actually become more conservative.

TS on the other hand appears to contain some interesting new things on each release (possibly too many). Case in point, Lookup and Mapped types in 2.1 seem like a brilliant idea.

</comment></comment></comment></comment><comment><USER7> After trying TS, I basically never want to write JS again.

I know that 'OO' and 'typing' is not the solution to everything ... but aside from all the nice things you can do in TS ... the 'enforced architecture' of OO-ish paradigms, combined with typing, and essential obfuscation of the prototype paradigm ... has cut the time to development in half.

I can hardly think of a reason to use JS now that TS exists.

Of course - there are some reasons, in some specific situations, but by and large, TS is the future.

<comment><USER8> I've stopped using those OO-ish paradigms in JS (no 'this', 'new', 'prototype'), but even still, have much preferred using TS. You can get a long way (and have great flexibility) with only interfaces and generic functions.

<comment><USER9> Same, it's so much saner. classes or prototypes bring nothing but troubles to the table, except when you want to have tons of objects in a memory efficient way in library code.

TS does a great job without OO thanks to structural typing.

</comment></comment></comment><comment><USER10> It's interesting to me that all of the initial reactions I've seen to this announcement have been around the introduction of async and object spread, which are available with babel, but the typescript specific features such as mapped types are completely ignored.

I don't really have any particular meaning behind that observation, only that it tickled my funny bone a little bit.

<comment><USER11> Maybe it is me, but I feel like mapped types and keyof are terrible features, and using them would be a sign of a bad design/architecture.

In general, I don't think using a string that represents a static symbol (such as the name of a var, an attribute or a class) is a good idea.

I try to keep a simple stack (Typescript + NPM at the moment), and I prefer to wait for Typescript to have the feature I want, than to install a new dependency (Babel, for example) to my project.

<comment><USER12> I think there are two main kinds of developers who use TypeScript. Some developers come from traditional statically-typed languages, like C#/Java/C++/etc, and expect the language to conform to their idea of "good design". For these developers, "mapped types" are "not good design". Other developers come from JavaScript, Python, Ruby, or other duck-typed languages and think, "I know that this object is just a dictionary underneath it all, and I want a type system that lets me write code with that foundation." These developers want additional safety but they see traditional type systems as handcuffs.

These are two very different styles of programming, and TypeScript does a fairly good job of serving both groups--it would have to, in order to be as successful as it is. There are a ton of useful JavaScript libraries out there which couldn't easily be rewritten to conform to some Java-style type system, and there are a ton of skilled Java/C#/C++ engineers out there who don't want their name on a bunch of cowboy code.

I don't think this cultural division is going to go away any time soon, so it's in our best interest to believe that people in the "other camp" (whichever camp that is) are skilled and conscientious developers. I'm sure you've heard the arguments by dynamic language lovers who talk about how restrictive/slow/painful it is to write in a static type system, and I'm sure you're as tired of that argument as I am.

<comment><USER13> _I 'm sure you've heard the arguments by dynamic language lovers who talk about how restrictive/slow/painful it is to write in a static type system, and I'm sure you're as tired of that argument as I am._

At this point in time, it's a bit of a false dichotomy. It just amounts to a programming tool based on a form of meta-data. Of course people are going to have different ideas about the cost-benefit of that tooling. Of course, people are going to have differing opinions on how much of that tooling is worthwhile. Most of the problems with online discussions about this kind of tooling, come from people forgetting that it's just a discussion about tooling.

<comment><USER12> I don't think this is a false dichotomy. There's definitely a spectrum between static and dynamic type systems, and plenty of people who identify with either camp. Calling it "tooling" changes the name of the problem, there are still people who will complain when they think the tooling is going in the wrong direction, and those complaints have merits because so many of us will be forced to write code in a style we don't like.

<comment><USER13> _There 's definitely a spectrum between static and dynamic type systems_

The key word is spectrum.

 _and plenty of people who identify with either camp._

What does it mean when people take something that's actually a spectrum, then divide that into two opposing camps? Does this sort of activity generally get public discourse closer to the truth, or farther away from it? It usually does the latter, in my experience. Hopefully, someone has set that knob to a position that works pretty well, and things work out.

 _those complaints have merits because so many of us will be forced to write code in a style we don 't like._

Just who gets to write code in exactly the style that they like? From what I've seen, people generally make compromises, or they found the "perfect" job, or they are the one running the project, or they are going rogue and doing their own thing and introducing inconsistencies into a project's codebase.

<comment><USER12> Honestly, I feel like I am on the receiving end of some moralizing here—when someone tells me that my language "brings public discourse farther away from the truth" I wonder how I could have offended them so deeply.

The difference between a dichotomy and a spectrum is itself a false dichotomy. Ask any biologist what a species is, and they might stammer out some kind of weaselly definition full of hedges, and that same biologist might turn around and publish a dichotomous key which tells you how to identify a particular species according to an easy set of rules. The same goes for politics, human sexuality, and yes, type systems.

So I'm not going to hedge myself when I say that people "identify with either camp". They do. Neither is it a contradiction when I say that there's a spectrum. And when I say that there are two main kinds of people—I hope that my reader understands that I'm not a robot, and that I don't actually think that type systems are some kind of strict dichotomy.

> Just who gets to write code in exactly the style that they like?

I could point out that, again, like/dislike is a spectrum and not only a dichotomy. See above discussion.

<comment><USER13> _Honestly, I feel like I am on the receiving end of some moralizing here—when someone tells me that my language "brings public discourse farther away from the truth" I wonder how I could have offended them so deeply._

Please re-read. I never said your programming language "brings public discourse farther away from the truth." Otherwise, please provide a quote. What I said is that some discussion about language "brings public discourse farther away from the truth."

I just re-read, and perhaps you are talking about human language. Also, no, I'm not offended. I'm just making an observation about how talking about things in a certain way can shape thought in non-beneficial ways.

 _Ask any biologist what a species is, and they might stammer out some kind of weaselly definition full of hedges, and that same biologist might turn around and publish a dichotomous key which tells you how to identify a particular species according to an easy set of rules. The same goes for politics, human sexuality, and yes, type systems._

When I encounter political discussions online, I sometimes have a person pattern-match something I've said, then declare all of my political beliefs for me. In those situations, false dichotomy -- or rather unawareness of the spectrum -- has distorted someone's thinking away from the truth.

I suspect this happens to Golang a lot. Basically, the Go language designers seem to be heavily into the Pareto Principle. So they are very willing to have a quite barebones level of tooling, and leave a lot of features out. This is especially true for their type system. They seem (to me) to have succeeded in getting most of the benefits of a type system while minimizing the disadvantages, while having much of the "feel" of a dynamic language, while also avoiding most of the downsides. It's a kind of pragmatic minimalism I've only encountered before in dynamic languages like Clojure, Lua, and Smalltalk.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> Typescript is a game changer for any serious project. Never going back to plain JS.

<comment><USER7> Concur.

I am basically 'anti religious' when it comes to software.

So many people argue back and forth about this or that, and 80% of arguments are academic and effete (this is what I mean be 'religious').

But I'm a big supporter of TS because I believe 'it makes sense' on almost every level.

I'm not a 'big supporter' of many things at all, if any.

I understand the limitations, and that it enforces some things for which we may want more flexibility ... but overall, I have to say I can't think of any reason ever to use JS again.

My hope is that V8 etc. build engines to run TS directly as opposed to having to transpile.

</comment></comment><comment><USER15> Question:

Is it possible to have a setup with TypeScript where it is guaranteed that no code changes occur other than removal of the type information?

I started using Flow, found what it can and can't do and would like to try TypeScript. But only if I can have "types-only", I don't want my code "translated" in any way. I'm writing for the latest node.js version and not for x different browsers, I want to use exactly what that version supports and have no code-changing steps.

With Flow I use _flow-remove-types_ ([https://github.com/leebyron/flow-remove- types](https://github.com/leebyron/flow-remove-types)) to remove the types. It leaves spaces where there was type-related code and doesn't touch the code itself.

<comment><USER16> With flow you can do one better: type comments! [https://flowtype.org/blog/2015/02/20/Flow- Comments.html](https://flowtype.org/blog/2015/02/20/Flow-Comments.html)

You actually wrap the type annotations in comments and flow will recognize them. You can use the source with the type comments in your browser!

As an example, the flow checker will read the annotations from `function f(n/ _:number_ /, s/ _:string_ /) { ... }` but since they are commented in the source code your JS engine ignores them.

This is amazing for typing existing code, since at every step you are merely inserting comments into your code. And your existing minification step will strip them out :)

<comment><USER17> Comments is definitely the easiest way to get doing. But also if you're already using Babel and ESLint, you can add Flow in very few steps:

1\. Setting up with Babel: (note that if you are already using the "react" preset you don't have to do anything)

        $ npm install --save-dev babel-plugin-transform-flow-strip-types

Then update your `.babelrc`:

        { plugins: ["transform-flow-strip-types"] }

2\. Setting up with ESLint

        $ npm install --save-dev eslint-plugin-flowtype-errors

Then update your `.eslintrc`:

        { plugins: ["flowtype-errors"] }

Then just install `flow-bin` and create an empty `.flowconfig` file in the root of your repo and you're done. Now you have Babel compiling your code the same as always and you can use the Flow type syntax, and with ESLint you probably _already_ have your editor all setup to show you warnings.

We're trying to integrate more with tools like this so you don't have to go changing your entire workflow. It shouldn't be so hard to add types to your existing JavaScript code.

<comment><USER15> For eslint I'm using plugin "flowtype", and under "extends" I have "plugin:flowtype/recommended". Do you happen to know what's different compared to the eslint-flow package you mention? I took the first one I could find, didn't want to spend hours with the eslint part of using Flow since I was busy with all the errors reported by Flow during the conversion process.

 _EDIT:_

Ah I think I get it, it's for editors that don't interface with Flow but only with eslint. Well, since WebStorm has Flow support - even though it's new and there are a few tickets open - I guess I should stick with the plugin that I already chose.

</comment></comment></comment></comment><comment><USER18> We are using async await with 2.1 rc and it works flawlessly. I also love the keyof, with that we can remove tons of "any" types from our code base.

Amazing work TypeScript team! This release has been a lot of work!

</comment><comment><USER19> " We _spread_ ourselves thin, but this is the moment you've been _await_ ing – TypeScript 2.1 is here! "

<comment><USER20> I read that first and I was like "o_O". After reading the rest I was "O_O". Nice pun.

</comment></comment><comment><USER21> > Object Rest & Spread

Great news! That will finally fix the syntax errors in VSCode. :)

[https://github.com/Microsoft/vscode/issues/1974](https://github.com/Microsoft/vscode/issues/1974)

[https://github.com/Microsoft/vscode/issues/3804](https://github.com/Microsoft/vscode/issues/3804)

</comment><comment><USER22> I have been waiting for object rest and spread for ages. Thank you to the maintainers for working hard on this feature.

<comment><USER23> Same here. I already used it exessively in JavaScript to prevent mutations and missed it a bit in TypeScript.

</comment></comment><comment><USER24> I recently started using TS instead of JS and I've been loving it. I find errors much earlier and while the tooling could be a bit better, I honestly find it less exhausting than keeping up with Babel.

</comment><comment><USER25> Hurrah for object spreads! Time to go grepping for calls to _.default and _.extend.

<comment><USER26> Also, Object.assign

<comment><USER27> Unfortunately

      newThing = {...thing, propertyName: value}

Will always compile, even if propertyName is invalid. The only advantage over Object.assign I see is IDE support (at least in Intellij IDEA). I will still use:

      newThing = Object.assign({}, thing);
      newThing.propertyName = value;

This will not compile if propertyName is invalid and is IDE friendly.

<comment><USER26> You should be able to add a type requirement and get the error you are expecting. Instead of this:

        let newThing = { ...thing, propertyName: value } // type of newThing would be deduced: TypeOfThing & { propertyName: TypeOfValue }

If you add the type requirement the compiler should balk on the propertyName:

        let newThing: TypeOfThing = { ...thing, propertyName: value }

ETA: You'd have the same lack of compiler error if you were instead using:

        let newThing = Object.assign({}, thing, { propertyName: value })

Because Object.assign will also build intersection types by default.

</comment></comment></comment></comment><comment><USER28> TypeScript is great. I built [https://www.findlectures.com](https://www.findlectures.com) over a year, starting in plain Javascript. Once the codebase was large enough that got stuck I added TypeScript, and it's been great for isolating defects.

It's nice paired with React (vs PropTypes) because the checking happens a lot earlier and is much richer.

<comment><USER29> Nice site. I know what I will be doing tonight, when I arrive home. Thanks :)

<comment><USER28> Awesome. Feel free to contact me if you have questions/ideas or if you find anything you really like :)

</comment></comment></comment><comment><USER30> How does the development cycle work? With plain JS I load up my html page in browser (chrome) and head to the console to check for errors in the JS. Then I do user testing.

Can type-script be debugged by a browser on a source code level - ie not on a transpiled level? If not, I am not sure if it's worth it. And I say that as someone who is a huge fan of explicit optional typing.

<comment><USER26> There is typically a quick transpile process in the IDE/toolchain of your choice. Most browser dev tools now support sourcemaps quite well which means that debugging shows the TS source and breakpoints are set directly there and typically show error stacktraces with your TS files.

Another option is to load Typescript in your browser and let it transpile directly in the browser. Sourcemaps in this case are a bit more iffy in their browser support, but it can be an option for a quick debug cycle if you wanted to try something like that. Not particularly the fastest idea for a production app, though.

</comment></comment><comment><USER31> Feels like Typescript is building (or has built up?) more momentum than Flow.

<comment><USER32> Very early on, Typescript cleverly built up an ecosystem around community- supported type definitions for popular js libraries. This makes type-checking and integration for those libraries dead simple.

2 years later, Flow is _still_ lagging behind in this area. [1] I'm not certain, but I think this may be due to Typescript allowing for a external header-like file while Flow requires inline types.

For this reason I believe, as many other commenters have noted, Typescript has nearly always been ahead of Flow in popularity.

[1] [https://github.com/facebook/flow/issues/7](https://github.com/facebook/flow/issues/7)

<comment><USER15> I don't understand what you mean by

      this may be due to Typescript allowing for a external
      header-like file while Flow requires inline types.

Flow supports external declaration files. I use them all the time for 3rd party modules.

<comment><USER32> You're right, this has been added recently and there's also now a community effort around 3rd party modules. [1]

Though it looks like it didn't become active until after at least 03/2016 [2].

I mention this only because TypeScript has been active in this area since 10/2012 [3], which is in-line with the original intent of my comment - <USER2> Flow is over 2 years (closer to 3.5 years) behind in building this out.

[1] [https://github.com/flowtype/flow-typed](https://github.com/flowtype/flow- typed)

[2] [https://github.com/flowtype/flow- typed/graphs/contributors](https://github.com/flowtype/flow- typed/graphs/contributors)

[3] [https://github.com/DefinitelyTyped/DefinitelyTyped/graphs/co...](https://github.com/DefinitelyTyped/DefinitelyTyped/graphs/contributors)

</comment></comment></comment></comment><comment><USER33> One thing I never understood with Babel is which features are shimmed in the output JS and which features are re-implemented?

What I means is: I didn't know how to tell Babel which browsers I was targeting, and I'm pretty sure that some of their feature implementations do not feature test the platform before activating, since they were so compiled in. Is that the case?

Also, do you have to tell TypeScript your target runtime for it to it to use it's ES3 async/await logic vs. it's ES2015 (which uses generators), or does it automatically figure it out?

<comment><USER34> They're getting better at describing which features are shimmed, but the easiest way to check is by running a single plugin on a bit of code and seeing for yourself.

For instance, I decided just now to check if `transform-object-rest-spread` included an Object.assign polyfill (because spread syntax transpiles to Object.assign behind the scenes.)

With the following input:

      var foo = { x: 1, y: 2 };
      var bar = { a: 3, b: 4, ...foo };
      var baz = new Promise(function(resolve, reject) {
        resolve("quux");
      });

I get the following output

      var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
      var foo = { x: 1, y: 2 };
      var bar = _extends({ a: 10, b: 11 }, foo);
      var baz = new Promise(function(resolve, reject) {
        resolve("quux");
      });

The problem here, (to borrow phrasing from the docs) is that "Babel uses very small helpers for common functions such as _extend. By default this will be added to every file that requires it. This duplication is sometimes unnecessary, especially when your application is spread out over multiple files."

To solve this problem, many people use the `transform-runtime` plugin [1] as well. To put it shortly, it replaces inline helper functions (like _extends in the example above) with imports from an adapter module called 'babel-runtime', which itself exposes the relevant polyfills (regenerator[2] and core-js[3]).

With `transform-runtime`, I get the following:

      import _Promise from "babel-runtime/core-js/promise";
      import _extends from "babel-runtime/helpers/extends";
      var foo = { x: 1, y: 2 };
      var bar = _extends({ a: 10, b: 11 }, foo);

      var baz = new _Promise(function (resolve, reject) {
        resolve("foo");
      });

Notice that the Promise implementation was polyfilled as well.

> I didn't know how to tell Babel which browsers I was targeting...

You might *really like babel-preset-env[4], a new project they just launched. Basically, you give it a set of browser targets (much like autoprefixer) and it works out exactly which plugins you need to support the latest (currently es2015, I think) version of javascript.

Hope that helps! Sorry for going on a Babel-related spiel in a Typescript thread, couldn't help myself. ;)

1: [http://babeljs.io/docs/plugins/transform- runtime/#technical-...](http://babeljs.io/docs/plugins/transform- runtime/#technical-details) 2: [https://facebook.github.io/regenerator/](https://facebook.github.io/regenerator/) 3: [https://github.com/zloirock/core-js](https://github.com/zloirock/core-js) 4: [https://github.com/babel/babel-preset-env](https://github.com/babel/babel- preset-env)

<comment><USER35> Deduplication of helper methods is now available in typescript too, using the 'importHelpers' compiler option. It will automatically add import statements to include the helpers from the 'tslib' package, see [https://github.com/Microsoft/tslib](https://github.com/Microsoft/tslib)

<comment><USER26> Thanks for the link, this was something I was specifically waiting for release but haven't seen come across in the release notes.

</comment></comment></comment></comment><comment><USER36> I've been using Typescript for over a year, and the amount of improvement in that relatively short time span has been incredible. With 2.1, Typescript shows no signs of slowing down.

</comment><comment><USER37> Can someone comment on the difference in reliability between using typescript and a natively statically typed language like haskell or scala? Is there any? Or is the type safety really as good when you use ts

<comment><USER38> One thing you might miss in TS is the ability to just try to check or cast an object at run-time to check that it's really of some nominal type, or structurally compatible with some type/interface. TS can't do that because it doesn't have runtime type information for its types - the types are a compile- time only thing. TS does allow creating functions that return type predicates, but that requires your own manual checking as implementation, the type system can't help you write those as far as I know.

I was missing this mostly for incoming requests. A good solution for me has been to generate json-schema from typescript interface definitions, using the typescript-json-schema npm package. Then incoming data can be checked vs the generated json schemas. Works fine and I get json schemas for api endpoints from it as well, so no complaints.

<comment><USER37> ahh interesting, that seems like a pretty significant difference. just to clarify, this means that you wouldn't be able to do things like:

if (my_var instance_of MyCustomType)

in TS, but you could in normal statically typed languages, correct?

<comment><USER26> It's a bit more complicated than that because of JS's prototype-oriented object system. If MyCustomType is a proper prototype (say you built it with the class keyword) you can certainly instanceof it. (That said there are strange edge cases where statically typed class-based object intuition falls down against prototype-oriented reality.)

The issues tend to start cropping up as you get further into TS-specific types like generic types. In a statically typed language you can inquire about the specifics of an implementation of a generic directly, and often even dispatch directly on that type. JS has no concept of your generic wrapper type and you need some other flag or logic to determine the runtime type of your generic code.

</comment></comment></comment></comment><comment><USER39> Async/await support for most browsers and node-0.12+ is definitely a welcome feature, callback hell and tripping over promise chains is definitely one of the most painful experience in TS development IMO.

</comment><comment><USER40> Incredible release. Was definitely waiting for the spread/rest improvements as well as being curious about the async stuff.

TypeScript continues to be for me the clear winner of the alt.js languages.

</comment><comment><USER9> Congratulation to the TS team. We are happily using it at work, it's such a tremendous upgrade over javascript, while keeping the entire ecosystem at hand.

</comment><comment><USER41> Seems like all of the new features have been available in Flow for quite a while now.

<comment><USER42> Flow is not a language

<comment><USER43> [https://flowtype.org/](https://flowtype.org/)

      function bar(x): string {

That's not JavaScript.

<comment><USER17> If that's too much you can also do:

        function bar(x) /* : string */ {

No compiling necessary

</comment></comment></comment></comment><comment><USER44> So can I finally banish babel from my build steps?

<comment><USER45> I did while 2.1 was an RC. It has worked flawlessly and I haven't looked back.

Build and minification is still a pain though...

<comment><USER32> Try webpack, it's fast and the configuration is nearly declarative.

You can also create a separate build task to run a smoke test by directly calling the ts compiler to compile your code (skipping pre- and post- build steps). This was a lot faster than I expected.

</comment></comment></comment><comment><USER7> Dear TS authors:

Thank you (!) for your amazing contributions. TS is the best new thing in tech.

That said:

Your linguistic genius is way ahead of the tooling.

I feel as though some of these 'new and cool' 2.1 things are a little bit intellectual, maybe useful in some cases ...

But getting TS to work in the real world, the various build configurations, tool-chains etc. - it's still clumsy.

It was difficult to grasp the difference between AMD and other paradigms. I still have problems with circular dependencies, or rather, things happening before modules are loaded.

Here's one pain point:

Creating a static attribute on a class and initializing it right there, as in:

class A { static b:B = new B(); }

Means that 'new B()' will get executed right when that module is loaded, possibly before the module containing B is loaded.

It's ugly, mechanical - but it's not a 'fine point'. I think these are the kinds of issues which are more likely to hold people back, as opposed to the lack of some rather fancy new paradigms such as 'Mapped Types'.

Anyhow, keep up the good work. Lovin't it.

<comment><USER26> Your pain point sounds like a runtime problem with your module loader. You may want to investigate your module loader's issue tracker. (I recommend SystemJS [and jspm] over AMD these days, for what that is worth. It handles module loading quite well including all the complexity of circular dependencies that ES2015 specced and TS supports.)

«I feel as though some of these 'new and cool' 2.1 things are a little bit intellectual, maybe useful in some cases ...»

async/await and object spread should be useful in quite a lot of places. The other "intellectual" additions are immediately useful indirectly because they were built to support object spread (so that object spread types make sense), even if you don't wind up using the directly (because you aren't writing complicated type definition files for instance). Even then, you might find a bunch of uses for the types Partial<T> (partial objects) and Readonly<T> (shallowly frozen objects).

<comment><USER7> Yeah, agree with async/await and spread.

</comment></comment></comment><comment><USER46> What's the future of TypeScript in Visual Studio (not Code)?

I've got a project that just silently fails to build in VS - no errors, no warnings, build successful - but no output.

It seems like the Typescript tools inside VS2015 (even with the latest update) just aren't ready.

</comment><comment><USER47> Really happy with the development pace. I started using it by contributing to VSCode and was very pleased with the great tooling and sane language and syntactic sugar.

</comment><comment><USER33> The proposal for async/await is education, to say the least. The specs for modern and older browser/js-engines are in there.

Turns out they implement two case statements, and handle every possible control structure.

[https://github.com/Microsoft/TypeScript/issues/1664](https://github.com/Microsoft/TypeScript/issues/1664)

</comment><comment><USER48> Any plans to add C#-like extension methods to TypeScript? Or is there a way to achieve the same thing already? I know that a previous suggestion to add extension methods was closed as out of scope. But maybe it's time to revisit that, since TypeScript is now doing significant code transformations for downlevel await support.

<comment><USER49> JavaScript already allows you to do something very similar to extension methods by extending prototypes.

OTOH, a function accepting an object which implements a specific interface as a parameter will make your code much more easier to extend, instead of modifying the prototype of a concrete class.

</comment></comment><comment><USER20> Would be so cool if the js engines ignored types like python3.

Then I could just write Typescript and run it on node/browser

<comment><USER43> That would work except for enums. That's the one simple thing the engine actually has to do.

<comment><USER20> JS should just really support enums. Its such a great feature of a core language.

I wonder if there is any ES proposal for enums.

</comment></comment></comment><comment><USER23> Are there any plans to catch something like this:

        function f(x: any): T {
          return x
        }

<comment><USER50> That would defeat the point of 'any', right? It's for variables that you want to allow to do anything (including be a T) without the compiler complaining.

If you don't want that behaviour, don't given x 'any' type. In that case there I'd probably use '{}' instead, and then use type guards ([https://www.typescriptlang.org/docs/handbook/advanced- types....](https://www.typescriptlang.org/docs/handbook/advanced- types.html#type-guards-and-differentiating-types) to convince TypeScript that it's a T (whatever that means).

<comment><USER23> tslint has a rule to prohibit the use of any. maybe this is worth an option for tsc

<comment><USER50> Maybe, but I think there's _a lot_ of cases where you want to be able to use 'any' explicitly. Tsc does already have noImplicitAny, so you have to have opted in to this behaviour.

</comment></comment></comment></comment><comment><USER51> The easier imports solves my biggest issue with migrating an existing project over. I'd say TypeScript is "ready" now.

The last feature I'd want is an easy way to map nested json into _classes_ rather than interfaces. Anyone know how?

<comment><USER52> An approach I've seen is to have each class extend from some abstract base class (I know, OO blech) that looks like this:

        abstract class AbstractClassObject {
            constructor(json?: any){
                if (json){
                    this.updateFromJSON(json)
                }
            }
            public updateFromJSON = (json: any): this => {
                Object.assign(this, json);
                return this;
            }
        }

That gives you the "magic" just by extending the base, while also allowing custom behavior for a given class (by overriding updateFromJSON).

<comment><USER51> Yeah but assigning doesn't really work for nested classes.

        class Post {
           id: string;
           user: User;  // <- should be typeof User
        }

I was hoping for something like Golang json.Unmarshal.

</comment></comment></comment><comment><USER53> Coming from Java land, TS is a life saver for front-end development.

Any plans for .NET Core / CLR backend ?

I think, this will be the silver bullet. TS types should be able to generate statically compiled bytecode => native binary ?

<comment><USER54> You can create TypeScript models from C# already. TypeLITE[0] will generate TS models using T4 templates. TypeWriter[1] is a visual studio extension that regenerates TS models whenever you save a file.

[0] - [http://type.litesolutions.net/](http://type.litesolutions.net/)

[1] - [https://frhagn.github.io/Typewriter/](https://frhagn.github.io/Typewriter/)

</comment></comment><comment><USER55> I like the functionality of

        let merged = { ...foo, ...bar, ...baz };

But I've come to understand ... as variadic parameters in C++, Java and Go. Wish they'd used another token.

<comment><USER43> _Spread_ (for arrays) was added with ES6. This just adds that kind of thing for objects (ES2017).

      let a = [1, 2, 3];
      Math.max(...a); // 3

If you use that operator in parameters, it's _rest_ (i.e. variadic stuff).

      function sum(...numbers) {
        return numbers.reduce((a, b) => a + b, 0);
      }
      sum(1, 2, 3, 4, 5); // 15

</comment></comment><comment><USER56> I recently started learning JS, and now I am confused between TS and babel. Can anyone give me a reason why I should use either of the two and when I should use either of the two?

<comment><USER57> TS adds a complete static type-checking system, and also will compile down your bleeding-edge JS language features into supported syntax.

Babel will do the second part.

<comment><USER56> Thank you!

</comment></comment></comment><comment><USER58> Anyone knows any good resources to learn typescript? The tutorials on the official site are really... bad. Like I would not even call them tutorials.

<comment><USER59> I really like the video courses on egghead.io: [https://egghead.io/technologies/typescript](https://egghead.io/technologies/typescript)

You do have to pay for some of them, but there's some free ones as well.

</comment></comment><comment><USER60> another anecdote - ive been using TS2.1 for the last month on three interconnected projects - a rest api, an express app and also for client side code in that express app - it has been a great experience. async/await is a godsend and @types/ makes what used to be a terrible process much more streamlined and easy. If you have to write JS, typescript is the best way ive ever found.

</comment><comment><USER61> Still no VS 2013 support? We're stuck on 1.8 for a while. It would be great if they supported VS 2013 at least until they release 2017.

<comment><USER62> So this is totally a hack, but have you tried changing the manifest in the VSIX (it's just a zip file) and seeing if it installs?

<comment><USER61> The official installer seems to be an exe, not a vsix, moreover VS2015 requires update 3 so there's probably more to it than just a manifest hack.

<comment><USER62> Ah, bummer. Just a thought. =(

</comment></comment></comment></comment><comment><USER63> Awesome! Been waiting for this for a long time! It's pretty interesting how much code gets generated for just async function() {} :)

</comment><comment><USER64> The noImplicitAny flag just doesn't make sense. You changed the new default behaviour to be the thing you don't recommend?

<comment><USER65> `--noImplicitAny` is the recommended flag. It is not set by default to ease the use on JS code bases.

The new changes makes `--noImplicitAny` require less type annotations; where the compiler can figure out the type of a variable through following the control flow.

</comment></comment><comment><USER66> I'm getting a 404 on this. Anyone else?

<comment><USER66> nvm. After a couple of tries it's working again

</comment></comment><comment><USER67> Seems like a great foundation to build something like F# type providers on top of.

</comment><comment><USER68> I feel that the lookup types and mapped types are dependent types, am I right?

</comment><comment><USER69> Dart 1.21 is out today too - with generic methods support news.dartlang.org

</comment><comment><USER70> Been a Linux developer for ages C# was never my taste, I'm still a bit Microsoft-hatred as of now(Visual Studio Code is the only item I adopted for JS development, the rest languages I still use vi/Geany). How tightly TS is related to C#? That has been the main reason I had not tried TS seriously so far. Don't want to have anything to do with C#. I know...

<comment><USER71> Once sometimes asked me "Isn't Typescript a language for C# developers that don't know JavaScript" It's unfortunate that people think that TS is similar to C# just because it came from Microsoft. Flow language is like 80% similar to TS, but no one says it's similar to C#.

TS is just JS + new features from future JS specification + optional type system. And optional type system is fundamentally different than the one in C#, and it was designed to fit well with JS patterns and idioms (structural vs nominal type system)

If you look at TS code that looks like C#, it's because JS looks like that (classes syntax, classical inheritance, lambda syntax - it's all ES7 (or ES2016/ES2017, or whatever it's called now)

<comment><USER70> Thanks. That makes me feel better and I will give TS a shot this holiday.

<comment><USER72> You won't look back! Will look down at others even!</comment></comment></comment></comment>


Three.js Interview: Online 3D Modeling and Rendering With Clara.io - <AUTHOR> http://learningthreejs.com/blog/2014/05/07/threejs-interview-online-3d-modeling-and-rendering-with-claraio/

<comment><USER2> tl;dw - "Google Docs for 3D models", Web-based 3D modeling app/service with concurrent editing and lots of nice features. Uses Three.js internally but also good for producing assets for Three.js apps.

I hope this also advances Three.js for content production, and helps tilt the scale in the open web apps/libs direction (vs insulated Unity+emscripten and Unreal+emscripten blobs).

<comment><AUTHOR> Nice summary. Thanks!

It does both 3D modeling and rendering.

Feature summary on landing page: [http://Clara.io](http://Clara.io)

Example scenes: [http://Clara.io/library](http://Clara.io/library)

User base: +50,000

Status: Pre-release, open beta started in November 2013

Funding: Self-funded with one angel (former Autodesk SVP in charge of Maya, 3DS Max, Softimage -- desktop equivalents.)

<comment><USER3> Really solid work, I was surprised to see how complete this is, especially compared to Blender. I need to render some scenes soon, importing existing OBJ's and adding new materials. I was going to be using Blender, I'll first give clara.io a try!

One question, sent a ticket already but wouldn't mind an HN bump... I couldn't get 'Render > Render Current Pass' menu option to show? Kinda miss that big green "render now" button.

<comment><AUTHOR> Thanks for the positive feedback. We are pushing really hard on the features and also performance right now.

Sorry about the missing menu. We will have that menu back in the next week. :) Rendering options are still in flux as we technically haven't officially released that feature -- we've just soft launched it in a tentative state.

Right now you render via "Live Render > Fast Preview" in the viewport menu. Full information here:

[http://clara.io/learn/user- guide/rendering/rendering_basics](http://clara.io/learn/user- guide/rendering/rendering_basics)

</comment></comment></comment></comment><comment><USER4> Impressive work!

I'd love to see Google Doc's revision history applied here so I don't have to worry so much about losing my work.

As a coder who does 3d modeling, I've always been irked by the lack of version control in the modeling world (Airplane_013a.mel - what was in this file?). Git worked ok and github is doing some interesting stuff with STL file previews but it's still very disruptive to the creative flow. Again I'm super impressed and this is just a suggestion that might bring us 3d modelers out of the dark ages of file management.

<comment><AUTHOR> > I'd love to see Google Doc's revision history applied here so I don't have > to worry so much about losing my work.

We store all changes as diffs. :)

[http://clara.io/learn/user- guide/basics/interface_overview/h...](http://clara.io/learn/user- guide/basics/interface_overview/history)

Technically we can restore any version of the file that you want or tag revisions (like you can tag code revisions in Git.) We have not yet exposed this in the UI though.

<comment><USER4> Fantastic! I did a quick one over of the docs but didn't think to look there.

</comment></comment></comment><comment><USER5> If there's anyone from Exocortex here -- I'm extremely interested in the diff based versioning system you guys have incorporated. Was it done entirely in- house or is it based on any existing tools?

 _Amazing_ work.

<comment><AUTHOR> I'm here. :) It is a fully custom system. Ping me at email@example.com if you want to chat more.

</comment></comment><comment><USER6> I can't find any details about prices? All I could find was that it is freemium.

<comment><AUTHOR> We do not yet have prices. We have designed this to be a low cost service though.

<comment><USER6> are modeling features like boolean operations calculated on server or client?

<comment><AUTHOR> Most operations are client side so you can model very quickly and the server catches up even if you are on slow connections.

Right now Boolean operations are also client side, this allows for things like this animated Boolean scene (press play):

[http://clara.io/view/86e0579a-4dc8-4145-81a8-6ad9f765b30b](http://clara.io/view/86e0579a-4dc8-4145-81a8-6ad9f765b30b)

We may be introduce server side Boolean operations that are more robust, but less flexible. There is a limit to the complexity of the code we can run client side and the best Boolean algorithms are actually really complex/costly and thus hard to easily execute in the client.

<comment><USER6> I know that boolean operations are cpu-intensive. I dealt with CAD modeling and especially with NURBS surfaces in the past. Therefore I asked.

I think of building an Html interface for opencascade.</comment></comment></comment></comment></comment>


Uber Eats in Australia forced to amend contracts with restaurant owners - <AUTHOR> https://www.abc.net.au/news/2019-07-17/uber-eats-amends-unfair-contracts-accc-probe/11316714 <comment><USER2> Is almost all big size tech startups effectively focused on becoming modern day cartel under the guise of improving the world?

</comment><comment> bash-j The thing I don't understand is 35% commission fees to the restaurant + $5 delivery + fees to the delivery driver. I'm guessing payment processing would be a few percent, but what makes up the rest?

<comment><USER3> It depends on user behavior. If the average Uber Eats customer opens the app then decides on a restaurant and not the other way around, Uber has a lot of bargaining power. It can tell restaurant owners "hey, you won't make this revenue without us, so we'll charge 35%. This is our access fee for that dollar on the sidewalk."

The restaurant can say "screw you and your high fees, we'll exclusively use [Grubhub clone] instead," but they will most likely lose the Eats customers. Theoretically, in the long run, large platforms should compete more on price and extract less from customers and restaurants. This will only happen if customers migrate to a lower cost competitor.

There are two hurdles to price competition. One is that platforms are sticky and have psychic switching costs. The other problem is that customers don't observe the fees which are charged to restaurants. They don't know how much of the menu price reflects the cost of actual food vs. how much is Uber's merchant fees.</comment></comment>


We're getting closer to AI doctors - <AUTHOR> https://www.axios.com/artificial-intelligence-medicine-doctors-algorithms-604f44b1-eb96-4250-91d3-7f72c5037163.html <comment><USER2> What needs fixed is the doctor visit.

How much could be done with a minimally licensed person doing most of the basic stuff.

1\. look,listen to eyes ears, throat, heart, lungs - digital camera tied to a special lenses, or audio recording device

2\. strep test - seriously I watch the my doctor swap my throat and put it in a little tub and shake.

3\. taking blood - why do I need a doctor visit.

A lot of that could be charged a lot cheaper. And free up doctors, nurses for other tasks.

<comment><USER3> > 3\. taking blood - why do I need a doctor visit.

Pricing this out, it's almost cheaper and easier to just get an order online that you can have handled at Quest and pay out of pocket than it is to deal with the hoop-jumping and co-pays that insurance requires. That's what I've started doing, because I know what I need done, and that way it takes me about 15 minutes on a lunch break, as opposed to eating up part of two days, scheduling an appointment to convince a doctor to order it and then having to go to a lab to actually get it done.

The other one that enrages me is the difficulty of getting drugs for common ailments that aren't sold over-the-counter. If I have bronchitis or strep, a zithromax pack will knock it out immediately, or if I get into poison ivy badly, I'm going to need some prednisone, but I can't just buy those, I need to have the gatekeeper sign off. I can probably go down to the pet store and buy them for my dog, though.

</comment></comment><comment><USER4> These are the sorts of developments that will help reduce the need to ration healthcare, and there is great value in its advancement and deployment being accelerated.

</comment><comment><USER5> "It's not unrealistic to think that 80% of what doctors do will be replaced by algorithms and artificial intelligence. The idea, evangelized by venture capitalist Vinod Khosla two years ago, is that machines can more accurately diagnosis us — and that will reduce deadly medical errors and free doctors up to do other things."

So, we're not going to have AI doctors per se, just doctors will have many AI tools to aid them in CARING for people. That seems like a good thing to me, but the headline itself is not accurate based on the text.

</comment><comment><USER6> They should already be here. But I recently learned that our "enlightened" government decided to outlaw computer programs from making medical diagnosis.

<comment><USER5> Do you have a source for that? Which government/officials are you referring to?

<comment><USER7> I would also like to read the text of the law that forbids this.</comment></comment></comment>


Ask HN: How did you transition yourself from Software Developer to Business? - <AUTHOR> <comment><USER2> Largely dependent on what you mean by "business man", but going from dev to sales can be as easy as transitioning to a sales engineering / solutions architect role and getting exposure to closing deals that way. The next leap you'd make is figuring out how to get into a closing role; which will take a little patience in order to find a good fit (namely: a company willing to put someone with engineering experience in a closing role -- they're out there!).

If you mean other parts of the business (operations, finance, BD, etc), the pattern is probably similar -- find a technical role that's in that org and start there, with the intention of moving into the business side more and more.

If you mean "I'm a software developer and want to understand the business side of running a company better", there is a ton of reading you can do to learn how businesses work. Some books that were helpful to me:

      * The 4 Steps to Epiphany by Steve Blank
      * How to Win Friends and Influence People by Dale Carnegie
      * The Personal MBA by Josh Kaufman
      * The E-Myth Revisited by Michael Gerber
      * Venture Deals by Brad Feld

Ultimately business skills are gained the same way you'd learn software skills -- self-study combined with exposure to the problems you're interested in solving.

</comment><comment><USER3> One place you can start that is not so far away is making a transition from code to the product. The good news is you don't really need anyone's permission to do this since you are close to the product already.

A lot of developers focus on the "what" and "how" because that is the bulk of their job. Start looking at the "why". Start asking questions when you don't understand the "why" - being careful to present yourself as curious rather than sceptical. Try to understand the motivations behind decisions, and the trade offs that are often required.

As you become a master of the product - again not just what you're building but why - you'll likely find yourself with opportunities to contribute much more in the business side.

</comment><comment><USER4> I went the other way - I was a business grad and transitioned to a software developer. IMO the soft skills are important no matter what. To be a real thought leader in business it's important to step away from the work and trying to think about the problems you're facing (people problems for example) in lateral ways. A lot of very technical people have a hard time stepping away from the work IMO. You just need to trust people to do the best work that they can. There is a great quote from Steve Jobs: "It doesn't make sense to hire smart people and tell them what to do. You hire smart people and let them tell you what to do."

</comment><comment><USER5> I had a college degree in business, but as a contractor I started saying yes to more work than I could handle myself which forced me to hire contractors.

As others mentioned, you have to stop writing as much code and start QAing or PMing more which takes practice.

But the short answer is, don't turn down work and be prepared to work a ton while you're still part time coding and part time managing.

</comment><comment><USER6> It is hard. I still struggle with this myself. The first thing you have to do is stop writing code. You have to get comfortable letting someone else handle that side of it.

You have to learn to focus more on sales, marketing, and growing the company... not little details about the code.

</comment><comment><USER7> I moved into testing and requirements gathering, learned as much as I could about project management and ultimately got an MBA.

</comment><comment><USER8> Volunteered to help my company bid on projects and run them.</comment>


Support Tor and Intellectual Freedom in Libraries - <AUTHOR> https://act.eff.org/action/support-tor-and-intellectual-freedom-in-libraries <comment><USER2> A key point is this one:

\----

Faced with police and city concerns, library director Fleming agreed to turn off the Tor relay temporarily until the board could reconsider. "We need to find out what the community thinks," he said. "The only groups that have been represented so far are the Police Department and City Hall."

\----

The library's board and staff haven't heard from anyone but law enforcement / government ... so without other viewpoints offering another view they are at least temporarily bowing to that pressure.

Now, living in NH and knowing how our local politics work, I'm not sure exactly what a massive online petition is really going to accomplish. If anything, it may just rouse animosity within the local community. (We take "Live Free or Die" pretty seriously here - and that includes being free of outside forces trying to push us to do something!)

What really needs to happen is for some citizens of _Lebanon, NH_ to provide an alternative view to the library board.

</comment><comment><USER3> We are trying to encourage a very brave small town library to do something important, legal and slightly subversive.

It isn't often that signing an internet petition makes much of difference but this might be the one time.

</comment><comment><USER4> EFF claims that "In mid August 2015 the Boston office of the US Department of Homeland Security contacted the Portsmouth and Lebanon Police Departments to warn them, falsely, that Tor's primary use is to aid and abet criminal activity."

Does anyone have a source for this claim?

<comment><USER5> Also to be fair, is it proven that Tor's most popular use-case is something other than criminal activity? I know there are legit uses for Tor certainly, but it wouldn't really surprise me if criminals were the primary users

<comment><USER6> Criminals are numerically the most common Tor users. But the difference is that what's "criminal" depends on your place of residence.

In America Tor is mostly used (other than as a curiosity) for drugs and child porn. The former I could care less about, while the latter is indeed creepy. It's also occasionally used for private communication with journalists, a numerically less common use but a politically critical one. While I strongly detest child porn, I equally detest drug prohibition and journalist and whistleblower harassment/censorship.

In Iran? China? Saudi Arabia? Russia? In places like that Tor is used for dissident communication and private correspondence with people overseas. In those places public opposition to the ruling regime can itself be a crime.

There are also authorities including police and intelligence personnel who use Tor -- very ironically to hide from criminals. For example, an undercover cop might use Tor to hide their correspondence with the police from digital snoops in the employ of a criminal organization they are infiltrating. Some organized crime outfits are very sophisticated, making undercover work actually require a degree of 'op-sec' on the part of the agent. Compromise can be fatal.

Tor is a gun. Criminals use guns but so do police, hunters, and people legitimately defending themselves. In America you could probably defend Tor and other crypto tools on second amendment grounds.

<comment><USER7> Please provide sources to support your argument.

Edit: Why would I be modded down for asking someone making claims (questionable ones at best) to provide sources?

<comment><USER6> Try this:

[http://geekslop.com/2015/catching-pedophiles-running- secret-...](http://geekslop.com/2015/catching-pedophiles-running-secret-dark- web-tor-honeypot)

"... First, the pedo site saw magnitudes more traffic than the counterfeiting or drugs websites – in the order of 100 times more traffic than the other two combined. ..."

BTW I wasn't arguing that Tor itself is bad, just refusing to engage in the common denialism one sees among crypto and Tor advocates in claiming it has no bad uses. The truth is that many things have negative uses: guns, knives, security systems, Bitcoin, crypto, fireworks, spray paint, alcohol or virtually any drug, explosives, drones, cameras, etc. All those things have positive uses as well, and it's ultimately the user who is responsible for how they are used. Pedophiles use SSL too, should we ban that?

As far as police and intelligence agency use of Tor, look up some of the talks by the Tor founders in which they cite examples of these uses. In addition to undercover use, Tor is useful for law enforcement to hide their network location while investigating potential criminal sites online. Otherwise a site might easily see that the traffic is coming from a police or .gov site.

<comment><USER8> Traffic to hidden services makes up a tiny fraction of the overall use of the Tor network.[0] Any conclusions drawn from that use is highly skewed, and cannot be used to draw conclusions about Tor itself.

[0] [https://blog.torproject.org/blog/some-statistics-about- onion...](https://blog.torproject.org/blog/some-statistics-about-onions)

</comment></comment></comment></comment></comment></comment><comment><USER9> Holy shit, I live pretty close to Lebanon and had no idea their library was doing this! I'll have to check out any public hearings (if there are any).

</comment><comment><USER10> Libraries are struggling enough, so I am not sure the inevitable complications of running a Tor relay will be helpful.

<comment><USER8> Libraries struggle for relevance in the public eye. Contributing to Tor and other technical projects helps that.

<comment><USER7> Exactly. It furthers the spread of information which is a core goal of the library. Check out the freedom to read statement: [http://www.ala.org/advocacy/intfreedom/statementspols/freedo...](http://www.ala.org/advocacy/intfreedom/statementspols/freedomreadstatement)

Further, the Core values of the ALA address these points as well;

"Intellectual Freedom We uphold the principles of intellectual freedom and resist all efforts to censor library resources. ALA Policy Manual, B.9.16 (Old Number 54.16) ( ALA Code of Ethics, Article II)"

"Social Responsibility

ALA recognizes its broad social responsibilities. The broad social responsibilities of the American Library Association are defined in terms of the contribution that librarianship can make in ameliorating or solving the critical problems of society; support for efforts to help inform and educate the people of the United States on these problems and to encourage them to examine the many views on and the facts regarding each problem; and the willingness of ALA to take a position on current critical issues with the relationship to libraries and library service set forth in the position statement. ALA Policy Manual, 1.1 (Mission, Priority Areas, Goals)"

Source: [http://www.ala.org/advocacy/intfreedom/statementspols/coreva...](http://www.ala.org/advocacy/intfreedom/statementspols/corevalues)</comment></comment></comment>


Startups that have just raised their first big institutional round - <AUTHOR> http://www.yodas.com/hyper <comment><AUTHOR> I'm happy to introduce you all to Yodas Hyper - a list of silicon valley startups that are about to grow fast.

Working with hundreds of fellow developers we discovered a common trend: There are many talented individuals with deep desire to make a significant impact but struggle with how to put their desires into action. A common theme is the openness to take a small risk for an exciting mission and take a meaningful role in the creation of something new.

Hyper is a list that get updated on a weekly basis with companies that match the following criteria:

\- Raised Series A funding \- 25 employees or less \- Based in San Francisco Bay Area

To dive deeper to the thinking process behind the criteria, check this post - [https://labs.yodas.com/the-story-behind-yodas- hyper-47d3151d...](https://labs.yodas.com/the-story-behind-yodas- hyper-47d3151d04b1#.suubxn82q)

Happy to answer any questions anyone has. Also, I would love to hear what kinds of companies lists you think would be interesting .. ?

Nir

<comment><USER2> I don't like the San Francisco-only bend. Your title is "Smart Career Bot for Developers," it doesn't mention anything about how location-specific it is (same with the name of this HN thread). Not everyone can relocate and there are plenty of hyper-growth startups worth promotion that are not in SV (Boston, New York, Austin, LA come to mind).

<comment><USER3> Long Beach and Costa Mesa are in Southern California.

</comment></comment></comment><comment><USER4> > Massive, multiplayer video game technology meets the indoor cycling > community.

So that's how episode 2 of Black Mirror started.

<comment><USER5> :(

</comment></comment><comment><USER6> How does Verse differ from Venmo? I'm sure there's something substantial (due to the ~10MM in funding) but I couldn't find it.

Edit: just found it - it's pretty much the same thing but targeting the European market because Venmo hasn't expanded there.

<comment><USER7>
      I'm sure there's something substantial (due to the ~10MM in funding)

Heh.. Right.

</comment></comment><comment><USER8> While this list made me fear for the future of humanity, it also made me click over to the Crunchbase list, which is more useful and less soul-crushing.

[https://www.crunchbase.com/app/search/funding_rounds](https://www.crunchbase.com/app/search/funding_rounds)

<comment><AUTHOR> Hey Biztos, why do you think it's better? I would love to know so we would do better in the future...

Check the logic behind Hyper as it might explain the list better - [https://labs.yodas.com/the-story-behind-yodas- hyper-47d3151d...](https://labs.yodas.com/the-story-behind-yodas- hyper-47d3151d04b1#.ybh09rqmc)

<comment><USER8> Hey Nir, late reply but: based on the names and (self?) descriptions of the startups I found it a bit of a downer to think of these being the hot new pre- unicorn wondercompanies. And the Crunchbase list, while a bit annoying with its upgrade hard-sell, has a lot more information that would be useful in figuring out what a company's about, where its money comes from, and how useful it might be for a serious hacker to ask them about jobs.

As to the Hyper-Yoda idea itself: I'm sure your selection is quite useful to some people -- junior developers? programmers having trouble finding jobs? the recently laid-off?

My only criticism of your site per se is that you use a lot of hand-wavy buzzwords while not showing a lot of useful data.

"Crazy" growth? "Solid" engineering/academic background?

Good luck with the list, in the best case it could be an important connector between these young companies and the programmers they hire.

</comment></comment></comment><comment><USER9> Wow...$1499.00 for a "tea infuser with advanced algorithms" (Teforia). I love my Darjeeling tea very much...but...not sure if that much...

<comment><USER10> It's the solid academic background you're paying for.

<comment><USER5> Don't forget the courage.

</comment></comment></comment><comment><USER11> No matter if the predictions are correct or not. This is an clever way to look for startups to join as an early employee (if you want to do that is a different discussion).

@creator: i would also include the next round afterwards for more risk aware people. Alternatively you could look into size of funding vs team size.

<comment><AUTHOR> @andreasklinger - that's a great point of view. We're definitely thinking about creating a similar list for post later funding rounds..

Thank you for the kind words!

</comment></comment><comment><USER12> This reminds me of The Breakout List [https://breakoutlist.com/q2-2015](https://breakoutlist.com/q2-2015), which has unfortunately not been updated since 2015. The filters were broader than the ones you picked: geography was US (though predominantly SF and the bay area), and they focused on companies' revenue run rate, which I would favor versus receiving money from investors.

</comment><comment> guard-of-terra Half of thay sounds too niche to grow, the other half too vague to ensure success.

<comment><USER13> Facebook was too niche to grow too :)

I try to keep this in my mind when evaluating startups (especially as my potential employer): [http://paulgraham.com/startupideas.html](http://paulgraham.com/startupideas.html)

</comment></comment><comment><USER14> Do you have an RSS feed? On mobile - couldn't check

<comment><AUTHOR> No, Due to the relativel low volume of updates we have a weekly digest. Good enough?</comment></comment>


What should I prepare for before moving to the Bay Area? - <AUTHOR> Hey all,<p>I am an Aussie trying to get my foot in the door
in the Bay Area. My main skills are React / JavaScript full stack. I finished a Bachelor degree two years ago. At the moment, I'm looking  for companies to apply for from Sydney, that way I will have a job lined up. For any Aussies that have done the move in the past, any advice on what I should have do before making the jump? <comment><USER2> Make sure you understand the cost of living. Check the prices for rent ahead of time particularly.

When I first moved to SF, I lived in someone's dining room. Four of us lived in a two bedroom apartment because that was all we could afford. All four of us were/are programmers at large tech companies.

The bay area (SF particularly) can be cold and wet. I moved from Canada to SF and assumed the California was uniformly tropical. The best bay area summers are in September. By January and February, the persistent fog means nothing ever really gets dry. Come prepared or you will be cold.

Good luck on your job hunt.

</comment><comment><USER3> I just moved to the Bay Area from Chicago, so I can provide some general logistics advice. These are the first things that come to mind, but if you have questions, my email is in my signature. Unfortunately, I can't help with the contrast between Sydney & Bay Area culture.

// Living

Lifestyle – the Bay Area experience varies greatly based on where you are. Take the time to find an area that has things, people, lifestyles you're interested in.

Housing – short term options are abundant in the Bay Area, but vary in price and availability by location. HotPads, Craigslist, AirBnb, Padmapper are all great options for finding housing.

Transportation – most of the Bay Area isn't easily accessed by public transportation. CalTrain, BART, and Muni will get you to a general area, but you'll likely need to Lyft or Uber from there.

// Jobs

There are many small startups (<20 employees) that pay well. Don't hesitate to apply somewhere with a seemingly small presence.

If you're finding it difficult to get interviews, recruiting agencies would be a solid alternative. If you're talented and hook up with a good agency, you can find some very good opportunities.

<comment><AUTHOR> Are there any recruitment agencies you would recommend?

</comment></comment><comment><USER4> 1\. Plan your transport time: hint - it may not be driving friendly;

2\. Estimate your rent, insurance and bills. Make that a % of your in-hand salary.

3\. Look for reasonable stores, food and entertainment options.

Optimize for all.

</comment><comment><USER5> Beware that you won't have any credit history in USA and it will be hard to get any credit [card too] initially.

</comment><comment><USER6> Don't. SF is covered in feces, needles, and bodily fluids. There is absolutely nothing to do in south bay except work. The entire area is an intellectually homogeneous, collectivist wasteland.

</comment><comment><USER7> Do you have eligibility to work in the USA already?

<comment><AUTHOR> Nope - but E3 should be easy to get.</comment></comment>


Ask HN: Improving Strengths or Improving weakness? - <AUTHOR>

There is alot of debate about if one should focus on improving strengths or improving weakness.
Such as this article by Jim Taylor, Ph.D., who is a clinical associate professor at the University of Denver.
http://www.psychologytoday.com/blog/the-power-prime/201201/personal-growth-know-thyself-is-the-first-step-life-change
Most people love to talk about their strengths, but don't like to admit that they have weaknesses. I disagree with Marcus Buckingham, the co-author of Now, Discover Your Strengths, who asserts that the way to achieve goals is to focus on your strengths. This approach may work for some parts of your life, for example, a job that involves one or two highly specialized skill sets, such as an accountant or a computer programmer. But most aspects of life require a constellation of competencies, so the "focus on your strengths" model will actually limit your ability to make substantial changes in your life.
Think of your strengths and weaknesses for getting promoted in a new job in, say, banking, as a mathematical equation. On a scale of one to ten, where 1 is very poor and 10 is the best, if you have very good financial analysis skills (8), but you are quite poor at relationship building (2), then your over-all performance would be moderate (8+2=10 out of a possible 20). If you focused on and improve your analytical capabilities (say, from 8 to 9), you wouldn't improve that much over all because you were already capable in that area of your work (9+2=11). But if you improve your relationship skills (say, from 2 to 6), then your over-all performance would rise significantly (8+6=14). Of course, you want to continue to build your strengths, but the more you improve your weaknesses, the better you'll be able to make the changes you want.
Then there was this post by Marc Andreessen where he talked about career planning, he said to focus on continuously developing and broadening your base of skills. He cites 5 skills as examples: communication, management, sales, finance and international.
http://pmarca-archive.posterous.com/the-pmarca-guide-to-career-planning-part-2-sk
Anybody have thoughts on talents, strengths, building skills and how one should go about it ? <comment><USER2> This sounds like a real black-and-white question to describe a very nuanced problem. One shortcoming is that if you use that 1-10 scale to describe your skills in a given area, 1 or 10 are not the building blocks to the most ideal outcomes in all life situations. You may want a certain skill to be a 5 to achieve an optimal outcome.

Take your ability to let your inhibitions go and be the life of the party. If you're a 1, people think you can't hang or be trusted with things, and if you're a 10, it's hard for them to take you seriously (or they feel threatened or upstaged by you).

I'd say someone with a 3 in Java programming and a 8 in networking skills will more often than not financially outperform someone with the scores reversed, even with the job title "Java programmer".

Since we can't always know "a 7 in that skill would've made them offer me a job", nor if that's a one-time disappointment or going to be a recurring one, figuring out where to try to strengthen my skills is more an art than a skill, though I'd like to reach a 10 in that someday.

</comment><comment><USER3> Having done this myself (and mentored a few others), try developing product management skills - it'll force you to grow your business savvy, it'll force you to work with engineers not only on technical stuff but also on management and schedules. You'll eventually work with sales folks, support engineers, and eventually, customers too. And you'll learn to communicate with all these groups. Good luck.

</comment><comment><USER4> I think that ultimately it is a personal decision, and depends primarily on what sort of work you'd like to do.

If you were, hypothetically, a database engineer, and wanted to be the very best database engineer, then you would probably focus on your strengths. By shoring up what you already know, you can become the Michael Jordan of database engineers and command a premium.

The strengths are fairly obvious, in that you are building from a knowledge set you already have, and it might be easier to acquire more of that knowledge in a shorter time.

The cons are that you are at the vulnerability of the strength of the platform. If you were, for example, the best COBOL programmer in the world, the market opportunities are probably pretty slim at the moment (just guessing), but due to that rarity, you might be able to command more until the platform becomes completely extinct.

If you'd prefer to mitigate those cons, or if you prefer being the jack of all trades, then you may be inclined to work on your weaknesses, and start shoring up areas of knowledge somewhat tangential to your core. If you are currently a database engineer, this might mean learning a scripting language to automate tasks, or picking up on enterprise storage technologies to better understand the underlying platforms, etc.

Strengths to this are that you become more well-rounded, but at the expense of being the more thorough specialist.

Jobs may be easier to come by, but may not pay as well due to lack of specialty. In small companies, or more flexible roles, you may have the opportunity to shine more as you can touch on areas outside of your pigeonhole.

Anyway, just my thoughts, and all speak more to a core discipline than broadening skills into marketing, sales, etc., but probably apply to varying degrees.</comment>


Popular Science Writing: A  Challenge to Academic  Cultures [pdf] - <AUTHOR> http://ou.edu/content/expo/brainstorm/jcr%3Acontent/contentpar/download_37/file.res/Erickson-Popular%20Science%20Writing.pdf <comment><USER2> Alexander von Humboldt believed that a scientist never interacts with nature in a purely rational manner, but that there are always emotions involved as well. And those emotions, he said, ought to be a part of the way he communicated his findings.

His philosophy shows in his books. His writing style superbly captures the beauty, awe and grandeur of nature as he experienced it on his South American expedition. The result was a series of books that became bestsellers, because almost everybody could read and appreciate them. At the same time, copious footnotes provided the accuracy and comprehensiveness his fellow scientists needed.

Of course, he also wrote books that were entirely technical in nature, as is perhaps inescapable. But I wish more scientists today would take up the challenge of communicating not just the truth of their findings, but also their beauty.

</comment><comment><USER3> > _Going against an epistemological vein of science, popular science writers > make the discoveries of scientists available to non-specialists by empha- > sizing what academic scientific papers necessar- ily exclude: the human > stories and emotions of the scientists behind the discoveries._

This is a really weird statement. Professors love telling stories about how this-or-that is discovered; there's a downright _attraction_ to the human side. Further, a human story about how an idea came to be can make great reading whether or not the idea turned out to be true in the end - Freud's cases are still interesting, but these days mostly as literature. A fun story might pique your _interest_ in something, but it better not convince you that a theory is true! (i.e. keep your aesthetics separate from your epistemology for a long and happy life.)

So, Feynman's storytelling doesn't go against any vein of science, and even worse for the author's point _aesthetic human stories aren 't strict epistemological resources in any context._ So in that sense the claim seems to miss the way the veins flow in science, and the way epistemology works in general.

<comment><USER4> The key phrase here is "academic scientific papers", which certainly strongly discourage human stories and emotions.

</comment></comment><comment><USER5> I remember at my school students were forced to choose between arts (AKA humanities) and sciences at 16. The science students were on the whole brighter than the arts students, through no fault of their own. The arts teachers tried to sweeten the pill by saying things like, "Those scientists don't understand human beings." The implication was that we were insensitive and callous individuals. Comments like this left a mark on me, a science student, and the rest of my life I've been trying to compensate. And I think it's also one of the reasons science writers do what they do.

<comment><USER6> Saying things like that is just a sign they were insecure and compensating.

<comment><USER7> Actually, there's a bit of 'fire' here, not just smoke. From the harmless stereotypical CS professor who doesn't grok humans, to Zuckerberg's dangerous obliviousness to the humanistic tradition.

The Wikipedia page for the two cultures has an interesting section which maybe doesn't belong there:

"In his opening address at the Munich Security Conference in January 2014, the Estonian president Toomas Hendrik Ilves said that the current problems related to security and freedom in cyberspace are the culmination of absence of dialogue between "the two cultures": "Today, bereft of understanding of fundamental issues and writings in the development of liberal democracy, computer geeks devise ever better ways to track people... simply because they can and it's cool. Humanists on the other hand do not understand the underlying technology and are convinced, for example, that tracking meta-data means the government reads their emails."[12]"

Of course there are well-rounded, humane people in the hard sciences. But it's not a job requirement.

<comment><USER8> >"Today, bereft of understanding of fundamental issues and writings in the development of liberal democracy, computer geeks devise ever better ways to track people... simply because they can and it's cool."

Rubbish. Geeks do it because that's what they can get a job doing.

<comment><USER7> The quotation doesn't reflect my opinions, but I think you are taking an overly simplistic "people are driven by money" line.

It's not unusual to encounter this kind of view expressed on HN, and it's disturbing because it is so reductive. I mean, seriously, you think "geeks" in general have no choice but to build the software that maximizes revenue? Geeks are, if anything, more likely than other people to pursue activities for intellectual satisfaction, to attack difficult problems for fun, etc.

The previous time this came up, someone was claiming that every restaurant owner only cared about their bottom line -- and that absolutely no restaurant owners were in it for the love of hospitality (as a social good or something more professional) and self-expression/self-actualization. Honestly.

<comment><USER8> I don't think people are driven _only_ by money, but if inventing cool stuff doesn't make any, you do it in your spare time after you take someone's money to push ads into eyeballs.

</comment></comment></comment></comment></comment></comment><comment><USER9> > Academia's fracture into a limiting cultural dichotomy has been an ongoing > contemporary meta-discourse since 1959.

Sheesh. You read Feynman and then you write stuff like this.

</comment><comment><USER6> [edited:re read and changed my opinion]

<comment><USER2> I think you missed the point of the article. The author isn't talking about the language scientists use when talking to each other, but about the communication between scientists and non-scientists.

The way we speak and write in the scientific community is optimized for precision and succinctness. Within the confines of a talk or paper, we just don't have the time or the space to go into all the fundamentals of our work. And neither do we have to, because everybody in our audience has spent years of their life accumulating the necessary background knowledge to understand what we're saying.

But when it comes to talking to outsiders, that doesn't work anymore. Whether we are explaining our research to politicians or our grandmother, we need to find new ways to express complex topics. The aim is for the explanation to be readily understandable but not oversimplified. And that is the conflict the author of the article is aiming at.</comment></comment>


Why Are Educators Learning How to Interrogate Their Students? - <AUTHOR> http://www.newyorker.com/news/news-desk/why-are-educators-learning-how-to-interrogate-their-students?mbid=rss <comment><USER2> This is sick, and not the good slang version of sick.</comment>


He Invented the Rubik's Cube. He's Still Learning From It - <AUTHOR> https://www.nytimes.com/2020/09/16/books/erno-rubik-rubiks-cube-inventor-cubed.html <comment><USER2> > Mathematicians later calculated that there are 43,252,003,274,489,856,000 > ways to arrange the squares, but just one of those combinations is correct.

This is only true for cubes that have pictures printed on their faces. Color- only cubes have permutations that can be identical, and therefore correct. See [http://www.alchemistmatt.com/cube/rubikcenter.html](http://www.alchemistmatt.com/cube/rubikcenter.html) for algorithms solving these.

<comment><USER3> ??? Are we talking about a physical cube? I don't think you can have multiple identical permutations; each of the 26 external pieces of a 3x3x3 cube is unique. You would have to somehow have more than one way to get, say, a Yellow-Blue-Red corner, or a White-Green edge for this to be true, no?

<comment><USER4> I believe it's possible for the center faces to be rotated in the solution?

Now it's up to you if you consider that a separate permutation or not. (I don't)

But yeah, every other piece is two or three colors, and therefore has only one allowed orientation in a solved cube.

<comment><USER5> > Now it's up to you if you consider that a separate permutation or not. (I > don't)

This isn't really up to you; it's determined by the method you use to count how many permutations there are.

In this case, I strongly suspect that we count 43,252,003,274,489,856,000 and then may or may not say "but 4,096 of those are equivalent for any given coloration pattern, so divide by 4,096". I would bet we don't count 10,559,571,111,936,000. Unless you have a method that yields that result naturally, you should consider the rotated centers to be separate permutations.

<comment><USER4> > _In this case, I strongly suspect that we count 43,252,003,274,489,856,000 > and then may or may not say "but 4,096 of those are equivalent for any given > coloration pattern, so divide by 4,096"._

I don't think that's true. I went looking for the formula, and found this[1].

They include a term for the permutations of the corner cubes (8!∙3⁸), a term for the edge cubes (12!∙2¹²) and a term for the center cubes (1!∙1¹), then divide that by 12 (2∙3∙2) to eliminate impossible configurations. That term for the center cube permutations seems to agree with my view on it. There's no such thing as "rotation" for a plain colored center cube. It's the same no matter how you look at it.

I think a cube with designs on the center faces will have more permutations than the 43e18 we're discussing here.

[1] [http://b.chrishunt.co/how-many-positions-on-a-rubiks- cube](http://b.chrishunt.co/how-many-positions-on-a-rubiks-cube)

<comment><USER5> > They include a term for the permutations of the corner cubes (8!∙3⁸), a term > for the edge cubes (12!∙2¹²) and a term for the center cubes (1!∙1¹), then > divide that by 12 (2∙3∙2) to eliminate impossible configurations.

But that matches exactly what I said was being done, modulo the particular number and an error in the formula you provide. (It should be 1·1⁶, not 1!·1¹.) You have 4 orientations for each center cube, and then you divide 4⁶ by 4,096 to get 1.

I agree that the way your link presents it, with a glaring error in the term for the centers, suggests that they didn't put any thought towards the centers beyond "they don't and can't change in any way".

</comment></comment></comment></comment></comment></comment><comment><USER6> My favorite class in college was a class on Motion Planning, and I remember using the Rubik's cube as an analogy for discrete motion planning problems. It was a fun way to talk about some of the less common graph search techniques, like iterative deepening. It's also interesting how the graph produced by the transitions of a Rubik's cube is so large, yet so uniform. There are 43 quintillion states, yet each state has the exact same number of transitions: 3 for each face, so 18 in total. And the fact that we actually can reliably search that space even using a relatively dumb graph search algorithm is astounding.

</comment><comment><USER7> Here's how to analyze the Rubik's cube using GAP [1]. For example, they show that you can get any permutation of the eight vertices of the cube. It's a great way to get motivated to learn some group theory.

[1] [https://www.gap-system.org/Doc/Examples/rubik.html](https://www.gap- system.org/Doc/Examples/rubik.html)

</comment><comment><USER8> If you've never learnt the algorithms required to solve a Rubik's cube-- don't. Understanding and solving a cube by brute effort is a great little challenge to come back to over the years.

<comment><USER9> Because once you learn them, you will never unlearn. I took a cube in my hands after some 30+ years break and my hands just instantly knew the sequences...

<comment><USER10> I managed to forget most of them after about 5 years of not doing it. I can intuitively get the first two layers now, but the top seems too difficult without knowing the sequences.

I like messing about with a Megaminx also, and it's the same for that. I can get the first couple of layers just thinking about it intuitively, but then I get stuck on the top layer.

At some point I'll relearn the sequences again, but I haven't yet.

Also picked up a 2x2 cube recently, and that one has me pretty stumped. You'd think it'd be easier to figure out but I haven't figured it out yet.

</comment></comment></comment><comment><USER11> The competitions should be for minimal no of steps/moves. Not the time taken.

<comment><USER12> It is almost the same thing. Less moves means less time to solve. I'm amazed by the performance of robots and people these days at this task.

<comment><USER13> It's not. There's a factor of over 100 between fastest solves and novice solves with a guide.

<comment><USER12> We're talking about competition.

Here is a previous world record solve from 2016, in about 31 moves over 4.73 seconds:

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

You don't _just_ pick that up from a book.

Optimal number of moves is 20, so ~30 is pretty good.</comment></comment></comment></comment>


Right Software:On Time:Without Bug - What do you do if it is not possible? - <AUTHOR> http://setandbma.wordpress.com/2012/09/12/on-schedule-defect-free-right-software/

<comment><USER2> Summary: "compromise on one of them, and that's somehow magically better with Agile."</comment>


Pocket Is Now Built into Firefox - <AUTHOR> http://getpocket.com/blog/2015/06/pocket-is-now-built-into-firefox/

<comment><USER2> And it is a total waste of space and time. As it doesn't work offline it is nothing more than an inefficient bookmarking feature.</comment>