ClojureQL and Oracle

2011-04-19 Thread Michael
As far as I can tell, ClojureQL does not directly support Oracle. Has anybody been able to get Clojure QL to work with Oracle? Are there plans to directly support it? Would be great to use this with Clojure inside the corporate ship. -- You received this message because you are subscribed to th

Re: clojure.contrib.sql => clojure.java.jdbc - looking for feedback!

2011-04-25 Thread Michael
We've been using iBatis (http://ibatis.apache.org/) to compose sql fragments and map to java objects. iBatis has since forked from Apache to become mybatis (http://www.mybatis.org/). With iBatis, you can use XML to attach an identifier to sql fragments. You can build up sql expressions by referenc

Java/Clojure Developer at Wall Street Bank

2011-07-08 Thread Michael
I'm looking for a java/clojure developer for my small team at a Wall Street bank. If interested, please reply to sender and we can discuss details. Thanks, Michael -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr

Re: Parsing double with default value

2011-07-25 Thread Michael
Tassilo and Alan, Thanks for responding. We're new to clj and don't have a good feel of when to you use macros over functions. (defmacro with-dflt "Runs body in a try/catch returning result of body if no exception otherwise default" [default & body] `(try (do ~@body) (catch Ex

options for a function

2012-02-22 Thread Michael
clojure.data.csv has options for the following: (defn write-csv "Writes data to writer in CSV-format. Valid options are :separator (Default \\,) :quote (Default \\\") :guote? (A predicate function which determines if a string should be quoted. Defaults to quoting only when nec

Re: options for a function

2012-02-23 Thread Michael
Jonas, Thanks for pushing this out so quickly. We're using it now and it works fine. On Feb 23, 12:32 am, Jonas wrote: > * Quote only when necessary (this is the default) This default is very handy. Michael -- You received this message because you are subscribed to the Googl

Re: ANN clojure.java.jdbc 0.2.0

2012-04-24 Thread Michael
Would be convenient to have set-parameters public. I'm experimenting with a couple of fns to insert into oracle and oracle's sequences for generated keys are a headache. What's below is not fully tested but should give you an idea of the sql I'm dealing with. Any pointers on how to leaverage ja

Re: ANN clojure.java.jdbc 0.2.0

2012-04-24 Thread Michael
Would it be possible to make resultset-seq a dynamic var so that you can bind in custom result set mapping without having to make two passes through the results? For instance, I would want to map sql date/timestamp to joda DateTime and T/F to true/false directly. > > -- You received this mess

Re: ANN clojure.java.jdbc 0.2.0

2012-04-24 Thread Michael
, 2012 11:04:11 PM UTC-4, Michael wrote: > > Would be convenient to have set-parameters public. I'm experimenting with > a couple of fns to insert into oracle and oracle's sequences for generated > keys are a headache. What's below is not fully tested but should give yo

[ANN] Remix: mix and match machinery for web and sql

2012-09-29 Thread Michael
Remix is mix and match machinery for web and sql. Take what you need. Discard the rest. Remix is not a framework. It is machinery that composes well with Ring, Compojure, and java.jdbc. Site: http://remix-clojure.herokuapp.com/ Clojars: https://clojars.org/org.clojars.mw10013/remix Github: http

Re: [ANN] Remix: mix and match machinery for web and sql

2012-09-30 Thread Michael
Shantanu, Thanks for taking a look and the feedback. I added a Learn More button and navbar hiliting. On Sunday, September 30, 2012 2:56:12 AM UTC-4, Shantanu Kumar wrote: > > This looks cool! Thanks for sharing. > > The only nit I'd like to mention (about the website) is it wasn't > immediate

core.match and AOT

2012-10-13 Thread Michael
core.match is alpha and has the following documentation note: "if your project depends on AOT do not use core.match at this time" Can somebody outline what the aot issues are? It seems that deploying a web app to heroku with lein2 will compile the app first. Was interested in using core.match t

compare doubles for equality fn

2012-10-26 Thread Michael
Can someone recommend a library that contains a function comparing doubles for equality? This clojure cookbook has a section on comparing floating-point numbers. http://www.gettingclojure.com/cookbook:numbers This blog post makes me want to find an implementation by someone who has more experi

Re: Clojure Conj extracurricular activities spreadsheet

2011-10-31 Thread Michael
Can someone add me (michael.campbell) to: The web and Clojure and Java Dependency Injection Using Clojure Many thanks. -- 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

Re: clojure.core/max and NaN

2011-11-01 Thread Michael
On Nov 1, 12:14 pm, Ben Smith-Mannschott wrote: > 3. Define that min and max will ignore any NaN arguments. What is: (min NaN NaN) in this situation; ()? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloju

Possible to use << from clojure.contrib.strint with a string variable

2010-12-16 Thread Michael
I'm trying to use << from clojure.contrib.strint perform string interpolation in a string variable. The following, (ns strint-test (:use clojure.contrib.strint)) (def v 1) (println (<< "v: ~{v}")) (def s "v: ~{v}") (println (<< (str s))) (println (<< s)) results in v: 1 v: ~{v} java.lang.Runt

Re: Possible to use << from clojure.contrib.strint with a string variable

2010-12-17 Thread Michael
Ken/Alex, Thanks for taking the time to look at this and providing explanations/ ideas. Now I realize I can use forms instead of strings. I was looking for a way to specify a collection of strings and be able to expand them out under different bindings. (def v 0) (def coll ['(str "v: " v) '(<<

Java/Clojure Developer at Wall Street Bank

2011-01-21 Thread Michael
I'm looking for a java/clojure developer for my small team at a Wall Street bank. If interested, please reply to sender and we can discuss details. Thanks, Michael -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr

Re: Problem establishing jdbc connection in la clojure REPL

2011-02-28 Thread Michael
La Clojure's Clojure REPL does not seem to pick up system environment vars, but run/debug configs do. I'm only able to connect to an Oracle database using a run/debug config. http://devnet.jetbrains.net/message/5282672;jsessionid=32A0AC2B9D7CE08AC50042C08250EE19#5282672 On Feb 28, 3:12 am, fin

recur question

2008-10-13 Thread michael
Giving the factorial function as: (def factorial (fn [n] (cond (= n 1) (> n 1) (* n (recur (dec n)) the compiler complains "Can only recur from tail position". Isn't really the recur in tail position? It is the last expresson to be evaluated. --~--~-~--~---

Re: Java libraries

2008-12-02 Thread Michael Wood
ntioned in these threads: http://groups.google.com/group/clojure/browse_thread/thread/986e8b246f296bd2/92df3cacd6111f71 http://groups.google.com/group/clojure/browse_thread/thread/979fe987ef046110/de59307741e39ba6 -- Michael Wood <[EMAIL PROTECTED]> --~--~-~--~~~---~--~--

Re: DISCUSS: replace (rand)

2008-12-02 Thread Michael Wood
nerate pseudorandom numbers at a great rate, ; it may reduce contention for each thread to have its ; own pseudorandom-number generator. So can't you just create multiple instances of java.util.Random if you need that sort of thing? -- Michael Wood <[EMAIL PROTECTED]> --~--~-~--~~

Re: delimited continuations for web development

2008-12-04 Thread Michael Reid
> with a delimited continuation, you're capturing it from the outside, so you > don't have that problem. > Yeah I'm pretty sure its possible. I've been intrigued by this continuations based web programming trend as well. Early on when I learned of Clojure I made a very poor attempt to port cl-cont

Re: A newbie question on Agents and ants

2008-12-07 Thread Michael Wood
of the ant > simulation. It's really good presentation. Is there an explanation that's a little smaller than 607MB? -- Michael Wood <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: A newbie question on Agents and ants

2008-12-07 Thread Michael Wood
On Sun, Dec 7, 2008 at 6:04 PM, Dave Newton <[EMAIL PROTECTED]> wrote: > > --- On Sun, 12/7/08, Michael Wood wrote: >> Is there an explanation that's a little smaller than 607MB? > > The slides and the code? :) Ah, sorry. Didn't see the slides link.

Re: Patch available: correction to line numbers in some exceptions thrown when loading

2008-12-07 Thread Michael Wood
o evaluate a nonexistent function, I do get a line number in the error: user=> (some-function) java.lang.Exception: Unable to resolve symbol: some-function in this context (NO_SOURCE_FILE:4) Your patch does fix the problem in Timothy's first post in that thread, though. --

Re: Patch available: correction to line numbers in some exceptions thrown when loading

2008-12-07 Thread Michael Wood
On Sun, Dec 7, 2008 at 11:10 PM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote: > > On Dec 7, 2008, at 3:13 PM, Michael Wood wrote: > >> With or without your patch I still get no line numbers for some things >> at the REPL. >> e.g. if I try to evaluate a non-

Re: BUG: resultset-seq breaks on duplicate column names

2008-12-08 Thread Michael Reid
Has anybody else hit this? I just did. Its not tricky to alter resultset-seq to return maps with qualified keys: (defn resultset-seq "Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs" [#^java.sql.ResultSet rs] (let [rsmeta (. rs (g

Re: Running clojure-contrib.jar

2008-12-08 Thread Michael Wood
ng as you have the JDK and a Subversion client this is very easy to do. >> (2) It is examples (plural) not example (singular). > It was typo. >> >> Also, what version of the book are you working from? The most recent >> is Beta 3. >>

Re: Math as multimethods

2008-12-08 Thread Michael Reid
I've been toying with something similar. The approach I took was to define multi-methods for the various operators: (defmulti add class) (defmulti sub class) (defmulti mul class) (defmulti div class) ... Then I of course write the implementations for various different types. Then, because the m

Re: Noob question on strings.

2008-12-09 Thread Michael Wood
eption: Unsupported character: \something user=> So try restarting the repl. Or else type a single " and press Enter and see what you get. If you don't get something like "\n" printed by itself with no exceptions, try it again. -- Michael Wood <[EMAIL PROTECTED]>

Re: Not understanding the proper use of map

2008-12-10 Thread Michael Wood
7;user/parallel user=> (parallel + '(1 2 3) '(4 5 6)) (5 7 9) user=> The problem seems to be that you are quoting the +. Not sure why this is, but: user=> ('+ 1 4) 4 user=> > I gleaned what I could from the Clojure wiki but I'm still missing > something. >

Re: Not understanding the proper use of map

2008-12-10 Thread Michael Wood
On Wed, Dec 10, 2008 at 10:00 PM, Michael Wood <[EMAIL PROTECTED]> wrote: [...] > The problem seems to be that you are quoting the +. Not sure why this is, > but: > > user=> ('+ 1 4) > 4 > user=> OK, I think I know why this happens. It's treating th

Re: Dr. Dobbs: "It's Time to Get Good at Functional Programming"

2008-12-11 Thread Michael Wood
ang: A No-Compromises Approach" > - "Haskell: A Foundation for Research" > - Sidebar: "Functional Programming in Mathematica" > > There seems to be a bit of an oversight. Perhaps one of the authors > among us should contact the author of that article, Michael Sw

Re: Macro Style Question: Expanding to Multiple (def ...) Forms

2008-12-15 Thread Michael Reid
Hi Randall, Seems the general consensus is that there is nothing inherently bad with such a design. The idea of macros is to give you the power to generate code from commonly occurring templates. Emitting multiple def forms certainly falls under this umbrella. /mike. On Mon, Dec 15, 2008 at

Re: Macro Style Question: Expanding to Multiple (def ...) Forms

2008-12-15 Thread Michael Wood
d: user=> (declare fred bob margaret) #'user/margaret -- Michael Wood --~--~-~--~~~---~--~~ 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

Re: Microsoft SQL Server and the sql contrib

2008-12-17 Thread Michael Reid
On Wed, Dec 17, 2008 at 11:00 AM, Scott Jaderholm wrote: > Thanks for the idea. Although those are definitely necessary steps, > unfortunately the problem still persists. > Can you get a similar Java program work correctly? i.e. we want to try and separate if this is specific to JDBC in Clojure

Re: Superficial barriers to entry

2008-12-18 Thread Michael Wood
an Bates's RailsCasts (http://railscasts.com) -- Michael Wood --~--~-~--~~~---~--~~ 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

Re: trolltech QT opengl SLIME REPL mac os x

2008-12-18 Thread Michael Reid
For what its worth, I've had a similar setup working on Mac OS X 10.5: Aquamacs SLIME jogl-1.1.1 I'm pretty sure I'm running Java 1.6 (can't check now). I had no issues with hangs. Perhaps QT is the bad ingredient. /mike. On Thu, Dec 18, 2008 at 2:40 PM, chris wrote: > > I think you are abso

Re: Suggestion: introduce (defn name attr-map? [params*] doc-string body) form.

2008-12-19 Thread Michael Wood
doc-string. And > in my humble opinion, I think it improves the readability of function > definitions when the defn, name and [params] are on the same line > regardless of how long the doc-string is. Where would it go when you have multiple par

Re: groups-of

2008-12-19 Thread Michael Wood
clojure.org/contributing > 4. Is there a package retrieval/dependency tracking system for Clojure > (sth. similar to Rubygems / asdf / apt-get etc.) or is someone working > on such a system ? There is no such thing at the moment although it's been mentioned in the past. -- Michael

Re: groups-of

2008-12-19 Thread Michael Wood
On Fri, Dec 19, 2008 at 4:32 PM, Rich Hickey wrote: > > On Dec 19, 8:59 am, "Michael Wood" wrote: >> On Fri, Dec 19, 2008 at 1:02 PM, hosia...@gmail.com >> wrote: >> >> > I'm learning Clojure by trying to implement some functions fro

Re: groups-of

2008-12-19 Thread Michael Wood
On Fri, Dec 19, 2008 at 4:35 PM, Michael Wood wrote: > On Fri, Dec 19, 2008 at 4:32 PM, Rich Hickey wrote: >> >> On Dec 19, 8:59 am, "Michael Wood" wrote: [...] >>> There is a function called partition in Clojure's core.clj that does >>> this,

Re: SPARQL DSL - a humble request for review and guidance

2008-12-21 Thread Michael Wood
e-other user=> (defmacro encode [x] (if (symbol? x) (encode-symbol x) `(encode-other ~x))) nil user=> (encode ?a) "?a" user=> (encode 1) "\"1\"^^xsd:integer" user=> (encode 2.0) "\"2.0\"^^xsd:decimal" user=> (encode "string&

Re: SPARQL DSL - a humble request for review and guidance

2008-12-22 Thread Michael Wood
On Mon, Dec 22, 2008 at 1:30 AM, Michael Wood wrote: > On Sun, Dec 21, 2008 at 7:03 PM, Adam Harrison (Clojure) > wrote: > [...] >> (defmacro where [& triples] >> `(let [encode# (fn [x#] (cond (and (symbol? x#) (= (first (name x#)) >> \?)) (name x#) >>

Re: Stumped - Java hangs when using Swing in Slime

2008-12-22 Thread Michael Beauregard
This is a long shot, but... It's been a while since I played with swing in clojure, but I remember the swing UI would display behind emacs. The result is that the app is correctly running despite the fact that it is obscured by other windows while your REPL appears stuck. Mi

Re: doseq and dotimes are broken in clojure coming with enclojure

2008-12-23 Thread Michael Wood
y using. > Workaround: replace it with the latest clojure.jar Probably the best thing to do as long as it doesn't confuse enclojure. -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &quo

Re: Random Number Generation Issues

2008-12-23 Thread Michael Wood
and then >> the monotonically increasing property ceases to hold, though >> monotonically non-decreasing does hold apparently without limit. > > D'Oh! You use sort when you're done generating the sequence. > > D'Oh! D'Oh! D'Oh! hahaha :)

Re: sync vs. dosync

2008-12-26 Thread Michael Wood
effects on Refs will be atomic." [& exprs] `(sync nil ~...@exprs)) -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloju

Re: println output

2008-12-26 Thread Michael Wood
- prints nothing - why?: > > (defn pretty-print-row [row] > > (map print row)) > > Because 'map' is lazy, and won't evaluate 'print' on any of the items > sequence unless necessary. For functions with side-effects (like > 'print') you'l

Re: why two list comprehensions are different?

2008-12-27 Thread Michael Wood
all for the filtering expression. -- Michael Wood --~--~-~--~~~---~--~~ 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

Re: why two list comprehensions are different?

2008-12-28 Thread Michael Wood
he expression. > The first yields: ([0 0] [0 1] ... [0 99]) > The second y ields ([0 1] [0 2] .. [0 100]) > I don't know why. > > > > > On Dec 27, 4:29 pm, "Michael Wood" wrote: >> On Sat, Dec 27, 2008 at 11:01 PM, wubbie wrote: >> >> >

Re: Swank in Tomcat via JSP: classpath issues

2008-12-28 Thread Michael Wood
ure is 1185. Clojure was recently moved to Google Code: http://groups.google.com/group/clojure/browse_thread/thread/6b4a5284d61a682a/ I don't know if that has anything to do with your problem, though. -- Michael Wood --~--~-~--~~~---~--~~ You received t

Re: Fibonacci sequence

2008-12-28 Thread Michael Wood
so you need to make sure that there is a way out of the recursion. (You're probably already familiar with recursion, in which case, sorry for stating the obvious :) clojure.contrib.lazy-seqs has a lazy infinite sequence implementation. -- Michael Wood --~--~-~--~~~--

Re: Swank in Tomcat via JSP: classpath issues

2008-12-29 Thread Michael Reid
d so with this set it should do what you need. /mike. On Sun, Dec 28, 2008 at 11:04 PM, Greg Harman wrote: > > Thanks for that - I'm all up to date now. The bad news is that it > didn't seem to affect my problem at all. > > On Dec 28, 6:58 pm, "Michael Wood"

Re: Swank in Tomcat via JSP: classpath issues

2008-12-29 Thread Michael Reid
Doh! I just read your discussion w/ Anton on his blog. Seems you've already looked at the context classloader. *shrug*. I'm stumped. /mike. On Mon, Dec 29, 2008 at 12:46 PM, Michael Reid wrote: > Hi, > > I'm not sure how to integrate this into the Tomcat JSP sce

Re: clj-backtrace: more readable backtraces for Clojure

2009-01-02 Thread Michael Reid
Hi, I don't have Clojure in front of me right now to try this out, but from the looks of the README let me be the first to give you an emphatic *Thank you*. This is looking rather useful. Nice work. My one concern with this is how brittle is this with respect to Clojure's development? Have you

Re: Some code review for clj-record?

2009-01-05 Thread Michael Reid
> I guess it comes down to what belongs in metadata. While errors are > certainly data about other data, they don't feel to me like metadata a > la :doc, :tag, :file, :line, and :test. They're the sort of thing I'd > show in an application's UI as part of normal user interactions, > rather than so

Re: newbie question on binding

2009-01-12 Thread Michael Wood
quot; in (apply str-orig args) is the list of arguments that are passed to str-orig. -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: what does -> mean?

2009-01-12 Thread Michael Reid
On Sun, Jan 11, 2009 at 9:12 PM, Mark Triggs wrote: > > I've also found this useful for accessing members in nested maps. For > example: > > (let [me {:person {:name {:first "Mark" >:last "Triggs"} > :email "mark.h.tri...@gmail.com"}}] >(-> me

Re: Delays and their efficiency

2009-01-14 Thread Michael Reid
On Tue, Jan 13, 2009 at 12:39 PM, samppi wrote: > > Recently, I asked how to make a function evaluate its arguments lazily > (http://groups.google.com/group/clojure/browse_thread/thread/ > cd01ef39c2b62530), and I was given a good solution: use Delay objects > (with the delay and force functions)

Re: Macros in interaction with Functions

2009-01-16 Thread Michael Reid
> Is there anyway to write a macro/function that acts as a function when > necessary (so it can be passed as an argument), but expands into a > macro (for speed) when deemed possible? I don't think this is possible without some sort of support for a macro/function duality in core Clojure. In the

Re: is it type hint?

2009-01-19 Thread Michael Reid
On Fri, Jan 16, 2009 at 9:57 PM, David Nolen wrote: > Just made sense to me today as well. > #^Class > is short form for saying set the metadata for the symbol being defined (in > this case list) to the map {:tag Class}. > #^ is a reader macro for setting metadata for the compiler. That code is

Re: repl-utils show

2009-01-19 Thread Michael Reid
On Mon, Jan 19, 2009 at 11:59 AM, Chouser wrote: > > On Sat, Jan 17, 2009 at 8:03 PM, pc wrote: >> >> This is very useful. For me it was useful to be able to limit the >> output to lines that contained a few selected letters. >> >> (show String "pper") >> === public final java.lang.String ===

Re: fit for contribution to clojure.contrib.ns-utils?

2009-01-19 Thread Michael Reid
On Sat, Jan 17, 2009 at 8:25 PM, Dan Larkin wrote: > > > On Jan 17, 2009, at 6:29 PM, Stephen C. Gilardi wrote: >> >> Hi Dan, >> >> That's interesting. I've given it some thought and I've come to see >> it as a version of resolve that tries harder than the default. >> Here's an implementation tha

Re: is it type hint?

2009-01-19 Thread Michael Reid
On Mon, Jan 19, 2009 at 12:34 PM, Chouser wrote: > > On Mon, Jan 19, 2009 at 11:03 AM, Michael Reid wrote: >> >> (defn index-of [#^String s #^String substr] >> (.indexOf s substr)) >> >> Then the compiler will generate an optimized code path that direc

Re: Unexpected binding behavior

2009-01-19 Thread Michael Wood
ing the realisation of its result? That would seem to be far more sensible, but maybe there's a reason it would not work. How would one go about fixing f1 (or b1)? -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Calling Clojure from Java (again)

2009-01-22 Thread Michael Reid
On Thu, Jan 22, 2009 at 4:43 PM, Peter Wolf wrote: > > This is a rejuvenation of the old "calling Java from Clojure" thread > > I have been looking at the solutions from Mark > / > 1) From a Java application, read a text file containing Clojure code > and invoke specific functions it defines

Re: Pretty printing a function's symbol

2009-01-27 Thread Michael Wood
lt# (print ".") (do (newline) (println (format "FAIL: [%s %s]" pname# params# result#)) nil user=> (with-test-report [= 3 [1 3]] +) FAIL: [= [1 3]] false I suppose fn-with-tests could be a macro that calls a function (with-test-report pname

Re: Multi-CPU on Mac Not Exploited?

2009-01-27 Thread Michael Reid
On Tue, Jan 27, 2009 at 3:04 AM, Keith Bennett wrote: > > All - > > I tried testing the code at http://clojure.org/Refs to see what the > benefit of multicore processing would be. To my surprise, the my-pmap > function took *more* time, not less, than the map function. > > Whereas the times list

Re: Pretty printing a function's symbol

2009-01-27 Thread Michael Wood
On Tue, Jan 27, 2009 at 5:38 PM, Chouser wrote: > > On Tue, Jan 27, 2009 at 9:20 AM, Daniel Jomphe wrote: >> >> Michael Wood wrote: >> >>> I've seen various code snippets where people use something# in >>> functions. Is there any point to this or

Re: lancet can now build itself!

2009-01-27 Thread Michael Wood
419 Last Changed Date: 2009-01-26 22:57:08 +0200 (Mon, 26 Jan 2009) -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.c

Re: macro help

2009-01-27 Thread Michael Wood
macro main "doc string" []) #'user/main user=> (doc main) - user/main ([]) Macro doc string nil -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &qu

Re: two way benefits

2009-01-28 Thread Michael Wood
(macroexpand-1 '(Foo.)) > (new Foo) Well, I prefer (new Foo) to (Foo.) anyway, because it's much harder to miss "new" than it is to miss "." :) -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Clojure code formatter

2009-01-28 Thread Michael Wood
p > It could take a string or InputStream/Reader or File as its input, and > return a well formatted String/outputStream/Writer ? > > Indeed, I don't want to reinvent the wheel for clojure-dev, but if it is > written in Python/Ruby/emacs lisp ... I'l

Re: time lies, even with doall

2009-01-30 Thread Michael Wood
17) (18 19)) user=> (partition 2 3 (range 21)) ((0 1) (3 4) (6 7) (9 10) (12 13) (15 16) (18 19)) Note: If the collection cannot be divided evenly then some elements at the end are discarded. -- Michael Wood --~--~-~--~~~---~--~~ You received this message be

Re: clojure-contrib basic questions

2009-02-02 Thread Michael Wood
entation and examples directly in the header comment of the > source file." > > It's worth asking again in case someone knows of good online articles > that give an overview of clojure-contrib. I'll leave this for someone else to answer :) -- Michael Wood --~--~---

Re: somehow (quote foo) came back from the REPL

2009-02-02 Thread Michael Wood
oo) Or something like this: user=> some-string-ending-with-a-' java.lang.Exception: Unable to resolve symbol: some-string-ending-with-a- in this context (NO_SOURCE_FILE:0) 'foo (quote foo) user=> 'foo foo Older versions of clojure w

