Module For COM Objects

2013-02-21 Thread octopusgrabbus
Does Clojure have a module that allows initializing, passing data to, and finalizing COM objects? I am asking, because I need to write a Clojure program to communicate with a COM toolkit. Thanks. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: Natively Compiled Clojure

2013-01-21 Thread octopusgrabbus
Thanks. I took your link and posted it as a comment on stackoverflow. On Monday, January 21, 2013 1:15:05 PM UTC-5, Shantanu Kumar wrote: > > > What triggered this was this morning I saw something on > stackoverflow.comabout Clojure's possibly interacting with C code, and the > natively compiled

Re: Natively Compiled Clojure

2013-01-21 Thread octopusgrabbus
te: > > If you haven't found a performance problem, and it's working well for your > needs, why are you interested in making the code run "natively". What > problems have you encountered that pique your intrest in this area? > > Timothy > > > > >

Natively Compiled Clojure

2013-01-21 Thread octopusgrabbus
I use Clojure primarily as a very reliable tool to aid in data transformations, that is taking data in one application's database and transforming it into the format needed for another applications' database. So, my question is would a natively compiled Clojure make sense or turn the language i

Is There An Upcoming Book On Clojure Macros?

2012-12-06 Thread octopusgrabbus
I have most of the Clojure text books available, and have found them all to be quite good. Each one seems to have a different focus, which, depending on the problem at the time, shines light on my particular problem du jour. IMHO, while the current crop of books is quite good, none that I've see

Re: Adding a comma to end of clojure sequence

2012-11-06 Thread octopusgrabbus
This is solved. I am adding a blank field, which gets me my trailing comma. On Tuesday, November 6, 2012 2:40:19 PM UTC-5, octopusgrabbus wrote: > > Is it possible to add an unquoted comma at the end of a Clojure sequence, > while using clojure.data.csv's write-csv? > >

Adding a comma to end of clojure sequence

2012-11-06 Thread octopusgrabbus
Is it possible to add an unquoted comma at the end of a Clojure sequence, while using clojure.data.csv's write-csv? (defn write-csv-file "Writes a csv file using a key and an s-o-s" [out-sos out-file] (if (= dbg 1) (println (first out-sos), "\n", out-file)) (spit out-file "" :append

Re: Origin of tools.cli optional

2012-08-26 Thread octopusgrabbus
> https://github.com/clojure/tools.cli > > Hope that helps, > > Gaz > > On Fri, Aug 24, 2012 at 2:52 PM, octopusgrabbus > > wrote: > > Given the following code > > > > (defn parse-opts > > "Using the newer cli library, parses command line

Origin of tools.cli optional

