Re: Minimizing the download of js code in Multipage ClojureScript webapp

2013-01-28 Thread Marcus Holst
Thanks for the tip, Mimmo! On Sunday, January 27, 2013 11:33:46 PM UTC+1, Mimmo Cosenza wrote: > > Hi Marcus, I found the same solution Evan suggested to you. You can read > about it here. > > https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-06.md > > and you can also define a s

Re: Natively Compiled Clojure

2013-01-28 Thread Konrad Hinsen
Timothy Baldridge writes: > That's why I think it's a good idea to ask what the goals are for native > Clojure. The > ClojureScript and Clojure-Py options while nice both don't allow for a good > concurrency > story. On top of that, I'm not sure either of those would actually run on > iOS

Re: Natively Compiled Clojure

2013-01-28 Thread Mikera
On Tuesday, 22 January 2013 00:29:54 UTC+8, octopusgrabbus wrote: On this general topic: the following project (VMKit) looks very interesting: - http://vmkit.llvm.org/index.html It basically implements a full JVM on top of LLVM, which should in theory be sufficient to run Clojure on the LLVM.

Re: Installing Clojure on Windows 7

2013-01-28 Thread sampson . john7
I haven't heard of brew. I'm glad some people find it easy to install Clojure on Windows. But knowing that doesn't really help those who don't. Not that there is any obligation on anyone to help - we can just eff off and do other things. Regarding a 'snapshot' build, obviously no-one is obliged

[ANN] Interactive tasks

2013-01-28 Thread Nikita Beloglazov
Hello I've created a set of tasks for practising clojure. Here is repo: https://github.com/nbeloglazov/clojure-interactive-tasks Key feature is interactivity: tasks are visualized and user can see how solution works. Some tasks require knowledge of math or algorithms. Goal is the same as in 4c

Re: Installing Clojure on Windows 7

2013-01-28 Thread Mark Engelberg
As Laurent pointed out, Eclipse Counterclockwise is pretty close to being a the kind of full-stack snapshot you're looking for, and it works great and installs easily on Windows. You simply download Eclipse (a zip file which doesn't really need to be "installed"), run it, and install counterclockw

is intellij idea a good ide for clojure development?

2013-01-28 Thread Dennis Haupt
the only ides i have used so far for clojure are intellij idea and netbeans. is there one that is a lot better? if yes, why? i am not interested in details or single features, i just want to know if there is some magic editor out there that i should look into because it is *obviously a lot* better

Re: is intellij idea a good ide for clojure development?

2013-01-28 Thread Josh Kamau
IMHO, All IDEs are good. However, when it comes to clojure development, it depends on the quality of the plugin. Is the plugin still being maintained and improved? Counterclockwise plugin for eclipse is very popular. La clojure plugin for intellij is also very good. Its maintained by the same c

Re: is intellij idea a good ide for clojure development?

2013-01-28 Thread Jay Fields
I used IntelliJ for clojure dev for almost 3 years. About six months ago I finally took the time to learn emacs, and I strongly regret not doing it much earlier. There are too many reasons to list, but it all comes down to a simple question for me: do you want the ability to easily automate tasks t

ANN - 13th modern-cljs tut - Don't Repeat Yourself when crossing the border

2013-01-28 Thread Giacomo Cosenza
Hi all, I just published the 13th tutorial on the modern-cljs series. The title is Don't Repeat Yourself when crossing the border. https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-13.md The DRY principle has been applied in the form validation context by using the Chas Emerick

Re: Installing Clojure on Windows 7

2013-01-28 Thread Ravi Sundaar
I have been able to install clojure (1.4.0), lieningen, emacs (24.2) fine on windows 7. Clojure and Lien work fine. It took me a while to figure out the problem with emacs. After fighting through battles of setup, I realized I have to start emacs as the administrator in windows. This might solve

Re: Natively Compiled Clojure

