Re: [Ann] Kibit 0.0.6

2012-11-12 Thread Andreas Liljeqvist
I would prefer the use of vec. If I am using an empty 'to' then I would always replace it with the type constructor. Feels more clean to me. You aren't logically taking an empty vector and filling it with stuff, you are converting your original coll. On Sun, Nov 11, 2012 at 5:04 PM, Jim -

Re: Clojure Signal Processing

2012-11-12 Thread Stathis Sideris
More abstractly, I think Prismatic's Graph library [1] is very similar to the topologies that you are describing. Unfortunately, they haven't open-sourced it yet. In the article they touch upon the subject of different ways to execute the same graph, which would allow you to parallelize parts

Interactive form workflow with Friend, can't log in

2012-11-12 Thread Thorsten Wilms
Hi! I'm trying to use Friend with the interactive form workflow. Whenever I try to login, I get a redirect to http://localhost:8080/login?login_failed=Yusername= The body of the POST my form generates does include username and password. My code: https://www.refheap.com/paste/6569 This

Re: Question about sets

2012-11-12 Thread Antony Lee
I may arrive at the party a little late but just to mention I got bitten by this too (while working on clojure-py, so I actually want to know about the weird edge cases...) user= #{(rand-int 100) (rand-int 100)} IllegalArgumentException Duplicate key: (rand-int 100)

Re: Question about sets

2012-11-12 Thread Jim foo.bar
Yes, this has been discussed extensively in the pastI think the convention is to use the ctor functions if you're passing data dynamically, otherwise if dealing with constants the literals should be just fine...In the case just replace the set literal with (hash-set ...) or (set ...).

Re: Question about sets

2012-11-12 Thread Jim foo.bar
sorry 'set' will convert from a coll to a set...use 'hash-set' , 'sorted-set' etc etc... Jim On 12/11/12 13:22, Jim foo.bar wrote: Yes, this has been discussed extensively in the pastI think the convention is to use the ctor functions if you're passing data dynamically, otherwise if

Re: [Ann] Kibit 0.0.6

2012-11-12 Thread Bronsa
it is not always true that using vec is equal to using into [] user= (require '[clojure.core.reducers :as r]) nil user= (r/map inc (range 2)) #reducers$folder$reify__407 clojure.core.reducers$folder$reify__407@1358d955 user= (into [] *1) [1 2] user= (vec *2) RuntimeException Unable to convert:

Re: Interactive form workflow with Friend, can't log in

2012-11-12 Thread Chas Emerick
Looks like you're not using the keyword-params middleware, which Friend requires (among others). Please check the last paragraph in the 'Authentication' section here: https://github.com/cemerick/friend/#authentication Once you add that, then the interactive-form middleware will pick

Re: [Ann] Kibit 0.0.6

2012-11-12 Thread Jim foo.bar
Thank you Bronza...this is exactly what I meant! when using reducers 'into' is the norm isn't it? Couldn't kibit parse the ns declaration before it starts suggesting things? It seems that at least for namespaces that use core.logic or reducers kibit's suggestions will break your code! For

Re: [Ann] Kibit 0.0.6

2012-11-12 Thread Jonas
Hi I didn't know that `vec` fails with reducers. I'll probably remove the `into` rules. I have written about some known limitations of kibit here: https://github.com/jonase/kibit#known-limitations . Knowing what a symbol refers to is very difficult (especially in the presence of macros). I

[ANN] sublime-lispindent, clojure indenting for sublime text 2

2012-11-12 Thread Jonathan Fischer Friberg
Dear clojure mailing list, As the indenting for clojure (and lisp in general) was very lacking in sublime, I decided to make a plugin: https://github.com/odyssomay/sublime-lispindent I hope someone finds this useful. By the way, if someone with a mac could try the keyboard shortcuts that would

Re: [ANN] sublime-lispindent, clojure indenting for sublime text 2

2012-11-12 Thread Marc Limotte
Nice contribution, Johnathan. On a Mac, enter and Cmd+I work as advertised. Marc On Mon, Nov 12, 2012 at 11:25 AM, Jonathan Fischer Friberg odysso...@gmail.com wrote: Dear clojure mailing list, As the indenting for clojure (and lisp in general) was very lacking in sublime, I decided to

Re: [ANN] sublime-lispindent, clojure indenting for sublime text 2

2012-11-12 Thread Jonathan Fischer Friberg
On a Mac, enter and Cmd+I work as advertised. Nice! Thank you for testing. :) Jonathan -- 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 -

Re: ClojureCLR Build Error

2012-11-12 Thread Scott Thoman
On Wednesday, April 18, 2012 9:59:34 PM UTC-4, dmiller wrote: We discovered this was due to building on the beta of .Net 4.5. ClojureCLR has not been updated to 4.5 yet. In this case, a new method was introduced in an interface, causing the proxy to have a missing method. 4.5 support

Re: Coding Standard - ns usage

2012-11-12 Thread Sean Corfield
On Sun, Nov 11, 2012 at 10:31 PM, Denis Labaye denis.lab...@gmail.com wrote: Most of my Clojure usage is as a scripting language (where other would use Python or Ruby). I usually don't plan in advance how my program will be splitted in namespaces : I start from one namespace that does

How to get the namespace for an unqualified symbol?

2012-11-12 Thread johnstok
I was looking at combining the namespace and resolve functions: user= (def x 5) #'user/x user= (resolve 'x) #'user/x user= (namespace 'user/x) user user= (namespace 'x) nil user= (namespace (resolve 'x)) ClassCastException clojure.lang.Var cannot be cast to clojure.lang.Named

[ANN] Immutant 0.6.0 released

