MIT
bevacqua / promisees Goto Github PK
View Code? Open in Web Editor NEW:incoming_envelope: Promise visualization playground for the adventurous
Home Page: https://bevacqua.github.io/promisees
License: MIT License
:incoming_envelope: Promise visualization playground for the adventurous
Home Page: https://bevacqua.github.io/promisees
License: MIT License
Tried to view the demo but I'm not seeing any visualization rendered. Others are having similar issues, see: https://www.reddit.com/r/javascript/comments/3lp1a7/javascript_promises_visualization_stepbystep/
Hi,
First, awesome visual application you have there!
I'd like to ask if you use a library for those nodes or you build them yourself? Thank you
Before I explain my issue just want to put out a big THANKS for this project. This morning I was frustrated trying to teach myself how to be a good promises coder so I just googled "promises playground" and voila! I could only go so far reading about promises and bashing my head trying to implement them in a real project. Your playground makes it easy and visual. Already I'm understanding correct patterns(syntax) better.
So here is some code I put in http://tinyurl.com/jgrm755 that works fine on my local machine but the "then" does not appear in the playground.
function foo(x) {
done = new Promise( function(resolve,reject){
setTimeout(function(){
console.log('Foo is done after',x,' seconds')
resolve();
}
,x*1000);
});
// return a promise
return done;
}
function bar() {
console.log('Now doing Bar stuff');
}
function oopsBar() {
console.log('Something went wrong up before');
}
var p = foo( 5 );
p.then( bar, oopsBar );
I'm following along a pluralsight course and copied this code straight out of the video, they are using promises as well to test out AJAX calls and I think the playground is awesome... But his same exact code snippet works while mine says 'echo' is undefined? I'm not a beginner but I'm definitely baffled by this.
`
function echo(message, delay) { };
var log = r => {
console.log(r);
return r;
}
echo('1st echo')
.then(log)
.then(log)
.then(log);
`
I think that there is a genius idea in here but I find it quite hard to use and understand. The buttons don't have mouseovers to say what they are doing, debugging is very hard, etc.
Does the pulsing indicate how often the code is being run or is it just a visual effect?
What does the recorder button do?
demo.min.js:1 Uncaught ReferenceError: babel is not defined
at i (demo.min.js:1)
at HTMLScriptElement.r (demo.min.js:1)
just wanted to thank you for creating this :-)
there are a few things i'd love to see added, but that's for other issues
๐ป
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.