Fork me on GitHub
#clojure
<
2016-07-10
>
tengstrand08:07:53

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.

tengstrand09:07:28

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

jimmy10:07:28

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 😄

chbm11:07:29

anyone has experience with clojure on non oracle jvm ?

tengstrand11:07:44

Domain Driven Design, by Eric Evans.

pesterhazy11:07:15

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

pesterhazy11:07:30

not without major adaptations

bojan.matic13:07:14

meaning, it’s pretty much useless

bojan.matic13:07:22

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

jimmy15:07:21

@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 .

pesterhazy15:07:07

@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

donaldball15:07:05

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?)

cddr18:07:09

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).

juhoteperi18:07:51

@cddr: I believe conformers are supposed to answer that use case: https://clojure.github.io/clojure/branch-master/clojure.spec-api.html#clojure.spec/conformer but they are very different to Schema coercers.

cddr18:07:23

Oh your so conformist :-)

cddr19:07:30

I guess you'd need pairs of conformers though.

eudes21:07:30

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:

eudes21:07:00

Wow! Exactly! Thanks!

gowder22:07:27

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?"

gowder22:07:46

(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)

gfredericks22:07:05

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

gowder22:07:18

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.

gfredericks22:07:39

yeah that's a good high level summary

gfredericks22:07:56

http generally supports arbitrary binary POST bodies as well

chbm22:07:58

encode/decode base64 is native on js platforms

gfredericks22:07:14

so whichever approach is easier for you

gowder22:07:38

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!

gfredericks22:07:58

its length is not too stupid