Re: A short guide on how to use NetBeans to create GUI and then use this GUI from clojure available

2009-02-04 Thread Michael Wood
the following: $ ln -s /path/to/source . is a short cut for: $ ln -s /path/to/source source I have never used Windows' mklink command, but perhaps this is what you want: mklink /D gui build\classes\gui -- Michael Wood --~--~-~--~~~---~--~~ You receiv

Re: What type of arguments are passed to a macro exactly?

2009-02-07 Thread Michael Wood
ources" section of http://www.lispforum.com/ in particular, http://www.lispforum.com/viewtopic.php?f=18&t=13&start=0 -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To po

Re: A pipe macro for left-to-right coll streams

2009-02-10 Thread Michael Reid
On Tue, Feb 10, 2009 at 5:02 PM, MattH wrote: > > The pipe macro is definitely not a new idea btw. It's taken from a > thread posted on another lisp group. > > Someone posted a silly inflammatory attack on lisp, contrasting unix: > "cat a b c | grep xyz | sort | uniq" > to how they'd imagine it

Re: The wiki

2009-02-11 Thread Michael Wood
ing reviewed, though. I hope they do change for the better, because they seem ridiculously draconian: http://en.wikibooks.org/wiki/Help:Revision_review#Automatic_editor_status_criteria -- Michael Wood --~--~-~--~~~---~--~~ You received this message because

