Code Monkey home page Code Monkey logo

Comments (4)

mohammad7t avatar mohammad7t commented on June 15, 2024

Another radical approach is to use Narrative Javascript library, that enables blocking capabilities for asynchronous event callbacks by precompiling synchronous code to pure asynchronous js.
This method needs few changes to existing code (writing some "->"s) and the complexity will be automatically handled by narrativejs-comiler.

from jslogo.

inexorabletash avatar inexorabletash commented on June 15, 2024

One more option is to use task.js updated for ES6 generators and use a transpiler like Traceur for ES5 runtimes.

from jslogo.

inexorabletash avatar inexorabletash commented on June 15, 2024

Thanks to lots of hard work by @ianb we're almost there. Try this:

to fern :size :sign
  wait 1
  if :size < 1 [ stop ]
  fd :size
  rt 70 * :sign fern :size * 0.5 :sign * -1 lt 70 * :sign
  fd :size
  lt 70 * :sign fern :size * 0.5 :sign rt 70 * :sign
  rt 7 * :sign fern :size - 1 :sign lt 7 * :sign
  bk :size * 2
end
window clearscreen pu bk 150 pd
fern 25 1

from jslogo.

inexorabletash avatar inexorabletash commented on June 15, 2024

Loops (FOR, FOREVER, WHILE, etc) have a promiseYield call in them delay a few ms. We can drop this into any other procedure where it makes sense.

from jslogo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.