On Wednesday 21 July 2010 06:32:02 Mark Engelberg wrote:
Hi Mark,
> I would definitely welcome a literate Clojure tool.
You might want to have a look at Emacs' org-mode [1]. It has a facility
called Babel [2] that allows for literate programming in all the
languages listed at [3], Clojure being
On Wed, Jul 21, 2010 at 11:52 AM, Krukow wrote:
>
> I am interested in getting the combination of Emacs+slime+swank-
> clojure, alex-and-georges.debug-repl and clojure debugging toolkit to
> work together.
debug-repl is kind of integrated already into swank by Hugo Duncan.
> user> (let [c 1
>
I am interested in getting the combination of Emacs+slime+swank-
clojure, alex-and-georges.debug-repl and clojure debugging toolkit to
work together.
I'm almost there but I am missing support for debug-repl when using
using Emacs M-x slime-connect with a lein swank server. The debug-repl
doen't b
I would definitely welcome a literate Clojure tool.
--
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 members are moderated - please be patient with your
first post.
Might be of interest to some here: http://lambda-the-ultimate.org/node/4017
Antony Blakey
--
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787
Human beings, who are almost unique in having the ability to learn from the
experience of others, are also remarkable for their apparent
On Jul 20, 9:02 pm, Laurent PETIT wrote:
> Yeah. But again, please (I've asked this before, nobody answered), what do
> you precisely mean by "reload all in current REPL": a reload at the
> namespace level ? Or really *only* reloading the vars you carefully and
> manually sent to the REPL over tim
For some reason
http://build.clojure.org/snapshots/org/clojure/clojure-contrib/maven-metadata.xml
includes 1.2.0-master-SNAPSHOT. This version doesn't exist anymore, so
if you try to do an open-ended version range on contrib, it blows up
in your face.
--
You received this message because you are
Sure, but Clojure is a lot more than the STM. Assuming one's
application doesn't use refs heavily (or, contended refs, perhaps),
then I presume the coordination issues wouldn't apply?
- Chas
On Jul 20, 2010, at 8:46 PM, peter veentjer wrote:
Hi Chas,
if you want to 'spawn' independent pr
More specifically, the Sun JVM has an implementation limit of 64k per
classfile. This is almost never exceeded in "normal" functions, but
can easily be exceeded by generated code, or by very, very large
literals. Either break generated chunks of code into smaller bits or
separate data fro
your functions are way too big, write more smaller functions
On Tue, Jul 20, 2010 at 6:35 PM, Praki wrote:
> Hi,
>
> I am getting this error when trying to load one of my modules. Does
> anybody know if the compiler checks for method lengths? Has anyone run
> into this issue and have suggestions
Hi,
I am getting this error when trying to load one of my modules. Does
anybody know if the compiler checks for method lengths? Has anyone run
into this issue and have suggestions on how to work around this?
Thanks,
Praki
Compiling singularis.repo.bucket to /home/pprakash/projects/gwave/repo/
ta
Hi Chas,
if you want to 'spawn' independent processes over different machines,
terracotta could be an option. But as soon as these processes are
going to share state, it gets a lot more complicated since a scalar
clock MVCC based stm is not going to be scalable over different
machines.
Afaik the
A single `for` will suffice:
(let [nums (range 1 4)]
(for [x nums y nums]
(* x y)))
If you wanted to build a map from pairs of elements of the input
collection to the matching values of your distance function, you could
do something like
(into {} (for [x xs y xs] [[x y] (distance x y)]))
Here is a bit on monads for clojure programmers.
A monad tutorial for Clojure programmers (part 1)
=>
http://onclojure.com/2009/03/05/a-monad-tutorial-for-clojure-programmers-part-1/
(don't jet understand monads either but I think it sounds interesting
(and complicated))
I want to learn haskell
On 20 July 2010 23:41, Moritz Ulrich wrote:
> I think the tour problem is the (def m-fib (memoize fib)). You create
> a new memoized function m-fib, while fib will internally call the
> non-memoized fib. You have to do something like: (binding [fib
> (memoize fib)] (fib 42)).
> However, this will
Hi,
I'm using replace-str and replace-first-str (from clojure-contrib
1.2.0-beta1), and it seems that these do not have the same
functionality contrary to their descriptions.The following code will
work with the regular (replace-str), but (replace-first-str) returns
an error:
user=> (replace-str
Offtopic: Java doesn't support tail-recursive calls, so your fib will
blow up the stack for larger ns. Use recur for recursion.
I think the tour problem is the (def m-fib (memoize fib)). You create
a new memoized function m-fib, while fib will internally call the
non-memoized fib. You have to do s
2010/6/7 Mark Engelberg :
> Yes, but in (some versions of) Scheme, (sqrt -1) yields i.
>
> Representing complex numbers and just doing math between two complex
> numbers is not the problem. Retrofitting Clojure math so that all
> operations work on the entire numeric tower, allowing you to
> seaml
On Jul 20, 2010, at 2:27 PM, Chas Emerick wrote:
> Top-level calls are definitely frowned upon (and almost never necessary).
> Almost by definition, they're side-effecting, and you're not always in
> control of when code is loaded (e.g. if someone is using your code as a
> library, top-level c
If we have tree recursive procedure such as the follows, how can we
use memoize it so that it automatically caches the values it has
already computed .
(defn fib [n]
(println "Calling fib with arg --> " n)
(cond
(= n 0) 0
(= n 1) 1
:else (+ (fib (- n 1))
(fib (- n 2)))
Hi Travis,
As you noticed, there is no error handling for the case where you pass a bad
spec to defrecord. In your example, the spec has method bodies but no
protocol-or-interface-or-Object.
I have created a ticket for this at
https://www.assembla.com/spaces/clojure/tickets/405-better-error-me
The lack of complex numbers is keeping me on the fence about Clojure.
I could (and partially have) implement them in Clojure itself, but
this is not as satisfying as having them built in with reader syntax
and so on. I don't have the will right now to learn enough about
Clojure internals and how t
Hello, I've come across the following compiler error in defrecord and
deftype:
java.lang.RuntimeException: java.lang.ClassCastException:
clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol
(test.clj:0)
To generate the error, evaluate the following code:
(ns test)
(defrecord TestRe
On Mon, Jul 19, 2010 at 8:33 PM, Mark Derricutt wrote:
> I liked the *look* of CAL - and was quite impressed that it had an
> eclipse plugin. But it seems to be dead from what I can see on the
> website. Or at least rather dormant.
it is somewhat back. apparently. kinda.
http://groups.google.c
On Tue, Jul 20, 2010 at 8:02 PM, Laurent PETIT wrote:
>
> Yes. So this would be a "simple to understand" behavior. What still bothers
> me in the end, is that's is the kind of "simple to understand behavior"
> that'll bit anybody from time to time ( after having spent 15 minutes
> understanding wh
2010/7/20 Chas Emerick
>
> On Jul 20, 2010, at 8:34 AM, Laurent PETIT wrote:
>
> So e.g. code completion while in the file editor works on a set of
>> possible completions, and code completion while in the REPL works on another
>> set of possible completions ? e.g. if I dynamically define a new
On Jul 20, 2010, at 8:34 AM, Laurent PETIT wrote:
So e.g. code completion while in the file editor works on a set of
possible completions, and code completion while in the REPL works on
another set of possible completions ? e.g. if I dynamically define a
new var in the REPL, it's not sugg
On Jul 20, 2010, at 9:14 AM, Lee Spector wrote:
On Jul 20, 2010, at 4:18 AM, Laurent PETIT wrote:
Lee, did you remove the automatic build-on-save behavior because
you "feared" that it would give annoyances to you, or because you
encountered annoyances and wanted to get rid of them ? If th
All,
please no language flamewar / troll / whatever on this ml. There are other
places for that, as you've already cited.
2010/7/20 Nicolas Oury
> On Tue, Jul 20, 2010 at 5:19 PM, Sang Noir
> wrote:
> > Me: So why isn't "Monad" called "DataStructure"
>
> Me: Because they are not data structure
Thanks George, I'll definitely grab that from Clojars.
Ryan
--
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 members are moderated - please be patient with your
fi
On Tue, Jul 20, 2010 at 5:19 PM, Sang Noir wrote:
> Me: So why isn't "Monad" called "DataStructure"
Me: Because they are not data structures.
They are an abstraction that can represent computations. One kind of
computation are the non-deterministic ones.
They look like lists.
But parsing, contin
On Jul 20, 12:19 pm, Sang Noir wrote:
> I'm really tickled by the reaction to this comment on places like
> reddit. Especially how all the Haskell apologists are rushing to the
> defense of their language even though it's obvious that no Haskell
> programmer UNDERSTANDS the language, especially
On Tue, Jul 20, 2010 at 12:19 PM, Sang Noir wrote:
> I'm really tickled by the reaction to this comment on places like
> reddit. Especially how all the Haskell apologists are rushing to the
> defense of their language even though it's obvious that no Haskell
> programmer UNDERSTANDS the language,
> If a web app does have a large number of concurrent requests, then you
> need a model where requests share threads. A full blown event based
> programming model is not required for thread sharing.
Of course you can mix asynch and threaded at your leasure, with
appropriate interfaces in between;
By scalable, I mean that the capacity of the application can be
increased by adding resources. Conjure and Compojure are scalable
under this definition.
If a web app does have a large number of concurrent requests, then you
need a model where requests share threads. A full blown event based
progr
On Jul 18, 5:17 pm, defn wrote:
> I think I speak for everyone when I say: "thank you".
inc
--Brian
--
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 members are m
I'm really tickled by the reaction to this comment on places like
reddit. Especially how all the Haskell apologists are rushing to the
defense of their language even though it's obvious that no Haskell
programmer UNDERSTANDS the language, especially the type system.
Not exaggerating here. To confi
I've edited the title because I forgot to include a description of
what I'm trying to do in the original post's title.
Mark, thanks for the example.
mh
On Jul 20, 11:13 am, Mark Rathwell wrote:
> There are several ways to do it, but one example using list comprehension:
>
> (let [nums [1 2 3]]
On Mon, Jul 19, 2010 at 10:20 PM, Mark Engelberg
wrote:
>
> I think stateful things are too hard to do in Haskell, and they are an
> important part of most real-world programs. Clojure's blend of
> persistent data structures with a variety of reference-type objects
> that can contain them feels m
> You can build a scalable app with Conjure on Jetty. You don't need an
> evented server like Aleph or node.js to build a scalable app.
Depends on what you mean by scalable. If you want to keep 250 000
concurrent mostly idle connections, you'll likely want to be event
based.
--
/ Peter Schuller
There are several ways to do it, but one example using list comprehension:
(let [nums [1 2 3]]
(for [n1 nums]
(for [n2 nums]
(* n1 n2
=> ((1 2 3) ( 2 4 6) (3 6 9))
- Mark
On Tue, Jul 20, 2010 at 10:44 AM, Michael Harrison (goodmike) <
goodmike...@gmail.com> wrote:
> I'm worki
> the debug-repl by George Jahad does the
> right thing, it's hard to tell what's going on without really seeing
> the code you refer to.
>
Actually it's by Alex Osborne, http://meshy.org/ , and me. I created
the version that required a compiler patch, and then Alex showed us
how to do it withou
You are right Ryan, it should be a syntax-quote, not a normal one. I
never noticed it because I always use "use", not "require".
Just to be clear, the recommended way to use the debug-repl is to pull
down the latest version from Clojars, add it like so to the ns you
want to debug:
(use ‘alex-and
I'm working on a project that involves calculating statistical
distance between the elements of a set. This is conceptually like a
distance chart between cities that often appears on a travel map, or
even a child's multiplication table with the numbers 1 - 10 running
across the top and down the lef
On Tue, Jul 20, 2010 at 12:19 PM, Chas Emerick wrote:
>
> Nicolas, just out of curiosity, what program (or class of program(s)) are you
> interested in that "can't be typed in Haskell"? I'm always interested in
> seeing examples of static typing preventing the implementation of certain
> class
I just released a new version of Conjure, 0.7.0. Since Conjure
supports Leiningen with this release, you can now add it to your
project.clj file and use lein deps to download the jars.
More information on downloading and creating a conjure project, see
the getting started page at:
http://wiki.git
On Mon, Jul 19, 2010 at 3:00 PM, Daniel Gagnon wrote:
> By the way, what's left to do for the Windows support to stop being
> experimental?
Mostly we need volunteers to port the changes from the bash script to the
batch file and test the changes. Also I don't think the self-install feature
will e
On Jul 20, 2010, at 9:15 AM, Lee Spector wrote:
> On Jul 20, 2010, at 7:43 AM, Chas Emerick wrote:
>>
>> I'm curious: are there any other lisp environments where reload-on-save is
>> the default?
>
> I don't think I've ever seen one. I can't say I've tried them all, but I've
> worked in a bunc
2010/7/20 Lee Spector
>
> On Jul 20, 2010, at 4:18 AM, Laurent PETIT wrote:
> >
> > Lee, did you remove the automatic build-on-save behavior because you
> "feared" that it would give annoyances to you, or because you encountered
> annoyances and wanted to get rid of them ? If the latter, could yo
2010/7/20 Lee Spector
>
> On Jul 20, 2010, at 4:15 AM, Laurent PETIT wrote:
>
> > Oh, maybe I understand: by "partial drafts", you mean "pseudo-code",
> directly written in clojure, is it this ?
> >
> > If there was a shortcut key to quickly wrap/unwrap a top level defn with
> (comment), and if t
On Jul 20, 2010, at 7:43 AM, Chas Emerick wrote:
>
> I'm curious: are there any other lisp environments where reload-on-save is
> the default?
I don't think I've ever seen one. I can't say I've tried them all, but I've
worked in a bunch over several decades...
-Lee
--
Lee Spector, Professo
On Jul 20, 2010, at 4:18 AM, Laurent PETIT wrote:
>
> Lee, did you remove the automatic build-on-save behavior because you "feared"
> that it would give annoyances to you, or because you encountered annoyances
> and wanted to get rid of them ? If the latter, could you please expand on
> what t
On Jul 20, 2010, at 4:15 AM, Laurent PETIT wrote:
> Oh, maybe I understand: by "partial drafts", you mean "pseudo-code", directly
> written in clojure, is it this ?
>
> If there was a shortcut key to quickly wrap/unwrap a top level defn with
> (comment), and if the keyboard shortcut for "evalu
Hey Rich,
I want to put http://en.wikipedia.org/wiki/File:Clojure-glyph.svg to
other-language wiki (Polish) and I need your permission to put this
logo there. Earlier person who you gived a permission puted the logo
on English Wikipedia, so other Wikipedias can't use it and I can't
send it to Wiki
On 19 July 2010 20:42, Brenton wrote:
> Hi Paul,
>
> Pure functions have two properties: they cannot produce side effects
> and the return value is a function (in the mathematical sense) of its
> arguments and nothing else. There are two corresponding questions that
> you can ask when looking at a
> The above is the content of my class path. Is there anything wrong?
It seems your clojure.jar isn't in the classpath. It's tweaked in the
first lines of the script. And cygwin uses ':' as a CLASSPATH
separator, so correct these too at the bottom of the script.
--
You received this message beca
I liked the *look* of CAL - and was quite impressed that it had an
eclipse plugin. But it seems to be dead from what I can see on the
website. Or at least rather dormant.
--
Pull me down under...
On Tue, Jul 20, 2010 at 1:04 PM, Raoul Duke wrote:
> or, how about CAL?
--
You received this mes
Conjure cannot be used with Aleph. Conjure is based on Ring. Ring
does not currently support the evented programming model used by
Aleph.
You can build a scalable app with Conjure on Jetty. You don't need an
evented server like Aleph or node.js to build a scalable app.
On Jul 18, 5:26 pm, Vict
When i code i don't think of them as close. Possibly because Haskell's
functional purity, strong type system, pervasive laziness puts it in
another grade "above" clojure.
Clojure feels closer to Scheme to me, and I don't think it just all the
parenthesis. So the decision for me was between cl
2010/7/20 Chas Emerick
>
> On Jul 20, 2010, at 4:29 AM, Laurent PETIT wrote:
>
> You're right. When ccw will be remotely connected to web server instances,
>> the current behaviour will be a recipe for disaster. The "middle way" is
>> definitely the final target, but providing good defaults for
2010/7/20 Chas Emerick
>
> On Jul 20, 2010, at 4:29 AM, Laurent PETIT wrote:
>
> You're right. When ccw will be remotely connected to web server instances,
>> the current behaviour will be a recipe for disaster. The "middle way" is
>> definitely the final target, but providing good defaults for
On Jul 20, 2010, at 4:29 AM, Laurent PETIT wrote:
You're right. When ccw will be remotely connected to web server
instances, the current behaviour will be a recipe for disaster. The
"middle way" is definitely the final target, but providing good
defaults for the "smart-reload-on-save" shou
Nicolas, just out of curiosity, what program (or class of program(s))
are you interested in that "can't be typed in Haskell"? I'm always
interested in seeing examples of static typing preventing the
implementation of certain classes of programs, insofar as such things
are an antidote to my
Hi,
On Jul 20, 12:19 pm, B Smith-Mannschott wrote:
> > Why does (r 2) get evaluated before the seq is needed ?
>
> It doesn't get evaluated before it's needed. As far as the
> implementation is concerned, it is needed before (r 3) is evaluated.
You have to be careful what you mean with "evaluat
On 2010-07-13, Alex Osborne wrote:
> Hi David,
>
> David Soria Parra writes:
>> any feeback on this so far?
>
>>> A typical example would be:
>>> (digest-to-str (digest "hello world" :algorithm "SHA-1"))
>
> "digest-to-str" is a bit misleading as hexadecimal digits are not the
> only way you can
On Thu, Jul 15, 2010 at 12:16, ka wrote:
>> (for [a (r 2), b (r 3)] [a b])
>> ; produces:
>>
>> (
>> [0 0] [0 1]
>> [0 2] [1 0] [1 1] [1 2])
>
> Why does (r 2) get evaluated before the seq is needed ?
>
> => (def k (for [a (r 2), b (r 3)] [a b]) )
>
> #
On Windows, Lein 1.2 fails (though Lein 1.1 works) with the following
message:
D:\learn\hello>lein12 test
Exception in thread "main" clojure.lang.LispReader$ReaderException:
java.lang.Exception: Invalid token: D:
at clojure.lang.LispReader.read(LispReader.java:180)
at clojure.core$
@Chouser
Sorry, my above post was directed as a question to you. Have to stop
being lazy while posting atleast :) !
--
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 ne
Awesome awesome new features !!
Yes, when does windows support stop being experimental ?
Even though one of the new features is -
* Added experimental Windows support.
Has anyone tried lein 1.2 on windows (with the lein.bat on
http://github.com/technomancy/leiningen) ?
--
You received this m
2010/7/20 Chas Emerick
> Saving a file is not an invitation to do anything with the REPLs that I
> started -- it's an invitation to save the file! :-D
>
> And no, I write a lot of code in the REPL at all. I *load* a lot of code
> into REPLs, yes, multiple active REPLs, all the time. Actually wr
2010/7/20 Rick Moynihan
> On 19 July 2010 22:25, Laurent PETIT wrote:
> >
> > 2010/7/19 Peter Schuller
> >> I also sympathize and agree that it can be hugely problematic if an
> >> environment stomps on your carefully prepared REPL in ways you don't
> >> expect. I'm not sure how to best reconci
2010/7/20 Lee Spector
>
> On sketching-in-nonlinear-order, that's definitely how I write too, both
> code and prose
> (and email!).
This explains a lot of things :-p (just kidding)
> This has implications not only for the automatic build behavior we were
> discussing but also for the struc
Hi Lee!
2010/7/20 Lee Spector
>
> I'm using Eclipse/Counterclockwise these days but one of the first things I
> did was to figure out how to turn off the automatic build-on-save behavior.
> I save all of the time -- usually every "complete thought" which may be as
> little as a symbol or a line
Hi !
First of all, thanks to you (and to others as well, I will not repeat the
many thanks I would like to write everywhere in the thread !) for the
detailed answer.
Definitely food for thought !
2010/7/20 j-g-faustus
> I haven't tried CCW, but I am happy with Enclojure 6.8. (In 6.9 the
> file
I have used Haskell as a main language 7 or 8 years.
I changed for (in no particular order):
1. macros and all the lispy meta things.
2. Clojure classification of stateful things
3. JVM, but with enough independance
4. A part of my research is on type systems more souple than ML's or
Haskell's. Th
2010/7/20 Meikel Brandmeyer
> Hi,
>
> On Jul 19, 11:09 pm, Laurent PETIT wrote:
>
> > You got me thinking that all the stuff I and you were talking about
> > concerning namespace dependency graph, etc. for only reloading the
> > appropriate namespaces should be possible to be run from the runnin
Hello All,
I need your support here. While troubleshooting I added "echo CLASSPATH".
C:\Users\rmicro\goog>lein swank
";C:\Users\rmicro\goog\lib\
swank-clojure-1.2.1.jar"
"C:\cygwin\clein\leiningen-1.1.0-standalone.jar";";C:\Users\rmicro\goog\lib\swan
k-clojure-1.2.1.jar";".;C:\Program Files\Java\
77 matches
Mail list logo