Fork me on GitHub

@spacepluk: with a delay of a day, here is the tutorial trying to explain how to make a library compliant with Reader Conditional extension. HIH.


is there a version of some that returns the value, not (pred value)?


e.g. (first-val odd? (range)) => 1


@wei: Not that I know of. I always use (first (filter pred coll)) for that.


why does for example (doc inc)say clojure.core/inc ([x]) and not clojure.core/inc (x) ?


([x]) looks to me like a vector should be passed


@solicode: I went with something similar (first (drop-while #(not (pred %)) coll)


@wei: #(not (pred %)) is better written as (complement pred)


@notjonas: Because it can have multiple arities. It's showing all those arities as a list. inc just happens to have one. An example of one that returns more to show this is range. (doc range) will give you:

([] [end] [start end] [start end step])
Meaning you can do (range), (range end), (range start end), etc.


@solicode: aha thanks for the explanation


In your opinion which graph database best fits with Clojure? Datomic? Neo4j? OrientDB? Other?


check out datascript as well


Depends on the kind of data/volume/access pattern/budget more than anything


Hi, I am trying to use sparkling against a standalone cluster, however i get the following message on spark master logs


6/01/09 21:00:14 INFO LocalActorRef: Message [akka.remote.transport.ActorTransportAdapter$DisassociateUnderlying] from Actor[<akka://sparkMaster/deadLetters>] to Actor[<akka://sparkMaster/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FsparkMaster%40192.168.1.100%3A64328-2#27545407>] was not delivered. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. 16/01/09 21:00:50 ERROR EndpointWriter: AssociationError [<akka.tcp://[email protected]:7077>] <- [<akka.tcp://[email protected]:64333>]: Error [org.apache.spark.deploy.DeployMessages$RegisterApplication; local class incompatible: stream classdesc serialVersionUID = -5495080032843259921, local class serialVersionUID = 352674063933172066] [ org.apache.spark.deploy.DeployMessages$RegisterApplication; local class incompatible: stream classdesc serialVersionUID = -5495080032843259921, local class serialVersionUID = 352674063933172066 at at at a


i have figured this out, I was using the latest sparkling with spark 1.2.0. Now i have moved to spark1.5.0 and everything works


Does this line:

(let [{:keys [list/one list/two]} …] …)
bind local symbols one and two?


So, the namespace part is just discarded then.


locals can't have namespaces


Yeah, I know, but I never seen let used like that, so, I didn’t know it would automatically discard the namespace part to make a local. That’s actually neat.


it was added in 1.6 IIRC


@pupeno : you did a deep dive into reagent/re-frame, correct? Will be interesting to hear comparison/thoughts on


donmullen: yes, I did and once I’m done figuring out Om Next (that is, if sales, marketing and product validation do not distract me too much), I’ll be happy to do that.


donmullen: I can tell you that I’m very intrigued by Om Next’s approach to APIs in which it can get all the data for the app in one call. My super tiny project already makes like 5 calls and that’s a very inefficient. @dnolen also advocates against a visible event system and even though I haven’t suffer this pain yet, I can see his point as that’s one of my fears with re-frame.


My plan is to convert NinjaTools to Om Next, so we can examine them side by side.


Does anyone here have any experience with clj-rethinkdb? I’m trying to get without to work in a filter but nothing I pass to it which describes the field I want to exclude seems to work.


for the ones new to clojure as I'm, some nice app examples from heroku


As I mentioned I'm new to Clojure. I'm developing a microservice using clojure,compojure, ring, etc. I've been following some tutorials and books however most part of them don't include the test part of it and when they do, like Parens of the dead, they don't explain how to setup it. Can you describe or point to a tutorial that covers how to setup a testing environment (maybe a way to watch / run tests as they are modified)?


@esnunes: you mean like setting up unit or integration tests? If so you can try the clojure test ns.


@tom: sorry, I think I wasn't clear enough. I mean the workflow to run tests. How to configure my editor, lein project, etc


maybe I'm just making the things complex. In node-js I have a package.json script that watches for changes and re-run the tests.


@esnunes, it matters what your editor is and what test framework you’re using. At the very least, you can run lein test. I usually use expectations ( with lein-expect to run my tests automatically whenever I save a file.


that's what I was expecting simple_smile, the lein plugin


uhmm I thought lein was the standard build tool (note: learn more about difference between *boot and lein*)


@esnunes: Sounds like you are doing mostly backend stuff. Boot is great tool for that as well - check out the #C053K90BR channel, where several people use docker + boot for deployment. Clojurescript and custom builds are better suited to using boot IMO : modern-cljs 2nd edition steps through using boot :


@esnunes, boot is just a different approach and, unlike Leiningen, it’s still actively developed. I prefer lein but honestly it’s mostly because it’s what I’m more familiar with. boot stays in the background for me, something to learn one day.


@donmullen: in the js/node-js world I do both backend and frontend. I will take a look on boot too. I extensively use docker in production as well as in development.


One last note, if I were new to Clojure, I’d learn boot. I’d learn lein too simply because it’s been the ’standard' but I’d use boot for all my projects.


thanks, it is always good to receive some advices from experienced devs. I'm travelling this tough journey to learn Functional paradigm, Clojure, Emacs, main clojure libs, ClojureScript + Om, all at once.


Right on and best of luck on your adventure. We’re here for any and all questions.


@esnunes: I just did the same thing, starting about 8 months ago


If you use the Cursive plugin with IntelliJ IDEA as your editor environment there is test integration built into that.


You mentioned Emacs and lots of folks use Spacemacs as well. There is an #C050AN6QW channel that's a good resource.