It’s just data

DSL for JavaScript

W

Jeremy Ashkenas: “work towards building a language that is to ES6 as CoffeeScript is to ES5”… close, but—do it for [ES6+HTML+CSS], and you’ll win ;)

It occurs to me that there is a shortcut available.  Let a library like React replace [ES6+HTML+CSS].  Then build a DSL for that library.

JavaScript isn’t exactly known for its ability to build DSLs.  Ruby, however, is.  And has an excellent parser library.  By transforming the AST, I can convert calendar.js.rb into calendar.js.

In the process, I start by replacing JSX with a library which was inspired by Builder, Markaby, and Tagz.  These libraries, in turn were presumably inspired by earlier works like Perl’s CGI.

But there is more.  JSX can’t directly express iteration.  Look at CommentList from the React tutorial.  Instead you build up a list, and then subsequently wrap that list.  For nested lists, it appears worthwhile to split out separate components.  There is nothing wrong with doing that, but I will suggest that the primary reason to split out a component shouldn’t be to pander to the limitations of the programming language syntax.

In Ruby you can directly express iteration.  So where a comment box in the tutorial takes four classes, an entire calendar month can be expressed in one.

And there is even more.  Functions in JavaScript are the swiss army knives of programming language features.  The can be used to express classes, blocks, lambdas, procs.  But this flexiblity comes at a price.  Ruby2JS can detect when idioms like var self=this are needed and automatically apply them.

The net is that I can write smaller, more understandable code.  And in the process focus more on the problem I’m trying to solve.

Like with CoffeeScript, "It’s just JavaScript". The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime.  You can use any existing JavaScript library seamlessly from Ruby2JS (and vice-versa). The compiled output is readable and pretty-printed, will work in every JavaScript runtime, and tends to run as fast or faster than the equivalent handwritten JavaScript.

Now I don’t expect to have the success or impact that CoffeeScript has had.  But I can say that I’m having fun.  And in the process, I’m seeing the benefits with applications I write.


Thanks for sharing this post! it was very informative and helpful! keep posting and updating all users! thanks!
https://geekybytes.net/trueskate-apk-download.html

Posted by Dann Flin at

Having issues while using xerox printer. Just a single call to us will get your problems resolved. our Xerox Printer Support will support you to solve the query. We are available 24×7. Contact us Xerox Printer Support

Posted by Xerox Printer Support at

Dissertation Guidance Provides quality Online Dissertation Help for students.

Posted by Take My Online Class For Me at

Amazing article thanks or sharing..

Posted by Marketing Research Homework Help at

awesome post

Posted by asus customer support at

Thanks for sharing this post! very informative and helpful! keep posting! great effort! Is its parent directory writable by the server?

Posted by Is its parent directory writable by the server? at

Well thanks for posting such an outstanding idea. I like this blog & I like the topic and thinking of making it right.

Posted by matlab tutor at

A browser is an application program that provides a way to look at and interact with all the information on the World Wide Web.  if any query to the related browser then you can contact Google Chrome Support Service

Posted by Jems Ford at

awesome post so thanks for sharing the post.

Posted by safari browser support at

The Leading Assignment Help UK Firm Offers State Of The Art Services To Its Clients With A Promise Of Delivering All The Required Work Well Within The Deadline.

Posted by SPSS Homework Online at

great post

Posted by Hitachi Customer Service at

NICE POST

Posted by OPERA CUSTOMER SUPPORT at

Hi buddy, your blog' s design is simple and clean and i like it. Your blog posts about Online writing Help are superb. Please keep them coming. Greets!

Posted by HBS Case Solutions at

This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it. 
satta matka
satta matka
satta matka
satta matka
satta matka

Posted by satta matka at

nice post share with us.
  UC Browser customer service

Posted by Safari Browser Support at

Well thanks for posting such an outstanding idea. I like this blog & I like the topic and thinking of making it right.

Posted by medical assignment writing at

We are here to help you with any kind of issues related to your Gmail. for support service contact Gmail Customer Service .our expert will assist you and in no delay your problem will be resolved.

Posted by Gmail Support at

Thanks for sharing this post! checkout:
Best Linux Distro For Gaming

Posted by Cathy Brown at

This is great information for students. This article is very helpful i really like this blog thanks. I also have some information relevant for online dissertation help.

Posted by Matlab Project Help at

thanks for sharing very information post this is very useful post for student.

Posted by Lenovo Support Number at

Very informative article. Loved your effort in brining such a value to the content. Thanks for sharing.
xbox customer support

Posted by Xbox Customer Service at

Well thanks for posting such an outstanding idea..

