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.

ClojureScript 1.7: ClojureScript can compile itself

536 pointsby programnaturealmost 10 years ago

21 comments

krat0sprakharalmost 10 years ago
&gt; We grabbed a string out of CodeMirror, read it via tools.reader into persistent data structures, passed it into the ClojureScript analyzer, constructed an immutable AST, passed that AST to the compiler, and generated JavaScript source with inline source maps and eval&#x27;ed the result. All of this happened inside of your web browser.<p>This is just fantastic! As David himself mentions - this might not be extremely pragmatic but it sure as hell as cool. For me it means that I can get back to writing my web-based Clojure book without being dependent on Himera[0], which although great, is really hard to work with.<p>Awesome work by @swannodette and team!<p>[0] - <a href="https:&#x2F;&#x2F;himera.herokuapp.com&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;himera.herokuapp.com&#x2F;index.html</a>
评论 #9984164 未加载
评论 #9986601 未加载
评论 #9985601 未加载
jeletonskellyalmost 10 years ago
I swear David Nolan does not sleep.
评论 #9984518 未加载
评论 #9984597 未加载
评论 #9983492 未加载
评论 #9985201 未加载
robohamburgeralmost 10 years ago
The most interesting case for me will be fast starting clojurescripts as the author points out.<p>The one area I have not been happy with is clojure&#x27;s startup times so hopefully this fixes that going forward.
评论 #9983644 未加载
tbatchellialmost 10 years ago
This also means that we can use clojurescript as a scripting language. Will make some systems automation much more fun!
评论 #9983556 未加载
评论 #9983410 未加载
dominotwalmost 10 years ago
I have been looking at functional languages for frontend. But, I guess I am one of those people who just can&#x27;t unsee the parentheses in lisp languages .<p>How does clojurescript compare to elm&#x2F;purescript ?
评论 #9985608 未加载
评论 #9984645 未加载
评论 #9983776 未加载
评论 #9984618 未加载
评论 #9984782 未加载
评论 #9986283 未加载
评论 #9985635 未加载
pacomerhalmost 10 years ago
I&#x27;ve been wanting to get into ClojureScript (to clean my development practices, etc) but I&#x27;m wondering if I need to be a Clojure user. Does it make sense for a Javascript developer to just jump straight to ClojureScript?. I&#x27;ve seen PureScript also.
评论 #9983618 未加载
评论 #9985473 未加载
评论 #9984218 未加载
评论 #9983631 未加载
netcraftalmost 10 years ago
Does this mean I could use compile and then require clojurescript modules in node? Today I use babel to &quot;transpile&quot; es2015 to es5 and then load those in, could I do something similar with clojurescript?
评论 #9983755 未加载
评论 #9986730 未加载
truncatealmost 10 years ago
I&#x27;m curious if ClojureScript uses the original clojure library code (eg, drop, take, map...) or re-implements them? I tried to find something in codebase, seems like it uses original.
评论 #9984493 未加载
Turing_Machinealmost 10 years ago
This is fantastic. It will be a lot easier for noobs to get their feet wet if they can use use the full language without having to fool around with installing a Java toolchain.
评论 #9987294 未加载
评论 #9984644 未加载
agumonkeyalmost 10 years ago
How far clojurescript is to be clojure&#x2F;js. By that I mean how close the JVM and JS are semantically. There were discussions about that few months ago, because of differences deep down between platforms builtin types (js integers, etc). Swannodette also explained that cljs and clj don&#x27;t share as much code as the team would like. How much clojure code would run correctly as-is on cljs ? Without having to use specific reader conditionals.
intellectablealmost 10 years ago
Thanks, for all the fish ( by fish I mean awesome code ) @swannodette and team! Can&#x27;t wait to use Om Next.<p>Also looking forward to seeing some code examples of Demand-Driven Architecture[0]. Does anyone know of any edifying clojure code examples?<p>[0] <a href="http:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;domain-driven-architecture" rel="nofollow">http:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;domain-driven-architectur...</a>
nextosalmost 10 years ago
I wonder if one of my favorite libraries for Clojure, Anglican [1] a probabilistic programming language, can be ported to ClojureScript without much effort. One could do amazing things with this.<p>Keep up the good work. Clojure &amp; ClojureScript are awesome.<p>[1] <a href="http:&#x2F;&#x2F;www.robots.ox.ac.uk&#x2F;~fwood&#x2F;anglican&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.robots.ox.ac.uk&#x2F;~fwood&#x2F;anglican&#x2F;</a>
评论 #9984818 未加载
dgreenspalmost 10 years ago
How does the output of the ClojureScript-compiler-in-ClojureScript compare to the real thing? Do you lose the Google Closure optimizations, and if so, does that mean it isn&#x27;t a good idea to compile your web app using the ClojureScript compiler running in Node (for example)? It&#x27;s nice if you can compile ClojureScript on a machine without Java.
评论 #9985864 未加载
retrogradeorbitalmost 10 years ago
This is a huge milestone! I had a problem I was solving with Clojurescript six months ago and having access to the reader would have solved it perfectly, with lisp elegance. Instead I had to make a mess.<p>I think this opens huge computer science educational opportunities. Imagine a LOGO DSL inside your browser. With all the power of cljs. I am very excited!
hencqalmost 10 years ago
Wow, this is quite amazing! Does this also mean that we will be able to write macros in Clojurescript?<p>Are there any plans to use mostly the same backend for Clojure and Clojurescript? It seems that since the languages are almost the same, it&#x27;s only the code generation part that would be different?
评论 #9983440 未加载
评论 #9983456 未加载
评论 #9983450 未加载
bmillarealmost 10 years ago
I think an article outlining the details behind the non-trivial example, specifically on configuring how library names are resolved and how it can be modified dynamically, would be instructive.
评论 #9985311 未加载
DAddYEalmost 10 years ago
Awesome!!! Now we want Clojure in Clojure :)
评论 #9984291 未加载
jimmcslimalmost 10 years ago
When will the module support be released? Soon I hope! Thanks for the great work on all this.
评论 #9984843 未加载
edemalmost 10 years ago
For some reason I feel like ClojureScript starts to transform into a new Clojure dialect (which runs on node.js and not on a JVM). Am I correct?
评论 #9984261 未加载
评论 #9984636 未加载
likeclockworkalmost 10 years ago
Hm. This allows putting functions into edn that gets sent to the browser now, then doesn&#x27;t it? Since ClojureScript can eval now?
评论 #9986756 未加载
avodonosovalmost 10 years ago
Finally, thanks god