ANN: print-foo - a library of print debugging macros

2013-03-27 Thread Alex Baranosky
print-foo is a small library useful when debugging code, or at the REPL when writing your code. https://github.com/AlexBaranosky/print-foo It is a collection of macros that mimic basic clojure macros like defn, let, or ->, but which prints the value of the code at each point in the transformation

ANN: Lambda Jam - Chicago - July 8-10

2013-03-27 Thread Alex Miller
Lambda Jam (http://lambdajam.com) is a new conference for functional programmers, particularly those working in Clojure, Scala, Erlang, Haskell, F#, etc. The conference format is a mix of traditional sessions (morning) and hands-on workshops and "jams" in the afternoon. We have three excellent

Re: ClojureScript crossovers

2013-03-27 Thread Evan Mezeske
> Right, but if the crossover namespace for my library is defined in its project.clj, and I'm importing that library as a dependency into another project, it's sort of redundant to repeat information already specified. I guess what I hoped for was that crossover namespaces would automatically be

Re: Problem installing Pedestal libraries

2013-03-27 Thread Jean Niklas L'orange
If you upgrade leiningen to 2.1.1 (`lein upgrade 2.1.1`) , it may be that the issue will be resolved as if by magic :) If you still get some issues, report it at https://github.com/technomancy/leiningen or join #leiningen on freenode, and we should be able to help you out. -- JN -- -- You r

Re: ClojureScript crossovers

2013-03-27 Thread Matthew Hill
^ To be clear, that's in the project dependent upon the library, where I'm trying to use it, not the library itself. On Thursday, 28 March 2013 02:03:38 UTC, Matthew Hill wrote: > > Hi Evan. Thanks for the response. > > The ClojureScript compiler looks for *.cljs files to compile as >> ClojureSc

Re: ClojureScript crossovers

