HNHacker News
TopNewBestAskShowJobs

jashkenas

26,570 karma · joined March 19, 2007

submissionscomments
jashkenas··on Announcing CoffeeScript 2
Bingo. Remember when you first first learned the ternary operator syntax? I recall thinking something along the lines of, "Wow, that's cryptic!"

    result = if condition then success else failure
jashkenas··on Announcing CoffeeScript 2
I'm afraid you're a few years too late!

https://github.com/jiangmiao/toffee-script

jashkenas··on Announcing CoffeeScript 2
It most certainly is. Thanks, mods!
jashkenas··on Announcing CoffeeScript 2
From the perspective of how it was intended to be used, you've got it exactly right. Just because you can implicitly return a braceless object, doesn't mean you should.
jashkenas··on Announcing CoffeeScript 2
From roughly sketched map to marriage, it's all archived on Instagram. But I'm afraid there's nothing more than that written up ... yet.
jashkenas··on Announcing CoffeeScript 2
Nothing too spectacular, I've got enough Spanish to talk through all of the border crossing paperwork comprehensively, which helps avoid problems with papers down the line.

You have to get a temporary import/export permit and country-specific insurance every time you cross a border. I ended up crossing 33, so that's plenty of paperwork to potentially get fouled up on. And in some countries checkpoint cops love busting gringos for their paperwork, because if they're missing something mandatory, that's easy money.

I screwed up the US/Mexico border first by not having done my research. Crossing from Presidio to Ojinaga, I made sure to get Mexican insurance, but didn't think to set Banamex bond for the temporary import permit — not required in the border zone, so the customs officials don't mention it. I didn't have it, and if any official in the length of Mexico had asked me for my paperwork (despite passing multiple checkpoints), that would have been full legal grounds to seize the bike. But I made it to the Guatemalan border trouble-free, and the customs exit officer nailed me for it there. "It's easier if you just pay me the fine." Around $50, I think. I got change from his wallet.

The second not doing my research screwup was not bringing my original title document to the motorcycle with me, just some color photocopies. In most cases, copies are fine — after all, we don't drive around with our titles in our glove boxes. But leaving El Salvador, at the Honduras border, a cop in front of the immigration building decided to make an issue of it. "I'm sorry, but without the original title document, there's nothing that can be done." After about half an hour, with some help from a roadside border-crossing fixer (there are many on the El Salvador / Honduras border, because these situations are notorious there) and a little over $200, the bike and I were through.

Of course, the first thing I did after arriving in Choluteca, Honduras, was to head over to the police station and file a false report, saying that I had left the original title in the top bag of the motorcycle and someone had stolen it, along with a few other miscellaneous documents. When getting yourself out of paperwork trouble, an officially stamped police report is as good as gold. From that point on, at any border where the photocopied title wasn't good enough (Peru, in particular, gave me a really hard time about it), I could show them the police report, show them that the VIN on the report matched the VIN on the photocopied title matched the VIN on the bike, and we were good to go.

Like I said, not NYT-standards behavior.

jashkenas··on Announcing CoffeeScript 2
It didn't.

Although Geoffrey and folks considered a rewrite of the compiler along the lines of Michael Ficarra's CoffeeScriptRedux, they decided it was more pragmatic just to work with the existing compiler and get it to produce Modern JS instead of the Lowest-Common-Denominator JS it previously output.

A wise choice, especially given 2017 interest and energy levels.

Edit: To be clear, to the extent anything can or can not be considered official in open source, Michael's project was his project, and never made it in to the main repo. We encouraged it just as we'd encourage anyone to try and make an independent implementation — but CoffeeScript has never asked for financial support.

jashkenas··on Announcing CoffeeScript 2
Hmmm. If you're doing the compilation yourself, I'd imagine you could rely on what browsers provide these days, and compile to what you need. For the kinds of data transformations that templates tend to need, I wouldn't imagine that you'd really find a utility library to be necessary. Check out the Svelte output, for example.
jashkenas··on Announcing CoffeeScript 2
Happy to answer, although this is a bit of a funny forum for it:

From a work perspective, it's pretty simple. I quit, and then was rehired to the same position a year later.

But The Times' Graphics Desk was super nice about it. We had a handshake agreement that I'd come back when I got back, and they even lent me a laptop to maybe file some travel-ish bits and bobs from along the road. So in that sense, it was partially justified.

In the end I didn't end up writing anything for them for a few reasons: I didn't want to turn the ride into work; I wasn't on my best NYT-standards behavior (booze, bribes, women) — well, one spectacular woman, and we're married now; and finally, I personally hew somewhat to the Janet Malcolm attitude:

“Every journalist who is not too stupid or full of himself to notice what is going on knows that what he does is morally indefensible. He is a kind of confidence man, preying on people's vanity, ignorance, or loneliness, gaining their trust and betraying them without remorse.”

Especially with respect to travel writing. You can do it right, but you really have to take the time and be invested and involved. And I was riding to follow the seasons and wasn't.