2012-08-24 Thread octopusgrabbus
Given the following code (defn parse-opts "Using the newer cli library, parses command line args." [args] (cli args (optional ["--in-file-name" ".csv input file" :default "resultset.csv"] identity) (optional ["--out-file-name" ".csv pipe delimited output file" :default "accum

Re: Scheme dotted pair equivalent in Clojure

2012-06-16 Thread octopusgrabbus
4 AM UTC-4, octopusgrabbus wrote: > > I have a need to learn enough scheme to read it and write a few functions. > I came across dotted pair notation. I am trying to grok it in terms of the > only Lisp I know, Clojure. Does dotted pair notation in Scheme compare to > form in Clojure, and i

Scheme dotted pair equivalent in Clojure

2012-06-16 Thread octopusgrabbus
I have a need to learn enough scheme to read it and write a few functions. I came across dotted pair notation. I am trying to grok it in terms of the only Lisp I know, Clojure. Does dotted pair notation in Scheme compare to form in Clojure, and if so, how? -- You received this message becaus

Re: clojure-csv library write-csv examples

2012-06-16 Thread octopusgrabbus
Thank you. That clears things up quite a bit, when you said another library. On Friday, June 15, 2012 10:30:04 AM UTC-4, Walter Tetzner wrote: > > On Friday, June 15, 2012 10:01:24 AM UTC-4, octopusgrabbus wrote: >> >> The reason why I asked this question is this code loo

Re: clojure-csv library write-csv examples

2012-06-15 Thread octopusgrabbus
e))) (with-open [out-file (io/writer "out-file.csv")] (csv/write-csv out-file [["abc" "def"] ["ghi" "jkl"]])) On Friday, June 15, 2012 9:57:03 AM UTC-4, octopusgrabbus wrote: > > I would appreci

clojure-csv library write-csv examples

2012-06-15 Thread octopusgrabbus
I would appreciate getting a pointer to some clojure-csv library write-csv examples. Thank you. -- 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 new members are modera

Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread octopusgrabbus
en > wrote: > > There's nothing wrong with using nth far as I know. > > > > > > On Fri, May 18, 2012 at 11:03 AM, octopusgrabbus < > octopusgrab...@gmail.com> > > wrote: > >> > >> In our production development environme

Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread octopusgrabbus
Thanks for your comment, Tim. You provided a good example and comments on my blog. On Friday, May 18, 2012 4:35:26 PM UTC-4, Tim Visher wrote: > > On Fri, May 18, 2012 at 11:03 AM, octopusgrabbus > wrote: > > In our production development environment, we perform a lot of data

If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread octopusgrabbus
In our production development environment, we perform a lot of data transfers between diverse systems, and most of those transfers involve comma-delimited (.csv) data. So my first small Clojure applications have revolved around the clojure-csv library. While learning Clojure I have seen the co

Re: Compiling Libraries With :aot

2012-04-05 Thread octopusgrabbus
Thanks for the replies. My technical instincts were to compile :aot without having enough JVM, Java, or Clojure experience. How do you request lein to remove the source code? On Wednesday, April 4, 2012 3:22:01 PM UTC-4, octopusgrabbus wrote: > > Is there any reason to compile a Clojure l

Compiling Libraries With :aot

2012-04-04 Thread octopusgrabbus
Is there any reason to compile a Clojure library with :aot? (defproject bene-csv "1.0.0-SNAPSHOT" :description "A csv parsing library" :dependencies [[org.clojure/clojure "1.3.0"] [clojure-csv/clojure-csv "1.3.2"]] :aot [bene-csv.core]) How does compiling or not compiling s

Re: Comments in .clj file appear not to work

2012-02-04 Thread octopusgrabbus
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 new members are moderated - please be patient with your first post. To unsubscribe from this group, send email

Comments in .clj file appear not to work

2012-02-04 Thread octopusgrabbus
I downloaded seesaw-repl-tutorial.clj. which is attached. When I enter (load-file "seesaw-repl-tutorial.clj") I get this error: CompilerException java.lang.RuntimeException: Unable to resolve symbol: $ in this context, compiling:(/home/cnorton/projects/clojure/hello-seesaw/seesaw-repl-tutorial

How do I add a MyClass.java module to my Clojure cake build?

2011-12-20 Thread octopusgrabbus
I have a working Clojure cake build and want to build a .java file into my "bin". What changes do I need in my project and application files to have cake build the file? Thanks. The directory structure is: ./bank2/project.clj ./bank2/src/ba2_app.clj The header of ba2_app.clj is (ns ba2-app

Re: How to convert general recursion to loop .. recur syntax

2011-09-15 Thread octopusgrabbus
Thanks for clarifying the stack space issue. I got confused with the original implementation, and was unsure it would run with a large sequence. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups

Re: How to convert general recursion to loop .. recur syntax

2011-09-14 Thread octopusgrabbus
Alan: I may have misunderstood what I've read both in books, blogs, and the Clojure site, but it seems that writing recursive functions in the loop .. recur style is the preferred style. I also remember most of the texts currently out on Clojure say use the higher level sequence functions rath

Re: How to convert general recursion to loop .. recur syntax

2011-09-14 Thread octopusgrabbus
Thanks. I'll have a look. -- 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 new members are moderated - please be patient with your first post. To unsubscribe from this

Re: How to convert general recursion to loop .. recur syntax

2011-09-14 Thread octopusgrabbus
Jeff: loop .. recur syntax is Clojure's preferred method of recursion. This is a routine to return the skeleton of a sequence, not its values. cmn -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

How to convert general recursion to loop .. recur syntax

2011-09-14 Thread octopusgrabbus
I need help -- ideas, other places or examples to look at, etc -- in converting this function (defn skl [tree] (map skl (filter seq? tree))) to loop .. recur syntax. I've been testing it with (def test_data1 '(1 (2 3) ( ) (( )) :a)) (def test_data2 '(1 2 (3 4) (5 ( 6 7 8 I'm trying

Re: How To Empty A Tree or Returning The Skelton of A Tree Without Leaves

2011-09-08 Thread octopusgrabbus
Thanks. Something got out of whack when I copied it. -- 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 new members are moderated - please be patient with your first post

Re: How To Empty A Tree or Returning The Skelton of A Tree Without Leaves

2011-09-08 Thread octopusgrabbus
Lee: I tried (defn skeleton [tree] (map skeleton (filter seq? tree))) with (def test_data1 '(1 (2 3) ( ) (( )) :a)) and got a Java out of memory error. Where is the condition end recursion condition? tnx cmn -- You received this message because you are subscribed to the Google Group

Re: How To Empty A Tree or Returning The Skelton of A Tree Without Leaves

2011-09-08 Thread octopusgrabbus
http://www.cis.upenn.edu/~matuszek/cis554-2010/Assignments/clojure-01-exercises.html -- 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 new members are moderated - please

Re: How To Empty A Tree or Returning The Skelton of A Tree Without Leaves

2011-09-08 Thread octopusgrabbus
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 new members are moderated - please be patient with your first post. To unsubscribe from this group, send email

Re: How To Empty A Tree or Returning The Skelton of A Tree Without Leaves

2011-09-08 Thread octopusgrabbus
This isn't a request to get help w/ a 4Clojure problem, and I am not specifically asking for help with producing the skeleton (the tree structure without the leaves) of the sequences show below, although I would be appreciative of help. Instead I am asking if a solution to do this is simple or

How To Empty A Tree or Returning The Skelton of A Tree Without Leaves

2011-09-07 Thread octopusgrabbus
When I started learning Clojure, I did not want to be a casual user that shyed away from Clojure's native syntax, preferring to do as much as possible in Java. To that end, I discovered some graduate computer science Clojure exercises and started working them. I know about 4Clojure, but these

Re: Differences Between seq? and sequential?

2011-09-03 Thread octopusgrabbus
And in flattening a list (by hand, not using flatten), why it important to check for sequential instead of seq and where can I read about that? I understand one answer. That is all seqs are sequential. But is there more discussion on this? Thanks. cmn -- You received this message because you ar

Documentation For Lisp Programming in Clojure.

2011-09-03 Thread octopusgrabbus
I have seen the three current books on Clojure. They are all good general books that describe the whole language. I have not had a chance to see Chas Emerick's new Clojure O'Reilly book, so cannot comment on that. Are there any books available or upcoming that concentrate more on Lisp programmi

Re: (deftrace sample

2011-08-25 Thread octopusgrabbus
Forgot about doing this: (:require [clojure.contrib.trace :as ctr]) cmn -- 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 new members are moderated - please be patien

(deftrace sample

2011-08-25 Thread octopusgrabbus
Does anyone have a deftrace sample handy? I'm getting Caused by: clojure.lang.Compiler$CompilerException: java.lang.Exception: Unable to resolve symbol: deftrace in this context (repl_test.clj:15) in (ns repl-test (:gen-class) (:use clojure.contrib.command-line) (:require [clojure.contr

Re: Why can't I print new sequence?

2011-08-25 Thread octopusgrabbus
Ken: Thanks for the answer. You're correct about distinct. I'm working through some exercises. cmn -- 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 new members are mo

Why can't I print new sequence?

2011-08-24 Thread octopusgrabbus
I am probably missing something fundamental in the following example, which is trying to remove duplicates from a sequence. What am I doing wrong? I call it with (f1 d3). Thanks. cmn (ns test-csv (:gen-class) (:use clojure.contrib.command-line) (:require [clojure.contrib.string :as cs

Re: One name space / Multiple Modules

2011-08-05 Thread octopusgrabbus
Sure. module = .clj file On Aug 5, 2:35 am, Laurent PETIT wrote: > 2011/8/4 octopusgrabbus > > > Can more than one module implement the same name space? In other > > words, can the functions that comprise a name space be spread out in > > multiple modules? > > To

One name space / Multiple Modules

2011-08-04 Thread octopusgrabbus
Can more than one module implement the same name space? In other words, can the functions that comprise a name space be spread out in multiple modules? Thanks. cmn -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: Adding "Change History" To Clojure Modules

2011-08-04 Thread octopusgrabbus
from the CVS I suppose, and if you make sure it's autogenerated > and that it comes > from the CVS it gives a lot more insight for both sides. But > that's my opinion. > At least I wouldn't put it in the docstring. > > (ns code-starts-here ...) >

Re: Adding "Change History" To Clojure Modules

2011-08-04 Thread octopusgrabbus
icate > change history into source code, even thru VCS keyword substitution. The > change history is available in the VCS already and also in your IDE, so > anyone who needs to know how a given file has changed can go look that up. > > Sean > > On Wed, Aug 3, 2011 at 12:29 PM, oct

Re: Adding "Change History" To Clojure Modules

2011-08-03 Thread octopusgrabbus
Thanks, and I'm searching as to how to get cvs commit to write this into the module. If you know that, it would be so helpful. On Aug 3, 3:31 pm, Joop Kiefte wrote: > changelog.txt / VCS? > > 2011/8/3 octopusgrabbus : > > > > > > > > > Is there a pre

Adding "Change History" To Clojure Modules

2011-08-03 Thread octopusgrabbus
Is there a preferred method for adding a Change History block to a Clojure module? I'm doing this for now: (ns addr-verify ^{:author "Charles M. Norton", :doc "addr-verify is a small Clojure program that runs address verification through ... Created on August 3, 2011 Cha

Re: Best Way To Remove vector from vector of vectors?

2011-08-02 Thread octopusgrabbus
Got it. I'll go make up different test data; I do get back strings. Thanks. On Aug 2, 7:51 am, "Meikel Brandmeyer (kotarak)" wrote: > Hi, > > Am Dienstag, 2. August 2011 13:48:33 UTC+2 schrieb Ken Wesson: > > > What are you actually wanting to check the integers for? Being zero? > > There's a fun

Re: Best Way To Remove vector from vector of vectors?

2011-08-02 Thread octopusgrabbus
-rows) ) ] clean-rows)) This function is returning (f1 vv1) java.lang.RuntimeException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.CharSequence (NO_SOURCE_FILE:0) addr-verify=> cmn On Aug 1, 4:51 pm, octopusgrabbus wrote: > I'm going to gi

Re: Best Way To Remove vector from vector of vectors?

2011-08-01 Thread octopusgrabbus
ds.  (> 0 2) in prefix is (0 > 2) in > infix notation, so this will always return false in your code since the > vector count will never be less than zero > >  - Any reason you can't just use filter ? > > On Mon, Aug 1, 2011 at 4:11 PM, Meikel Brandmeyer wrote: > >

Re: Best Way To Remove vector from vector of vectors?

2011-08-01 Thread octopusgrabbus
Thanks. This does help. On Aug 1, 4:11 pm, Meikel Brandmeyer wrote: > Hi, > > Am 01.08.2011 um 21:55 schrieb octopusgrabbus: > > > I get back a vector of vectors from clojure-csv/parse-csv. I want to > > remove vectors from that sequence based on the out come of certain

Best Way To Remove vector from vector of vectors?

2011-08-01 Thread octopusgrabbus
I get back a vector of vectors from clojure-csv/parse-csv. I want to remove vectors from that sequence based on the out come of certain tests on individual vector elements. Below, get-parsed-csv-file is called first and returns clean-csv-rows. filter-parsed-csv-rows is called with clean-csv=rows,

Re: Where Are Clojure's (Cake') Build Steps Document

2011-08-01 Thread octopusgrabbus
ar > > and you run the output jar file with: > > java -jar [options] my.uber.jar > > [1]http://maven.apache.org/ > <http://maven.apache.org/> > > On Mon, Aug 1, 2011 at 8:18 AM, octopusgrabbus > wrote: > > > > > > > > > On a production

Where Are Clojure's (Cake') Build Steps Document

2011-08-01 Thread octopusgrabbus
On a production system, I would like to implement less sophisticated build shell scripts without the benefit of having installed cake or its dependencies. I am using cake on my Ubuntu development workstation; it works well. However, when Cake fetches dependencies, all that detail is hidden. Theref

Re: Libraries and build management hell

2011-07-29 Thread octopusgrabbus
On Jul 28, 10:06 pm, Mark Rathwell wrote: > The problem with jar downloads as the default distribution method is that > non-Java people, and even plenty of Java people, seem to have problems > consistently setting classpaths correctly.  Seems much more straightforward > to just have lein take car

Re: clojure.contrib.command-line

2011-07-29 Thread octopusgrabbus
/clojure "1.2.1"] >                       [org.clojure/tools.cli "0.1.0"]] > > On Fri, Jul 29, 2011 at 7:56 AM, octopusgrabbus > > > > > > > > wrote: > > > On Jul 28, 7:24 pm, Anthony Grimes wrote: > >> command-line is deprecated in favor of tools.cli > &g

