Re: Improved Error Messages - Part XXXVIII

2009-06-25 Thread Ethan Herdrick
I think it's important that Clojure be good at exploring Java libraries. Helpful and correct error messages are important for this. I often go looking for a function at the REPL, like so: user=> substring java.lang.Exception: Unable to resolve symbol: substring in this context (NO_SOURCE_FILE:

Looking for the inverse of slurp

2008-11-16 Thread Ethan Herdrick
Has the inverse of slurp been added to the core libraries yet? Like this: (spit "Some text" "/foo.txt") to make a file called 'foo.txt' containing "Some text". By the way, it appears that Clojure (or Java) doesn't recognize ~, as in (slurp "~/foo.txt"). True? --~--~-~--~~

Re: Looking for the inverse of slurp

2008-11-16 Thread Ethan Herdrick
Thanks, Stuarts! On Nov 16, 10:06 am, Stuart Sierra <[EMAIL PROTECTED]> wrote: > Yes, spit is in clojure.contrib.duck-streams. > > Java doesn't support "~", but if you want the home directory you can > get it with > (System/getProperty "user.home") > -Stuart > > On Nov 16, 9:18 am, Stuart Hallowa

Re: learning clojure

2008-11-24 Thread Ethan Herdrick
For the File / IO things, skip the Java libs - they are pretty low level. Go with the Jakarta Commons libs: http://commons.apache.org/io/description.html , as Stuart has recommended elsewhere. On Mon, Nov 24, 2008 at 6:48 AM, Stuart Sierra <[EMAIL PROTECTED]> wrote: > > It's useful to know the s

Re: Poll: Which clojure.contrib libs should be bundled with Clojure?

2008-11-26 Thread Ethan Herdrick
Seconded. As far as I can tell all you can do is go to Sourceforge and poke around in the source code: http://clojure-contrib.svn.sourceforge.net/viewvc/clojure-contrib/trunk/src/clojure/contrib/ On Wed, Nov 26, 2008 at 12:26 AM, Ralf Bensmann <[EMAIL PROTECTED]> wrote: > ? > > On Mon, Nov 24, 2

Re: quit

2008-11-30 Thread Ethan Herdrick
It's very handy to be able to type in a symbol at the REPL and see its value. On Sun, Nov 30, 2008 at 10:15 AM, Mark Volkmann <[EMAIL PROTECTED]> wrote: > > On Sun, Nov 30, 2008 at 10:35 AM, Paul Barry <[EMAIL PROTECTED]> wrote: >> >> It's a minor thing, but wouldn't it be a good idea to put (de

Re: re-seq and other functions

2008-12-12 Thread Ethan Herdrick
Right, the outer parenthesis denote a list. That list contains only one element. The element is the vector ["qui" "ui" "i"] On Thu, Dec 11, 2008 at 9:43 PM, Stephen C. Gilardi wrote: > > In the latter case the result is a seq containing a single element: > the vector. There is nothing to sort/

Why aren't lists callable?

2009-01-11 Thread Ethan Herdrick
Why aren't all sequences callable, i.e. why don't they all implement IFn? I'd like to use lists like this sometimes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: Why aren't lists callable?

2009-01-12 Thread Ethan Herdrick
Then why are sets callable? Not that I'm complaining - I found it handy, then came to wonder why lists aren't. -Ethan > I'd just like to add to this discussion that maps and vectors are > functions not just because it's neat or possible, with the > implementation one of many possibilities, but

Re: Why aren't lists callable?

2009-01-14 Thread Ethan Herdrick
te" > collection the way vectors and maps are. There isn't a good way to > conceptualize that as a function. > > I've probably just made this more confusing, but that's the best I > could come up with. > > -Stuart Sierra > > On Jan 12, 6:51 pm, Ethan