Re: (string?) bug

2008-11-11 Thread Brian Doyle
Yep, I'm going that route. Thanks On Tue, Nov 11, 2008 at 2:27 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- On Sun, 11/9/08, Brian Doyle wrote: > > Yes, it is a StringBuilder so technically yes. I guess you > > since the only thing you ever do with a StringBuilder is produce a > > string

Re: (string?) bug

2008-11-11 Thread Dave Newton
--- On Sun, 11/9/08, Brian Doyle wrote: > Yes, it is a StringBuilder so technically yes. I guess you > since the only thing you ever do with a StringBuilder is produce a > string it just seemed like it would be a string. Same goes for > StringBuffer. I'd say create your own (stringish? ...)

Re: Readable names

2008-11-11 Thread stefano
> What does everyone else think? I strongly prefer short names for frequently used functions/macros. Short names often let you avoid to break a line of code, but they could be quite cryptic. If they're used often, their meaning will become obvious with time. It's not a problem if it's not immed

Re: Clojure, Emacs and Slime on Windows

2008-11-11 Thread Wayne R
Try going back to SVN version 1088 of clojure. On Nov 11, 9:21 am, "Kyle R. Burton" <[EMAIL PROTECTED]> wrote: > I've followed the straightforward instructions that BC put together: > >  http://bc.tech.coop/blog/081023.html > > It worked flawlessly under Linux.  I have lispbox installed on a > wi

Re: Clojure, Emacs and Slime on Windows

2008-11-11 Thread Dmitri P
Does your clojure.bat start from command line without errors? On Nov 11, 10:21 am, "Kyle R. Burton" <[EMAIL PROTECTED]> wrote: > I've followed the straightforward instructions that BC put together: > > http://bc.tech.coop/blog/081023.html > > It worked flawlessly under Linux. I have lispbox in

Re: "Can't create defs outside of current namespace"

2008-11-11 Thread MikeM
This may be a horrible hack, but you can do something like this in your macro: (clojure.lang.RT/var "my-namespace" "hack-fn" (fn[x] (+ 1 x)) This defines a var (creates the namespace if it doesn't exist) and sets its value to a function, and then you can (in-ns 'my-namespace) (hack-fn 1) etc.

Re: newbie: can clojure do ...

2008-11-11 Thread Mirko
On Nov 11, 3:08 pm, Chouser <[EMAIL PROTECTED]> wrote: > On Tue, Nov 11, 2008 at 2:45 PM, Mirko <[EMAIL PROTECTED]> wrote: > > > I was staring at the source code to your page, and is the navigation > > script in irc.js?  (I am probably exposing my ignorance here). > > That's right:http://clojure

Re: PATCH: Make name accept String

2008-11-11 Thread Graham Fawcett
On Tue, Nov 11, 2008 at 2:13 PM, Drew Raines <[EMAIL PROTECTED]> wrote: > I may be missing some philosophical significance of the name > function, but is there any reason why it can't work on Strings as > well as Named-s? Hi, I think the philosophical point is that a String doesn't have a name,

Re: newbie: can clojure do ...

2008-11-11 Thread Chouser
On Tue, Nov 11, 2008 at 2:45 PM, Mirko <[EMAIL PROTECTED]> wrote: > > I was staring at the source code to your page, and is the navigation > script in irc.js? (I am probably exposing my ignorance here). That's right: http://clojure-log.n01se.net/irc.js > If so, would you mind sharing it? I wou

Re: newbie: can clojure do ...

2008-11-11 Thread Mirko
On Nov 11, 10:32 am, Chouser <[EMAIL PROTECTED]> wrote: > On Tue, Nov 11, 2008 at 9:30 AM, Graham Fawcett > > > > <[EMAIL PROTECTED]> wrote: > > > If you did choose to go the static-HTML route, then you could export a > > "table of contents" in JavaScript, and let each page use this table to > >

PATCH: Make name accept String

2008-11-11 Thread Drew Raines
I may be missing some philosophical significance of the name function, but is there any reason why it can't work on Strings as well as Named-s? user=> (name :foo) "foo" user=> (name "foo") "foo" This would clean up conditionals I have scattered about where I normalize heterogeneous collections of

Re: Readable names

2008-11-11 Thread Mark H.
On Nov 11, 1:17 am, Albert Cardona <[EMAIL PROTECTED]> wrote: > Perhaps one way to do that would be to have a higher-order doc function, > that replied with keywords belonging to it. For example, a mock-up call > for "Maps": > >  >>> (doc Maps) > > Maps are this and that, and can be manipulat

Re: newbie: can clojure do ...

2008-11-11 Thread Chouser
On Tue, Nov 11, 2008 at 9:30 AM, Graham Fawcett <[EMAIL PROTECTED]> wrote: > > If you did choose to go the static-HTML route, then you could export a > "table of contents" in JavaScript, and let each page use this table to > determine which pages precede and follow it. So if you have pages > like:

Clojure, Emacs and Slime on Windows

2008-11-11 Thread Kyle R. Burton
I've followed the straightforward instructions that BC put together: http://bc.tech.coop/blog/081023.html It worked flawlessly under Linux. I have lispbox installed on a windows machine and have been trying to get it to work on that platform as well. Emacs + slime + clisp does work. I creat

Re: "Can't create defs outside of current namespace"

2008-11-11 Thread Chouser
On Tue, Nov 11, 2008 at 1:04 AM, Josip Gracin <[EMAIL PROTECTED]> wrote: > > I've unsuccessfully tried something like: > `(binding [*ns* (find-ns 'target-ns)] >(defn fun [] ...)) The problem is that entire form is compiled with *ns* bound to its current value before evaluation begins. By the

