HNHacker News
TopNewBestAskShowJobs

joneil

354 karma · joined May 8, 2012

submissionscomments
joneil··on Ok, let me explain: it’s going to be Angular 4.0
The title "Angular 4 will be the next version of Angular" had me ready to believe they were announcing another breaking change as big as Angular 1 -> Angular 2. (The blog post's title is "Ok... let me explain: it's going to be Angular 4").

It's much more reasonable though: they're committed to using Semver, so even a minor breaking change (like upgrading Typescript) will bump the version number. So they're expecting the version numbers not to matter as much anymore, similar to how you no longer think of the version number of Chrome or Firefox too often.

And so they are asking the community to just call it "Angular", not "Angular 1", "Angular 2" and "Angular 4". I do feel that this will make it harder to search for information, documentation or libraries specifically related Angular 1 though, if Angular 2+ is now just going to be called "Angular", much like all the Angular 1 specific stuff.

joneil··on Ask HN: Good books or articles on UI design?
I also loved his follow up book, "Emotional Design: Why We Love (Or Hate) Everyday Things".

One of the best design books I've ever read.

joneil··on YC and Founders Pledge
Really similar to http://pledge1percent.org/ (with Marc Benioff of Salesforce and Scott Farquhar of Atlassian backing it).

As well as pledging a percentage of your equity, they're also pushing making room to donate 1% of your product and free up 1% of your employee's time to put towards good causes, so that it's part of the culture not just a happy side-effect of a possible exit.

joneil··on Religion without belief
> for the concept of religion to remain a useful cross-cultural category it must be shorn of its Abrahamic assumptions and understood to refer to a range of concepts and traditions that not only cluster around supernatural beliefs, but also practices, like rituals and festivals.

I've been finding it interesting to look even at the Abrahamic traditions - what parts of the ritual / lifestyle / faith are valuable, even if you assume the supernatural claims are bogus?

On this topic I've been enjoying the work of Peter Rollins [1]. One of the points he makes is that often we desire certainty in our beliefs, and feel safe with certainty. And it's interesting to watch someone swing from being certain of the existence of a god, to being certain of the non-existence. What they believe has changed ("A god does exist" / "A god does not exist") but how they believe it is much the same ("I'm sure of this because of _____").

I guess that's the difference between being an (a)theist and an agnostic.

[1] https://en.wikipedia.org/wiki/Peter_Rollins

joneil··on Migrating a 10,000-line legacy JavaScript codebase to TypeScript
You are right that the difference is syntax, but the thing is, JS syntax will always be different from Haxe syntax. You'll never be able to use "jQuery.js" as valid Haxe code, but it is valid TypeScript code.

There might be some interesting possibilities. For example back2dos has an example of Haxe seamlessly integrating with external ".as" files on the Flash target. This could be conceivable for other strict languages like Java or C# too. You might even be able to seamlessly integrate with ".ts" files, because they have some typing information. (That would be a fun project!)

But JS dynamic typing can be pretty crazy, and I'm not sure how feasible it is to be able to infer type information from JS source code without special type hints. It would end up just calling everything "Dynamic", and then you're getting no benefit.

joneil··on Migrating a 10,000-line legacy JavaScript codebase to TypeScript
It is easy enough to expose your classes and types from Haxe into the global namespace [0].

And it's easy enough to require() external JS code and use it seamlessly in your Haxe code.

What's not easy yet is using Haxe to generate small modules, so some modules in your codebase are written in Haxe, and some in JS (or Typescript or anything else). By default Haxe will output one big js file per compilation. The compiler is very configurable, so in theory you could output ES6 modules instead, but I haven't seen it done yet. (Though, there is a generator for outputting your code as AMD modules instead of one-big-JS-file [3], so it's definitely possible). But it's not easy yet, and that's why I think that for now migrating an existing JS codebase to Haxe would be harder than migrating it to TypeScript.

[0]: http://haxe.org/manual/target-javascript-expose.html [1]: http://haxe.org/manual/target-javascript-require.html [3]: https://github.com/explorigin/modular-js

joneil··on Migrating a 10,000-line legacy JavaScript codebase to TypeScript
I've used Haxe in several production projects, and if I'm starting a new code-base from scratch I would pick it again. (I prefer type system, the cross-compilation options, and the meta programming)

But if you're migrating an existing code base, TypeScript has a more obvious path forward. Because TypeScript is a superset of JS, it means that all of the JS files in your project will be compiled by TypeScript as is. And you can add the extra typing information as you go, it doesn't have to be an "all or nothing" transition.

Compare to Haxe, where you have to create a separate *.hx file, with a slightly different syntax. You can either translate all of your code (a massive undertaking), or type external files as an `extern Class`, or just use `Dynamic` (equivalent of TypeScript's "any"). But all of these involve a little bit of work for every single part of your code base, so it's going to add up.

joneil··on Coding without Google
This reminds me of Derek Siver's post about memorizing a programming language[0]. If I start working in a new language or new framework full time, I find it really helpful to be deliberate about learning the things I'll use regularly, to reduce the dependence on Google for common API calls etc.

Like others have said I've found that programming on a flight or long train ride is super productive, especially for starting a new feature where I'm writing fresh code (as opposed to debugging existing code). For some reason I've rarely translated that into deliberately using "flight mode" when I need to focus.

[0]: https://sivers.org/srs

joneil··on The Nit Programming Language
That made my day! Any programming language that has a Beer class (http://nitlanguage.org/doc/stdlib/class_benitlux__src__benit...) in the standard library must be doing something right.

In fairness, dependency management is a difficult problem, and even some mature languages struggle to get it right - I don't blame the nit team for not tackling the problem at this stage. It does make me wonder if there is room for a language-agnostic dependency manager, rather than each language reinventing the wheel.

joneil··on Reason: A new interface to OCaml
I know the Haxe compiler is written in Ocaml, and that's a decent size open source project. I believe Facebook uses it for a number of their programming language related tools too. It seems to gave a sweet spot for writing language parsers and compilers.
joneil··on A Framework for K-12 CS Education [pdf]
I have reason to be optimistic. Over the last few weeks I've been attending "TeachMeets" [1], where teachers, in their own free time, meet up and share 7 minute talks about things they're trying in the classroom.

The number of teachers bring coding into the classroom is way higher than I expected. And not just senior school either: this teacher [2] is teaching coding in K-2 classrooms. So kids as young as 5 years old. And she's not the only one.

What is cool is also seeing some of them talk about exactly what you mention: teaching computational concepts without necessarily getting in to coding. Teachers are figuring out ways to do this, in games, activities, and hands-on projects that kids enjoy. Teaching students computational thinking, and then algorithms. Then when they start writing code, it makes a lot more sense.

Seeing teachers doing all this over the last month has left me feeling way more optimistic...

[1]: https://en.wikipedia.org/wiki/TeachMeet [2]: https://twitter.com/GeekyAusTeacher

joneil··on Show HN: Easiest way to send personalized product updates on-site and in e-mail
I like this! I just signed up to take a look. These were my questions before signing up, so I guess you'd say it's feedback on your landing page:

The website is really clear about how it works and looks for end users (and it looks really good). How does it work as the developer? Do I tell SYBG which features there are through an API? Through a web interface?

Do I use a JS snippet to make it appear on my site? How do I control where it shows up? How do I control the styling? How do I let you know which user is logged in and what their email address is?

Some JS snippets (or screenshots of the web interface) would be helpful.

Looking forward to having a play with it!

---

Edit:

Now that I've logged in and signed up all those questions are answered. I'd consider including some of this on your landing page, because the implementation time will probably be less than 5 minutes... knowing that would make me less likely to bounce.

For anyone wondering, the answers are:

- There's a simple JS snippet for identifying users

- You write new release notes in the SYBG website

- After you post a release, new users will see the release notes when they log in. If they don't log in for 14 days (configurable) we'll shoot them an email.

- Emails are sent with Mailgun. I use Mandrill... would love it if you support both (or generic SMTP) so I don't need two different outbound mailing accounts.

- The on-site alerts pop up either at the top of the screen, or in a `<div id="sybg-notification"></div>`. The link to view the FAQ on how to customise the look and feel is broken, so still not sure about that.

joneil··on Show HN: ReactNativeAutoUpdater – support dynamic updates for React Native apps
As somebody building my first react-native app at the moment, and planning to submit to the app store this week - thank you!

2 questions:

1. If you don't ask the user to update immediately after it is downloaded, when will the update apply? The next time the app is opened?

2. Is it possible to handle events around the update process from from Javascript? (For example an `onBeforeUpdate` or `onAfterUpdate` event.)

joneil··on FastMail is not required to implement the Australian metadata retention laws
Wow that CloudFlare link is pretty damning. It's interesting contrasting that to both sides of politics trying to talk up the "innovation economy".

To your credit, I'm in Melbourne too and have always thought Fastmail was really snappy, which I assumed was due to Australian servers. So it looks like I was wrong, and your Jmap strategy is right.

joneil··on FastMail is not required to implement the Australian metadata retention laws
The post is from April, I'm reposting this because it's even more relevant now, with Australia's data retention due to take effect next week.

As a founder of an Australian startup that facilitates communication it's interesting to hear that using international hosting seems to bypass the requirements. IANAL etc. As the post mentions this is a pretty good way to discourage investment in local tech infrastructure.

Previous discussion : https://news.ycombinator.com/item?id=9345935

joneil··on NZ Flag Referendum – Pseudorandom Numbers in Legislation
The first result suggests announcing your move, and following through, gambling that most people think you are lying. In the last 10 years I've only ever played scissors, and I usually tell people ahead of time, and I still win about half the time.
joneil··on A testing system for catching visual regressions in Web applications
Thanks for the links! Both really interesting projects. I think I'll try dpxdt out first.
joneil··on A testing system for catching visual regressions in Web applications
This looks pretty great. I'm guessing it's abandoned because they're using something better now? Does anyone have recommendations on a similar tool?
joneil··on Haxe 3.2.0 released
For me personally, it's being able to focus on one language, and one standard library, and be able to re-use that skill-set everywhere. Whether I'm working on a server-side web app, a client side JS framework, a CLI tool or a mobile game, I can use the same language, same libraries, same idioms, but a completely different target platform.

In my work I've targeted JS (browser), Neko (server), JS (server), JS (node-webkit), C++, Java and Python - all using the same language / standard library. It means my brain doesn't have to switch gears as often when I need to make something to run on a different platform / technology. Plus there is a huge amount of code re-use you can achieve across platforms.

You can get something somewhat similar with JS thanks to Node (targeting client + server + CLI), but I find Haxe a much nicer language to work with - both for Object Oriented style code and more functional style code. The GADTs, "Abstract types", and meta programming (macros) are all features I think Haxe implements in a more well thought out way than other compile-to-JS languages.

joneil··on Show HN: Today We Learned
Thanks for the feedback - I'm glad you see the value in it.

It'll be free for schools worldwide. If we get enough interest in a particular region we'll look for a local organisation to partner with, like RAC has here in Australia. (My co-founder and I are big believers in helping businesses find sustainable/effective ways to invest in education).

joneil··on Show HN: Today We Learned
Thanks for the advice, I really appreciate the detail you've given. I'll take some time to more carefully test the copy with people not already familiar with the product.
joneil··on Show HN: Today We Learned
Maybe the landing page isn't obvious enough. It's a 60 second update per class, not per child. There's the option for teachers to send an individual message to a specific family, which of course will take some more time, but most of the time our pilot teachers just focus on the class update.
joneil··on DemocracyOS
I think this is great - it's an attempted solution to an important, difficult problem, and they've got a number of interesting angles. In particular I think the branching of proposals, and hopefully being able to diff / blame, could be as important, or more important, than trusted voting.

I look forward to seeing more of the implementation. Congrats on the launch, and thanks for working on a difficult problem that we all need to see solved.

joneil··on Programming is terrible – Lessons learned from a life wasted (2013) [video]
I'm sorry about your friend... That is devastating. Hope you're okay.
joneil··on A success story for Haxe
Haha, I was the one that wrote that example for the homepage. It was never meant to be a comment on the ideal data structures for different use cases. Rather it's just there to give developers a taste of the syntax: there's more semicolons and brackets than Python, less explicit typing than Java.

If you have an example of a better code sample for introducing language syntax, I'd love to see it so I can learn from it.

joneil··on FastMail app for iOS and Android now available
Done, thank you!
joneil··on FastMail app for iOS and Android now available
On Android I keep getting "Sorry, legacy Guest/Member accounts are not supported. Please upgrade your account to use the FastMail app". I only signed up a few months ago, and can't find any options for an upgrade. Help?

(p.s. Excited to try it out!)

Edit: I am using a custom domain (a few different business accounts) if that is relevant.

joneil··on Push API – W3C Working Draft
It's good to see this in the works. Some of the apps I build are simple enough that a web-app is sufficient for almost everything, except that users really want push notifications. If this API becomes implemented (widely enough) that's one less thing we need PhoneGap and friends for.
joneil··on Show HN: Automate the way you keep your girl happy
I don't think this is the case for everyone. With my wife and I, I'm great at expressing loves in some ways (time together, helping out, general affection) but gift giving is not one of them - I never really got excited by gifts, I never think about buying them, and I always choke when I have to go shopping for a gift. I'm not a good gift buyer.

Having said that, the few times I've gotten gifts, my wife loves it. If there's a service that helps me a) periodically remember that giving gifts is a thing that guys can do, and b) suggests a few good options, from which I can choose the most appropriate for my wife, why not?

The romance of gift giving is in that the person took deliberate effort to brighten your day. If that effort involved asking somebody else to help me out, because I want to surprise her with something I'm not good at on my own, then that is still thoughtful / loving / romantic - I'm still doing it because I'm thinking of her and wanting to show love.

I'd be interested to use this once it launches.

joneil··on Revenge of the Types
Adding to all the other answers, here is what Haxe can do:

    class Metric {
        static function main() {
            var coinRadius:Millimeters = 12;
            var myHeight:Centimeters = 180;
            var raceLength:Meters = 200;
            var commuteDistance:Kilometers = 23;

            diff( coinRadius, myHeight ); // 1.788 meters
            diff( raceLength, commuteDistance ); // 22800 meters
            sum( commuteDistance, coinRadius ); // 23000.012 meters
        }

        static function diff( a:Meters, b:Meters ) {
            var d = Math.abs( a-b );
            trace( '$d meters' );
        }

        static function sum( a:Meters, b:Meters ) {
            var s = Math.abs( a+b );
            trace( '$s meters' );
        }
    }
And the best part is, at runtime those are all floats. Take a look at the compiled JS code:

    (function () { "use strict";
    var Metric = function() { };
    Metric.main = function() {
            var coinRadius = 12;
            var myHeight = 180;
            var raceLength = 200;
            var commuteDistance = 23;
            Metric.diff(coinRadius / 1000,myHeight / 100);
            Metric.diff(raceLength,commuteDistance * 1000);
            Metric.sum(commuteDistance * 1000,coinRadius / 1000);
    };
    Metric.diff = function(a,b) {
            var d = Math.abs(a - b);
            console.log("" + d + " meters");
    };
    Metric.sum = function(a,b) {
            var s = Math.abs(a + b);
            console.log("" + s + " meters");
    };
    Metric.main();
    })();
The compiler takes care of all the conversions for you. To see the complete compileable example, including my type definitions for each unit, take a look at this gist: https://gist.github.com/jasononeil/b6b1845824f45f5d19df

And the manual on abstract types: http://haxe.org/manual/abstracts

← PreviousPage 2 of 4Next →