Re: active jQuery ticket for ADVANCED_OPTIMIZATIONS

2012-01-20 Thread Dave Sann
nice! -- 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 from this group, send email to

Re: "including" Protocols in clojurescript

2012-01-19 Thread Dave Sann
) I hope this is clearer Thanks Dave -- 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.

Re: Problem with clojure.org?

2012-01-19 Thread Dave Sann
Looks fixed. good stuff Thanks Tom D -- 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 unsubsc

Re: Problem with clojure.org?

2012-01-19 Thread Dave Sann
using Chrome. 17.0.963.33 beta Firefox seems to work 9.0.1 -- 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 fir

Problem with clojure.org?

2012-01-19 Thread Dave Sann
Hi, I use the clojure.org/cheatsheet...a lot.. lol a couple of weeks ago I notices that the site was very slow to load and that something like 80% of links on the page don't work. There is a missing css GET http://c1.wikicdn.com/s/gz/1v8qv98z-theme_common.css 404 (Not Found) And a number of

Re: "including" Protocols in clojurescript

2012-01-19 Thread Dave Sann
I did think the same way as you - but it doesn't seem to be the case. I can think of plausible ways that the compiler might achieve this but I don't know for sure. Anyway, Even with advanced mode compilation it does appear work fine except in the case that I highlighted. I'll leave it to an ex

Re: clojurescript goog libs - dispose - and garbage collection

2012-01-19 Thread Dave Sann
Thanks for the pointers. Cedric's idea is interesting. I have to say, I don't the idea of disposables in general - its back to manual memory management. I suspect they came up, out of necessity, because of how IE (used to?) fail to garbage collect between DOM and JS. Cheers D -- You receive

Re: "including" Protocols in clojurescript

2012-01-19 Thread Dave Sann
case when the protocols are defined in the local src. In that case there is no need to include the specific extension. Does this make sense? Is it expected? Cheers Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: lein-cljsbuild 0.0.1 released

2012-01-18 Thread Dave Sann
same way that .java and .clj are different. Different builds will use different files. The problem that these build tools (crossovers and so forth) are trying to address is how to classify these so as to know whether to use or ignore them - for a specific build. Dave -- You received this

Re: lein-cljsbuild 0.0.1 released

2012-01-18 Thread Dave Sann
Hi, There is one more thing that I am a little wary of. Please don't take these comments as negative - I think that this project is good and the community needs to get to a solid solution. * Explicitly declaring crossovers. I think that this is decouples the code from it's intended purpose. It

Re: Multimethods performance in ClojureScript.

2012-01-18 Thread Dave Sann
If you are only dispatching on a single type - I think protocols will always be much faster than multimethods. I think that you only really want to use multimethods if you need to dispatch on more than one type or on something that is not a type at all. D -- You received this message because

Re: Libraries for ClojureScript.

2012-01-18 Thread Dave Sann
> One other concern to keep in mind is that many JavaScript libraries > aren't compatible with the Closure compiler's advanced optimizations. > Advanced optimizations are awesome---I'm working on a Clojure data > visualization library similar in spirit to D3, and for many static > visualizati

Re: "including" Protocols in clojurescript

2012-01-18 Thread Dave Sann
Not in detail. I believe that the code may have been excluded in advanced compilation. I will do some tests and get back to you. D -- 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 th

"including" Protocols in clojurescript

2012-01-18 Thread Dave Sann
"correct" If I don't do this - I can get "protocol not implemented" type exceptions. Cheers Dave -- 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 Not

[ANN] Experimental Alpha: Closeout 0.1.0 - a knockoutjs like clojurescript library

2012-01-18 Thread Dave Sann
on heroku: http://closeout-demo.herokuapp.com/ The cljs is available as a jar on clojars [closeout "0.1.0"] Also, the core code is fully generic clojure - and I am wondering whether this might be constructively applied to seesaw or similar. I'm keen to hear opinions and constructive critic

Re: lein-cljsbuild 0.0.1 released

2012-01-17 Thread Dave Sann
On Tuesday, 17 January 2012 20:35:17 UTC+11, Evan Mezeske wrote: > > > > > > 1. I am wary of the copying of cls -> cljs files in the src tree. Due to > > the (inevitable at some point) confusion over which code is authored as > > > I'd love to hear other ideas. > I have a version of cljs-wat

