[ANN] mustache.clojure 0.3.0

2016-06-13 Thread Bill Robertson


Hello, 


I've released 0.3.0 of mustache.clojure. It's a Clojure adapter for 
mustache.java, which performs well and has good adherence to the mustache 
spec (with the exception of whitespace).


Version 0.3.0 adds mustache spec compliance equal to mustache.java.


https://github.com/billrobertson42/mustache.clojure




Thanks! 

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Attempt at rethrow macro

2013-04-01 Thread Bill Robertson
While it may violate the principle of least surprise (until you 
realize/learn that try/catch is a special form), I don't think it's a bug.

On Monday, April 1, 2013 4:00:31 PM UTC-4, Cedric Greevey wrote:
>
> IMO, the real problem here is try not macroexpanding its body before 
> looking for its catches. IMO that's a bug, and indeed that the rethrow 
> macro doesn't work when the s-expression it expands to would work in its 
> place represents a violation, at least in spirit, of homoiconicity. There 
> are operators that are "special" and can't be supplied via macro. That's 
> wrong.
>  

-- 
-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Attempt at rethrow macro

2013-04-01 Thread Bill Robertson
I think that's what is going on too. I tried quoting catch in the rethrow 
macro, but that didn't do it (didn't expect it to either).

(defmacro rethrow [ex-class] `('catch ~ex-class x# (throw x#)))

I still wonder if there is some sort of macrofoolery that would get it past 
the compiler. I'm not going to hold my breath though.

-Bill

On Monday, April 1, 2013 1:26:43 PM UTC-4, Alf wrote:
>
> Hey Bill.
>
> I am guessing the problem is that the rethrow macro is expanded and passed 
> to the reader/compiler before the handle-ex macro is. And at that point the 
> compiler sees catch as a "standalone-symbol", not as part of the try 
> special form. Macro-experts, please correct me :)
>
> Tried to quickly catch up with 
> http://www.infoq.com/presentations/Clojure-Macros, but infoq seems slow.
>
> Cheers,
> Alf
>
>
> On 1 April 2013 17:21, Bill Robertson  >wrote:
>
>> I was all excited when I was able to consolidate a lot of try/catch logic 
>> behind a macro earlier this morning. All was good.
>>
>> I felt like I could do a better job of communicating my intentions in the 
>> code though with a rethrow construct rather than writing 
>> (catch FooException #f (throw #f))
>>
>> I would have liked to have been able to simply write
>> (rethrow FooException)
>>
>> This failed. Poking around the docs a bit, I see that try/catch is a 
>> special form. Which makes sense.
>>
>> user=> (defmacro rethrow [ex-class] `(catch ~ex-class x# (throw x#)))
>> #'user/rethrow
>> user=> (defmacro handle-ex [message & body] `(try ~@body (rethrow 
>> IllegalArgumentException) (catch Exception x# (throw 
>> (IllegalArgumentException. message)
>> #'user/handle-ex
>> user=> (handle-ex "no" (throw (IllegalArgumentException. "yes")))
>> CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
>> catch in this context, compiling:(NO_SOURCE_PATH:1:1)
>>
>> It was a longshot, but I tried to qualify catch. That fails too, because 
>> it's not really there...
>>
>> user=> (defmacro rethrow [ex-class] `(clojure.core/catch ~ex-class x# 
>> (throw x#)))
>> #'user/rethrow
>> user=> (defmacro handle-ex [message & body] `(try ~@body (rethrow 
>> IllegalArgumentException) (catch Exception x# (throw 
>> (IllegalArgumentException. message)
>> #'user/handle-ex
>> user=> (handle-ex "no" (throw (IllegalArgumentException. "yes")))
>> CompilerException java.lang.RuntimeException: No such var: 
>> clojure.core/catch, compiling:(NO_SOURCE_PATH:1:1)
>>
>> Is this possible to do within the normal bounds of the language?
>>
>> Thanks!
>>
>>
>>  -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Distributing Clojure 1.5 to Java 6 and Java 7 JVMs

2013-03-01 Thread Bill Robertson
If I want to distribute Clojure 1.5 to Java 1.6 JVMs, and I am not using 
the reducer code, do I need to include the fork join library?

If I do use the reducers library, and I need to distribute to both JVM 
versions, should I include the fork/join lib with the distribution and then 
will it work OK on both platforms? Or will including the fork join library 
interfere with execution in Java 7 JVMs?

Thanks

-- 
-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ANN: a Clojure docs site, and github organization

2012-10-08 Thread Bill Robertson
Giant +1 to moving clojuredocs.org forward. I've been getting concerned 
about the longevity of the site, and I would really miss it if it were gone.

On Thursday, October 4, 2012 4:35:33 PM UTC-4, Michael Klishin wrote:
>
> 2012/10/5 Bronsa >
>
>> Wouldn't it be better for readevalprintlove and clojuredocs to join 
>> forces from the beginning?
>
>
> It's not clear what readevalprintlove wants to be. clojuredocs has been 
> discussed for a while by some people who care
> about Clojure documentation. There are pretty specific plans about the 
> guides and moving clojuredocs.org forward
> to 1.4 and (hopefully, at some point) multi-version support. In part the 
> guides portion of clojuredocs (the organization)
> will follow the clojurewerkz.org projects model which is known to work 
> well and even produced some tools
> we can easily reuse and adapt.
>
> readevalprintlove looks like a fancy playground so far.
>
> There are multiple aspects to good documentation, see 
> http://jacobian.org/writing/great-documentation/
> -- 
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>
>  

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: genuine help needed to speed up minimax algorithm!

2012-09-03 Thread Bill Robertson
Did you figure out what was going on?

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: new with clojure, need help!

2012-04-30 Thread Bill Robertson
Hello,

I put together a presentation that will help you.

http://www.tekbot.com/clojure-simple-start.pdf

It teaches you a few things for working with the repl that will help
you whether or not you're working with Emacs, Eclipse etc... It also
discusses a little bit about using leiningen, which is a really nice
gateway to starting with Clojure.

There is a little bit of discussion on it here:
http://www.reddit.com/r/Clojure/comments/qmwll/start_learning_clojure_now_slides_from_my_talk_at/

Please forgive the typos in the document. I just realized that I
corrected the ones that I know about, but I didn't upload the new
version.

-Bill

On Apr 25, 10:37 am, omer  wrote:
> hello im need to learn how to use clojure and how it works,
> i found some videos the helped me a bit to understand how clojure works,
> but i need a more basic guidence on how to install the nessecery plugins
> to eclipse, and what to do with them...
> any tutorial will do! thats...
> p.s. im using windows and i need to learn how to operate it for a course in
> "programing languge pricipals"...

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Why don't these two functions produce equivalent results?

2012-01-27 Thread Bill Robertson
Yes, I see that now. When I read "When applied to a transient map,
adds mapping of key(s) to val(s)" in the doc string, I understood that
to mean that it modified the existing map, and the (insufficient)
poking around that I did in the repl supported that. (actually did it
past 8 now - saw it fail in same way).

I guess under the hood its a essentially the same sort of persistent
data structure but with chunking (buffering) before it grows.

If I wanted to submit alternate wording for the doc string, how would
I do that? i.e. where is the process for contributing outlined?

e.g. "When applied to a transient map, adds mapping of key(s) to
val(s) in the resulting map."

Thanks
-Bill

On Jan 27, 4:13 pm, David Nolen  wrote:
> On Fri, Jan 27, 2012 at 3:08 PM, Bill Robertson
> wrote:
>
> > I have read (doc transient), (doc assoc!) and (doc persistent!), and I
> > don't see what I'm missing, which is why I came here for help.
>
> The documentation herehttp://clojure.org/transientssays:
>
> "Don't bash in place"
>
> Note that all the examples are done in a functional style - they actually
> use the value produced by each operation.
>
> David

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Why don't these two functions produce equivalent results?

2012-01-27 Thread Bill Robertson
I have read (doc transient), (doc assoc!) and (doc persistent!), and I
don't see what I'm missing, which is why I came here for help.

To my understanding, the first creates a transient collection, which
cannot be used in other threads, and cannot be used after converting
back to a persistent collection.

user=> (doc assoc!)
-
clojure.core/assoc!
([coll key val] [coll key val & kvs])
  Alpha - subject to change.
  When applied to a transient map, adds mapping of key(s) to
  val(s). When applied to a transient vector, sets the val at index.
  Note - index must be <= (count vector). Returns coll.

assoc!'s doc says that it adds mapping of keys to values when applied
to a map, which is what this code demonstrates.

user=> (def t (transient {}))
#'user/t
user=> (assoc! t 1 1)
#
user=> (assoc! t 2 2)
#
user=> (def p (persistent! t))
#'user/p
user=> p
{1 1, 2 2}

It says that it returns col. Does that imply that I'm supposed to hang
on to col?




On Jan 27, 3:50 pm, Kevin Downey  wrote:
> Please don't use transients unless you read and understand the
> documentation.
> On Jan 27, 2012 12:41 PM, "Bill Robertson" 
> wrote:
>
>
>
>
>
>
>
> > I don't understand why the two functions below (recurs and transi) do
> > not produce the same result. To the best of my understanding doseq
> > will consume an entire sequence as demonstrated here:
>
> > user=> (doseq [x (range 0 10)] (print x))
> > 0123456789nil
>
> > user=> *clojure-version*
> > {:major 1, :minor 3, :incremental 0, :qualifier nil}
>
> > user=> (defn recurs [dest src]
> >  (if-let [element (first src)]
> >    (recur (assoc dest element element) (rest src))
> >    dest))
> > #'user/recurs
> > user=> (count (recurs {} (range 0 2)))
> > 2
>
> > user=> (defn transi [dest src]
> >  (let [temp (transient dest)]
> >    (doseq [x src]
> >      (assoc! temp x x))
> >    (persistent! temp)))
> > #'user/transi
> > user=> (count (transi {} (range 0 2)))
> > 8
> > user=> (count (transi {} (range 0 20)))
> > 8
> > user=> (count (transi {} (range 0 8)))
> > 8
> > user=> (count (transi {} (range 0 7)))
> > 7
>
> > Any ideas about why the first function does not behave the same as the
> > second?
>
> > Thanks
>
> > --
> > 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
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Why don't these two functions produce equivalent results?

2012-01-27 Thread Bill Robertson
I have read (doc transient), (doc assoc!) and (doc persistent!), and I
don't see what I'm missing, which is why I came here for help.

To my understanding, the first creates a transient collection, which
cannot be used in other threads, and cannot be used after converting
back to a persistent collection.

user=> (doc assoc!)
-
clojure.core/assoc!
([coll key val] [coll key val & kvs])
  Alpha - subject to change.
  When applied to a transient map, adds mapping of key(s) to
  val(s). When applied to a transient vector, sets the val at index.
  Note - index must be <= (count vector). Returns coll.

assoc!'s doc says that it adds mapping of keys to values when applied
to a map, which is what this code demonstrates.

user=> (def t (transient {}))
#'user/t
user=> (assoc! t 1 1)
#
user=> (assoc! t 2 2)
#
user=> (def p (persistent! t))
#'user/p
user=> p
{1 1, 2 2}

It says that it returns col. Does that imply that I'm supposed to hang
on to col?




On Jan 27, 3:50 pm, Kevin Downey  wrote:
> Please don't use transients unless you read and understand the
> documentation.
> On Jan 27, 2012 12:41 PM, "Bill Robertson" 
> wrote:
>
>
>
>
>
>
>
> > I don't understand why the two functions below (recurs and transi) do
> > not produce the same result. To the best of my understanding doseq
> > will consume an entire sequence as demonstrated here:
>
> > user=> (doseq [x (range 0 10)] (print x))
> > 0123456789nil
>
> > user=> *clojure-version*
> > {:major 1, :minor 3, :incremental 0, :qualifier nil}
>
> > user=> (defn recurs [dest src]
> >  (if-let [element (first src)]
> >    (recur (assoc dest element element) (rest src))
> >    dest))
> > #'user/recurs
> > user=> (count (recurs {} (range 0 2)))
> > 2
>
> > user=> (defn transi [dest src]
> >  (let [temp (transient dest)]
> >    (doseq [x src]
> >      (assoc! temp x x))
> >    (persistent! temp)))
> > #'user/transi
> > user=> (count (transi {} (range 0 2)))
> > 8
> > user=> (count (transi {} (range 0 20)))
> > 8
> > user=> (count (transi {} (range 0 8)))
> > 8
> > user=> (count (transi {} (range 0 7)))
> > 7
>
> > Any ideas about why the first function does not behave the same as the
> > second?
>
> > Thanks
>
> > --
> > 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
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Why don't these two functions produce equivalent results?

2012-01-27 Thread Bill Robertson
I don't understand why the two functions below (recurs and transi) do
not produce the same result. To the best of my understanding doseq
will consume an entire sequence as demonstrated here:

user=> (doseq [x (range 0 10)] (print x))
0123456789nil

user=> *clojure-version*
{:major 1, :minor 3, :incremental 0, :qualifier nil}

user=> (defn recurs [dest src]
  (if-let [element (first src)]
(recur (assoc dest element element) (rest src))
dest))
#'user/recurs
user=> (count (recurs {} (range 0 2)))
2

user=> (defn transi [dest src]
  (let [temp (transient dest)]
(doseq [x src]
  (assoc! temp x x))
(persistent! temp)))
#'user/transi
user=> (count (transi {} (range 0 2)))
8
user=> (count (transi {} (range 0 20)))
8
user=> (count (transi {} (range 0 8)))
8
user=> (count (transi {} (range 0 7)))
7

Any ideas about why the first function does not behave the same as the
second?

Thanks

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: topoged-hibernate 1.0.0

2012-01-06 Thread Bill Robertson


On Jan 3, 4:26 pm, "Matthew O.  Smith"  wrote:
> There is a mismatch between hibernate maps and clojure maps which
> means that there is some translating between them. Hopefully, this
> will be smoothed over in the future

What is the mismatch?

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: defrecord based on runtime metadata?

2011-12-18 Thread Bill Robertson
Thanks for the feedback.

Yes, I meant expression not string. I've been fighting a nasty cold
this weekend, and I'm a bit out of 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 your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


defrecord based on runtime metadata?

2011-12-18 Thread Bill Robertson
I'm trying to define records based on meta data read in at runtime,
and I'm attempting to write a function that extracts name and attrs
and passes them to defrecord, but I don't understand how to
dynamically create the symbol for the record name.

e.g.

user=> (defrecord (symbol "foo" "bar") [a b])
java.lang.ClassCastException: clojure.lang.PersistentList cannot be
cast to clojure.lang.Symbol (NO_SOURCE_FILE:5)

Attempting to define fields in any way that I can guess at fail.

e.g.

user=> (def fields [(symbol "a")])
#'user/fields
user=> (defrecord foo fields)
IllegalArgumentException Don't know how to create ISeq from:
clojure.lang.Symbol  clojure.lang.RT.seqFrom (RT.java:487)
user=> (defrecord foo (var fields))
user.foo
user=> (user/map->foo {:a 67})   ;; funny
#user.foo{:var nil, :fields nil, :a 67}

Short of generating a string and calling eval on it, is this possible?

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Proposal: libraries should have type hints

2011-11-22 Thread Bill Robertson
I think there is another reasonable case for a type hint. If you've
written a function that is not generic, where one type and only one
type will do, then why not add a type hint as a form of documentation
if nothing else?

On Nov 21, 1:58 pm, Nicolas  wrote:
> Hi !
>
> An interresting point of clojure is that it is dynamically typed. This
> for a reason. There is a tradeoff in performance but the benefit is
> that the code is shorter, more expressive and reusable.
>
> Type hinting should be exceptionnal and used only in critical areas
> when you see a huge boost in performance. And if you need this boost.
>
> I think then that's the library author responsability and own right to
> figure by himself where ultimate performance is needed or instead
> where greater flexibility is to be prefered.
>
> Bye,
>
> Nicolas.
>
> On Nov 21, 5:12 pm, Tassilo Horn  wrote:
>
>
>
>
>
>
>
> > Herwig Hochleitner  writes:
>
> > Hi Herwig,
>
> > > In principle you're right. But you have to keep in mind, that type
> > > hints actually alter runtime behavior.
>
> > > A hinted call tries to cast its argument into the desired type,
> > > possibly resulting in a type cast exception.  An unhinted call, on the
> > > other hand, just looks for the signature.
>
> > > So in essence a hinted call can fail for cases where an unhinted call
> > > succeeds, effectively reducing composability at a type level
> > > (polymorphism).
>
> > Hm, indeed.  This function works for any java object that has a
> > zero-parameters doubleValue() method.
>
> >   (defn double-val [x] (.doubleValue x))
>
> > In contrast,
>
> >   (defn double-val [x] (.doubleValue ^Integer x))
>
> > will fail for (double-val 7), because by default any integer is a Long
> > in Clojure 1.3.  However, one could go with
>
> >   (defn double-val [x] (.doubleValue ^Number x))
>
> > instead, and that works fine for Integer, Long, Double, ...  But of
> > course, it's not applicable for
>
> >   class Foo { String doubleValue() {return "foo";} }
>
> > whereas the non-type-hinted version is.  Note that this doubleValue()
> > method doesn't even return a double.
>
> > But is that really an issue?  I mean, since you cannot use such duck
> > typing in Java itself (except in terms of reflection), any method
> > defined for more than one class with shared, consistent semantics is
> > declared in some common parent class or interface which you can use for
> > your type hint.
>
> > Bye,
> > Tassilo
> > --
> > (What the world needs (I think) is not
> >       (a Lisp (with fewer parentheses))
> >       but (an English (with more.)))
> > Brian Hayes,http://tinyurl.com/3y9l2kf

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How do I store/read data with function references in it?

2011-11-11 Thread Bill Robertson
So far its looking like I can't. I will just have to work around it
then. NBD.

Thanks

On Nov 11, 12:02 pm, Chris Perkins  wrote:
> It looks like your (:foo d) is a symbol.  ((:foo d) 4 5) is trying to look
> itself up as a key in the map you provided, which is 4. Since that's not a
> map, the lookup fails and it returns the default value you provided: 5.
>  It's very forgiving that way :)
>
> As for your main question, about how to serialize functions, someone else
> will have to answer - as far as I know, you just can't do that.
>
> - Chris

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


How do I store/read data with function references in it?

2011-11-11 Thread Bill Robertson
If I use pprint and read-string to serialize and deserialize data
w/o function references it works o.k.  This is clojure 1.3.

e.g. save something to disk, restart the vm, read it in ok.

  user=> (def foo {:a 1 :b 2 :c ["more" "stuff"]})
  user=> (def output (java.io.FileWriter. "foo.clj"))
  user=> (clojure.pprint/pprint foo output)
  user=> (.close output)

  $ cat foo.clj
  {:a 1, :b 2, :c ["more" "stuff"]}

  user=> (def foo (read-string (slurp "foo.clj"))) ;;; all good

However, if there's a function in that data structure, I cannot
read the forms back in.

  user=> (def foo (assoc foo :d clojure.core/+))
  user=> foo
  {:d #, :a 1, :b 2, :c
["more" "stuff"]}
  user=> ;; save to file as above...

  $ cat foo.clj
  {:d #,
   :a 1,
   :b 2,
   :c ["more" "stuff"]}

  user=> (def foo (read-string (slurp "foo.clj")))
  java.lang.RuntimeException: java.lang.Exception: Unreadable form
(NO_SOURCE_FILE:1)

As an experiment, I edited the file and changed the object
reference to the fully qualified name of the function, I could
read the structure in, and it appears to be a function (according
to clojure test), but it prints differently, and it does not
behave like + anymore, instead I simply get the last argument
back.

  $ cat foo.clj
  {:d clojure.core/+
   :a 1,
   :b 2,
   :c ["more" "stuff"]}

  user=> (def foo (read-string (slurp "foo.clj")))
  #'user/foo
  user=> (require 'clojure.test)
  nil
  user=> (clojure.test/function? (foo :d))
  true
  user=> +
  #
  user=> (foo :d)  ;;; notice that it prints differently
  clojure.core/+
  user=> ((foo :d) 4 5)  ;;; what don't I understand about this?
  5
  user=> (def fun (foo :d))
  #'user/fun
  user=> (fun 4 5)  ;;; didn't expect different...
  5
  user=> (+ 4 5)
  9

I'm not sure what I don't undertand about what I had going on in
the last example, but that isn't my primary question.

My primary question is, how do I serialize and deserialize data with
function references in it?

Thanks

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread Bill Robertson
I've never seen that. Good stuff there. Yes, I agree that the wiki
should refer to that page.

Thanks!

On Oct 30, 8:47 pm, Phil Hagelberg  wrote:
> On Sun, Oct 30, 2011 at 5:43 PM, Bill Robertson
>
>  wrote:
> > Which is exactly the problem with Clojure in Emacs. There are N sets
> > of instructions out there, and N-1 of them are out of date.  And even
> > the Nth one is incomplete. "Step 1: Install clojure-mode either from
> > Marmalade or from git."
>
> Do you find the clojure-mode readme sufficient?
>
> https://github.com/technomancy/clojure-mode/blob/master/README.md
>
> Maybe Clojure wiki should just point to that so it's all in one place.
>
> -Phil

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure in Emacs Seemingly Impossible

2011-10-30 Thread Bill Robertson
Which is exactly the problem with Clojure in Emacs. There are N sets
of instructions out there, and N-1 of them are out of date.  And even
the Nth one is incomplete. "Step 1: Install clojure-mode either from
Marmalade or from git."

What if you don't know how to do that? So you click through to the
'Marmelade' site. Step 1: "First install package.el" with a link to
package.el and no other info.

Initially I ran into issues trying to get it set up, and finally I
just decided to run 'lein repl' and just edit in emacs. This is a
little inconvenient though. I finally got it working yesterday, and
then after about five minutes of using it, it just sort of stopped
working. No clue why. Back to 'lein repl' in an attempt to get
something useful done for the afternoon.

Step 1: In case anybody reads this; I think I did this, although this
will no doubt become out of date. ;-)

Download package.el from the marmelate site. Do not download the other
one. Create an .emacs.d directory under your home dir, and save
package.el there.

Then add the following to your .emacs file in your home dir.

(add-to-list 'load-path "~/.emacs.d/")
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-
repo.org/packages/"))
(package-initialize)



On Oct 30, 5:34 pm, Phil Hagelberg  wrote:
> On Sat, Oct 29, 2011 at 10:54 PM, mdave  wrote:
> > On Sep 10, 9:48 pm, Kugathasan Abimaran  wrote:
> >> Follow these instructions, it will 
> >> work..http://riddell.us/ClojureWithEmacsSlimeSwankOnUbuntu.html
>
> > Sadly, the instructions break right where it says:
>
> Those instructions are badly out of date. Please try the official 
> documentation:
>
> https://github.com/technomancy/swank-clojure
>
> -Phil

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: modern clojure summary

2011-10-30 Thread Bill Robertson
On Oct 27, 9:10 pm, falcon  wrote:

> In Rich's most recent talk, "Simple Made Easy," he mentioned that clojure
> for javascript was built from the ground up using protocols and other
> modern clojure constructs.
>
> Is there a resource which describes clojure using modern concepts, rather
> than introducing feature as they were added in a chronological order?

Have you considered the Clojurescript source code? If it embodies
these concepts then it should be a good place to start.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Please try the alphas and betas!

2011-10-30 Thread Bill Robertson
I'm new, so forgive me if this is a bad question. Are the snapshots
announced here? Or is it a continuous process? I cloned the repo from
github, and it built as 1.4.0 snapshot, if a maven/ivy/lein user
wanted that they should target the same thing correct? Then the next
questions are, how would you like problems reported? If the process is
continuous, or if all jar files are 1.4.0 snapshot (i.e. version
slippage) how would somebody encountering a problem identify the
specific build in the report?

I would also suggest a more prominent place for the "contributing"
link on the front page of http://clojure.org. Its way down there on
the bottom of the right hand column. That page (http://clojure.org/
contributing) might also benefit from a plea such as the one you just
gave, and more information about how to contribute in different ways.
For example, how to help with documentation/website, how to submit a
bug report/patches, etc...

Thanks.

On Oct 30, 10:52 am, Rich Hickey  wrote:
> It was nice to get some feedback on the changes in 1.3. It was a bit 
> frustrating though to get them after release, and especially to get them on 
> code that has been available for over 16 months. This after regular Maven 
> releases of alphas starting over a year ago and betas since June. It's a fair 
> amount of effort to produce these - should we not bother?
>
> If you are going to use free software, please consider giving something back 
> by dedicating some resources for evaluation of new versions prior to their 
> release. This will help keep quality up, help ensure it meets your needs, and 
> give you less to do when it comes time to migrate in production.
>
> Thanks,
>
> Rich

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureScript Presentation - video

2011-08-02 Thread Bill Robertson
Didn't for me. I was pretty surprised.

On Aug 2, 10:05 am, Claudia Doppioslash
 wrote:
> > Trying to get the avi to play on the mac...
>
> vlc? Works for me :)

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureScript on Windows

2011-07-31 Thread Bill Robertson
You can also add the setlocal command to the .bat file. It will make
all variable set commands local to the process (and sub-procs iirc).
Better this way because you're not littering in the user's
environment.

-Bill

On Jul 30, 8:14 pm, Benny Tsai  wrote:
> Brenton, thank you for your efforts!
>
> I noticed that in the current .bat files, CLASSPATH is directly modified and
> over-written.  Perhaps they should instead use CLJSC_CP like the sh scripts?
>
>
>
>
>
>
>
> On Saturday, July 30, 2011 10:10:03 AM UTC-6, Brenton wrote:
>
> > The problems with paths on Windows have been fixed and ClojureScript
> > now has batch files for cljsc, repl, and repljs. There is also a page
> > in the wiki to help Windows users get started.
>
> >https://github.com/clojure/clojurescript/wiki/Windows-Setup
>
> > Support for Windows will come from the community so if you care about
> > this then please do pitch in and help.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureScript Presentation - video

2011-07-30 Thread Bill Robertson
blip.tv is still wrapped around a tree.  I've tried several times over
the last several days. I tried a few random other videos too, but no
luck.

Trying to get the avi to play on the mac...


-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Java 7 is out!

2011-07-28 Thread Bill Robertson
The new JVM really starts fast. Clojure users will like that. I also
noticed that (at least for 64-bit) that the Windows version only comes
with the hotspot compiler. No client jvm. I haven't checked 32-bit.
This is a big change, because previous 32-bit JRE's only came w/
client. I had never checked the 64-bit.

I also agree that clojure is more able to take advantage of JDK 7,
since you tend to compile at runtime, you could just detect which JVM
you're running and install the fancier invokedynamic compiler. I've
seen claims that that won't really benefit Clojure, but I think that
determination ought to be left to measurement rather than guesswork.
One potential issue would be AOT compiled code, you would probably
want it to default to the old way, and have the option to compile with
the new compiler, should such a thing ever come into existence.

Apache Derby manages to pack multiple JDBC versions into the same jar.
I think, at runtime, its basically o.k. as long as you get the
dependencies right and never touch the wrong version's classes, the
classloader will not load them.



On Jul 28, 8:18 pm, OGINO Masanori  wrote:
> AFAIK using InvokeDynamic *requires* Java7, so I think it will be done
> if Java7 gets default and it fits for Clojure.
>
> However, for example, new HotSpot gains more performance then Clojure
> may also gain if you use Java7...
> (but you can't force everyone to use Java7 of course.)
>
> Also, you can call new libraries even if they are not used Clojure itself.
> (You may tell users your code works with Java7)
>
> --
> Name:  OGINO Masanori (荻野 雅紀)
> E-mail: masanori.og...@gmail.com

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: better community docs: getting started

2011-07-28 Thread Bill Robertson
Hello Stu,

I think the "clear no options getting started path" should include a
tutorial and focus on the repl and using a *generic* text editor. A
downloadable archive file (zip and tar) that included things like
jline, clojure jars, and some scripts (.sh *and* .bat) to just start
it would allow somebody to party right away.

This package should include a basic tutorial on how to use the repl,
including

* The basics of the repl -> simple expressions, functions, simple Java
interaction
* a repl cheat sheet
* Any nifty (extra) features bundled with it, e.g: how to javadoc
* Explain why a repl is beneficial
* Some higher level strategies for benefiting from the repl

Then include zero or more tutorials on clojure itself with the
package. Zero might be best, and just put the basic tutorials online.

This package should be stable. Don't change it willy-nilly. Don't fix
it unless its broken. Don't upgrade for the sake of upgrading. If
people want to move on to Emacs and swank or slime or whatever, or an
ide or start using a build tool, then they will seek those out, but
right now that's all a lot of noise that gets in the way of starting
with the language because there's so much flux in the state of
tooling, which is not a bad thing for the experienced, but it leads to
tail chasing on the part of noob.

If its stable, then other people can write other tutorials/guides that
build off of it w/o worrying about them becoming obsolete.

I think I could put together a zip that had a basic environment, but I
know I don't know enough to know what else belongs in it.

Thanks,
Bill

On Jul 22, 5:22 pm, Stuart Halloway  wrote:
> I am working through a few of the pages on clojure.org with two goals:
>
> (1) remove or fix anything that is outdated or incorrect
>
> (2) move to the community site (dev.clojure.org) things that should be 
> maintained by the community.
>
> As a first pass, I have trimmedhttp://clojure.org/getting_started, and quite 
> clearly linked out tohttp://dev.clojure.org/display/doc/Getting+Startedfor 
> advice on tools, IDEs, etc.
>
> The community getting started page could be much better. In particular, 
> people have opined that there should be a clear, no-choices-to-make path "For 
> Newbies" section.Help welcome!
>
> Stu
>
> Stuart Halloway
> Clojure/corehttp://clojure.com

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Ok, so code is data...

2011-05-10 Thread Bill Robertson
Thanks for the feedback and pointers.



On May 10, 11:37 am, Timothy Baldridge  wrote:
> On Tue, May 10, 2011 at 10:26 AM, Jonathan Fischer Friberg <
>
> odysso...@gmail.com> wrote:
> > "How do I actually just load code w/o evaluating it?"
> > mostly when you want something like this, you want a macro. Manipulating
> > code is also done within macros.
>
> Yeah, I would consider the whole code-is-data thing to refer more to using
> macros than eval. For something fun to read up on this check out this
> tutorial:
>
> http://www.learningclojure.com/2010/09/clojure-faster-than-machine-co...
>
> Here the author goes and takes a tree data structure, and on-the-fly
> generates function that represents that structure. The result is some
> insanely fast code.
>
> Timothy

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Ok, so code is data...

2011-05-10 Thread Bill Robertson
Thank you very much.

On May 10, 1:32 am, Justin Kramer  wrote:
> 'read' and 'read-string' are what you're looking for. They each read a
> single Clojure object from an input source (PushbackReader for read,
> String for read-string).
>
> Alternatively, something like this can read all top-level forms from a
> file:
>
> (defn read-all
>   "Reads all top-level forms from f, which will be coerced by
>   clojure.java.io/reader into a suitable input source. Not lazy."
>   [f]
>   (with-open [pbr (java.io.PushbackReader. (clojure.java.io/reader
> f))]
>     (doall
>      (take-while
>       #(not= ::eof %)
>       (repeatedly #(read pbr false ::eof))
>
> (read-all "/some/clojure/file.clj")
> => ((foo :bar) (baz))
>
> Justin
>
> On May 9, 11:36 pm, Bill Robertson  wrote:
>
>
>
>
>
>
>
> > How do I actually manipulate it?  I have some complicated logic that I
> > would like to transform into html (or maybe xml) for display
> > purposes.
>
> > I'm generating the Clojure code by parsing some nasty Java and
> > outputting s-expressions.  The Java is basic, but quite deeply
> > nested.  I want to generate working Clojure to demonstrate what that
> > can do for us, and get this nastiness documented of course.
>
> > Other than going into the source files and transforming it by hand
> > into a series of defs and quoted lists e.g.  (def my_func '(+ 1 2))
> > How do I actually just load code w/o evaluating it?
>
> > I've found the pretty printer macros, seems like that might be useful
> > if I wanted to statically transform the code.  I found the walker,
> > that looks like it might be useful in actually generating the output
> > (e.g. visit things, spit out (x|ht)ml.
>
> > I looked at the various load functions in clojure.core.  With the
> > exception of load (http://clojure.github.com/clojure/clojure.core-
> > api.html#clojure.core/load) they all seem to load and evaluate.  Is
> > load the answer or is it something I haven't found yet?
>
> > Once I get the code loaded, I don't think I need anything out of the
> > ordinary like macros or multi-methods.  I think I can just manipulate
> > the lists.  Does that sound correct?
>
> > I'm sorry if this are a stupid questions, but I've never done anything
> > in Clojure of any significance, and any helpful answers you provide
> > would could save me days of stumbling about.
>
> > Thanks!

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Ok, so code is data...

2011-05-09 Thread Bill Robertson
How do I actually manipulate it?  I have some complicated logic that I
would like to transform into html (or maybe xml) for display
purposes.

I'm generating the Clojure code by parsing some nasty Java and
outputting s-expressions.  The Java is basic, but quite deeply
nested.  I want to generate working Clojure to demonstrate what that
can do for us, and get this nastiness documented of course.

Other than going into the source files and transforming it by hand
into a series of defs and quoted lists e.g.  (def my_func '(+ 1 2))
How do I actually just load code w/o evaluating it?

I've found the pretty printer macros, seems like that might be useful
if I wanted to statically transform the code.  I found the walker,
that looks like it might be useful in actually generating the output
(e.g. visit things, spit out (x|ht)ml.

I looked at the various load functions in clojure.core.  With the
exception of load (http://clojure.github.com/clojure/clojure.core-
api.html#clojure.core/load) they all seem to load and evaluate.  Is
load the answer or is it something I haven't found yet?

Once I get the code loaded, I don't think I need anything out of the
ordinary like macros or multi-methods.  I think I can just manipulate
the lists.  Does that sound correct?

I'm sorry if this are a stupid questions, but I've never done anything
in Clojure of any significance, and any helpful answers you provide
would could save me days of stumbling about.

Thanks!


-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: The Joy of Closure

2011-02-07 Thread Bill Robertson
> "Programming Clojure" is also a good book, but it is now
> somewhat dated as to what is happening in the language.

In what ways?

I am reading the book now, and I would like to know if there are any
sections that might be superseded by newer language features.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: osx + clojure + emacs + leiningen blog posts

2011-01-03 Thread Bill Robertson
Yes.  Very helpful.

Thanks Gaz.  Also, thanks to Phil for all of his hard work.

-Bill

On Jan 3, 10:50 am, Neo  wrote:
> Very useful info, really thanks for that. Will try later and give
> feedback.
>
>
>
>
>
>
>
> gaz jones wrote:
> > oh hi,
>
> > i put together a couple of blog posts around how i use clojure + emacs
> > + leiningen on OSX (but applies to linux too) in the hope it may help
> > someone get up and running faster:
>
> >http://blog.gaz-jones.com/post/2486737162/setting-up-clojure-developm...
> >http://blog.gaz-jones.com/post/2501842155/interactive-clojure-develop...
>
> > suggestions for improvements / things im doing crazy are welcome!
>
> > cheers
> > gaz

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Loading JNI

2011-01-03 Thread Bill Robertson
I would suggest working through simple a example in just java, just so
you can figure out how to get your dlls loaded and then calling them.
Once you work out the configuration/setup kinks I would add clojure on
top of that.

I would also suggest you use jna instead of straight up jni.  If it
fits your use-case it ought to take a lot of the hassle out.

Good luck.

On Jan 3, 5:54 pm, ax2groin  wrote:
> Of course not. I mentioned I'm new at this, right?
>
> It seems I was doing that part right before. I'm getting
> InvocationTargetException and NoClassDefFoundError, so I tried to work
> my way from the start to see if I was missing something (which I
> thought was a valid assumption, if exceptions were being swallowed).
> My first instinct was that it wasn't loading the libraries correctly.
>
> Or course, I'm still stuck. It clearly sees the classes, because my
> import statements aren't throwing ClassNotFoundExceptions. The
> exceptions I'm getting are bubbling up out of the JNI, apparently, but
> I don't have any idea why. At this point I have ugly looking Clojure
> code that looks as Java-like as possible, so that I'm doing the exact
> same thing in the exact same order as I do in a Java example, but I
> get exceptions when I do it in Clojure.
>
> So, when I get to
>     (def my-client (Client.))
> it throws. BTW, Java equivalent ... Client myClient = new Client();
>
> It feels like something is fundamentally different in a way I cannot
> conceive, like Java automatically handles something behind the scenes
> and I don't realize it.
>
> Thanks.

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: osx + clojure + emacs + leiningen blog posts

2011-01-03 Thread Bill Robertson
Hi,

"One thing worth noting about emacs-starter-kit is that it tries to
source a file of your own customizations on startup. This file
defaults to your username.el so the easiest thing to do is create that
file inside of ~/.emacs.d. One thing you really should add to this is
a function to fix the path issues inside of Emacs:"

Is fixing the path related to the information about ~/.emacs.d/
username.el?  If not then I would suggest a new paragraph.  If it is,
then will you please explain how?

Thanks,
Bill Robertson

On Dec 28 2010, 11:31 pm, gaz jones  wrote:
> thanks for the feedback, i will update it tomorrow.
>
> cheers,
> gaz
>
>
>
>
>
>
>
> On Tue, Dec 28, 2010 at 8:44 PM, Phil Hagelberg  wrote:
> > On Dec 28, 2:32 pm, gaz jones  wrote:
> >> i put together a couple of blog posts around how i use clojure + emacs
> >> + leiningen on OSX (but applies to linux too) in the hope it may help
> >> someone get up and running faster:
>
> > Looks good. I should mention that installing the elisp for swank-
> > clojure is actually no longer necessary. Also it's a little more
> > convenient to use C-c C-k instead of C-c C-l to compile the current
> > file.
>
> > It might be nice to link to the Leiningen tutorial for further
> > reference since it goes into more detail:
> >https://github.com/technomancy/leiningen/blob/master/TUTORIAL.md
>
> > very nice,
> > Phil
>
> > --
> > 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
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
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
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en