Re: Building cli

2011-07-29 Thread octopusgrabbus
This fixed it. Thanks Gaz Jones: :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/tools.cli "0.1.0"]] On Jul 29, 10:01 am, octopusgrabbus wrote: > I have downloaded the source to tools.cli and built it with maven. > I've put the

Building cli

2011-07-29 Thread octopusgrabbus
I have downloaded the source to tools.cli and built it with maven. I've put the jar out in /usr/share/java, and created a link to it: sudo ln -s /usr/share/java/tools.cli-0.1.0.jar /usr/share/java/ tools.cli.jar. I am getting this error on compile Caused by: clojure.lang.Compiler$CompilerExcepti

Re: clojure.contrib.command-line

2011-07-29 Thread octopusgrabbus
On Jul 28, 7:24 pm, Anthony Grimes wrote: > command-line is deprecated in favor of tools.cli > now.http://github.com/clojure/tools.cli Where is the repository located? (ns addr-verify (:gen-class) (:require [clojure.tools.cli :only (cli optional)]) . . . results in this error: clojur

Re: clojure.contrib.command-line

2011-07-28 Thread octopusgrabbus
Thanks. I'll switch over. On Jul 28, 7:24 pm, Anthony Grimes wrote: > command-line is deprecated in favor of tools.cli > now.http://github.com/clojure/tools.cli -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

