Questions tagged [iced-coffeescript]

IcedCoffeeScript is a superset of CoffeeScript.

IcedCoffeeScript is a superset of that adds support for await and defer keywords which simplify async control flow. The iced interpreter is a drop-in replacement for the standard coffee interpreter; it will interpret almost all existing CoffeeScript programs.

37 questions
1
vote
1 answer

IDE for IcedCoffeeScript programming?

What IDE can I use to develop IcedCoffeeScript code with syntax highlight and intellisense? I tried to use Webstorm, but it does not support IcedCoffeeScript.
Alexey Ryazhskikh
  • 2,458
  • 4
  • 32
  • 51
1
vote
1 answer

How to properly return defered object in iced coffeescript

I'm trying to do async/await style of programming using coffeescript and iced coffeescript. What I get instead if 'undefined' response. module.exports = update: (req, res) -> await user = User.find({ id: 1 }).exec (err, user) -> throw…
Stan
  • 25,744
  • 53
  • 164
  • 242
1
vote
1 answer

access the jth turtle

In PencilCode, I hatch 10 turtles: turtles = hatch 10 How to access only the jth turtle in the "turtles" set (for example only the first turtle)? I want to apply functions, for example pen('red').rt(90).fd(100) to only one of the turtles in the…
1
vote
1 answer

await defer constructor, async constructor

Is it possible in iced coffee script to make async constructor: class Animal constructor: (autocb) -> #some async action here And call it like: await new Animal, defer(animal) When I try to do it, got error: unexpected ,
Maxim Yefremov
  • 13,671
  • 27
  • 117
  • 166
1
vote
1 answer

How can I defer a callback with no arguments in Iced Coffeescript? (Blocking call)

For example: await Meteor.call "putCampaign", url, daily_budget, defer campaign_id is a callback with a callback with a single argument. How can I defer a call without a single argument? In code, instead of: callback(campaign_id) The blocking call…
nubela
  • 1
  • 24
  • 75
  • 123
1
vote
2 answers

How to use IcedCoffeeScript on ExpressJS application

the question is how can I use IcedCoffeeScript (http://maxtaco.github.io/coffee-script) on my web-application based on ExpressJS? Now I use vanilla CoffeeScript language in my application. Thank you
Dmitriy
  • 683
  • 2
  • 13
  • 26
1
vote
1 answer

how to run a lot of iced nodeunit tests

When I run iced nodeunit test ... $ nodeunit path/to/file/file_name.iced ... it's ok. When I run a lot of coffee script tests ... grunt.initConfig({ nodeunit: { coffee: ['path/to/coffee/nodeunit/tests/**/*_test.coffee'] } }); $ grunt…
Maxim Yefremov
  • 13,671
  • 27
  • 117
  • 166
1
vote
2 answers

Why are my coffeescript functions not available from my HTML code ?

I am using rails-backbone, coffeescript gems in my rails 3.2.6 project. square = (x) -> x * x alert square(5) this is the blog.js.coffee script file it produces: (function() { var square; square = function(x) {return x * x;}; alert(square(5)); I…
1
vote
1 answer

With when.js how can I convert a promise to a Node.js style callback?

I'm using IcedCoffeeScript. I want to write this: User.find(id).always esc done or await User.find(id).always defer e, user But Promise#always is deprecated in when.js. Is there another way?
vaughan
  • 6,982
  • 6
  • 47
  • 63
1
vote
0 answers

Rewriting a threaded Objective-C 'story engine' in CoffeeScript: How to script actions & conditions sequentially without a ton of callbacks?

I have been experimenting with porting the underlying 'story engine' of my Objective-C iPhone adventure Scarlett and the Spark of Life to HTML5 using CoffeeScript (and I am looking into IcedCoffeeScript). The graphical part can just use DIVs on the…
0
votes
1 answer

CoffeeScript to NodeJS

I'm currently attempting to port some old CoffeeScript code over (old project) to native NodeJS; I'm struggling to understand what exactly this is doing? or the equivalent in Node? builder.macro_extensions = [ 'iced' 'nsi' 'txt' …
Curtis
  • 2,646
  • 6
  • 29
  • 53
0
votes
1 answer

Web Compiler converting CoffeeScript to JavaScript with require()

I'm using Web Compiler for Visual Studio 2015, and I'm trying to compile a coffeescript file into a normal javascript file, but whenever I compile the coffeescript.js file I get the javascript.js, but with: // Generated by IcedCoffeeScript…
0
votes
1 answer

Using defer attribute in iced-coffeescript

I'm trying to insert a script tag from an iced-coffeescript file. I wish to specify the script's defer attribute, but the coffeescript compiler doesn't like that I'm trying to define something called defer, since it's a keyword. Is there any…
Antoine
  • 5,055
  • 11
  • 54
  • 82
0
votes
2 answers

return several values with autocb in iced coffee script

How to return couple values in iced coffee script using return and autocb? Without autocb I can do: func = (cb)=> cb returnVal1, returnVal2 How to implement this using autocb? This code ... func = (autocb)=> return returnVal1, returnVal2…
Maxim Yefremov
  • 13,671
  • 27
  • 117
  • 166
0
votes
1 answer

ReferenceError: autocb is not defined

After migrating to new mac book computer iced coffee script starts work incorrectly. When I run script ... iced script.iced ... I got error ... ReferenceError: autocb is not defined ... on the row: exports.method = (arg1, arg2, autocb)=> On old…
Maxim Yefremov
  • 13,671
  • 27
  • 117
  • 166