2013-01-28 Thread Paul deGrandis
I personally have no limitations with Clojure and the JVM for general development. Like Mark mentioned, I have a need to embed runtimes within C systems, with a small memory footprint (ideally less than 5 Mb) fast execution, and a solid FFI. Giving up some raw performance to get some benefits o

Re: reload file in lein

2013-01-28 Thread Chris F Carroll
Does just loading the file again not work: repl>(load-file src/foo/core.clj) On Monday, 15 August 2011 01:20:14 UTC+1, Jay Vyas wrote: > > hi guys, Im doing the following development "workflow" > > -> edit a script in vi > -> save > -> $> lein repl > -> repl>(load-file src/foo/core.clj) >

clojure.test are macro

2013-01-28 Thread John Lawrence Aspden
Hi, am I doing something wrong here?: user=> (clojure-version) "1.4.0" user=> (use 'clojure.test) nil user=> (is ((fn[x] x) 1) 1) 1 user=> (are [ x y ] (= x y) ((fn[x] x) 1) 1) StackOverflowError clojure.core/map/fn--4087 (core.clj:2426) user=> (macroexpand '(are [ x y ] (= x y) ((fn[x] x) 1) 1

Re: clojure.test are macro

2013-01-28 Thread James Xu
user=> (macroexpand-1 (are [ x y ] (= x y) ((fn[a] a) 1) 1)) true user=> (macroexpand-1 '(are [ x y ] (= x y) ((fn[a] a) 1) 1)) (clojure.template/do-template [x y] (clojure.test/is (= x y)) ((fn [a] a) 1) 1) The StackOverflowError may have something to do with the do-template func On 13-1-28 下午1

Re: clojure.test are macro

2013-01-28 Thread AtKaaZ
=> (are [ x y ] (= x y) ((fn[x] x) 1) 1) StackOverflowError clojure.lang.PersistentArrayMap.containsKey (PersistentArrayMap.java:158) => (dorun (map #(println (.toString %)) (take-last 100 (.getStackTrace *e clojure.lang.RestFn.invoke(RestFn.java:408) clojure.core$map$fn__4226.invoke(core.cl

Re: Natively Compiled Clojure

2013-01-28 Thread Konrad Hinsen
Mikera writes: > On this general topic: the following project (VMKit) looks very interesting: > > - http://vmkit.llvm.org/index.html > > It basically implements a full JVM on top of LLVM, which should in theory be > sufficient > to run Clojure on the LLVM. I tried this a while ago and

Re: reload file in lein

2013-01-28 Thread AtKaaZ
maybe he needs to :reload-all for each use in foo.care? ie. (ns foo.core (:use [runtime.q :as q] :reload-all) (:use [datomic.api :only (q db) :as d]) (:use [runtime.util :as u] :reload-all) ) so that it will also reload whatever foo.core is using, in this example it's only going to reload run

Re: iOS and Windows RT support?

2013-01-28 Thread Jeff Heon
Not Clojure, but you can use Nu, a Lisp-like language, to write iPhone applications. http://programming.nu/about https://groups.google.com/d/topic/programming-nu/vboT7iW2ko8/discussion On Tuesday, January 22, 2013 12:55:29 PM UTC-5, MC Andre wrote: > > What's the state of iOS and Windows RT suppo

Re: clojure.test are macro

2013-01-28 Thread AtKaaZ
well this should explain it: => (are [ x y ] (= x y) ((fn[x] x) 1) 1) StackOverflowError clojure.core/partial/fn--4209 (core.clj:2396) => (are [ x y ] (= x y) ((fn[a] a) 1) 1) true On Mon, Jan 28, 2013 at 4:37 PM, John Lawrence Aspden < aspd...@googlemail.com> wrote: > Hi, am I doing somethin

Re: clojure.test are macro

2013-01-28 Thread AtKaaZ
sorry, James Xu already said that (didn't want to steal any credit, but I've just realized that he said the same thing) On Mon, Jan 28, 2013 at 5:25 PM, AtKaaZ wrote: > well this should explain it: > > => (are [ x y ] (= x y) ((fn[x] x) 1) 1) > StackOverflowError clojure.core/partial/fn--4209

Re: clojure.test are macro

2013-01-28 Thread Sean Corfield
In other words, don't use the same names for variables in your code under test that you use for the placeholder variables in the `are` binding and the test expressions. I seem to remember this coming up before (fairly recently?) and it was just considered a limitation of the `are` macro implementa

SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
I have a small clojure app (maybe 700 lines of code). I start it at the terminal and it runs for 10 minutes or so. Then, sometimes, it produces this error: # A fatal error has been detected by the Java Runtime Environment: # # SIGBUS (0xa) at pc=0x00010e34815e, pid=45108, tid=22787 # # JR

Re: clojure.test are macro

2013-01-28 Thread Brian Marick
On Jan 28, 2013, at 11:13 AM, Sean Corfield wrote: > In other words, don't use the same names for variables in your code > under test that you use for the placeholder variables in the `are` > binding and the test expressions. It might be a good practice to distinguish the roles via a naming con

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread AtKaaZ
try using this vm arg: -XX:-UseCompressedOops more info here: https://groups.google.com/d/msg/clojure/MIKccMX9gvk/gZYA_24d0BwJ On Mon, Jan 28, 2013 at 6:59 PM, larry google groups < lawrencecloj...@gmail.com> wrote: > > I have a small clojure app (maybe 700 lines of code). I start it at the > t

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread Jim - FooBar();
I feel obliged to come in and say that using this flag did not cure my problem completely...This error is still thrown whenever i use ^:const and reducers to traverse tree of moves deeper than 6...It doesn't happen always but most of the times! If i don't use ^:const it seems to not happen. Not

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread AtKaaZ
Hi Jim, did you try a 32bit jvm? I wonder if it still happens with that On Mon, Jan 28, 2013 at 7:28 PM, Jim - FooBar(); wrote: > I feel obliged to come in and say that using this flag did not cure my > problem completely...This error is still thrown whenever i use ^:const and > reducers to tra

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread Jim - FooBar();
No, I haven't but to be honest switching vms is not really a solution...even if it didn't happen my cpu is 64-bit and Ideally i'd like to take advantage of it, wouldn't you? Are you sort of implying that this is a Java/JDK issue and not a clojure one? Larry are using reducers or ^:const ??? I'

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread AtKaaZ
it could still be a clojure(or asm) issue but only when using 64bit jvm, my guess is that the 32bit one will always work (without errors, or at least without the compressed oops error) but I didn't try it "In an ILP32-mode JVM, or if the UseCompressedOops flag is turned off in LP64 mode, all oops

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
> This error is still thrown whenever i use ^:const and > reducers to traverse tree of moves deeper than 6.. Interesting. My app leans heavily on (reduce). I think in some places I might call reduce from inside of another reduce. This is the problem then? W dniu poniedziałek, 28 stycznia 201

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
Than you for the suggestion. I am highly ignorant about the JVM. I have been using these options: :jvm-opts ["-Xmx1000m"] I will switch to: :jvm-opts ["-Xmx1000m -XX:-UseCompressedOops"] W dniu poniedziałek, 28 stycznia 2013 13:02:48 UTC-5 użytkownik AtKaaZ napisał: > > try using this

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread AtKaaZ
even if that works, it should really be considered as a (temporary)workaround to the actual fix(which is unknown to me) and it's not unlike using a 32bit jvm (both are workarounds and both have disabled UseCompressedOops). quick read here: http://javarevisited.blogspot.com/2012/06/what-is-xxusecom

Re: Building a jdbc WHERE IN clause

2013-01-28 Thread Jonathon McKitrick
On Friday, January 25, 2013 7:34:29 PM UTC-5, Sean Corfield wrote: > Try: > (into [sql] ids) > That worked perfectly. > In the next version of java.jdbc (currently 0.2.4-SNAPSHOT but it will > become 0.3.0), you'll be able to simplify your code to this: > > (sql/query (get-db-spec

Re: clojure.test are macro

2013-01-28 Thread John Lawrence Aspden
Thanks Guys, I'll avoid the are macro. Any ideas why this doesn't work?: user=> (use 'clojure.test) nil user=> (use 'clojure.test.tap) nil user=> (deftest a (is true)) #'user/a user=> (run-tests) Testing user Ran 1 tests containing 1 assertions. 0 failures, 0 errors. {:type :summary, :pass 1, :

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread Jim - FooBar();
On 28/01/13 18:58, larry google groups wrote: Interesting. My app leans heavily on (reduce). I think in some places I might call reduce from inside of another reduce. This is the problem then? No no I don't mean plain old 'reduce' but the new 'reducers' library in 1.5... Jim -- -- You re

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
Ah, stupid of me. No, I'm not using the 1.5 features. This project is all 1.4. W dniu poniedziałek, 28 stycznia 2013 14:51:02 UTC-5 użytkownik Jim foo.bar napisał: > > On 28/01/13 18:58, larry google groups wrote: > > Interesting. My app leans heavily on (reduce). I think in some places >

Job Opportunity - Clojure coder + QA experience

2013-01-28 Thread Jeff Weiss
There is an opening in my QA department at Red Hat. Note, the posting below is a somewhat generic and does not mention Clojure, but I can tell you that Clojure is already being used extensively by our group, and that you would be using it regularly. http://jobs.redhat.com/jobs/descriptions/pri

Re: Job Opportunity - Clojure coder + QA experience

2013-01-28 Thread Sean Corfield
That's probably a good opportunity for me to say we're also hiring for a similar role at World Singles - http://corfield.org/blog/post.cfm/hiring-hiring-hiring - so if you're interested in Jeff's role, you might also be interested in ours and it doubles your options :) I won't be offended by anyon

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread dgrnbrg
I've encountered errors like this when running where .jar files for the project were being loaded from an NFS share. Do you have that in your environment? The solution is to load the .jars from a local directory instead. On Monday, January 28, 2013 12:59:12 PM UTC-5, larry google groups wrote:

Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread Jonathon McKitrick
Either one works, is there any kind of guideline on which to prefer, when? Or is it entirely personal preference? It seems each way could be more readable in different circumstances -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post t

Re: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread James Xu
(:Keyword map) is preferred, because keyword itself can never be nil, while it's possible for map, you might be interested to have a look at: https://github.com/bbatsov/clojure-style-guide From: Jonathon McKitrick Reply-To: Date: Mon, 28 Jan 2013 18:00:01 -0800 (PST) To: Subject: Best prac

Re: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread AtKaaZ
I would use (map :keyword) myself, for that exact reason(because I'm into fail-fast), but only when I know the map is expected to never be nil at this point(but likely I'll do the program in such a way that this point won't be reached with a nil map in the first place), so that if it happens that t

Re: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread Joseph Smith
Also, :keyword is a function, whereas the object you're passing to it may not be a array-map or hash-map (both functions), but a record or other type implementing the map interface. --- Joseph Smith j...@uwcreations.com @solussd On Jan 28, 2013, at 8:09 PM, James Xu wrote: > (:Keyword map)

Re: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread Joseph Smith
The problem with this approach is if your map is a record (e.g. made with defrecord) it will not work. --- Joseph Smith j...@uwcreations.com @solussd On Jan 28, 2013, at 8:31 PM, AtKaaZ wrote: > I would use (map :keyword) myself, for that exact reason(because I'm into > fail-fast), but only

Re: Job Opportunity - Clojure coder + QA experience

2013-01-28 Thread AtKaaZ
(read only what's in *bold*, to save your time, read everything if you're a consistency maniac xD) *While I have a knack*(and enjoy) *for finding bugs*(and I take them personally[as ideas, so I don't hate the person who introduced it(or at least I'd like to believe that I don't, but let's be hone

Re: Best practice - (:keyword map) versus (map :keyword)

2013-01-28 Thread AtKaaZ
Thank you. In this case(although I have zero xp with records) I would probably opt for making a wrapper function and have it always be used in any instance when records are to be gotten like that, even though I understand it would be a performance hit (maybe I could make it a macro which I could ch

Re: ANN - 13th modern-cljs tut - Don't Repeat Yourself when crossing the border

2013-01-28 Thread Mimmo Cosenza
I just updated the 13th modern-cljs tutorial with a client side validator which call via ajax a server side validator. https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-13.md HIH My best Mimmo On Jan 28, 2013, at 1:18 PM, Giacomo Cosenza wrote: > Hi all, > > I just publish

Re: SIGBUS : A fatal error has been detected by the Java Runtime Environment

2013-01-28 Thread larry google groups
Thank you. I am not loading jar files from an NFS share. I pull from the 2 standard repositories plus one extra: :repositories [["central-proxy" "https://repository.sonatype.org/ content/repositories/centralm1/"]] >From there I pull: [org.apache.commons/commons-email "1.3"]

Re: is intellij idea a good ide for clojure development?

2013-01-28 Thread larry google groups
You should keep an eye on LightTable. It is still in very early development, but at some point this year it may well become the best environment to use for Clojure coding: http://www.chris-granger.com/2012/11/05/meet-the-new-light-table/ On Jan 28, 6:37 am, Dennis Haupt wrote: > the only ides

Exception in thread "Thread-4" java.lang.NoClassDefFoundError:

2013-01-28 Thread larry google groups
Maybe someone can tell me where I went wrong on this one. I have an app. Written with Clojure 1.4. At first the app was very small, so I put all the code into core.clj. When I got to about 500 or 600 lines of code, core.clj was too big, so I started to break it up. There were some string-to-enli

Re: Exception in thread "Thread-4" java.lang.NoClassDefFoundError:

2013-01-28 Thread James Xu
Don’t know the exact reason for your issue, but for your question: "How can a class be present at compile time but not at runtime?" It IS possible, AFAIK there are two cases: 1) maven pom can specify a dependency's scope as *provided*, the dependency will be available at compile time, but will no

Re: Exception in thread "Thread-4" java.lang.NoClassDefFoundError:

2013-01-28 Thread AtKaaZ
On Tue, Jan 29, 2013 at 8:03 AM, larry google groups < lawrencecloj...@gmail.com> wrote: > > Maybe someone can tell me where I went wrong on this one. > > I have an app. Written with Clojure 1.4. > > At first the app was very small, so I put all the code into core.clj. > When I got to about 500 or

Re: Exception in thread "Thread-4" java.lang.NoClassDefFoundError:

2013-01-28 Thread AtKaaZ
On Tue, Jan 29, 2013 at 8:11 AM, James Xu wrote: > Don’t know the exact reason for your issue, but for your question: > > "How can a > class be present at compile time but not at runtime?" > I find this to be relevant: http://onjava.com/pub/a/onjava/2005/01/26/classloading.html > > It IS possible

Re: Exception in thread "Thread-4" java.lang.NoClassDefFoundError:

2013-01-28 Thread AtKaaZ
It might be something like this(pasting here): The problem is the hyphen in the namespace. >From the *Joy of Clojure* HYPHENS/UNDERSCORES If you decide to name your namespaces with hyphens, à la my-cool-lib, then the corresponding source file must be named with underscores in place of the hyphen

Re: Exception in thread "Thread-4" java.lang.NoClassDefFoundError:

2013-01-28 Thread AtKaaZ
if not, could it be that the name of some namespace or function changed(ie. renamed) but not the call to it? or something along the lines of something being renamed but not in all places... unless the error happens at runtime after a while when you're sure that code already got executed and worked,

Re: is intellij idea a good ide for clojure development?

2013-01-28 Thread Mikera
On Monday, 28 January 2013 19:37:54 UTC+8, HamsterofDeath wrote: > the only ides i have used so far for clojure are intellij idea and > netbeans. is there one that is a lot better? if yes, why? > i am not interested in details or single features, i just want to know if > there is some magic edit