Re: Why are symbols resolved when a function is defined?

2008-11-11 Thread Daniel Renfer
Rich, Would you recommend using declare even if you are able to arrange your code to avoid dependency issues, or only if you can't work around it? On Tue, Nov 11, 2008 at 9:16 AM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > > On Nov 11, 12:24 am, Paul Barry <[EMAIL PROTECTED]> wrote: >> In Comm

Re: newbie: can clojure do ...

2008-11-11 Thread Graham Fawcett
On Tue, Nov 11, 2008 at 12:59 AM, Daniel Spiewak <[EMAIL PROTECTED]> wrote: > > Sounds like you're wasting your time trying to get this working with > just static HTML pages. I think that it's possible, but you would > have to do a lot of really nasty javascript hackery to make the button > targe

Re: Why are symbols resolved when a function is defined?

2008-11-11 Thread Rich Hickey
On Nov 11, 12:24 am, Paul Barry <[EMAIL PROTECTED]> wrote: > In Common Lisp and Scheme, if you have an expression that evaluates a > symbol, it doesn't evaluate it until you call the function, not when > you define it. So you can do this: > > Common Lisp: > [1]> (defun b () a) > B > [2]> (defva

Re: Why are symbols resolved when a function is defined?

2008-11-11 Thread mac
On 11 Nov, 06:24, Paul Barry <[EMAIL PROTECTED]> wrote: > In Common Lisp and Scheme, if you have an expression that evaluates a > symbol, it doesn't evaluate it until you call the function, not when > you define it.  So you can do this: > > Common Lisp: > [1]> (defun b () a) > B > [2]> (defvar a

Re: Bio

2008-11-11 Thread Mike DeLaurentis
That's great, thanks! On Mon, Nov 10, 2008 at 11:15 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > > On Nov 10, 9:38 pm, "Mike DeLaurentis" <[EMAIL PROTECTED]> wrote: >> Hi Rich, >> >> I'm giving a talk about Clojure tomorrow night in Philadelphia for a >> functional programming user group, and

Re: Readable names

2008-11-11 Thread Albert Cardona
> Since I don't hear this argument too often, I image Clojure is > striking an acceptable balance. What does everyone else think? Totally agree. See for example the extreme brevity of names in arc (Paul Graham's hundred year language). Reading code in arc is very hard. Longer names, like j