On Oct 10, 7:10 am, Paul Nakata wrote:
> I've tried the ELPA install method and installing with sources from
> git and get this error. I'm currently set up with everything in ~/src/
> and I've pulled everything from git using the directions
> fromhttp://riddell.us/tutorial/clojure/clojure.htm
I'm trying to get set up in emacs to use clojure.
When I try to fire up slime, I get this error:
Clojure 1.0.0--SNAPSHOT
user=> java.io.FileNotFoundException: Could not locate swank/
swank__init.class or swank/swank.clj on classpath: (NO_SOURCE_FILE:0)
user=> user=> java.lang.ClassNotFoundExcep
That does look better.
I had trouble with the anonymous func, however. After working it out,
here's what I think the problem is, as well as what I did about it.
~...@body expands the body (which is a list) so that the elements of the
list are represented without the surrounding parens. However,
Of course. I'm not sure what I was thinking. Thank you.
On Oct 9, 7:47 pm, Shawn Hoover wrote:
> On Fri, Oct 9, 2009 at 10:37 PM, Mark Tomko wrote:
> > ; a returns a new similarity function that applies the provided
> > transform function
> > ; before comparing a pair of collections
> > (defn
On Fri, Oct 9, 2009 at 10:37 PM, Mark Tomko wrote:
> ; a returns a new similarity function that applies the provided
> transform function
> ; before comparing a pair of collections
> (defn make-coll-similarity-fn [coll-transform]
> (fn [coll1 coll2] coll-similarity [coll1 coll2 coll-transform]))
Hi,
I am trying to figure out whether I can use GPL'd libraries in my
Clojure project or not.
Am I allowed to distribute unmodified copies of clojure.jar in my MIT
(or other liberally licensed) project?
Am I allowed to distribute and use unmodified copies of GPL'd libs as
jars? I've been told t
Okay, I'm flummoxed. Given the following definition:
(defn make-n-gram-fn [n]
(fn [coll] (map vec (partition n 1 coll
I can do this:
(def bi-gram (make-n-gram-fn 2))
(bi-gram "abc")
([\a \b] [\b \c])
But, if I add the following:
; counts the number of indexes in a pair of collections
If you look into using a database, the graph database Neo4j could be
of interest as well. Some people use it in Clojure and have written
different wrappers for it, see: http://wiki.neo4j.org/content/Clojure
I'm not sure regarding handling this amount of simultaneous threads,
but Neo4j is designed
Hi Eric,
2009/10/9 Eric Thorsen
>
> Laurent,
> In the code analysis section of the article:
>
> http://www.enclojure.org/The+Enclojure+REPLs+%28Not+just+for+Netbeans%21%29#ExampleCodeAnalysis
> It points you to where the bulk of the communications layer is.
>
Thanks. I started to read the artic
I'd tend to code this so that the test was the first form, and then
any number of additional remaining forms become the body, in an
implicit do. Obviously, if you're writing something like this, its
for side effects.
In addition, I'd wrap the body in an annonymous function, defined in a
let, so
Hey all. I'm pretty new to Clojure, and wanted to try my hand at
writing a macro.
'dowhile' is nothing special, but I'd still like to hear any comments/
suggestions you may have.
(defmacro dowhile [body test]
`(do ~body (while ~test ~body)))
A test shows...
(macroexpand-1 '(dowhile (dosync (
Kyle,
> We needed to use xpath at work, and though zip-filter is nice, it
> isn't actually xpath and that's what we wanted in this case - so we
> wrote a little wrapper library to make using xpath from Clojure
> simpler. I've put the library up on github here:
>
> http://github.com/kyleburton/
Hi,
On Fri, Oct 9, 2009 at 7:22 PM, vishy wrote:
>
> I was attempting problem no 4 at projecteuler.net. The solution I came
> up with was http://paste.lisp.org/display/88432
>
> But, it executes very slowly.Why so?
>
Your code:
(use 'clojure.contrib.combinatorics)
(apply max (map (fn [[x y]] (
Hello all,
We needed to use xpath at work, and though zip-filter is nice, it
isn't actually xpath and that's what we wanted in this case - so we
wrote a little wrapper library to make using xpath from Clojure
simpler. I've put the library up on github here:
http://github.com/kyleburton/clj-xp
Hi,
I was attempting problem no 4 at projecteuler.net. The solution I came
up with was http://paste.lisp.org/display/88432
But, it executes very slowly.Why so?
regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Group
I suspect people are looking for the clojure's equivalent of erlang's mnesia.
Which at the moment doesn't exist as far as I know.
On Fri, Oct 9, 2009 at 11:15 AM, Stuart Sierra
wrote:
>
> Honestly, this sounds like a problem for a full-fledged database.
> With Clojure/datalog, you'll need to per
Someone wrote an in-memory tuplespace implmentation in groovy here
http://code.google.com/p/gruple/
I look through it and was trying to compare it against clojure's
various structures for concurrency.
But I'm having a hard time either finding the equivalent, or what
tuplespace would bring to the
Honestly, this sounds like a problem for a full-fledged database.
With Clojure/datalog, you'll need to persist your records to disk
manually. At some point, your thousands of references will start to
look like a mini-database anyway. If you can fit your data into a
relational schema, use that; i
Laurent,
In the code analysis section of the article:
http://www.enclojure.org/The+Enclojure+REPLs+%28Not+just+for+Netbeans%21%29#ExampleCodeAnalysis
It points you to where the bulk of the communications layer is.
I would be interested in what features of the UI pieces you feel are
overlapping wit
Eric, thanks for sharing this !
I hope I'll have time to look at it soon.
One preliminary question please : I understand there is no dependency on
Netbeans, but is there a dependency on a UI fmk at all (you guess why I ask
so: Eclipse uses swt, not swing :).
Thanks,
and keep up the good work !
I've seen talk about socket based REPLs with history etc. and this is
something we have been using in Enclojure for over a year now. I put
some time into updated the docs, provided samples for running REPLs
outside of Netbeans and put together a fairly detailed article about
the REPL archi
Hi,
I'm new to Clojure, and let me first say that I love it! At least I
love the language, but I have some concerns regarding performance:
My first try was to implement a Gauß elemination algorithm for solving
a system of linear equations. Here is the code:
http://www.xenoage.com/extern/zongblo
2009/10/9 tommy c :
>
> I'm trying to translate a java lucene indexer to clojure.
> This java line is bothersome:
> writer = new IndexWriter(dir, new SimpleAnalyzer(), true,
> IndexWriter.MaxFieldLength.UNLIMITED);
MaxFieldLength is an inner class in IndexWriter and UNLIMITED is a
static field
Oh, I guess you also have to import IndexWriter$MaxFieldLength (not sure
though, test with both !) :
(import '(org.apache.lucene.index IndexWriter IndexWriter$MaxFieldLength))
2009/10/9 Laurent PETIT
> Hi, quick answer :
>
> try (IndexWriter$MaxFieldLength/UNLIMITED)
>
>
>
> HTH
>
> --
> Lauren
Hi, quick answer :
try (IndexWriter$MaxFieldLength/UNLIMITED)
HTH
--
Laurent
2009/10/9 tommy c
>
> I'm trying to translate a java lucene indexer to clojure.
> This java line is bothersome:
> writer = new IndexWriter(dir, new SimpleAnalyzer(), true,
> IndexWriter.MaxFieldLength.UNLIMITED);
I'm trying to translate a java lucene indexer to clojure.
This java line is bothersome:
writer = new IndexWriter(dir, new SimpleAnalyzer(), true,
IndexWriter.MaxFieldLength.UNLIMITED);
I'm doing:
(import '(org.apache.lucene.index IndexWriter))
(def index-writer (new IndexWriter dir (new SimpleAn
2009/10/8 John Harrop :
>> java.lang.ClassFormatError: Unknown constant tag 52 in class file
>> queries__init (Trial.clj:0)
>
> Almost certainly, it occurs in some part of the code that works on a class's
> bytecodes either directly on disk or in the form of an unstructured Java
> byte array; hope
Hi,
On Oct 9, 8:49 am, Raoul Duke wrote:
> are there any plans to something along the lines of e.g. having
> autodef be something that can be turned on per-file via some
> expression in the file itself?
The Right Way (ie. the one Rich chose for Clojure) is to use declare
to do forward declarat
Hi,
On Oct 9, 5:37 am, Allen Rohner wrote:
> It was a minor thing actually, I didn't like having to quote "user"
> code, and AFAIK, it's not possible to add a quasiquote as part of a
> macro. i.e. in my code, there is a function (_js) that does the heavy
> lifting, and the macro (js). I couldn'
Hi,
On Oct 9, 5:38 am, Allen Rohner wrote:
> That is a good point. I'm actually not sure why I used type there.
> It's probably a bug. Thanks for pointing it out.
I would leave type here. Then the user can override the emit-function
if he has self-defined types which need special handling for
30 matches
Mail list logo