r/reactjs • • Oct 21 '19

I made a visual programmer for javascript

603 Upvotes

40 comments sorted by

48

u/rahatchd Oct 21 '19

u used the javascript to render the javascript

back to the javascript and back

12

u/agentgreen420 Oct 22 '19

It's JavaScript all the way down

12

u/Saguaro66 Oct 22 '19

full stack

3

u/phandungtri Oct 22 '19

recursive javascript

4

u/rahatchd Oct 22 '19

pls no

i dont trust myself calling back callbacks

1

u/zipel Oct 22 '19

I read that in John Mayer’s voice.

1

u/andoy Oct 22 '19

inception

60

u/shredinger137 Oct 21 '19

This reminds me of learning programs like Scratch, but more advanced. Were you intending to go somewhere with this, or is it just a demo? I ask because there are some parallels with my job and related projects. The teaching tools market has quite a bit of opportunity.

5

u/JohnWangDoe Oct 22 '19

this would be a good step up for the kids

53

u/H-s-O Oct 21 '19

what did you bring upon this cursed land

11

u/trainrex Oct 22 '19

Now make the visual programmer in the visual programmer!

7

u/dexodev Oct 22 '19

we're here to learn javascript, not rip a whole in the space-time continuum

1

u/Geek55 Nov 06 '19

Its bootstrapping time

8

u/franksvalli Oct 22 '19 edited Oct 22 '19

Kinda a nitpick - I would avoid using DOM level 0 events, since you can only add one per element. The spec for DOM level 2 events via addEventListener was introduced in the year 2000 (e.g. document.addEventListener('mousemove', event => {}, false)). The newest browser that doesn't support it is IE8, so you're pretty safe using it instead!

16

u/angusmiguel Oct 21 '19

Source please

7

u/[deleted] Oct 21 '19

Very cool! Looks really clean.

3

u/[deleted] Oct 21 '19

This would be a great teaching tool.

5

u/jesusbot Oct 21 '19

Looks cool, similar to Blockly: https://developers.google.com/blockly

2

u/YmFzZTY0dXNlcm5hbWU_ Oct 21 '19

Very cool. Any plans to post the project so we can give it a try, or is it closed source?

I suck at Javascript so this would be a great way to tinker with it in a more accessible way.

2

u/[deleted] Oct 21 '19

This is so cool! I've been wanting to make something like this for myself, do you have source code available? Thanks!

2

u/_brew_drees_ Oct 21 '19

This is why I subbed here

1

u/MiamiSlice Oct 21 '19

This looks awesome! Would love to see the source

1

u/thebueller Oct 21 '19

Nice work.

1

u/donatobhr Oct 21 '19

Waoo, amazing!!

1

u/z1024 Oct 21 '19

What happens with the visual thingy when you edit the text? What if the code has an error?

1

u/wlkngmachine Oct 21 '19

nice! repo?

1

u/Middlerun Oct 22 '19

Cool! I've been getting interested in this sort of thing lately. Are you aiming for a general-purpose editor covering the entire language, or just specific tasks like event handlers?

1

u/s_sureshbabu Oct 22 '19

Excellent work man...

1

u/cocoapuff_daddy Oct 22 '19

nice! are you planning to share it?

1

u/Will_builder8 Oct 26 '19

God stop messing with us mortals again!

1

u/[deleted] Oct 21 '19

Sweet! How did you format the code on the right hand side? Is there a library which does this? I need to do something similar for my dissertation

4

u/marvinroger Oct 21 '19

You can use Prettier

2

u/Middlerun Oct 22 '19

Check out escodegen

-20

u/[deleted] Oct 21 '19

[removed] — view removed comment

0

u/[deleted] Oct 21 '19

[deleted]

1

u/[deleted] Oct 21 '19

[removed] — view removed comment

8

u/robotsympathizer Oct 21 '19

What did they say?

4

u/Coaste Oct 21 '19

[removed]

1

u/swyx Oct 21 '19

[removed]