Ultimately, even though the industry as a whole is in decline, the NYT and other world-class news sources are still strong, and in some ways, getting stronger. In particular, the visual journalism The Times publishes every year keeps pushing the state of the art.

jashkenas··on Announcing CoffeeScript 2
And that's totally fine! I don't get a chance to use it much these days either.

But for the folks who still do — or have existing codebases — this update is for you.

jashkenas··on Announcing CoffeeScript 2
In open source, it's lovely, and fairly rare, to see someone pick up the ball on a quiet project, and run with it to completion without getting frustrated or losing interest first.

Geoffrey Booth — with big assists from Simon Lydell and Chris Connelly — has really gone the distance here, spending a full year working on drafts of CoffeeScript 2.0 to upgrade it from a language designed around ES3, to make it as ES6+ friendly as possible.

https://github.com/jashkenas/coffeescript/commits/master

He also redid the website and the docs for good measure: http://coffeescript.org/

Bravo.

jashkenas··on Annotated Underscore.js Source Code – Good for Budding JavaScript Developers
I quite agree that it's grown a bit gnarled and tangled with optimizations over the years.

It's interesting to compare the current version to the earliest available copy of the annotated source code, from version 1.1.1, seven years ago, in a simpler JavaScript age:

https://cdn.rawgit.com/jashkenas/underscore/1.1.1/docs/under...

jashkenas··on Watching Hurricanes Irma, Jose and Katia From Above Earth
There isn't one that I'm aware of ... yet.

That said, the raw data is available through an S3-compatible service, here: https://osdc.rcc.uchicago.edu/noaa-goes16

With documentation about how to navigate and use the files here: http://edc.occ-data.org/goes16/getdata/

So it would be possible to script together something that cooks out a nice high-rez full disc image every 15 minutes.

For fun, here's one of the full disc frames we cropped in from:

https://d1ax1i5f2y3x71.cloudfront.net/items/0J2g1S1y2f2D1y0W...

Note that even though its 2712x2712 pixels, that's still way smaller than GOES16's potential resolution. The highest rez versions of this image that I've encountered go over 10,000 by 10,000...

jashkenas··on Watching Hurricanes Irma, Jose and Katia From Above Earth
It's nice to see that folks are enjoying this — it was a group effort to wrestle the 22.3 gigs of imagery frames over FTP and get them cropped, processed, overlaid and sorted in time.

For anyone who wants to dig deeper, the RAMMB branch of NOAA in Colorado maintains a page of GOES16 loops of the day: http://rammb.cira.colostate.edu/ramsdis/online/loop_of_the_d...

... and also runs a fancy imagery viewer where you can play around with different micrometer wavelength bands: http://rammb-slider.cira.colostate.edu/?sat=goes-16&sec=full...

jashkenas··on [dead]
As one of the folks who worked on this — this graphic has already been flagged off the front page three times today, and may well continue to be. Perhaps it's not a subject that the HN community wants to look at ... But I would hope that it can be. So please take an extra minute to read closely and consider carefully before jumping in with a comment or a flag.

To head off some FAQs at the pass (and feel free to ask more):

* The multiracial and Native American categories are calculated, but only displayed when they go above 5% in any year for a given school. Multiracial was recently introduced as a category in 2008 — you'll notice some big jumps because of this (U. Hawaii @ Manoa)

* International students — which often make up sizable component of undergraduate diversity in Ivy League schools — are excluded from these. It's U.S. residents only.

* You'll notice some gaps in the 1980's before the data starts being reported consistently in 1990's by the Department of Education.

jashkenas··on [dead]
As one of the folks who worked on this — this graphic has already been flagged twice today, and probably will continue to be. So please take an extra minute to read closely and consider carefully before commenting.

To head off some FAQs at the pass:

* The multiracial and Native American categories are calculated, but only displayed when they go above 5% in any year for a given school. Multiracial was only introduced as a category in 2008 — you'll notice some big jumps because of this (U. Hawaii @ Manoa)

* International students — which often make up sizable component of undergraduate diversity in Ivy League schools — are excluded from these. It's U.S. residents only.

* You'll notice some gaps in the 1980's before the data starts being reported consistently in 1990's by the Department of Education.

jashkenas··on Have Smartphones Destroyed a Generation?
A lovely quote. But sadly, apocryphal:

http://quoteinvestigator.com/2012/10/22/world-end/

> "In conclusion, QI believes there is currently no compelling evidence that any one of the multiplicity of quotations listed above was really inscribed on a tablet during ancient days in Assyria."

jashkenas··on Ask HN: What are some examples of good code?
Thanks!

There's an annotated version available here, which might be a little easier on the eyes: http://underscorejs.org/docs/underscore.html

Underscore's codebase has grown some warts and wrinkles over the years, as optimizations and browser edge cases find their way in ... but the guiding principle is still to keep it as svelte as we can manage.

