Re: Building a REST API / efficient RPC interface in Clojure

2013-02-08 Thread Feng Shen
Hi, I did something similar during work (we are using Clojure) 1. Use HTTP as the transport: browser ajax call, mobile API call, intertal use 2. JSON as encoding. Javascript support it natively, mobile can decode it easily, Clojure has very good support for it Clojure can decod

Readers & macros & executors, oh my

2013-02-08 Thread Ben Wolfson
This is related to the reader-related thread from a few days/weeks ago--- We've got a system for logging and querying logs with a little mini-query language, that allows statements like this: (query :collection (limit 3) (created-during 1000 4000) (= :some-attribute 4)) Part of the query macro w

Re: `let` to automatically add metadata / fn names?

2013-02-08 Thread Brian Marick
On Feb 8, 2013, at 7:56 PM, Daniel Glauser wrote: > > This sounds like a great idea. I was working with some tests today and it > would have been really useful to have some way to query the current > function/execution context. Seems like passing that through all lets would go > a long way,

Re: `let` to automatically add metadata / fn names?

2013-02-08 Thread Daniel Glauser
This sounds like a great idea. I was working with some tests today and it would have been really useful to have some way to query the current function/execution context. Seems like passing that through all lets would go a long way, provided I'm reading this right. On Friday, February 8, 2013 1

Building a REST API / efficient RPC interface in Clojure

2013-02-08 Thread Mikera
Hi All, I'm looking for a library (or set of libraries that can easily be composed) that lets me do the following: - Define an API in terms of messages - Maintain a mapping between these messages and specific data types (some Java classes, Clojure data structures etc.) - Also maintain a map

Re: Prismatic Plumbing and Graph Open-Source Release

2013-02-08 Thread Jason Wolfe
On Friday, February 8, 2013 1:56:27 AM UTC-8, Edmund wrote: > > Hey Jason, > >Going slightly OT here to describe my motivations, but you did ask > for more details ! :) > > I wrote a little blog post + lib last month using Stuart Sierra's Flow > (much like > Graph) to implement the steps in

Re: JSON escaping

2013-02-08 Thread Jonathon McKitrick
I'm switching from Noir to Compojure anyway, so this would be a good time to ask... are there better alternatives to Cheshire? On Friday, February 8, 2013 6:35:43 PM UTC-5, Casper Clausen wrote: > > Don't know about cheshire, but the newest version of clojure.data.json has > a :escape-slash opti

Re: Clojure - Python Style suggestion

2013-02-08 Thread Jason Lewis
Unless the function is threaded (->), the function call is always in the car position in a list, the args are the cdr elements. On Feb 8, 2013 5:41 AM, "Max Gonzih" wrote: > I can't understand how to distinguish where is function call and where > is var in function arguments. Should it be indent

Re: JSON escaping

2013-02-08 Thread Casper Clausen
Don't know about cheshire, but the newest version of clojure.data.json has a :escape-slash option which does the trick. On Saturday, February 9, 2013 12:18:50 AM UTC+1, Jonathon McKitrick wrote: > > I'm generating JSON for salesforce/apex consumption, and apparently Apex > does not like correctl

something in the nrepl/nrepl.el/ac-nrepl chain breaks if it can't resolve the symbol "get"

2013-02-08 Thread Ben Wolfson
If you evaluate the file (ns test.core (:refer-clojure :exclude [get])) (defn foo "I don't do a whole lot." [x] (println x "Hello, world!")) (basically what "lein new" creates, with the refer-clojure line added), switch to that namespace in the interaction buffer, and hit "tab", you get

JSON escaping

2013-02-08 Thread Jonathon McKitrick
I'm generating JSON for salesforce/apex consumption, and apparently Apex does not like correctly escaped JSON with backslashes. But Cheshire (the JSON library I'm using) does not seem to have an option to generate JSON without escaped content. Is there a simple way to solve this problem? I'm

Re: String interpolation in ClojureScript

2013-02-08 Thread David Sargeant
Very cool. Thanks for the update. David On Feb 8, 2013, at 3:25 PM, Jordan Berg wrote: > Just got a chance to test it from clojurescript and seems to work (only > tested the examples from the docstring). Guess that is the nice part of > macros working from clojure. > > Cheers > > > 2013/2

