3 ms·
It's impressive to see how many runtimes Clojure has already been ported to. I'm starting to get my hopes up for a world where a Clojure FRP core drives apps i
by mtrimpe 13y ago
It's impressive to see how many runtimes Clojure has already been ported to.
I'm starting to get my hopes up for a world where a Clojure FRP core drives apps in a host of target languages.
- juliangamble 13y agoWhat we see in Clojure (like other Lisps) is minimal syntax directed at the idea of homoiconicity. This means that the program's structure is similar to its syntax. It also means that we can represent the program as a data structure in the language itself. So (1) Simple syntax, and (2) being able to represent the program structure in the language easily, both lead to making it easy to build compilers, interpreters and bytecode compilers. The barrier to entry for these tasks is lower in Clojure. Many would also say that (1) and (2) make Clojure a joy to program in, but I'll leave that to the reader to judge for themselves.
- nilliams 13y ago> Many would also say that (1) and (2) make Clojure a joy to program in, ... Yep, the opposing view being that the lack of syntax that some see as a benefit actually makes it inexpressive, compared to a language with more syntax that expresses its ideas more like human language (e.g. Ruby, Python). > but I'll leave that to the reader to judge for themselves. Same! Not made my mind up yet, currently struggling through the Clojure book.
- danenania 13y agoI recently came across this new Clojure book: http://www.braveclojure.com/ http://www.braveclojure.com/ Seems like potentially an accessible and entertaining intro to the language. Perhaps it could be a good way to get your feet wet before diving into one of the larger tomes.
- nilliams 13y agoThanks!
- sesm 13y agoClojure is designed as a hosted languages from the start and intentionally exposes platform semantics for many operations, such as math, strings, etc. This makes porting easier, since one doesn't have to implement "compatibility layer" for all those operations. On a side note, Clojure concurrency primitives implement different ideas compared to FRP. A good source to learn about ideas behind Clojure concurrency is this talk by Rich Hickey: http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hic... . At 1:08:25 Rich tells his opinion about FRP.
- mtrimpe 13y agoI haven't watched that part of the video yet, but I've always believed that Rich's biggest blind-spot seems to be about not realizing how Clojure's macro system can be used to rewrite regular code into FRP. Just have a look at what a macro like Javelin [1] already enables [2] and imagine how powerful that would be when combined with 'live' Datolog queries where the query results in the browser will stay up to date with the results from the logic datalog query on Datomic. I've tried explaining it to Rich at EuroClojure 2012 but I'm pretty sure he was still thinking in terms of 'classic FRP' back then. [1] https://github.com/tailrecursion/javelin https://github.com/tailrecursion/javelin [2] http://www.infoq.com/presentations/ClojureScript-Javelin http://www.infoq.com/presentations/ClojureScript-Javelin
- lukev 13y agoIt's not classic FRP, but you're basically describing core.async. Have you looked at that at all?
- mtrimpe 13y agoCore async is also an example of a very powerful macro that rewrites execution flow; but they do decidedly different things. While Core Async is about powerful non-threaded coordination of processes, Javelin is about creating self-updating non-cyclical function graphs. Basically it's about automatically keeping a derived a view from a small set of data up to date when the source data changes. It's the exact same thing a spreadsheet does for numbers, but becomes much more interesting when the derived view is a DOM tree derived from database+view state. FWIW; I was inspired by the the work of Kenny Tilton (a.k.a. Smuglispweeny) and his Cells library and manifesto [1]. His work seems to be falling in disarray, but there's still some stuff up on the wayback machine [2][3] [1] http://smuglispweeny.blogspot.nl/2008/02/cells-manifesto.html http://smuglispweeny.blogspot.nl/2008/02/cells-manifesto.htm... [2] https://web.archive.org/web/20080925125040/http://www.tilton-technology.com/cells_top.html https://web.archive.org/web/20080925125040/http://www.tilton... [3] https://web.archive.org/web/20080925113544/http://bc.tech.coop/blog/030911.html https://web.archive.org/web/20080925113544/http://bc.tech.co...