Re: Clojure & CEDET?

2011-03-07 Thread Konrad Hinsen
On 8 Mar 2011, at 02:44, Fred Concklin wrote: Just wondering if anybody uses CEDET with clojure or anybody would be interested in clojure language support for smart code completion. I use Clojure, and I use CEDET (not just for Clojure), and I'd certainly like to have code completion for Cloj

Re: Are there sets that keep the insertion order?

2011-03-07 Thread Justin Kramer
https://github.com/ninjudd/ordered-set Justin On Mar 7, 1:14 pm, Tassilo Horn wrote: > Hello all, > > does clojure have sets that keep the insertion order, like Java's > LinkedHashSet? > > Currently, I use lazy vectors in conjunction with `distinct', but that > seems to perform not too well. > >

Re: Clojure CLR ISeq IEnumerable

2011-03-07 Thread dmiller
I hesitate to modify the inheritance structure of Clojure's interfaces. ClojureCLR does follow ClojureJVM in providing support for these interfaces in the abstract base classes underlying things such as PersistentTreeMap. In ClojureCLR 1.3-alpha: public class PersistentTreeMap : APersistentMap, I

Re: Clojure *compile-path* not set properly

2011-03-07 Thread Armando Blancas
Oops -- I got the class and compile paths mixed up. But I wonder why that worked in the OP. On Mar 7, 6:27 pm, Stuart Sierra wrote: > The Java system property "clojure.compile.path" is the directory where the > Clojure compiler will write out .class files.  It should be one directory > name, not

Re: overriding keyword behavior?

2011-03-07 Thread Ken Wesson
On Mon, Mar 7, 2011 at 9:34 PM, Stuart Sierra wrote: > Yes, something like tonyl's code will work. OH RLY? # -- 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 memb

Re: overriding keyword behavior?

2011-03-07 Thread Stuart Sierra
Yes, something like tonyl's code will work. -S -- 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

Re: 1.3 (inc alpha4)?

2011-03-07 Thread Stuart Sierra
JIRA Release.Next means the final release of what is currently called 1.3.0-alpha*. More general information is available on the wiki: http://dev.clojure.org/display/design/Release.Next+Planning Currently the Clojure/core team is trying to get this release ready for beta. Some open bugs need

Re: Clojure *compile-path* not set properly

2011-03-07 Thread Stuart Sierra
The Java system property "clojure.compile.path" is the directory where the Clojure compiler will write out .class files. It should be one directory name, not a list. When Clojure starts, it sets the Var *compile-path* to the value of the Java system property. The default is the directory nam

Re: overriding keyword behavior?

2011-03-07 Thread tonyl
I little redundant but looking now at the source code in Keyword.java the Keyword class extends IFn, Comparable, Named, and Serializable; they are all java that you could extend. But I am not sure how the keyword lookup system works, haven't look into it. Just something that might help. On Mar 6,

Re: overriding keyword behavior?

2011-03-07 Thread tonyl
I haven't tested it or anything, but you can use: (extend-type java.util.Properties ILookup (valAt [this key] ...) (valAt [this key not-found] ...)) AFAIK you can extend on Interfaces but not Abstracts or Classes. On Mar 6, 9:27 pm, kurtharriger wrote: > I was curious if it was possi

Clojure & CEDET?

2011-03-07 Thread Fred Concklin
Just wondering if anybody uses CEDET with clojure or anybody would be interested in clojure language support for smart code completion. http://cedet.sourceforge.net/ fpc -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Clojure CLR ISeq IEnumerable

2011-03-07 Thread Timothy Pratley
Feature request: It would be handy for ISeq to inherit IEnumerable. My use case is wanting to expose an IEnumerable "Values" from a Clojure IPersistentMap (vals ) call Currently I can do it easily enough by casting to PersistentTreeMap which has a .Values implementation, but I suspect there is prob

Re: Clojure *compile-path* not set properly

2011-03-07 Thread Armando Blancas
That's the default. You'd usually use the sys env clojure.compile.path for the repl (on windows): >java -Dclojure.compile.path=".;src;classes" -cp clojure.jar clojure.main Clojure 1.2.0 user=> *compile-path* ".;src;classes" On Mar 6, 5:32 pm, MC Andre wrote: > Clojure can't find and compile my

Re: Summer of Code 2011