Re: lein-cljsbuild 0.0.1 released

2012-01-16 Thread Dave Sann
ate (somehow). 2. Do lein "checkouts" work with cljs compilation? 3. Any thoughts on packaging cljs jars and clj jars? Cheers Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegro

clojurescript goog libs - dispose - and garbage collection

2012-01-16 Thread Dave Sann
/epHVbmcNzgs/3pVyS_AKCYUJ from enfocus: (defn setTimeout [func ttime] (. (new goog.async.Delay func ttime) (start))) what about functions such as this? (defn repeat-with-timeout [f t] (let [stop (f)] (if-not (= true stop) (js/setTimeout #(repeat-with-timeout f t) t Cheers Dave

Re: Is this a bug? extending protocol on js/Object

2012-01-13 Thread Dave Sann
Now I understand...that makes sense - thanks, D -- 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

Re: Is this a bug? extending protocol on js/Object

2012-01-13 Thread Dave Sann
Ok, I had assumed from this https://groups.google.com/d/topic/clojure/KQ6AM-nxlTQ/discussion that I could Is there anything else not safe to extend? Cheers D -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Is this a bug? extending protocol on js/Object

2012-01-12 Thread Dave Sann
code is below. Basically - if I extend a protocol on js/Object then I get an error when calling map on a map with integer keys. Is this a bug or an error on my part? Cheers Dave Results first: If the extend-protocol and call to 'fred' is commented, ths console shows &qu

[ANN] piccup 1.0.0 - hiccup-style clojurescript dom generation (extracted from pinot)

2012-01-11 Thread Dave Sann
ery. Since this is not part of the std closure library for clojurescript it is probably good to have dom generation without requiring any specific setup. (easier for others to try...etc). All credit to Chris Granger. I made almost no changes. source is here https://github.com/davesann/piccu

Re: ClojureScript DOM-manipulation library?

2012-01-08 Thread Dave Sann
rce/browse/trunk/#trunk%2Fexterns The overhead of including the jquery minified js is probably not a major issue. I expect jquery plugins will generally not work if using advanced compilation. I may be wrong. Cheers Dave -- You received this message because you are subscribed to the Goo

Re: marking deprecated functions, namespaces or other?

2012-01-08 Thread Dave Sann
Thanks Phil, I'll take a look D -- 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 fro

marking deprecated functions, namespaces or other?

2012-01-06 Thread Dave Sann
ot;do this instead"} x ...) => produces a compiler/reader warning "_FILE_: _LINE_: fn ns/x is deprecated: do this instead" thinking out loud Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: On using atoms together with side effect functions

2012-01-06 Thread Dave Ray
e. Depending on your requirements, if the file write fails, you'll might need to do some extra work to put aval back in a state consistent with reality. Hope this helps, Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Re: Bug in extend-protocol macro? (Clojure 1.3.0)

2011-12-30 Thread Dave Ray
nment. But after > that, it seems the extend-protocol just silently does nothing: > > repl-1=> (defprotocol P) > P > repl-1=> (extend-protocol P #=(java.lang.Class/forName "[B")) > nil > repl-1=> (satisfies? P (Class/forName "[B")) > false > satisfie

Re: Uniform exceptions – Clojure and ClojureScript?

2011-12-27 Thread Dave Sann
I believe the capability to have a portable solution in specific cases is in the pipeline https://github.com/clojure/clojurescript/wiki/Exception-Handling -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Re: Clojurescript and google closure library versions?

2011-12-23 Thread Dave Sann
thx, I have done the same. If anyone uses pinot, I also created an updated goog.jar with the third party-libs. (so that dom/query works) you can fetch it here: https://github.com/davesann/clojurescript-goog-jar (I documented how here : https://groups.google.com/d/msg/clj-noir/x5x9vcI-T4E/hDFev

Should read-string support \x.. escaped characters?

2011-12-23 Thread Dave Sann
(char (Integer/parseInt (second m) 16)) (defn my-read-string [s] (read-string (unescape s))) Causes : https://github.com/ibdknox/pinot/issues/16 Cheers Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gro

Re: Question about accessing java methods?

2011-12-21 Thread Dave Ray
ample, this: (.. foo getBar doBaz getYum) instead of this: (-> foo .getBar .doBaz .getYum) yeah. it's only 3 characters, but for whatever reason it sees to make a difference to me :) Dave -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: ANN: Seesaw 1.3.0

2011-12-21 Thread Dave Ray
Hi Laurent! ... On Wed, Dec 21, 2011 at 7:42 AM, Laurent PETIT wrote: > Hello Dave ! > > 2011/12/21 Dave Ray : >> Hi, >> >> I've just release Seesaw 1.3.0. Details of this release can be found >> in the release notes [1]. There are a few features I'm

Re: ANN: Seesaw 1.3.0

2011-12-21 Thread Dave Ray
Kevin, Being a Swing app, I'd take a look at how Clooj (https://github.com/arthuredelstein/clooj) does it. Dave On Wed, Dec 21, 2011 at 4:36 AM, Kevin Ilchmann Jørgensen wrote: > Hi > > Regarding explorability, what would be the best way to provide an repl > directl

Re: ANN: Seesaw 1.3.0

2011-12-21 Thread Dave Ray
Thanks Sam! Of course my experience with Overtone had more than a little to do with this work :) On Wed, Dec 21, 2011 at 4:12 AM, Sam Aaron wrote: > Hi Dave, > > very cool - I love that you're working on improving the explorability of the > system. It's clearly a

ANN: Seesaw 1.3.0

2011-12-20 Thread Dave Ray
have also been several bug fixes and minor improvements. Cheers, Dave [1] https://github.com/daveray/seesaw/wiki/Release-Notes [2] https://gist.github.com/1450241 [3] https://github.com/stathissideris/clarity -- You received this message because you are subscribed to the Google Groups "

Clojurescript and google closure library versions?

2011-12-20 Thread Dave Sann
being able to choose which version you want to compile against? Cheers Dave -- 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

clojurescript: foreign libs support / javascript externs

2011-12-19 Thread Dave Sann
uted: http://code.google.com/p/closure-compiler/source/browse/trunk/contrib/externs/ As well as: http://code.google.com/p/closure-compiler/source/browse/trunk/#trunk%2Fexterns Cheers Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: Help request: clojurescript macro for object property access

2011-12-19 Thread Dave Sann
To clarify, the key in the map/object would be munged. -- 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 po

Re: Help request: clojurescript macro for object property access

2011-12-19 Thread Dave Sann
the file to clojurescript - which actually took all of 5 mins. maintenance may be an issue. Cheers Dave -- 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 n

Re: Help request: clojurescript macro for object property access

2011-12-19 Thread Dave Sann
Nevermind, I think I can see why this is a non-starter -- 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 firs

Re: Help request: clojurescript macro for object property access

2011-12-19 Thread Dave Sann
ot work in advanced mode. I can modify the function and then write (on elem (.CLICK gevents/EventType) f) but this is not as nice. This is why I would like to have the macro. Is there an alternative way to achieve this? cheers Dave -- You received this message because you are subscribed to

Help request: clojurescript macro for object property access

2011-12-19 Thread Dave Sann
essed as a property access for the compiler to manage correctly. Thanks in advance Dave -- 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 m

Re: Reuse of generic Clojure/ClojureScript code? Part 2

2011-12-19 Thread Dave Sann
Updated to allow compilation of project cljs dependencies - in the "Leiningen checkouts fashion" - to assist modular development. -- 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

Re: UnsatisfiedLinkError using clojure.lang.RT/loadLibrary

2011-12-18 Thread Dave Ray
quot;. Of course, this means you have to figure out the deps, sort them, and deal with changes over time. Good times. Hope this helps, Dave On Sun, Dec 18, 2011 at 11:20 AM, Baishampayan Ghose wrote: > It seems the JVM is unable to locate certain shared library in the > path you spec

Reuse of generic Clojure/ClojureScript code? Part 2

2011-12-18 Thread Dave Sann
neric marking in clj files. Essentially because the file has to be opened and parsed to determine whether it should be included in the build. I think that this may not be such a good idea for larger builds. I may be wrong. Let me know If you find this useful Regards Dave -- You received this me

Obscure bug (?) in clojurescript, probably related to lazy seqs

2011-12-14 Thread Dave Sann
[[1 7 8 9] [6 6] [2 3 4 5]] ; in clojurescript ; uncommented [[1 7 8 9] [6 6] [2 3 4 5]] ; commented [[1 7 8 9] [7] [6] [2]] Regards Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Re: Keeping an SSH tunnel open on Heroku using Clojure

2011-12-07 Thread Dave Barker
FYI I've improved my example https://gist.github.com/1443579 in case anyone needs it, not tested it on Heroku yet though. Cheers, Dave. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

Re: ANN: Clarity 0.5.1 - New GUI library

2011-12-06 Thread Dave Ray
aming convention for the watch entry point of an app or component so you can use it without editing the file. [1] https://groups.google.com/group/clojure-dev/browse_thread/thread/32ab1a5e7f819196/dde7a347e7f56b0a Cheers, Dave On Tue, Dec 6, 2011 at 1:45 PM, Stathis Sideris wrote: > Hello Dave, &

ANN: Seesaw 1.2.2

2011-12-04 Thread Dave Ray
Hi, Seesaw 1.2.2 has been released. It includes several enhancements, most notably SwingX support and some tools to make debugging exceptions in the UI thread easier. The full release notes can be found here: https://github.com/daveray/seesaw/wiki/Release-Notes. Cheers, Dave -- You received

Re: ANN: Clarity 0.5.1 - New GUI library

2011-12-03 Thread Dave Ray
to inspire each other and keep everyone honest. Keep up the nice work! Cheers, Dave more inline below ... On Sat, Dec 3, 2011 at 8:15 PM, Stathis Sideris wrote: > Hello Gary, > > Hello Gary, > > To be honest I didn't look at seesaw much while developing Clarity, so > I did

Re: classpath on seesaw????

2011-11-15 Thread Dave Ray
abits. It's a bit of an abomination :) Dave On Tue, Nov 15, 2011 at 10:28 PM, Gregg Williams wrote: > Hello! As a beginning Seesaw user, I had the same trouble. Here is a > solution that I just confirmed as working: > > $ cd seesaw/src > $ lein deps > $ lein run -m seesaw.exam

Keeping an SSH tunnel open on Heroku using Clojure

2011-11-13 Thread Dave Barker
;m trying to keep it reconnecting so the database is always available. I don't get much feedback looking in the logs, do any of you have some suggestions? https://gist.github.com/1362527#comments Cheers, Dave. -- You received this message because you are subscribed to the Google Groups "C

Re: Will clojurescript get in-ns and load?

2011-11-12 Thread Dave Sann
think Compile time loading would be sufficient (and necessary for clojurescript as pointed out above). I appreciate that there may be other more pressing issues. I hope everyone who went enjoyed the conj. I would have liked to be there. Maybe next year... Cheers Dave -- You received this

Re: classpath on seesaw????

2011-11-12 Thread Dave Ray
quot; with whichever example you want to run. Also, future questions like this might be better directed to the Seesaw mailing list https://groups.google.com/group/seesaw-clj Hope this helps, Dave On Sat, Nov 12, 2011 at 1:45 AM, jayvandal wrote: > I am trying to run the examples in seesaw.I

Re: where to find clojure swing definitons

2011-11-07 Thread Dave Ray
eesaw), or another wrapper (GUIFTW, Clarity, etc), to be a more pleasant experience than raw Swing. Cheers, Dave On Mon, Nov 7, 2011 at 10:16 AM, jayvandal wrote: > I wonder where I can find swing definitions such as text field > locations on a panel or frame? > How do I put 2 panels side

Re: Will clojurescript get in-ns and load?

2011-10-20 Thread Dave Sann
Thinking further, the capability would not be of use (to me) if it were not consistent/indistinguishable across clojure and clojurescript. I have seen in-ns and load used to effectively split a namespace across files If 'in-ns' and 'load' were implemented for clojurescript, could 'load' be man

Re: Will clojurescript get in-ns and load?

2011-10-20 Thread Dave Sann
different file/location. (The practical use being to allow both jvm and clojurescript implementations of the "same" api) Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups

Will clojurescript get in-ns and load?

2011-10-18 Thread Dave Sann
Is it planned for clojurescript to get *in-ns* and *load*. These would be most useful for code modularisation (see thread Reuse of generic Clojure/ClojureScript code?) Cheers Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To po

Re: Reuse of generic Clojure/ClojureScript code?

2011-10-18 Thread Dave Sann
platform. requiring or using a .x library would be used only where functionality was not planned or intended to be made portable. This would be very handy Is it planned for these functions to be developed? Cheers Dave -- You received this message because you are subscribed to the Google

Re: Sum on a list of maps

2011-10-16 Thread Dave Ray
Yes, just change the grouping function passed to group-by: (group-by #(vector (% "Type") (% "Subtype")) coll) The keys in the resulting map will be two-element vectors (e.g. ["TypeA" "SubTypeA"]) so you'll need to adjust the body of the for a bit

Re: Basic Question on Record construction

2011-10-15 Thread Dave Sann
ok thanks D -- 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 from this group, send e

Re: Sum on a list of maps

2011-10-14 Thread Dave Ray
(fn [acc v] (+ acc (Double/parseDouble (get v "Value" 0 vs)})))) All the strings don't help much. Cheers, Dave On Fri, Oct 14, 2011 at 1:25 PM, der wrote: > Hi, > > I'm a Clojure newbie trying to the f

Basic Question on Record construction

2011-10-13 Thread Dave Sann
nerated by some other function - say splitting a string or mapping over something else) Thanks Dave -- 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 member

Bug in str fun affecting keyword fn and other downstream functions?

2011-10-11 Thread Dave Sann
l(null, b, 2)) : cljs.core.truth_("\ufdd0'else") ? cljs.core.str.call(null, "\ufdd0", "'", b) : null; case 2: return a.call(null, cljs.core.str.call(null, b, "/", c)) } throw"Invalid arity: " + arguments.length; } cljs.core.keyword("hello

Re: Faster JSON library

2011-10-07 Thread Dave Sann
There was no particular reason to mention clutch. It was just the example that seemed to be in the discussion. Dave -- 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

does clojurescript implement: list?

2011-10-07 Thread Dave Sann
It seems not. I rummaged through the source and bootstrap.js and it does not seem to exist. Dave -- 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 m

Re: Faster JSON library

2011-10-06 Thread Dave Sann
In general, this is a potentially tricky question in respect of dependency management. Cheers Dave -- 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 ar

Re: Reuse of generic Clojure/ClojureScript code?

2011-10-06 Thread Dave Sann
I don't see why not, in principle. However, from my perspective when compiling at the moment, these are already taken care of. So I have not looked into this side of things. I think that it would need some thought to get the best solution. Cheers D -- You received this message because you

Re: Reuse of generic Clojure/ClojureScript code?

2011-10-06 Thread Dave Sann
fair enough. Is there any support for this at the moment? My only comment would be that it is quite handy to know that you have imported code that might be platform specific. It also seems reasonable that pure clojure code might be used by the .net version. Cheers Dave -- You received

Re: Reuse of generic Clojure/ClojureScript code?

2011-10-05 Thread Dave Sann
is. I use cljs-watch to compile the clojurescript by pointing it at the src_cljs directory. Cheers Dave -- 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 ne

Re: Leiningen Local Repositories

2011-10-05 Thread Dave Sann
ilable repositories. If I were to distribute a project.clj with dependencies that were not available, that would definitely be a pain. Anyway, it is not a major issue for me. Thanks for your input. Cheers Dave -- You received this message because you are subscribed to the Google Groups "C

Re: Leiningen Local Repositories

2011-10-04 Thread Dave Sann
? Thanks Dave -- 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 from this g

Leiningen Local Repositories

2011-10-01 Thread Dave Sann
hot"; "local-release" "http://artifactory/artifactory/libs-release-local"} To all my project.clj files. Does anyone know if you can add this as a default for lein? If so, how? Thanks Dave -- You received this message because you are subscribed

Re: Does macros evaluates its arguments before?

2011-09-26 Thread Dave Ray
auto__ x__574__auto__ y__576__auto__)) java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0) Make sense? Dave On Mon, Sep 26, 2011 at 10:26 AM, ru wrote: > Timothy! > > Thank you for the explanation. I understand quite well about > perfo

