Fork me on GitHub
#off-topic
<
2015-12-12
>
rundis10:12:59

@sveri: https://github.com/clojure-emacs/refactor-nrepl and https://github.com/clojure-emacs/cider-nrepl are good examples of common editor related functionality being made available to multiple editors. I believe vim uses them (maybe counterclockwise, not sure), and I know for sure that Light Table uses them through the https://github.com/rundis/clj-light-refactor plugin simple_smile

borkdude13:12:28

I'm trying out loom, the graph library, but I'm having trouble getting graphviz to convert a .dot file to png

borkdude13:12:44

installed with brew, OS is Yosemite

borkdude13:12:45

when I do this: dot -Tps foo.dot -o , I get: Format: "ps" not recognized. Use one of:

borkdude17:12:26

@kyle_schmidt: didn't work for me

rcanepa22:12:41

Hey everyone. I have non-clojure question regarding searching/filtering on a REST API. How do you manage an endpoint in which the consumer can filter the response data on several fields using the logic operators OR and AND. For example, if some user wants all sales from clients or business that are named “Alfred” of the year 2015, which url structure could support something like that? I was working with something like this: http://foo.com?client_name,business_name=Alfred&amp;year=2015, but I got stuck with a request map keyword like :client_name,business_name (no so pretty).

rcanepa22:12:51

Translated to SQL, it would be

`WHERE (client_name = ‘Alfred’ OR business_name = ‘Alfred’) AND year = 2015
`

bsvingen22:12:43

If you really need to support full boolean queries I would not try to put it in the URL, but instead POST an EDN/JSON structure for the query.

solicode23:12:00

Yeah, I agree. Trying to represent complex queries with a bunch of query string parameters like that doesn't seem like it would work well because you only have & and = to work with. Most APIs that I've used either let you pass a single value which is a full query in some custom query language, or some JSON structure like bsvingen said. For an example of the latter, maybe you can look at how Elasticsearch does it for some ideas: https://www.elastic.co/guide/en/elasticsearch/guide/current/combining-filters.html