2013-03-27 Thread Matthew Hill
Hi Evan. Thanks for the response. The ClojureScript compiler looks for *.cljs files to compile as > ClojureScript. Hence, at a minimum, the *.clj files that you want to also > use from ClojureScript need to be copied (or perhaps symlinked, but that's > not what lein-cljsbuild does) to *.cljs f

Re: What is the status of Clojure on LLVM or C?

2013-03-27 Thread Mikera
On Thursday, 28 March 2013 04:05:03 UTC+8, Joe Graham wrote: > Hi Group, > Good afternoon I hope everyone is well. I just wanted to reach out to > this group and get the current status of Clojure today on the LLVM compiler > or C based implementation? Has anyone looked into a Julia implementat

Re: ClojureScript crossovers

2013-03-27 Thread Evan Mezeske
> > > My question is, is this necessary? If it's on the classpath, why must I > specifically tell it what namespaces I'm going to use? [...] > The ClojureScript compiler looks for *.cljs files to compile as ClojureScript. Hence, at a minimum, the *.clj files that you want to also use from Clo

Re: Working with a huge graph - how can I make Clojure performant?

2013-03-27 Thread Stephen Compall
On Mon, 2013-03-11 at 10:37 -0700, Balint Erdi wrote: > (let [neighbors (persistent! >(reduce > (fn [c u] (if (explored u) c (conj! c u))) > (transient []) > (G v)))] What happ

core.logic: simple question

2013-03-27 Thread JvJ
The function i wrote below isn't working. (is-drink q) returns all drinks (I tested it), but hates-drink, which should return all drinks that aren't liked, doesn't return anything what am I doing wrong? Thanks (defn hates-drink [d] (fresh [d2] (is-drink d) (likes-drin

Re: What is the status of Clojure on LLVM or C?

2013-03-27 Thread Mark Rathwell
A previous thread that covers a lot of ground, but should give you a lot of the information you are looking for [1]. There aren't too many use cases that couldn't be covered with ClojureScript+V8 or some of the other suggestions. [1] https://groups.google.com/forum/?fromgroups=#!topic/clojure/UWB

Re: What is the status of Clojure on LLVM or C?

2013-03-27 Thread Timothy Baldridge
What use-case do you have for such an implementation? Is there something that Clojure on LLVM will give you that Clojure on the JVM or on V8 won't allow you to do? Timothy On Wed, Mar 27, 2013 at 2:05 PM, Joe Graham wrote: > Hi Group, > Good afternoon I hope everyone is well. I just wanted to

What is the status of Clojure on LLVM or C?

2013-03-27 Thread Joe Graham
Hi Group, Good afternoon I hope everyone is well. I just wanted to reach out to this group and get the current status of Clojure today on the LLVM compiler or C based implementation? Has anyone looked into a Julia implementation? Just trying to get a roadmap on the main forks before searching

Re: how can I count lines of code?

2013-03-27 Thread larry google groups
Thank you, all. On Wednesday, March 27, 2013 4:01:31 PM UTC-4, Michael Gardner wrote: > > On Mar 27, 2013, at 14:36 , larry google groups > > > wrote: > > > I am curious, is there a simple command line script I could use to count > lines of code? Or is there some trick in emacs that I can d

Re: how can I count lines of code?

2013-03-27 Thread Michael Gardner
On Mar 27, 2013, at 14:36 , larry google groups wrote: > I am curious, is there a simple command line script I could use to count > lines of code? Or is there some trick in emacs that I can do? I'd like to > know how many lines there are, minus the comments and white space. On Linux or Mac,

Re: how can I count lines of code?

2013-03-27 Thread Haim Ashkenazi
Hi I know of two tools. Both of them however count docstrings as code: - cloc - http://cloc.sourceforge.net - lein-vanity - A leiningen plugin ( https://github.com/dgtized/lein-vanity). HTH On Wed, Mar 27, 2013 at 9:36 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > I a

Re: a bug?

2013-03-27 Thread Timothy Baldridge
Yeah, I realized that after you sent the link it's probably because my copy of lein is using a higher stack size than the OP. I agree with the link you posted though. It's a known issue with lazy seqs. Timothy On Wed, Mar 27, 2013 at 1:58 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrot

Re: how can I count lines of code?

2013-03-27 Thread Nick Ward
Not sure if this is the correct place to be asking this, but sed '/^\s*$/d;/^\s*;/d' path/to/your/file | wc -l On Wed, Mar 27, 2013 at 7:36 PM, larry google groups wrote: > I am curious, is there a simple command line script I could use to count > lines of code? Or is there some trick in ema

Re: a bug?

2013-03-27 Thread Jonathan Fischer Friberg
I don't think it's fixed in 1.5.1. In both 1.5.0 and 1.5.1, (range 1500) is not enough to cause the overflow for me. However, (range 2000) "successfully" overflows in both versions. Jonathan On Wed, Mar 27, 2013 at 8:53 PM, Timothy Baldridge wrote: > Holding on to the head would result in a ou

Re: a bug?

2013-03-27 Thread Jonathan Fischer Friberg
The problem is probably too much nested laziness. Try: (reduce (fn [a b] (doall (map + [1 1] a))) [1 1] (range 1500)) Related: https://groups.google.com/d/msg/clojure/-d8m7ooa4c8/pmaO7QubhosJ Jonathan On Wed, Mar 27, 2013 at 8:48 PM, Michael Klishin < michael.s.klis...@gmail.com> wrote: > >

Re: a bug?

2013-03-27 Thread Timothy Baldridge
Holding on to the head would result in a out of memory error, not a stack overflow. IIRC this was a bug that was fixed in 1.5 (I'll try to find the JIRA ticket). Anyways, it works in 1.5.1: user=> (clojure-version) "1.5.1" user=> (reduce (fn [a b] (map + [1 1] a)) [1 1] (range 1500)) (1501 1501) u

Re: a bug?

2013-03-27 Thread Michael Klishin
2013/3/27 larry google groups > The error says the type is clojure.lang.PersistentVector and not lazyseq > The error says it is clojure.lang.PersistentVector$ChunkedSeq. You can learn more about what chunking is for in http://clojure-doc.org/articles/language/laziness.html. Something in this co

how can I count lines of code?

2013-03-27 Thread larry google groups
I am curious, is there a simple command line script I could use to count lines of code? Or is there some trick in emacs that I can do? I'd like to know how many lines there are, minus the comments and white space. -- -- You received this message because you are subscribed to the Google Groups

Re: a bug?

2013-03-27 Thread larry google groups
The error says the type is clojure.lang.PersistentVector and not lazyseq. I know very little about this, but I think (map) is returning a lazyseq, but the anonymous function inside of reduce is returning a clojure.lang.PersistentVector. On Wednesday, March 27, 2013 3:23:21 PM UTC-4, John Law

a bug?

2013-03-27 Thread John Lawrence Aspden
Hi, Laziness makes my head hurt. Is there any reason this is desirable behaviour?: user=> (clojure-version) "1.4.0" user=> (reduce (fn [a b] (map + [1 1] a)) [1 1] (range 1000)) (1001 1001) user=> (reduce (fn [a b] (map + [1 1] a)) [1 1] (range 1500)) StackOverflowError clojure.lang.Persiste

Re: GSoC 2013: Only three days left to submit project ideas

2013-03-27 Thread Mikera
Hi Daniel, Here's some GSoC suggestions for core.matrix. I'm happy to mentor any one of these. NDArray Implementation in Clojure *Brief explanation:* core.matrix provides a general purpose API for vector / matrix computation in Clojure. A key innovation is support for multiple back-end implem

ClojureScript crossovers

2013-03-27 Thread Matthew Hill
Hello, I'm working on a library that works with both Clojure and ClojureScript. Here's the project.clj for the library: (defproject libtest "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME"; :license {:name "Eclipse Public License" :url "h

Re: (load "hello") can't see hello.clj in the current directory.

2013-03-27 Thread Michael Klishin
Leif: > I works for me if I run 'lein repl' *outside* of a project. In that > case, "" is on the classpath, so "." looks in the current directory. > > When you run 'lein repl' *inside* of a project, however, the top-level > project directory is not on the classpath. "." in this case probably m

ANN metrics-clojure 1.0.1 is released

2013-03-27 Thread Michael Klishin
metrics-clojure is a Clojure library by Steve Losh that provides a Clojure-friendly API for the Metrics library by Coda Hale [1]. 1.0.1 is initial stable release. The library is now feature complete, provides some additional batteries (Ring middleware for exposing metrics as JSON) and has document

Re: (load "hello") can't see hello.clj in the current directory.

2013-03-27 Thread Michael Wood
On 27 March 2013 15:14, Alf Kristian Støyle wrote: [...] > Pretty easy to inspect the classpath in the repl, e.g: (filter #(= (key > %) "java.class.path") (System/getProperties)) > Or: (get (System/getProperties) "java.class.path") -- Michael Wood -- -- You received this message because y

Re: Seeking advice on a safe way to mock/stub fns

2013-03-27 Thread Shantanu Kumar
On Wednesday, 27 March 2013 17:54:01 UTC+5:30, John Hume wrote: > > On Mar 27, 2013 1:56 AM, "Shantanu Kumar" > > wrote: > > > > Sorry, in the last illustration, the (binding [*deps* deps] ...) cannot > be useful for Compojure route handlers because dynamic vars are bound at a > thread-local l

Re: Best way of doing clojure / clojurescript development

2013-03-27 Thread Steven Obua
This looks very useful, thanks! -- -- 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 - please be patient with your first post. To unsubscribe

Re: [ANN] Amazonica: Clojure client for the entire AWS api

2013-03-27 Thread Herwig Hochleitner
2013/3/26 Hugo Duncan > > Or can the cost be confined to compile time... > That would be nice to have! Generating type-hinted clojure code from the reflection result and emitting that with macros would be an option. I think the dynamic use of reflection would be enough to put me off > using thi

[ANN] quit-yo-jibber 0.4.3 (Jabber library)

2013-03-27 Thread Adam Clements
Quit-yo-jibber is a fork of xmpp-clj based less around direct-response chatbots. It allows you to listen for presence changes, set availability and status messages and send messages unprompted among other things. It is stable and auto-reconnects if the network should drop. I use it in two proje

Re: (load "hello") can't see hello.clj in the current directory.

2013-03-27 Thread Alf Kristian Støyle
MC Andre, if you put hello.clj in the src folder you should be able to do (load "hello"). (load-file ) should work for files not on the classpath, so (load-file "hello.clj") means look for hello.clj in the current working dir. Pretty easy to inspect the classpath in the repl, e.g: (filter #(= (ke

Re: Best way of doing clojure / clojurescript development

2013-03-27 Thread John D. Hume
https://github.com/emezeske/lein-cljsbuild/blob/0.3.0/doc/CROSSOVERS.md On Mar 27, 2013 6:40 AM, "Steven Obua" wrote: > Hi, > > I have thought long which language to use for my current project. My main > choices were Scala and Clojure, and I decided on Clojure mainly because I > need to run subs

Re: [GSoC Idea] Program analysis suite, based on Rich Hickey's Codeq

2013-03-27 Thread Daniel Solano Gómez
Thank you, Rich, for the idea. And thanks to Tom, the idea is now up on the project ideas page. Sincerely, Daniel On Tue Mar 26 13:41 2013, Rich Morin wrote: > Category: Tooling > > Name: Program analysis suite, based on Rich Hickey's Codeq > > Brief explanation: > > Rich Hick

Re: Seeking advice on a safe way to mock/stub fns

2013-03-27 Thread John D. Hume
On Mar 27, 2013 1:56 AM, "Shantanu Kumar" wrote: > > Sorry, in the last illustration, the (binding [*deps* deps] ...) cannot be useful for Compojure route handlers because dynamic vars are bound at a thread-local level; you will probably have to `alter-var-root` it to some var and have the handler

Re: Apply elements in a vector as arguments to function

2013-03-27 Thread Marko Topolnik
On Wednesday, March 27, 2013 12:42:43 PM UTC+1, Ryan wrote: > If a developer cannot figure out how to do X from the docs, she should >> complain about it >> instead of assuming it's perfectly normal to spend time reading the >> source to figure out >> how to use something. > > > I generally agre

Re: Apply elements in a vector as arguments to function

2013-03-27 Thread Ryan
> > If a developer cannot figure out how to do X from the docs, she should > complain about it > instead of assuming it's perfectly normal to spend time reading the source > to figure out > how to use something. I generally agree with this, but not all code authors are willing to listen to yo

Best way of doing clojure / clojurescript development

2013-03-27 Thread Steven Obua
Hi, I have thought long which language to use for my current project. My main choices were Scala and Clojure, and I decided on Clojure mainly because I need to run substantial amounts of my code to run on both the JVM and in the browser. So now I am approaching the parts of my project that ne

Re: Apply elements in a vector as arguments to function

2013-03-27 Thread Jim foo.bar
On 27/03/13 03:13, Michael Klishin wrote: Complain loudly to maintainers on this list that their documentation has gaps and they should clarify this and that. The idea that people should read the source to get reasonably straightforward stuff done is wrong and does a lot of long term damage to

Re: Apply elements in a vector as arguments to function

2013-03-27 Thread Michael Klishin
2013/3/27 Ryan > I believe Jim meant to check the source to figure out how does it work, > not that the way it's implemented is the most proper way to implement it. > If that's not what you wanted to point out can you please explain? > If a developer cannot figure out how to do X from the docs,

Re: Apply elements in a vector as arguments to function

2013-03-27 Thread Marko Topolnik
Now that Michael mentioned it, the docstring of *apply* says Applies fn f to the argument list formed by prepending intervening > arguments to args. I challenge any Clojure newbie to decipher this Hickeyism for me. This is of course no exception; most of clojure.core is like that. I can perso

Re: Apply elements in a vector as arguments to function

2013-03-27 Thread Ryan
> > The idea that people should read the source to get reasonably > straightforward stuff done is wrong and does a lot of long term damage to > the community. I believe Jim meant to check the source to figure out how does it work, not that the way it's implemented is the most proper way to im