Re: logging recommendation

2010-11-23 Thread Dave Newton
On Tue, Nov 23, 2010 at 5:46 PM, Stuart Sierra wrote: > On Nov 20, 5:56 pm, HiHeelHottie wrote: > > What do you recommend for logging, especially to a set of rolling > > files? Simply use log4j? > > I manage with Log4j. The .properties configuration file is annoying > sometimes, but it works. >

Re: ANN: Gloss, a byte-format DSL

2010-11-23 Thread Dave Newton
This looks a *lot* like something I did a long time ago ("Data File Disassembler") when I spent a lot of time reverse-engineering things. I had a view/edit layer on top (On Mac, back when a Mac II was extreme hardware :) and man, was it useful... had "pluggable" modules for microcontroller disassem

Re: "Parameterized" SQL queries?

2010-11-10 Thread Dave Newton
On Wed, Nov 10, 2010 at 12:35 PM, Daniel Bell wrote: > I was curious as to exactly it means to parameterize a query. Is it > a way to automatically insert arguments into the query, a way to > destructure the results, or what? The first of those, including SQL-quoting etc. Most JDBC tutorials will

Re: compiling a protocol with types

2010-11-05 Thread Dave Newton
I thought there was some minor magic to get types in there though, wasn't that one of the interesting things Rich pointed out at a recent NYC Clojure meetup (Sept, maybe)? Dave On Nov 5, 2010 10:59 AM, "Kevin Downey" wrote: > for defining an interface you should use definterface > > On Fri, Nov 5

Re: Reloading java classes

2010-11-04 Thread Dave Newton
JRebel is still the best answer. Loading a class at runtime is non- trivial. I don't know how it deals with handling existing instances of the class, though; I still think CLOS got that right. Dave On Nov 4, 2010 10:03 PM, "Seth" wrote: > All i need to do is a function to reload a class I specif

Re: Superficial barriers to entry

2008-12-18 Thread Dave Newton
--- On Thu, 12/18/08, Mibu wrote: > An editor for a lisp language is not just a text editor for > the source that you then compile. It's an environment that > interacts with a REPL. So people can't just use whatever > they've been using. Of course you can--there's no *requirement* that your edit

Re: Clojure's code has moved to Google Code

2008-12-18 Thread Dave Newton
-1 - Original Message > From: Craig Andera > To: clojure@googlegroups.com > Sent: Thursday, December 18, 2008 7:51:43 AM > Subject: Re: Clojure's code has moved to Google Code > > > Does it makes sense to subscribe this group to those? I.e. to have > commit messages appear here. I'v

Re: building with Ant vs building with Maven

2008-12-16 Thread Dave Newton
--- On Tue, 12/16/08, kkw wrote: > Since the Ant-built file is bigger, should I build > using Ant instead of Maven? It looks like the Ant build is compiling more; for example the Maven build includes zip.clj, where the Ant build has all the zip%*.class files. Dave --~--~-~--~~---

Re: Getting Started with Gen-Class

2008-12-15 Thread Dave Newton
--- On Mon, 12/15/08, CuppoJava wrote: > And i get the message "Unable to resolve symbol: > compile in this context" when i type "(compile)" > at the REPL. How are you running the REPL? It's working for me whether I build with Ant or Maven, rev 1160. Dave --~--~-~--~~

Re: Java interop question

2008-12-14 Thread Dave Newton
Sneaky, but I bet I'll get confused by the extra functionality at some point. --- On Sun, 12/14/08, Rich Hickey wrote: > There used to be a long answer as to why: > > http://groups.google.com/group/clojure/msg/8fc6f0e9a5800e4b > > Now there is a short one - it does work! --~--~-~--~-

Re: Java interop question

2008-12-14 Thread Dave Newton
--- On Sun, 12/14/08, David wrote: > work> (.getName java.lang.Integer) > ; Evaluation aborted. > > Why does the second expression fail? Would that work in Java? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: iteration idioms