Posted by Png at

Before you record something, be it in your home or a studio, the first thing you would require is a microphone and among them the condenser microphones are the best of the lot. To get suggestions about the best condenser microphones, just take a look at the site.

Posted by Best Condenser Mics at

Thanx for sharing such useful post keep it up :)

Posted by Basketball Hoop Reviews 2018 at

Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.

Posted by Do My Python Programming Project at

Thanks for sharing this post, it was great reading this article, would like to know more. Stay in touch, checkout Aptoide Apk

Posted by Garry Watson at

Thanks for this share, you must check out these posts they are very interesting @ GBA Games & How to give best man speech 2018

Posted by Linco Frank at

Thanks for sharing this post, keep in touch and stay connected, also get the best tv shows and movies free with the best platform with premium features at no cost
how to get Hulu free on android

Posted by Edwin Heart at

Thanks for sharing this post, very interesting and resourceful ! Also read How To Bypass Surveys

Posted by Liam at

Thanks for this share, it was very informative and helpful, keep posting and updating all users check out Best Micro Cut Shredder

Posted by Carl Bush at

Any kind of problem you face with MS Paint just reach out through our MS Paint Customer Service and get your problems solved.

Posted by MS Paint Customer Service at

Get Connected with browser Support Phone Number and get your browser issues solved instantly.

Posted by Browser Support Phone Number at

Thanks for providing such useful information. I really appreciate your professional approach.

Posted by Windows Tech Support at

Thanks for sharing this post, it was great reading this article! keep posting!

Posted by Top Paper Shredder at

This is a great inspiring article.I am pretty much pleased with your good work.You put really helpful information. Keep it up.

Posted by App Socio at

thanks for share such a wonderful information with us.

Posted by Fibroids at

Unlike in the past, cloud web hosting is not a technology for the future. But it is now used as conventional servers because of its cost effectiveness. In addition to being cost effective, it is also reliable, flexible and scalable. By the end of 2013, number of companies will use cloud hosting and 30 percent purchased will be done in cloud computing of their infrastructure. Despite the presence of issues regarding privacy by use of the cloud hosting, there are many benefits associated with cloud hosting making many of its critics become its enthusiasts very fast. Below are some of the benefits of this technology.

Posted by SiteGround UK Reviews Web Hosting at

This is very nice share with me

Posted by website designing company in Delhi at

Get help from professional coursework writers to ease your writing tasks if you are struggling hard. We are the only online coursework writing service in the UK that caters to your every need. We are the finest British online coursework help agency to help students for almost a decade now. We have obtained the place of being the best online coursework help service for our choicest and student-friendly benefits. We always keep ourselves a step further from rest of the coursework help agencies. This has only been possible due to the hard work and dedication of the professionals associated with us.

Posted by Coursework Help at

Students can score the good marks in their college and universities by hiring the best Dissertation writing help from the experts of Students Assignment Help. We offer the best assignment help services to the students.

Posted by Dissertation writing help at

This is really a innovative product. The best part is that it is very easy to create. I will try to make it.

Posted by software development companies in dubai at

this is really awesome information.

Posted by instagram picture viewer at

is this for real? Great job

Posted by Instadpviewer at

very nice information you share with us. thanks

Posted by Lyricsism at

QuickBooks is most used accounting software worldwide. Many users are using it, If you want to know more about Quickbooks or if you have any problem then you can contact us.

Posted by quickbooks support at

Singaporeassignmenthelp.com work is best quality and truthful. We assure to provide you 100% plagiarism free Best assignment help. To avail trust and support of clients we are focus on convey best quality and error free write up. We go alone with each student who is facing problems in writing their university homework assignments. Hire our experts, and solve your problems related to any topic.

Posted by andrew symond at

thanks for sharing such a nice information i really appreciate your work in this and looking for more such good posts in the future thank you

Posted by pawel34ss at

Great site and a great topic as well I really get amazed to read this. It’s really good. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. Assignment help | Assignment Expert | Marketing Assignment help | Law Assignment help | Make My Law Assignment

Posted by assignment at

Visit

Posted by Lyrics with music at

Much obliged for the online journal stacked with such a variety of data. Ceasing by your site assisted me with getting what I was searching for. Literature Review Assignment help | Assignment help

Posted by guzarish at

Thanks for this article. It contains the information i was searching for and you have also explained it well. We are also a service provider that deal in the assignment writing help sector. So, the students struggling to write their college assignments can opt for our online HRM Assignment help and can get a quality assignment written from us.

Posted by dhoka at

Blog gave us useful information to work. You have done an amazing job.
TP-Link Router Support

Posted by Tp-link Router Support at

