Exception trying to use a macro within proxy

2009-06-18 Thread Jeff Dik

Hi,

I'm trying to look at events thrown by COM automation objects using
com4j and clojure and am trying to use macros to clean up my code.
Here is a small script that works without macros:

(use 'clojure.contrib.str-utils)
(def ie (SHDocVw.ClassFactory/createInternetExplorer))
(.visible ie true)

(def ie-logger
 (proxy [SHDocVw.events.DWebBrowserEvents] []
   (beforeNavigate
[& args]
(println (str 'beforeNavigate
  "("
  (str-join ", " (map #(pr-str %) args))
  ")")
 
(def cookie (.advise ie SHDocVw.events.DWebBrowserEvents ie-logger))
(read-line)
(.close cookie)

I tried to create a macro to automatically create the beforeNavigate method.

(defmacro create-print-method-call
  "For use in `proxy`, create a method that prints it's arguments when it 
is invoked"
  [name]
  `(~name [& args#]
(println (str '~name
  "("
  (str-join ", " (map (fn [arg#] (pr-str arg#)) args#))
  ")"

I wanted to use this macro like

(def ie-logger
 (proxy [SHDocVw.events.DWebBrowserEvents] []
   (create-print-method-call beforeNavigate)))

Unfortunately, I get an exception

java.lang.RuntimeException: java.lang.UnsupportedOperationException: nth 
not supported on this type: Symbol (NO_SOURCE_FILE:2)

(Full exception stace trace at the end of the email.)

If I (macroexpand-1 '(create-print-method-call beforeNavigate)), I get

(beforeNavigate [& args__2585__auto__] (clojure.core/println 
(clojure.core/str (quote beforeNavigate) "(" 
(clojure.contrib.str-utils/str-join ", " (clojure.core/map (clojure.core/fn 
[arg__2586__auto__] (clojure.core/pr-str arg__2586__auto__)) 
args__2585__auto__)) ")")))

which I can cut and paste to be the beforeNavigate method in the proxy macro.

I'm guessing the problem is that the create-print-method-call macro is
not getting expanded before the proxy macro.  I really have no idea
though.  I would really appreciate any pointers on how to get this to work.

Thanks,
Jeff

Full stack trace

java.lang.RuntimeException: java.lang.UnsupportedOperationException: nth not 
supported on this type: Symbol (NO_SOURCE_FILE:2)
  [Thrown class clojure.lang.Compiler$CompilerException]

Restarts:
 0: [ABORT] Return to SLIME's top level.
 1: [CAUSE] Throw cause of this exception

Backtrace:
  0: clojure.lang.Compiler.analyzeSeq(Compiler.java:4558)
  1: clojure.lang.Compiler.analyze(Compiler.java:4373)
  2: clojure.lang.Compiler.analyze(Compiler.java:4334)
  3: clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:4125)
  4: clojure.lang.Compiler.analyzeSeq(Compiler.java:4551)
  5: clojure.lang.Compiler.analyze(Compiler.java:4373)
  6: clojure.lang.Compiler.analyzeSeq(Compiler.java:4539)
  7: clojure.lang.Compiler.analyze(Compiler.java:4373)
  8: clojure.lang.Compiler.analyzeSeq(Compiler.java:4539)
  9: clojure.lang.Compiler.analyze(Compiler.java:4373)
 10: clojure.lang.Compiler.access$100(Compiler.java:35)
 11: clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:372)
 12: clojure.lang.Compiler.analyzeSeq(Compiler.java:4551)
 13: clojure.lang.Compiler.analyze(Compiler.java:4373)
 14: clojure.lang.Compiler.analyze(Compiler.java:4334)
 15: clojure.lang.Compiler.eval(Compiler.java:4595)
 16: clojure.core$eval__4604.invoke(core.clj:1728)
 17: swank.commands.basic$eval_region__957.invoke(basic.clj:36)
 18: swank.commands.basic$eval__966$interactive_eval__968.invoke(basic.clj:45)
 19: clojure.lang.Var.invoke(Var.java:346)
 20: user$eval__3200.invoke(NO_SOURCE_FILE)
 21: clojure.lang.Compiler.eval(Compiler.java:4592)
 22: clojure.core$eval__4604.invoke(core.clj:1728)
 23: swank.core$eval_in_emacs_package__456.invoke(core.clj:55)
 24: swank.core$eval_for_emacs__533.invoke(core.clj:123)
 25: clojure.lang.Var.invoke(Var.java:354)
 26: clojure.lang.AFn.applyToHelper(AFn.java:179)
 27: clojure.lang.Var.applyTo(Var.java:463)
 28: clojure.core$apply__3857.doInvoke(core.clj:390)
 29: clojure.lang.RestFn.invoke(RestFn.java:428)
 30: swank.core$eval_from_control__459.invoke(core.clj:62)
 31: swank.core$spawn_worker_thread__556$fn__587$fn__589.invoke(core.clj:162)
 32: clojure.lang.AFn.applyToHelper(AFn.java:171)
 33: clojure.lang.AFn.applyTo(AFn.java:164)
 34: clojure.core$apply__3857.doInvoke(core.clj:390)
 35: clojure.lang.RestFn.invoke(RestFn.java:428)
 36: swank.core$spawn_worker_thread__556$fn__587.doInvoke(core.clj:158)
 37: clojure.lang.RestFn.invoke(RestFn.java:402)
 38: clojure.lang.AFn.run(AFn.java:37)
 39: java.lang.Thread.run(Unknown Source)

java.lang.UnsupportedOperationException: nth not supported on this type: Symbol
  [Thrown class java.lang.RuntimeException]

Restarts:
 0: [ABORT] Return to SLIME's top level.
 1: [CAUSE] Throw cause of this exception

Backtrace:
  0: clojure.lang.LazySeq.seq(LazySeq.java:46)
  1: clojure.lang.Cons.next(Co

Re: Exception trying to use a macro within proxy

2009-06-18 Thread Jeff Dik

On Thu, Jun 18, 2009 at 11:33:54AM -0700, hoeck wrote:
> 
> Hi,
> 
> proxy is a macro, where you supply the method definitions according to
> its docstring in the following format:
> 
> user> (doc proxy)
>   ...
>   f => (name [params*] body) or
>   (name ([params*] body) ([params+] body) ...)
>   ...
> 
> so it expects: a list of name vector body*
> 
> > Unfortunately, I get an exception
> >
> > java.lang.RuntimeException: java.lang.UnsupportedOperationException: 
> > nth not supported on this type: Symbol (NO_SOURCE_FILE:2)
> 
> you wrote:
> >  (proxy [SHDocVw.events.DWebBrowserEvents] []
> >(create-print-method-call beforeNavigate)))
> so instead of a vector, proxy finds a symbol: beforenavigate
> and can't call nth on that (that's what the exception said)
> 
> So you could include the whole proxy call in your macro, like:
> 
> (defmacro proxy-create-print-method-call
>   [name & body]
>   `(proxy [SHDocVw.events.DWebBrowserEvents] []
>  (~name [& args#]
> (println (str '~name
>  "("
>  (str-join ", " (map (fn [arg#] (pr-str arg#))
> args#))
>  ")")))
>  ~...@body))
> 
> to remove the boilerplate from your proxy code.
> 

Excellent!  Thanks so much!

I got the your first example working and will have to try to digest
the rest tonight.  It looks like exactly what I need.

Thanks again!
Jeff

> Or maybe you would like use sth. like this
> (at least, I found this to be useful from time to time):
> 
> (defmacro fproxy
>   "like proxy but take a hashmap: {method-name method-fn, ...}
>   ex.: (.count (fproxy [clojure.lang.IPersistentVector] [] {'count (fn
> [this] 99)})) -> 99."
>   [class-and-interfaces constructor-args method-name-fn-map]
>   `(let [pc# (proxy ~class-and-interfaces ~constructor-args)]
>  (update-proxy pc# ~method-name-fn-map)
>  pc#))
> 
> (def default-before-navigate-method
>  {"beforeNavigate" (fn [this & args]
> (println (str 'beforeNavigate
>   "("
>   (str-join ", " (map #(pr-str
> %) args))
>   ")")))})
> 
> (fproxy [SHDocVw.events.DWebBrowserEvents] []
> (merge default-before-navigate-method
>{"anotherMethod" (fn [this ..] ...)}))
> 
> to make proxy generation more dynamic & functional.
> 
> Erik
> 
> > 

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Question about "The whole language is there, all of the time."

2009-12-09 Thread Jeff Dik
Hi,

I've been rereading "Programming Clojure" and on page 25 it says

The whole language is there, all the time.  Paul Graham's essay
"Revenge of the Nerds" explains why this is so powerful.

So, I read Paul Graham's essay, and the relevant section seems to be

The whole language there all the time. There is no real
distinction between read-time, compile-time, and runtime. You can
compile or run code while reading, read or run code while
compiling, and read or compile code at runtime.

Running code at read-time lets users reprogram Lisp's syntax;
running code at compile-time is the basis of macros; compiling at
runtime is the basis of Lisp's use as an extension language in
programs like Emacs; and reading at runtime enables programs to
communicate using s-expressions, an idea recently reinvented as
XML.

The part "Running code at read-time lets users reprogram Lisp's
syntax" caught my attention.  Is this talking about reader macros?  I
believe I read that clojure doesn't have reader macros, so would it be
more accurate to say "The whole language is there, _most_ of the
time"?

Just curious,
Jeff

-- 
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: Question about "The whole language is there, all of the time."

2009-12-18 Thread Jeff Dik
On Wed, Dec 09, 2009 at 02:35:24PM -0800, Joost wrote:
> On 9 dec, 17:03, Jeff Dik  wrote:
> > The part "Running code at read-time lets users reprogram Lisp's
> > syntax" caught my attention.  Is this talking about reader macros?  I
> > believe I read that clojure doesn't have reader macros, so would it be
> > more accurate to say "The whole language is there, _most_ of the
> > time"?
> 
> Clojure doesn't have user-implementable reader macros, but neither
> does emacs lisp. Reader macros are nice when you need to embed a
> significantly different looking kind of language - that's why clojure
> implements regular expressions as a reader macro instead of a function
> on a string; you'd have to doubly escape every backslash otherwise.
> But they're mostly "only" a way to provide syntactic sugar.
> 
> I think what Paul is +mainly+ talking about in terms of "syntax" is
> just plain ordinary macros that can implement short-circuiting and
> different evalution strategies for readable data, so that you can
> implement things like (unless ...) yourself, with no (significant)
> overhead compared to the built in (if), but you'll have to keep to the
> basic reader constructs (but not evalution rules). This has the
> advantage of keeping the language simpler to parse and readble for
> humans too.
> 
> The other part of the "always there" is that you can use whatever is
> already compiled/parsed to construct new macros, so you can build
> macros on top of each other, and on top of a mix of macros and (user-
> defined) functions instead of being restricted to the "traditional"
> sparseness of C preprocessor macros.

Thanks to everyone who replied to my question!  I had not realized that
clojure had built-in reader macros (which I should have realized from
section 2.2 "Reader Macros" of "Programming Clojure").  The day I
wrote the original email was the first day I think I actually realized
what reader macros do, which, in retrospect, should have been obvious
from their name.  Just another example of Lisp blowing my mind.

I wasn't advocating user-creatable reader macros or bemoaning the lack
of them in Clojure.  I trust Rich Hickey's judgment :-) He's
much smarter than me and is an excellent language designer[1] (IMHO).

Still, I may have to play with user-creatable reader macros in Scheme
or Common Lisp.  I can see how they could make code harder to read if
a lot of people used them, but wonder if people standardized on some
of them, if they might make it more easier to write code for certain
fields (e.g. matrix math).  I think Graham Fawcett's idea of having an
experimental branch of Clojure that allowed user-creatable reader
macros is a good idea and wish I was smart enough to do it :-)

Thanks,
Jeff

[1]: Side note.  I think one of the best illustration's of Rich's
genius[2] is that he was able to combine Lisp, Java, functional
programming, and concurrency into such a beautiful language, as
opposed to Bjarne Stroustrup (also extremely smart) taking C and
adding OOP, etc, and making a lot of very reasonable decisions, and
still coming up with a monstrosity.

[2]: Side note on the side note.  Another example of Rich's genius are
the changes to Clojure for version 1.1.

> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> 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: Radically simplified Emacs and SLIME setup

2011-06-09 Thread Jeff Dik
On Wed, Jun 8, 2011 at 8:36 PM, Mark Engelberg  wrote:
> It's been a couple of weeks, so I thought I'd check in and see whether
> anyone has yet been successful at using the new clojure-jack-in
> process on Windows.  Did the 1.9.2 release successfully resolve the
> "cannot find the path specified" error for anyone else?

With clojure-mode 1.9.2 and (GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
of 2009-07-30 on SOFT-MJASON) (according to emacs-version), I had to
change a s-exp on line 848 in clojure-mode.el from

(expand-file-name clojure-root)

to

(replace-regexp-in-string "/" "" (expand-file-name clojure-root) t)

and that resolved the "cannot find the path specified" error for me.

Many thanks to Phil & all for their work on this!

Hope that helps,
Jeff

>
> Thanks,
>
> Mark
>
> On Mon, May 30, 2011 at 3:10 PM, Mark Engelberg
>  wrote:
>> The package installer saw the 1.9.2 release, which I installed.  I'm
>> still getting the "cannot find the path specified" error though.
>>
>> Thanks for all the help you all have provided so far; let me know if
>> you have any other ideas for me to try.
>>
>> Thanks,
>>
>> Mark
>>
>
> --
> 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: Clojure 1.5.0 RC 1

2012-12-23 Thread Jeff Dik
On Sun, Dec 23, 2012 at 7:21 PM, Toby Crawley  wrote:
>
> Sean Corfield writes:
>
>> On Sun, Dec 23, 2012 at 8:50 AM, Peter Taoussanis 
>> wrote:
>>> Also `lein swank` appears to be failing on Leiningen 2.0.0-preview10:
>>> Exception in thread "main" java.lang.IllegalArgumentException: No matching
>>> ctor found for class clojure.lang.Compiler$CompilerException,
>>> compiling:(swank/commands/basic.clj:182:24)
>>>
>>
>> Given that swank-clojure is deprecated, this may be the not so subtle push
>> that moves everyone over to nREPL :) IIRC, the problem is that swank
>> constructs that Java class explicitly and its signature has changed to
>> include column number?
>
> This has actually been fixed in swank-clojure 1.4.3, but the latest
> lein-swank (1.4.4) still pulls in swank-clojure 1.4.2. Maybe it's time
> to release a newer lein-swank - I'll chat with Phil about that.

Cool.

This is also working for me with clojure 1.5.0-RC1:
https://clojars.org/org.clojars.chouser/lein-swank

Jeff

-- 
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 1.5.0 RC 1

2012-12-23 Thread Jeff Dik
On Sun, Dec 23, 2012 at 10:21 PM, Toby Crawley  wrote:
>
> Jeff Dik writes:
>>
>> This is also working for me with clojure 1.5.0-RC1:
>> https://clojars.org/org.clojars.chouser/lein-swank
>
> The change to lein-swank to load the proper swank-clojure is already on
> master[1] - is chouser's version just a release with that change?

No, it was pushed one day before your 1.4.3 changes :-)  I think it
was just a stopgap for lein-swank not working with clojure
1.5.0-beta1.

Looking forward for a new lein-swank release,
Jeff

-- 
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: Radically simplified Emacs and SLIME setup

2011-06-17 Thread Jeff Dik
Phil,

This works for me!  Thanks!

Jeff

On Sun, Jun 12, 2011 at 7:51 PM, Phil Hagelberg  wrote:
> On Jun 12, 10:58 am, Mark Engelberg  wrote:
>> I take that back (I had edited the wrong file, which wasn't the one my
>> emacs was using).
>>
>> I get the error "Not enough arguments for format string".
>
> Oops; I forgot to mention it also needs this:
>
> (defvar clojure-swank-command "lein jack-in %s &")
>
> to replace the old clojure-swank-command defvar.
>
> -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


Re: Radically simplified Emacs and SLIME setup

2011-06-17 Thread Jeff Dik
Mark,

I got this same error when I copied and pasted the clojure-jack-in
function from gmail.  I had to remove newlines from

(search-backward "slime-load-hook")

and

(slime-connect "localhost" clojure-swank-port)

Hope that helps,
Jeff

On Sun, Jun 12, 2011 at 8:50 PM, Mark Engelberg
 wrote:
> error in process filter: Search failed: "slime-load-hook"
>
> On Sun, Jun 12, 2011 at 4:51 PM, Phil Hagelberg  wrote:
>> On Jun 12, 10:58 am, Mark Engelberg  wrote:
>>> I take that back (I had edited the wrong file, which wasn't the one my
>>> emacs was using).
>>>
>>> I get the error "Not enough arguments for format string".
>>
>> Oops; I forgot to mention it also needs this:
>>
>> (defvar clojure-swank-command "lein jack-in %s &")
>>
>> to replace the old clojure-swank-command defvar.
>>
>> -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

-- 
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 Last Programming Language

2011-07-21 Thread Jeff Dik
On Tue, Jul 19, 2011 at 9:04 PM, daly  wrote:
> On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote:
>> On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt  wrote:
>>         What's this awk-a-mel he speaks of?  Ocaml, pronounced
>>         oh-camel, I
>>         know very well, but I've never heard of this awk-a-mel.  :-)
>>
>>         Seriously, his pronunciation of "ocaml" highlights, I think,
>>         the core
>>         problem of his talk.  There has been significant development
>>         in
>>         languages, just not in the popular languages.  It's been over
>>         there in
>>         the "fringe" languages.
>>
>>
>> I will confess that as I listened to the presentation (when I got the
>> email with Tim's link, I just started the video while I was working on
>> some drudgery), I felt like he missed some of the language features
>> promoted in functional languages.
>>
>>
>> He worded functional programming contributions in terms of advancing
>> the idea of limiting/protecting variable assignment (immutability),
>> and to me, that's missing the points of first class functions (which,
>> in light of what he says OOP languages brought to the table, actually
>> provided protected function pointers through purely functional
>> languages without any need for OOP) and an emphasis on function purity
>> and limiting the scope of unpure functions (to me, this goes beyond
>> merely protecting assignment.)
>>
>>
>> These omissions, coupled with the mispronunciations of functional
>> programming language names, and the value placed on the last language
>> being homoiconic (without much justification) had me wondering how
>> much he actually has used languages such as OCaml or Haskell.
>
> Homoiconic representation is fundamentally important and lacking
> in other languages. The programs == data idea is what makes the
> macro facility work, allows dynamic program construction, compile
> to core, etc. There is a story going around that McCarthy attended
> a python talk where they made the claim that python IS a lisp-like
> language. John pointed out that if it lacks homoiconicity it cannot
> be a lisp. (I probably have the details wrong).

Perhaps the last 6 or 7 paragraphs to
http://smuglispweeny.blogspot.com/2008/02/ooh-ooh-my-turn-why-lisp.html?

Jeff

>
> OCaml came from ML but the ideas came before either one. Lisp supported
> functional programming long before either language. I believe the point
> Robert was trying to make was that very few languages have increased our
> stock of fundamental ideas. OCaml is not one of them.
>
> Indeed languages (like Spad) built on lisp STILL support ideas I have
> not seen anywhere else (e.g. dispatching on the return type as well as
> the argument types).
>
> Robert suggests that we need to develop a standard language.
> Good luck with that.
>
> I participated in the reviews of the X3J13 Common Lisp standard
> (behind the scenes by passing on my comments and markups to people who
> had the proposal directly). Trying to define a "standard programming
> language" would be the ultimate language war. It has been tried several
> times before (PL/I included everything and C++0x is trying hard to
> include everything).
>
> At best I believe we will muddle along and I will continue to be
> rejected during job interviews for working in python 2.7 and not
> "knowing" python 3.0. Forty years of lisp programming just makes
> me too old to hire for any "real" programming job. Heck, I probably
> don't know the difference between OCaml and awk-a-mel so I clearly
> cannot program. :-)
>
>
>>
>>
>> I don't need to know how many digits somebody can recite Pi to, but I
>> would like to know how his experience with awk-a-mel lead him to
>> believe that functional programming comes down to protecting variable
>> assignment :)
>>
>>
>> That all said, if Clojure is the seed for the last language, I'd be a
>> happy man.
>
> I believe that Robert missed the fundamental point though. It is
> NOT just the space of ideas that makes lisp "the right language".
> Another key reason is "impedance matching". (An impedance mismatch
> is when you hook a soda straw to a firehose).
>
> Programs exist to bridge the gap between the idea domain and the
> machine domain. Some languages are close to the machine, like assembler,
> so you have to "carry your idea" all the way to the machine. Some
> languages are close to the problem (e.g. Mathematica) but the compiler
> has to cross the gap to the machine. This is where the ability to
> create domain-specific languages in the same syntax matters.
>
> Lisp is the only language I know that allows you to work across the
> whole spectrum in a single language. It is possible to say
>   (integrate (car x))
> which takes the 0 displacement off the x pointer (machine) and then
> does a mathematical integration routine (problem) and does it all with
> the same syntax and semantics.
>
> I wouldn't worry that we will stop creating new languages.
> We have yet to ex

Re: clojure clr files ?????

2012-01-13 Thread Jeff Dik
On Fri, Jan 13, 2012 at 2:21 PM, jayvandal  wrote:
> I have installed clr in a folder called "clr" and have net installed.
> I can click on main exe and get the clr to give me a repl . When I get
> ready to create the ui. file in the example where am  i storing files
> In leiningen i create a folder for the project  all the files are
> stored in the project folder.
> In creating a "UI with Windows Forms", do i have other files 

I don't really understand the question, but perhaps this helps?
http://www.myclojureadventure.com/2012/01/intro-to-clojure-clr-creating-ui-with.html

-- 
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 clr files ?????

2012-01-14 Thread Jeff Dik
On Fri, Jan 13, 2012 at 6:41 PM,   wrote:
> When I run leiningen , I can execute lein within any folder. For instance I
> have a folder c:\projects, i run lein new abc. I then have a folder "abc"
> that is created ,and all the projects files are stored within folder "abc".

As far as I can know, Leiningen won't really be of use for ClojureCLR
projects.  It's a tool for Clojure on the JVM.

> I installed clojure clr in a folder "clr". I can run clojure.main.exe
> located in c:\clr\
> Do have to create ui.clj in the same folder as is clr
> ?

No, you can put ui.clj anywhere.

> I thought i would have a place that is designated for clojureclr
> Do I set clr in my path: so I can execute from within any folder?

No, you can call Clojure.Main.exe with an absolute path if you want.
However, adding the directory to your PATH environment variable is
often more convenient, so that you only have to type Clojure.Main.exe
instead of the full path to Clojure.Main.exe.

Hope this helps,
Jeff

> - Original Message - From: "Jeff Dik" 
> To: 
> Sent: Friday, January 13, 2012 2:43 PM
> Subject: Re: clojure clr files ?
>
>
>
> On Fri, Jan 13, 2012 at 2:21 PM, jayvandal  wrote:
>>
>> I have installed clr in a folder called "clr" and have net installed.
>> I can click on main exe and get the clr to give me a repl . When I get
>> ready to create the ui. file in the example where am i storing files
>> In leiningen i create a folder for the project all the files are
>> stored in the project folder.
>> In creating a "UI with Windows Forms", do i have other files 
>
>
> I don't really understand the question, but perhaps this helps?
> http://www.myclojureadventure.com/2012/01/intro-to-clojure-clr-creating-ui-with.html
>
> --
> 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

-- 
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