2008-12-13 Thread Dave Newton
--- On Sat, 12/13/08, Stephen Parker wrote: > On 12 Dec 2008, at 23:10, Mark Fredrickson wrote: >> [...] insert 3 before every item less than or equal to 5 in a seq: > > (def bar [24 6 5 5 7 5 8 2]) > (insert-before-if #(<= 5 %) 3 bar) > > => (3 24 3 6 3 5 3 5 3 7 3 5 3 8 2) Er... Dave --~--

Re: Lisp/Clojure doesn't have syntax?

2008-12-11 Thread Dave Newton
--- On Thu, 12/11/08, Paul Barry wrote: > syntactic sugar is not syntax? I think that depends on which particular nits are being picked. Is it strictly true that Clojure has "no syntax"? Meh--probably not. (defun foo [bar] ...) has more unique characters than (defun foo (bar) ...) or (define (

Re: A newbie question on Agents and ants

2008-12-07 Thread Dave Newton
--- On Sun, 12/7/08, Michael Wood wrote: > Is there an explanation that's a little smaller than 607MB? The slides and the code? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Elegant but very slow

2008-12-07 Thread Dave Newton
--- On Sun, 12/7/08, Peter Wolf wrote: > I'm a n00b, but isn't the point of this language to > be *faster* than Java?... I don't believe so. My impression was that the point was to be *better* than Java by: being a Lisp, being functional, and allowing safe and easy multithreading/concurrency.

Re: Running clojure-contrib.jar

2008-12-06 Thread Dave Newton
--- On Sat, 12/6/08, janus wrote: > It is my mistake, this is the error once again. Failed to > load Main-Class manifest attribute from > C:\clojure\clojure\clojure-contrib.jar. > I did what Shulz said, however, I still have the same problem. Can you post the *exact* classpath and/or files and/or

Re: neo4j-clojure

2008-12-06 Thread Dave Newton
--- On Sat, 12/6/08, Julian Morrison wrote: > A wrapper for neo4j, which is a non-relational database > using [...] traversable relationships. Hey, wait... Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cl

Re: Running clojure-contrib.jar

2008-12-06 Thread Dave Newton
--- On Sat, 12/6/08, Randall R Schulz wrote: > On Saturday 06 December 2008 03:18, janus wrote: >> I got" Failed to load Main-Class manifest attribute from C;/clojure/ >> clojure/clojure" when I tried to run clojure. > > Start by telling us precisely what you did to "run clojure." [...] Plus I'm

Re: DISCUSS: replace (rand)

2008-12-02 Thread Dave Newton
--- On Tue, 12/2/08, Paul Barry wrote: > Since this is just pure java, shouldn't it be the same on all 1.5 > JVMs? Would it be different on other JVM implementations? Just > to verify, I checked on my Mac OS X 10.5 and in the Sun JDK > 1.5 on Windows XP, and it does appear to be the same. A Su

Re: Slightly off-topic: building DSLs incrementally in Java

2008-11-24 Thread Dave Newton
--- On Mon, 11/24/08, Stuart Sierra wrote: > An interesting idea: hacking the Java compiler to perform > source-code transformations: > http://www.iam.unibe.ch/~akuhn/blog/2008/11/roman-numerals-in-your-java/ That's pretty cool, but not really a new idea--the JastAdd [1] and Polyglot [2] compile

Re: Bureaucracy has reached Wikibooks

2008-11-20 Thread Dave Newton
--- On Thu, 11/20/08, vdm <[EMAIL PROTECTED]> wrote: > I vote for getting a better wiki. Does anybody know of > examples of open source projects using a Wiki well? > Surely Clojure wouldn't be the first. Some Apache projects (Struts 2, for example) use Confluence, and they have an open source l

Re: strings

2008-11-18 Thread Dave Newton
--- On Tue, 11/18/08, joejoe wrote: > Yeah I got so fed up with trying to do it I > almost gave up, then I found the (reverse string). That doesn't actually do what your spec said, though. Dave --~--~-~--~~~---~--~~ You received this message because you are subs

Re: POLL: Domain name for project hosting site.

2008-11-17 Thread Dave Newton
--- On Mon, 11/17/08, Drew Crampsie wrote: > - projecture Nice, because Clojure "sticks out" beyond Java/JVM, besides the other obvious meanings > - proj4cloj Too hard to say. > - clojforge, cloforj, sourceforj? > - forj > - clojects Source code coming out of the cloject; me likey. >

Re: Clojure for LISP programmers....

2008-11-17 Thread Dave Newton
--- On Mon, 11/17/08, Rich Hickey wrote: > I've presented Clojure to many of the people who wrote > CL and Scheme, and no one can deny it is a Lisp. I'd also add that at Lisp50 Clojure was very well received by many Lisperati, and many, if not most, of the folks there were *way* into Scheme and

Re: Clojure for LISP programmers....

2008-11-17 Thread Dave Newton
--- On Mon, 11/17/08, Simon Brooke wrote: > I admit I started without reading the documentation, but having got > stuck I then read the documentation - both that at Clojure.org and > that in the Wikibook - carefully. It didn't help. I just don't see how that's possible, since somehow I've managed

Re: Clojure for LISP programmers....

2008-11-16 Thread Dave Newton
I'll add that: (cond (foo bar) (baz plugh)) => (cond (foo) (bar) (baz) (plugh)) This particular CL difference is listed on the wiki page you listed: http://en.wikibooks.org/wiki/Clojure_Programming#Clojure_for_Common_Lisp_Programmers I also didn't have anywhere near these kinds of problems get

Re: Testing Clojure (was Re: Bug? Strange set equality (r1075))

2008-11-13 Thread Dave Newton
--- On Thu, 11/13/08, Frantisek Sodomka wrote: > [...] > becomes: > > (deftest t-Symbols >(check > (:equal >'abc (symbol "abc") >'*+!-_? (symbol "*+!-_?") >'abc:def:ghi (symbol "abc:def:ghi") >'abc/def (symbol "abc" "def") >'abc.def/ghi (symbol "ab

Re: REPL special variables

2008-11-12 Thread Dave Newton
--- On Wed, 11/12/08, Mark Volkmann wrote: > I don't seem to be able to access the special variables > *1, *2, *3 and > *e in the REPL. For example, > user=> (/ 1 0) > user=> (.printStackTrace *e) > outputs > java.lang.Exception: Unable to resolve symbol: *e in this context In which environment/b

Re: Readable names

2008-11-12 Thread Dave Newton
--- On Wed, 11/12/08, David <[EMAIL PROTECTED]> wrote: > You're right. We don't. Not only that. I can't think how aget > instead of [] (and all the similar verbosity, as it were) fits > into "Almost no syntax" and "Core advantage still code-as-data and > syntactic abstraction" of the "Lisp is a

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: (string?) bug

2008-11-09 Thread Dave Newton
--- On Sun, 11/9/08, Brian Doyle wrote: > This seems like a bug returning false for StringBuilder. > > user=> (string? (new java.lang.String > "hello")) > true > > user=> (string? (new java.lang.StringBuilder > "hello")) > false Wouldn't it be a StringBuilder, and not a String? user=> (. (new