Clojurescript reader cannot handle \ in strings?

2011-09-17 Thread Dave Sann
The cljs reader does not seem able to read strings that contain \ characters. Has anyone else seen this behaviour? probably causes: https://github.com/ibdknox/pinot/issues/4 (ns test (:require [cljs.reader :as reader] )) (defn log [x] (.log js/console x)) (def string "[\"hel

Re: Reuse of generic Clojure/ClojureScript code?

2011-09-17 Thread Dave Sann
ok -- 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 from this group, send email to cl

Re: including sound or image files with Leiningen uberjar command

2011-09-17 Thread Dave Ray
Ah. I think there are issues with single-segment namespaces and AOT. See comment on first answer here [1]. Maybe converting to depExp.core would help. Dave [1] http://stackoverflow.com/questions/3390268/how-to-setup-the-classpath-when-running-the-jar-made-from-lein-uberjar On Sat, Sep 17, 2011

Re: including sound or image files with Leiningen uberjar command

2011-09-17 Thread Dave Ray
Did you forget to set the name of the main class/namespace in project.clj? that would cause the behavior you're seeing. Dave On Saturday, September 17, 2011, loonster wrote: > > > On Sep 16, 1:24 am, Joost wrote: >> On Sep 16, 7:20 am, loonster wrote: >> >> >

