Re: [ANN] new book: ClojureScript: Up and Running

2012-11-20 Thread Mimmo Cosenza
For what I know you do not need to explicitly write cljs dependency in project.clj if using lein-cljsbuild plugin which should already implicitly contain it. try the following $ lein new rhinotest edit project.clj as follow (defproject rhinotest 0.1.0-SNAPSHOT :description FIXME: write

Re: [ANN] new book: ClojureScript: Up and Running

2012-11-20 Thread Laurent PETIT
2012/11/20 Mark Engelberg mark.engelb...@gmail.com Ugh, I should have guessed. My attempts to do clojurescript several months back were foiled by trampolining problems, but that was on lein 1.7. I was under the impression those problems had been fixed in lein 2.0, so I had expected it to

Re: Idiomatic equivalent for double dispatch in clojure?

2012-11-20 Thread Thomas Goossens
Thanks. Two months ago I bought that book. So I'll take a look at it ! -- 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

ANN: Upcoming London Clojure Events

2012-11-20 Thread Bruce Durling
Roll up! Roll up! We have a very full schedule of London Clojurian events coming your way to take you from the end of November through to the beginning of December. It should be the perfect way to introduce you to clojure or increase your knowledge so that you are ready to tackle that fun clojure

More ClojureScript questions....

2012-11-20 Thread Thomas
Hi, I am trying to use an existing JS library from CLJS and in JS one needs to define some call back functions in the following way. Assuming you have written some functions foo and bar and you have created a client called client, you can do: var options = new Object();

proposal to exclude some cljs source from being compiled

2012-11-20 Thread Giacomo Cosenza
Hi all, I'd like to add a new feature to both cljsbuild and clojurescript to allow the exclusion of some cljs source from being compiled. the motivation of this feature can be found at tthe following links: -

what should I use for my webapp?

2012-11-20 Thread John Lawrence Aspden
Hi Guys, I haven't used Clojure for a year or so (I was busy in C and Verilog), but I still love it and would like to use it. I'm going to write a web app. I want to ask users to answer multiple choice questions and time their responses. I'd like them to be able to easily make accounts (the

Re: what should I use for my webapp?

2012-11-20 Thread Robert Stuttaford
I reckon you can have this going in a couple hundred lines of code. webnoir.org: http, routing, html generation. pick it up, tell it what you want. couldn't be simpler. sqlkorma.com: sql query dsl. clojuremongodb.info: mongodb query dsl. Probably the most sticky bit is the Google auth, but

Re: what should I use for my webapp?

2012-11-20 Thread John Lawrence Aspden
Awesome, thanks Robert (and anyone else taking the time to read this) Can I ask you, the current best non-Clojure proposal seems to be Python/Flask. Have you used them and can you tell me why you chose Clojure/WebNoir. Is it an even choice as far as you're concerned, or are there advantages to

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread John Gabriele
On Monday, November 19, 2012 2:55:40 PM UTC-5, Kyle Burton wrote: clj-xpath is a library that makes it easier to with XPath from Clojure. I've never announced this library before (or any for that matter). Someone recently sent me a pull request to fix an issue in the README (during the

Re: what should I use for my webapp?

2012-11-20 Thread kinleyd
I'm learning Clojure now and am working towards developing a web app or desktop app. I've picked Clojure, because after learning the language I've found it's simple, powerful, expressive and a pleasure to write. If I felt the same way about Python or Ruby or Node, I'd pick that. If you like

Re: what should I use for my webapp?

2012-11-20 Thread John Gabriele
On Tuesday, November 20, 2012 8:29:19 AM UTC-5, John Lawrence Aspden wrote: My intutition is telling me to use Python and Flask, but my heart is telling me to use Clojure and some framework, but I don't know what is best. Or should I just write the whole server from scratch? The less code

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Kyle R. Burton
Dependency information is at the very bottom of the document? How are newcomers supposed to find it? Please make it more visible. Good point. I've moved the dependency info up towards the top of the README. Thanks for the feedback. Best Regards, Kyle -- Twitter: @kyleburton Github:

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread John Gabriele
On Tuesday, November 20, 2012 10:07:15 AM UTC-5, Kyle Burton wrote: The Leiningen coordiates are: [org.clojars.kyleburton/clj-**xpath 1.3.3] Just curious, why isn't that just [clj-xpath 1.3.3]? Searching clojars, you seem to have uploaded 1.3.0 a while back... That was a

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Laurent PETIT
2012/11/20 Kyle R. Burton kyle.bur...@gmail.com The Leiningen coordiates are: [org.clojars.kyleburton/clj-**xpath 1.3.3] Just curious, why isn't that just [clj-xpath 1.3.3]? Searching clojars, you seem to have uploaded 1.3.0 a while back... That was a mistake. I didn't want to

Primitive function boxes and unboxes result value

2012-11-20 Thread Gunnar Völkel
I have written a primitive function for exponentiation with integers as power using the multiply-and-square algorithm. For performance reasons I used primitive type hints for the arguments and the return value. Profiling the whole application I noticed that there are a lot of

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Mark Rathwell
You can contact the maintainers at the address found at the bottom of [1] and ask them to remove the clj-xpath group, but you probably don't want to do that if anyone is using the library. [1] https://github.com/ato/clojars-web/wiki/Contact On Tue, Nov 20, 2012 at 10:07 AM, Kyle R. Burton

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Laurent PETIT
2012/11/20 Laurent PETIT laurent.pe...@gmail.com 2012/11/20 Kyle R. Burton kyle.bur...@gmail.com The Leiningen coordiates are: [org.clojars.kyleburton/clj-**xpath 1.3.3] Just curious, why isn't that just [clj-xpath 1.3.3]? Searching clojars, you seem to have uploaded 1.3.0 a while

Edit/write Clojure code on Android

2012-11-20 Thread Nico Balestra
Hi there, as per the subject of this email, supposing that I want to edit, write and potentially run a Clojure app on an Android device (Nexus 7), is there any way to achieve this or should I stop looking for the right Android app on the market? Unfortunately the Clojure REPL distributed by

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Kyle R. Burton
On Tue, Nov 20, 2012 at 10:35 AM, Mark Rathwell mark.rathw...@gmail.comwrote: You can contact the maintainers at the address found at the bottom of [1] and ask them to remove the clj-xpath group, but you probably don't want to do that if anyone is using the library. Thanks for the link. I

Sorted Sets With Duplicate Elements

2012-11-20 Thread JvJ
First of all: I don't EXACTLY mean duplicate elements. I just mean duplicates in those parts of the elements which are compared. For instance, I recently tried to have a sorted set of 2-element vectors where the comparator was used on the second element, however, something like this

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Bronsa
what about using = as sorting fuction? 2012/11/20 JvJ kfjwhee...@gmail.com First of all: I don't EXACTLY mean duplicate elements. I just mean duplicates in those parts of the elements which are compared. For instance, I recently tried to have a sorted set of 2-element vectors where the

[ANN] lein-sha-version plugin for leiningen project version based on git SHA

2012-11-20 Thread Hugo Duncan
lein-sha-version is a leiningen plugin that sets the project version based on the git SHA of the HEAD of the current branch. It can be used to create jars with a fixed version, but without the trappings of a full release version. It provides a simple way of doing SNAPSHOT type releases without

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread JvJ
Simple solution. It works! Thanks. On Tuesday, 20 November 2012 10:59:23 UTC-5, Bronsa wrote: what about using = as sorting fuction? 2012/11/20 JvJ kfjwh...@gmail.com javascript: First of all: I don't EXACTLY mean duplicate elements. I just mean duplicates in those parts of the

Re: proposal to exclude some cljs source from being compiled

2012-11-20 Thread David Nolen
If someone creates a patch for this I'll happily apply it. On Tue, Nov 20, 2012 at 7:29 AM, Giacomo Cosenza mimmo.cose...@gmail.comwrote: Hi all, I'd like to add a new feature to both cljsbuild and clojurescript to allow the exclusion of some cljs source from being compiled. the motivation

Re: [ANN] lein-sha-version plugin for leiningen project version based on git SHA

2012-11-20 Thread Lee Hinman
Hugo Duncan writes: lein-sha-version is a leiningen plugin that sets the project version based on the git SHA of the HEAD of the current branch. It can be used to create jars with a fixed version, but without the trappings of a full release version. It provides a simple way of doing

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread John Gabriele
On Tuesday, November 20, 2012 10:35:46 AM UTC-5, lpetit wrote: 2012/11/20 Laurent PETIT lauren...@gmail.com javascript: 2012/11/20 Kyle R. Burton kyle@gmail.com javascript: The Leiningen coordiates are: [org.clojars.kyleburton/clj-**xpath 1.3.3] Just curious, why isn't that

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Heinz Nikolaus Gies
Po Sent from my iPhone On 20.11.2012, at 16:47, Kyle R. Burton kyle.bur...@gmail.com wrote: On Tue, Nov 20, 2012 at 10:35 AM, Mark Rathwell mark.rathw...@gmail.com wrote: You can contact the maintainers at the address found at the bottom of [1] and ask them to remove the clj-xpath

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Laurent PETIT
2012/11/20 John Gabriele jmg3...@gmail.com On Tuesday, November 20, 2012 10:35:46 AM UTC-5, lpetit wrote: 2012/11/20 Laurent PETIT lauren...@gmail.com 2012/11/20 Kyle R. Burton kyle@gmail.com The Leiningen coordiates are: [org.clojars.kyleburton/clj-xpath 1.3.3] Just

Problems getting Heroku to accept custom bin/build script

2012-11-20 Thread Michael Berg
Hello, I'm trying now already for hours to get somehow Heroku to accept a simple bin/build script with lein deps inside. I've got a simple app (just noir test actually) and would like to prevent AOT compiling (for my real app, which uses core.match), but whatever I do Heroku simply doesn't

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Mark Rathwell
Thanks for the link. I have no idea if anyone is using the library w/o the group name. Is there any way to tell via Clojars? No. I think the only real option would be to contact anyone following the repo on Github and inquire. Honestly, though, I would just leave it, I don't see it causing

Re: Primitive function boxes and unboxes result value

2012-11-20 Thread Gunnar Völkel
I can add some additional information. I compiled the fibonacci example with double and long type hints: (defn fib ^long [^long n] (if (= n 1) 1 (+ (fib (dec n)) (fib (- n 2) (defn fib ^double [^double n] (if (= n 1) 1 (+ (fib (dec n)) (fib (- n 2) The one with ^long works as

Re: proposal to exclude some cljs source from being compiled

2012-11-20 Thread Giacomo Cosenza
Hi David, I'll work on it next days. Thanks mimmo On Nov 20, 2012, at 5:06 PM, David Nolen wrote: If someone creates a patch for this I'll happily apply it. On Tue, Nov 20, 2012 at 7:29 AM, Giacomo Cosenza mimmo.cose...@gmail.com wrote: Hi all, I'd like to add a new feature to both

Re: [ANN] lein-sha-version plugin for leiningen project version based on git SHA

2012-11-20 Thread Lee Hinman
Hugo Duncan writes: lein-sha-version is a leiningen plugin that sets the project version based on the git SHA of the HEAD of the current branch. It can be used to create jars with a fixed version, but without the trappings of a full release version. It provides a simple way of doing

Re: Idiomatic equivalent for double dispatch in clojure?

2012-11-20 Thread Thomas Goossens
I think it is a bit dull that for every combination [type1 type2] you have to define an equivalent method for [type2 type1] Is there a way to address this problem? perhaps with sets? i need to think about this one :D On Monday, November 19, 2012 4:32:15 PM UTC+1, Brian Marick wrote: Here's

Problem getting Heroku to accept custom bin/build script

2012-11-20 Thread Michael Berg
Hello, I'm trying now already for hours to get somehow Heroku to accept a simple bin/build script with lein deps inside. I've got a simple app (just noir test actually) and would like to prevent AOT compiling (for my real app, which uses core.match), but whatever I do Heroku simply doesn't

Re: Edit/write Clojure code on Android

2012-11-20 Thread Nenad Seke
You can write your clojure code in some editor and then evaluate that code from REPL with load-file function. On 11/20/2012 4:43 PM, Nico Balestra wrote: Hi there, as per the subject of this email, supposing that I want to edit, write and potentially run a Clojure app on an Android device

Re: [ANN] lein-sha-version plugin for leiningen project version based on git SHA

2012-11-20 Thread Hugo Duncan
Lee Hinman matthew.hin...@gmail.com writes: Hugo Duncan writes: lein-sha-version is a leiningen plugin that sets the project version based on the git SHA of the HEAD of the current branch. It can be used to create jars with a fixed version, but without the trappings of a full release

Re: Edit/write Clojure code on Android

2012-11-20 Thread Jim foo.bar
The problem with that is that it will only work if there are no external dependencies! As long as your code depends only on clojure 1.4 it's all good...this is very unlikely though for a descent sized project... Jim On 20/11/12 16:14, Nenad Seke wrote: You can write your clojure code in some

Re: what should I use for my webapp?

2012-11-20 Thread John Lawrence Aspden
Thanks very much everyone. I think I'll try Robert's recommendation of clojure/webnoir/heroku/sqlkorma . I'm figuring that using heroku rules out datomic? And that their 'free webserver and pay us if you need to scale it' offer is as good as it gets. Any obvious pitfalls ahead? Off to the

Re: More ClojureScript questions....

2012-11-20 Thread Thomas
At the moment I have this: (let [ client (js/Client. ) connectOptions (new js/Object) ] (.onSuccess connectOptions ) (fn [] (js/console.log Successful Connect)) (.onFailure connectOptions ) (fn [] (js/console.log failure Connect))) If you need any more info please let

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Phil Hagelberg
John Gabriele jmg3...@gmail.com writes: Oh, thanks. My understanding was that current best practice was to choose a good name, and then if you're the original author, your project's group-id = artifact-id (and thus you get the https://clojars.org/my-proj url). You're correct that this is the

defpromise?

2012-11-20 Thread Jim foo.bar
I was just wondering...we have a 'defsomething' macro for almost everything... How come there is no 'defpromise'? It is very easy to write one and since we always initialize promises like this: (def x (promise)), I don't see any reason why not... (defmacro defpromise [name] `(def ~name

Re: Primitive function boxes and unboxes result value

2012-11-20 Thread Christophe Grand
Hi, It looks like, because of the recur, the compiler fails to notice that if returns a primitive. As far as I understand in Compiler.java, RecurExpr does not implement MaybePrimitiveExpr and thus causes on canEmitPrimitive the surrounding IfExpr to return false. Someone to confirm this

Re: Problems getting Heroku to accept custom bin/build script

2012-11-20 Thread Phil Hagelberg
I'm trying now already for hours to get somehow Heroku to accept a simple bin/build script with lein deps inside.  If you give me the app name I can see what's going wrong. thanks, Phil -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread John Gabriele
On Tuesday, November 20, 2012 12:10:09 PM UTC-5, Phil Hagelberg wrote: John Gabriele jmg...@gmail.com javascript: writes: Oh, thanks. My understanding was that current best practice was to choose a good name, and then if you're the original author, your project's group-id = artifact-id

Re: Primitive function boxes and unboxes result value

2012-11-20 Thread Andy Fingerhut
Any relationship to CLJ-701, other than similar symptoms? http://dev.clojure.org/jira/browse/CLJ-701 Andy On Nov 20, 2012, at 9:15 AM, Christophe Grand wrote: Hi, It looks like, because of the recur, the compiler fails to notice that if returns a primitive. As far as I understand in

Re: defpromise?

2012-11-20 Thread Moritz Ulrich
Jim foo.bar writes: I was just wondering...we have a 'defsomething' macro for almost everything... For everything? How come there is no 'defpromise'? It is very easy to write one and since we always initialize promises like this: (def x (promise)), I don't see any reason why not...

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Andy Fingerhut
I would be surprised if you are still happy with that solution a few minutes after doing some testing with it. I've added some examples to ClojureDocs.org at the link below, with a suggested better comparison function. Take a look and let me know if it seems clear:

Efficiency of Dijkstra's algorithm

2012-11-20 Thread JvJ
I've just implemented Dijkstra's algorithm, and as far as I can tell, it works. However, I'm a little concerned at the efficiency. Specifically, I am using sorted sets, and I can't break apart the set into first/next and keep it as a set. I have to get next as a sequence and then apply

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Terje Norderhaug
On Tue, Nov 20, 2012 at 9:07 AM, Phil Hagelberg p...@hagelb.org wrote: However, the likelihood that anyone else will come along in the future and name another library clj-xpath is basically nil in this case. For standards/recommendations like xpath it would be preferable to avoid that the first

Re: Efficiency of Dijkstra's algorithm

2012-11-20 Thread Andy Fingerhut
Have you tried using first to get the smallest item from the set, and then create a new sorted set with the item remove by using (disj my-sorted-set item) ? Andy On Nov 20, 2012, at 9:46 AM, JvJ wrote: I've just implemented Dijkstra's algorithm, and as far as I can tell, it works.

Re: Efficiency of Dijkstra's algorithm

2012-11-20 Thread JvJ
I actually did try that, but somehow disj wasn't working properly. user (def test-set (sorted-set-by msinterview/d-comp [:A [[:A] 0]] [:B [[:A :B] 10]])) #'user/test-set user test-set #{[:A [[:A] 0]] [:B [[:A :B] 10]]} user (disj test-set (first test-set)) #{[:A [[:A] 0]] [:B [[:A :B] 10]]} On

Re: proposal to exclude some cljs source from being compiled

2012-11-20 Thread David Nolen
Great. Be sure to send your CA if you haven't already. This should be a fairly simple patch to closure.clj. David On Tue, Nov 20, 2012 at 11:20 AM, Giacomo Cosenza mimmo.cose...@gmail.comwrote: Hi David, I'll work on it next days. Thanks mimmo On Nov 20, 2012, at 5:06 PM, David Nolen

Re: A Simple FeedForward NeuralNetwork (using BackPropagation)

2012-11-20 Thread Timothy Washington
Nice. I'm gonna check out the Weka resources, and Russell and Norvig LISP programs. This is just what I'm looking for. And that Stanford resourcehttps://class.coursera.org/ml-2012-002/lecture/preview/indexI mentioned, is part of the Coursera regimen. So It sounds like I'm on the right course.

Re: defpromise?

2012-11-20 Thread Jim - FooBar();
On 20/11/12 17:45, Moritz Ulrich wrote: How often do you need a top-level promise? Where are the advantages over the def-only example? if you consider (defn x...) to have an advantage over (def x (fn...)), then this is the same case...People don't often need top-level promises but sometimes

Run Counterclockwise nREPL on specific port

2012-11-20 Thread Vladimir Tsichevski
Hi, I've started a nREPL process embedded into some Java application. I can successfully connect to it and execute code remotely from other Clojure process. Now I need a client to provide me interactive REPL session. Since I use Counterclockwise, can I force Counterclockwise not to start a

Re: More ClojureScript questions....

2012-11-20 Thread David Nolen
(let [opts (js/Object.)] (set! (.-onSuccess opts) (fn [] (js/console.log Successful Connect)) (set! (.-onFailure opts) (fn [] (js/console.log failure Connect)) (.connect client opts)) Is what you want. You weren't setting those properties as your were in JS. Honestly I'd probably write it

Re: defpromise?

2012-11-20 Thread Duncan McGreggor
On Tuesday, November 20, 2012 9:13:03 AM UTC-8, Jim foo.bar wrote: I was just wondering...we have a 'defsomething' macro for almost everything... How come there is no 'defpromise'? It is very easy to write one and since we always initialize promises like this: (def x (promise)), I

Re: defpromise?

2012-11-20 Thread Duncan McGreggor
On Tue, Nov 20, 2012 at 9:12 AM, Jim foo.bar jimpil1...@gmail.com wrote: I was just wondering...we have a 'defsomething' macro for almost everything... How come there is no 'defpromise'? It is very easy to write one and since we always initialize promises like this: (def x (promise)), I

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Jim - FooBar();
On 20/11/12 18:08, Vladimir Tsichevski wrote: I've started a nREPL process embedded into some Java application. I can successfully connect to it and execute code remotely from other Clojure process. I'd be very interested if you could share some code...I want to do something similar in one

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Mark Engelberg
On Tue, Nov 20, 2012 at 8:01 AM, JvJ kfjwhee...@gmail.com wrote: Simple solution. It works! Thanks. No, it doesn't work. It may print correctly now, but it won't actually behave the way you expect. Clojure's sorted collections must be provided with a sorting function where items tie if and

Re: Efficiency of Dijkstra's algorithm

2012-11-20 Thread Mark Engelberg
I just responded in your other thread, suggesting you look at priority-map. Now that I see this thread, I can tell you that priority-map is definitely what you want rather than sorted sets -- I created it specifically for that kind of algorithm. Check out:

Re: Efficiency of Dijkstra's algorithm

2012-11-20 Thread Andy Fingerhut
Perhaps because you are still using a bad comparison function when constructing the sorted-set? (see reply on other thread) That said, Mark's suggestion of a using a priority queue is also a good one. Andy On Nov 20, 2012, at 9:57 AM, JvJ wrote: I actually did try that, but somehow disj

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread JvJ
Thanks for the tip. On Tuesday, 20 November 2012 13:13:09 UTC-5, puzzler wrote: On Tue, Nov 20, 2012 at 8:01 AM, JvJ kfjwh...@gmail.com javascript:wrote: Simple solution. It works! Thanks. No, it doesn't work. It may print correctly now, but it won't actually behave the way you

Re: Efficiency of Dijkstra's algorithm

2012-11-20 Thread JvJ
I'll look into this. Actually, I was thinking of implementing A* as well, so thanks! On Tuesday, 20 November 2012 13:18:08 UTC-5, puzzler wrote: I just responded in your other thread, suggesting you look at priority-map. Now that I see this thread, I can tell you that priority-map is

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Andy Fingerhut
On Nov 20, 2012, at 10:12 AM, Mark Engelberg wrote: Clojure's sorted collections must be provided with a sorting function where items tie if and only if they are equal. (sorted-set-by #(compare [(second %) %] [(second %2) %2]) [:a 1] [:b 1] [:c 1])) Mark, I like the brevity of this way

Will the upcoming Clojure 1.5 stuff be available in Clojurescript too?

2012-11-20 Thread László Török
Hi, I understand that the development of Clojure and Clojurescript is being managed separately which makes sense. However, I also noticed that there has been considerable effort to maintain some level of compatibility between the two. There is some nice stuff coming in Clojure 1.5 in core and I

Re: Will the upcoming Clojure 1.5 stuff be available in Clojurescript too?

2012-11-20 Thread David Nolen
I think ClojureScript will be pretty closely tied to Clojure development for the foreseeable future. 1.5.0 has column data which is critical for accurate source mapping for example. Feature Expressions can't come soon enough, fingers crossed for 1.6.0. On Tue, Nov 20, 2012 at 1:39 PM, László

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Alan Malloy
On Tuesday, November 20, 2012 10:29:18 AM UTC-8, Andy Fingerhut wrote: On Nov 20, 2012, at 10:12 AM, Mark Engelberg wrote: Clojure's sorted collections must be provided with a sorting function where items tie if and only if they are equal. (sorted-set-by #(compare [(second %) %]

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Andy Fingerhut
On Nov 20, 2012, at 11:04 AM, Alan Malloy wrote: On Tuesday, November 20, 2012 10:29:18 AM UTC-8, Andy Fingerhut wrote: On Nov 20, 2012, at 10:12 AM, Mark Engelberg wrote: Clojure's sorted collections must be provided with a sorting function where items tie if and only if they are

printing for non-human consumption but want *read-eval* false

2012-11-20 Thread Jim - FooBar();
Until recently I was using the following snippet for writing a map on a file...basically I was using spit/slurp. Nothing easier (defn data-string Writes the object b on a file f on disk as a string. [b fname] (io! (spit fname b))) (defn string-data Read the file f back on memory safely (#=

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread John Gabriele
On Tuesday, November 20, 2012 12:47:49 PM UTC-5, Terje Norderhaug wrote: On Tue, Nov 20, 2012 at 9:07 AM, Phil Hagelberg ph...@hagelb.orgjavascript: wrote: However, the likelihood that anyone else will come along in the future and name another library clj-xpath is basically nil in this

Re: printing for non-human consumption but want *read-eval* false

2012-11-20 Thread Stuart Sierra
*print-dup* tries to preserve type information. That's why it emits constructor functions with #=. You can still use 'pr' with *print-dup* set to false, which is the default. You get machine-readable data of the correct abstract type, e.g. list/vector/map/set, but you lose type information

Re: [ANN] new book: ClojureScript: Up and Running

2012-11-20 Thread Stuart Sierra
`lein trampoline` was required to permit the CLJS REPL process to grab STDIN/STDOUT. According to a recent thread on the Leiningen mailing list, this may have been fixed in the Git master branch of Leiningen. -S -- You received this message because you are subscribed to the Google Groups

Re: printing for non-human consumption but want *read-eval* false

2012-11-20 Thread Jim - FooBar();
aaa ok I see... so I can have my cake and eat it too? :-) I'm just surprised cos slurp/spit has never failed me before and I've tried with maps, vectors lists but everyone is suggesting it is wrong practice... anyway, thanks for taking the time... Jim On 20/11/12 19:58, Stuart Sierra

Re: Idiomatic equivalent for double dispatch in clojure?

2012-11-20 Thread Brian Marick
On Nov 20, 2012, at 10:22 AM, Thomas Goossens wrote: I think it is a bit dull that for every combination [type1 type2] you have to define an equivalent method for [type2 type1] Is there a way to address this problem? perhaps with sets? According to http://clojure.org/multimethods only

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Vladimir Tsichevski
Hi Jim, On Tuesday, November 20, 2012 10:13:02 PM UTC+4, Jim foo.bar wrote: On 20/11/12 18:08, Vladimir Tsichevski wrote: I've started a nREPL process embedded into some Java application. I can successfully connect to it and execute code remotely from other Clojure process. I'd be

Re: Idiomatic equivalent for double dispatch in clojure?

2012-11-20 Thread Thomas Goossens
Then probably something like this will help me out (defn defmutualmethods [multifn dispatch-val fn-tail] (defmethod multifn dispatch-val fn-tail) (defmethod multifn (reverse dispatch-val) fn-tail)) Nevertheless i'm making things more complex now because it does two things now! But it

Re: Primitive function boxes and unboxes result value

2012-11-20 Thread Christophe Grand
I think CLJ-701 is about loop in non-terminal position. On Tue, Nov 20, 2012 at 6:30 PM, Andy Fingerhut andy.finger...@gmail.comwrote: Any relationship to CLJ-701, other than similar symptoms? http://dev.clojure.org/jira/browse/CLJ-701 Andy On Nov 20, 2012, at 9:15 AM, Christophe Grand

Re: Sorted Sets With Duplicate Elements

2012-11-20 Thread Mark Engelberg
On Tue, Nov 20, 2012 at 11:08 AM, Andy Fingerhut andy.finger...@gmail.comwrote: Then my question is still: Would it be good for Clojure to document and promise this comparison behavior? If not for all cases, at least for equal-length vectors being compared lexicographically? I frequently

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Laurent PETIT
2012/11/20 Vladimir Tsichevski tsichev...@gmail.com Hi Jim, On Tuesday, November 20, 2012 10:13:02 PM UTC+4, Jim foo.bar wrote: On 20/11/12 18:08, Vladimir Tsichevski wrote: I've started a nREPL process embedded into some Java application. I can successfully connect to it and execute

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Chas Emerick
On Nov 20, 2012, at 3:22 PM, Vladimir Tsichevski wrote: CCW has a 'connect to repl' option under 'Window'. It asks doe an IP and a port number...is this what you're looking for? Exactly! The menu location is quite unusual for Eclipse :-( Heh, this one's on me; I put it in the Window menu.

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Laurent PETIT
2012/11/20 Chas Emerick c...@cemerick.com On Nov 20, 2012, at 3:22 PM, Vladimir Tsichevski wrote: CCW has a 'connect to repl' option under 'Window'. It asks doe an IP and a port number...is this what you're looking for? Exactly! The menu location is quite unusual for Eclipse :-( Heh,

Re: syntax for defrecord literals and tagged literals

2012-11-20 Thread Steve Miner
CLJ-1100 Reader literals cannot contain periods has a patch that will allow tags to have periods. It does not address the issue of allowing a space after the record type for record literals. My patch for CLJ-1100 would also allow *default-readers* to override a defrecord definition. That's

Re: [ANN] Clojars Releases repository

2012-11-20 Thread Wes Freeman
On Monday, November 19, 2012 12:53:32 PM UTC-5, Phil Hagelberg wrote: If you turn off :sign-releases inside your :repositories entry when deploying libraries everything will work for you as before. But your libraries won't qualify for the Releases repo in this case. So once your users

[ANN] Hermes, wrapper around Titan (0.2.2)

2012-11-20 Thread Zack Maril
Ma chere Mailing List, it is with deepest pride and greatest pleasure that we email you tonight. And now we invite you to relax, let us pull up a chair as Game Closure http://gameclosure.com/ proudly presents - Hermes https://github.com/gameclosure/hermes! Be our guest! Be our guest! Put our

Re: [ANN] Clojars Releases repository

2012-11-20 Thread Wes Freeman
Ok, if you do a signed deploy, you can scp the pom and jar over to get it working, directly after. Like: scp pom.xml target/clojurithms-0.1.0.jar cloj...@clojars.org: /repo/clojurithms/clojurithms/0.1.0/ On Tue, Nov 20, 2012 at 7:10 PM, Wes Freeman freeman@gmail.com wrote: On Monday,

Re: Nested/inner classes with gen-class

2012-11-20 Thread Stephen Compall
On Thu, 2012-11-15 at 18:06 -0800, Jonathan Bryant wrote: (gen-class 'foo.Bar$Baz ; ... stuff ... ) Any solution? Relevant bits from gen-class's docstring: clojure.core/gen-class ([ options]) snip :name aname The package-qualified name of the class to be generated Write it like

Re: printing for non-human consumption but want *read-eval* false

2012-11-20 Thread Stuart Sierra
`spit` calls `str` on its argument, which has the same behavior as `print` or `println` with regard to quoting strings: user= (println I say, \Hello, World!\) I say, Hello, World! nil To preserve data in its `read`able form, you need `pr` or `prn`: user= (prn I say, \Hello, World!\) I say,

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Dave Ray
Run: Actually, maybe this makes sense, isn't this a bit like the remote connection java launcher ? Several remotes could be saved in different launch configurations. Some other configuration options could come up quickly, like things to prepend on each launch - via a potential additional op

Help required to test `lein upgrade` feature on Windows

2012-11-20 Thread Shantanu Kumar
Hi, I have implemented the `lein upgrade` feature for Windows that seems to be working for me on 64-bit Windows 7. I need help from others to test on other Windows versions. https://github.com/kumarshantanu/leiningen/raw/preview/bin/lein.bat Please follow the steps here to test:

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Mark
My first thought is to make it a launch configuration similar to remote debug of Java problems. On Tuesday, November 20, 2012 2:21:12 PM UTC-8, Chas Emerick wrote: On Nov 20, 2012, at 3:22 PM, Vladimir Tsichevski wrote: CCW has a 'connect to repl' option under 'Window'. It asks doe an IP

Re: Run Counterclockwise nREPL on specific port

2012-11-20 Thread Mark
My first thought is to make it a launch configuration similar to remote debug of Java programs. On Tuesday, November 20, 2012 2:21:12 PM UTC-8, Chas Emerick wrote: On Nov 20, 2012, at 3:22 PM, Vladimir Tsichevski wrote: CCW has a 'connect to repl' option under 'Window'. It asks doe an IP

Re: [ANN] Clojars Releases repository

2012-11-20 Thread Phil Hagelberg
Wes Freeman freeman@gmail.com writes: Can you give some example syntax for :repositories and :sign-releases false specifically for clojars? I was hoping to test deploy without signing and then try again with signing, to see if that fixes my project. Sure; it would just be something like

Re: [ANN] Clojars Releases repository

2012-11-20 Thread Phil Hagelberg
Peter Taoussanis ptaoussa...@gmail.com writes: I'd caution anyone against trying to redeploy their libraries right now since there seems to be some serious unresolved issues. I just tried a redeploy myself and am also getting the ReasonPhrase:Forbidden error. Sorry about this. We've tracked

Re: [ANN] Clojars Releases repository

2012-11-20 Thread Peter Taoussanis
Sorry for the inconvenience. No problem at all Phil. You're doing us all a huge service with all your work on this; teething issues are to be expected. Just wanted to suggest library authors proceed cautiously for now to avoid unknowingly breaking dependents in the wild. -- You received

Re: [ANN] Hermes, wrapper around Titan (0.2.2)

2012-11-20 Thread Michael Klishin
2012/11/21 Zack Maril thewitzb...@gmail.com Documentation is admittedly sparse, but should rapidly improve within the next few weeks. There is no dependency/installation information in the README. Please add it or beginners won't be able to use your library. If you need an example:

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2012-11-20 Thread dmiller
Shantanu, This has been much requested. I plan to give a test-drive over the imminent holiday weekend. -David On Sunday, November 18, 2012 3:03:03 PM UTC-6, Shantanu Kumar wrote: Hi, I pushed lein-clr 0.2.0 https://github.com/kumarshantanu/lein-clr JARs to Clojars a little while

Re: [ANN] Hermes, wrapper around Titan (0.2.2)

2012-11-20 Thread Zack Maril
Dependency information has been added. Thank you! The documentation will go more into this, but the example is showing how to get started with transaction management. Hermes has a very strict way of dealing with transactions (it will throw errors if you aren't using it as intended). If you

  1   2   >