Re: String interpolation in ClojureScript

2013-02-08 Thread Jordan Berg
Just got a chance to test it from clojurescript and seems to work (only tested the examples from the docstring). Guess that is the nice part of macros working from clojure. Cheers 2013/2/8 Jordan Berg > That is pretty cool, hadn't seen that before. > > > 2013/2/8 David Sargeant > >> The func

Re: String interpolation in ClojureScript

2013-02-08 Thread Jordan Berg
That is pretty cool, hadn't seen that before. 2013/2/8 David Sargeant > The functionality is currently in core.incubator ( > https://github.com/clojure/core.incubator) as the << macro. One can > always use that, I suppose (haven't tried with ClojureScript myself). > > On Feb 8, 2013, at 1:56 P

Re: String interpolation in ClojureScript

2013-02-08 Thread David Sargeant
The functionality is currently in core.incubator (https://github.com/clojure/core.incubator) as the << macro. One can always use that, I suppose (haven't tried with ClojureScript myself). On Feb 8, 2013, at 1:56 PM, Jordan Berg wrote: > js* is used internally in cljs to implement some operato

Re: String interpolation in ClojureScript

2013-02-08 Thread Jordan Berg
js* is used internally in cljs to implement some operators and the interpolation helps there. I don't think js* is really meant to be used too much outside of core. Any reason to not just use str? (def x "david") (str "hello " x) 2013/2/8 > Why does ClojureScript support string interpolatio

Re: `let` to automatically add metadata / fn names?

2013-02-08 Thread Herwig Hochleitner
2013/2/8 vemv > Do you see such a mechanism being incorporated to clojure.core/let - > should I open a ticket? > Only for debugging and not before it has a proven implementation. For production, we actually want less metadata. At least in memory constrained environments like android. If you wan

Re: `let` to automatically add metadata / fn names?

2013-02-08 Thread dgrnbrg
I would find this very useful in several projects I'm working on, where the library would be able to give better information on where the error is in the user's code if this metadata was available. On Friday, February 8, 2013 12:18:54 PM UTC-5, vemv wrote: > > Given that: a) fns can have names f

Re: Article on Clojure concurrency from "Computing in Science and Engineering"

2013-02-08 Thread Konrad Hinsen
Phillip Lord writes: > Interesting article. But did IEEE really include code examples as gifs > or do my eyes just decieve me? Never mind, their it's all on github The IEEE Web site is a mess. But that's not my fault, I just passed on the URL ;-) Konrad. -- -- You received this message bec

`let` to automatically add metadata / fn names?

2013-02-08 Thread vemv
Given that: a) fns can have names for debugging purposes, and b) data structures can have metadata, wouldn't it be a good idea to let let auto attach (where possible) the names of the bindings to their corresponding values? For example, the improved let I'm thinking of would translate this inpu

Re: Clojure Wiki

2013-02-08 Thread George Oliver
There might be some good information here to carry over, http://www.gettingclojure.com/start . -- -- 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 mode

Re: Clojure Wiki

2013-02-08 Thread Michael Klishin
2013/2/8 Konrad Scorciapino > there is already a blog aggregator, a couple of websites with courses, a > list of meetups, but no single place with everything categorized and neatly > divided, which is what I'm building. There is http://clojure-doc.org and its Ecosystem part. Not covered by the

String interpolation in ClojureScript

2013-02-08 Thread david
Why does ClojureScript support string interpolation for js* and not regular clojurescript strings? Interpolation would be very useful. (def x "hi") (js* "alert(~{x});") => "hi" (js/alert "~{x}") => "~{x}" -- -- You received this message because you are subscribed to the Google Groups "Clojur

Re: ANN: http-kit 2.0.0.RC2, high performance HTTP Server & Client for Clojure

2013-02-08 Thread Feng Shen
Just to add: 2.0.0-RC3 released, with a general purpose timer added: http://http-kit.org/timer.html On Sunday, February 3, 2013 11:20:27 AM UTC+8, Feng Shen wrote: > > Hi, > > After extensive test, known bugs fixed, documentation ready, http-kit > reaches 2.0.0.RC2 > > [http-kit "2.0.0-RC

