On Wed, May 20, 2009 at 7:04 PM, George Jahad
wrote:
>
> Using cljdb I was able to step through the code and see that the
> problem is
> that symbol create is expecting an interned string.
>
> Changing this:
>
> (def s1 (Symbol/create (first (.split "user/n1" "/"
>
> to this:
>
> (def s1 (Symb
are you saying that Haskell has amortized, not worst-case performance and so
fast operations need to be paid for ... like when you have to ripple-carry
in binary counting to pay for times when you didn't have to carry the one?
On Wed, May 20, 2009 at 7:42 PM, Raoul Duke wrote:
>
> hi,
>
> Seems
thinking of
http://w01fe.com/blog/2009/01/pleasant-surprise-clojures-apply-is-lazy/ ?
On Wed, May 20, 2009 at 3:38 PM, CuppoJava wrote:
>
> Hi,
> I'm using "apply" a lot in my code, and a small micro-benchmark is
> telling me that it's a very slow operation. Can someone confirm this?
> I'm wonder
Ilya, where can we find documentation about how to use the new
features? ... the information on the plugin page is pretty scarce...
Good job by the way!
Toni.
On May 20, 2009, at 12:00 PM, Ilya Sergey wrote:
> In last build of La Clojure plugin (thanks to Kurt Christensen) we
> added REPL i
Do you have plans to add connect/disconnect to existing running Repl
over the network ?
Emacs has this mode with slime and it is very handy in developing web
applications.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
Using cljdb I was able to step through the code and see that the
problem is
that symbol create is expecting an interned string.
Changing this:
(def s1 (Symbol/create (first (.split "user/n1" "/"
to this:
(def s1 (Symbol/create (.intern (first (.split "user/n1" "/")
will fix your probl
If efficiency is really an issue (if it's not just use apply), how
about using a macro for doing the dirty work of writing the direct
function application for you?
On 20 maio, 19:44, CuppoJava wrote:
> Thanks a lot for that really detailed analysis Stephen.
> I do find "apply" very convenient in
hi,
Seems like Haskell's laziness has an aura of "it will bite you
performance-wise sooner or later." What is different (I'm asking
didactically, not snarkily) about Clojure's laziness? Does it manage
to avoid some aspects of the "uh ohs" in Haskell?
many thanks.
--~--~-~--~~---
Thanks a lot for that really detailed analysis Stephen.
I do find "apply" very convenient in a lot of cases, and am using it
to save a line or two of code whenever I can. But after seeing this
benchmark, I think I shall be more disciplined about my use of it.
Especially in the case where the numbe
On May 20, 2009, at 3:38 PM, CuppoJava wrote:
I'm using "apply" a lot in my code, and a small micro-benchmark is
telling me that it's a very slow operation. Can someone confirm this?
I'm wondering whether my benchmark is incorrect, or whether there's a
hidden reflection that I'm not seeing.
I have a feeling I'm doing something wrong bug I can't figure it out and I
can't rule out that it's not some kind of bug. I am trying to get the public
vars exposed by a namespace from a string. I am creating a symbol from the
string using Symbol/create and then calling ns-publics. This works just
I'm thinking that integer boxing on the argument to your Fn is perhaps
dominating your numbers. I'm not up to date on the compiler, but I'd
think that the argument to the direct Math/ceil call is parsed in
primitive form.
On Wed, May 20, 2009 at 9:38 PM, CuppoJava wrote:
>
> Hi,
> I'm using "ap
Wow, that was quick thanks.
On Wed, May 20, 2009 at 3:26 PM, George Jahad
wrote:
>
>
>
> On May 20, 11:20 am, David Nolen wrote:
> > Wow this sounds fantastic. Wanna put this on GitHub so people can fork it
> > and work on it concurrently? ;)
>
>
>
> Good idea:
>
> http://github.com/GeorgeJahad/
Hi,
I'm using "apply" a lot in my code, and a small micro-benchmark is
telling me that it's a very slow operation. Can someone confirm this?
I'm wondering whether my benchmark is incorrect, or whether there's a
hidden reflection that I'm not seeing.
Thanks a lot for the help
-Patrick
(let [i [
On May 20, 11:20 am, David Nolen wrote:
> Wow this sounds fantastic. Wanna put this on GitHub so people can fork it
> and work on it concurrently? ;)
Good idea:
http://github.com/GeorgeJahad/cljdb/tree/master
--~--~-~--~~~---~--~~
You received this message b
I should have uploaded the file in the .zip format for ease of
extraction. Since I don't know how to replace it with a .zip version
and I don't want to clutter the file area, I don't upload the zip
version. Mac and Linux users should have no problem of extracting the
files, and there should be bun
In last build of La Clojure plugin (thanks to Kurt Christensen) we added
REPL integration with history and possibility to load files and evaluate
expressions from the editor.
With best regards,
Ilya Sergey
2009/5/18 Ilya Sergey
> Hello, Asbjørn.
>
> For now IntelliJ support of Clojure is rather
Wow this sounds fantastic. Wanna put this on GitHub so people can fork it
and work on it concurrently? ;)
On Wed, May 20, 2009 at 1:51 PM, George Jahad
wrote:
>
> Hi Kids:
>
> I've been working on integrating Emacs JDB, (command line java debug
> interface,) mode with Clojure. It still a work in
Hi Kids:
I've been working on integrating Emacs JDB, (command line java debug
interface,) mode with Clojure. It still a work in progress, and has
some funky aspects due to language differences between Clojure and
Java, but you can catch exceptions and bring them up in the source
code, print out
Thanks, that makes a lot of sense!
Per
On May 20, 10:36 am, Chouser wrote:
> On Wed, May 20, 2009 at 9:59 AM, Michael Reid wrote:
>
> > On Wed, May 20, 2009 at 8:44 AM, pmf wrote:
>
> >> On May 20, 4:47 am, Per wrote:
> >>> ;; The macro
> >>> (defmacro def-fields [name tgs]
> >>> `(defs
Thanks, this is going in the right direction.
The macro expansion looks correct, but the actual execution still
fails:
user=> (macroexpand '(def-fields fs tags))
(def fs (clojure.core/create-struct :name :age))
user=> (def-fields fs tags)
java.lang.Exception: Unable to resolve symbol: :name i
Thanks. On my setup I had to add '(javax.swing JFrame) too.
Pretty neat.
On Wed, May 20, 2009 at 3:12 PM, kyle smith wrote:
>
> Import statements added. Example usage:
>
> (def coords [[0 0 0] [1 1 1] [2 2 2]]);etc
> (g3d coords)
>
> That should pop open the viewer. Left click and drag to ro
On 19.05.2009, at 14:28, aperotte wrote:
> Let me know if you have any questions or comments!
Two for today:
1) What is the role of the first argument to PersistentMatrix/create?
It seems that anything else than (int-array [1]) leads to an error.
2) Shapes and indices are all int, rather tha
On Wed, May 20, 2009 at 9:59 AM, Michael Reid wrote:
>
> On Wed, May 20, 2009 at 8:44 AM, pmf wrote:
>>
>> On May 20, 4:47 am, Per wrote:
>>> ;; The macro
>>> (defmacro def-fields [name tgs]
>>> `(defstruct ~name ~@(map #(symbol (str ":" %)) tgs))
>>> )
>>
>> If you replace the call to 'symb
Ah, thanks Laurent!
2009/5/20 Laurent PETIT
>
> Hi,
>
> the following session will probably explain the problem:
>
> user=> (digit? \5)
> true
> user=> (ancestors java.lang.Integer)
> #{java.io.Serializable java.lang.Comparable java.lang.Number
> java.lang.Object}
> user=> (ancestors java.lang.C
Hi,
the following session will probably explain the problem:
user=> (digit? \5)
true
user=> (ancestors java.lang.Integer)
#{java.io.Serializable java.lang.Comparable java.lang.Number java.lang.Object}
user=> (ancestors java.lang.Character)
#{java.io.Serializable java.lang.Comparable java.lang.Ob
Hi,
when I evaluate:
(defn digit? [d]
(. Character isDigit d))
(digit? 5)
I get false as a result.
It appears that the 5 does not match the correct type Java expects, or what?
TIA,
Arie
--~--~-~--~~~---~--~~
You received this message because you are subscr
On 20.05.2009, at 17:14, Konrad Hinsen wrote:
> Here is another solution that I consider preferable to the use of
> load. It requires you to specify explicitly which vars you want to be
> replaceable (which I consider an advantage)
That's actually not true: it doesn't require a specification of
On 17.05.2009, at 21:24, Mark Engelberg wrote:
> I don't want to post my actual code here, so let's run with this
> *gravity* example based off of what Adrian posted as a simple
> illustration.
Here is another solution that I consider preferable to the use of
load. It requires you to specify e
Import statements added. Example usage:
(def coords [[0 0 0] [1 1 1] [2 2 2]]);etc
(g3d coords)
That should pop open the viewer. Left click and drag to rotate, and
use the scroll wheel to zoom in/out.
--~--~-~--~~~---~--~~
You received this message because you a
On Wed, May 20, 2009 at 8:44 AM, pmf wrote:
>
> On May 20, 4:47 am, Per wrote:
>> ;; The macro
>> (defmacro def-fields [name tgs]
>> `(defstruct ~name ~@(map #(symbol (str ":" %)) tgs))
>> )
>
> If you replace the call to 'symbol' with a call to 'keyword', it works
> (I think this is what you
On May 20, 4:47 am, Per wrote:
> ;; The macro
> (defmacro def-fields [name tgs]
> `(defstruct ~name ~@(map #(symbol (str ":" %)) tgs))
> )
If you replace the call to 'symbol' with a call to 'keyword', it works
(I think this is what you intended).
--~--~-~--~~~---~-
What about the zip version of save_clojure.org.tar.bz2?
Emeka
--~--~-~--~~~---~--~~
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 g
On Wed, May 20, 2009 at 3:32 AM, hoeck wrote:
>
> i tried importing those two classes from a recent jacob with slime,
> xemacs and w2k and exactly the same is happening here. I have a
> similar problem when starting slime, my emacs blocks and doesn't start
> the repl until i evaluate some random
Hello,
Apologies for off topic post.
I would like to send and receive raw ethernet frames from Clojure.
So far, I found:
http://netresearch.ics.uci.edu/kfujii/jpcap/doc/
but is sending and receiving raw ethernet packets possible with the
latest JDK using standard networking stack of JVM?
In
Including import statements at the top would make it easier for me to try it
out.
Thanks,
On Wed, May 20, 2009 at 4:09 AM, kyle smith wrote:
>
> I have uploaded 3d-viewer.clj to the files section. If anyone finds
> it useful, I would appreciate some feedback.
> >
>
--
John
--~--~-~
I want to write a macro that runs a 'defstruct' using a list of names,
like below:
;; My tag names
(def tags '("name" "age"))
;; The macro
(defmacro def-fields [name tgs]
`(defstruct ~name ~@(map #(symbol (str ":" %)) tgs))
)
;; Using the macro to define a struct based on 'tags'
(def-fields
Well, at least I am not alone.
I think you are right about the emacs/slime thing. Everything just
works if I start a REPL from the commandline and add the classpaths/
librarypaths when I invoke it.
I have tried this on two separate Windows machines with vastly
different configs, so I don't think
2009/5/18 Mark Engelberg :
>
> On Mon, May 18, 2009 at 4:23 AM, Laurent PETIT
> wrote:
>> The most modular I can think of right now is just about creating a
>> gravity type and using multimethods for all your functions.
>>
>> This way you would have dynamic resolution of methods that do not work
On 19 Mai, 12:25, martin_clausen wrote:
> I am trying to use the JACOB library with Clojure using Clojure Box.
>
> I have added this to my .emacs:
>
> (setq swank-clojure-library-paths (list "c:/dev/dlls"))
>
> c:/dev/dlls/ contains the jacob-1.14.3-x86.dll
>
> I have added a .clojure dir to my
40 matches
Mail list logo