This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-24
Channels
- # beginners (108)
- # boot (16)
- # bristol-clojurians (1)
- # cider (20)
- # cljs-dev (167)
- # clojure (64)
- # clojure-greece (4)
- # clojure-hamburg (1)
- # clojure-russia (1)
- # clojure-uk (27)
- # clojurescript (235)
- # datomic (1)
- # devops (2)
- # fulcro (80)
- # graphql (6)
- # heroku (2)
- # jobs-discuss (1)
- # jobs-rus (2)
- # lein-figwheel (1)
- # lumo (2)
- # nyc (1)
- # off-topic (22)
- # portkey (4)
- # re-frame (44)
- # reagent (39)
- # ring-swagger (9)
- # shadow-cljs (90)
- # tools-deps (5)
- # vim (8)
- # yada (2)
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.
@U8XJ15DTK you should give walkable a try https://github.com/walkable-server/walkable
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)
?
Is there any macro or such for checking a bunch of predicates at once without and
ing 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)
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.
Got it answered here : https://stackoverflow.com/a/43873866/2610955
@jmckitrick @arrdem consider spicerack, "a Clojure wrapper for MapDB — a fast, disk-persistent data-structures library." https://github.com/jackrusher/spicerack
Clojure-idiomatic storage of Clojure data structures to disk
@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
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 serverMy colleagues like the LINQ-inspired syntax of Slick. I don’t see anything like that for Clojure yet
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
@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.
@daveliepmann good find!
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 https://stackoverflow.com/questions/3835331/custom-exceptions-in-clojure
@matan yes, use ex-info which allows attaching arbitrary data to an exception
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
@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
from a naive perspective, they look like opinionated layers of libraries that nobody is using nor maintaining very properly
i picked re-frame since i am coming from react/redux world and it looked pretty close. do most people just use plain reagent?
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 om.next 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 om.next (now replaced it with their own) it's called #fulcro and its github repo is very active: https://github.com/fulcrologic/fulcro/graphs/commit-activity
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) om.next? 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.
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 ...))
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