clojure.contrib.command-line

2011-07-28 Thread octopusgrabbus
Are there any command-line examples or documentation other than what's up on clojure.org or ClojureDocs? I'm using (defn -main [& args] (with-command-line args "Get csv file name" [[in-file-name ".csv input file name" "resultset.csv" ]] [[in-file-name ".csv input file name" 1]]

Re: Cake CLASSPATH Error

2011-07-27 Thread octopusgrabbus
rify should be located > in src/addr_verify.clj.  A file that declares namespace > addr-verify.addr-verify would be found in src/addr_verify/addr_verify.clj. > > On Wed, Jul 27, 2011 at 2:42 PM, octopusgrabbus > wrote: > > > > > > > > > I originally had a pro

Cake CLASSPATH Error

2011-07-27 Thread octopusgrabbus
I originally had a project set up that built correctly, but the project directories had not been set up with cake new. I saved my project and main files; created a new project tree with cake new addr_verify; and then replaced project.clj and addr_verify.clj with the working files. Before, addr_ver

Re: cake create project / setup instructions

2011-07-27 Thread octopusgrabbus
cake new does work. I had run cake new in the wrong place before, so I am rebuilding the tree. Problem solved for now. On Jul 27, 1:13 pm, octopusgrabbus wrote: > I found the new command for cake, but I get this error, so I'm a > little confused as to what's going on. cake

Re: cake create project / setup instructions

2011-07-27 Thread octopusgrabbus
I found the new command for cake, but I get this error, so I'm a little confused as to what's going on. cake builds otherwise. cnorton@steamboy:~/projects/clojure$ cake new addr_verify unknown task: new On Jul 27, 8:50 am, octopusgrabbus wrote: > Before getting too far along, I&

cake create project / setup instructions

2011-07-27 Thread octopusgrabbus
Before getting too far along, I'd like to set up my project the way I've seen other projects' configurations, like clj-http and clojure- csv. I can build my project, but it is not set up in the standard way. I am using cake, but cannot find instructions on configuring and then creating the project

Re: Need Help Parsing Clojure Strings

2011-07-25 Thread octopusgrabbus
Thanks for the suggestion. I will try this tomorrow and report back. On Jul 25, 3:46 pm, Islon Scherer wrote: > Do you want something like: > (vec (.split some-string "\\|")) > > (vec (.split "AT|1 Kenilworth Rd||Soapville|ZA|99901-7505|Option value=A ==> > Normal street matchOption value=T ==> Z

Re: Need Help Parsing Clojure Strings

2011-07-25 Thread octopusgrabbus
Thanks. I finally got part of my problem when I changed the regex to #"\d\d\d\d\d-\d\d\d\d" to match the zip-zip4, and when that disappeared, I realized what was going on. On Jul 25, 3:51 pm, Tassilo Horn wrote: > octopusgrabbus writes: > > Hi! > > > > > What

Need Help Parsing Clojure Strings

2011-07-25 Thread octopusgrabbus
I have a web application that returns data that is pipe-delimited and looks like this: AT|1 Kenilworth Rd||Soapville|ZA|99901-7505|Option value=A ==> Normal street matchOption value=T ==> ZIP+4 corrected|013|C065| What I want to do is take the zip-zip4 field, split the zip and zip 4 apart, and ad

Re: How to Return Vector of Vectors

2011-07-22 Thread octopusgrabbus
On Jul 21, 10:15 pm, Ken Wesson wrote: > On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson wrote: > > On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus > > wrote: > >> And do you have a suggestion for a functional way? Is all-csv-rows being re-bound with the results of []

Re: How to Return Vector of Vectors

2011-07-22 Thread octopusgrabbus
Thanks for the example. On Jul 21, 10:15 pm, Ken Wesson wrote: > On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson wrote: > > On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus > > wrote: > >> And do you have a suggestion for a functional way? > > > Yes. Change >

Re: How to Return Vector of Vectors

2011-07-21 Thread octopusgrabbus
it in a functional way. > > On Jul 21, 7:48 pm, octopusgrabbus wrote: > > > (def accumail-url-keys ["CA", "STREET", "STREET2", "CITY", "STATE", > > "ZIP", "YR", "BILL_NO", BILL_TYPE"]) &

How to Return Vector of Vectors

2011-07-21 Thread octopusgrabbus
(def accumail-url-keys ["CA", "STREET", "STREET2", "CITY", "STATE", "ZIP", "YR", "BILL_NO", BILL_TYPE"]) (defn ret-params "Generates all q-parameters and returns them in a vector of vectors." [all-csv-rows] (let [param-vec [[]] ] (doseq [one-full-csv-row all-csv-rows]

Re: Being able to use blank?

2011-07-21 Thread octopusgrabbus
Thanks. You're right. (:require [clojure.contrib.string :as cstr]) ; str already defined On Jul 21, 3:16 pm, Islon Scherer wrote: > I think it's just a sintax problem. > > (ns test-csv >   ... >   (:require [clojure.string :as str])) -- You received this message because you are subscribed to th

Being able to use blank?

2011-07-21 Thread octopusgrabbus
What is the proper syntax to be able to use blank? ? I've tried a bunch of things in the docs, but either the :require syntax is bad, or I get a Java exception saying blank? not recognized. Method 1 - (ns test-csv (:gen-class) (:use clojure.contrib.command-line) (:use clojure-c

Re: Constructing clj-http Get Query

2011-07-20 Thread octopusgrabbus
A", "ZIP" "02474"}}) On Jul 20, 10:49 am, Mark Rathwell wrote: > You need to specify the base url string as the first argument, and the map > is an optional second argument: > > (client/get "http://..."; {:query-params {"CA" ...}}) &

Re: Constructing clj-http Get Query

2011-07-20 Thread octopusgrabbus
gt; (require '[clj-http.client :as client]) > > (defn make-url [ca street-1 street-2 city state zip] > >   (let > > [url "http://MailVerify/Lookup/chkAddr.asp?CA=%s&street=%s&STREET2=%s&CITY=...";] > >     (format url ca street-1 street-2 city stat

Re: Constructing clj-http Get Query

2011-07-20 Thread octopusgrabbus
city state zip] >   (let [url > "http://MailVerify/Lookup/chkAddr.asp?CA=%s&street=%s&STREET2=%s&CITY=... > "] >     (format url ca street-1 street-2 city state zip))) > > (client/get (make-url "xxx" "123 Some St" "Apt 24" &q

Constructing clj-http Get Query

2011-07-20 Thread octopusgrabbus
I've been looking at the examples for clj-http. I'm trying to map the perl string (below) to clj-http's parameters. $gInputUrl = "http://MailVerify/Lookup/chkAddr.asp"; . "?CA=" . $gCa . "&STREET=" . $gAddrSubst1 . "&STREET2=" . $gAddrSubst2 . "&CITY=" . $gCity . "&STATE=" . $gState . "&ZIP=" . $z

Re: Fixing Java Apache Class error

2011-07-20 Thread octopusgrabbus
On Jul 20, 9:45 am, Islon Scherer wrote: > Mark is right, you should use lein (or cake) repl instead of trying to run > clojure on command line. Thanks. There is no reason I can't do that. It works. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Fixing Java Apache Class error

2011-07-20 Thread octopusgrabbus
Same problem. I'm starting Clojure like this, and have rebuilt clj- http with cake deps exec java -cp /usr/share/java/jline.jar:/usr/share/java/clojure.jar:/ usr/share/java/clojure-contrib.jar:/usr/share/java/commons- logging-1.1.1.jar:/home/cnorton/git_build/clj-http/clj- http-0.1.3.jar"$extra_c

Fixing Java Apache Class error

2011-07-20 Thread octopusgrabbus
When I do this: Clojure 1.2.1 user=> (require '[clj-http.client :as client]) I get this error: java.lang.ClassNotFoundException: org.apache.http.HttpRequest (core.clj:1) Does this mean I'm missing a java component? Thanks. cmn -- You received this message because you are subscribed to the Go

Re: Fixing Java Apache Class error

2011-07-20 Thread octopusgrabbus
I've already tried this, and it did not fix the problem. http://www.java-samples.com/showtutorial.php?tutorialid=674 On Jul 20, 9:21 am, octopusgrabbus wrote: > When I do this: > > Clojure 1.2.1 > user=> (require '[clj-http.client :as clie

Re: Clojure Books

2011-07-19 Thread octopusgrabbus
On Jul 19, 1:06 am, Sean Corfield wrote: > On Mon, Jul 18, 2011 at 8:01 PM, Felix Filozov wrote: > > Clojure in Action - http://www.manning.com/rathore/ And there is also an upcoming web course based on this book. http://codelesson.com/courses/view/introduction-to-clojure > > Targeting Clojure

Re: Please stand firm against Steve Yegge's "yes language" push

2011-07-17 Thread octopusgrabbus
Thanks. On Jul 17, 5:52 pm, Sean Corfield wrote: > On Sun, Jul 17, 2011 at 10:59 AM, octopusgrabbus > > wrote: > > Are Steve Yegge's comments blogged/written anywhere? > > Googling is your friend -- search for: > >     steve yegge clojure yes language > >

Re: Please stand firm against Steve Yegge's "yes language" push

2011-07-17 Thread octopusgrabbus
Are Steve Yegge's comments blogged/written anywhere? The last post I could find on his blog http://steve-yegge.blogspot.com/ was about Haskel and written 12/1/2010. Thanks. cmn On Jul 1, 3:59 pm, James Keats wrote: > Hi all. I've been looking at Clojure for the past month, having had a > previo

Re: Local bindings w/o let

2011-07-10 Thread octopusgrabbus
20Forms--(fn%20name?%20[params*%20]%20exprs*)<http://clojure.org/special_forms#Special%20Forms--%28fn%20name?%20[params*%20]%20exprs*%29> > andhttp://clojure.org/metadata > > Jonathan > > On Sun, Jul 10, 2011 at 11:44 PM, octopusgrabbus > wrote: > > > For Question 1 thi

Re: Local bindings w/o let

2011-07-10 Thread octopusgrabbus
org/special_forms#Special%20Forms--(fn%20name?%20[params*%20]%20exprs*)<http://clojure.org/special_forms#Special%20Forms--%28fn%20name?%20[params*%20]%20exprs*%29> > andhttp://clojure.org/metadata > > Jonathan > > On Sun, Jul 10, 2011 at 11:44 PM, octopusgrabbus > wrote: >

Re: Local bindings w/o let

2011-07-10 Thread octopusgrabbus
For Question 1 this is an example of multiple interfaces. Got it. On Jul 10, 5:42 pm, octopusgrabbus wrote: > From Clojure api for max > > (defn max >   "Returns the greatest of the nums." >   {:added "1.0"} >   ([x] x) >   ([x y] (if (> x y) x y))

Local bindings w/o let

2011-07-10 Thread octopusgrabbus
>From Clojure api for max (defn max "Returns the greatest of the nums." {:added "1.0"} ([x] x) ([x y] (if (> x y) x y)) ([x y & more] (reduce max (max x y) more))) Question 1: Why can y be introduced as a local binding without a let? Question 2: What is the map {:added "1.0"} doin

Re: Confused about sequential definition

2011-07-07 Thread octopusgrabbus
nsider. > > If you want to explore the relationships in the language, some people seem > to like Clojure Atlas:http://www.clojureatlas.com/ > > <http://www.clojureatlas.com/> > > On Thu, Jul 7, 2011 at 4:48 PM, octopusgrabbus > wrote: > > > > > > >

Print Friendly (For PDF) Version of Clojure API

2011-07-07 Thread octopusgrabbus
Is there a printer-friendly version of the Clojure API? http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/identity -- 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 t

Confused about sequential definition

2011-07-07 Thread octopusgrabbus
What does this mean exactly? sequential? function Usage: (sequential? coll) Returns true if coll implements Sequential from http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/sequential -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: Avoiding nils

2011-07-07 Thread octopusgrabbus
Many thanks. I've clearly got to get better acquainted with various functions. On Jul 7, 4:30 pm, Allen Johnson wrote: > On Thu, Jul 7, 2011 at 4:27 PM, octopusgrabbus > wrote: > > This code > > > (defn ret-odd > >  [seq-val] > >  (if (not (nil? seq-val))

Avoiding nils

2011-07-07 Thread octopusgrabbus
This code (defn ret-odd [seq-val] (if (not (nil? seq-val)) (if (odd? seq-val) seq-val))) (def my-seq '(1 2 3 4 5 6 7 8 9)) (map ret-odd my-seq) finds the odd numbers, but also returns nil. How do I find just the odd numbers? Thanks. cmn -- You received this message because you

Re: Please stand firm against Steve Yegge's "yes language" push

2011-07-02 Thread octopusgrabbus
As mundane as municipal billing sounds, there are actually some instances using 3rd party Windows based address verification (SmartSoft USA's Accumail) while bills are being loaded (before generating the print files) where a good multi-threaded language would help. Python does well as single thread

Re: Filling let local variable from sequence

2011-06-30 Thread octopusgrabbus
nil) rows) (map #(nth % 1 nil) rows))] (println read-map))) On Jun 30, 4:48 pm, Ken Wesson wrote: > On Thu, Jun 30, 2011 at 4:30 PM, octopusgrabbus > > > > > > > > > > wrote: > > Thanks for answering. > > > I want to create a map of

Re: Filling let local variable from sequence

2011-06-30 Thread octopusgrabbus
mp; J", 80581200,43,0,75,"2011-06-06 06:00:01","61016" I want to map the premise id "61016" to the reading 101100. On Jun 30, 4:24 pm, Ken Wesson wrote: > On Thu, Jun 30, 2011 at 4:15 PM, octopusgrabbus > > > > > > > > > &

Re: Filling let local variable from sequence

2011-06-30 Thread octopusgrabbus
Thanks, Ken. Our answers crossed. I'll go try your suggestions. On Jun 30, 4:24 pm, Ken Wesson wrote: > On Thu, Jun 30, 2011 at 4:15 PM, octopusgrabbus > > > > > > > > > > wrote: > > The dorun in this function > > > (defn process-file >

Re: Filling let local variable from sequence

2011-06-30 Thread octopusgrabbus
16" 33891773,411200,"2011-06-05 23:00:00","610159000","COMMONER","A", 80598726,43,0,75,"2011-06-06 06:00:01","610159000" 33891887,133100,"2011-06-05 23:00:00","610158000","JONES","J & M", 8

Re: Filling let local variable from sequence

2011-06-30 Thread octopusgrabbus
581189,43,0,75,"2011-06-06 06:00:01","610158000" 33891825,239400,"2011-06-05 23:00:00","610157000","SAWTOOTH","GEORGE C",80598731,43,0,75,"2011-06-06 06:00:01","610157000" It would be nice if the let statement would

Re: Filling let local variable from sequence

2011-06-30 Thread octopusgrabbus
If I have rows of vectors, such as the return from clojure-csv\parse- csv ["a" 1 "b" 2 "c" 3 "d" 4] ["e" 5 "f" 6 "g" 7 "h" 8] How can I break up each row? I've tried doseq in the let statement, but get an err

  1   2   >