At the plain Clojure REPL (not running through swank or lein) the standard
input is where you're typing, so you can't simultaneously read data from it.
Swank and lein both manipulate standard input/output in strange ways.
If you want direct access to standard input/output from a Clojure program
Ratios aren't valid JSON. If the recipient is Clojure, you don't need JSON
at all, just pr-str and read-string.
-S
--
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
I've stumbled upon this previous post:
On Jun 26 2010, 6:52 am, Conrad wrote:
> Hi everyone- I am running an emacs slimereplvia "lein swank". I want
> to do some simple data input/output by writing a program that runs in
> therepl. However, when I try to execute "(read)" through the slimereplit
Boston Clojure Group: http://www.meetup.com/Boston-Clojure-Group/
On Jan 7, 12:16 pm, Eric Kobrin wrote:
> Jeff posted this in a separate thread. We'll be hosting ameetupon
> the 13th:
>
> 1st Boston ClojureMeetup
>
> Date: Thursday, January 13th, 2011
>
> Location: Akamai Technologies
> 8 Camb
I am hoping to determine what are reasonable expectations for
performance after parallelizing an application, especially when using
clojure's reference types. I'm aware of Amdahl's law (http://
en.wikipedia.org/wiki/Amdahl's_law) but I'm still getting
disappointing performance scaling in the number
I notice that clojure.lang.PersistentTreeMap does not implement
SortedMap (let alone NavigableMap), unlike java.util.TreeMap.
Any particular reason why?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@goog
On Sat, Jan 8, 2011 at 9:15 PM, Andreas Kostler
wrote:
> Basically, I want the clojure equivalent of a clisp atom.
> In clisp, atom is true for everything that is not a cons cell.
> The closest match I found is creating a macro that returns true for
> everything that is not a list:
> clisp:
>
> (
On Sat, Jan 8, 2011 at 13:49, Stuart Sierra wrote:
> There's no solution here that will be perfect for all cases. But I've made
> the decision that c.c.json will always "downgrade" Clojure types to the
> nearest equivalent JSON types. It does not promise round-trip preservation
> of types not spec
Basically, I want the clojure equivalent of a clisp atom.
In clisp, atom is true for everything that is not a cons cell.
The closest match I found is creating a macro that returns true for everything
that is not a list:
clisp:
(atom 1) => true
(atom '(1 2 3)) => false
I hope that makes things
On Sat, Jan 8, 2011 at 7:25 PM, Andreas Kostler
wrote:
> Ken,
> Thanks for your reply. Is that about what you mean?
>
> (defmacro literal? [form]
> (list 'if `(not (list? ~form)) true false))
Sort of, but that isn't quite going to work. It will expand to
(if (clojure.core/not (clojure.core/list
Ken,
Thanks for your reply. Is that about what you mean?
(defmacro literal? [form]
(list 'if `(not (list? ~form)) true false))
Andreas
On 09/01/2011, at 8:59 AM, Ken Wesson wrote:
> On Sat, Jan 8, 2011 at 6:49 PM, Andreas Kostler
> wrote:
>> Hello again,
>> How do I test for a literal? The
On Sat, Jan 8, 2011 at 5:15 PM, Stuart Halloway
wrote:
> Scopes will not make dynamic bindings linger in lazy seqs. Agreed that is a
> terrible idea.
In other words scopes would have only half-solved the problem anyway? Ack.
--
You received this message because you are subscribed to the Google
On Sat, Jan 8, 2011 at 6:49 PM, Andreas Kostler
wrote:
> Hello again,
> How do I test for a literal? There are predicates for symbols and
> keywoards etc:
> symbol?, keyword?
> Is there an equivalent for literals...like literal?
Not at runtime. At macroexpansion time you can use list? and that's
Hello again,
How do I test for a literal? There are predicates for symbols and
keywoards etc:
symbol?, keyword?
Is there an equivalent for literals...like literal?
Cheers
Andreas
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, s
This is an unfortunate problem with clojure-mode being based on older Lisp
modes for Emacs. It doesn't really know how to read Clojure code, just how
to parse Lispy expressions in general.
Phil Hagelberg's fork of clojure-mode [1] has experimental support for
better indentation in forms like re
> On Sat, Jan 8, 2011 at 3:11 PM, Laurent PETIT wrote:
>> 2011/1/8 Ken Wesson
>>>
>>> On Sat, Jan 8, 2011 at 2:09 PM, Laurent PETIT
>>> wrote:
2011/1/8 Ken Wesson
>
> On Sat, Jan 8, 2011 at 12:33 PM, Stuart Halloway
> wrote:
>> One goal of resource scopes [1] is to help
In a long-running process, Java's ScheduledThreadPoolExecutor [1] will
handle this. Since Clojure's functions implement both Java Callable and
Runnable, they can be passed as arguments to the .submit and .schedule*
methods.
-Stuart Sierra
clojure.com
[1]
http://download.oracle.com/javase/6/do
Clojure, the language, provides many tools to manage *concurrency*, safe
access to mutable state from multiple threads. It does not currently offer
much in the way of *parallelism*, making something faster by dividing the
work across multiple threads or *distributed* across multiple machines.
S
The current model for clojure-contrib (one source repository with many
sub-modules) will be phased out after 1.3.0 final. See
http://dev.clojure.org/display/design/Common+Contrib+Build
One of the longer-term goals of this reorganization is to create
distributions that package up useful collecti
There's no solution here that will be perfect for all cases. But I've made
the decision that c.c.json will always "downgrade" Clojure types to the
nearest equivalent JSON types. It does not promise round-trip preservation
of types not specified by JSON, such as sets. In this case, that means
Ra
2011/1/8 Ken Wesson
> On Sat, Jan 8, 2011 at 3:11 PM, Laurent PETIT
> wrote:
> > 2011/1/8 Ken Wesson
> >>
> >> On Sat, Jan 8, 2011 at 2:09 PM, Laurent PETIT
> >> wrote:
> >> > 2011/1/8 Ken Wesson
> >> >>
> >> >> On Sat, Jan 8, 2011 at 12:33 PM, Stuart Halloway
> >> >> wrote:
> >> >> > One go
I'm using (emacs) clojure-mode 1.7.1 and I'm not happy with the how it
indents method definitions, e.g. in reify:
| (reify ItemListener
|(itemStateChanged
| [this e]
| (f (selected? e
The fact that Protocols method name, arg list and method body are all
indented to ne
On Sat, Jan 8, 2011 at 3:11 PM, Laurent PETIT wrote:
> 2011/1/8 Ken Wesson
>>
>> On Sat, Jan 8, 2011 at 2:09 PM, Laurent PETIT
>> wrote:
>> > 2011/1/8 Ken Wesson
>> >>
>> >> On Sat, Jan 8, 2011 at 12:33 PM, Stuart Halloway
>> >> wrote:
>> >> > One goal of resource scopes [1] is to help with sc
2011/1/8 Ken Wesson
> On Sat, Jan 8, 2011 at 2:09 PM, Laurent PETIT
> wrote:
> > 2011/1/8 Ken Wesson
> >>
> >> On Sat, Jan 8, 2011 at 12:33 PM, Stuart Halloway
> >> wrote:
> >> > One goal of resource scopes [1] is to help with scoping activities at
> >> > the REPL. That said, I think this is a
On Sat, Jan 8, 2011 at 2:09 PM, Laurent PETIT wrote:
> 2011/1/8 Ken Wesson
>>
>> On Sat, Jan 8, 2011 at 12:33 PM, Stuart Halloway
>> wrote:
>> > One goal of resource scopes [1] is to help with scoping activities at
>> > the REPL. That said, I think this is a "ramping up" problem -- I rarely if
>
On Jan 8, 12:25 pm, Brian Goslinga wrote:
> I find that if your code is functional, laziness works quite well
> (except for the rare expensive function + chunking problem).
>
> Perhaps your code isn't very functional? (your mention of binding
> suggests that)
That's a valid observation, most of t
Didn't knew about scope, it looks like an interesting feature. Still
as you point this is pretty much a problem BKAC!
On Jan 8, 12:33 pm, Stuart Halloway wrote:
> One goal of resource scopes [1] is to help with scoping activities at the
> REPL. That said, I think this is a "ramping up" problem -
Thank you for making this.
It's a great idea and really enjoyable to use.
Tim
On Jan 5, 7:14 am, LauJensen wrote:
> Hey everybody,
>
> Just a quick heads up that ClojureQL 1.0.0 is now released. All
> interfaces should be final and there are no known bugs. Works out of
> the box with PostgreSQL a
Thanks, everyone for all you help.
I noticed a few questions I should answer.
re: email option: I really just planned on sending a gmail to indicate
the job succeeded or failed. Being somewhat new to programming the
straightest path, for me, would be using clojure code (I'm not a
network guru, so
2011/1/8 Ken Wesson
> On Sat, Jan 8, 2011 at 12:33 PM, Stuart Halloway
> wrote:
> > One goal of resource scopes [1] is to help with scoping activities at the
> REPL. That said, I think this is a "ramping up" problem -- I rarely if ever
> hit it anymore.
> >
> > Stu
> >
> > [1] http://dev.clojure
On Sat, Jan 8, 2011 at 12:33 PM, Stuart Halloway
wrote:
> One goal of resource scopes [1] is to help with scoping activities at the
> REPL. That said, I think this is a "ramping up" problem -- I rarely if ever
> hit it anymore.
>
> Stu
>
> [1] http://dev.clojure.org/display/design/Resource+Scope
One goal of resource scopes [1] is to help with scoping activities at the REPL.
That said, I think this is a "ramping up" problem -- I rarely if ever hit it
anymore.
Stu
[1] http://dev.clojure.org/display/design/Resource+Scopes
> I've been doing a lot of Clojure lately and, of all thing,
> col
I have a simple library that mimics newLISP's net-eval command, which
will allow you to evaluate expressions in parallel on remote network
nodes,
http://nakkaya.com/net-eval.html
Regards...
--
Nurullah Akkaya
http://nakkaya.com
On Sat, Jan 8, 2011 at 4:12 AM, Nick Zbinden wrote:
> Hallo,
>
>
On Jan 7, 7:03 pm, Nicolas Buduroi wrote:
> I've been doing a lot of Clojure lately and, of all thing,
> collection's laziness coupled with a REPL is what makes me loose the
> most time. I really love having laziness built-in by default and I'm a
> REPL-driven development addict, but sometimes I j
N/m, this is a known issue. http://dev.clojure.org/jira/browse/CLJ-84
On Jan 8, 11:23 am, Alyssa Kwan wrote:
> Hi everyone!
>
> I'm having trouble getting the following to compile from "lein
> compile":
>
> (ns foo.Bar
> (:gen-class
> :methods [[chain [] foo.Bar]]))
>
> (defn -chain [this]
Apologies for the duplicate messages; Venkat Subramaniam and I are
co-hosting at track at Agile 2011 (Salt Lake City, August) on Development
Languages, Practices, and Techniques. The goal is to explore the edges of
Agile practice, to find out what's working for developers, what isn't
working, and t
Hi everyone!
I'm having trouble getting the following to compile from "lein
compile":
(ns foo.Bar
(:gen-class
:methods [[chain [] foo.Bar]]))
(defn -chain [this]
this)
My project.clj has foo.Bar declared as a :namespace.
Perhaps I'm not understanding the compile error. Is there a way t
Sweet! Thanks for the pointer.
It is a challenge to reverse-engineer someone else's code.
It is even more challenging to understand how it relates
to the algorithm and the idea. This will help a lot.
Tim Daly
On 1/8/2011 6:22 AM, Robert McIntyre wrote:
You may find
http://blog.higher-order.ne
On Sat, Jan 8, 2011 at 12:04 AM, Michael Gardner wrote:
> On Jan 7, 2011, at 9:19 PM, Ken Wesson wrote:
>
>> On the other hand, running a job scheduler from outside Clojure
>> results in cranking up a big, slow to start up, expensive JVM process
>> every single time a task needs to run, each of wh
You may find
http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/
useful for a clear explanation of PersistentVectors. Maybe even get
in touch with the guy for an addition to the book?
Thanks for your work on a literate clojure.
sincerely,
--Robert McIn
FlightCaster and Backtype are two startups that have used Clojure for
distributed computing. If I were going to do some distributed
computing in Clojure, I would start by looking at the tools they use.
http://www.datawrangling.com/how-flightcaster-squeezes-predictions-from-flight-data
Hello,
I was just using the very useful clojure.contrib.trace and had a
worry about using it with clojure 1.3. At the moment I just (use '
clojure.contrib.trace). As I see it, in future I will have to update
my project.clj to include clojure.contrib.trace, run lein deps and
restart my developmen
We use the Quartz library for job scheduling in our Clojure projects.
It's nice to have this done within the JVM so that we can easily
deploy to a new server without needing to configure cron (and the
differences with cron across platforms...).
http://www.quartz-scheduler.org/
If you want to call
43 matches
Mail list logo