jashkenas··on Ask HN: Have you created a programming language and why?
My personal opinion is much as it has been from day one:

    > I'm not about to start using it for real projects, 
    > it's really just a thought experiment about how nice 
    > JavaScript could be with an alternative syntax.
(Source: https://news.ycombinator.com/item?id=1014225)

I've used it a bit for fun, but never for work.

And I think that the future of JavaScript is probably always going to be JavaScript — until a web language comes along that's so compelling it's just obvious that it will be the right direction, and then the question won't even have to be asked.

CoffeeScript, as a concept, was mostly finished back in the 2010-2011 days, as a layer on top of ES3.

CoffeeScript 2, while a great step forward in terms of practicality for folks who want to use it with ES6 features like classes and modules — is also a step backwards for the notion of CoffeeScript: For example, we don't have to formalize classes anymore because JavaScript has them now, and unfortunately JavaScript has done them in a very static way that's not at all the direction CS would have taken. Ditto modules.

As an open source project, it will continue to work just as well as it always did. But I definitely don't foresee a return to general relevance, ever.

jashkenas··on Ask HN: Have you created a programming language and why?
Yes, CoffeeScript, in 2009.

Despite being a modest, fun experiment in stripping JavaScript down to a minimal skin, and without any corporate backing, it wound up catching on a little bit.

Thanks to the hard work of Geoffrey Booth and Simon Lydell, among others, there's a new "V2" version that includes many ES6 and 7 features that's almost ready to go: http://coffeescript.org/v2/

CoffeeScript was designed extremely conservatively. The goal was to stick close to JavaScript semantics, to avoid having a runtime, and to avoid features that would require gymnastics and overcomplications in the output, or would run noticeably slower than the raw JS equivalent.

These days, I'm most interested in trying something from the other end of the "political" spectrum: What would happen if you tried to make a web language that wanted to strip HTML, CSS and JavaScript down to their essence — but were extremely liberal in the techniques you used to get there?

I'd like to get a chance to give that a try some day.

jashkenas··on Snakisms
This is delightful.

I only wish that someone would put it into a nondescript arcade cabinet in a hallway somewhere, so that people could stumble across it unprepared.

Edit: Naturally, it turns out that Mr. Barr has a PhD in this sort of thing, and that his thesis has to do with how we demonstrate our values during the course of playing video games. http://www.pippinbarr.com/academic/Pippin_Barr_PhD_Thesis.pd...

jashkenas··on How can a programmer help The New York Times report stories?
Thanks for the headsup — I'll let them know.

Edit: Bowers says that he's fixed it now.

jashkenas··on How can a programmer help The New York Times report stories?
Definitely. Usually in the summertime.

http://www.nytco.com/careers/newsroom-summer-internships/

jashkenas··on How can a programmer help The New York Times report stories?
To hazard a response, meeting a deadline creatively is knowing how best to trim, tweak and reimagine your concept to get in done in time.

One of the most fun and different aspects about writing code in a newsroom is the extremely different timescales that are involved compared to normal programming.

If you think it sounds like fun to sit down in front of a blank page of HTML with a fresh government dataset, RStudio, a copy of D3, a cup of coffee and 36 hours to see how good of an exploration and explanation you can come up with, this might be the job for you.

jashkenas··on How can a programmer help The New York Times report stories?
It's been in there for an hour+, and sits lonely at 2 points as of the writing of this sentence. So go figure!
jashkenas··on How can a programmer help The New York Times report stories?
@untog's got this one right. There are other teams that focus on improving the CMS, website and apps — but this job posting is specifically geared towards research, data analysis, reporting, tools for search/viz/compare, databases for journalists to rely on, and so on, and so forth. As he says, the input.
jashkenas··on How can a programmer help The New York Times report stories?
Sorry about that — I think I posted it a few minutes before the hiring thread went up (or at least, a couple hours before I noticed it).

I wasn't really expecting this listing to reach the front page — but I can understand that it did.

There's been so much energy / handwringing / chatter in recent months about our increasingly post-factual era, governments' relationships with journalism, and possible technical remedies, that I thought this new team (which has some very sharp people on it) might strike a chord here.

jashkenas··on How can a programmer help The New York Times report stories?
He certainly did: https://www.nytimes.com/by/mike-bostock
jashkenas··on How can a programmer help The New York Times report stories?
I believe it's somewhat flexible — as this post is for a new, small team (within Interactive News). So there's not necessarily a big existing codebase to maintain, and they're going to be working on some greenfield reporting tools.

That said, we use a lot of JavaScript, a fair amount of R, a medium amount of Ruby, some Python, and occasionally Go. Stats skills are a plus, as are database skills, as are design chops.

jashkenas··on How can a programmer help The New York Times report stories?
If folks have questions — feel free to ask in here. I'm sure we can lean on @jeremybowers (whose job opening it is) to swing by and answer some...
← PreviousPage 4 of 34Next →