Re: Naming Conventions for Functions that Modify State

2009-02-14 Thread Michael Wood
run, doseq, dotimes, etc.) > On Thu, Feb 12, 2009 at 7:57 PM, Kevin Albrecht wrote: >> >> If no one knows of any existing conventions, does anyone have ideas >> for conventions? -- Michael Wood --~--~-~--~~~---~--~~ You received this message

Re: Trojan horse in our Files section

2009-02-14 Thread Michael Wood
check that.) I can't work out if it's a strange way to promote a religion, or a plot to discredit said religion. :) If it had been written in Clojure it might have had some reason to be there :) -- Michael Wood --~--~-~--~~~---~--~~ You received th

Re: Specifying files with spaces in the name to clojure.contrib.command-line

2009-02-14 Thread Michael Wood
"${CLASSPATH}" clojure.main "${script}" "$@" The quotes are necessary around the $@, otherwise you will get the symptoms you are seeing. > P.S. Also, unrelated to this problem, the following line in the > example code in command_line.clj is missing the vecto

Re: How do I do this in clojure?

2009-02-17 Thread Michael Wood
(partial list :bold))] > (cons :table > (map (fn [r] (cons :tr (map (fn [i] (list :item i)) r))) >table-with-selected > > (defn test-mt [] > (make-table 3 1 0 ["cat" "dog" "rabbit" "cat" "dog" &quo

Re: How do I do this in clojure?

2009-02-17 Thread Michael Wood
ew_cell (first strings) row col)) > (rest strings))) >(recur row col table_contents (rest strings))) > (str table_contents "\n" > > I actually got it working before reading any of the replies here. So > I'll probably take some of these s

Re: Fully lazy sequences are coming - feedback wanted!

2009-02-17 Thread Michael Reid
On Mon, Feb 16, 2009 at 12:05 PM, Perry Trolard wrote: > > I agree with the majority of posters that the breaking changes in the > service of optimal names is the right way to go. > > I found the explanation & recipe for porting at clojure.org/lazier > clear & easy to follow. I didn't do full por

Re: Performance of (fn [] ...)?

2009-02-18 Thread Michael Wood
need 40,000,000 functions in less than a second ;) Well that takes about 12 seconds for me on a dual CPU P3 1GHz (/proc/cpuinfo says 930MHz?). :) -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Clojure Questions

