Basic usage of namespaces

2014-12-24 Thread Eric Le Goff
While writing my first clojure application, I guess I am facing beginner issue with namespacing : I defined a function in a dedicated namespace i.e (ns myapp.other) (defn foo [x] (+x 42)) and try to use the foo from a different namespace It seems *(require 'myapp.other) ;*; is not enough to ca

Re: Basic usage of namespaces

2014-12-24 Thread Michael Klishin
On 24 December 2014 at 12:59:11, Eric Le Goff (eleg...@gmail.com) wrote: > Now my newbie question : > Is there a simpler way to avoid the redundant 2 lines > (require 'myapp.other) > (refer 'myapp.other) (require '[myapp.other :refer [foo]]) See  http://clojure-doc.org/articles/language/namespace

Re: How can I remove the nils in the result?

2014-12-24 Thread Adam Clements
Colin, minor code review point that makes no real difference for this example but is a good habit to get into: try not to use last on vectors, use peek instead, otherwise it calls seq and steps through the entire sequence on each call. peek on the other hand does what you'd expect. For long lists t

Re: [ANN] cuerdas 0.1.0: A string manipulation library for clojure and clojurescript.

2014-12-24 Thread Sean Johnson
Very nice work. I'll be using this! Also, I agree with Noam that there's a fairly common expectation of blank? that started in the Ruby world. Here's my suggestion for what it's worth: blank? - true iff "" or nil empty? - true iff "", false if nil whitespace? true iff "" or only white space, fa

Re: [ClojureScript] Re: [ANN] cuerdas 0.1.0: A string manipulation library for clojure and clojurescript.

2014-12-24 Thread Andrey Antukh
Hi! Thank you very much! You are right about nil handling, it should be documented and proper handled. But I'm not completely convinced with ruby behavior for that, in many other implementations in other languages it is slightly different. In my opinion that is more proper behavior: blank? (ni

Re: Basic usage of namespaces

2014-12-24 Thread Fluid Dynamics
On Wednesday, December 24, 2014 5:14:01 AM UTC-5, Michael Klishin wrote: > > On 24 December 2014 at 12:59:11, Eric Le Goff (ele...@gmail.com > ) wrote: > > Now my newbie question : > > Is there a simpler way to avoid the redundant 2 lines > > (require 'myapp.other) > > (refer 'myapp.other) >

Re: [ANN] cuerdas 0.1.0: A string manipulation library for clojure and clojurescript.

2014-12-24 Thread Max Gonzih
On Tuesday, December 23, 2014 6:48:18 PM UTC+1, Andrey Antukh wrote: > Hello everybody. > > > I wanted to announce the first release of cuerdas. A string manipulation > library for clojure and clojurescript. > > > It is mainly based on underscore.string and string.js, but also influenced by >

Re: Basic usage of namespaces

2014-12-24 Thread Ashton Kemerling
(use 'myapp.other) is the same as require with a ":refer all" from a users perspective, but it's fallen out of favor for :as and :referring individual names. --Ashton Sent from my iPhone > On Dec 24, 2014, at 7:37 AM, Fluid Dynamics wrote: > >> On Wednesday, December 24, 2014 5:14:01 AM UTC

Re: ANN: ClojureScript 0.0-2496, cljs.test - a clojure.test port

2014-12-24 Thread Russell Mull
Things that aren't in cljs.test: - with-test - run-tests can take a custom environment parameter. Things that required rebinding a var in clj.test are configured with an entry in the environment. - :reporter, instead of rebinding the report function - :testing-contexts i

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2496, cljs.test - a clojure.test port

2014-12-24 Thread Yehonathan Sharvit
What about the 'are' macro? On Wed, Dec 24, 2014 at 7:38 PM, Russell Mull wrote: > Things that aren't in cljs.test: >- with-test >- run-tests can take a custom environment parameter. Things that >required rebinding a var in clj.test are configured with an entry in the >environm

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2496, cljs.test - a clojure.test port

2014-12-24 Thread Russell Mull
Yes, it's there. The things I listed are the only differences I could find. The separation of macros makes it a little confusing, but it's pretty easy to find in the source: - https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/test.cljs - https://github.com/clojure/clojurescript/

Re: [ClojureScript] Re: [ANN] cuerdas 0.1.0: A string manipulation library for clojure and clojurescript.

2014-12-24 Thread Erik Price
Note that there is precedent for this in clojure.string/blank? . ​ On Wed, Dec 24, 2014 at 7:58 AM, Andrey Antukh wrote: > Hi! > > Thank you very much! > > You are right about nil handling, it should be documented and proper > handled. > > But I'm n

Re: [lein] compile sass?

2014-12-24 Thread Torsten Uhlmann
I haven't really tried chestnut's sass support. It has an option to create a template application that reads and transforms sass: https://github.com/plexus/chestnut Hope that helps, Torsten. 2014-12-24 0:42 GMT+01:00 Ashton Kemerling : > Your best bet is probably to ask for the lein-haml-sass pl

Re: [lein] compile sass?

2014-12-24 Thread Dom from (paren)
Take a look at Optimus for asset compilation, concatenation, minification, etc. If it looks like it would work well for your use case, then check out optimus-sass , an asset loader that I wrote for Optimus. It comes bundled