2012-11-12 Thread Toby Crawley
We released Immutant 0.6.0 today. This release is mostly bug fixes, but does contain a couple of breaking API changes as we work on making it more consistent for 1.0: * the immutant.utilities namespace has been renamed to immutant.util * immutant.daemons/run has been renamed to

Re: How to get the namespace for an unqualified symbol?

2012-11-12 Thread Tassilo Horn
Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com writes: Evil, but this is the solution I use: (let [v (resolve 'a)] (symbol (str (ns-name (.ns v))) (str (.sym v I'd love to know a better way. How about backquote? user= (def x 5) #'user/x user `x user/x Bye, Tassilo --

Re: Interactive form workflow with Friend, can't log in

2012-11-12 Thread Thorsten Wilms
On 11/12/2012 03:20 PM, Chas Emerick wrote: Looks like you're not using the keyword-params middleware, which Friend requires (among others). Please check the last paragraph in the 'Authentication' section here: https://github.com/cemerick/friend/#authentication Once you add that, then the

Re: How to get the namespace for an unqualified symbol?

2012-11-12 Thread Alan Malloy
Yikes! Try ((juxt (comp ns-name :ns) :name) (meta (resolve 'inc))) - name information is stored on the var's meta in a clojure-friendly way - no need to use undocumented behavior on the java internals. On Monday, November 12, 2012 11:05:15 AM UTC-8, Ambrose Bonnaire-Sergeant wrote: Evil, but

Re: How to get the namespace for an unqualified symbol?

2012-11-12 Thread Stuart Sierra
Assuming the symbol is bound to a Var, you can do this: (name (ns-name (:ns (meta (resolve 'x) -S -- 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

Where did the idea of metadata come from?

2012-11-12 Thread JvJ
Metadata is a really useful feature, and it's been helping me a lot. It seems like a flash of genius on the part of Mr. Hickey. I'm wondering if similar concepts exist in other programming languages that inspired it, or if it's unique to Clojure. Just a matter of curiosity, really. -- You

Re: Where did the idea of metadata come from?

2012-11-12 Thread Ken Causey
On 11/12/2012 03:01 PM, JvJ wrote: Metadata is a really useful feature, and it's been helping me a lot. It seems like a flash of genius on the part of Mr. Hickey. I'm wondering if similar concepts exist in other programming languages that inspired it, or if it's unique to Clojure. Just a matter

Re: Where did the idea of metadata come from?

2012-11-12 Thread Meikel Brandmeyer
Hi, Am 12.11.2012 um 22:01 schrieb JvJ: Metadata is a really useful feature, and it's been helping me a lot. It seems like a flash of genius on the part of Mr. Hickey. I'm wondering if similar concepts exist in other programming languages that inspired it, or if it's unique to Clojure.

Re: Where did the idea of metadata come from?

2012-11-12 Thread charlie
Unless I'm totally mistaken about clojure's meta ( totally possible ) , Java's annotations play a similar role. JPA2 and Hibernate use this feature alot. Also neat fact about the perl taint. On Mon, Nov 12, 2012 at 3:11 PM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 12.11.2012 um 22:01

First foray into clojure - questions for new project

2012-11-12 Thread Jonathon McKitrick
Hi all, I've heard many good things about clojure, and I'm finally taking the plunge. I've been using Hunchentoot on SBCL for several years, and I've finally decided it's time to move to a current lisp with a proven platform and (from what I have heard) a great community. I have a project

Re: First foray into clojure - questions for new project

2012-11-12 Thread Mark Rathwell
These 4 should help you get from zero to a simple web app running on Heroku pretty quickly: https://github.com/technomancy/leiningen/wiki/Upgrading https://github.com/technomancy/swank-clojure https://github.com/kingtim/nrepl.el https://devcenter.heroku.com/articles/clojure-web-application Some

Re: First foray into clojure - questions for new project

2012-11-12 Thread Michael Klishin
2012/11/13 Jonathon McKitrick jmckitr...@gmail.com - Any caveats I should be aware of running clojure on heroku? For small pure Clojure apps, probably none. - What libraries should I become familiar with for straightforward web apps? Compojure, Noir, clojure.java.jdbc, clojurewerkz.org

Re: Where did the idea of metadata come from?

2012-11-12 Thread Takahiro Hozumi
Metadata is a really useful feature, and it's been helping me a lot. Could you show me concrete example? I still don't understand the value of metadata and rarely use it except type hint. I saw active using metadata on some project(e.g. postal[1]), but I think regular hashmap instead of metadata

Re: First foray into clojure - questions for new project

2012-11-12 Thread kinleyd
Thanks Mark and Michael, I thought I had an extensive list of Clojure resources, but quite clearly not. :) Kinley On Tuesday, November 13, 2012 8:26:25 AM UTC+6, Michael Klishin wrote: 2012/11/13 Jonathon McKitrick jmcki...@gmail.com javascript: - Any caveats I should be aware of running

Re: First foray into clojure - questions for new project

2012-11-12 Thread Mark Engelberg
Only catch is that the free level of Heroku isn't very useful with Clojure. The app keeps going to sleep, and the first person to hit your app will have a noticeably lengthy wait because Clojure takes a long time to start up. -- You received this message because you are subscribed to the Google

Re: [ANN] ClojureScript release 0.0-1535 with G.Closure 0.0-2029

2012-11-12 Thread Evan Mezeske
The policy is: update the default version as quickly as possible when a new ClojureScript compiler revision is released. So, feel free to poke me if it seems like I haven't noticed a new release (as I might not have!). :) Unfortunately, after setting the default ClojureScript version to