Re: including sound or image files with Leiningen uberjar command

2011-09-16 Thread Dave Ray
Note that this implementation is the same as (clojure.java.io/resource) [1]. Dave [1] https://github.com/clojure/clojure/blob/3a3374f714e5a755b7de2a761f37696f07a74e80/src/clj/clojure/java/io.clj#L422 On Fri, Sep 16, 2011 at 8:58 AM, willyh wrote: > I use the following helper funct

Re: java interop question: how to access Class object statically

2011-09-15 Thread Dave Ray
How about just "Integer"? :) Clojure> Integer java.lang.Integer Clojure> (class Integ­er) java.lang.Class Dave On Thu, Sep 15, 2011 at 1:31 PM, Andrew Xue wrote: > Hi all -- > > Trying to basically do something like Integer.class -- but ... > >

Re: Binding *out*

2011-09-14 Thread Dave Ray
when you're starting processes with exec you *always* want to do something like this even if you're throwing away the output. Otherwise the stdout buffer for the spawned process will eventually fill up and it will block leaving you wondering why it randomly stopped working. HTH, Dave [1] http:

Reuse of generic Clojure/ClojureScript code?

2011-09-14 Thread Dave Sann
hat some of this is possible with macros etc...my depth of knowledge is limited. I am interested to hear opinions... Cheers Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.co

