Here's something that could be clearer (it wasn't obvious to me that something
like addition would cause a null pointer exception):
user= (+ 1 nil)
java.lang.NullPointerException (NO_SOURCE_FILE:0)
Sam
---
http://sam.aaron.name
On 8 Feb 2011, at 14:01, Stuart Halloway wrote:
This
On 2 March 2011 09:32, Alan a...@malloys.org wrote:
'(apply + 1 1) would be how you create a list of those symbols.
('apply + 1 1) says call the function 'apply with the arguments of +
1 and 1.
Note that this will still break at runtime because Integers are not seqable. :-)
You probably want
'(apply + 1 1) would be how you create a list of those symbols.
('apply + 1 1) says call the function 'apply with the arguments of +
1 and 1.
On Mar 1, 8:37 pm, Mark markaddle...@gmail.com wrote:
I found the problem:
('apply + 1 1)
I understand why this won't work if I tried to eval the list,
On Wed, Mar 2, 2011 at 3:32 AM, Alan a...@malloys.org wrote:
'(apply + 1 1) would be how you create a list of those symbols.
Or (list 'apply '+ 1 1) or `(apply + 1 1), both of which allow you to
put something variable in there, like (list 'apply '+ 1 x) or `(apply
+ 1 ~x).
--
You received this
Thanks!
On Mar 2, 5:19 am, Ken Wesson kwess...@gmail.com wrote:
On Wed, Mar 2, 2011 at 3:32 AM, Alan a...@malloys.org wrote:
'(apply + 1 1) would be how you create a list of those symbols.
Or (list 'apply '+ 1 1) or `(apply + 1 1), both of which allow you to
put something variable in there,
I found the problem:
('apply + 1 1)
I understand why this won't work if I tried to eval the list, but I
don't understand why I can't create a list of these symbols.
On Feb 28, 9:06 am, Brian Marick mar...@exampler.com wrote:
On Feb 27, 2011, at 2:33 PM, Mark wrote:
With a fresh brain (and a
On Feb 27, 2011, at 2:33 PM, Mark wrote:
With a fresh brain (and a fresh cup of coffee), I realized this
message is probably caused (somehow) by my misuse of the midje
library. No doubt it does fancy macro stuff under-the-hood.
Indeed it does.
One could certainly argue that the
macro
I get this:
#CompilerException java.lang.IllegalArgumentException: Wrong number
of args (3) passed to: Symbol (C:\Users\addma03\workspace\test\src\main
\clojure:1)
A few suggestions:
1) An improved line number
2) I'd like to see the value of the Symbol
3) I'd like to see the three args applies
On Sat, Feb 26, 2011 at 8:14 PM, Mark markaddle...@gmail.com wrote:
I get this:
#CompilerException java.lang.IllegalArgumentException: Wrong number
of args (3) passed to: Symbol (C:\Users\addma03\workspace\test\src\main
\clojure:1)
A few suggestions:
1) An improved line number
2) I'd like
On Sun, Feb 27, 2011 at 2:10 PM, Ken Wesson kwess...@gmail.com wrote:
On Sat, Feb 26, 2011 at 8:14 PM, Mark markaddle...@gmail.com wrote:
I get this:
#CompilerException java.lang.IllegalArgumentException: Wrong number
of args (3) passed to: Symbol (C:\Users\addma03\workspace\test\src\main
I wrote that up quickly without thinking much about it. Yes, the
invocation is definitely a macro and not a function. Still, I think
it would be helpful to see the symbol's value and, if possible, the
macro's arity.
On Feb 27, 1:13 pm, Ken Wesson kwess...@gmail.com wrote:
On Sun, Feb 27, 2011
On 27 February 2011 20:50, Mark markaddle...@gmail.com wrote:
I wrote that up quickly without thinking much about it. Yes, the
invocation is definitely a macro and not a function. Still, I think
it would be helpful to see the symbol's value and, if possible, the
macro's arity.
Is calling
With a fresh brain (and a fresh cup of coffee), I realized this
message is probably caused (somehow) by my misuse of the midje
library. No doubt it does fancy macro stuff under-the-hood.
At the core of this problem is that I'm a naive client of this macro
library and by an innocent misuse, I am
Here's one:
user= {:a 1 :b}
#CompilerException java.lang.ArrayIndexOutOfBoundsException (REPL:3)
Instead how about a parse error exception that specifically says
something like, Map literal requires an even number of forms.
Thanks,
Jeff
Fixed in master today:
On Tue, Feb 08, 2011 at 09:01:38AM -0500, Stuart Halloway wrote:
Please let us know when you get a misleading error message from a
macroexpansion, so we can make it better. Or contribute a patch along the
lines
of [2].
Here's another error message that really threw me off for a while.
I
On Tue, Feb 08, 2011 at 09:01:38AM -0500, Stuart Halloway wrote:
Please let us know when you get a misleading error message from a
macroexpansion, so we can make it better. Or contribute a patch along the
lines
of [2].
Here's a misleading lack of an error message:
(defn foo [x]
On Mon, Feb 14, 2011 at 5:48 AM, Timo Mihaljov noid@gmail.com wrote:
On Tue, Feb 08, 2011 at 09:01:38AM -0500, Stuart Halloway wrote:
Please let us know when you get a misleading error message from a
macroexpansion, so we can make it better. Or contribute a patch along the
lines
of [2].
Hello.
There is an interesting model about error reporting: Clang, one of
C-family languages compiler which uses LLVM.
For example, if you mistake names, Clang searches similar names which
really exist in current environment.
And then Clang illustrates line, column and actual code.
If you want to
Here's one:
user= {:a 1 :b}
#CompilerException java.lang.ArrayIndexOutOfBoundsException (REPL:3)
Instead how about a parse error exception that specifically says
something like, Map literal requires an even number of forms.
Thanks,
Jeff
On Feb 8, 3:01 pm, Stuart Halloway
On 10 February 2011 21:33, Fogus mefo...@gmail.com wrote:
Additionally, I've always hoped for separate
PreConditionAssertionError and PostConditionAssertionError types, but
keep forgetting to discuss it.
A while ago Stuart Sierra wrote about using typed assertions in unit
testing. One of his
+1 for the assertion macro suggestions (custom messages).
On the topic of stack traces: it's high time Clojure stopped
generating shit like
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.IllegalArgumentException: Don't know how to create ISeq
from: java.lang.Integer
Thanks Hubert, this is exactly what I'm talking about. D. Werner's
recommendation to use a function call for the validation is a good
point, but having a human readable message like this would be the most
clear.
Cheers,
Jeff
On Feb 10, 9:23 pm, Hubert Iwaniuk neo...@kungfoo.pl wrote:
Hi,
Here's an error I just got that could be improved upon. It shows an
error in a file core.clj, but my current project uses many libraries
and there are multiple files named core.clj. How about putting the
full path to the file somewhere so we can jump straight to it?
Thanks,
Jeff
reporting issue: pre and post conditions. They are a great feature
and I'd like to use them more often, but the error messages they
produce are virtually useless in comparison to just writing your own
check with a custom exception. How about having optional error
messages for the
On 10 February 2011 17:05, Jeff Rose ros...@gmail.com wrote:
Sorry for the reply spam, but I've just remembered another error
reporting issue: pre and post conditions. They are a great feature
and I'd like to use them more often, but the error messages they
produce are virtually useless in
Hi,
Jeff correct me if I'm wrong but I think you are after something along the
following lines.
Instead:
(defn f [x] {:pre [(some-fancy-validation x)]} ..)
To have something like this:
(defn f [x] {:pre [^{:msg here goes description of what has not been valid}
(some-fancy-validation x)]} ..)
(defn f [x] {:pre [^{:msg ...} (some-fancy-validation x)]} ..)
That idea (or some variation) is actually kinda nice.
Additionally, I've always hoped for separate
PreConditionAssertionError and PostConditionAssertionError types, but
keep forgetting to discuss it.
--
You received this message
This conversation began on Twitter [1] but I want to continue it on the mailing
list as it may be of broader interest.
The core team is very interested in improving error messages, and relatively
less interested in more code to manipulate stack traces, for the following
reasons:
(1) The
Hello Stuart
One of problem, that sometime arise (at least for me) - errors in code
that is performed lazily - stack trace contains data about point where
it's evaluated, not where it's created:
for example, let look to something like:
I have a function that combines several functions
(defn
On Tue, 2011-02-08 at 09:01 -0500, Stuart Halloway wrote:
This conversation began on Twitter [1] but I want to continue it on
the mailing list as it may be of broader interest.
The core team is very interested in improving error messages, and
relatively less interested in more code to
Please let us know when you get a misleading error message from a
macroexpansion, so we can make it better. Or contribute a patch along the
lines of [2].
What medium is best?
Discussion here on the mailing list is fine, or a JIRA ticket [1]. We follow
both.
Thanks!
Stu
[1]
I have been working on a fork of Clojure to explore what can be done
w.r.t. error messages: https://github.com/qbg/clojure Currently it
fixes a misleading error message generated by (int [5]), it aligns the
IndexOutOfBoundsExceptions with those thrown by the collections
classes, and it explores
32 matches
Mail list logo