Re: Improving visibility of clojure-doc.org

2013-02-28 Thread xavriley
With the aim of increasing exposure, have you covered off boring SEO things like having a sitemap.xml and verifying the domain with Webmaster tools? I couldn't find a sitemap, but it does look like the content has been indexed by Google. On another note, I wonder whether it's worth clarifying t

Re: instance? with one argument

2013-02-28 Thread Phillip Lord
Yes, you are right about the lexical binding; I suspect that is less likely to hit people though. I don't know why I keep typing (instance? String) but I've done it a lot. Possibly because I am using a Java API with a lot of very similar classes; by the time I have managed to find out which cla

Re: Improving visibility of clojure-doc.org

2013-02-28 Thread Michael Klishin
2013/2/28 xavriley > On another note, I wonder whether it's worth clarifying the position of > the site in relation to the other Clojure Documentations out there. I've > often thought it's a shame to see http://clojuredocs.org/ fall out of > regular updates. Having an up to date, searchable refer

Re: Improving visibility of clojure-doc.org

2013-02-28 Thread Alan Shaw
The ordinary visitor might be forgiven for expecting that both would be found under someplace like Clojure.org... just a thought. -A On Feb 28, 2013 2:04 AM, "Michael Klishin" wrote: > > 2013/2/28 xavriley > >> On another note, I wonder whether it's worth clarifying the position of >> the site

