Re: trouble setting up emacs

2011-10-18 Thread MarisO
run this script in your .emacs.d directory -- #!/bin/sh git clone https://github.com/technomancy/clojure-mode.git wget -P paredit http://mumble.net/~campbell/emacs/paredit.el wget http://download.savannah.gnu.org/releases/color-theme/color-the

Save your ears - use Overtone 0.5.0

2011-10-18 Thread Sam Aaron
'tis that time again when we jump around in celebration of the new and the crazy: Overtone 0.5.0 is out! Hip-hip-hooray! So, what's new? First up we have some fantastic new committers. Please give a warm welcome to: * Nick Orton * Kevin Neaton * Jowl Gluth * Chris Ford * Philip Potter In term

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread Jonathan Fischer Friberg
I'm on the master branch. I compiled the file using 'cljsc file > file.js', and run it in the browser. On Tue, Oct 18, 2011 at 1:16 AM, David Nolen wrote: > Are you using ClojureScript HEAD? If you are and you are still seeing this > under what conditions (advanced mode, browser REPL, etc.) ? >

Macro not working - newbie question

2011-10-18 Thread Dusan
I just finished my first macro: (defmacro defrecord-withstr [recordname include columns recordargs] (let [ vv (gensym) stato (let [cols (if include columns (vec(seq(clojure.set/difference (set recordargs) (set columns)

clojure.string no namespace error

2011-10-18 Thread Omer Kudat
Hi all, I've started to teach myself clojure recently, so apologies for a potentially stupid question. I'm using clojure-1.3.0.jar, downloaded very recently. I would like to use clojure.string/split-lines, but I cannot access the namespace. I've tried: (import 'clojure.string) (import 'string) a

Re: clojure.string no namespace error

2011-10-18 Thread Philipp Meier
If you do a (require 'clojure.string) then all vars will be accessible as clojure.string/... e.g.clojure.string/split-lines . You can use "use" to import the vars into the current namespane: (use 'clojure.string) This wil make available all vars from clojure.string in you current namespace

Re: Is there a reader setting support BigDecimal by default?

2011-10-18 Thread Scott Hickey
I'm looking to avoid qualifying every number that has a decimal point with an M. For the "business" applications I've built over the last 25 years (credit card processing, healthcare claims, loans,etc.), there's never been a situation where inexact numbers were appropriate. That's why I was ho

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread David Nolen
Does the same problem occur when trying this at the REPL (say via script/repljs) ? David On Tue, Oct 18, 2011 at 7:22 AM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I'm on the master branch. > > I compiled the file using 'cljsc file > file.js', and run it in the > browser. > > > On

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread Jonathan Fischer Friberg
I can't run that repl, I get Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: org.mozilla.javascript.Context at clojure.lang.Util.runtimeException(Util.java:165) at clojure.lang.Compiler.eval(Compiler.java:6435) at clojure.lang.Compiler.eval(Comp

Re: Is there a reader setting support BigDecimal by default?

2011-10-18 Thread Tassilo Horn
Scott Hickey writes: Hi Scott, > I'm looking to avoid qualifying every number that has a decimal point > with an M. For the "business" applications I've built over the last 25 > years (credit card processing, healthcare claims, loans,etc.), there's > never been a situation where inexact numbers

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread David Nolen
Have you rerun the bootstrap script since the Rhino upgrade? On Tue, Oct 18, 2011 at 10:33 AM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I can't run that repl, I get > > Exception in thread "main" java.lang.RuntimeException: > java.lang.ClassNotFoundException: org.mozilla.javascrip

Re: "ClojureScript Mobile" BOF at the Clojure/conj?

2011-10-18 Thread Michael Fogus
> Anyone from the Clojure/conj org committee While I'm not on the organization committee, I will say that side-events like this would be spectacular. The logistics escape me at the moment, but perhaps spontaneity is the best approach? -- You received this message because you are subscribed to t

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread Jonathan Fischer Friberg
It works now, and the result is as expected. In the browser I still get the extra characters however. On Tue, Oct 18, 2011 at 5:04 PM, David Nolen wrote: > Have you rerun the bootstrap script since the Rhino upgrade? > > > On Tue, Oct 18, 2011 at 10:33 AM, Jonathan Fischer Friberg < > odysso...

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread David Nolen
Try removing the following: file.js out and recompiling. I also recommend compiling one of the ClojureScript samples that you haven't checked out yet to see if the issue is reproducible. David On Tue, Oct 18, 2011 at 11:17 AM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > It works n

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread David Nolen
I see you're not setting the encoding. Try adding the following to the top of David On Tue, Oct 18, 2011 at 11:43 AM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I did a minimal example > https://gist.github.com/1295749 > > Result is in the attachment. > > > On Tue, Oct 18, 2011

Re: Get the name of keyword/symbol in clojurescript

2011-10-18 Thread Jonathan Fischer Friberg
It works! Thanks for all the help. On Tue, Oct 18, 2011 at 5:52 PM, David Nolen wrote: > I see you're not setting the encoding. Try adding the following to the top > of > > > > David > > > On Tue, Oct 18, 2011 at 11:43 AM, Jonathan Fischer Friberg < > odysso...@gmail.com> wrote: > >> I did a

Re: "ClojureScript Mobile" BOF at the Clojure/conj?

2011-10-18 Thread Roger Austin
Michael Fogus wrote: > > Anyone from the Clojure/conj org committee > > While I'm not on the organization committee, I will say that > side-events like this would be spectacular. The logistics escape me > at the moment, but perhaps spontaneity is the best approach? As a Raleigh local, I c

Re: "ClojureScript Mobile" BOF at the Clojure/conj?

2011-10-18 Thread Chas Emerick
On Oct 18, 11:12 am, Michael Fogus wrote: > > Anyone from the Clojure/conj org committee > > While I'm not on the organization committee, I will say that > side-events like this would be spectacular.  The logistics escape me > at the moment, but perhaps spontaneity is the best approach? …or even

Re: Macro not working - newbie question

2011-10-18 Thread Marshall T. Vandegrift
Dusan writes: > (symbol(str "(str (:" % " " vv "))")) This expression is the (immediate) problem child. You are producing a symbol which contains literal space and parenthesis characters embedded in it. When you print out the macro-expansion, it looks fine, but the actual forms generated conta

What changed 1.2/1.3 to cause this program slowdown?

2011-10-18 Thread Isaac Gouy
thread-ring Clojure 1.2 N=50 1.8 secs N=500 7.1 secs N=5000 58.3 secs thread-ring Clojure 1.3 N=50 2.8 secs N=500 25.3 secs N=5000 >1800 secs http://shootout.alioth.debian.org/u64q/program.php?test=threadring&lang=clojure&id=1 chameneos-redux Clojure 1.2 N=50 2.7 sec

Re: Macro not working - newbie question

2011-10-18 Thread Alan Malloy
Simpler to just use the field names which are already bound, rather than constructing keywords out of them and calling them with juxt: (defmacro defrecord-withstr [name fields columns include?] (let [displayed (if include? columns (remove (set columns) fields))] `(defrecord ~name ~fields

Re: What changed 1.2/1.3 to cause this program slowdown?

2011-10-18 Thread Alan Malloy
I'm not an expert on the topic, but the threadring example has some suspicious ^Integer hints on values that were integers in 1.2 and are longs in 1.3 (ie, they were created from numeric literals). The hints don't seem to be actually being used, so I don't think this has an impact, but perhaps ment

Re: "ClojureScript Mobile" BOF at the Clojure/conj?

2011-10-18 Thread Chouser
On Tue, Oct 18, 2011 at 12:22 PM, Chas Emerick wrote: > On Oct 18, 11:12 am, Michael Fogus wrote: >> > Anyone from the Clojure/conj org committee >> >> While I'm not on the organization committee, I will say that >> side-events like this would be spectacular.  The logistics escape me >> at the mo

Re: clojure.string no namespace error

2011-10-18 Thread Aaron Bedra
Here's an example from the REPL that should get you going: user => (require '[clojure.string :as str]) nil user=> (str/split-lines "foo\nbar\r\nbaz\n") ["foo" "bar" "baz"] Cheers, Aaron Bedra -- Clojure/core http://clojure.com On 10/18/2011 05:52 AM, Omer Kudat wrote: Hi all, I've started to

Re: clojure.string no namespace error

2011-10-18 Thread Omer Kudat
Thanks, I think I was trying to wrong thing (don't know why I was trying to use import rather than require). -- 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

Clojure 1.3 treatment of integers and longs

2011-10-18 Thread nathanmarz
Hey all, I recently started upgrading Storm to Clojure 1.3, and I ran into various issues due to Clojure's treatment of integers and longs. In particular, I have a situation like the following: 1. A Java object returns me an int. Let's call this value "v". 2. I put "v" into a map, and pass that m

Re: Clojure 1.3 treatment of integers and longs

2011-10-18 Thread David Nolen
233 messages long thread from June 2010, http://groups.google.com/group/clojure/browse_thread/thread/c8c850595c91cc11/171cacba292a0583 David On Tue, Oct 18, 2011 at 5:00 PM, nathanmarz wrote: > Hey all, > > I recently started upgrading Storm to Clojure 1.3, and I ran into > various issues due t

Re: Who will be at QCon SF?

2011-10-18 Thread Aaron Bedra
I will be there and am giving a talk in the functional web track http://qconsf.com/sf2011/presentation/One+%28%29+to+Rule+them+All See you on the coast. Cheers, Aaron Bedra -- Clojure/core http://clojure.com On 09/27/2011 06:28 PM, Demetrius Nunes wrote: Hi guys, I'd love to meet with fell

Re: Clojure 1.3 treatment of integers and longs

2011-10-18 Thread nathanmarz
Thanks. I read through that and it didn't quite answer my question. To me it seems more logical that: 1. Clojure defaults to longs when you create a new number (with a literal 0, 1, etc) 2. You can create ints by doing (int 0) 3. Clojure never changes the types of things you're using I find Cloju

Re: Reuse of generic Clojure/ClojureScript code?

2011-10-18 Thread Dave Sann
If/when clojurescript gets* in-ns* and *load* the previously outlined solution could be improved. I could use load to include platform specific ports of intended core library capability into the generic files. This would mean that you would only need to require the generic file, regardless of p

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 post to this g

Re: Clojure 1.3 treatment of integers and longs

2011-10-18 Thread Kevin Downey
On Tue, Oct 18, 2011 at 7:45 PM, nathanmarz wrote: > Thanks. I read through that and it didn't quite answer my question. To > me it seems more logical that: > > 1. Clojure defaults to longs when you create a new number (with a > literal 0, 1, etc) > 2. You can create ints by doing (int 0) > 3. Clo