Re: ClojureScript and development workflow

2012-09-11 Thread Murtaza Husain
Hi Paul, Thanks for the workflow. - use the Clojure REPL as much as possible, even for my CLJS code. Afterall, it's just Clojure, right? This also encourages good program design, keeping browser-specific code in a single namespace How do you achieve the above ? Do you specify your cljs

Re: ClojureScript and development workflow

2012-09-11 Thread Laurent PETIT
2012/9/10 Takahiro Hozumi > Hi, > I refresh browser every time I change cljs files. > > > "Using the REPL as the main way to deliver code to the browser means > never having to refresh the page. One could theoretically build an entire > application without a single page refresh. If you find yours

Re: ClojureScript and development workflow

2012-09-11 Thread Laurent PETIT
2012/9/10 Chas Emerick > I've been using a combination of lein-cljsbuild to keep the on-disk > generated code fresh and piggieback[1] for all of my cljs REPL needs. > Hello Chas, I've tried to use piggieback. My current stack for playing with the concepts is leiningen2 on the command line (to s

Re: Lightweight lib/way to strip html from text

2012-09-11 Thread Denis Labaye
Hi, This thread on the Enlive mailling list may be of some interest to you: [enlive] How to select all user visible text from webpage? https://groups.google.com/forum/#!msg/enlive-clj/rrY08JdI4Tc/FmDuNjc6w_oJ Denis On Thu, Sep 6, 2012 at 7:41 PM, jamieorc wrote: > Hey all, I'm looking for a

Re: Plural dispatch

2012-09-11 Thread Chris Ford
Thanks for taking an interest, Brent. Interesting that you're using atoms rather than vars - it means that method registration is no longer thread-local. I wonder if there could be a scenario where method registration was actually used to coordinate between threads? :-) That could actually be use

ClojureDocs and Clojure 1.4

2012-09-11 Thread Wolodja Wentland
Hi all, I was wondering when ClojureDocs might be updated to show documentation for Clojure 1.4 as well. It is just that I thought that it'll happen "eventually" but it hasn't yet and I am unsure if there is somebody that can/should be poked about this. It is just that I consider ClojureDocs to be

Re: Ideas for interactive tasks

2012-09-11 Thread Zmitro Lapcjonak
On Aug 9, 6:21 pm, Nikita Beloglazov wrote: > I'm going to organize little clojure course at my university this year. For > this I want to implement set of tasks that hopefully will help to practise > clojure. Some tasks you may find at 4clojure: https://www.4clojure.com/problems Sort by "topic"

Re: ClojureScript and development workflow

2012-09-11 Thread Chas Emerick
On Sep 11, 2012, at 4:00 AM, Laurent PETIT wrote: > 2012/9/10 Chas Emerick > I've been using a combination of lein-cljsbuild to keep the on-disk generated > code fresh and piggieback[1] for all of my cljs REPL needs. > > Hello Chas, > > I've tried to use piggieback. My current stack for playin

Re: Noob Question - Clojure number rounding

2012-09-11 Thread Pascal Chatterjee
This doesn't seem to work for non-terminating decimals like 1/3: (defn round [s n] > (.setScale (bigdec n) s java.math.RoundingMode/HALF_EVEN)) > #'user/round > user=> (round 3 (/ 1 3)) > ArithmeticException Non-terminating decimal expansion; no exact > representable decimal result. java.mat

Re: ClojureScript and development workflow

2012-09-11 Thread Laurent PETIT
2012/9/11 Chas Emerick > On Sep 11, 2012, at 4:00 AM, Laurent PETIT wrote: > > 2012/9/10 Chas Emerick > >> I've been using a combination of lein-cljsbuild to keep the on-disk >> generated code fresh and piggieback[1] for all of my cljs REPL needs. >> > > Hello Chas, > > I've tried to use piggieb

Re: ClojureDocs and Clojure 1.4

2012-09-11 Thread John Gabriele
On Tuesday, September 11, 2012 7:01:39 AM UTC-4, Wolodja Wentland wrote: > > Hi all, > > I was wondering when ClojureDocs might be updated to show documentation > for > Clojure 1.4 as well. It is just that I thought that it'll happen > "eventually" > but it hasn't yet and I am unsure if there

Re: ClojureDocs and Clojure 1.4

2012-09-11 Thread Andy Fingerhut
Except for the fact that github is down right now, you can get the source code for ClojureDocs linked to from the home page (links near the bottom). I haven't heard anything definitive from the creators of ClojureDocs, but I would guess they are busy with other things, and adding Clojure 1.4 to

Re: ForkJoinTask not found under Java 7?

2012-09-11 Thread Wolodja Wentland
On Tue, Aug 21, 2012 at 19:40 +0100, Jim - FooBar(); wrote: > Hi everyone, > > I get this very strange error even though I'm using clojure 1.5 > alpha3 and java version "1.7.0_02" on Java HotSpot(TM) 64-Bit Server > VM ! > > ClassNotFoundException jsr166y.ForkJoinTask I've just filed http://dev.

Re: ClojureDocs and Clojure 1.4

2012-09-11 Thread Wolodja Wentland
On Tue, Sep 11, 2012 at 08:24 -0700, John Gabriele wrote: >My vague understanding is that clojuredocs is currently written in Ruby >and there have been plans to rewrite it in Clojure. It would be good to know what the plans are as I find ClojureDocs to be quite an important tool when I de

Help - I am doing something wrong (lein cljsbuild fails)

2012-09-11 Thread Thomas
Dear all, I wanted to give ClojureScript a try in combination with Noir so after reading the various descriptions on the interweb I came up with the following project.clj file: (defproject x "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME"; :lic

Re: ClojureScript and development workflow

2012-09-11 Thread Takahiro Hozumi
Hi, > I guess that at least the following require a restart. Please correct / > explain as needed : > > - change in CSS file on disk ? > - change in template file (either enfocus / hiccup-on-the-browser -don't > remember the name) ? > > and also when doing certain changes to the ClojureScript code

Re: Question about sets

2012-09-11 Thread Rich Hickey
I understand your frustration. But it is important to note that timeliness and feedback are a two-way street. There was a time when changes to Clojure were tried immediately by users, and I'd know within hours if not minutes if I'd introduced something that caused problems for someone. That mat

[ANN] Immutant 0.3.0 released

2012-09-11 Thread Jim Crossley
We released our third official version of Immutant today! With this release we now publish the Immutant namespaces to Clojars. They are of limited use when run outside of Immutant, of course, but they'll at least compile so you can mock/stub/redefine them in your unit tests. You can render some

Re: Help - I am doing something wrong (lein cljsbuild fails)

2012-09-11 Thread Thomas
I have just downloaded the lein cljsbuild from here: https://github.com/emezeske/lein-cljsbuild and build the simple project and that worked Then I build an uberjar from my project file and noticed that clojure 1.3.0 was included in it I suspect that is the problem ((Noir needs it app

Re: appengine-magic: Argument must not be null.

2012-09-11 Thread Rostislav Svoboda
Ok, it has nothing to do with clojure it's a GAE issue. Just in case someone trips over it too, the app must be started using lein appengine-prepare lein appengine-dev-appserver foo-dev from bash, instead of (use 'foo.core) (in-ns 'foo.core) (ae/serve foo-app) from REPL. See the section

Re: Help - I am doing something wrong (lein cljsbuild fails)

2012-09-11 Thread James Reeves
On 11 September 2012 19:54, Thomas wrote: > :dev-dependencies [[lein-cljsbuild "0.2.7"]] ; cljsbuild plugin > having googled for this problem people who hit this in the past ran older > versions of both Clojure and lein cljsbuild (I run the latest lein2) You should use :plugins for plugins.

Re: Literate Programming in org-babel (ob-clojure.el) is broken under nrepl.el

2012-09-11 Thread Gary Johnson
I just put together a simple example repo on GitHub, containing a literate programming solution to the Potter Kata (http://codingdojo.org/cgi-bin/wiki.pl?KataPotter) using Emacs' org-babel mode. You can check it out here: https://github.com/lambdatronic/org-babel-example Also be sure to tak

Re: Help - I am doing something wrong (lein cljsbuild fails)

2012-09-11 Thread Thomas
> > > You should use :plugins for plugins. :dev-dependencies doesn't do > anything in Lein 2. > > e.g. :plugins [[lein-cljsbuild "0.2.7"]] > > This might solve your problem. > Tried that as well, and it didn't work :( Thomas -- You received this message because you are subscribed to the G

can someone explain me how is this evaluated?

2012-09-11 Thread Erlis Vidal
I don't understand how is this expression evaluated to get the shown result (apply map list (partition 2 [ 1 2 3 4 5 ])) => ((1 3) (2 4)) removing the apply I got this: (map list (partition 2 [ 1 2 3 4 5 ])) => (((1 2)) ((3 4))) how is the apply changing the result? I'm not able to see the reas

Re: can someone explain me how is this evaluated?

2012-09-11 Thread Baishampayan Ghose
> I don't understand how is this expression evaluated to get the shown result > > (apply map list (partition 2 [ 1 2 3 4 5 ])) => ((1 3) (2 4)) This is equivalent to - (map list '(1 2) '(2 4) '(5)) > removing the apply I got this: > > (map list (partition 2 [ 1 2 3 4 5 ])) => (((1 2)) ((3 4))) >

Re: can someone explain me how is this evaluated?

2012-09-11 Thread Neale Swinnerton
> > (apply map list (partition 2 [ 1 2 3 4 5 ])) => ((1 3) (2 4)) > > This is equivalent to - > > (map list '(1 2) '(2 4) '(5)) Actually, since no pad collection is supplied, the partition call returns ((1 2) (3 4)) So the apply variant (unwrapping the collection) is equivalent to (map lis

ANN edn-java

2012-09-11 Thread Ben Smith-Mannschott
I've posted a first rough cut of an edn parser written in plain Java here: https://github.com/bpsm/edn-java The parser itself is Wirthian, which is to say it's a hand-written LL(2) scanner coupled with a hand-written LL(1) recursive decent parser. This is easy enough to do for edn's uncomplicated

Re: Immutant 0.3.0 released

2012-09-11 Thread Takahiro Hozumi
Hi, Forgive my ignorance, although I think the project must be useful, but I still don't understand what is the benefit of using application server. What is the difference between using a particular library(e.g. HornetQ) with JBoss AS7 and using the same one without JBoss AS7? Cheers, - Takahiro

Re: Question about sets

2012-09-11 Thread Andy Fingerhut
Rich: I'm not sure what you mean by the not-fastest-path possible that exists in today's Clojure code, so if you get a chance, see if the below is what you mean. As far as I can tell (i.e. putting debug println's in the Java code of RT.map), when someone enters a map literal in, say, a function

Re: ClojureScript and development workflow

2012-09-11 Thread Brent Millare
I emit the clojurescript code myself by calling cljs.closure/build myself and put this into the html file. I cache the code using clojure.core.memoize/memo-fifo with my own function that takes the dependent files timestamps as args (so that changes result in recompiles). Using ring, pages with

Re: Literate Programming in org-babel (ob-clojure.el) is broken under nrepl.el

2012-09-11 Thread Giorgio Valoti
Il giorno 07/set/2012, alle ore 15:45, lambdatronic ha scritto: > Thanks, Tim. This looks great. > > For those of you who don't want to go digging through the thread, here's the > summary: > > Step 1. Download nrepl-0.1.4-preview from Marmalade or MELPA (depends on > clojure-mode 1.11). > >

Any recent library similar to contrib.accumulators?

2012-09-11 Thread Ignacio Thayer
I haven't been using it since it's in contrib, but I miss some of the functionality. The wrappers around Coda/Hale don't feel right. Any suggestions? Thanks Ignacio -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Clojure on embedded java?

2012-09-11 Thread Marko Kocić
As you might know, Oracle recently released Embedded Java which purpose is to be used on memory and CPU constrained devices. I see that some people reported that Clojure works with it, and that performance is excellent, but the question is have someone tried using it for non trivial applications

[ANN] ACCU 2013 conference, 9-13 April 2013, Oxford UK -- call for papers

2012-09-11 Thread Giovanni Asproni
Hi, I'm sending this on behalf of Jon Jagger, the conference chair. ACCU invites you to propose a session for its leading software development conference. The conference will be held in Bristol, England, from the 9th to the 13th April inclusive. Our opening keynote speakers will be Eben Upton, M

Re: ClojureScript and development workflow

2012-09-11 Thread Steve Buikhuizen
Hi Laurent, I've been using CCW and cljsbuild for three months and it is working well for me but I suspect that my workflow can improve. I run cljsbuild auto (incremental mode) and edit cljs files in CCW, then refresh the browser (approx 6sec compile time) I suspect that I could improve my wor

Re: ClojureScript and development workflow

2012-09-11 Thread Chris Granger
FWIW, I'm working on this with Light Table, which removes a lot of the difficulties here - it will be include this script tag and you're ready to go. There's no reason that we need to jump through a bunch of hoops here. My plan is that the next release (sometime after strange loop) will include

Re: can someone explain me how is this evaluated?

2012-09-11 Thread Erlis Vidal
Hi BG and Neale, Thanks for taking the time to answer my question. Now I can read that code thanks to you. These was key to understand what was going on: *(apply + 1 2 '( 3 4)) which is equivalent to -* * (+ 1 2 3 4)* and *so the final result is equivalent to* *((list (first '(1 2)) (first (

Re: Plural dispatch

2012-09-11 Thread Brent Millare
Actually since you are using def, I believe your method registrations are global. You should be using binding with dynamic vars to get thread locals. Also with mine, since I have the user specify the pluralfn symbol and since it can be called in another namespace, the namespace of the pluralfn i

Re: ClojureScript and development workflow

2012-09-11 Thread Chas Emerick
dj looks interesting, thanks for the link. :-) - Chas On Sep 10, 2012, at 8:31 PM, Brent Millare wrote: > I emit the clojurescript code myself by calling cljs.closure/build myself and > put this into the html file. I cache the code using > clojure.core.memoize/memo-fifo with my own function th

Re: Immutant 0.3.0 released

2012-09-11 Thread Jim Crossley
Hi Takahiro, When considering a specific library in isolation, e.g. HornetQ, there is little difference between using it within or without an app server. Benefits of an app server include uniform deployment, centralized configuration, monitoring, and control, clustering capabilities to support

Re: Immutant 0.3.0 released

2012-09-11 Thread Takahiro Hozumi
Hi Jim, Thank you for comprehensible explanation. I understand. Thanks, - Takahiro On Sep 12, 10:45 am, Jim Crossley wrote: > Hi Takahiro, > > When considering a specific library in isolation, e.g. HornetQ, there is > little difference between using it within or without an app server. > > Benef

Re: Ideas for interactive tasks

2012-09-11 Thread Murtaza Husain
This is really interesting. I am wondering if the idea could be broadened to not just teach CS, but also maths, physics and chemistry. A curriculum in which programming is used as a tool to explore the different sciences. An integrated curriculum to teach the different sciences. Please keep

Re: Ideas for interactive tasks

2012-09-11 Thread Murtaza Husain
Thinking aloud, clojure could be used to create a DSL using which the students can experiment with concepts from different sciences, and see the results / effects in a graphical manner !! On Wednesday, September 12, 2012 11:03:04 AM UTC+5:30, Murtaza Husain wrote: > > > This is really interes