(def function* ... ???

2013-02-28 Thread Dave Sann
I see cases of * after function names. Can anyone enlighten me as to the specific meaning of this, if any. Is it specific to some clojure uses or more widely employed. thanks Dave -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: (def function* ... ???

2013-02-28 Thread Chris Ford
Sometimes people separate a macro into the macro itself, and a normal function that does the actual work. The normal function often has the same name as the macro but with a * suffix. Chris On 28 February 2013 13:38, Dave Sann wrote: > I see cases of * after function names. > > Can anyone enli

what on earth is happening?

2013-02-28 Thread Jim foo.bar
I've got a project 1. I can /'lein2 repl'/ in it and navigate to any namespace - no problem 2. I can /'lein2 check'/ it and it compiles everything - no problem 3. I can /'lein2 test'/ or /'lein2 test some-namespace'/ and BOOM! - *PROBLEM! * *Exception in thread "main" java.lang.VerifyE

Re: what on earth is happening?

2013-02-28 Thread Dave Sann
Jim, I'm not answering your question here. but the subject you have chosen is not very descriptive of your problem/question/topic. On Friday, 1 March 2013 01:23:22 UTC+11, Jim foo.bar wrote: > > I've got a project > > >1. I can *'lein2 repl'* in it and navigate to any namespace - no >

Re: what on earth is happening?

2013-02-28 Thread Marko Topolnik
Just a general pointer: the bytecode verification that the JVM performs when loading a class has failed. There is a code path through the bytecode of the mentioned method such that it pops more than it pushes (Java bytecode is a stack-oriented machine language). So it makes sense that it blows

Re: defmacro/gen-class/annotation woes

2013-02-28 Thread Michael Willis
Hi Meikel! Thanks for the suggestion. I'll second what Paul said, I'm not sure if I would ever have guessed to syntax quote the metadata map. I just tested it and it works like magic. Cheers, Michael Willis On Thursday, February 28, 2013 12:21:57 AM UTC-7, Meikel Brandmeyer (kotarak) wrote:

Re: what on earth is happening?

2013-02-28 Thread Jim foo.bar
On 28/02/13 14:34, Marko Topolnik wrote: So it makes sense that it blows up only when you try to actually run the code. It doesn't low up when I try to run the code...as I said, I can easily navigate into any namespace from the repl and run any code that I wantso there is no problem compi

Re: what on earth is happening?

2013-02-28 Thread Alex Robbins
Maybe you are already doing this, but as soon as I get into "This doesn't seem possible" territory, I run a "lein clean". That has resolved the problem for me several times. On Thu, Feb 28, 2013 at 9:01 AM, Jim foo.bar wrote: > On 28/02/13 14:34, Marko Topolnik wrote: > > So it makes sense tha

Re: what on earth is happening?

2013-02-28 Thread Jim foo.bar
On 28/02/13 15:12, Alex Robbins wrote: Maybe you are already doing this, but as soon as I get into "This doesn't seem possible" territory, I run a "lein clean". That has resolved the problem for me several times. I've got nothing in "/target"...I am not AOT-compiling anything! I think i found

Re: what on earth is happening?

2013-02-28 Thread Marko Topolnik
Nondeterministic behavior -> suspect race conditions. Maybe compilation was happening concurrently on several threads and the resulting bytecode got mangled. On Thursday, February 28, 2013 4:17:52 PM UTC+1, Jim foo.bar wrote: > > On 28/02/13 15:12, Alex Robbins wrote: > > Maybe you are already

Re: what on earth is happening?

2013-02-28 Thread Jim foo.bar
WOW! Clojure compiles in parallel? I did not know that!!! I didn't even know that was possible since there is a clear class hierarchy that needs to be loaded...I must do some reading... As a side note, I hope you all had a good laugh with my major grammar-error (throwed instead of threw)... he

Re: what on earth is happening?

2013-02-28 Thread Softaddicts
Hi, can you post the JVM used, maybe a snippet of the code around line 68, the dependencies tree (lein deps :tree) and your project.clj ? With these we can probably find the root cause of this. Luc P. > I've got a project > > 1. I can /'lein2 repl'/ in it and navigate to any namespace - n

Re: what on earth is happening?

2013-02-28 Thread Marko Topolnik
I don't have the regular compile-and-load route in mind; this doesn't use concurrency. However if the runtime evaluation of a form results in just-in-time bytecode generation and classloading, I don't see why this couldn't be happening in any thread. Whether any of this could actually result in

Re: what on earth is happening?

2013-02-28 Thread Marko Topolnik
You could also have two independent compile-and-load operations going on in parallel. On Thursday, February 28, 2013 4:37:53 PM UTC+1, Marko Topolnik wrote: > > I don't have the regular compile-and-load route in mind; this doesn't use > concurrency. However if the runtime evaluation of a form re

Re: what on earth is happening?

2013-02-28 Thread Jim foo.bar
On 28/02/13 15:36, Softaddicts wrote: Hi, can you post the JVM used, maybe a snippet of the code around line 68, the dependencies tree (lein deps :tree) and your project.clj ? With these we can probably find the root cause of this. Luc P. Hi Luc, thanks for your interest but I think I've cr

Re: [ANN] clj-nio2 0.1.0

2013-02-28 Thread Hugo Duncan
Hi Jürgen, I was just looking for a nice filesystem watcher! Jürgen Hötzel writes: >- Implementation of * clojure.java.io/Coercions * and * >clojure.java.io/IOFactory* protocols for NIO.2 paths. Does this differ from https://github.com/pjstadig/nio? Hugo -- -- You received this m

Clojure/West - don't miss it!

2013-02-28 Thread Alex Miller
Clojure/West , of course, is the Clojure conference taking place in sunny [1] Portland, OR from March 18-20th. Full schedule: http://clojurewest.org/schedule Registration: http://regonline.com/clojurewest2013 The night before the conference we've rented out Ground Kontrol,

Interesting Light Table post

2013-02-28 Thread Erlis Vidal
Hey guys, this is in the top of Hacker News right now, it looks very nice: http://www.chris-granger.com/2013/02/27/light-table-030-experience/ I was thinking a lot after reading the thread "Why is this so difficult" that maybe what we need is a dedicated IDE, something that's built with the cloj

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-02-28 Thread Rainer Schuster
I had a quick look into nleiningen. I'm not able to bootstrap the build atm. Can't build the ClojureClrEx dep. What I basically did was: git clone https://github.com/aaronc/nleiningen.git git submodules init git submodules update nuget install Nuget.Core -o packages $env:CLOJURE_LOAD_PATH="./src

Re: Interesting Light Table post

2013-02-28 Thread JvJ
LISP SHALL RISE AGAIN! On Thursday, 28 February 2013 11:54:56 UTC-5, Erlis Vidal wrote: > > Hey guys, > > this is in the top of Hacker News right now, it looks very nice: > > http://www.chris-granger.com/2013/02/27/light-table-030-experience/ > > I was thinking a lot after reading the thread "Why

Re: Interesting Light Table post

2013-02-28 Thread JvJ
LISP SHALL RISE AGAIN! -- -- 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

Re: what on earth is happening?

2013-02-28 Thread Jim - FooBar();
I just walked in home, sat on my pc, /git-pull/ (what I pushed 30 min ago), /lein2 repl/, /load-file xxx.clj/ , *BOOM!* CompilerException java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack,

Re: what on earth is happening?

2013-02-28 Thread Softaddicts
Did you try with Java 6 ? I am inclined that your problem is not so much with your code than with one of your java dependencies. Luc P. > I just walked in home, sat on my pc, /git-pull/ (what I pushed 30 min > ago), /lein2 repl/, /load-file xxx.clj/ , *BOOM!* > > CompilerException java.lang.Ve

Re: what on earth is happening?

2013-02-28 Thread Jim - FooBar();
No I did not try Oracle Java6 and it would be a real hassle since it's not even installed...I think I've got openJDK 6 though...hmm I'll poke around with the dependencies of the namespace I'm trying to load see if that changes anything and if it doesn't I'll give openJDK a spin... Clojure seem

Re: what on earth is happening?

2013-02-28 Thread David Nolen
Your run protocol defines three arities, you do not implement all three. Did you try limiting the definition of the run protocol to the two arity case that you are actually implementing? On Thu, Feb 28, 2013 at 9:23 AM, Jim foo.bar wrote: > I've got a project > > >1. I can *'lein2 repl

Re: what on earth is happening?

2013-02-28 Thread Jim - FooBar();
On 28/02/13 17:29, David Nolen wrote: Your run protocol defines three arities, you do not implement all three. what's wrong with that? protocols, unlike interfaces let you do that... Did you try limiting the definition of the run protocol to the two arity case that you are actually implementi

Re: what on earth is happening?

2013-02-28 Thread David Nolen
On Thu, Feb 28, 2013 at 1:00 PM, Jim - FooBar(); wrote: > On 28/02/13 17:29, David Nolen wrote: > >> Your run protocol defines three arities, you do not implement all three. >> > > what's wrong with that? protocols, unlike interfaces let you do that... It's not my understanding that protocols ar

Re: what on earth is happening?

2013-02-28 Thread Jim - FooBar();
not that I have any serious arguments agaisnt what you're saying but this sounds very limiting...where is the power then? what are the chances that you will be able to extend a particular protocol to many types without needing at least 2-3 arities...it's perfectly fine that an exception will be

Re: what on earth is happening?

2013-02-28 Thread Softaddicts
David has something here. I did not pay attention because they were commented in the snippet you posted. I remember playing around with this months ago and dropped it, unexpected and strange behaviours popped out and I did not have time to spend digging into it. We AOT all our code here and even t

Re: what on earth is happening?

2013-02-28 Thread David Nolen
On Thu, Feb 28, 2013 at 1:16 PM, Jim - FooBar(); wrote: > not that I have any serious arguments agaisnt what you're saying but > this sounds very limiting...where is the power then? what are the chances > that you will be able to extend a particular protocol to many types without > needing at lea

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-02-28 Thread Aaron Craelius
Hi Rainer, glad you're checking this out. This code (as I believe I mentioned above) requires a special build of the ClojureCLR compiler (see this github branch https://github.com/aaronc/clojure-clr - I just merged it with the clojure-clr master). I'm going to try to make some effort today to see

Re: what on earth is happening?

2013-02-28 Thread Jim - FooBar();
On 28/02/13 18:16, Softaddicts wrote: We AOT all our code here and even that prove hard to stabilize with multiple arities. doesn't /lein2 check/ do AOT? how else would it be able to emit reflection warnings? If that is the case, I always AOT my code periodically too. In this particualr case le

Re: Improving visibility of clojure-doc.org

2013-02-28 Thread Miguel
I added a link to http://clojure-doc.org in this two wikipedia's pages: http://en.wikipedia.org/wiki/Clojure http://es.wikipedia.org/wiki/Clojure (*see*: external links) Thanks Michael for your site. Is very useful. Miguel -- -- You received this message because you are subscribed to the Go

[ANN] Immutant 0.9.0 released

2013-02-28 Thread Jim Crossley
Hi all, We released Immutant 0.9.0 a few minutes ago, which features a much smaller distribution size, sharing caches with TorqueBox, a friendlier API for scheduling recurring jobs, and more stuff described here: http://bit.ly/immutant090 Toby and I will be at Clojure/West, I think doing an unses

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-02-28 Thread Aaron
Hi David, I finally got around to creating patches for my commits and opened these two JIRA issues on them: http://dev.clojure.org/jira/browse/CLJCLR-7 http://dev.clojure.org/jira/browse/CLJCLR-8 I have more stuff, but let's start with this. Aaron On Monday, December 17, 2012 4:14:16 PM UTC-5

Re: [ANN] clj-nio2 0.1.0

2013-02-28 Thread Jürgen Hötzel
Hi Hugo, On Thursday, February 28, 2013 5:11:57 PM UTC+1, Hugo Duncan wrote: > > > Hi Jürgen, > > I was just looking for a nice filesystem watcher! > > Jürgen Hötzel > writes: > > >- Implementation of * clojure.java.io/Coercions * and * > >clojure.java.io/IOFactory* protocols for NIO.

Re: what on earth is happening?

2013-02-28 Thread Softaddicts
I meant executing the AOT code not just checking it from time to time. In the REPL you can redefine stuff on the fly but it does garantee that it's all coherent at a given time. > On 28/02/13 18:16, Softaddicts wrote: > > We AOT all our code here and even that prove hard > > to stabilize wit

Clojure equivalents of .indexOf .lastIndexOf

2013-02-28 Thread Irakli Gozalishvili
Hi, I was looking at http://clojure.org/cheatsheet to find something I could use for getting an index of specific item in the string / vector. It looks like `.indexOf` / `.lastIndexOf (http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#lastIndexOf%28java.lang.String%29)` are offici

Adding string support to `split`

2013-02-28 Thread Irakli Gozalishvili
At the moment `split (http://clojuredocs.org/clojure_core/clojure.string/split)` only accepts regexps as delimiter argument. Is it reasonable to add support for string type delimiters ? That has potential to be a lot faster on JS backend ? And I have bunch of cases where what I really need is s

contains? for vectors

2013-02-28 Thread Irakli Gozalishvili
Hi, Function contains? (http://clojuredocs.org/clojure_core/clojure.core/contains_q) returns true if key is present in the given collection, although arguably on some data structures one would expect behaviour to be different. In fact it's already different on sets: (contains? #{:a :b :c} :a

converting an xml database backup to insert statements

2013-02-28 Thread Peter Buckley
Preamble: I've read some about xml and clojure, and done some mostly trivial things (reading and writing values from and to xml). Most of the examples I've seen of parse, zip, etc are very elegant and do a great job at reading a specific x-path-like value or series of values. But I'm stuck trying

Re: contains? for vectors

2013-02-28 Thread AtKaaZ
=> *(contains? '(1 2 3) 1)* IllegalArgumentException contains? not supported on type: clojure.lang.PersistentList clojure.lang.RT.contains (RT.java:724) => **clojure-version** {:major 1, :minor 5, :incremental 0, :qualifier "RC17"} => *(contains? "foo" "o")* IllegalArgumentException contains? n

Re: contains? for vectors

2013-02-28 Thread AtKaaZ
On Thu, Feb 28, 2013 at 11:23 PM, AtKaaZ wrote: > => *(contains? '(1 2 3) 1)* > IllegalArgumentException contains? not supported on type: > clojure.lang.PersistentList clojure.lang.RT.contains (RT.java:724) > > => **clojure-version** > {:major 1, :minor 5, :incremental 0, :qualifier "RC17"} > >

Re: contains? for vectors

2013-02-28 Thread AtKaaZ
by errors I mean bugs On Thu, Feb 28, 2013 at 11:43 PM, AtKaaZ wrote: > > > > On Thu, Feb 28, 2013 at 11:23 PM, AtKaaZ wrote: > >> => *(contains? '(1 2 3) 1)* >> IllegalArgumentException contains? not supported on type: >> clojure.lang.PersistentList clojure.lang.RT.contains (RT.java:724) >>

Re: contains? for vectors

2013-02-28 Thread Michael Gardner
This is a sore spot that has been discussed many times on this list[1]. The short version is that many people agree that the name "contains?" is misleading to newcomers, but according to Rich it's not changing any time soon[2]. What you want for linear searches is 'some (as mentioned in the doc

Re: contains? for vectors

2013-02-28 Thread AtKaaZ
On Thu, Feb 28, 2013 at 11:59 PM, Michael Gardner wrote: > This is a sore spot that has been discussed many times on this list[1]. > The short version is that many people agree that the name "contains?" is > misleading to newcomers, but according to Rich it's not changing any time > soon[2]. What

Re: Clojure Performance For Expensive Algorithms

2013-02-28 Thread Geo
I didn't know reduce could be short circuited! I assume from the code below this is done calling the function reduced? Is this in Clojure 1.5 only and is where is this documented? On Wednesday, February 27, 2013 4:59:33 AM UTC-5, Christophe Grand wrote: > > > On Wed, Feb 27, 2013 at 10:21 AM, Ma

Re: contains? for vectors

2013-02-28 Thread Irakli Gozalishvili
Thanks Michael, This links are helpful. As far as I can see nothing like contains-val? or seq-contains? has being added though :( I'm trying to use cljs for performance sensitive code and high order functions like `some` don't really do it, while indexOf on strings in JS are well optimised by en

Re: Clojure equivalents of .indexOf .lastIndexOf

2013-02-28 Thread Andy Fingerhut
Although the cheat sheet is hosted on clojure.org, I'd hesitate a bit in inferring from its contents that .indexOf and .lastIndexOf are officially suggested options. More precise would be to say that when I was updating the cheatsheet a year ago to add many things that weren't already on there,

ANN: Shoreleave 0.3.0

2013-02-28 Thread Paul deGrandis
Shoreleave is a collection of integrated libraries for building ClojureScript applications that focuses on: * Security * Idiomatic interfaces * Common client-side strategies * HTML5 capabilities * ClojureScript's advantages Version 0.3.0 has been released across all modules. There is also a

Re: ANN: lein-clr 0.2.0 for ClojureCLR

2013-02-28 Thread Aaron
Rainer, I've pushed some updates to nleiningen. Be sure you do a git submodule update first. There is now a Bootstrap project that you can build from VS 2010 - enable Nuget package restore on it first and then try building. There is a private nuget package for Clojure.dll that it pulls. The

In order to get java-like performance, one needs to write java-like code first?

2013-02-28 Thread yizhen wei
I just start learning clojure recently. So I was looking for some performance related post on the internet, and found some optimization tips, "fast" clojure code and so on. Which lead to the question above. It seems like most of the time we have to write longer, more java-like code (which I fo

Re: In order to get java-like performance, one needs to write java-like code first?

2013-02-28 Thread Dave Sann
Performance at doing what? why? what are your requirements and what is important to you? Your question is simple but can generate extensive debate. Don't expect a yes/no answer. See this extensive discussion and examples: https://groups.google.com/d/topic/clojure/byHO-9t6X4U/discussion it's f

Re: Interesting Light Table post

2013-02-28 Thread Daniel
The out-of-the-box leiningen support is reason enough to give it a serious try...especially for newcomers to Clojure. On Thursday, February 28, 2013 10:54:56 AM UTC-6, Erlis Vidal wrote: > > Hey guys, > > this is in the top of Hacker News right now, it looks very nice: > > http://www.chris-grang

Re: contains? for vectors

2013-02-28 Thread Tassilo Horn
Irakli Gozalishvili writes: > Maybe something else can be considered like `includes?` to do that > instead ? Also Rich says no better name was suggest for includes?, I > think `has?` would have being a lot better name. Don't know if it > makes sense to reply to that post at this point. I think