Re: Liberator with ring-cors

2016-10-14 Thread Kenny Liu
Yep, I tried a non-liberator POST, and it went through perfectly. So right now it seems like liberator is doing something wonky to my requests/responses. On Friday, October 14, 2016 at 8:22:29 PM UTC+8, Kenny Liu wrote: > > Anyone know if this all works out of the box? Preflight OPTIONS is 200

Re: Liberator with ring-cors

2016-10-14 Thread Kenny Liu
Thanks for the tip, yep same issue. I'll see if I can get it working with a non-liberator POST. On Friday, October 14, 2016 at 11:22:51 PM UTC+8, Francis Avila wrote: > > You could try https://github.com/jumblerg/ring.middleware.cors as your > cors lib instead. This would at least help you

Re: Liberator with ring-cors

2016-10-14 Thread Francis Avila
You could try https://github.com/jumblerg/ring.middleware.cors as your cors lib instead. This would at least help you isolate if it is a liberator issue or not. On Friday, October 14, 2016 at 7:22:29 AM UTC-5, Kenny Liu wrote: > > Anyone know if this all works out of the box? Preflight OPTIONS

Re: Is there an easy way for s/keys spec to work against both qualified/unqualiffied keys at the same time?

2016-10-14 Thread Leon Grapenthin
They are not exclusive (s/def ::baz (skeys :req [::foo] :req-un [::bar])) works. On Friday, October 14, 2016 at 7:07:39 AM UTC+2, Ikuru Kanuma wrote: > > Hi, > > I was reading the official spec guide's explanation for the s/keys macro, > played around with it a bit, > and was a little

Re: Is there an easy way for s/keys spec to work against both qualified/unqualiffied keys at the same time?

2016-10-14 Thread Mauricio Aldazosa
Hi, You can achieve that using *spec/or*: (s/def ::map-with-numbers (s/or :qualified ::map-with-numbers1 :unqualified ::map-with-numbers2)) (s/valid? ::map-with-numbers {::some-number 3}) => true (s/valid? ::map-with-numbers {:some-number 3}) => true ​ Cheers, Mauricio -- You

Re: complex made simple?

2016-10-14 Thread Raoul Duke
we need the TRIZ of software :-/ -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe

Re: Diffing clojure data structures faster

2016-10-14 Thread Paulus Esterhazy
Great work, Dan! I think adding a way to diff standard clojure data structures efficiently would open up very interesting possibilities. Two examples: - log changes in reagent's state-atom (clojurescript) - build a simple durable "database" atom (persistent across process restarts) using a

Re: Diffing clojure data structures faster

2016-10-14 Thread Dan
Thanks for the feedback! Glad to hear that it might be of interest. I did some more tests this time in clojure: ;; test diff on one small change (def m2 (zipmap (range 1) (range 1))) (crit/quick-bench (diff-data m2 (assoc m2 42 :a))) Execution time mean : 243,902630 µs

Liberator with ring-cors

2016-10-14 Thread Kenny Liu
Anyone know if this all works out of the box? Preflight OPTIONS is 200 but the GET/POST fails. My attempt to get it working: (def app "Order must be reversed. See: http://stackoverflow.com/q/19455801/894091; (-> (bidi/make-handler v1-routes) (wrap-defaults api-defaults)

Re: complex made simple?

2016-10-14 Thread Leon Grapenthin
Rich has mentioned Polyas "How to solve it" in several talks. It's a great book on the matter. On Friday, October 14, 2016 at 11:59:56 AM UTC+2, Alan Forrester wrote: > > In Rich Hickey's talk "Simple Made Easy" he mentioned that there are > ways to take a system that somebody else wrote that

Re: complex made simple?

2016-10-14 Thread Colin Yates
It has been a while since I watched, but are you asking in terms of solutions (e.g. process modelling) or implementations (e.g. architectural styles). It is really hard to give any comprehensive answer here but some 'tools' I have found useful are: - clear thinking - identifying abstractions -

complex made simple?

2016-10-14 Thread 'Alan Forrester' via Clojure
In Rich Hickey's talk "Simple Made Easy" he mentioned that there are ways to take a system that somebody else wrote that is complex and simplify it. Can anyone recommend some resources on how to do this? Thanks, Alan Forrester -- You received this message because you are subscribed to the

Re: Love the Medley library :)

2016-10-14 Thread Colin Yates
Thanks for the prompt to look at that again. I am not ashamed to say that after doing Clojure full-time for years now, I still find value in seeing other people's project.clj let alone their actual code :-). On 14 October 2016 at 04:17, Alan Thompson wrote: > I had nearly

Re: [ANN] CIDER 0.14 (Berlin) released

2016-10-14 Thread Dragan Djuric
Thank you for the great tool. Happy birthday! On Friday, October 14, 2016 at 9:08:50 AM UTC+2, Bozhidar Batsov wrote: > > Hey everyone, > > Yesterday I released CIDER 0.14 (Berlin). It's a rather small CIDER > update, mostly focusing on bug fixes. Thanks to everyone who contributed to > this

[ANN] CIDER 0.14 (Berlin) released

2016-10-14 Thread Bozhidar Batsov
Hey everyone, Yesterday I released CIDER 0.14 (Berlin). It's a rather small CIDER update, mostly focusing on bug fixes. Thanks to everyone who contributed to this release! The release notes are here https://github.com/clojure-emacs/cider/releases/tag/v0.14.0 Enjoy! P.S. Once again I'd like to