[ANN] Stu: a lib for understanding CLJS builds via CI

2018-04-29 Thread Steve Buikhuizen
It's the first version so lots more work to do: https://github.com/stevebuik/Stu It's also a good example of how to use "react-faux-dom" with D3 in CLJS. It's a useful technique. Comments and contributions are welcome. -- You received this message because you are subscribed to the Google Grou

Generative testing of Ring web apps

2017-09-26 Thread Steve Buikhuizen
Hi all, in case this is useful to the community, I thought I'd share the repo I used in a talk at Clojure Sydney last night. https://github.com/stevebuik/stateful-generative-tests Enjoy! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to th

Re: Data expansion alternatives and idioms

2017-06-25 Thread Steve Buikhuizen
After thinking this technique through, I realised that Datomic schema is a great candidate for s/conform. Here's an example https://gist.github.com/stevebuik/17ed50824f1bb814fab9e556a37cf18a Happy to hear feedback... -- You received this message because you are subscribed to the Google Group

Re: Spec without global registry?

2017-06-12 Thread Steve Buikhuizen
I can think of a use-case in support of Mark's position. If you are building a hosted ETL web service (like Mulesoft) and you want users to be able to use spec to validate records flowing through it. One customer wants :org/postcode to be integer (i.e. US) and another wants it to be string (i.

Re: Data expansion alternatives and idioms

2017-05-23 Thread Steve Buikhuizen
> > I wanted to understand the techniques used for DSL expansion so I did a > talk at the Sydney Clojure Meetup on it. Slides are here if you are > interested. > http://tiny.cc/data-macros -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post t

Data expansion alternatives and idioms

2017-05-09 Thread Steve Buikhuizen
In various projects and presentations there are "terse" data structures being expanded into full forms. Examples are: - Pedestal "terse" routes : using protocols called ExpandableRoutes - Vase schema literals : EDN reader literals - Yada routes : I haven't used it so unsure of the techni

Re: [ANN] Counterclockwise - Clojure plugin for Eclipse

2013-10-11 Thread Steve Buikhuizen
Laurent, you rock! Auto-formatting is already saving my fingers a lot of travelling. Thanks for the great work. -- -- 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 ne

Re: Detecting login and logout using friend

2013-08-30 Thread Steve Buikhuizen
I had to do this again in another project so I tried Chas' suggestion. It is much simpler than my earlier solution. For anyone else doing this in the future, here's how you can write it: (defn check-workflow-result "check if the response contains and auth-map. If so, notify the event bus"

Re: Detecting login and logout using friend

2013-06-28 Thread Steve Buikhuizen
Thanks Chas, since my current solution "ain't broke" I'll leave it as is for now. However, the moment I need to change it, I'll try your suggestion and will post the code here as well. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: Detecting login and logout using friend

2013-06-28 Thread Steve Buikhuizen
I'll answer my own question here for future reference value. I found a much cleaner way was to create a wrapper type (deftype) for the ring session store impl. It is a simple delegating wrapper but it sees the correct cookies, regardless of the servlet container. It has the disadvantage of not

Detecting login and logout using friend

2013-06-25 Thread Steve Buikhuizen
Hi all, I'm using Friend https://github.com/cemerick/friend for auth on my webapp and I'm measuring how many people login and use the app etc. In order to do this I need to detect the login and logout events as well as the session-id cookie (I need a unique id for session) from the container.

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-28 Thread Steve Buikhuizen
Sadly, this was not the end of the story. I discovered that my fix posted above did not work properly so I decided to bite the bullet and move to shoreleave. This held the promise of using an edn reader. A couple of things were tricky in making this migration, I'll list them here for any future

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-21 Thread Steve Buikhuizen
Thanks for the support gents. Ever since Noir was deprecated I've been planning to switch to compojure and shoreleave. However I'm still in prototype mode and "it ain't broke" so I'm delaying that work until I need the next level of stability. Nice to know I'm on the right track though. -- --

Re: ClassNotFoundException when using fetch RPC from cljs

2013-03-21 Thread Steve Buikhuizen
I found the solution and it's a bit of a noob mistake. Because I'm using fetch, the server side of the RPC is defined in a noir host page. I added a :require of the view model ns to that page so that the classes are loaded above read-string call in the stack. This made it work immediately. Do

ClassNotFoundException when using fetch RPC from cljs

2013-03-20 Thread Steve Buikhuizen
I'm building a single-page app ( started before Pedestal was announced sadly ) and I'm using the fetch library to support RPC from client -> JVM server. I'm seeing a very strange behaviour. I've defined a view-model ns (full of defrecords) for the client data. This has worked well - the client

Re: ClojureScript: catching all javascript exceptions

2012-11-01 Thread Steve Buikhuizen
No problem. On the client (cljs) you should: 1. require [goog.debug.ErrorReporter :as reporter] 2. (reporter/install "/er") On the server (I'm using Noir which supplies defpage) (defpage [:post "/er"] {:keys [error line script trace]} (service/record-client-error error line script tr

Re: ClojureScript: catching all javascript exceptions

2012-10-31 Thread Steve Buikhuizen
Take a look at http://closure-library.googlecode.com/svn-history/r9/trunk/closure/goog/docs/class_goog_debug_ErrorReporter.html Since all Google Closure is available to clojurescript (in web clients) you can use the static "install" method to log all errors in the client back to the server.

Re: ClojureScript and development workflow

2012-09-11 Thread Steve Buikhuizen
Hi Laurent, I've been using CCW and cljsbuild for three months and it is working well for me but I suspect that my workflow can improve. I run cljsbuild auto (incremental mode) and edit cljs files in CCW, then refresh the browser (approx 6sec compile time) I suspect that I could improve my wor