Morning all,
I've been busy with other things for a couple of weeks, so I haven't been
tracking the development of AOT. This weekend though I have had the
opportunity to try it, but I am having a nightmare to get it to work at all.
I've hunted through this group, read the sparkly new documenta
As most people will tell you, the prefix notation is more natural in
Lisp-like languages. However, I sometimes wonder if adding a Haskell
infix operator (grave accent changes the argument order) could be a
good idea in some situations; for example (2 `+ 3) -> (+ 2 3).
On Nov 28, 3:54 pm, Dmitri <
On Nov 28, 11:11 pm, Dmitri <[EMAIL PROTECTED]> wrote:
> Thanks for the comments, the prefix notation may indeed be something
> that one gets used to. I find it just fine for most cases, just not
> for mathematical expressions. The example function was not meant as a
> complete solution, but rathe
On Sat, 29 Nov 2008 19:05:23 -0800 (PST)
Parth Malwankar <[EMAIL PROTECTED]> wrote:
>
> Regarding Chimp, maybe you can try Gorilla:
> http://groups.google.com/group/clojure/browse_thread/thread/c8b7bc3106c39791
> I haven't used it personally yet.
>
My mistake, I actually did mean Gorilla and no
Ok, I found the right link. I'll give it a try...
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send e
Sounds great, but the link to the installer given in that thread is
broken :( .
On Nov 29, 7:11 pm, Mark Feeney <[EMAIL PROTECTED]> wrote:
> "Clojure Box, alpha"
> thread:http://groups.google.com/group/clojure/browse_frm/thread/6fd17fb97f05...
--~--~-~--~~~---~--~---
On Sat, Nov 29, 2008 at 1:01 PM, Kyle Schaffrick <[EMAIL PROTECTED]> wrote:
>
> I'm running the latest packaged release, and I'd like to start writing
> some more serious "spikes" in Clojure, but I'm starting to get the
> impression that I should be using the SVN version instead to get the
> lates
If you want a dead easy way to get up and messing around with Clojure
on Windows, I'd definitely recommend "Clojure Box". It's a relatively
recent build of Clojure integrated with Emacs, SLIME, and everything
else you need. Pretty much click on it and go.
"Clojure Box, alpha" thread:
http://gro
Kyle Schaffrick wrote:
> Hi all,
>
> I've been playing with Clojure for a few days now, following the mailing
> list, searching and tinkering, etc. I'm really excited about this
> language!
>
> I'm running the latest packaged release, and I'd like to start writing
> some more serious "spikes" in
On Nov 29, 5:39 pm, Randall R Schulz <[EMAIL PROTECTED]> wrote:
> On Saturday 29 November 2008 17:28, puzzler wrote:
> SLIME is an Emacs-based development environment for programming Lisp
> under Emacs (technically, "The Superior Lisp Interaction Mode for
> Emacs"). You might want to check out "
Hi all,
I've been playing with Clojure for a few days now, following the mailing
list, searching and tinkering, etc. I'm really excited about this
language!
I'm running the latest packaged release, and I'd like to start writing
some more serious "spikes" in Clojure, but I'm starting to get the
i
On Saturday 29 November 2008 11:01, ppierre wrote:
> On 29 nov, 17:13, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> > On Nov 29, 2008, at 10:48 AM, ppierre wrote:
> > > But I can't compile core.clj when I put get-locale and
> > > with-locale inside it.
> >
> > What error do you get?
>
> I h
On Saturday 29 November 2008 17:28, puzzler wrote:
> On Windows, when I enter the following line from "Getting Started"
> into the REPL, nothing happens... it just hangs:
> (. javax.swing.JOptionPane (showMessageDialog nil "Hello World"))
>
> Any idea why this isn't working for me?
Is it possible
Never mind. I found the other thread on this topic from a few months
ago, and yes, it turned out the dialog was popping up behind the
console window.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
On Saturday 29 November 2008 17:00, Chouser wrote:
> On Sat, Nov 29, 2008 at 6:26 PM, Randall R Schulz wrote:
> > OK... Is it a legitimate part of Clojure's public specification, or
> > is it something that is (even more) subject to change (than other
> > things in a young language)?
>
> The doubl
On Windows, when I enter the following line from "Getting Started"
into the REPL, nothing happens... it just hangs:
(. javax.swing.JOptionPane (showMessageDialog nil "Hello World"))
Any idea why this isn't working for me?
Also, has anyone written a more detailed guide to getting up and
running o
> This is part of the print-dup work related to AOT. It is new since
> the last release, and therefore not necessarily documented on the site
> yet.
Some examples in the book may be out-of-date wrt this change. Feel
free to post any you spot to the errata page:
http://www.pragprog.com/titles/
On Sat, Nov 29, 2008 at 6:26 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote:
>
> OK... Is it a legitimate part of Clojure's public specification, or is
> it something that is (even more) subject to change (than other things
> in a young language)?
The double-colon keyword prefix is a specific and
Thanks, Stuart,
On Saturday 29 November 2008 15:04, Stuart Halloway wrote:
> The only place I have seen it is on this list, when I asked Rich how
> to get the code for that section of the book to work. :-)
OK... Is it a legitimate part of Clojure's public specification, or is
it something that
Consider these 2 interfaces:
- PackagePrivateInterface.java
package test;
interface PackagePrivateInterface {
public void myPublicMethod();
}
- PublicTagInterface.java
package test;
public interface PublicTagInterface extends PackagePrivateInterface {
}
And these 2 classes:
- Factory.j
The only place I have seen it is on this list, when I asked Rich how
to get the code for that section of the book to work. :-)
Stuart
http://groups.google.com/group/clojure/browse_thread/thread/a88caa17b8d24008/77832fcda9a1e8fc?lnk=gst&q=multimethods+halloway#77832fcda9a1e8fc
>
> Hi,
>
> I ca
Hi,
I came across the use of :: keyword notation in section 8.4 of
Programming Clojure (beta 3 PDF) and went to look for it on the Clojure
Web site, but it appears not to be mentioned there. I looked in the
Reader, Evaluation, Namespaces, API, Multimethods ('cause that's where
Stuart introduc
On 29 nov, 17:13, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> On Nov 29, 2008, at 10:48 AM, ppierre wrote:
>
> > But I can't compile core.clj when I put get-locale and with-locale
> > inside it.
>
> What error do you get?
I have found it :
#"(?:^|_)([a-zA-Z]*)"
(re-pattern "(?:^|_)([a-zA-
Hi there,
I'm having almost the same problem. I'm trying to get the ants demo
running in ubuntu, and I get Rob's second problem:
user=> (def panel (doto (proxy [JPanel] []
(paint [g] (render g)))
(.setPreferredSize (new Dimension
On Nov 29, 2008, at 10:48 AM, ppierre wrote:
> But I can't compile core.clj when I put get-locale and with-locale
> inside it.
What error do you get?
>> - *locale* (should be set!-able as well),
> A set-locale function ?
No, I meant that if *locale* becomes part of Clojure at some p
final static public Var LOCALE = Var.intern(CLOJURE_NS, Symbol.create
("*locale*"), null);
(defn format
"Formats a string using java.lang.String.format, see
java.util.Formatter for format
string syntax"
[fmt & args]
(let [locale (or *locale*
(java.util.Locale/getDefault
On Saturday 29 November 2008 07:35, Stephen C. Gilardi wrote:
> On Nov 29, 2008, at 10:29 AM, Randall R Schulz wrote:
> > I'm somewhat confused by this, but I gather it has something to do
> > with "take" being lazy?
>
> The last note in the doc for macroexpand explains it:
>
> user=> (doc macroex
On Nov 29, 2008, at 9:06 AM, Stephen C. Gilardi wrote:
>
>
> On Nov 29, 2008, at 8:03 AM, Ralf Bensmann wrote:
>
>> But #(...) and (fn [] ...) should be the same?
>
> The other replies have noted why that's not right.
>
> There is a way to get the effect you were looking for. If you want to
> re
On Nov 29, 2008, at 10:29 AM, Randall R Schulz wrote:
> I'm somewhat confused by this, but I gather it has something to do
> with "take" being lazy?
The last note in the doc for macroexpand explains it:
user=> (doc macroexpand)
-
clojure.core/macroexpand
([form])
Rep
On Saturday 29 November 2008 07:29, Randall R Schulz wrote:
> On Saturday 29 November 2008 06:55, Randall R Schulz wrote:
> > ...
> >
> > It's a good technique, though, to see what the compiler is going to
> > be asked to translate after all players between the form as
> > submitted and the compil
I think the NullPointerException was misleading for me... a more
informational error message should be added.
Rich, what do you think?
On Sat, Nov 29, 2008 at 3:41 PM, Ralf Bensmann
<[EMAIL PROTECTED]>wrote:
> Argl... just forgot one of the "basic rules" ;)
>
>
> On Sat, Nov 29, 2008 at 3:33 PM,
On Saturday 29 November 2008 06:55, Randall R Schulz wrote:
> ...
>
> It's a good technique, though, to see what the compiler is going to
> be asked to translate after all players between the form as submitted
> and the compiler have done their thing.
Or is it?
Can you tell what a newbie I am? I
As often as this comes up, I wonder if TCO and loop/recur deserve
their own section in the reference section.
Bill
On Nov 29, 4:11 am, "Kevin Downey" <[EMAIL PROTECTED]> wrote:
> the jvm does not do TCO, loop/recur allows for functional looking
> recursion on the jvm with constant stack size.
>
On Nov 29, 2008, at 9:55 AM, Randall R Schulz wrote:
> In this case, it's no different than just printing the list you passed
> to macroexpand:
>
> user=> '(interpose '.' "The quick brown fox")
> (interpose (quote .) (quote "The quick brown fox"))
>
> It's a good technique, though, to see what th
On Saturday 29 November 2008 06:45, Stephen C. Gilardi wrote:
> On Nov 29, 2008, at 9:30 AM, Randall R Schulz wrote:
> > Is it a reader bug? (That the second apostrophe appeared to be
> > ignored.)
>
> It wasn't ignored. It quoted the string.
Yeah, Robert made me see that.
> I've been intereste
On Saturday 29 November 2008 06:36, Robert Pfeiffer wrote:
> Hi,
>
> On 29 Nov., 15:30, Randall R Schulz <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > What happened here?
>
> String literals evaluate to themselves. Quoting prevents evaluation.
> When you evaluate a quoted string, you get just the str
There is a bug in the AOT compiler. When it calls the method functions
it uses the java package name instead of the clojure namespace name.
This creates problems if I have a namespace with a dash in the name.
(ns net.cddr.foo-bar1)
(defn -main []
(println "Hello: foo-bar1"))
Compil
On Nov 29, 2008, at 9:30 AM, Randall R Schulz wrote:
> Is it a reader bug? (That the second apostrophe appeared to be
> ignored.)
It wasn't ignored. It quoted the string.
I've been interested in a way to see what the reader returns for
things like this in the past.
It turns out we can get
Argl... just forgot one of the "basic rules" ;)
On Sat, Nov 29, 2008 at 3:33 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote:
>
> On Saturday 29 November 2008 06:27, Ralf Bensmann wrote:
> > Thanks for clarification. But I am wondering about a function can
> > return nil:
> >
> > user=> (fn [] ((
Hi,
On 29 Nov., 15:30, Randall R Schulz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> What happened here?
String literals evaluate to themselves. Quoting prevents evaluation.
When you evaluate a quoted string, you get just the string.
user=> '"hello"
"hello"
user=> "hello"
"hello"
user=> (= "a" '"a")
tr
On Saturday 29 November 2008 06:27, Ralf Bensmann wrote:
> Thanks for clarification. But I am wondering about a function can
> return nil:
>
> user=> (fn [] ((+ 1 2) nil))
> #
>
> But "just returning nil" is not ok?
> user=> (fn [] (nil))
You're not returning nil, you're trying to apply nil (as i
Hi,
What happened here?
user=> (take 20 (interpose '.' "The quick brown fox"))
(\T . \h . \e . \space . \q . \u . \i . \c . \k . \space .)
Naturally, I meant to use a character literal as the first argument to
interpose, but my C / Java habits led me to use the apostrophes instead
of the pro
Thanks for clarification. But I am wondering about a function can return
nil:
user=> (fn [] ((+ 1 2) nil))
#
But "just returning nil" is not ok?
user=> (fn [] (nil))
java.lang.NullPointerException (NO_SOURCE_FILE:24)
user=> (fn [] ((nil)))
java.lang.NullPointerException (NO_SOURCE_FILE:25)
Thank
On Nov 29, 9:06 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> On Nov 29, 2008, at 8:03 AM, Ralf Bensmann wrote:
>
> > But #(...) and (fn [] ...) should be the same?
>
> The other replies have noted why that's not right.
>
> There is a way to get the effect you were looking for. If you wa
On Nov 29, 2008, at 8:03 AM, Ralf Bensmann wrote:
> But #(...) and (fn [] ...) should be the same?
The other replies have noted why that's not right.
There is a way to get the effect you were looking for. If you want to
return a constant or do something with side-effects before returning a
On Nov 29, 2008, at 8:03 AM, Ralf Bensmann wrote:
> But #(...) and (fn [] ...) should be the same?
No, as stated here:
http://clojure.org/reader
The anonymous fn reader macro expands as follows:
#(...) => (fn [args] (...))
If you think about it a bit:
#(+ 2 %) => (fn [x] (+ 2 x))
Note the
On Nov 29, 6:03 pm, "Ralf Bensmann" <[EMAIL PROTECTED]>
wrote:
> But #(...) and (fn [] ...) should be the same?
I suppose that might make the syntax somewhat ugly.
E.g.:
(fn [x] (foo x)) would become #((foo %)).
This particular syntax is a frequent point of confusion but
then once you get it i
But #(...) and (fn [] ...) should be the same?
On Sat, Nov 29, 2008 at 1:48 PM, Parth Malwankar
<[EMAIL PROTECTED]>wrote:
>
> On Nov 29, 5:29 pm, "Ralf Bensmann" <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > is this the intended behavior?
> >
> > user=> #(nil)
> > java.lang.NullPointerException (N
On Nov 29, 2008, at 6:49 AM, Daniel Renfer wrote:
> Even if you don't think you'll run into the possibility of blowing
> your stack, it's still a good idea to use recur when doing tail call
> recursion. The compiler will help you out by making sure it really is
> a tail call.
>
> Remember, recur
On Nov 29, 5:29 pm, "Ralf Bensmann" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> is this the intended behavior?
>
> user=> #(nil)
> java.lang.NullPointerException (NO_SOURCE_FILE:12)
> user=> (def b #(nil))
> java.lang.NullPointerException (NO_SOURCE_FILE:13)
>
This is expected.
#(nil) is the same as (
Hi,
is this the intended behavior?
user=> #(nil)
java.lang.NullPointerException (NO_SOURCE_FILE:12)
user=> (def b #(nil))
java.lang.NullPointerException (NO_SOURCE_FILE:13)
This works:
user=> #('nil)
#
Thanks,
-Ralf
--~--~-~--~~~---~--~~
You received this messag
Even if you don't think you'll run into the possibility of blowing
your stack, it's still a good idea to use recur when doing tail call
recursion. The compiler will help you out by making sure it really is
a tail call.
Remember, recur isn't just for loop. It works with functions too.
On Sat, Nov
In this case, the depth of the recursion would be at maximum 21
(number of different types of amino acids), and the function itself
not often called. Is stack size something to worry about at those
depths?
On Nov 29, 11:11 am, "Kevin Downey" <[EMAIL PROTECTED]> wrote:
> the jvm does not do TCO, l
the jvm does not do TCO, loop/recur allows for functional looking
recursion on the jvm with constant stack size.
On Sat, Nov 29, 2008 at 1:25 AM, bOR_ <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I wondered if there is a difference between using loop-recur or merely
> writing a recursive function. T
Hi all,
I wondered if there is a difference between using loop-recur or merely
writing a recursive function. The main difference I found thus far was
that the loop-recur can suffice with less arguments, but the recursive
functions seem to be shorter, and perhaps more elegant?
(defn construct-ato
55 matches
Mail list logo