Fork me on GitHub

I’m using Light Table. I can evaluate expressions in the text editor by pressing <cmd>+<enter>, for example: (eval 123) But when I try to evaluate only: 123 …then nothing happens.


I think this was the wrong forum for this question, so I have posted it at the LightTable Google Discussion group instead 😉


hi guys, do we have any good example of directory structure for ddd project in clojure ? This is what I found in Symfony ? Any idea would be appreciated 😄


anyone has experience with clojure on non oracle jvm ?


Domain Driven Design, by Eric Evans.


as that's quite heavily biased toward OOP, I'd be skeptical about using such a structure as a basis for a clojure project


not without major adaptations


meaning, it’s pretty much useless


clojure differs from PHP quite a lot, you need to approach it with a new way of thinking


@pesterhazy: it's domain driven development. @bojan.matic: totally agree, but I find domain ddd quite useful in architecting big project. With clojure we can simplify some abstractions in the design .


@nxqd: I'd be interested in hearing how ddd ideas could be translated to a world of values, not objects, and if anything useful remains


I don’t think ddd is incompatible with clojure, at least as I understand it. A clojure program hewing to ddd would tend to have mostly pure fns that express the logic of the domain and take care to be clear about the domain models (data structures) and interfaces between bounded contexts (protocols, queues?)


Has anyone given much thought to how clojure.spec can be used in conjunction with serialization formats. Basically what is clojure.spec's answer to prismatic/plumatic coercions (even if it's not implemented yet).


@cddr: I believe conformers are supposed to answer that use case: but they are very different to Schema coercers.


Oh your so conformist :-)


I guess you'd need pairs of conformers though.


Hello! There is any way to convert a let bindings to a map, using the names as keywords? Like the example below, but, in a more concise way:


Wow! Exactly! Thanks!


Does anyone know of a good library or just general wisdom for working with binary data passed between cljs and clj? I'm trying to scrape and send PDFs from a hybrid js/cljs chrome extension to a clj server, but I don't know basically anything about binary data, so it's like "JavaScript makes this stuff into something called a blob, but then what happens serverside?"


(Hmm, I dimly recall seeing a clojurewerkz library with binary data in the description... wonder if I can learn this stuff just from those docs, heh)


hex and base64 are standard encodings of binary data into friendly ascii


Hmm... Thanks @gfredericks ... is it just as simple as "find something on the js/cljs end that turns a PDF into base64," then "find something on the clj/java end that turns a base 64 back into a PDF?" This is a low load project, so if that's as easy as it is, then I might just slap something horribly inefficient together and run with it.


yeah that's a good high level summary


http generally supports arbitrary binary POST bodies as well


encode/decode base64 is native on js platforms


so whichever approach is easier for you


Awesome, thanks y'all! Unfortunately it looks like there are a bunch of chrome api restrictions prohibiting just casual passing around of binary data between the bit of the extension that can read a page and the bit that can interact with the outside world... but if a base64 encoding is just a normal ASCII string, even if it's a stupidly long ASCII string, then I can do whatever I want with it. Yay!


its length is not too stupid