Hello Kyle,
What got me started is java code on:
http://www.java2s.com/Code/Java/JDK-6/LightweightHTTPServer.htm
But what is strange that java code handler can print to console and
clojure version (if run as a script) does not.
How do you go about debugging the handler?
Kind regards,
Vlad
On Dec 9, 4:47 pm, Ant [EMAIL PROTECTED] wrote:
Hi all,
I've just started looking with interest at the language, and have
decided to port some of my smaller programs and scripts to Clojure as
a way of getting to know the language. I am stumbling over Strings at
the moment, as I am trying
On Dec 9, 2008, at 7:30 AM, prhlava wrote:
The
(. java.lang.System/err println something)
works from in handler (it looks that *out* gets re-directed)...
It may be that *out* gets redirected. Another difference between out
and err is that System/err is often associated with an autoflush
Hi all,
I've just started looking with interest at the language, and have
decided to port some of my smaller programs and scripts to Clojure as
a way of getting to know the language. I am stumbling over Strings at
the moment, as I am trying to read a file. I have tried the following:
user=
On Tue, Dec 9, 2008 at 1:47 PM, Ant [EMAIL PROTECTED] wrote:
Hi all,
I've just started looking with interest at the language, and have
decided to port some of my smaller programs and scripts to Clojure as
a way of getting to know the language. I am stumbling over Strings at
the moment, as
On Dec 9, 6:47 am, Ant [EMAIL PROTECTED] wrote:
Hi all,
I've just started looking with interest at the language, and have
decided to port some of my smaller programs and scripts to Clojure as
a way of getting to know the language. I am stumbling over Strings at
the moment, as I am trying
Hi all,
I think the reader gets confused after your initial C:\dev\java
\clojure\clj-repl.bat
If you start the repl again and try the string with \\ it works fine.
Also, when the reader gets confused by the above string, it seems to
miss the at the end. If you enter a by itself it seems
Hello Steve,
It may be that *out* gets redirected. Another difference between out
and err is that System/err is often associated with an autoflush
stream. It's possible that your output to *out* has ben buffered and
that you need a call to (flush) to ensure it's displayed.
Not calling the
Cool stuff, Dave. I'm interested to see/test it, could you post it as
an attachment to this group or commit it to contrib ?
Cheers,
Razvan.
On Dec 8, 9:08 pm, Dave Griffith [EMAIL PROTECTED] wrote:
Okay, hacking complete. I've got a patch that extends the Clojure STM
so that it will make
Since it requires changes to the Clojure runtime, it probably doesn't
make much sense to put it in contrib. I've posted it as an attachment
to the group.
--Dave Griffith
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Hi Mark,
Most modules in clojure-contrib (including test-is) contain documentation
and examples directly in the header comment of the source file.
Cheers,
Paul.
2008/12/9 Mark Volkmann [EMAIL PROTECTED]
Is there a primary website that provides documentation and examples of
using the various
When I load a JAR at runtime with add-classpath
(add-classpath file:///Users/reb/java/jena.jar)
and try
user= (import '(com.hp.hpl.jena.rdf.model ModelFactory))
I get
java.lang.ClassNotFoundException:
com.hp.hpl.jena.rdf.model.ModelFactory (NO_SOURCE_FILE:0)
user=
However, I can still use
Well,
The
(. java.lang.System/err println something)
works from in handler (it looks that *out* gets re-directed)...
Vlad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group,
On Dec 9, 2:56 am, Dan Larkin [EMAIL PROTECTED] wrote:
Just one bone to pick, though. The are macro doesn't work so well
if I want to test a custom assert-expr function that only deals with a
single expression.
Yeah, are isn't right. It's going to change, either by specifying
the number
On Mon, Dec 8, 2008 at 7:15 PM, Chouser [EMAIL PROTECTED] wrote:
On Mon, Dec 8, 2008 at 10:42 AM, Rich Hickey [EMAIL PROTECTED] wrote:
On Dec 8, 10:08 am, Chouser [EMAIL PROTECTED] wrote:
doseq currently supports both. If both appear on the same binding,
the :while is always test first
On Dec 9, 12:24 am, Matt Revelle [EMAIL PROTECTED] wrote:
The attached patch adds :super-methods option to generate-class as a
map, {local-name [name [param-types] return-type], ...}. The
mechanics work as Rich suggested in an earlier message, a method is
created that has the same type
Over the last few weeks I have updated the examples in the Practical
Common Lisp - Clojure blog series [1]. They should be up-to-date with
the changes to binding forms in Clojure, plus a few errata fixes.
Enjoy, and let me know if you find errors.
Cheers,
Stu
[1]
The PCL - Clojure blog helped turn me on to Clojure... She's a
valuable asset.
Glad to see she hasn't been left wearing a red dress out in the rain.
You must be swamped with the book deadlines.
Thank You for making the time to continue sharing and updating the pcl
- clojure code.
On Dec 9,
Thanks All,
It's working now,I followed Stuarts instructions(example 1).
Emeka
--~--~-~--~~~---~--~~
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
Hi all,
I am working on the functional programming chapter for the book this
week, and I have been reviewing uses of loop/recur vs. lazy-cat/lazy-
cons in Clojure to come up with some guidelines.
Here is where I am: If your function creates/returns only atoms or
fixed size collections,
Hi all,
With the recent huge surge of interest in Clojure, a lot of people
have started using Emacs/SLIME for Clojure development. However, if
you haven't developed in a Lisp-like language previously, SLIME may be
quite confusing. I've posted a summary of a bunch of SLIME-related
links on my
Hi folks,
I just committed a new contrib lib, an experimental tree walker for
Clojure. I'm hoping it will make it easier to write macros that need
to do transformations arbitrary code structures.
-Stuart Sierra
-
clojure.contrib.walk/walk
([f form])
Performs a
Hi all.
Ported my research project to clojure, and now just benchmarking parts
of it. I am currently spending about 5/6th of all simulation time
doing regular expressions, so I looked into alternative regex engines,
optimizing the regular expression and trying to find out whether
clojure's
On Dec 9, 1:18 pm, Stuart Halloway [EMAIL PROTECTED] wrote:
Here is where I am: If your function creates/returns only atoms or
fixed size collections, loop/recur is fine. If it might return (or
internally create) variable/huge/infinite collections, use lazy-*.
I agree in general, although
On Dec 9, 11:18 pm, Stuart Halloway [EMAIL PROTECTED] wrote:
Hi all,
I am working on the functional programming chapter for the book this
week, and I have been reviewing uses of loop/recur vs. lazy-cat/lazy-
cons in Clojure to come up with some guidelines.
Here is where I am: If your
On Dec 9, 12:34 am, harrison clarke [EMAIL PROTECTED] wrote:
you're keeping the head of the sequence, and thus all the elements between
the head and nth.
it's because you're using def, basically.
if you make a function to return the sequence, and pass the result directly
to nth, without
On Tue, Dec 9, 2008 at 2:28 PM, Stephan Mühlstrasser
[EMAIL PROTECTED] wrote:
On Dec 9, 12:34 am, harrison clarke [EMAIL PROTECTED] wrote:
you're keeping the head of the sequence, and thus all the elements
between
the head and nth.
it's because you're using def, basically.
Ok, I'm
Provides an error message like:
(compile 'com.thinkrelevance.Hello)
- java.lang.RuntimeException: Unable to write to /some/bad/loc/
classes/com/thinkrelevance/Hello.class (Hello.clj:1)
I used a RuntimeException because the constructor for IOException did
not take a cause argument.
Cheers,
well, the problem with using def is that you're pinning the head of the
sequence to a variable.
if you wrap it in a fn, then you're making a new sequence each time you call
the fn.
so the head of the sequence isn't attached to anything, only the function
that creates it is.
On Tue, Dec 9, 2008
On Dec 9, 8:48 pm, Drew Olson [EMAIL PROTECTED] wrote:
On Tue, Dec 9, 2008 at 2:28 PM, Stephan Mühlstrasser
[EMAIL PROTECTED] wrote:
On Dec 9, 12:34 am, harrison clarke [EMAIL PROTECTED] wrote:
you're keeping the head of the sequence, and thus all the elements
between
the head
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
On Tue, Dec 9, 2008 at 3:08 PM, Stephan Mühlstrasser
[EMAIL PROTECTED] wrote:
On Dec 9, 8:48 pm, Drew Olson [EMAIL PROTECTED] wrote:
On Tue, Dec 9, 2008 at 2:28 PM, Stephan Mühlstrasser
[EMAIL PROTECTED] wrote:
On Dec 9, 12:34 am, harrison clarke [EMAIL PROTECTED] wrote:
Hi Tom,
On Tue, Dec 9, 2008 at 12:28 PM, Tom Emerson [EMAIL PROTECTED] wrote:
Nice post as always, Bill.
Thanks. :)
One thing I add to my .emacs for SLIME/Clojure is the following:
(global-set-key \C-cs 'slime-selector)
(def-slime-selector-method ?l
most recently visited clojure-mode
user.clj is loaded before thread-local bindings are established. I see
you're using Repl.java. You can see the call to pushThreadBindings
there to see how it works. user.clj allows you to set up the user
namespace, but not set! most vars.
With the repl in clojure.main, you can include an
This does NOT occur if I do this directly from the repl (ie, java -cp
clojure.jar clojure.lang.Repl), but it DOES happen if I am accessing
the repl through SLIME. Does anyone know why this might be ?
--~--~-~--~~~---~--~~
You received this message because you are
On Dec 9, 2008, at 10:03 AM, Rich Hickey wrote:
On Dec 9, 12:24 am, Matt Revelle [EMAIL PROTECTED] wrote:
The attached patch adds :super-methods option to generate-class as a
map, {local-name [name [param-types] return-type], ...}. The
mechanics work as Rich suggested in an earlier
I believe my analysis was incorrect. Never mind!
On Dec 9, 1:23 pm, Paul Mooser [EMAIL PROTECTED] wrote:
This does NOT occur if I do this directly from the repl (ie, java -cp
clojure.jar clojure.lang.Repl), but it DOES happen if I am accessing
the repl through SLIME. Does anyone know why
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
On Mon, Dec 8, 2008 at 9:21 AM, J. McConnell [EMAIL PROTECTED] wrote:
On Mon, Dec 8, 2008 at 9:05 AM, Rich Hickey [EMAIL PROTECTED] wrote:
On Dec 7, 9:01 am, Mibu [EMAIL PROTECTED] wrote:
Is it possible to remove the asserts in derive that restrict the
parent and child to namespace-qualified
I recently tried M-. for the first time with clojure + SLIME and it
broke for me (with a Lisp error: (error Synchronous Lisp Evaluation
aborted.)); other parts of SLIME work (e.g., C-M-x, or C-x C-e), but
this doesn't . I didn't understand the previous messages in this
thread:
1) Stephen Gilardi
Hi Matt,
On Tue, Dec 9, 2008 at 4:15 PM, MattyDub [EMAIL PROTECTED] wrote:
I recently tried M-. for the first time with clojure + SLIME and it
broke for me (with a Lisp error: (error Synchronous Lisp Evaluation
aborted.)); other parts of SLIME work (e.g., C-M-x, or C-x C-e), but
this
On Dec 9, 2008, at 6:13 PM, Brian Doyle wrote:
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.
Here it is:
#!/bin/bash
set -o errexit
On Dec 9, 2008, at 6:13 PM, Brian Doyle wrote:
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.
[Reposting with a change and a correction:
On Tuesday 09 December 2008 18:10, Randall R Schulz wrote:
...
Since I love to share my BASH code (and I anxiously look forward to
the day that I'm willing to share my Clojure code), I've attached my
clojure-svn script. ...
By the way, tab stops are set at 4-column intervals. I forgot to
I did an 'svn update' on my clojure (I'm now at revision 1149), and
ran ant clean, then ant (the default target). Then I deleted my old
swank-clojure directory, and did a git clone of
git://github.com/jochu/swank-clojure.git.
I made sure my .emacs was correctly pointing to the appropriate
The throw-if function from clojure.contrib.except will throw a
specified exception type. If none is specified, it throws a
java.lang.Exception. I was expecting it would through a
java.lang.RuntimeException. Which seems more correct?
--
R. Mark Volkmann
Object Computing, Inc.
I generally like the various def* macros from clojure.contrib.def. I
was wondering though if it would make sense unify the syntax of all
the def* macros from both clojure.contrib.def and clojure.core,
especially with respect to doc strings and attr-maps.
For example in clojure.core we have defn
On Tue, Dec 9, 2008 at 7:05 PM, Rich Hickey [EMAIL PROTECTED] wrote:
Thanks. I think it does a bit too much - I only want to relax the
requirement for namespace-qualification, not any of the other
assertions (e.g. that the participants are either Named or Classes,
can't be = etc).
Right,
Hi Matt,
On Tue, Dec 9, 2008 at 6:43 PM, MattyDub [EMAIL PROTECTED] wrote:
I did an 'svn update' on my clojure (I'm now at revision 1149), and
ran ant clean, then ant (the default target). Then I deleted my old
swank-clojure directory, and did a git clone of
49 matches
Mail list logo