Fork me on GitHub

I will second the semi-negative Korma experience - it works well with simple data models, but starts getting unwieldy if you need to do more complex things. Also global state makes for some occasionally hard-to-understand magic. This was a while ago though, so could be different now. Currently using HoneySQL and some macros to simplify the coercion from relations to entity maps, very happy with the direct control over the statements.


In spec I want to model a map where some keys depending on the value of one key. {:type :circle :radius 12} and {:type :rectangle :x-side 10 :y-side 10. Should I write ::circle and ::rectangle and then do (s/def ::shape (s/or :circle ::circle :rectangle ::rectangle) ?

Michael Fiano06:03:46

Is there any macro or such for checking a bunch of predicates at once without anding and passing the same argument over and over? For example I want to convert this: (and (int? x) (pos? x) (odd? x)) into this: (some-op int? pos? odd? x) or ((some-op int? pos? odd?) x)

Michael Fiano06:03:14

Scratch that. every-pred is what I was looking for.


How can I specify something like {:type :circle } and {:type :rectangle } and I can't have it as (s/def ::circle-type #{:cricle } and use (s/def ::circle (s/keys ::req-un [::circle-type]) and rectangle-type because then it will make user supply :circle-type and :rectangle-type instead of using :type with different values.


@jmckitrick @arrdem consider spicerack, "a Clojure wrapper for MapDB — a fast, disk-persistent data-structures library."


Clojure-idiomatic storage of Clojure data structures to disk


is enlive abandoned?


@mailmeupinside more “done” than abandoned.


:thinking_face: interesting God, these new emotes are disgusting thanks for answering though


I started walking through an om next tutorial a few months ago, now i am working on a re-frame project and when i download the project and lein figwheel it starts a server on the specified port and says it compiling the right resource buy my browser loads the om next tutorial html. I tried changing the port but still no luck. any ideas?


'lein clean' before 'lein figwheel' and/or make sure there is nothing cashed in your browser.


i've tried both.. i even stooped so low as to open up ie browser since i know it won't be cached there tumbleweed


Maybe there's a bug in the new cljs cashing, I'm not sure where it's stored.


i installed bash on windows and lein / java on there and oddly it still is showing me the om project html :man-shrugging:


okay, so oddly enough if i hit localhost:3450 it shows the om next page but if i hit localhost:3450/example.html then it shows the right resource


someone had the experience of useing postal for smtp mail delivery and get something spam filtered

Caused by: 
com.sun.mail.smtp.SMTPSenderFailedException: 550 5.7.1 Rejected: <removed-my-ip> listed at |
it's from my dev machine, worried if this could happen on production server


My colleagues like the LINQ-inspired syntax of Slick. I don’t see anything like that for Clojure yet


korma is the closest I think


clojurians don’t seem to like cutesy DSLs as much


Linq leans quite hard on the type system in c#. It’s a bit harder to pull that off in a lisp


I found an article pointing out some serious performance problems with Slick, actually


Slick was horrible to work with, 3 years ago, for me


I assume you're talking about Scala's slick


@matan Can you fill me in? I have a colleague who insists it’s wonderful, and he is reluctant to us Clojure without something similar. I need to convince him, or find an acceptable compromise.


Well, my best explanation would be he's more intelligent than I was/am, so as to get along with the horrible API that Slick used to be at the time


Not only the API, but I think using slick implies avoiding query optimization or some other performance implication I cannot correctly recall now. Sorry for not being helpful.


Anyway I don't think any Scala dev will switch to clojure, unless you're one already 🙂


I do recall reading about query optimization issues. And I’m the hard-core Clojure guy. I have one colleague 100% on my side, and this guy is supportive but with reservations.


would it be very non-idiomatic to create my own exception class? couldn't find any mention of it in the docs either, only an outdated discussion here


@matan yes, use ex-info which allows attaching arbitrary data to an exception


great! I had a feeling there's a more idiomatic way


you can use a multi-method or whatever on the ex-data of the exception in the catch block


so essentially that's an exception type that only clojure code would normally use... with some clojuresque goodies with it


i'll read it up


@matthewdaniel are you really using om next?


@matan I was trying to learn it, didn't make it very far before getting distracted. I'm now learning re-frame


I've always regarded them to be something that will never catch on


them? you mean both re-frame and om?


from a naive perspective, they look like opinionated layers of libraries that nobody is using nor maintaining very properly


I hope to be disproven..


i picked re-frame since i am coming from react/redux world and it looked pretty close. do most people just use plain reagent?


don't want to mislead you, i would not know


to avoid installing and battling bleeding edge libs only to Stockholm syndrome yourself with them, you should probably ask (somewhere)


I think there are a lot of users of re-frame and I think it's being well maintained. I personally chose to learn and build something with for 2 years. It was hard to learn but there are some very good ideas in there. There's a group of people who have created a framework building on top of (now replaced it with their own) it's called #fulcro and its github repo is very active:


wow, good to know. om looks really promising so good to know there is an active implementation


would you really build something on something built on top a variant of the experimental (good ideas granted) for a hobby project, maybe


nice story acutally: > Fulcro expands on the work of David Nolen’s Om Next, and that code represents about 30% of 2.0’s code base. Much of the core API is similar, but this library is intended to be an easier-to-use alternative that follows the original simplicity of design while eliminating some experimental features of that library, and rounding out the story with a complete concrete implementation that is easy to use.


I think it's reasonable for companies to consider building their product(s) on top of Fulcro


@matan ExceptionInfo is a subclass of exception, you catch that specifically - yeah


you can have a clause for ExceptionInfo and another for regular Exception etc.


yep, got it :thumbsup:


I assume there's some idiom for making sure the exception is a clojure (ex-data) one too is there?


otherwise a plain unexpected exception in some Java component would crash a naive clojure catch block


@matan you can have multiple catch blocks (try (f) (catch ExceptionInfo e ...) (catch Exception e ...))


oh well, I'll just catch ExceptionInfo


that's what I was trying to say earlier


it's the same thing you'd have to do if you subtyped Exception, which was your original question


great to have clojure exceptions which carry data!