On 3 June 2015 at 20:48, Elric Erkose elric.erk...@gmail.com wrote:
The doc string for clojure.java.io/resource states that it returns a URL.
When an invalid file is passed as the only parameter, it returns nil.
Shouldn't we expect an Exception?
user= (clojure.java.io/resource no-such-file)
The issue was that I hadn't removed the dependencies from the toplevel
vector. Thanks to Jeremy Heiler for pointing that out.
On Wednesday, June 3, 2015 at 12:35:30 PM UTC-7, Scott Klarenbach wrote:
I'm unable to post a new topic to the leinigen group so I thought I'd try
my luck here.
@james Sounds reasonable, though it may not be consistent (or I'm missing
your point).
user= (get {:a 1} :no-such-file)
nil
user= (get {:a 1} nil)
nil
Compared with
user= (clojure.java.io/resource no-such-file)
nil
user= (clojure.java.io/resource nil)
NullPointerException
This is a bad idea, but you can extend IOFactory to nil within your own
programs:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/java/io.clj#L182
to return your nullreader.
On Wed, Jun 3, 2015 at 3:28 PM Elric Erkose elric.erk...@gmail.com wrote:
@tassilo Your concern could be
Possibly you are also including the dependencies in the non-profile part of
the project.clj? You shouldn't: the :provided profile is normally included,
but excluded when running the uberjar task.
More concrete example:
(defproject myproj 0.1.0
:dependencies [[org.clojure/clojure 1.6.0]] ;;
The doc string for clojure.java.io/resource states that it returns a URL.
When an invalid file is passed as the only parameter, it returns nil.
Shouldn't we expect an Exception?
user= (clojure.java.io/resource no-such-file)
nil
--
You received this message because you are subscribed to the
Unofficial answer from the sidelines. I am in no way associated with the
folks who make decisions like this, other than that some of them know my
name.
Throwing an exception in that case sounds like reasonable behavior to me,
but of course any code written now that uses clojure.java.io/resource
@tassilo Your concern could be addressed with a NullReader
user= (defn NullReader []
(proxy [java.io.Reader] []
(close [] nil)
(read [a b c] -1)))
#'user/NullReader
user= (slurp (NullReader))
However, this does not resolve my question because is not nil. Even
@gary Agreed, bad idea.
--
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
I'm unable to post a new topic to the leinigen group so I thought I'd try
my luck here.
I'd like to exclude certain dependencies from my uberjar, by using the
:provided profile, but the jars are always included.
I've added the following to my project.clj, but the edu.stanford.nlp jars
end
Scott Klarenbach doyouunderst...@gmail.com writes:
I'd like to exclude certain dependencies from my uberjar, by using the
:provided profile, but the jars are always included.
I believe the problem you’re seeing is due to the fact that Leiningen
doesn’t quite think about dependency `scope` the
Am Donnerstag, 4. Juni 2015 00:10:33 UTC+9 schrieb Marshall
Bockrath-Vandegrift:
Richard Möhn richar...@posteo.de javascript: writes:
How do I remove from a nested datastructure the objects whose (pr obj)
representation doesn't comply with the EDN specification? Fx,
{:a 1 :b
Without reading or thinking about this deeply, I did want to mention the
existing ticket http://dev.clojure.org/jira/browse/CLJ-1210 which seems
like it's in the ballpark of this.
On Wednesday, June 3, 2015 at 1:48:15 PM UTC-6, Elric Erkose wrote:
The doc string for clojure.java.io/resource
Just to provide slightly more info, that change was made because of this
ticket: http://dev.clojure.org/jira/browse/CLJ-1169
Andy
On Wed, Jun 3, 2015 at 6:34 AM, Mike Rodriguez mjr4...@gmail.com wrote:
Sorry for the delay in getting back with a response to this. I think it
is fairly clear in
Removing Java 6 would affect clojure for android projects wouldn't it?
On Wednesday, June 3, 2015 at 9:34:07 AM UTC-4, Mike Rodriguez wrote:
Sorry for the delay in getting back with a response to this. I think it
is fairly clear in the Clojure Compiler that there is an exception that
will
The docstring is vague about the failure modes, but it drops a clue: Use
[sic] the context class loader
if no loader is specified. The Javadoc for ClassLoader.getResource says
it returns null if the resource could not be found or the invoker doesn't
have adequate privileges to get the
2015-06-02 23:57 GMT+02:00 Daniel Compton daniel.compton.li...@gmail.com:
On the Reader Conditionals
http://dev.clojure.org/display/design/Reader+Conditionals dev
discussion page at one part it talks about exception handling:
Exception handling, catching all - see issue below on why this is
Happy to announce Quil 2.2.6 release.
Quil is a Clojure/ClojureScript library for creating interactive drawings
and animations. Github repo https://github.com/quil/quil.
The release available on clojars: https://clojars.org/quil. Changes:
- Fix bug with hex colours. Issue #71
Sorry for the delay in getting back with a response to this. I think it is
fairly clear in the Clojure Compiler that there is an exception that will
wrap errors that occur during macroexpansion now.
Around
here
Hello again!
Well, it has been well over a week already. I appreciate the answers and
works by the people who suggested the workarounds and the benign question
about the version of Clojure we are using from the dev team. While the
proposed workarounds are interesting in themselves and their
Have you considered registering custom URL scheme handlers? That's an
available point of extension at JVM process-level. It should be possible
(though I don't know how painful) to implement custom URL connections that
grab from anywhere:
How would I get this to work?
project
...
repositories
repository
idsnapshots-repo/id
urlhttps://oss.sonatype.org/content/repositories/snapshots/url
releasesenabledfalse/enabled/releases
snapshotsenabledtrue/enabled/snapshots
Richard Möhn richard.mo...@posteo.de writes:
How do I remove from a nested datastructure the objects whose (pr obj)
representation doesn't comply with the EDN specification? Fx,
{:a 1 :b (find-ns 'user)} → {:a 1}
Or, easier, how do I just not print these objects?
Additionally/alternatively
I tried this but it did not work...
:dependencies [[org.clojure/clojure 1.6.0]
[edu.cmu.sphinx/sphinx4-core 1.0-SNAPSHOT]
[edu.cmu.sphinx/sphinx4-data 1.0-SNAPSHOT]]
:repositories {snapshots-repo
https://oss.sonatype.org/content/repositories/snapshots})
On
Try:
:repositories [[... url]]
-Steve
--
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
This is what I ran into with (slurp nil) actually (slurp
(clojure.java.io/resource some-file))
--
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
On Tuesday, June 2, 2015 at 11:16:49 PM UTC-5, Steven Yi wrote:
As a side note, as an experiment I just tried overriding Object.equals
and Object.hashCode with a defrecord, and I got a compiler error:
CompilerException java.lang.ClassFormatError: Duplicate method
namesignature in class
s/Ivan/Mike Rodriguez/ sorry :)
On Wednesday, June 3, 2015 at 8:19:40 PM UTC-6, Alex Miller wrote:
Thanks Ivan and Andy, I'd appreciate a ticket in jira if only to consider
this again before release.
Thank goodness Stu H screened that one so I can blame him. ;)
On Wednesday, June 3,
Thanks Ivan and Andy, I'd appreciate a ticket in jira if only to consider
this again before release.
Thank goodness Stu H screened that one so I can blame him. ;)
On Wednesday, June 3, 2015 at 4:00:35 PM UTC-6, Andy Fingerhut wrote:
Just to provide slightly more info, that change was made
This is the kind of thing that would be considered before making the
decision. But it's coming eventually.
On Wednesday, June 3, 2015 at 3:32:15 PM UTC-6, Ivan L wrote:
Removing Java 6 would affect clojure for android projects wouldn't it?
--
You received this message because you are
Hi all,
I have started a crowdfunding campaign
https://www.indiegogo.com/projects/typed-clojure-from-optional-to-gradual-typing/x/4545030#/story
to add real Gradual Typing to Typed Clojure. This work will result in
more robust interactions with code checked with core.typed, and better
integration
31 matches
Mail list logo