2011-03-07 Thread Armando Blancas
You're not missing anything. In a lisp DSL, the L is a figure of speech, for it's still lisp. Sure, lisp libraries can have great ease and convenience as if they came with the language, but it won't be a different language altogether --i.e., something that it ain't lisp. Last year I wrote a little

having trouble with http.async.client

2011-03-07 Thread Kevin Archie
I'm trying to use http.async.client to do a PUT request (where I don't care about the response) and my code is hanging -- apparently after succesfully completing the PUT, from the server's perspective. This isn't quite what I'm doing, but exhibits the same behavior: (require '[http.async.client :

Re: Are there sets that keep the insertion order?

2011-03-07 Thread Tassilo Horn
Ken Wesson writes: Hi Ken, >> does clojure have sets that keep the insertion order, like Java's >> LinkedHashSet? > > Try something like: > > (deftype OrderPreservingSet [v m s] > [...] Great, I'll try that tomorrow. > It should be substitutable for a normal set in Clojure code, but it > seqs

Re: Summer of Code 2011

2011-03-07 Thread Chas Emerick
On Mar 7, 2011, at 11:08 AM, Ken Wesson wrote: >>> On Sun, Mar 6, 2011 at 11:00 AM, Chas Emerick wrote: Rather than enumerate the places where sexprs are sub-optimal, it would save a *lot* of time to simply point out that: (a) Every general-purpose programming language nota

Re: Summer of Code 2011

2011-03-07 Thread Ken Wesson
On Mon, Mar 7, 2011 at 1:56 PM, Timothy Baldridge wrote: >>...because they are easier to parse by the human brain. > > You keep saying that, and I don't think I agree. They may be easier to > parse for western culture due to the hundreds of years of our brains > being presented with data in that f

Re: Summer of Code 2011

2011-03-07 Thread Ken Wesson
On Mon, Mar 7, 2011 at 1:48 PM, Meikel Brandmeyer wrote: > Hi, > > Am 07.03.2011 um 17:08 schrieb Ken Wesson: > >> Bzzzt, sorry. Their choice seems as arbitrary as any other, much of >> the time. Ask yourself this: if aliens from another planet are at >> about the same level of development as us,

Re: Are there sets that keep the insertion order?

2011-03-07 Thread Ken Wesson
On Mon, Mar 7, 2011 at 1:14 PM, Tassilo Horn wrote: > Hello all, > > does clojure have sets that keep the insertion order, like Java's > LinkedHashSet? > > Currently, I use lazy vectors in conjunction with `distinct', but that > seems to perform not too well. > > Bye, > Tassilo Try something like

Clojure *compile-path* not set properly

2011-03-07 Thread MC Andre
Clojure can't find and compile my scripts unless I augment the compile path. Specs: Clojure 1.2.0 MacPorts 1.9.2 Mac OS X 10.6.6 $ cat hello.clj #!/usr/bin/env clj (ns hello) (println "Hello World!") $ clj hello.clj Hello World! $ clj Clojure 1.2.0 user=> (compile 'hello) Hello World! java.io.I

Re: Web/Screenscraping Library?

2011-03-07 Thread Ambrose Bonnaire-Sergeant
If the website serves RDF, you can use Plaza https://github.com/antoniogarrote/clj-plaza Just from a casual browse of UM Online LIbrary, some of their pages are in RDFa. Ambrose On Mon, Mar 7, 2011 at 12:48 AM, Jonathan Mitchem wrote: > Are there any

Re: Web/Screenscraping Library?

2011-03-07 Thread Ambrose B
If the website serves RDF, you can use Plaza https://github.com/antoniogarrote/clj-plaza Just from a casual browse of UM Online LIbrary, some of their pages are in RDFa. Ambrose -- You received this message because you are subscribed to the Google Gr

overriding keyword behavior?

2011-03-07 Thread kurtharriger
I was curious if it was possible to extend keyword lookup behavior to additional types, such as java.util.Properties. Currently I just convert java.util.properties into a keyword map with something such as the following. (defn as-keyword-map [prop] (into {} (for [[k v] prop] [(keyword k) v])))

Re: Summer of Code 2011

2011-03-07 Thread Timothy Baldridge
>...because they are easier to parse by the human brain. You keep saying that, and I don't think I agree. They may be easier to parse for western culture due to the hundreds of years of our brains being presented with data in that format. What's to say that s-expressions wouldn't be easier to unde

