02:57
daniel_karlsson joined
03:01
<Marko__>
is it possible to deploy coffeescripts on nmpjs.org? and then require them normally on node.js apps configuring it on package.json?
03:49
<jacobrask>
Marko__: http://pkumar.github.com/10-23-2011/nodejs-module-in-coffee.html
03:53
<Marko__>
jacobrask: thanks for reference, I guess thats what I'm going to do next
03:54
<jacobrask>
I currently (after advice from here) have an index.js file in my package which require's coffeescript and then my coffeescript files
03:54
<jacobrask>
I might switch to "preinstall" instead later
03:59
<Marko__>
i might need some more help later :) but need to test and try first
04:52
_seriouslyrad joined
04:52
<_seriouslyrad>
Hi guys, I know we have Cake but are there any plans to support a kind of @import statement within .coffee files to build large projects. That works great in SASS/Stylus etc...
05:12
<Industrial>
_seriouslyrad: like require() ?
05:16
<_seriouslyrad>
Industrial: No because require will just load another file, I want the file to actually get compiled in. So you end up with 1 JS file for your app. Seems Cake is the way to go to do that at the moment but it's not as nice as doing it from within the code
07:29
materialdesigner joined
08:01
<shesek>
_seriouslyrad, node-browserify uses require() calls to determines all the dependencies of a file, so it can be served as a single file to the client
08:01
<shesek>
IIRC, RequireJS does that too
08:01
<KicStart42>
sheesh: and a host of other file/package loading APIs do too
08:28
martin_sunset joined
08:59
<helloo>
hlo every 1
09:12
<CIA-39>
coco: satyr master * r84e2081 / (lib/command.js src/command.co): command: global.eval - http://git.io/v4vBwA
09:59
martin_sunset joined
10:32
Swimming_Bird joined
10:41
<lucian>
is coffee not compatible with node 0.6? i ger errors
10:41
<lucian>
https://gist.github.com/1348095
10:41
<TheJH>
lucian, works for me
10:42
<TheJH>
lucian, mmhm... are you using the latest version from npm?
10:42
<toabi>
lucian: you need coffee 1.1.3
10:42
<lucian>
it actually worked until a few minutes ago
10:44
<lucian>
toabi: hmm, it's not on npm
10:44
<lucian>
any reason why it would suddenly stop working?
10:45
<toabi>
jeah. git clone npm and do an 'npm install -g' inside.
10:45
<toabi>
maybe your code is suddenly using a feature of cs which wasn't needed before?
10:45
<TheJH>
toabi, you mean, git clone coffee-script?
10:45
<toabi>
euh. jeah :D
10:45
<TheJH>
toabi, yes, and that feature is "pretty-print an error"
10:46
<lucian>
toabi: i'd still expect an error, which i did get before
10:49
<lucian>
yeah, it was just a terrible error message, which is better in 1.1.3
10:52
martin_sunset joined
11:50
Swimming_Bird joined
12:16
sirdancealot joined
12:32
Swimming_Bird joined
13:25
martin_sunset joined
14:00
travisglines joined
14:02
<travisglines>
hey guys, the coffee-script package in the npm registry is 44 days out of date and as of node v .6 is no longer working due to the use of a depreciated api ... anyone know how we can bump the version on github into the npm registry?
14:10
<toabi>
it'll probably happen when 1.1.3-pre will be stable™
14:12
<travisglines>
well as of right now any node developers that have upgraded to v .6 and are running their code on coffeescript ... and using npm to update packages/deploy are kind of sunk
14:13
<travisglines>
hmm guess ill just clone the git repo
14:24
<toabi>
travisglines: jeah you can clone coffee-script and do an npm install -g in it.
14:37
<marco4net>
I'd like to use the debugging with node-inspector in combination with a script that restarts the server on changes
14:37
<TheJH>
marco4net, is this a coffee specific question?
14:37
<TheJH>
marco4net, if not, ask in #node.js, moar active people there
14:38
<marco4net>
would you have a recommendation how to restart coffee on changes?
14:38
<TheJH>
marco4net, not sure, I think forever does that, too
14:38
<marco4net>
thanks, the issue is, that I tried to use nodemon for example to restart coffee, but kill SIGUSR2 does not seem to be effective
14:39
<jaequery>
whats the usage adoption rate for coffeescript?
14:39
<marco4net>
that's why I thought it's more specific to coffee
14:39
<TheJH>
marco4net, use SIGTERM for graceful halt and SIGKILL for killing
14:40
<marco4net>
ok, I'll try to update nodemon to see if that works to distinguish the 2 cases
15:30
Swimming_Bird joined
15:58
<CIA-39>
coffee-script: Jeremy Ashkenas master * r426f51d / (lib/coffee-script/coffee-script.js src/coffee-script.coffee): removing another process.binding() private snafu - http://git.io/8emHvg
16:02
Swimming_Bird joined
16:04
<CIA-39>
coffee-script: Jeremy Ashkenas master * r78491b3 / (lib/coffee-script/command.js src/command.coffee): fixing relative path to jsl.conf - http://git.io/gzgDmw
16:09
martin_sunset joined
16:13
<CIA-39>
coffee-script: Jeremy Ashkenas master * rd592d2c / (lib/coffee-script/command.js src/command.coffee): Fixes #1803 -- use fs.watch instead of fs.watchFile ... more of a PITA, but hey. - http://git.io/tZ-YRQ
16:59
<csnew>
join #jquery
17:06
naturalethic joined
17:07
TrevorBurnham joined
17:11
<TrevorBurnham>
@jashkenas Re: 1837, I'd rather do a 1.1.3 release without Windows support (no changes to command.coffee) than one that's unreliable on the Mac.
17:13
<jashkenas>
trevor: if you try master, does it seem to work for you?
17:13
<jashkenas>
that fs.stat bit should be a reliable way to avoid duplicates.
17:13
<jashkenas>
matyr: or perhaps you can illuminate what you tested exactly?
17:17
<matyr>
was using macvim to make file change
17:17
<matyr>
node -e 'require("fs").watch("t.js", console.log)'
17:18
<jashkenas>
matyr: sure -- but did you test the new coffeescript support?
17:18
<matyr>
then editing t.js gives "rename null" twice
17:18
<jashkenas>
I know it's not working right.
17:18
<jashkenas>
But we're ignoring "rename" ... and stat-ing the file.
17:18
<jashkenas>
matyr: try pulling master, and then doing: bin/coffee -cw test.coffee
17:19
<matyr>
yup. `coffee -pw t.coffee` spits the compilation, then do nothing after
17:19
nicksergeant joined
17:19
<jashkenas>
with macvim edits ...
17:19
<jashkenas>
how about a different text editor?
17:20
<jashkenas>
it prints out every time for me with TextMate, as long as a wait for a brief pause between saving.
17:20
<jashkenas>
I think our mtime has a resolution to the nearest second.
17:20
<jashkenas>
works for me with nano as well.
17:21
<jashkenas>
Are you actually making a change, or just re-saving?
17:23
<matyr>
making change
17:23
<matyr>
doen't work with normal vi, emac, and TextEdit
17:24
<jashkenas>
bizarre -- we're on the same version of mac os x.
17:24
<matyr>
I used homebrew to install node 0.6.0. maybe that's making the difference?
17:25
<jashkenas>
perhaps...
17:25
<jashkenas>
I built from the github tag.
17:25
<jashkenas>
want to try that?
17:26
<TrevorBurnham>
Seems unlikely. Homebrew just runs the standard install.
17:27
<TrevorBurnham>
Good news, though: I've been unable to replicate any problems with the current master. So LGTM.
17:27
<jashkenas>
any ideas of what it could possibly be? is it working for you, trevor?
17:27
<jashkenas>
matyr's problems make me nervous about it.
17:27
<jashkenas>
we could always put out a quick patch, but...
17:35
<TrevorBurnham>
Actually, on further testing, it looks like duplicates aren't being weeded out.
17:35
<jashkenas>
you can hit save once, and get two saves?
17:36
<jashkenas>
any command I can reproduce?
17:36
<jashkenas>
really -- I'm ready to tag and push this otherwise.
17:36
<TrevorBurnham>
Hold up! It's definitely a problem. I'm still trying to understand what I'm seeing.
17:37
<jashkenas>
Sure. We've got 15 minutes to work this out, otherwise I'll hold off for another day ;)
17:38
<TrevorBurnham>
It's bizarre. If I do a save from TextMate, coffee only detects the change once; but if I do fs.writeFile (sync or async), it detects it twice. Try it.
17:38
<TrevorBurnham>
I guess fs.writeFile is erasing the existing file, then writing the new contents?
17:39
<jashkenas>
perhaps ..
17:39
<jashkenas>
oh, and you have a build tool that uses fs.writeFile?
17:40
<jashkenas>
you can change it to print out the contents of what it's writing to the console to find out.
17:40
<TrevorBurnham>
Yeah, trying that now...
17:42
<TrevorBurnham>
Nope, fs.writeFile isn't erasing. The contents are the same both times.
17:43
<jashkenas>
and the stat.size is the same? and the stat.mtime is the same?
17:43
<jashkenas>
that line should filter it out if so.
17:47
<TrevorBurnham>
Ah, y'know what? I take it back. fs.writeFile is erasing. So stats.size is 0 on the first one.
17:48
<jashkenas>
so then we're good?
17:48
<TrevorBurnham>
But by the time fs.readFile processes, it always reads the non-empty version of the file. So the file gets read twice.
17:48
<jashkenas>
makes sense.
17:49
<TrevorBurnham>
I guess... I dunno. I don't fs.writeFile .coffee files myself. But someone must. I mean, what about that Node-based text editor, Kod?
17:51
<TrevorBurnham>
Hmm, just tried in Kod, doesn't seem to cause any problem. So I'd say we're good.
17:52
<jashkenas>
ok. sweet.
17:52
<jashkenas>
pushing momentarily.
17:52
<TrevorBurnham>
Great.
17:53
<TrevorBurnham>
So you're going to note in the changelog that coffee --watch no longer works under Node 0.4.x?
17:54
<TrevorBurnham>
(But that, on the plus side, it should now work with Windows?)
17:54
<jashkenas>
Sure, I can do that.
18:01
<CIA-39>
coffee-script: Jeremy Ashkenas master * r3e41659 / (19 files in 9 dirs): CoffeeScript 1.1.3 - http://git.io/2txAFg
18:03
<jashkenas>
Error: npm doesn't work with node v0.6.0
18:04
<jashkenas>
how is that possible?
18:04
<TheJH>
jashkenas, you have to update it
18:04
<TheJH>
jashkenas, you have to reinstall
18:04
<TheJH>
!@jashkenas mem npm-install
18:04
<jhbot>
jashkenas, you can install npm by doing "curl http://npmjs.org/install.sh | sudo sh". If you don't feel comfortable piping data from http in a sudo'ed shell (which really isn't a good idea), you can also download it, look at it and then pipe it in the shell.
18:05
<jashkenas>
wow, jhbot -- what a tip.
18:05
<jashkenas>
boom. http://search.npmjs.org/#/coffee-script
18:05
<jashkenas>
folks, give it a try from npm and let me know if it works for you.
18:05
<jhbot>
jashkenas, thank you - I actually am quite intelligent :)
18:08
<brandel>
yep, npm updated sucessfully. swanky
18:08
<CIA-39>
coffee-script: Jeremy Ashkenas gh-pages * r2e037dc / (114 files in 14 dirs): updating gh-pages (+9 more commits...) - http://git.io/pli1TA
18:08
<jashkenas>
coffeescript.org updated.
18:11
<CIA-39>
coffee-script: Jeremy Ashkenas master * rcebfe39 / (documentation/index.html.erb index.html): change_log -> changelog - http://git.io/1ryrmw
18:13
<CIA-39>
coffee-script: Jeremy Ashkenas master * r74501f6 / index.html : whoops. - http://git.io/54iAJw
18:13
<CIA-39>
coffee-script: Jeremy Ashkenas gh-pages * rcebfe39 / (documentation/index.html.erb index.html): change_log -> changelog - https://github.com/jashkenas/coffee-script/commit/cebfe394ad2e3fbd761440d4e21059b1d2a616f3
18:13
<CIA-39>
coffee-script: Jeremy Ashkenas gh-pages * r74501f6 / index.html : whoops. - https://github.com/jashkenas/coffee-script/commit/74501f643cd54d7ca2d773ebe88ccd191ec79e14
18:13
<CIA-39>
coffee-script: Jeremy Ashkenas gh-pages * r590bd3d / (documentation/index.html.erb index.html): Merge branch 'master' into gh-pages - http://git.io/Nsx38A
18:22
<matyr>
well, I don't really use `coffee --watch` anyway. let me know if anyone's using `coco --watch` on windows
18:23
<TrevorBurnham>
@jashkenas Ah, and it just occurred to me that the fs.writeFile issue I mentioned could be averted by switching the order of the `stats.size is prevStats.size` and `stats.mtime.getTime() is prevStats.mtime.getTime()` checks. *facepalm*
18:23
<jashkenas>
how so?
18:23
<jamescarr_>
why does new Date().toLocalTimeString() blow up in coffeescript!?
18:23
<TrevorBurnham>
The problem was when we got two events—one with size 0, one with non-zero size—but the same mtime. The short-circuiting is undesirable there.
18:24
<TrevorBurnham>
Oh, nm. *facepalm again*
18:24
<TrevorBurnham>
I'm tired.
18:24
<jamescarr_>
anyone?
18:25
<jamescarr_>
it makes NO sense
18:25
<jamescarr_>
new Date().toLocalTimeString() <-- boom
18:25
<jamescarr_>
d = new Date()
18:25
<jamescarr_>
d.toLocalTimeString() <-- boom
18:26
<TrevorBurnham>
We could cut out the size check, but then we'd *just* get the 0-size change event. Ugh.
18:26
<jamescarr_>
I really wish I could understand this issue
18:27
<TrevorBurnham>
@jamescarr_ That's not a CoffeeScript issue. There's no such method on Date, at least not under Node 0.6.
18:27
<jamescarr_>
really? WTF
18:27
<deltab>
alert new Date().toLocaleTimeString()
18:28
<jamescarr_>
I'm pretty sure there is
18:28
<jamescarr_>
in the node console it works
18:28
<TrevorBurnham>
$ node -e "(new Date()).toLocalTimeString();"
18:28
<deltab>
check the spelling
18:28
<jamescarr_>
Locale
18:28
<jamescarr_>
I wasted 15 minutes on this :)
18:28
<TrevorBurnham>
That'll do it.
18:28
nicksergeant joined
18:31
<TrevorBurnham>
@jamescarr_ For future reference: coffee> Object.getOwnPropertyNames(Date::)
18:45
<jamescarr_>
whats a good way to loop over a collection to do something and stop when a certain condition is true?
18:45
<jamescarr_>
x for x in y when x == 'foo'
18:46
<jamescarr_>
iterates over the whole thing
18:46
<jamescarr_>
not what I want
18:46
<jamescarr_>
I'm looking for the first element that meets condition y, pass it to a callback and stop iterating
18:46
<jamescarr_>
because the array can possibly be extremely large
18:54
WillMarshall joined
18:54
dancingturtle joined
19:09
CornflakesForTea joined
19:26
nicksergeant joined
20:17
materialdesigner joined
20:28
nicksergeant joined
20:36
sirdancealot joined
20:41
<der|>
Hello! I'm new to coffeescript and I've got to say that I'm loving it so far! Thank you so much for creating this :D
21:02
nicksergeant joined
22:26
<CIA-39>
coffee-script: Michael Ficarra master * r11544f2 / (extras/coffee-script.js src/browser.coffee): fixes #1832: speed up `CoffeeScript.eval` in browser script - http://git.io/LU_8ew
22:26
<CIA-39>
coffee-script: Jeremy Ashkenas master * r97d1eed / (extras/coffee-script.js src/browser.coffee):
22:26
<CIA-39>
coffee-script: Merge pull request #1839 from michaelficarra/issue1832
22:26
<CIA-39>
coffee-script: fixes #1832: speed up `CoffeeScript.eval` in browser script - http://git.io/5nmzsw
22:38
<airhorns>
jashkenas, i just finished bisecting, i'll report my results
22:40
<airhorns>
jashkenas this is the little guy that did it: https://github.com/Shopify/batman/commit/2256a36e32e0d0763b33edeff2e0165923175935#L1L2957
22:41
<airhorns>
would you like me to file an issue?
22:49
<jashkenas>
yes, please.
23:04
<airhorns>
done, awesome work on 1.1.3 jashkenas, thanks for all your hard work!
23:05
<jashkenas>
thanks to the people who actually patched -- I hardly touched it ;)
23:08
<devongovett>
jashkenas: any reason CoffeeScript doesn't preserve non block comments?
23:08
<jashkenas>
yes, it's very difficult to parse