I have a one pagish program that you pass in your screen resolution and it
randomly picks out a new
desktop image from ftp.gnome.org, downloads the image and updates your
desktop. This assumes
your using Gnome.
I wrote clj-web-crawler which wraps the Apache commons client library and
made it suck
a little bit less. I haven't tested it out with the Clojure 1.0 release
just yet, but I'll do that
tonight.
http://github.com/heyZeus/clj-web-crawler/tree/master
On Wed, May 6, 2009 at 7:16 PM, Chris Dean
I posted this a couple of weeks ago and haven't seen it updated on the
clojure
website. Maybe it got lost in the shuffle.
Name: clj-web-crawler
URL: http://github.com/heyZeus/clj-web-crawler/tree/master
Author: Brian Doyle
Categories: Web, Automation
License: MIT
Dependencies: clojure, clojure
Name: clj-web-crawler
URL: http://github.com/heyZeus/clj-web-crawler/tree/master
Author: Brian Doyle
Categories: Web, Automation
License: MIT
Dependencies: clojure, clojure-contrib, Apache commons-client 3.1
Description:
clj-web-crawler is a wrapper around the Apache commons-client Java
library
If I wanted to download and play with clojuredev where would I find it?
On Sat, Apr 4, 2009 at 3:58 PM, Laurent PETIT laurent.pe...@gmail.comwrote:
New release, with a lot of changes!
I would particularly like to thank Stephan Mühlstrasser for his
contributions !
The clojure symbols
I've been using Clojure for about 6 months now and really like it. I am
somewhat new to multi-threading
and using any of the parallel features in Clojure though. I have a
situation where I need to convert
7 files from CSV to XML. Each one of these files is about 180MB apiece in
size. I have
; process line
; write line
)
[input-file1, input-file2, input-file3, ])
Thanks.
On Mon, Mar 16, 2009 at 5:56 PM, Brian Doyle brianpdo...@gmail.comwrote:
I've been using Clojure for about 6 months now and really like it. I am
somewhat new
On Mon, Mar 16, 2009 at 4:29 PM, Mark Volkmann r.mark.volkm...@gmail.comwrote:
On Mon, Mar 16, 2009 at 4:56 PM, Brian Doyle brianpdo...@gmail.com
wrote:
I've been using Clojure for about 6 months now and really like it. I am
somewhat new to multi-threading
and using any of the parallel
I wrote a Clojure script that wraps the Apache commons-client library for
crawling the web. It's a simple 125 line script and I also wrote some test
cases for it as well. I was wondering if this is something that
could/should
be included in clojure.contrib or if it should be a standalone
I had the same issue and ended up having to use enumeration-seq function.
Seems
strange but it worked.
On Mon, Mar 2, 2009 at 4:22 PM, Mark Volkmann r.mark.volkm...@gmail.comwrote:
Should I be able to do something like this?
(doseq [table-column (- jtable .getColumnModel .getColumns)]
That makes sense now. Thanks for the link to the thread.
On Mon, Mar 2, 2009 at 5:01 PM, Stephen C. Gilardi squee...@mac.com wrote:
On Mar 2, 2009, at 6:37 PM, Brian Doyle wrote:
I had the same issue and ended up having to use enumeration-seq function.
Seems
strange but it worked
I wrote something similar to what you are asking about. My
code does not import java class files but calls 'use' on clojure
files that live in the clojure-contrib.jar file. I load this when I
start the REPL only.
(defn name-to-symbol [lib-name]
Converts the lib-name to a symbol
(-
From the original question it looked like there was a vector of unknown
length of vectors
[[a0 a1 a2] [b0 b1 b2] ...]
So my solution is something like:
1:12 user= (def vecs [[:a0 :a1 :a2] [:b0 :b1 :b2]])
#'user/vecs
1:13 user= (partition (count vecs) (interleave (flatten vecs)))
((:a0 :a1) (:a2
I live in southeast Denver and have been doing some Clojure on my own for a
few months now.
On Thu, Feb 5, 2009 at 12:39 PM, chris cnuern...@gmail.com wrote:
Are there any existing clojure users in the Denver/Boulder area (other
than me)?.
Chris
On Tue, Jan 27, 2009 at 7:43 AM, Chouser chou...@gmail.com wrote:
On Tue, Jan 27, 2009 at 8:51 AM, Mark Volkmann
r.mark.volkm...@gmail.com wrote:
Are these statements correct? Actually, I know some are correct
because I just looked though the source. Hopefully others that haven't
will
Here's an example of *1 *2 *3
1:1 user= (str gavin)
gavin
1:2 user= (str teri)
teri
1:3 user= (str brian)
brian
1:4 user= (str-join [*1 *2 *3])
brian teri gavin
On Wed, Jan 14, 2009 at 2:29 AM, Stephen C. Gilardi squee...@mac.comwrote:
By the time you evaluated *2, the second most recent
I think you can just use the update-in function like:
1:1 user= (def m {:a {:b {:c {:d 3)
#'user/m
1:2 user= (update-in m [:a :b :c :d] - 5)
{:a {:b {:c {:d -2
On Sun, Jan 11, 2009 at 11:08 AM, CuppoJava patrickli_2...@hotmail.comwrote:
Hi,
I'm just wondering if there's a clever
Here's one of many ways to do this:
(filter #(.endsWith (.getName %1) .clj ) (file-seq (java.io.File. .)))
On Thu, Jan 8, 2009 at 5:48 PM, wubbie sunj...@gmail.com wrote:
Hi all,
I can use file-seq
(file-seq (File. .))
But how can I filter out all files ending with .clj?
Do we use
I couldn't find anything in core or contrib that wrote out
bytes to a file so I wrote something to do it. Is this
functionality already implemented and I just couldn't find
it? If there isn't anything already, would this be something
good to put in contrib somewhere? Thanks.
(defn
Looks like spit is for printing just text.
On Wed, Jan 7, 2009 at 12:20 PM, Paul Barry pauljbar...@gmail.com wrote:
clojure.contrib.duck_streams/spit?
On Wed, Jan 7, 2009 at 2:14 PM, Brian Doyle brianpdo...@gmail.com wrote:
I couldn't find anything in core or contrib that wrote out
bytes
On Tue, Jan 6, 2009 at 4:47 PM, Tom Ayerst tom.aye...@gmail.com wrote:
Its not the println, nor getting a reader (duckstreams is fine, I can do
that). Its the converting it to a seq and stepping through it printing each
element (which should be a line). Its the loopy, steppy bit, just for a
Looks good. I didn't know about the *file* var.
On Sun, Jan 4, 2009 at 11:22 AM, John D. Hume duelin.mark...@gmail.comwrote:
Brian,
I incorporated your changes and then made changes to load and run all
clj_record/test/*-test.clj files. Thanks again.
-hume.
Today I found out about the var *file*. I looked it up *file* on
clojure.com/api and couldn't find anything.
Is there some place where all of these vars are defined? Is there some way
programatically I can find
them all? Thanks.
--~--~-~--~~~---~--~~
You
.
On Sun, Jan 4, 2009 at 2:22 PM, Brian Doyle brianpdo...@gmail.com wrote:
Looks good. I didn't know about the *file* var.
On Sun, Jan 4, 2009 at 11:22 AM, John D. Hume duelin.mark...@gmail.comwrote:
Brian,
I incorporated your changes and then made changes to load and run all
clj_record/test
...@gmail.comwrote:
Hi Brian,
On Tue, Dec 30, 2008 at 11:41 AM, Brian Doyle brianpdo...@gmail.com
wrote:
(ns com.example.user)
(clj-record.core/init-model)
but when I do that I get the error:
java.lang.ClassNotFoundException: clj-record.core
...
(first (reverse (re-split #\. (name (ns
PM, John D. Hume duelin.mark...@gmail.comwrote:
On Mon, Dec 29, 2008 at 7:15 PM, Brian Doyle brianpdo...@gmail.com
wrote:
I noticed that in the init-model macro you are creating a 'defn table []
...' function in the
model namespace and was wondering why you didn't just make it a def
On Tue, Dec 30, 2008 at 11:25 PM, Mark Engelberg
mark.engelb...@gmail.comwrote:
Thanks, that helps dramatically. It took me a while to figure out how
to edit the SLIME startup to include my clojure files directory in the
classpath, but I got it working.
So it seems like you have to make
Looking at this code the uppercase variables stands out.
This isn't idiomatic is it?
(def GRID_SIZE 10)
(def HEIGHT 600)
(def MARGIN 50)
On Mon, Dec 29, 2008 at 12:19 PM, Mark Volkmann
r.mark.volkm...@gmail.comwrote:
On Mon, Dec 29, 2008 at 11:11 AM, lpetit laurent.pe...@gmail.com wrote:
. You can run
clj_record/test/main.clj as a script but not load it from the REPL.
Let me see if I can get it to work both ways and push an update.
On Sun, Dec 28, 2008 at 6:28 PM, Brian Doyle brianpdo...@gmail.com
wrote:
Having used Rails myself I wanted to check this out and play
Having used Rails myself I wanted to check this out and play with it. I'm
having some
trouble just loading the clj_record/core.clj file though:
1:1 user= (load-file clj_record/core.clj)
java.lang.Exception: Unable to resolve symbol: db in this context
(core.clj:19)
I'm sure it's something I'm
2008/12/22 J. McConnell jdo...@gmail.com
On Mon, Dec 22, 2008 at 10:23 AM, Piotr 'Qertoip' Włodarek
qert...@gmail.com wrote:
Being new to Clojure, to Lisp and to functional programming in
general, I have some trouble wraping my head around it.
As the first exercice, I would like to
I haven't been following the new atom stuff, so I was wondering why atom
would be best in this
situation, vs a ref? Thanks.
On Sun, Dec 21, 2008 at 1:03 PM, Parth Malwankar
parth.malwan...@gmail.comwrote:
On Dec 21, 11:47 pm, chris cnuern...@gmail.com wrote:
I would like to be able to
This would make an excellent FAQ question and answer!
On Sat, Dec 20, 2008 at 9:53 AM, Stuart Sierra
the.stuart.sie...@gmail.comwrote:
This might make a good FAQ question:
On Dec 20, 11:25 am, chris cnuern...@gmail.com wrote:
I am unclear as to the difference between refer, import use, and
Instead of require call use and should get you what you want.
On Dec 20, 2008 9:15 AM, chris cnuern...@gmail.com wrote:
That helped, thanks Christophe.
I have one more problem:
I put it in a util file, under a util namespace:
(ns lambinator.util)
(defmacro sets! [vars rest] `(do ~@(map (fn
I have a seq of strings that are namespaces like,
(clojure.contrib.str-utils, clojure.contrib.duck-streams).
I wanted to call the use function on this seq. I can't seem to do that
though. Any way I can do this or
is this just a bad idea? Thanks.
symbol (list clojure.contrib.str-utils
clojure.contrib.duck-streams)))
-Stuart Sierra
On Dec 15, 3:51 pm, Brian Doyle brianpdo...@gmail.com wrote:
I have a seq of strings that are namespaces like,
(clojure.contrib.str-utils, clojure.contrib.duck-streams).
I wanted to call the use function
According to the docs the seq function should be able to take an
enumeration,
but here is what I see:
user= (seq (.elements (doto (java.util.Vector.) (.add hello) (.add
world
java.lang.IllegalArgumentException: Don't know how to create ISeq
from: (NO_SOURCE_FILE:0)
SVN 1160, thanks.
Using enumeration-seq does the trick! Thanks.
user= (enumeration-seq (.entries (java.util.zip.ZipFile. path to some
jar)))
On Mon, Dec 15, 2008 at 5:14 PM, Rich Hickey richhic...@gmail.com wrote:
On Dec 15, 6:01 pm, Brian Doyle brianpdo...@gmail.com wrote:
According to the docs the seq
On Mon, Dec 15, 2008 at 9:43 PM, Daniel Eklund doekl...@gmail.com wrote:
Looks like an if then else version of the map lookup??
ie: (if (%1 %2) (%1 %2) %3)
Is this a special feature of maps in general, such that you can look
up a key but return something else if it doesn't exist?
I
I'll take a crack at this. It may appear that the doall and dorun return
something
different with subsequent calls but they don't actually. The doall always
returns
the sequence (1 2) and dorun always returns nil.
The first time (doall x) is called the for loop executes and prints 1 2 (a
side
I'm sure I'm doing something stupid but I can't start up gorilla.
Exception in thread main java.lang.NoClassDefFoundError: de/kotka/gorilla
Caused by: java.lang.ClassNotFoundException: de.kotka.gorilla
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at
Thanks Meikel, removing the ~'s worked. Oh and thanks for vimclojure and
gorilla!
On Sat, Dec 13, 2008 at 9:28 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
Am 13.12.2008 um 17:17 schrieb Brian Doyle:
Here is my script:
java -cp
~/share/clojure.jar:~/share/clojure-contrib.jar:~/share
This article has a good example using the proxy function.
http://gnuvince.wordpress.com/2008/11/18/fetching-web-comics-with-clojure-part-2/
On Thu, Dec 11, 2008 at 1:22 PM, Randall R Schulz rsch...@sonic.net wrote:
On Thursday 11 December 2008 11:31, Mark Engelberg wrote:
I understand how
Stuart,
I have a ~/.cljrc file that has this stuff in there and in my bash (clj)
script to start clojure I do:
$JAVA -cp $CLOJURE_JARS clojure.lang.Repl ~/.cljrc
On Tue, Dec 9, 2008 at 1:12 PM, Stuart Halloway
[EMAIL PROTECTED]wrote:
Why can't I call set! in user.clj? (And what is the
Steve,
Could you post your bash shell script that starts Clojure? I would like to
see what you have concerning the new options that can be passed to the
updated clojure.jar. Thanks.
On Tue, Dec 9, 2008 at 1:59 PM, Stephen C. Gilardi [EMAIL PROTECTED] wrote:
user.clj is loaded before
I started to play with cond-let in the contrib.cond package and got an
unexpected error:
user= (cond-let [x (zero? 0)] (println hello world))
java.lang.Exception: Unsupported binding form: (zero? 0) (NO_SOURCE_FILE:11)
user= (cond-let x (zero? 0) (println hello world))
hello world
Maybe it was
Can you include an example usage of this function? Thanks.
On Wed, Dec 3, 2008 at 12:51 PM, Meikel Brandmeyer [EMAIL PROTECTED] wrote:
Hi Stuart and Rich,
Am 03.12.2008 um 19:00 schrieb Stuart Sierra:
I'm pretty sure I don't like the sound of that at all. We had a nice
discussion about
This seems to work for me:
(defn sub-til-0 [n]
(cond
(zero? n) 0
:else (recur (dec 1
I'm not sure what those extra ['s are for in your example.
On Wed, Dec 3, 2008 at 9:39 PM, puzzler [EMAIL PROTECTED] wrote:
(defn sub-til-0 [n]
(if (zero? n) 0 (recur (dec 1
works
#0e19ab338452c64f
The recommendation was to use java.util.Collections/shuffle and an
example was given:
(defn shuffle [coll]
(let [l (java.util.ArrayList. coll)]
(java.util.Collections/shuffle l)
(seq l)))
user= (shuffle [1 2 3 4 5])
(4 2 1 5 3)
On Dec 2, 3:28 pm, Brian Doyle [EMAIL PROTECTED
Is there a function that takes a collection and randomizes, or shuffles, the
items?
--~--~-~--~~~---~--~~
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
As long as you have the clojure.contrib jar in your path you can do:
(use 'clojure.contrib.seq-utils)
(flatten [1 2 3 '(4 5 6)])
= (1 2 3 4 5 6)
On Sun, Nov 30, 2008 at 9:36 PM, samppi [EMAIL PROTECTED] wrote:
For any given collection [3 2 [3 5 1] 1 [3 4 1] 0], how may I get [3 2
3 5 1 1 3
I am parsing a file and to compare the current line
with the previous line of the file. I am using line-seq
to go thru the file and I thought I would create a
ref to store the previous line. When I want to update
the previous line value I can't seem to do it. I've
never used refs before so I'm
reduce to walk the line-seq. the nature of reduce lets you have
access to the line-seq, two lines at a time no need for a ref.
On Mon, Nov 24, 2008 at 2:17 PM, Brian Doyle [EMAIL PROTECTED]
wrote:
I am parsing a file and to compare the current line
with the previous line of the file. I am using
Yep, that's just a typo in the email. Something was wrong with my browser
and I
couldn't just paste the code in :(
On Mon, Nov 24, 2008 at 3:33 PM, Shawn Hoover [EMAIL PROTECTED]wrote:
On Mon, Nov 24, 2008 at 5:17 PM, Brian Doyle [EMAIL PROTECTED]wrote:
I am parsing a file and to compare
Denver, CO
Brian Doyle
On Wed, Nov 19, 2008 at 4:09 AM, liu chang [EMAIL PROTECTED] wrote:
Singapore +1.
On Wed, Nov 19, 2008 at 5:24 PM, walterc [EMAIL PROTECTED] wrote:
taipei, taiwan
cheers,
walter chang
--~--~-~--~~~---~--~~
You
I wonder if it would good to have something indicating the struct name
put in the metadata when creating a struct?
On Fri, Nov 14, 2008 at 1:42 PM, Chouser [EMAIL PROTECTED] wrote:
On Fri, Nov 14, 2008 at 2:11 PM, Jeff Rose [EMAIL PROTECTED] wrote:
Does my dispatch function have to inspect
Another way to create a map is:
user= (apply hash-map [:a 1 :b 2 :c 3])
{:a 1, :c 3, :b 2}
On Fri, Nov 14, 2008 at 9:42 PM, samppi [EMAIL PROTECTED] wrote:
Excellent! I must remember about the apply function. Thank you very
much.
On Nov 14, 9:35 pm, Kevin Downey [EMAIL PROTECTED] wrote:
Yep, I'm going that route. Thanks
On Tue, Nov 11, 2008 at 2:27 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- On Sun, 11/9/08, Brian Doyle wrote:
Yes, it is a StringBuilder so technically yes. I guess you
since the only thing you ever do with a StringBuilder is produce a
string it just
if this is a repeat; hotel networking is sketchy.)
On Nov 9, 12:07 am, Brian Doyle [EMAIL PROTECTED] wrote:
This seems like a bug returning false for StringBuilder.
user= (string? (new java.lang.String hello))
true
user= (string? (new java.lang.StringBuilder hello))
false
Wouldn't
I had a file that was not encoded using the default file encoding so I
modified slurp to accept an optional encoding parameter.
(defn slurp
Reads the file named by f into a string and returns it. Uses the given
encoding
when opening the file.
([#^String f encoding]
(with-open r (if
Does anyone know of any Clojure maven integration?
What I'd like to see is something that will modify Clojure's
classpath updated based upon a given pom.xml file.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On Thu, Nov 6, 2008 at 11:48 AM, Stuart Halloway
[EMAIL PROTECTED]wrote:
Hi all,
I am playing around with using Clojure to control Ant, something along
the lines of Groovy's Gant. I don't know how far I will take this--
right now it is serving as a code example for the book.
Two
The function is 'rem'.
user= (rem 5 2)
1
On Wed, Oct 15, 2008 at 3:35 PM, Islon [EMAIL PROTECTED] wrote:
Is there a remainder (rest of the division) function in closure? (as java
'%' operator).
I browse the docs but couldn't find one.
On Tue, Oct 7, 2008 at 2:32 PM, Stuart Halloway
[EMAIL PROTECTED]wrote:
Hi Brian,
(1) What does it mean to be equal on id and not equal on the other
fields? If two fields claim the same id but a different name, how
would you know which one to keep?
I guess it could depend on the situation
64 matches
Mail list logo