2009-02-21 Thread Michael Wood
3.0 bytecode library, and the current alpha distribution includes > it. Java 1.5 or greater is required." Looks like that needs to be updated :) The current license is EPL, not CPL. -- Michael Wood --~--~-~--~~~---~--~~ You received this message becau

Re: Invoking Java method through method name as a String

2009-02-21 Thread Michael Wood
;) > #'user/i > user=> (def m "substring") > #'user/m > user=> (def args [2,3]) > #'user/args > user=> (str-invoke i m args) > java.lang.IllegalArgumentException: Unexpected param type (NO_SOURCE_FILE:0) > us

Re: Problem with svn checkout

2009-02-24 Thread Michael Wood
ke an unofficial Git repository. I don't know the URL off hand, but it's been mentioned on the Clojure group. -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: alternate syntax

2009-02-24 Thread Michael Wood
o > appease those people. Clearly the majority of the people on this list > feel the answer is "no". I have a feeling that developers who use the "too many parentheses" reason for avoiding Clojure (or other lisps) will just find another reason

Re: Waterfront - The Clojure-based editor for Clojure

2009-02-25 Thread Michael Wood
${DP} contains spaces, unless you quote those arguments too: #!/bin/sh DP="${0%/*}" java -cp "~/src/clojure/clojure.jar:${DP}/clj:${DP}/java" -Dnet.sourceforge.waterfront.plugins="${DP}/clj/net/sourceforge/waterfront/ide/plugins" clojure.mai