Re: Need help w/ VimClojure

2011-09-09 Thread Dave Ray
ojure: call pathogen#infect() HTH, Dave [1] http://www.vim.org/scripts/script.php?script_id=2332 On Fri, Sep 9, 2011 at 9:56 AM, Sean Devlin wrote: > I'm having trouble setting up VimClojure.  I want to be able to simply > see syntax highlighting & rainbow parens in my file

Re: ANN: ClojureSphere - browse the Clojure ecosystem

2011-09-06 Thread Dave Ray
>> Clojars: >> http://clojuresphere.herokuapp.com/ > > Very nice!  Thanks for creating this. > > --Chouser > Yeah, very cool! And I especially like this comment in the source: ;; we don't need no stinkin database :) Dave -- You received this message because you are subscribed to

Re: ANN: j18n 1.0.0 – taming ResourceBundles

2011-09-04 Thread Dave Ray
The README represents an early draft before simplicity ensued :) FWIW, here's how it's used in Seesaw: https://github.com/daveray/seesaw/wiki/Resource-bundles-and-i18n Dave On Sun, Sep 4, 2011 at 3:51 PM, Laurent PETIT wrote: > Interesting! > I don't see the link betwee

Re: I/O

2011-08-25 Thread Dave Ray
g "java -jar clooj.jar"? Alternatively, Clooj could maintain it's own working directory and override all the file-related ops (maybe??), but that will almost certainly lead to confusion as soon as someone uses a raw (FileInputStream.) and finds that the working directory isn't wh

