Re: [ClojureScript] cljx and cljs-in-cljs?

2014-05-18 Thread Herwig Hochleitner
I think cljx is a great tool to paper over subtle differences in the languages, that two compilers (like clj and cljs) accept, for use in projects that would like to treat those compilers as black boxes (i.e. almost all projects). A new compiler (one that could compile itself to javascript, hence

Re: [ClojureScript] cljx and cljs-in-cljs?

2014-05-19 Thread Herwig Hochleitner
2014-05-19 20:03 GMT+02:00 Wes Brown wesbrow...@gmail.com: cljs-in-cljs is also built in this style, but if the language converges, then hopefully this means that there will be less cljs and cli specific files. Is there a system by which a clj file can be compiled by cljs? My

Re: [ClojureScript] [ANN] Cats: category theory abstractions library for clojure(script).

2014-07-11 Thread Herwig Hochleitner
Hello Andrey, after having spent some time with Haskell lately, trying to wrap my head around those categorical abstractions, I enjoy your take on them a lot. At first glance, I feel your design blends in with clojure's style very well. Also, congratulations on the documentation, it's a great

Re: [ClojureScript] alts!! (and alt!!) still make sense in CLJS when a :default is specified

2014-11-10 Thread Herwig Hochleitner
Your argument makes sense, Javascript's limitation on blocking doesn't apply when wanting to read only available elements. I see little chance to have alt!! added to the cljs port, if it would need a mandatory :default arm there. Also, as Thomas noted, putting the recur into the :default would

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2496, cljs.test - a clojure.test port

2015-01-05 Thread Herwig Hochleitner
2015-01-05 20:30 GMT+01:00 David Nolen dnolen.li...@gmail.com: Definitely plans to support async and happy to take a patch. Basically I would like sugar that looks like this: (deftest foo (async done ...)) This desugars into: (deftest foo (reify IAsyncTest

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2496, cljs.test - a clojure.test port

2015-01-05 Thread Herwig Hochleitner
It's great to see unit test support in clojurescript. Are there plans to support asynchronous tests or should I keep using cemerick's cljs.test for this? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are

Re: [ClojureScript] server side cljs execution with ill-behaved :foreign-deps

2015-03-26 Thread Herwig Hochleitner
The way I do it: I use the same build for client-side and server-side rendering, but on the server, instead of calling the regular main function (which does history setup a.s.o), I just synthesize the desired state for each page, build the top-level component directly and render-to-string. That

Re: [ClojureScript] hash equality between Clojure and ClojureScript

2015-04-20 Thread Herwig Hochleitner
2015-04-20 6:03 GMT+02:00 Peter Taoussanis ptaoussa...@gmail.com: This got me wondering: is there an official contract somewhere describing hash behaviour similarities we _can_ safely depend on? I don't think there is. IIRC clojurescript _has_ duplicated the recent work to minimize collisions

Re: [ClojureScript] [ANN] Clojure 1.7.0-beta3

2015-05-16 Thread Herwig Hochleitner
Andy, I often see core dumps with Oracle JDK 1.8, when starting `lein run` and `lein figwheel` in parallel on a project. Those dumps have their native stacktraces originate somewhere from libzip.so and I always assumed that the reason was somewhere in the tooling / due to clean removing a jar

Re: [ClojureScript] goog closure ui CSS

2015-04-09 Thread Herwig Hochleitner
err: wrap-resource 2015-04-09 20:21 GMT+02:00 Herwig Hochleitner hhochleit...@gmail.com: I've had good success with wrap-resources to serve them directly from the jar. 2015-04-09 16:50 GMT+02:00 Leon Grapenthin grapenthinl...@gmail.com: Is there a canonical way to import CSS files

Re: [ClojureScript] goog closure ui CSS

2015-04-09 Thread Herwig Hochleitner
I've had good success with wrap-resources to serve them directly from the jar. 2015-04-09 16:50 GMT+02:00 Leon Grapenthin grapenthinl...@gmail.com: Is there a canonical way to import CSS files of the closure library or do I have to copy n paste them manually:

Re: [ClojureScript] [ANN] Clojure 1.7.0-beta3

2015-05-17 Thread Herwig Hochleitner
Given that the JVM shouldn't segfault in any case, that's cleary looks to me like an ibm jdk bug, that could hit other JVM languages aswell. Maybe IBM is interested in fixing it? In my case, the VM most likely has the excuse of not expecting classpath-jar files to be swapped out, but the JIT? ​

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-06-01 Thread Herwig Hochleitner
2015-06-01 17:35 GMT+02:00 Khalid Jebbari khalid.jebb...@gmail.com: So the various states are encapsulated in a go loop? In multiple go-loops, actually. I always knew that core.async could be used to model FSM's. In a way, core.async go blocks desugar into an fsm implementation (reified

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-06-01 Thread Herwig Hochleitner
Wow, big thread. I just want to offer, how I've done a FSM implementation in CLJS: - FSM edges are core.async channels - FSM state changes are represented by passing a token object (which can contain additional state vars) across an edge channel - Each state is represented by a go-loop, with a

Re: [ClojureScript] [ANN] Light Table Clojure plugin now supports modern ClojureScript eval

2015-09-22 Thread Herwig Hochleitner
Wow, thanks so much for taking this on! 2015-09-18 18:56 GMT+02:00 Gabriel Horner : > Hi all, > Happy to announce that the latest Light Table Clojure plugin now > supports modern ClojureScript eval e.g. 1.7.X. Thanks to Stephen Brady for > his work on this. > > We've

Re: [ClojureScript] Re: ANN: ClojureScript 1.9.14, clojure.spec port

2016-06-01 Thread Herwig Hochleitner
2016-06-02 4:54 GMT+02:00 David Nolen : > > We are considering aliasing support for cljs.spec. That is rewriting > clojure.spec vars in ClojureScript sources to cljs.spec but it will likely > cover more than just cljs.spec - cljs.test, cljs.pprint etc. > Interesting. Is

Re: [ClojureScript] function `arguments` object

2016-02-04 Thread Herwig Hochleitner
2016-02-04 11:59 GMT+01:00 Yehonathan Sharvit : > Thanks for the explanation about ~'. > I discover that with & it works a differently: both ~'& and & emits & > (both in clj and cljs) > Interesting, I wasn't aware of that special case in the language. -- Note that posts from

Re: [ClojureScript] function `arguments` object

2016-02-01 Thread Herwig Hochleitner
How about (defmacro defprint [func-name args & body] `(defn ~func-name [~'& args#] (print args#) (let [~args args#] ~@body))) ​ -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are

Re: [ClojureScript] function `arguments` object

2016-02-01 Thread Herwig Hochleitner
Well, for multi-arity, you'd have to parse the argument tuples. I mean, `(print ~args) will almost work, since most destructurings can also be evaluated and printed, but not so for seq destructurings a la (defprint x [fst & nxt]), which will choke on the symbol '&, trying to evaluate (print [fst &

Re: [ClojureScript] ANN replikativ 0.1.0 - strong eventual consistent P2P replication for clj and cljs

2016-01-21 Thread Herwig Hochleitner
This is great and I like the direction, you're thinking in. Have you seen the talk "I see what you mean", by Peter Alvaro ? If so, can you give me your take on the Relation between CRDTs and his usage of Datalog and Relational Algebra to achieve

Re: [ClojureScript] quoting a reader macro doesn't work

2016-02-19 Thread Herwig Hochleitner
This is only expected to work, if the #db/id reader tag is defined (which is not usually the case in clojurescript). The reason is: Quote only suppresses evaluation, not reading. Reader tags are expanded in the reader, potentially long before the compiler ever gets to see them. ​ -- Note that

Re: [ClojureScript] ANN: hasch 0.3.0

2016-03-29 Thread Herwig Hochleitner
Great! Has the hashing scheme changed from the -alpha? I'm currently using hasch to generate the signature checksum in my auth tokens so for my use case, hashing - scheme stability isn't important, but it's great to have it finalized anyway. BTW, I've written a content-hashed file store:

Re: [ClojureScript] Re: How about ClojureScript and CommonJS now?

2016-05-22 Thread Herwig Hochleitner
2016-05-22 17:38 GMT+02:00 Dustin Getz : > I use webpack as well for npm ecosystem interop, really the only annoying > bit is shimming out cljsjs from all cljs deps which sometimes involves > forking. > I also use webpack to include npm packages. It's working, but I'd love

Re: [ClojureScript] When to use dynamic vars in ClojureScript?

2016-10-18 Thread Herwig Hochleitner
2016-10-18 8:42 GMT+02:00 Daniel Compton : > > I'd really think twice before requiring your users to insert matching > pairs of mutation in their code. It goes against the grain of clojure and > is error-prone. > > Why can’t on-jsload (is that figwheel's?) just run

Re: [ClojureScript] When to use dynamic vars in ClojureScript?

2016-10-17 Thread Herwig Hochleitner
In clojure, set! can only be used on dynamic vars, that are currently bound. Apparently, clojurescript allows set! on root-bound vars, but I wouldn't rely on that. Your use case with matching set! pairs really has the semantics of just calling def. ​A much safer way to temporarily alter the root

Re: [ClojureScript] How can I implement the getter and setter of ES6 in ClojureScript?

2018-12-28 Thread Herwig Hochleitner
Am Fr., 28. Dez. 2018 um 01:48 Uhr schrieb Philos Kim : > The third party JS library I use requires implementing the static getter > method of ES6. > AFAIK ClojureScript doesn't have a construct to generate getters / setters. You can implement those via Object.defineProperty