Re: Clojure Wiki

2013-02-08 Thread Feng Shen
http://clojure-docs.org/ => http://clojuredocs.org/ On Friday, February 8, 2013 8:17:41 PM UTC+8, Konrad wrote: > > Hello, fellow clojurians! > > For the next couple of months (or until I get a new functional job), I'll > be working on honing my clojure skills, starting with getting a perspecti

Clojure Wiki

2013-02-08 Thread Konrad Scorciapino
Hello, fellow clojurians! For the next couple of months (or until I get a new functional job), I'll be working on honing my clojure skills, starting with getting a perspective of what lies *out there*: events, podcasts, guides, etc. I've created a freely-editable wiki , ju

Re: Article on Clojure concurrency from "Computing in Science and Engineering"

2013-02-08 Thread Phillip Lord
Interesting article. But did IEEE really include code examples as gifs or do my eyes just decieve me? Never mind, their it's all on github though. There is a URL at the end which you can cut and paste into your browser. Konrad Hinsen writes: > The article > >Clojure for Number Crunching on

Re: Article on Clojure concurrency from "Computing in Science and Engineering"

2013-02-08 Thread Ulises
+1 on pdf On 8 February 2013 10:30, Konrad Hinsen wrote: > The article > >Clojure for Number Crunching on Multicore Machines >by Martin Kalin and David Miller >Computing in Science and Engineering Nov/Dec 2012 > > is in free access at the moment: > > > http://www.computer.org/portal/

Re: Article on Clojure concurrency from "Computing in Science and Engineering"

2013-02-08 Thread Baishampayan Ghose
The article is quite unreadable due to bad formatting. Is it possible to get a PDF? ~BG On Fri, Feb 8, 2013 at 4:00 PM, Konrad Hinsen wrote: > The article > >Clojure for Number Crunching on Multicore Machines >by Martin Kalin and David Miller >Computing in Science and Engineering Nov/

Re: Clojure - Python Style suggestion

2013-02-08 Thread Max Gonzih
I can't understand how to distinguish where is function call and where is var in function arguments. Should it be indented too? On 02/08/2013 01:14 PM, faenvie wrote: >>A simple workaround I've considered, but haven't gotten around to doing anything about in e.g. Emacs, is to simply tone down t

Article on Clojure concurrency from "Computing in Science and Engineering"

2013-02-08 Thread Konrad Hinsen
The article Clojure for Number Crunching on Multicore Machines by Martin Kalin and David Miller Computing in Science and Engineering Nov/Dec 2012 is in free access at the moment: http://www.computer.org/portal/web/computingnow/content?g=53319&type=article&urlTitle=clojure-for-number

Re: Clojure - Python Style suggestion

2013-02-08 Thread faenvie
>>A simple workaround I've considered, but haven't gotten around to doing anything about in e.g. Emacs, is to simply tone down the parens visually in the editor. Just last week i was astouned how readable clojure is, when its proper indented and the parenteses are invisible. This insight came u

Re: Prismatic Plumbing and Graph Open-Source Release

2013-02-08 Thread Edmund
Hey Jason, Going slightly OT here to describe my motivations, but you did ask for more details ! :) I wrote a little blog post + lib last month using Stuart Sierra's Flow (much like Graph) to implement the steps in doing a very simple discrete inference task. Its demonstrating the same thin

Re: Prismatic Plumbing and Graph Open-Source Release

2013-02-08 Thread Edmund
Hey Jason, Thanks for the suggestions. Going slightly OT here to describe my motivations, but you did ask for more details ! :) I wrote a little blog post + lib last month using Stuart Sierra's Flow (much like Graph) to implement the steps in doing a very simple discrete inference task.

Re: Clojure - Python Style suggestion

2013-02-08 Thread Laurent PETIT
2013/2/7 Herwig Hochleitner : > On Feb 4, 2013 7:58 PM, "Dave Sann" wrote: >> >> The syntax does complect in one case. >> When you really do want a list as opposed to a function call. hence quote >> and (list ...) > > > The evaluation rules are clojure's implementation of reduction in lambda > cal