TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Functional Programming in JavaScript using LiveScript and prelude.ls

60 pointsby 0x1997almost 13 years ago

8 comments

jhickneralmost 13 years ago
I really like the coffeescript + haskell feel. I always miss haskell's '$' for function application and '.' for composition. LiveScript has both (&#60;| and .).<p>Check out the "10 LiveScript one-liners to impress your friends" post. Great stuff: <a href="http://gkz.github.com/LiveScript/blog/livescript-one-liners-to-impress-your-friends.html" rel="nofollow">http://gkz.github.com/LiveScript/blog/livescript-one-liners-...</a>
petitmiamalmost 13 years ago
LiveScript is an interesting choice of name. JavaScript was officially called LiveScript back in Netscape Navigator 2.0 beta.
评论 #4135872 未加载
coenhydealmost 13 years ago
This is fantastic! I love that it has currying and composing. I'm going to switch from CoffeeScript to LiveScript.
riffraffalmost 13 years ago
why use<p><pre><code> map (-&#62; it.length &#62; x), list map (call \toUpperCase), 'haha' </code></pre> for functions with only one free variable?<p>IMHO it would be prettier to have something like scala's _<p><pre><code> map (_.length &#62; x), list map (_.toUpperCase), 'haha' </code></pre> i.e. automatically build a closure when _ is used eithout the need for additional anonymous function syntax
评论 #4136166 未加载
评论 #4140009 未加载
ne0codexalmost 13 years ago
Interesting, but I strongly dislike the use of whitespace indentation for new statements/segments of code,<p>it<p><pre><code> will get tedious when you are nesting multiple blocks of code. </code></pre> And I like it when Xcode highlights the brackets/parenthesis because it's just easier to pick up ( and ) and { and } from a line of text.
评论 #4136456 未加载
chiialmost 13 years ago
have you heard of <a href="http://roy.brianmckenna.org/" rel="nofollow">http://roy.brianmckenna.org/</a> ? Its basically haskell in javascript.
评论 #4136041 未加载
egeozcanalmost 13 years ago
I'm a JavaScript fan and I'm impressed. Still feel like a bit overwhelmed with so many new ideas though. By the way, does LiveScript (the name really makes me smile and even giggle) support source maps? see <a href="http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/" rel="nofollow">http://www.html5rocks.com/en/tutorials/developertools/source...</a> for more info
adrusialmost 13 years ago
while it's a great language, and I was a fan of coco for a while, my experience with coco was that it was like a ghost town and I was one of the only users.
评论 #4136065 未加载