Hello
words is not of a primitive type. Try:
(defn shorts-to-bytes [#^shorts src #^bytes dst words]
(let [words (int words)]
(loop [src-offset (int 0)
dst-offset (int 0)]
(when (< src-offset words)
(let [sample (short (aget src src-offset))]
(aset dst dst
Try unchecked-inc and try wrapping the function body in (let [words (int
words)] ... ).
I don't know why aset is still reflecting when all of the arguments are
type-hinted, but the above changes might speed up some other bits of the
code.
--~--~-~--~~~---~--~~
You r
I am happy to release version 0.1 of Ring, a Clojure web applications
library. This version of Ring incorporates several new features and
changes, includes improved documentation, and some several structural
changes to support ongoing development. I hope that this release
provides a useful referen
This is issue #104 (which was called #100 in the old system.)
http://www.assembla.com/spaces/clojure/tickets/104-GC-Issue-100--gen-class-creating-non-compliant-field-names-
A simple patch was originally suggested here:
http://groups.google.com/group/clojure/browse_thread/thread/e64719d716c29ce0
Besides using just aset, try using unchecked-inc instead of inc.
--~--~-~--~~~---~--~~
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 m
Are you calling System/exit when you close a window? Why not just do
(.setDefaultCloseOperation jframe JFrame/DISPOSE_ON_CLOSE) ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group
Nicholas,
thank you for your reply. I applied the change you suggested.
Unfortunately it skimmed only about 50ms from each exectuion.
Even though I'm using aset, java.lang.reflect.Array.setByte *still*
uses ~25% of execution time. This means two things: A) Reflection is
still used for this code.
Meikel Brandmeyer writes:
> Maybe I'm misunderstanding something, but why do you need to know, how
> the code was started, when you want it to always behave the same? In
> which way needs SLIME special treatment?
I'm working with sketches for the Processing environment. Each sketch
starts its o
On Mon, Sep 7, 2009 at 3:10 AM, Phil Hagelberg wrote:
>
> Stuart Sierra writes:
>
>> The problem is, I think, that everyone will have a slightly different
>> definition of "interactive environment." If I run
>> java ... clojure.main path/to/file.clj
>> does that count? What about
>> jav
Hi,
Am 06.09.2009 um 22:10 schrieb Phil Hagelberg:
That's not really helpful for my purposes; I want by code to behave
the
same way whether started from slime, an IDE, or the REPL; to do that
I'd
have to either maintain my own list of heuristics for each possible
environment or get some sor
Stuart Sierra writes:
> The problem is, I think, that everyone will have a slightly different
> definition of "interactive environment." If I run
> java ... clojure.main path/to/file.clj
> does that count? What about
> java ... my.compiled.namespace
> ? Or what about a REPL thread ins
Thanks~! It works beautifully. In this case, I actually used this code, though
yours go me thinking.
http://paste.lisp.org/display/86576
From:
http://groups.google.com/group/clojure/browse_thread/thread/46cb5403356a55dd
-Original Message-
From: clojure@googlegroups.com [mailto:cloj...@
Hi all,
after reading Charles Oliver Nutter's article "Scripting Java
Libraries With JRuby" [1] I decided to "translate" his two example
programs to Clojure. The result can be found on my blog:
http://citizen428.net/archives/396-Using-Java-libraries-from-Clojure.html
Since I'm pretty new to Clo
Hi,
Am 05.09.2009 um 18:29 schrieb ronen:
The main thing that i would add to the docs is a trouble shooting
section that consist of common user mistakes how to check them &
possible fixes, I think that the installation procedure can be further
automated (as mentioned before me).
That's also a
Signed-off-by: Takeshi Banse
---
Hi.
I Takeshi Banse live in Japan, have been teaching myself Clojure and in this
time, I have a patch to swank-clojure I'd like to make it public.
With this patch, I can 'slime-fuzzy-complete-symbol within Emacs/SLIME.
This is based on the swank-fuzzy.lisp dist
Is there any reason to keep aset-* functions around in Clojure? I
guess backwards compatibility?
It definitely seems worth flagging them when *warn-on-reflection* is
true, in a similar way to other warnings it enables. Perhaps that
might be overloading the meaning of *warn-on-reflection*, but I
Hello,
> (aset-byte dst dst-offset (byte sample))
Most of the time, aset is faster than aset-TYPE. Especially when, like here,
types are known.
If you profile your code, you should see most of the time is in
Reflect.Array.set or something similar, and that should disappear
if you want
Hello!
First of all, let me congratulate with the devs for their great work:
I've been using Clojure for just a couple of weeks and I had a lot of
fun learning it and experimenting with it.
I'm starting a concurrency-heavy project and I feel Clojure is gonna
be a great choice!
I'm thinking about
2009/9/5 Mike Hinchey
> I don't know anything about it, but counterclockwise uses antlr.
>
> http://groups.google.com/group/clojuredev-devel/browse_thread/thread/1428233ef12b6231
>
>
That's true. To be more precise, we have a clojure lexer which is
extensively used in Counterclockwise clojure sou
Is there a known problem with the IBM JDK and clojure-contrib?
I first encountered errors when trying to load pprint under the 1.5
IBM JDK on a zSeries system:
JVMJZBL1023N Invoking clojure.main.main()...
JVMJZBL2010E Exception occurred invoking clojure.main.main()
JVMJZBL2007E Stack trace
On Sep 4, 8:30 pm, Jonathan Smith wrote:
> Hi Ralph,
>
> First off, nice post! We need more of these types of tutorials on GUI
> in clojure, they're very useful.
>
> On make-login-widget you can probably do a doto when you do this part:
>
> > (.addWidget layout (WLabel. "Login:") 0 0 )
> > (.ad
> (defvar clojure-stuff-path "~/clj"
> "Where all cool Clojure stuff lies.")
>
> (defun slime-clojure-internal-swank ()
> (interactive)
> (add-to-list 'load-path (concat clojure-stuff-path "/clojure-mode"))
> (add-to-list 'load-path (concat clojure-stuff-path "/swank-
> clojure"))
> (req
22 matches
Mail list logo