

Smooth CoffeeScript - telemachos
http://issuu.com/autotelicum/docs/smooth_coffeescript

======
autotelicum
The book's homepage is at: <http://autotelicum.github.com/Smooth-
CoffeeScript/>

~~~
sheffield
The killer feature of <http://eloquentjavascript.net/> is the console, where
you can run and modify the examples, and do the exercises. Do you plan an
interactive HTML version?

~~~
autotelicum
Several of the examples in "smooth" are quite different from "eloquent" and
use a http or websocket server, so they require the node.js runtime
environment and can not run only in a browser. The setup I use is to have the
text next to me on a tablet and a text editor that can run CoffeeScript
directly on my laptop. It also takes know-how and time to produce different
versions in EPUB and HTML. I tried some free conversion tools but the results
were poor. I would like to fix issues and add material, there is an issue
tracker on the project page, where errata and suggestions are welcome.

~~~
telemachos
A few suggestions if you really want to support other formats:

\+ Pandoc[1] - a Haskell program/library to translate markups from one format
to another (supports LaTeX, which I think you're using).

\+ Leanpub[2] - a service that lets you write a book as Markdown or HTML and
then easily publish and sell it in multiple formats (PDF, EPUB, Mobi). They do
all the conversion for the output formats for you. I don't think they
currently support LaTeX, but I have a recollection that they're working on it.

Having said that, it's not necessarily your job to provide us all the formats
we might want. (Though going with Leanpub may provide you with a simple way to
make a little money for your troubles.)

[1] <http://johnmacfarlane.net/pandoc/>

[2] <http://leanpub.com/>

~~~
autotelicum
Well, I did not say that I really wanted to support other formats. Here are my
reasons:

JavaScript has always possessed an inner, lisp-like beauty. CoffeeScript
allows that beauty to shine through the surface of the syntax. I have tried in
Smooth CoffeeScript to let the visual design reflect that in the way the code
and text is presented.

I mentioned that I have tried converters and realized what the problems are
(beyond lacking support for hyphenation, kerning and ligatures). The book's
text is interspersed with code in a fixed width font. Line breaks and
hyphenation marks has to be avoided as much as possible in inline code,
because they can be highly confusing - does it mean a minus there or what?
Then comes CoffeeScript's whitespace awareness, that means that code blocks
have to be scaled, it is very confusing to use word wrapping. I have had to
hand manage the typesetting by sometimes tweaking the code text, the font
sizes or rewriting sentences to avoid formatting issues.

All my devices are capable of presenting pdf quite well, so I have also not
felt the need to produce other formats. I checked at <http://ebook-reader-
review.toptenreviews.com/> and it seems all ebook readers have some support
for pdf.

If the reason for other formats is to avoid Adobe, then on the Mac there is a
built-in preview utility with excellent pdf support. On Windows Google Chrome
has its own pdf support built-in. With this book Chrome does say that there is
something it could not render correctly, but I have not been able to find what
that something might be. It looks good to me.

Creating the book in pdf has been quite labour intensive - maybe due to my
lack of experience in this kind of work - so the prospect of repeating that a
couple of times for HTML and EPUB does not appeal much to me. If someone else
feels strongly enough about this to dedicate their time and energy to it - and
uses freely available tools to do it - then I will be happy to host the result
on the project site.

------
TrevorBurnham
I'm a fan of Eloquent JavaScript. In my book on CoffeeScript
(<http://pragprog.com/titles/tbcoffee/coffeescript>), I recommend it as a
resource for readers who want a thorough introduction to JavaScript. So
obviously, I think it's pretty damn cool that someone ported his book to
CoffeeScript (albeit with modified examples). The inclusion of Underscore.js
as a standard library is, I think, also quite sensible.

Of course, there's a fundamental philosophical difference between my book and
Smooth CoffeeScript, which is highlighted on the book's front page:

> Why no JavaScript? Because it is difficult enough to learn one programming
> language at a time. This book does not assume knowledge of JavaScript or
> another language.

I, on the other hand, think that it's important to understand JavaScript in
order to work with CoffeeScript, and that CoffeeScript is not well-suited to
being a first programming language. The situation will improve as tools for
debugging CoffeeScript become available, but even then, it's unlikely that
you'll use CoffeeScript for a real project without reading documentation (and
code) for libraries written in JavaScript.

But hey, I'm happy to see anything that gets more people hooked on
CoffeeScript. :)

~~~
autotelicum
Smooth CoffeeScript is a book about programming, problem solving, looking into
how algorithms work, and learning from it. Those things really appealed to me
in Eloquent JavaScript.

Smooth CoffeeScript uses CoffeeScript because it can express the code much
more clearly than JavaScript, but the book could have been written in another
language; Python for example.

I created it because it was a book I would like to read. It is great that
there is now a handful of resources so you can pick what suits you best when
you decide to learn CoffeeScript.

------
jjm
There is some crazy stuff going on here. Awesome examples and really opened up
my mind on taking advantage of what CoffeeScript allows.

------
cgbystrom
Nice. Would be great if it was available in EPUB format.

~~~
jarin
I tried converting to epub and it lost all the code formatting.

------
dylanrw
This is going to be a great read.

------
Ruudjah
Is there an html version?

------
drivebyacct2
Am I missing something? The default area where the book loads is way to small
to read anything, and it may be the fact that I'm so zoomed out, but this
looks like it was scanned it or something. Blurry and not leveled...

Direct link to a PDF: [http://autotelicum.github.com/Smooth-
CoffeeScript/Smooth%20C...](http://autotelicum.github.com/Smooth-
CoffeeScript/Smooth%20CoffeeScript%20Web%20Optimized.pdf)

~~~
erikpukinskis
If you enable flash and click "Click to read" it'll go into fullscreen mode.
Not exactly intuitive...

~~~
guywithabike
It's also just plain frustrating to read. The first page turn moves the page
controls over, and then every subsequent page turn takes almost an entire
second for its goofy animation to finish.

Why do so many e-reader/document-reader sites/apps insist on replicating old
paper books buy forcing you to pause and watch a dumb animation on every page
turn?

