I was using defrecord for the first time, to create a type that I wanted to
throw+ via slingshot to signal errors from a library.
I'd seen an example of this in another library, and I pretty much just cut and
pasted it into my project.
I understood that I need to explicitly import the
Hi,
the Scheme version of quicksort is not tail-recursive since append is
called on the return value of the recursive calls. Thus, also in
Scheme this eats up your stack. That your Scheme code can sort larger
sequences simple means that your Scheme implementation has a larger
stack than the JVM
Glad to announse the first release of slacker. Slacker is an RPC
framework for clojure. It provides a set of non-invasive, transparent
APIs for both server and client. You can switch between remote
invocation and local invocation effectivly. Different from remote eval
approach, slacker is
On Fri, Dec 2, 2011 at 12:33 AM, Glen Stampoultzis gst...@gmail.com wrote:
I noticed that when I create a reference (zk-ref) I need to provide an
initial value. For each VM I do this for - it ends up clobbering the
previous value. Is there anyway to create a reference without necessarily
Hi Glen,
The init-stm step is still referenced in the documentation as being required
BTW.
Thanks, I'll remove the reference.
I had a couple of questions.
I noticed that when I create a reference (zk-ref) I need to provide an
initial value. For each VM I do this for - it ends up
On Dec 1, 2011, at 11:02 PM, Benny Tsai wrote:
Overtone's 'at-at' library is a thin Clojure wrapper over
ScheduledThreadPoolExecutor with a nice interface. I think you should be
able to build a timer on top of it pretty easily.
https://github.com/overtone/at-at
Thanks Benny; I went
If you could give me a small example of how you would like to use
this, I can take a look.
I suggest you read Miguel de Icaza's blog entry here about using
dynamic and pinvoke. The concept is quite simple. Basically you have
to generate a method on-the-fly and tag it with the correct
Does this still happen for you? It appears to still be the case in my
environment. Dropping back to Clojure *1.2.1* seems to work but in addition
to trying out monads, I need to use a library (clj-webdriver) that relies
on Clojure *1.3.0* What to do?
--
You received this message because
ah: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
clojure.contrib.monads
- Migrated to clojure.algo.monads - lead Konrad
Hinsenhttp://dev.clojure.org/jira/secure/ViewProfile.jspa?name=khinsen
.
- Status: latest build
Hello everyone,
I would like to announce the first release of Clarity (v0.5.1), a
Swing-based GUI library. It's available on github and through clojars:
https://github.com/stathissideris/clarity
[clarity 0.5.1]
Also, here's an introductory talk (will only play as embedded
unfortunately):
Nimrod is a lightweight, not invasive, metrics server written in Clojure
and based on log processing: version 0.3 provides several new features and
enhancements, the most important one being a brand new metrics store which
can be either volatile, for short-living metrics, or persistent, for nearly
Given that this seems to bite quite a few people who try to use
defrecord / import (even if it only bites them once), perhaps it would
be a nice enhancement for import to allow hyphen and automatically
translate it to underscore in the package / namespace? It seems very
inconsistent given that the
Hi Stathis,
Nice presentation and the library looks interesting. One question,
when do you think it will be ported to 1.3?
Regards,
Doug
On Fri, Dec 2, 2011 at 12:55 PM, Stathis Sideris side...@gmail.com wrote:
Hello everyone,
I would like to announce the first release of Clarity (v0.5.1), a
Well, there isn't much preventing it from being 1.3. It used to be
blocked by the dependency to clojure.contrib.miglayout, but then
Stephen Gilardi released artem (https://github.com/scgilardi/artem)
which provided a way out. I think it's probably a matter of days
before I get a version that's
Hi All,
We are working on a data manipulation application. The idea is that a user
should be able to set up a pipeline with one or more input files (eg. a
database, csv, spreadsheet, json/XML, etc), one or more transformations of
data (eg. merging, renaming, aggregating, search/replace, etc), and
Hi,
how do Clojure agents relate to Erlang actors?
To gain some insights, I tried to implement Erlang style message
passing between agents. The first version is just a very incomplete
sketch (no mailbox, case instead of pattern matching ...), but already
shows that it is quite easily doable:
The namespace have been restructured so 'com.georgesjahad.cdt doesn't
exist anymore.
The easiest way to use cdt is from emacs, as described here:
http://georgejahad.com/clojure/swank-cdt.html
Hugo Duncan also has a separate emacs based clojure debugger called
Ritz, described here:
2011/12/1 Stuart Sierra the.stuart.sie...@gmail.com
Do I understand correct that the only way to hook
a recursive function without affecting other
threads is to annotate the function with
^{:dynamic true} and call it via #'fact?
If you want to you dynamic rebinding, yes.
There are
Thanks for all the replies. It seems to me that as general solutions to
stack overflow, trampoline and recur are
very valuable. I had gotten the mistaken idea that Scheme was somehow
immune to the problem.
My experiments in Scheme seemed to get to higher amounts of recursion
before blowing up
how do Clojure agents relate to Erlang actors?
There are several important differences:
1. Agents are designed for in-process communication only.
2. Observing the state of an Agent does not require sending it a message.
3. Agents accept arbitrary functions instead of a predefined set of
Clojure 1.3 mitigates this problem somewhat by defining public constructor
functions for record types, so you can use/require the namespace and call
the constructor functions. Then the class names are only needed for interop
or type hints.
Clojure 1.2.0 had a bug (CLJ-432) whereby hyphens in
On Fri, Dec 2, 2011 at 1:44 AM, Don Jackson
cloj...@clark-communications.com wrote:
I was using defrecord for the first time, to create a type that I wanted to
throw+ via slingshot to signal errors from a library.
For what it's worth, the main point of slingshot is removing the
necessity of
Hi Stuart,
thanks for the info. I did not really think about some of these
differences. Basically, it was just a fun exercise ... not (yet)
useful for anything serious.
On Dec 2, 10:14 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
how do Clojure agents relate to Erlang actors?
There
On Dec 2, 8:13 pm, john.holland jbholl...@gmail.com wrote:
Thanks for all the replies. It seems to me that as general solutions to
stack overflow, trampoline and recur are
very valuable. I had gotten the mistaken idea that Scheme was somehow
immune to the problem.
My experiments in Scheme
Fiel's problem was a little simpler -- his dllimport method was out in
C# class that was imported. The problem appears to be that reflection
is not finding the method. That is likely either a signature-matching
problem (declared args vs supplied params) or even just having the
flags set a little
Is there a way for a macro m to expand into code that includes another
delayed use of m such that this second use of m is only expanded if
needed (and thus avoiding a stack overflow)?
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
Andrew ache...@gmail.com writes:
Is there a way for a macro m to expand into code that includes another
delayed use of m such that this second use of m is only expanded if
needed (and thus avoiding a stack overflow)?
What exactly are you trying to do?
Bye,
Tassilo
--
You received this
(defmacro interactive-try
If expr results in an exception, prompt the user to retry or give
up. The user can execute arbitrary code somewhere else or fiddle with
a DB before retrying. Returns nil if the user gives up.
[expr]
`(try
~expr
(catch Exception e#
(- (ui/dialog
On Thursday, December 1, 2011 8:23:33 PM UTC+1, Alan Malloy wrote:
1) I agree this seems silly but I don't think it's ever bitten me
Ain't this the difference between a language, that's been around for QAW
(Quite A While, maybe even long enough to become a standard, e.g. ANSI) and
a
Hi,
to be honest I'd rather not see any magic behavior of the importing
mechanism. Better to fail early, but with a suitable error message, no?
Cheers,
Stefan
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
On Friday, December 2, 2011 8:44:07 AM UTC+1, Tassilo Horn wrote
JVM does some sort of pooling. It seems there's exactly one Long for
any long value in the range [-128...127], but you shouldn't rely on
that.
And I always thought it was 1024, but
user= (identical? 127 127)
true
user=
Well, I found a way to dodge that need. But still interested in whether
it's possible. Here's my dodge. Ugly and proud.
(defmacro itry
If expr results in an exception, prompt the user to retry or give
up. The user can execute arbitrary code somewhere else or fiddle with
a DB before retrying.
Hi,
I have a public function foo that uses two private functions bar and baz.
So foo calls bar which calls baz. Two of the parameters passed to foo
aren't used by bar, only baz.
Though the segregation of behavior across foo, bar, and baz makes sense for
my program, I feel dirty making the params
So, I've been dipping my toe in the waters of Clojure UI development
using Gnome, and I immediately ran in into a problem making me regret my
years of Java apathy. I'm trying to write a toy program to processes
generic key presses made to the Gnome window and I'm stuck as to how to
translate
Quoth john.holland on Sweetmorn, the 44th of The Aftermath:
It seems to me that as general solutions to stack overflow,
trampoline and recur are very valuable. I had gotten the mistaken
idea that Scheme was somehow immune to the problem.
Trampoline and recur are a poor man's
Hi Clojurians,
I hit the following error today. My environment is Clojure 1.3
(eval (read-string (clojure.repl/source-fn 'keep-indexed)))
#CompilerException java.lang.ClassCastException: clojure.lang.Compiler
$InvokeExpr cannot be cast to clojure.lang.Compiler$ObjExpr, compiling:
On Fri, Dec 2, 2011 at 12:37 PM, George Jahad
cloj...@blackbirdsystems.net wrote:
The easiest way to use cdt is from emacs, as described here:
http://georgejahad.com/clojure/swank-cdt.html
Could you add a note to clarify that connecting as usual to a swank
server is via the Emacs slime-connect
i coded the foo.clj program
=
(ns foo)
(defn hello [x] (println Hello, x))
(if *command-line-args*
(hello command line)
(hello REPL))
=
I run this line
java -cp c:/opt/jars/clojure.jar:. clojure.main foo.clj
I get it can't find clojure.main
38 matches
Mail list logo