[ANN] clj-bosonnlp 0.1.2 release

2015-12-23 Thread m00nlight
clj-bosonnlp is a Chinese natural language processing API wrapper for
BosonNLP (http://bosonnlp.com/)


Github: https://github.com/m00nlight/clj-bosonnlp
Clojars: https://clojars.org/clj-bosonnlp


This release add the new functionality of single document summary API
recently development by BosonNLP. Hope this library can be useful for
people who need to do some stuff with Chinese natural language processing.

Best Regards.

-- 
m00nlight

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: CIDER 0.10 is out!

2015-12-23 Thread Andrea Russo
Fantastic Work!
Thank you very much!

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] modern-cljs - 17th tutorial - REPLing with Enlive

2015-12-23 Thread Andrea Russo
Very nice work! Thank you!

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to signal failure to start in Stuart Sierra's Component lib?

2015-12-23 Thread Stuart Sierra
This is an application design decision that will depend on how you want to 
handle failure in general.

If the application cannot run without being able to start the component, 
then it is appropriate to throw an exception from the component's `start` 
method. This will abort the system start. The component library wraps the 
exception with ex-info containing the component that failed AND the 
complete system so far, including components which were successfully 
started How you want to handle that exception is up to you.

In production, I would handle this by calling System/exit with a non-zero 
status code from my `main` method.

During development, if a component fails to start, it may leave the rest of 
the system in an inconsistent state. This may make it difficult to restart 
the system because of old state from the half-started system. For example, 
a web server may have bound to a socket. Technically you could use the 
system object attached to the exception to clean up the state manually, but 
I usually just restart the REPL.

If the application could continue to operate successfully without that 
component, it's much more complicated. You're on your own here;
the 'component' library doesn't have any functions to help with 
partially-failed systems. 

–S


On Wednesday, December 23, 2015 at 1:42:21 PM UTC-5, fahptv wrote:
>
> If a component discovers it cannot start successfully (e.g. some necessary 
> bit of data is badly formatted), how can it tell the system that it's hosed 
> and therefore all dependents are hosed?
>
> Should it throw an exception to stop everything?
>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANN] data.xml 0.1.0-beta1

2015-12-23 Thread Ryan Senior
data.xml is a Clojure contrib library that parses and emits XML.

Github: https://github.com/clojure/data.xml
Changelog: https://github.com/clojure/data.xml/blob/master/CHANGES.md

Information on updating the dependency is here
.

The key feature of 0.1.0-beta1 is full support for namespaces. XML
namespaces are complex and integrating that in with the data.xml library
required extensive changes to the internals of data.xml. Because of that,
we're releasing this as a beta to hopefully get some feedback on the
namespace support. Docs on using namespaces can be found in the README
.

Huge shout-out to Herwig Hochleitner for doing this work! Namespace support
was an often requested but difficult to implement feature. This fills a big
gap in what the library can support.

-Ryan

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to signal failure to start in Stuart Sierra's Component lib?

2015-12-23 Thread fahptv
If a component discovers it cannot start successfully (e.g. some necessary 
bit of data is badly formatted), how can it tell the system that it's hosed 
and therefore all dependents are hosed?

Should it throw an exception to stop everything?

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ClojureScript compiler says "No such namespace" ?

2015-12-23 Thread fahptv
Noob question -- what am I doing wrong?

   1. lein new mies  hello-world 
   ...builds fine
   2. add the following to project.clj's dependencies, lein deps, builds 
   fine
   1. [com.andrewmcveigh/cljs-time "0.3.14"]
   3. add the following to src/hello_world/core.cljs's :require clause
  1. [com.andrewmcveigh.cljs-time.format :as something]
   
Caused by: clojure.lang.ExceptionInfo: No such namespace: 
com.andrewmcveigh.cljs-time.format, could not locate 
com/andrewmcveigh/cljs_time/format.cljs, 
com/andrewmcveigh/cljs_time/format.cljc, or Closure namespace 
"com.andrewmcveigh.cljs-time.format" {:tag :cljs/analysis-error}


My core.cljs file ns expression looks like this:


(ns hello-world.core
  (:require [clojure.browser.repl :as repl]
[com.andrewmcveigh.cljs-time.format :as f]))

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ClojureScript compiler says "No such namespace" ?

2015-12-23 Thread Stephen Gilardi
The namespace name is not the same as the dep name.

‘require' clauses use namespace names, for example:

[cljs-time.format :as something]

You can get the namespace name from the ns form at the top of its file, e.g., 
https://github.com/andrewmcveigh/cljs-time/blob/master/src/cljs_time/format.cljs#L1
 

 .

—Steve

> On Dec 23, 2015, at 4:27 PM, fah...@gmail.com wrote:
> 
> Noob question -- what am I doing wrong?
> lein new mies  hello-world ...builds fine
> add the following to project.clj's dependencies, lein deps, builds fine
> [com.andrewmcveigh/cljs-time "0.3.14"]
> add the following to src/hello_world/core.cljs's :require clause
> [com.andrewmcveigh.cljs-time.format :as something]
> Caused by: clojure.lang.ExceptionInfo: No such namespace: 
> com.andrewmcveigh.cljs-time.format, could not locate 
> com/andrewmcveigh/cljs_time/format.cljs, 
> com/andrewmcveigh/cljs_time/format.cljc, or Closure namespace 
> "com.andrewmcveigh.cljs-time.format" {:tag :cljs/analysis-error}
> 
> 
> 
> My core.cljs file ns expression looks like this:
> 
> 
> 
> (ns hello-world.core
>   (:require [clojure.browser.repl :as repl]
> [com.andrewmcveigh.cljs-time.format :as f]))
> 
> 
> 
> -- 
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ANN] modern-cljs - 17th tutorial - REPLing with Enlive

2015-12-23 Thread Sven Richter
Hi,

While I appreciate everyones work and also like boots approach to building 
clojure libs I want to remind you that boot still does not work on windows.
Therefore you are excluding every windows user from your tutorial.

I am not sure if I was into clojure as I am today if some of the tutorials 
just would not have worked when I started learning it.

I don't know how many people here are using windows vs linux, also I don't 
want to start an OS war, but I know for sure that there is a lot of 
business developers that are using windows only and by moving more and more 
to boot we are closing a gate here as long as boot does not support windows.

Best Regards,
Sven

Am Sonntag, 20. Dezember 2015 18:47:14 UTC+1 schrieb Magomimmo:
>
> Hi all,
> I just published the 17th tutorial- REPLing with Enlive - of 
> the modern-cljs series.
> It has been realy easy to port the first edition of the tutorial, which 
> was based on leiningen/cljsbuild, to boot build tool (release 4.2.3 at 
> the moment). I'm really impressed by the signal/noise ratio of boot vs. 
> leiningen/cljsbuild and it has been really easy as well to create a TDD 
> environment 
> which includes live coding with the REPL (both a CLJ REPL and a CLJS 
> REPL). There is still room for improvement to better support a tight TDD 
> worflow (i.e. dinamically filter test nameaspaces in the test and the 
> test-cljs tasks). I'm pretty sure the boot community will quickly fix 
> that issue. 
>
> https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-17.md
> HIH
> mimmo
>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Q] default decimal of Clojure is IEEE double, not BigDecimal

2015-12-23 Thread burrownn
Hmm... Okay. Actually, I think I was confused with auto promotion of 
integer types. I was quite impressed that Clojure automatically add 'N' 
when I type big integer like '69487463928746987124659827635827'.
However, I was suprised when I type '6.9487463928746987124659827635827', 
because the result, '6.948746392874699', was truncated. '1e400' and 
'1e-400' was same. I hope '1e400M' and '1e-400M' to be printed, but it was 
just 'Infinity' and '0.0'.
And I was little bit disappointed after I used *' (asterisk-quote) 
function, which automatically promotes integer type. (*' 1e200 1e200) was 
not '1e400M' but 'Infinity'. Why the functions don't cover double type?

...oh, I see. It's the matter of how often 
overflow/underflow/truncation occurs. Double type almost always truncates 
digits so auto-promoting function will be useless. And also, BigDecimal 
doesn't supports division well. For those reason floating point types 
doesn't act like integer types!

Thank everyone for answering!


On Wednesday, December 23, 2015 at 4:47:09 PM UTC+9, Mikera wrote:
>
> I personally think the current approach is right. Most people don't need 
> arbitrary precision decimals, so it makes sense to have the fastest 
> implementation used as the default. This also follows the "principle of 
> least surprise" for people who are coming from other languages.
>
> If someone really wants to use arbitrary precision decimals, they can ask 
> for it explicitly. But it wouldn't make sense to force this (quite 
> significant) overhead on people who don't want them (or don't even realise 
> the difference).
>
> On Tuesday, 22 December 2015 23:47:43 UTC, Gary Fredericks wrote:
>>
>> Am I missing something? I realize doubles are generally faster because of 
>> hardware implementations , but that seems orthogonal from the question of 
>> syntax. I've several times thought idealistically that it could be better 
>> to have the syntaxes switched (to reduce the amount of accidental floating 
>> point use), and the only downsides I know of are A) surprising people 
>> (especially people who think they can divide 2 by 3 without thinking about 
>> it), and B) needing to be more careful when you're trying to use doubles 
>> for performance. Maybe you were referring to B?
>>
>> Of course I do realize it's *way* too late to change it now ☺.
>>
>> Gary
>>
>> On Tuesday, December 22, 2015 at 9:23:43 AM UTC-6, Alex Miller wrote:
>>>
>>> It's done this way for performance.
>>
>>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