Re: I/O

2011-08-25 Thread Dave Ray
Note that most of those examples look a little dated and would benefit from a heapin' helpin' of clojure.java.io and friends. For instance, slurp is quite happy to read from a java.net.URL so fetch-url is unnecessary. Unfortunately slurp is a little under documented. Dave On Thursday,

Re: why is it necessary to use identity to check for nils in an if statement

2011-08-23 Thread Dave Ray
You have an extra set of parens around a, treating it as a function call. Try: (defn if-a [a b] (if a (str a) (str b))) Hope that helps, Dave On Tue, Aug 23, 2011 at 4:37 PM, Andrew Xue wrote: > this doesn't work: > > user=> (defn if-a [a b] (if (a) (str a) (str b))) >

Re: Prisoner's Dilemma in Clojure

2011-08-22 Thread Dave Ray
I'm not sure why this code was written this way, but Marginalia has no problem using docstrings. Compare it's own docs: http://fogus.me/fun/marginalia/ and the code they were generated from: https://github.com/fogus/marginalia/blob/master/src/marginalia/core.clj Cheers, Dave O

Re: reload file in lein

2011-08-14 Thread Dave Ray
This works for me: repl> (use 'foo.core :reload) or :reload-all if deps of the foo.core ns have changed. Also, (load-file) shouldn't be necessary. Cheers, Dave On Sun, Aug 14, 2011 at 8:20 PM, Jay Vyas wrote: > hi guys, Im doing the following development "workflow"

Re: Stream closed...

2011-08-12 Thread Dave Ray
Even shorter: (defn duplicate-file-data [file-path] (spit file-path (slurp file-path) :append true)) Dave On Fri, Aug 12, 2011 at 11:16 PM, Sean Corfield wrote: > I think you also want to reorganize the code so you get the line-seq and > then the line-count outside the for loop. And b

Re: Forcing evaluation of returned anonymous javascript function in ClojureScript

2011-07-24 Thread Dave Ray
See the "Host Interop" section here [1]. With ClojureScript there's a distinction between method lookup and method invocation. I think what you want is: (-> % .target (.getResponseText)) Dave [1] https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure On Sun,

Re: Anyone on Google+ yet?

2011-07-24 Thread Dave Ray
Invite sent in case someone else didn't send one already. Cheers, Dave On Sun, Jul 24, 2011 at 12:26 PM, MHOOO wrote: > I've never been fond of facebook, mainly because there is this > tendency to have a lot of people in your friends list whom you barely > know. G+ seem

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Dave Ray
ne numbers, etc. * Consider using actions for your menu items so you can reuse them in toolbars and elsewhere in the UI * getCaretPosition (and almost all Swing methods) is not thread-safe so calling it from an agent is asking for trouble :) Good luck! Dave On Tue, Jul 19, 2011 at 7:20 AM, Alessi