Your blog is great. i read a lot of interesting things from it. thank you very much for sharing. hope you will update more news in the future.

Posted by windows 7 product key at

Thanks you for very nice its sharing

Posted by website designing company in India at

brass bells

Posted by handicraft at

Thanks for sharing this post! It was great!

Posted by hostingslack at

brass jhula chain

Posted by handicraft at

It is one of the finest websites I have stumbled upon. It is not only well developed, but has good content as well. It could prove to be an inspiration for many students for their assignments. Assignment Help Online is into assignment writing service sector and helps pupils in completing their Programming Assignment Help.

Posted by Programming Assignment Help at

Students Assignment Help offers the best Singapore assignment help service to the understudies. We have 3000+ master journalists and they serve the amazing quality task composing administrations to the understudies.

Posted by Singapore assignment help at

Amritsar Escort service is the highest level of professional escort precious that one platform. We open minded person and your privacy and 100% beautiful, stunning and respect are a team to make sure to provide professional call girls in Amritsar for your time.

Call Girls in Amritsar

Follow us:
Ambala Escorts
Jammu Escorts
Pune Escorts
Shimla Escorts
Chandigarh Escorts

Posted by Call Girls in Amritsar at

Thanks for sharing..I loved your article
<a href="http://www.callgirlsinjammu.com/" rel="nofollow">Call girls in Jammu</a>
<a href="https://www.kolkataescortsgirl.com" rel="nofollow">Call girls in Kolkata</a>
<a href="http://gurgaon.bluelovenight.com" rel="nofollow">Call girls in Gurgaon</a>
<a href="http://www.jessicajoshi.com" rel="nofollow">Call girls in Pune</a>

Posted by call girls in kolkata at

This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post.

Posted by a course in miracles at

You completed a few fine points there. I did a search on the subject and found nearly all persons will go along with with your blog.

Posted by click over here at

I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing.

Posted by find out here at

This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it,

Posted by check here at

This article is an appealing wealth of informative data that is interesting and well-written.  I commend your hard work on this and thank you for this information.  You’ve got what it takes to get attention.

Posted by learn more here at

This article is an appealing wealth of informative data that is interesting and well-written.  I commend your hard work on this and thank you for this information.  You’ve got what it takes to get attention.

Posted by http://www.priyankasen.com at

I read your blog frequently and I just thought I’d say keep up the amazing work!

Posted by harga mobil at

This is great information for students. This article is very helpful i really like this blog thanks. Thank you for sharing the amazing article. keep up it.

Posted by net worth at

very interesting information, I really like it because it can add insight for me more broadly, thank you very much for this extraordinary information
obat herbal benjolan di jempol kaki akibat asam urat, obat luka jatuh herbal agar cepat kering tanpa membekas,

Posted by ringgo at

I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates.

Posted by Cyber Careers at

I have read your blog it is very helpful for me. I want to say thanks to you. I have bookmark your site for future updates.

Posted by Cyber Careers at

Only aspire to mention ones content can be as incredible. This clarity with your post is superb and that i may think you’re a guru for this issue. High-quality along with your concur permit me to to seize your current give to keep modified by using approaching blog post. Thanks a lot hundreds of along with you should go on the pleasurable get the job done.

Posted by video at

Build DSL is good for javasript.

Posted by How do you write a great research paper at

Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us.

Posted by online courses at

Thanks for sharing this quality information with us. I really enjoyed reading. Will surely going to share this URL with my friends.

Posted by www.foundationstudio.ca at

Good news. Appreciate this post. Thank you for compiling and sharing it.
We provide breaking coverage for the iPhone, iPad and all latest Apple News and update.

Posted by Mobile App News at

I am glad you take pride in what you write.  This makes you stand way out from many other writers that push poorly written content.

Posted by pdf  at

This is really a nice and informative, containing all information and also has a great impact on the new technology. Thanks for sharing it

Posted by a course in miracles at

This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.

Posted by a course in miracles at

I found your this post while searching for some related information on blog search...Its a good post..keep posting and update the information.

Posted by ค่ารักษา at

Those Who Come To Read Your Article Will Find Lots Of Helpful And Informative Tips

Posted by escribiendo un caso de estudio at

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.

Posted by business at

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.

Posted by business tips at

visit here

Posted by Ladies Designer Dress in Mumbai at

for more information visithere

Posted by web designing company at

This article was written by a real thinking writer.  I agree many of the with the solid points made by the writer.  I’ll be back.

Posted by rentalcity.ca at

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.

Posted by meal plan for extreme weight loss at

Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.

Posted by havaianas at

Add your comment