Re: Please explain

2009-02-27 Thread Michael Wood
ould be a little clearer as follows: Bindings created with _the binding macro_ can be assigned to, which[...] -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: Please explain

2009-02-27 Thread Michael Wood
On Fri, Feb 27, 2009 at 2:30 PM, Mark Volkmann wrote: > > On Fri, Feb 27, 2009 at 4:34 AM, Michael Wood wrote: [...] >> Bindings created with binding can be assigned to, which provides a >> means for nested contexts to communicate with code before it _in_ the call >> s

Re: Contributing

2009-02-27 Thread Michael Wood
do this to me. So, I suppose the "syntax" for this would be something like this: (binding [*read-eval* false] (read ...)) >> Should I create a separate reader for the read-only version or just >> use an if statement within the EvalReader? > > A solution based

Re: [PATCH] Getting substrings counting from the end

2009-03-01 Thread Michael Wood
art end] >     (let [count-back #(if (< 0 %) (+ (count s) %) %)] >       (.substring s (count-back start) (count-back end) > > Am I the only one who finds this useful? Perhaps if it's not suited for > core it could go in str-utils in contrib as "substring". Makes s

Re: Internal structure of evaluation results

2009-03-02 Thread Michael Wood
gt;   Returns the metadata of obj, returns nil if there is no metadata. > nil > user=> The above is not necessary: user=> (doc meta) --------- clojure.core/meta ([obj]) Returns the metadata of obj, returns nil if there is no metadata. nil user=> -- Michael Wood -

Re: Waterfront - The Clojure-based editor for Clojure

2009-03-03 Thread Michael Wood
go for details: http://groups.google.com/group/clojure/browse_thread/thread/d5ce5ddb679cb8f9/79919526bf401a08?lnk=gst#79919526bf401a08 > P.S. - The text editor you are using for the shell script is encoding > DOS style newlines and doesn't work on linux.  I co

  1   2   3   4   5   6   7   8   9   10   >