Reflection warning on protected methods

2011-07-18 Thread Dave Ray
I've tried it on Clojure 1.2.0 and 1.3.0-beta1. Is there any non-AOT way to do this? Is this considered a bug or a feature? :) Thanks! Dave -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

Re: Anyone on Google+ yet?

2011-07-14 Thread Dave Ray
http://profiles.google.com/daveray maybe this is a dumb question, but am I supposed to manually add everyone on this thread in G+? Seems a little unwieldy. dave On Thu, Jul 14, 2011 at 8:56 PM, Charlie Griefer wrote: > On Thu, Jul 14, 2011 at 4:55 PM, Sean Corfield wrote: >> Is it ju

Re: Continuations or monads or something

2011-07-01 Thread Dave Ray
I read about it and didn't see how to map my idea onto it so I stormed ahead. I'll take another look thought. This is probably one of those cases where you don't see the perfectly good wheel right in front of you until you invent one of your own. :) Dave On Fri, Jul 1, 2011 at

Re: Continuations or monads or something

2011-06-30 Thread Dave Ray
Thanks! In theory, this should only ever happen on the UI thread so it's not an issue, but better safe than sorry. Any thoughts on the overall premise or approach? Dave On Thu, Jun 30, 2011 at 8:22 AM, Meikel Brandmeyer wrote: > Hi again, > > await-event is not thread-safe. &

Continuations or monads or something

2011-06-29 Thread Dave Ray
at each step in the sequence. Thanks! Dave [1] http://dotnetslackers.com/articles/net/Programming-user-interfaces-using-f-sharp-workflows.aspx#1478 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@go

Re: Idiomatic way to reference a bundled data file from Clojure source?

2011-06-28 Thread Dave Ray
l be included in the jar and "just work". Hope this helps. Dave On Tue, Jun 28, 2011 at 9:12 PM, stu wrote: > Hi, > > I'd like to bundle a collection of (JSON) datafiles with a Clojure > project source tree so that Clojure functions can reliably find and > open thos

<    1   2   3   4   5   6   7   8   >