Then go watch this video:
http://ryanflorence.com/2012/javascript-coffeescript-rewrite/
Then go watch this video:
http://ryanflorence.com/2012/javascript-coffeescript-rewrite/
Things are a little slow today and I was tired of not having some type of plug-in for looking up the definition of words while reading so I decided to cook up my own real quick.
Give it a shot:
https://chrome.google.com/extensions/detail/eeepadhockifhkeglihhapjdhkcpcfal
PS: You might have to install a beta version of chrome first.
It’s pretty basic, you just select some text in the browser and a little book icon shows up in the address bar. If you click it, it will open a new tab for you at dictionary.com with the selected text already searched for. Nice and simple.
While it didn’t take long to do it, I have to admit doing the whole thing in javascript was a less than savory experience. I think I’m spoiled by my static languages.
If you haven’t heard of it check this out:
http://www.tinlizzie.org/ometa/
I was just reading his Ph.D. dissertation linked on that page and this quote is really jumping out at me:
OMeta’s key insight is the realization that all of the passes in a traditional compiler are essentially pattern matching operations:
• a lexical analyzer finds patterns in a stream of characters to produce a stream of tokens;
• a parser matches a stream of tokens against a grammar (which itself is a collection of productions, or patterns) to produce abstract syntax trees (ASTs);
• a typechecker pattern-matches on ASTs to produce ASTs annotated with types;
• more generally, visitors pattern-match on ASTs to produce other ASTs;
• finally, a (naive) code generator pattern-matches on ASTs to produce code.
He is so right. It seems that pattern matching might be the other side of the coin of Transformation. Great stuff.
You must be logged in to post a comment.