await-for returning false, not nil

2011-03-07 Thread Ben Gladwell
I'm using clojure 1.2.0. According to the await-for doc string, it should return nil when returning because of a timeout. But in all my tests, it returns false (and true when returning because the agent is done). For example: (defn sleep [_ n] (println (format "Sleeping for %d seconds" (* n 1

Re: Implementing "ClojureScript" - command-line/sys-admin scripting with Clojure

2011-03-07 Thread icylisper
I had been working on a tool that provides a persistent JVM for command line applications. It is called jark. It does not compete with any of the clojure build tools(lein, cljr), but cleanly integrates with them. You can find more about it here: http://icylisper.in/clojure/jark.html I am yet to m

ANN: jark - tool to run clojure programs on a persistent JVM

2011-03-07 Thread icylisper
Startup time of the Java Virtual Machine(JVM) is too slow and thereby command-line applications on the JVM are sluggish and very painful to use. And there is no existing simple way for multiple clients to access the same instance of the JVM. Jark is an attempt to run the JVM as a daemon and suppor

Re: Summer of Code 2011

2011-03-07 Thread Meikel Brandmeyer
Hi, Am 07.03.2011 um 17:08 schrieb Ken Wesson: > Bzzzt, sorry. Their choice seems as arbitrary as any other, much of > the time. Ask yourself this: if aliens from another planet are at > about the same level of development as us, are they likely to be using > the same or a closely similar notatio

Are there sets that keep the insertion order?

2011-03-07 Thread Tassilo Horn
Hello all, does clojure have sets that keep the insertion order, like Java's LinkedHashSet? Currently, I use lazy vectors in conjunction with `distinct', but that seems to perform not too well. Bye, Tassilo -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: A multiple-inheritance prototype system

2011-03-07 Thread icemaze
> It looks like you're trying to group together different functionality > in one place. Idiomatic Clojure tends to encourage separating > functionality out into independent components. Thanks for the tip. My system doesn't provide validation, it just differentiates between "nil" and "undefined but

Re: Summer of Code 2011

2011-03-07 Thread Ken Wesson
On Mon, Mar 7, 2011 at 8:40 AM, Chas Emerick wrote: > > On Mar 6, 2011, at 11:53 AM, Ken Wesson wrote: > >> On Sun, Mar 6, 2011 at 11:00 AM, Chas Emerick wrote: >>> Rather than enumerate the places where sexprs are sub-optimal, it would >>> save a *lot* of time to simply point out that: >>> >>>

Re: A multiple-inheritance prototype system

2011-03-07 Thread James Reeves
On 7 March 2011 14:05, icemaze wrote: > 1) Was this necessary at all? Can my requirements be fulfilled with > off-the-shelf clojure libraries or components? Requirements include > the ability to merge objects as shown below. It looks like you're trying to group together different functionality in

Re: Serialising functions...

2011-03-07 Thread Michael Wood
On 5 March 2011 18:02, Christopher Brown wrote: > Sorry for not explaining L2 in my original response. > The tuple of is not guaranteed to be unique either, but > we're approaching crazy-town with the probabilities. > This tuple fails in a way analogous to the L2 MAC addr problem. Yes, that's w

A multiple-inheritance prototype system

2011-03-07 Thread icemaze
Hi clojure developers! I recently wrote an alternative datatype system for a project of mine, because requirements were a little odd and I couldn't find anything appropriate. My questions are: 1) Was this necessary at all? Can my requirements be fulfilled with off-the-shelf clojure libraries or c

Re: Summer of Code 2011

2011-03-07 Thread Chas Emerick
On Mar 6, 2011, at 11:53 AM, Ken Wesson wrote: > On Sun, Mar 6, 2011 at 11:00 AM, Chas Emerick wrote: >> Rather than enumerate the places where sexprs are sub-optimal, it would save >> a *lot* of time to simply point out that: >> >> (a) Every general-purpose programming language notation is a

Re: Clojure on JS VMs

2011-03-07 Thread James Sofra
This seems a little more up-to-date than clojurescript. https://github.com/zkim/cljs It is not complete (the author calls it clojure(ish)) but still seems pretty nice. -James S -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,