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.
To
I'm on a home system, same version of Ubuntu as at work. I am able to
build clojure-csv with no problems using cake.
When sitting in my project directory, test_csv, even cake help results
in this error
Caused by: java.lang.Exception: Can't take value of a macro:
#'cake.core/defproject
but when
project.clj, or even your whole project on github.
On Jun 25, 4:41 pm, octopusgrabbus octopusgrab...@gmail.com wrote:
I'm on a home system, same version of Ubuntu as at work. I am able to
build clojure-csv with no problems using cake.
When sitting in my project directory, test_csv
Given this test program:
(ns test-csv
(:gen-class)
(:use clojure.contrib.command-line)
(:use clojure-csv.core))
(defn process-file
Process csv file and prints first item in every row
[file-name]
(let [data (slurp file-name)
rows (parse-csv data)]
(dorun (map #(println
.
Alex
On Tue, Jun 28, 2011 at 7:42 AM, octopusgrabbus
octopusgrab...@gmail.com wrote:
Given this test program:
(ns test-csv
(:gen-class)
(:use clojure.contrib.command-line)
(:use clojure-csv.core))
(defn process-file
Process csv file and prints first item in every row
Given this sample:
(ns test-csv
(:gen-class)
(:use clojure.contrib.command-line)
(:use clojure-csv.core))
(defn x1
[val1 val2]
(println val1 val2))
(defn process-file
Process csv file and prints a column in every row
[file-name]
(let [data (slurp file-name)
rows
PM, octopusgrabbus
octopusgrab...@gmail.comwrote:
Given this sample:
(ns test-csv
(:gen-class)
(:use clojure.contrib.command-line)
(:use clojure-csv.core))
(defn x1
[val1 val2]
(println val1 val2))
(defn process-file
Process csv file and prints a column
I have a sequence
(def mtr-seq [a 1 b 2 c 3 d 4])
and a function
(defn map-mtr
[read-map premid reading]
(conj :read-map {:premid reading}))
I do not understand how to select the first and second of the sequence
to be put into mtr-seq.
This (map-mtr [mtr-map][(first
Fixed by doing this:
(defn map-mtr
[read-map premid reading]
(conj read-map {premid reading}))
On Jun 30, 11:11 am, octopusgrabbus octopusgrab...@gmail.com wrote:
I have a sequence
(def mtr-seq [a 1 b 2 c 3 d 4])
and a function
(defn map-mtr
[read-map premid
Given this empty map,
(def mtr-map {})
this sequence,
(def mtr-seq [a 1 b 2 c 3 d 4])
this function,
(defn map-mtr
[read-map premid reading]
(conj read-map {premid reading}))
and this call
(map-mtr mtr-map (first mtr-seq) (first (rest mtr-seq)))
mtr-map won't update, but redefining
://clojure.org/agents
http://clojure.org/transients
On Thu, Jun 30, 2011 at 11:35 AM, octopusgrabbus
octopusgrab...@gmail.comwrote:
Given this empty map,
(def mtr-map {})
this sequence,
(def mtr-seq [a 1 b 2 c 3 d 4])
this function,
(defn map-mtr
[read-map premid reading
, Mark Rathwell mark.rathw...@gmail.com wrote:
It shouldn't. I can't duplicate what I think you are saying. Would you be
able to you print the code you entered in the repl that produced these
results?
On Thu, Jun 30, 2011 at 12:02 PM, octopusgrabbus
octopusgrab...@gmail.comwrote
Given this function
(defn map-func
test map function
[]
(let [mtr-seq (vector a 1 b 2 c 3 d 4)
read-map (how to load key and value from mtr-seq)
(println read-map)))
I want to load read-map with the keys and values from mtr-seq.
Eventually, this data is going to
:09 PM, octopusgrabbus
octopusgrab...@gmail.comwrote:
Given this function
(defn map-func
test map function
[]
(let [mtr-seq (vector a 1 b 2 c 3 d 4)
read-map (how to load key and value from mtr-seq)
(println read-map)))
I want to load read-map
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 error.
On Jun 30, 2:27 pm, octopusgrabbus octopusgrab...@gmail.com wrote:
Thanks. That did it.
On Jun
...@gmail.com wrote:
Not sure what you mean by 'row of vectors', and 'break up each row'.
On Thu, Jun 30, 2011 at 3:20 PM, octopusgrabbus
octopusgrab...@gmail.comwrote:
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
33891825,239400,2011-06-05 23:00:00,610157000,SAWTOOTH,GEORGE
C,80598731,43,0,75,2011-06-06 06:00:01,610157000
tnx
cmn
On Jun 30, 4:24 pm, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jun 30, 2011 at 4:15 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
The dorun in this function
(defn process
Thanks, Ken.
Our answers crossed. I'll go try your suggestions.
On Jun 30, 4:24 pm, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jun 30, 2011 at 4:15 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
The dorun in this function
(defn process-file
Process csv file and prints
:01,61016
I want to map the premise id 61016 to the reading 101100.
On Jun 30, 4:24 pm, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jun 30, 2011 at 4:15 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
The dorun in this function
(defn process-file
Process csv file and prints
#(nth % 1
nil) rows))]
(println read-map)))
On Jun 30, 4:48 pm, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jun 30, 2011 at 4:30 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
Thanks for answering.
I want to create a map of this output:
PremiseID Reading
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
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
Many thanks.
I've clearly got to get better acquainted with various functions.
On Jul 7, 4:30 pm, Allen Johnson akjohnso...@gmail.com wrote:
On Thu, Jul 7, 2011 at 4:27 PM, octopusgrabbus octopusgrab...@gmail.com
wrote:
This code
(defn ret-odd
[seq-val]
(if (not (nil? seq-val
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
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
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
octopusgrab...@gmail.comwrote:
What does this mean exactly?
sequential?
function
Usage
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} doing?
For Question 1 this is an example of multiple interfaces. Got it.
On Jul 10, 5:42 pm, octopusgrabbus octopusgrab...@gmail.com 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))
([x y more]
(reduce max
--%28fn%20name?%20[params*%20]%20exprs*%29
andhttp://clojure.org/metadata
Jonathan
On Sun, Jul 10, 2011 at 11:44 PM, octopusgrabbus
octopusgrab...@gmail.comwrote:
For Question 1 this is an example of multiple interfaces. Got it.
On Jul 10, 5:42 pm, octopusgrabbus octopusgrab...@gmail.com wrote
]%20exprs*%29
andhttp://clojure.org/metadata
Jonathan
On Sun, Jul 10, 2011 at 11:44 PM, octopusgrabbus
octopusgrab...@gmail.comwrote:
For Question 1 this is an example of multiple interfaces. Got it.
On Jul 10, 5:42 pm, octopusgrabbus octopusgrab...@gmail.com wrote:
From Clojure api
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 james.w.ke...@gmail.com wrote:
Hi all. I've been looking at Clojure for the past
Thanks.
On Jul 17, 5:52 pm, Sean Corfield seancorfi...@gmail.com wrote:
On Sun, Jul 17, 2011 at 10:59 AM, octopusgrabbus
octopusgrab...@gmail.com wrote:
Are Steve Yegge's comments blogged/written anywhere?
Googling is your friend -- search for:
steve yegge clojure yes language
On Jul 19, 1:06 am, Sean Corfield seancorfi...@gmail.com wrote:
On Mon, Jul 18, 2011 at 8:01 PM, Felix Filozov ffilo...@gmail.com wrote:
Clojure in Action - http://www.manning.com/rathore/
And there is also an upcoming web course based on this book.
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 octopusgrab...@gmail.com wrote:
When I do this:
Clojure 1.2.1
user= (require '[clj-http.client :as client])
I get this error
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-
On Jul 20, 9:45 am, Islon Scherer islonsche...@gmail.com 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
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= . $zip4Local;
Could
city state zip]
(let [url
http://MailVerify/Lookup/chkAddr.asp?CA=%sstreet=%sSTREET2=%sCITY=...
]
(format url ca street-1 street-2 city state zip)))
(client/get (make-url xxx 123 Some St Apt 24 New York NY 10026))
On Wed, Jul 20, 2011 at 10:09 AM, octopusgrabbus
octopusgrab
=...;]
(format url ca street-1 street-2 city state zip)))
(client/get (make-url xxx 123 Some St Apt 24 New York NY 10026))
On Wed, Jul 20, 2011 at 10:09 AM, octopusgrabbus octopusgrab...@gmail.com
wrote:
I've been looking at the examples for clj-http. I'm trying to map the
perl
as the first argument, and the map
is an optional second argument:
(client/get http://...; {:query-params {CA ...}})
On Wed, Jul 20, 2011 at 10:46 AM, octopusgrabbus
octopusgrab...@gmail.comwrote:
On Jul 20, 10:26 am, Ulises ulises.cerv...@gmail.com wrote:
try passing a map such as {:query
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
Thanks. You're right.
(:require [clojure.contrib.string :as cstr]) ; str already defined
On Jul 21, 3:16 pm, Islon Scherer islonsche...@gmail.com wrote:
I think it's just a sintax problem.
(ns test-csv
...
(:require [clojure.string :as str]))
--
You received this message because you
(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]
(let
it in a functional way.
On Jul 21, 7:48 pm, octopusgrabbus octopusgrab...@gmail.com wrote:
(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
Thanks for the example.
On Jul 21, 10:15 pm, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
And do you have a suggestion for a functional way?
Yes
On Jul 21, 10:15 pm, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson kwess...@gmail.com wrote:
On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus
octopusgrab...@gmail.com wrote:
And do you have a suggestion for a functional way?
Is all-csv-rows being re
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 add
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 tass...@member.fsf.org wrote:
octopusgrabbus octopusgrab...@gmail.com writes:
Hi!
What
Thanks for the suggestion. I will try this tomorrow and report back.
On Jul 25, 3:46 pm, Islon Scherer islonsche...@gmail.com 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
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
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 octopusgrab...@gmail.com wrote:
Before getting too far
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 octopusgrab...@gmail.com 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
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-verify 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
octopusgrab...@gmail.comwrote:
I originally had a project set up that built
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]]
Thanks. I'll switch over.
On Jul 28, 7:24 pm, Anthony Grimes disciplera...@gmail.com 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
On Jul 28, 7:24 pm, Anthony Grimes disciplera...@gmail.com 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
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:
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 octopusgrab...@gmail.com wrote:
I have downloaded the source to tools.cli and built it with maven.
I've put the jar out in /usr
]
[org.clojure/tools.cli 0.1.0]]
On Fri, Jul 29, 2011 at 7:56 AM, octopusgrabbus
octopusgrab...@gmail.com wrote:
On Jul 28, 7:24 pm, Anthony Grimes disciplera...@gmail.com wrote:
command-line is deprecated in favor of tools.cli
now.http://github.com/clojure/tools.cli
On Jul 28, 10:06 pm, Mark Rathwell mark.rathw...@gmail.com 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
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.
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
octopusgrab...@gmail.comwrote:
On a production system, I would like to implement less sophisticated
build shell scripts without the benefit
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,
Thanks. This does help.
On Aug 1, 4:11 pm, Meikel Brandmeyer m...@kotka.de 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
tests
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 m...@kotka.de wrote:
Hi,
Am 01.08.2011 um 21:55 schrieb octopusgrabbus
) ) ]
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 octopusgrab...@gmail.com wrote:
I'm going
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) m...@kotka.de
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
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
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 iko...@gmail.com wrote:
changelog.txt / VCS?
2011/8/3 octopusgrabbus octopusgrab...@gmail.com:
Is there a preferred method
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, octopusgrabbus
octopusgrab
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 ...)
2011/8/4 octopusgrabbus octopusgrab...@gmail.com
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
Sure. module = .clj file
On Aug 5, 2:35 am, Laurent PETIT laurent.pe...@gmail.com wrote:
2011/8/4 octopusgrabbus octopusgrab...@gmail.com
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
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
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
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 patient
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
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
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
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
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.
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
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
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
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
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
Given the following function
(defn proint-down-from [x]
(when (pos? x)
(println x)
(recur (dec x
What role does the ? operator play. It looks like it is creating a
variable name.
Thanks.
--
You received this message because you are subscribed to the Google
Groups
Many Thanks. I'm interested in learning Clojure and not everything is
obvious in books.
On May 19, 9:20 am, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
? is not an operator, but part of the name pos?. pos? is a function, which
returns true if a number is positive, false otherwise.
Function
What are some recent books that cover Java objects and primitives?
--
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
I apologize for not being clearer in why I asked this question. While
learning Clojure, I thought it would be helpful to have some Java
objects/primitives documentation to know what I can call in Clojure.
Thanks and sorry for the too brief original post.
On May 23, 10:01 am, octopusgrabbus
On May 23, 2011, at 12:16 PM, octopusgrabbus wrote:
I apologize for not being clearer in why I asked this question. While
learning Clojure, I thought it would be helpful to have some Java
objects/primitives documentation to know what I can call in Clojure.
Thanks and sorry for the too brief
Is there a core Java library that handles .csv files or do I need to
download something like OpenCsv? 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
I've been searching the documentation -- which is quite good by the
way for experienced programmers new to Clojure -- to find out how to
load a test.clj into REPL and then run it. I would appreciate a
pointer to documentation. Thank you. cmn
--
You received this message because you are
1) I cloned clojure-contrib from github.
git clone git://github.com/richhickey/clojure-contrib.git
Completed successfully.
2) Then, I installed maven and in the clojure-contrib sub-directory
entered this command
mvn package.
Completed without errors.
3) When I look for clojure-contrib.jar in
Thanks.
I went to http://clojure.org/downloads and downloaded both the latest
stable Clojure and its contrib.
contrib built just fine and gave me the jar file I was looking for.
On Jun 9, 6:15 pm, Benny Tsai benny.t...@gmail.com wrote:
I've never built contrib from source, but I believe the
Thanks. These are the links I've used, and it's worked just fine on
two systems now. I probably got the deprecated version.
On Jun 10, 1:09 am, Sean Corfield seancorfi...@gmail.com wrote:
On Thu, Jun 9, 2011 at 3:15 PM, Benny Tsai benny.t...@gmail.com wrote:
I've never built contrib from
In the following code (from Brian Carper's cow-blog)
(defn login-page
Page to let an admin log in.
[]
{:title Login
:body [:div [:h3 Log in]
(form-to [:post /login]
(form-row Username username text-field)
(form-row Password password
I am trying to use clojure-csv, but am having a lot of cockpit error.
Here is my current configuration:
Running Clojure 1.2.1.
Modified a shell script installed by Synaptic to include clojure-
contrib.jar:
exec java -cp /usr/share/java/clojure.jar:/usr/share/java/clojure-
are generally not kind with Java (or python or ruby, etc)
libraries, at least in my experience.
On Jun 14, 2011, at 3:26 PM, octopusgrabbus wrote:
I am trying to use clojure-csv, but am having a lot of cockpit error.
Here is my current configuration:
Running Clojure 1.2.1.
Modified
1 - 100 of 155 matches
Mail list logo