M
Max Krohn
maxtaco.github.io · Personal blog · on HN since 2013
Max Krohn, a programmer who created IcedCoffeeScript, writes about async control flow, error handling, and Bitcoin key storage.
What HN saysHN links it when discussing async control flow and callback hell; commenters say IcedCoffeeScript predates ES async features and still prefer its syntax over typical promises.
21HN people shared it
16linked it in comments
6stories submitted
161story points
6 months agolast shared
2013people per year2026
Most-shared posts
- 1IcedCoffeeScript - CoffeeScript with Promises15 people · 9 points · first shared 2013 · discussion on HN
- 2How Jason Bourne Stores His Bitcoin4 people · 110 points · first shared 2014 · 49 comments on HN
- 3Handling Errors in IcedCoffeeScript3 people · 42 points · first shared 2014 · 12 comments on HN
What HN people wrote when they linked it
rpastuszak · 2026-05-08
I can finally use this little brain worm that has lived in my head for more than a decade now: IcedCoffeeScript has existed for ages https://maxtaco.github.io/coffee-script/ since well before ES got it.
trog · 2021-05-07
Oh yeh sorry I didn't mean to give the impression I thought you were wrong. I 100% agree with you.
I remember the first time I experienced "callback hell" (2016, for me, but I'm sure it was a huge problem for others before then) when I was doing some JavaScript stuff implementing Keybase's library for GPG support - I learned they'd built a whole separate JavaScript thing called IcedCoffeeScript[1] specifically to add await/defer support to get rid of those huge callback pyramids.
1. http://maxtaco.github.io/coffee-script/
doublerebel · 2016-06-03
This is how I've been writing Iced Coffeescript for years. I still believe it's a major improvement over the typical promise syntax.
And to make the error handling even cleaner, check out the errify/errorCallback pattern:
http://maxtaco.github.io/programming/2014/09/18/handling-errors-in-ice…
https://www.npmjs.com/package/errify
https://github.com/nextorigin/express-rendertype/blob/master/src/fancy…
acjohnson55 · 2015-12-27
I very much like this model, but I wonder how necessary it is when we have IcedCoffeescript [1], ES6 generators + co [2], and ES7 async/await [3] as viable ways of managing async control flow within mostly synchronous-looking code, all as dialects of languages that have strong adoption.
I actually think generators + co is a really strong model. Async/await gives you a slight bit of sugar, but I've realized that if you stick with generators, you can wrap your generators to allow you to `yield` more than just promises, effectively giving you something like (untyped) scoped continuations [4].
[1] https://maxtaco.github.io/coffee-script/
[2] https://github.com/tj/co
[3] http://masnun.com/2015/11/11/using-es7-asyncawait-today-with-babel.htm…
[4] http://blog.paralleluniverse.co/2015/08/07/scoped-continuations/
PeCaN · 2015-12-24
Just transform it to continuation-passing style[1] and call/cc is no problem (neither are non-local exits). Granted your compiled code will be somewhat large and not much like 'regular' code in the language. That can be solved by doing selective CPS transform (IcedCoffeeScript[2] does this), but that gets slightly less straightforward.
Compiling continuations to a dynamic language is actually really easy.
--
1: https://en.wikipedia.org/wiki/Continuation-passing_style
2: http://maxtaco.github.io/coffee-script/
dkarapetyan · 2014-11-14
I think you're looking for this http://maxtaco.github.io/coffee-script/.
meowface · 2014-10-26
CoffeeScript isn't really supposed to offer new features, just syntactic sugar. And in my opinion it excels at that.
IcedCoffeeScript, on the other hand, does introduce a few new interesting features: http://maxtaco.github.io/coffee-script/
It's still technically sugar, but it changes the way you think about and write code.
segfalt · 2014-10-02
I thought this was going to be yet another 'compiles to JavaScript' language. I was pleasantly surprised to see that it isn't.
Unfortunately, there is an "Iced CoffeeScript": http://maxtaco.github.io/coffee-script/
maxtaco · 2014-01-18
I wrote a little blog article on how to store the majority of your bitcoin using a security-enhanced brainwallet. Part of the argument is that exchanges and online wallets are and will continue to be magnets for good XSS/CSRF attacks. Mt.Gox/Coinbase Engineers are fighting a difficult fight against well-incentivized enemies.
http://maxtaco.github.io/bitcoin/2014/01/16/how-jason-bourne-stores-hi…
seoguru · 2014-01-08
Have you tried IcedCoffeescript? http://maxtaco.github.io/coffee-script/
if so, how do you think it compares to ToffeeScript?
arghbleargh · 2013-08-17
It appears to be very similar to icedcoffeescript: http://maxtaco.github.io/coffee-script/
AndyKelley · 2013-08-15
iced-coffee-script has a similar solution. http://maxtaco.github.io/coffee-script/
martingordon · 2013-07-10
Yeah, I think the big difference for me is the language support. You can just await a method call instead of having to wrap the remainder of your block in a function.
Perhaps I should look into IcedCoffeeScript (http://maxtaco.github.io/coffee-script/) instead of plain CS.
hombre_fatal · 2025-02-16
1. In open source, everyone plays lip service to how you can just fork things, but nobody wants to do the hard, infinite work of building a new ecosystem. You'll just rediscover the exact thing that burned evancz out.
2. Elm's stance on sync vs async ffi isn't a big deal. A fork is like when there was that IcedCoffeeScript spin off on CoffeeScript: https://maxtaco.github.io/coffee-script/ -- it's more of a gimmick in what is already a tiny ecosystem.
3. Last I checked there was "elm-janitor" for managing patches and getting them into core Elm as an end user or something. Dunno what came of it, but I think it goes back to only a handful of people are going to use something like that. And there are already Elm-inspired languages with ~0 users out there. The hard part is ecosystem.
It's not like Javascript where you can launch something like preact (react but smaller) and get 38k github stars. It's not going to be rewarding.
babby · 2014-01-08
Also IcedCoffeeScript
http://maxtaco.github.io/coffee-script/
It's just CoffeeScript with await and defer keywords, essentially.
I personally would never touch toffeescript/coco and friends as they differ too much for CoffeeScript, which already segregates the JS userbase enough. I figure IcedCoffeeScript is the lesser evil for compile-time control flow as it's not adding a bunch of other changes to the language that users have to understand to contribute to a project written in it. Another issue with these CS spinoffs is; what if the main contributor says "Fuck it" and bails? CS itself is big enough to have a lot of talented contributors. What happens when CS moves over to CS 2.0 ie. coffeescript redux? Do these spinoffs need to recoded?
That being said I probably won't use Iced either, as much as I want to... Maybe I'm all wrong about this? Maybe this userbase segregation crap is not as big a deal as I may think.