gen-class and overriding only 1 (arity-)overloaded method of superclass

2015-12-23 Thread Kurt Sys
When using gen-class and arity-overloaded methods of a superclass seems not 
very obvious, or I am missing something :p.

There's a (java) superclass 'some.Superclass' (which is from a library, so 
I can't change this one):

public abstract class Superclass {
   public void method() {
   }

   public void method(Object something) {
  this.method();
  // other logic
   }
}


I want to extend that base (abstract) class in clojure, using gen-class 
(since the class needs to accessible as a normal Java class). So the first 
thing I did was:

(ns my.namespace
  (:gen-class
   :name "my.namespace.ArityTest"
   :extends some.Superclass
   :prefix "some-")
 )

(defn some-method
  [this]
  (println "1-arity"))


However, this doesn't work: since 'method' is arity-overloaded, when 
calling 
new ArityTest().method(new Object())

I get a ArityException, wrong number of arguments (2).

I suppose this is because I override 'method', so I have to override all 
arities. I'd like to have the 1-arity version to call it's superclass 
method, and I seem to fail at that one. The last attempt is this: get the 
method of the superclass and call that method on 'this':
(ns be.admb.kbf.vertx.shell.test
(:gen-class
  :name "my.namexpace.ArityTest
  :extends some.Superclass
  :prefix "some-")
)


(defn some-method
  ([this]
(println "1-arity"))
  ([this o]
(.invoke (-> this
 (.getClass)
 (.getSuperclass)
 (.getMethod "method"
 (into-array Class [java.lang.Object])))
 this (into-array Object [o]))
))


This fails: it calls the overriden method, not the superclass' method...

So well, how do I override only 1 method of an arity-overloaded method of a 
superclass in Clojure?

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


gen-class: override only 1 method of an arity-overloaded method of a (Java) superclass

2015-12-23 Thread Kurt Sys
When using gen-class and arity-overloaded methods of a superclass seems not 
very obvious, or I am missing something...

There's a (java) superclass 'some.Superclass' (which is from a library, so 
I can't change this one):

public abstract class Superclass {
   public void method() {
   }

   public void method(Object something) {
  this.method();
  // other logic
   }
}


I want to extend that base (abstract) class in clojure, using gen-class 
(since the class needs to accessible as a normal Java class). So the first 
thing I did was:

(ns my.namespace
  (:gen-class
   :name "my.namespace.ArityTest"
   :extends some.Superclass
   :prefix "some-")
 )

(defn some-method
  [this]
  (println "1-arity"))

However, this doesn't work: 'method' is arity-overloaded, when calling 
new ArityTest().method(new Object())

I get a ArityException, wrong number of arguments (2). I suppose this is 
because I override 'method', so I have to override all arities? I'd like to 
have the 1-arity version to call it's superclass method, and I seem to fail 
at that. The last attempt is this: get the method of the superclass and 
call that method on 'this':

(ns be.admb.kbf.vertx.shell.test
(:gen-class
  :name "my.namespace.ArityTest"
  :extends some.Superclass
  :prefix "some-")
)


(defn some-method
  ([this]
(println "1-arity"))
  ([this o]
(.invoke (-> this
 (.getClass)
 (.getSuperclass)
 (.getMethod "method"
 (into-array Class [java.lang.Object])))
 this (into-array Object [o]))
))

This fails: it calls the overriden method, not the superclass' method... 
(and the method keeps on calling itself).

The question: how do I override only 1 method of an arity-overloaded method 
of a superclass in Clojure (using gen-class to generate a Java class)?

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.