But how do you get rid of the (NO_SOURCE_FILE:0) messages for every
single error? I'd really like to know the line number of the function
that threw the error.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojur
If I split my code across files, how do I make it so that the REPL can
"see" all the code?
For example, if I have a main.clj and a tests.clj, when I run the REPL
from one of the two files, it only sees the definitions from that
file, not everything in the project.
What's the right way to do this?
One of my problems, I just discovered, was that I was sometimes
testing with a namespace continaing a hyphen in a file also containing
a hyphen. e.g.
my-foo.clj
(ns my-foo)
(+1 1)
Clojure, of course, wants the file to be named my_foo.clj
(underscore), and said as much in the error messages
thanks, all, for the notes! i will try those out.
sincerely.
--~--~-~--~~~---~--~~
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
To unsubscribe from this gr
On Fri, Mar 13, 2009 at 11:31 AM, opus111 wrote:
>
> Here's my experience...
>
> I was primarily interested in Clojure as a scripting language. I
> wanted a nice layer to control code written in Java. I had used
> Groovy successfully, but missed macros and an extensible syntax. I
> used to wor
On Mar 13, 2009, at 7:50 PM, Raoul Duke wrote:
i'm up to date with the clojure jar. the error messages i get seem
awfully terse and not particularly helpful in learning what i'm doing
wrong. for example, with the code below, when i try (bs 0 (vector 1 2
3)) i get "java.lang.ClassCastException:
Issue 34 ( http://code.google.com/p/clojure-contrib/issues/detail?id=34 )
created with patch (both -?> and .?. defined in clojure.contrib.core, with
unit tests in clojure.contrib.core.tests
--
Laurent
3/13 Laurent PETIT
> OK, so I think the consensus is on the names .?. and -?> . No problem
On Mar 13, 11:50 pm, Raoul Duke wrote:
> i'm up to date with the clojure jar. the error messages i get seem
> awfully terse and not particularly helpful in learning what i'm doing
> wrong. for example, with the code below, when i try (bs 0 (vector 1 2
> 3)) i get "java.lang.ClassCastException:
>
hi,
i'm up to date with the clojure jar. the error messages i get seem
awfully terse and not particularly helpful in learning what i'm doing
wrong. for example, with the code below, when i try (bs 0 (vector 1 2
3)) i get "java.lang.ClassCastException:
clojure.lang.LazilyPersistentVector (NO_SOURC
i just tried using (load-file "foo.clj") to see if that loaded file
line numbers, but the errors still say no source found zero sorry
charlie. :-(
On Fri, Mar 13, 2009 at 4:41 PM, Raoul Duke wrote:
> hi,
>
> when i have a repl going and get errors, it says NO_SOURCE_FILE:0 so
> it is hard for ne
hi,
when i have a repl going and get errors, it says NO_SOURCE_FILE:0 so
it is hard for newbie-me to figure out what i'm doing wrong in my
syntax. does slime do something more helpful here? am i mis-diagnosing
the issue? any other helpful thoughts?
thanks!
--~--~-~--~~~-
On Mar 13, 2009, at 4:10 PM, Stuart Sierra wrote:
Hi Allen,
Sorry I haven't kept up with this. I think, though, that it's best to
have it as a standalone library in clojure-contrib, so that people can
use it with other testing frameworks if they want to.
-Stuart
Allen,
I see you have a contr
Hi Allen,
Sorry I haven't kept up with this. I think, though, that it's best to
have it as a standalone library in clojure-contrib, so that people can
use it with other testing frameworks if they want to.
-Stuart
On Mar 13, 3:20 pm, Allen Rohner wrote:
> > > Any other options out there?
>
> I po
>
> > Any other options out there?
I posted a patch for test-is a while ago that never made it in, and I
don't know why.
http://groups.google.com/group/clojure/browse_frm/thread/883d4833f869f764/47a45325c8f29599?lnk=gst&q=test-is+expect+patch#47a45325c8f29599
The patch handles creating stub fun
test-expect actually only depends on test-is for its own tests, and
I'm planning on breaking the tests out into their own file. I thought
it was an interesting idea having the tests and code in the same file,
but in practice it ended up being less attractive than anticipated.
- Matt
On Mar 13,
Hi,
Am 13.03.2009 um 16:13 schrieb Mark Volkmann:
The version of the Vim that my Mac uses when a launch it from a
Terminal window isn't ancient. It's 7.2.22. It seems likely that the
issue is related to configuration instead of the version of Vim being
used. What happens if you try to use VimCl
Hi,
Would it be better if resultset-seq mapped column names like ITEM_ID
to ":item-id" rather than ":item_id"?
I am using a variation of Itay Maman's Application Context Pattern
which, among other things, keeps state in a map wrapped in a closure.
I have a lot of keywords being passed around. th
Here's my experience...
I was primarily interested in Clojure as a scripting language. I
wanted a nice layer to control code written in Java. I had used
Groovy successfully, but missed macros and an extensible syntax. I
used to work at Lisp Machines, so I jumped on a LISP that compiled to
the
Hi,
Am 13.03.2009 um 15:02 schrieb Mark Feeney:
So you could try \rf, but for me this still doesn't quite work for
me. If I have just one file:
foo.clj
(ns foo)
(+ 1 1)
I can't \ef it. I get the same "line 23" error you get. If I \rf it
I get:
(clojure.core/load "/foo")
#
I've t
On Fri, Mar 13, 2009 at 8:45 AM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 13.03.2009 um 13:45 schrieb Mark Volkmann:
>
>>> Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
>>> the vim that comes with leopard - vim version 7.0.x
>
>> So this casts a new light on the problem. It a
Hi Meikel,
Thank you for the prompt response.
> I will point this out more clearly in the documentation.
And future users will be greateful for that!
VimClojure is looking great Meikel.
Albert
--
Albert Cardona
http://albert.rierol.net
--~--~-~--~~~---~--~---
On Mar 13, 10:05 am, "Stephen C. Gilardi" wrote:
> Should we consider changing the canonical form for ns to use vectors
> for all of its sequential sub-forms?
One thing to consider: "ns" is a bit special,
because :import/:use/:require/:load mimic the syntax and behavior of
the functions import
I've seen discussions over time suggesting that Clojure's readability
is enhanced by having more bracketing characters in play that just
parentheses. I agree with that.
I recall Chouser (corrections welcome) noting that in Clojure code,
parentheses are used primarily for "forms" (applicatio
I've been struggling with the same issues (on Windows, not that it
appears to matter).
The "line 23" in the error means the 23rd line of the function
vimclojure#ExecuteNailWithInput(nail, input, ...) in vimfiles/autoload/
vimclojure.vim. It's unrelated to the code you're trying to execute.
I du
pmf a écrit :
> On Mar 13, 1:19 pm, Eric Thorsen wrote:
>
>> I come across some functions in clojure/core that are really useful in
>> tool building but often are private.
>> Is it possible to make these public?
>>
>
> I'm using the following hack to access private functions (for example
Hi,
Am 13.03.2009 um 13:45 schrieb Mark Volkmann:
Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
the vim that comes with leopard - vim version 7.0.x
So this casts a new light on the problem. It appears to be specific to
the vim that is a standard part of Mac OS X.
Ah
Hi Albert,
Am 13.03.2009 um 13:42 schrieb Albert Cardona:
If I open a .clj file without the ng server running, it complains
loudly
and does not switch on syntax highlighting for clojure. Why no
syntax on?
This happens for me if I open a file via the NerdTree plugin.
I'm not sure why this i
Do you try to run the command, ./ng
de.kotka.vimclojure.nails.NamespaceOfFile ?
The following is the result when I tried to run this after starting a
ngserver:
> cd your-vimcljure-directory
>./ng de.kotka.vimclojure.nails.NamespaceOfFile
java.lang.ClassNotFoundException:
de.kotka.vimclojure.nai
On Mar 13, 2009, at 3:07 AM, Michael Wood wrote:
>
> This is pretty standard behaviour.
>
> On the other hand, it's not universal.
>
> sbcl:
>
> * 07
>
> 7
> * 08
>
> 8
>
Common Lisp uses a separate syntax for binary/octal/hex literals. Legal:
#b1011, #o377, #xDEADBEEF, #36rZZZ (Base 36 anyone?)
On Fri, Mar 13, 2009 at 2:14 PM, Luke VanderHart
wrote:
>
> Well! You learn something new every day.
>
> Ironically, I knew about octal, but back in the day when I was
> learning Java, the book I was reading didn't have a typeface that
> distinguished O and 0 very well, and since I never had to u
On Mar 13, 1:19 pm, Eric Thorsen wrote:
> I come across some functions in clojure/core that are really useful in
> tool building but often are private.
> Is it possible to make these public?
I'm using the following hack to access private functions (for example
generate-class is private):
;; def
On Fri, Mar 13, 2009 at 7:27 AM, Adrian Cuthbertson
wrote:
>
> Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
> the vim that comes with leopard - vim version 7.0.x
>
> I first downloaded and tried MacVim 7.2 from
> http://code.google.com/p/macvim/ but I couldn't unpack the
Since this is a thread on VimClojure. First of all to say I am looking
forward to vimclojure working perfectly. Here are some problems I don't
understand:
If I open a .clj file without the ng server running, it complains loudly
and does not switch on syntax highlighting for clojure. Why no sy
On Mar 13, 2009, at 8:19 AM, Eric Thorsen wrote:
I come across some functions in clojure/core that are really useful in
tool building but often are private.
Is it possible to make these public?
An alternative to private that I've used in some of my contribs is to
have a separate namespace f
Hi Mark, I'm also running on OSX 10.5. I couldn't get it working with
the vim that comes with leopard - vim version 7.0.x
I first downloaded and tried MacVim 7.2 from
http://code.google.com/p/macvim/ but I couldn't unpack the .tbz files.
I then tried the Vim.app 7.2 from
http://sourceforge.net/p
I come across some functions in clojure/core that are really useful in
tool building but often are private.
Is it possible to make these public?
spread
assert-args
sigs
libspec?
root-resource
root-directory
Let me know and I'll submit a patch.
Thanks,
Eric
--~--~-~--~~---
Well! You learn something new every day.
Ironically, I knew about octal, but back in the day when I was
learning Java, the book I was reading didn't have a typeface that
distinguished O and 0 very well, and since I never had to use them I
never was corrected. Interesting.
Thanks!
On Mar 12, 5
On Thu, Mar 12, 2009 at 6:05 PM, Kyle Schaffrick wrote:
>
>> Here are the errors I'm getting.
>>
>> Error detected while processing function
>> vimclojure#ExecuteNailWithInput:
>> line 23:
>> E605: Exception not caught: Couldn't execute Nail! ng
>> de.kotka.vimclojure.nails.N
>> amespaceOfFile
On Fri, Mar 13, 2009 at 2:50 AM, Adrian Cuthbertson
wrote:
>
> I think the " could be a problem in generating your path in .vimrc. Try...
> let vimclojure#NailgunClient='/your_path/vimclojure-2.0.0/ng'
>
> and don't forget also for .vimrc
> let g:clj_want_gorilla = 1
I fixed the "let vimclojure"
Hi folks - are there any frameworks out there for mocking?
Stubbing functions is pretty straightforward (and I see that fact comes with
a stubbing function built in), but I'd really like something that can do
mocking and mock expectations - something similar to stub, but with checking
that the stub
It wont solve your performance problem but I think that your python code
translates to:
(defn f[a b c]
(+ (* c c c c) (* b b b) (* a a)))
(count
(into #{}
(for [c primes :while (< (f (first primes) (first primes) c) limit)
b primes :while (< (f (first primes) b c) limit)
here is some background info on the change:
http://groups.google.com/group/clojure/browse_thread/thread/123ef17d7c650018/e1da76a4a273aa5a
max3000 a écrit :
> The default character set on WinXP (which I use) is windows-1252
> (cp1252). Check out http://www.rgagnon.com/javadetails/java-0505.html.
>
On 12 Mrz., 07:48, tristan wrote:
> my clojure version
> http://github.com/tristan/project-euler-code/blob/4a17bc271b4b2743ee1...
Not about speed, but about readability:
(loop [c primes n #{}]
(let [r (loop [b primes n n]
(let [r (loop [a primes n n]
...)))
You should think about us
OK, so I think the consensus is on the names .?. and -?> . No problem with
me.
I'm willing to write the patch, but which patch ? I mean, do these macros
deserve their own file (maybe not) ?
Maybe adding them to the existing clojure.contrib.macros ?
Or else, I was thinking about creating a new file
Hi,
Am 13.03.2009 um 09:08 schrieb MattH:
I noticed that the and key bindings used for the
history navigation work fine in MacVim.app, but not from the terminal
in OS X.
I don't use Vim in a terminal anymore. The I don't do much testing
there.
So for any VimClojurians on OS X with the
Hi,
Am 13.03.2009 um 05:51 schrieb rzeze...@gmail.com:
1) In the preview window it says "Use \p to close this buffer!", but I
have m LocalLeader mapped to ",". I'm guessing maybe you hardcoded
this by accident?
Yes. I should read the maplocalleader option to show the right key.
Will be fix
Christian Vest Hansen a écrit :
> I think that count is O(n) for lists, no?
>
Count is O(1) for lists but O(n) for a chain of conses.
Clojure
user=> (let [l (apply list (range 10))] (time (dotimes [_ 100]
(count l
"Elapsed time: 169.710116 msecs"
nil
user=> (let [l (apply list (r
On Fri, Mar 13, 2009 at 7:49 AM, Chouser wrote:
>
> On Fri, Mar 13, 2009 at 2:18 AM, Sergio wrote:
>>
>> There are a couple of obvious ones, but also some others that I
>> haven't seen documented (like, map is much faster on lists than on
>> vectors since rest is O(1) for lists).
>
> You're righ
Thanks Meikel, this is really useful!
I noticed that the and key bindings used for the
history navigation work fine in MacVim.app, but not from the terminal
in OS X.
So for any VimClojurians on OS X with the same problem, suggested
workarounds:
- use MacVim.app, or
- add alternative mappings i
I think the " could be a problem in generating your path in .vimrc. Try...
let vimclojure#NailgunClient='/your_path/vimclojure-2.0.0/ng'
and don't forget also for .vimrc
let g:clj_want_gorilla = 1
Rgds, Adrian.
On Fri, Mar 13, 2009 at 2:09 AM, Yasuto TAKENAKA wrote:
>
> In my environment, same
list doesn't do what you think it does. You've just created a list of
one element.
On Fri, Mar 13, 2009 at 12:10 AM, Sergio wrote:
> (def ls (list (range 100)))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
> Is it fair to say that Clojure shines in algorithmic processing, string
> processing, concurrency management, but that there are better choices in
> other areas:
not an answer, but a follow-on question: how well does clojure
currently support multimedia programming? i realize it supports it to
In my environment, same error occurs ... although I have erased
Gorilla and previous vimclojure packages. I install it using my
installer script. If wrong, let me know.
--
#!/bin/sh
# installer.sh - a simple vimclojure installer.
# Please rewrite CLOJURE, CLOJURECONTRIB and VIMCLOJUREHOME.
# The
I paste below what I got. It's doing something for sure, but just for
*out* I think.
Thanks.
user=> (println "abcd")
����abcd
nil
user=> (binding [*in* (new LineNumberingPushbackReader (new
InputStreamReader
System/in))
*out* (new OutputStreamWriter System/out)]
(println
Jerry K writes:
Hi Jerry,
> Glad your problem is resolved. Miller-Rabin is quite zippy... and
> practical for real use. If you want a next cool exercise to take a
> crack at, the direction one often goes is to improve the speed of the
> underlying multiplications using the FFT...
I looked a
Sorry =( I am horribly mistaken
I should have taken my time before posting..
But still, I really thought cons on vectors was O(n) base on
PersistentVector.java, line 148 (The version I'm reading is not the
current SVN head, so I don't know if it is that line for you)
Here is the snippet:
On Fri, Mar 13, 2009 at 8:46 AM, max3000 wrote:
>
> Any news on this item? Does what I'm saying make sense?
>
> I understand most people who use clojure are probably English-speaking
> and couldn't care less about internationalization, but this has to be
> addressed if clojure is to get any sembl
57 matches
Mail list logo