Hi,
On 21 Okt., 00:04, Eric Lavigne wrote:
> I hope you are enjoying Clojure. Don't let all of this talk about
> compiling distract you from the fun part: writing code.
Especially since compilation is not necessarily necessary and in most
of the cases even counter-productive. Unless you use gen
The Revelytix crew will be in around dinner time on Thursday. I'm
happy to spring for food during the hackathon courtesy of Strange Loop
or take a group out to dinner - whatever happens to be convenient.
Alex Miller
--
You received this message because you are subscribed to the Google
Groups "C
I was having this problem, and what solved it for me was to customize
the ac-modes variable (using M-x customize-variable RET ac-modes RET)
and adding slime-repl-mode to the list. Once I added this, auto-
complete gets automatically enabled on my repl buffers as well. Give
it a try!
On Oct 17, 10:
Nickikt ,
All of the stuff covered in that blog post is in Sandbar 0.3.0-
SNAPSHOT. You will need to add [sandbar "0.3.0-SNAPSHOT"] as a
dependency.
There are also lots of working examples in the project on GitHub.
http://github.com/brentonashworth/sandbar/tree/master/src/sandbar/example/
Speci
On Wed, Oct 20, 2010 at 09:52, Alan wrote:
> I agree with Tom (and with Stuart). I tend to like using ->> when it's
> convenient, since all you're really doing is performing a list of
> transformations on a single object. However, the let is better
> documentation if that's ever going to matter.
I took a different approach, not wildly "clojurish", type-hinted,
ugly, but also pretty fast. About 1.2ms on my machine (after about 10
runs so the JIT has done its magic).
The approach is to look at each character, or pair of adjacent
characters, as the potential center of a palindrome and then
I want to make a little Webstuff with Clojure. Wanted to use Sandbar
formes and looked at the blogpost
http://formpluslogic.blogspot.com/2010/09/taming-html-forms-with-clojure.html.
There is kind of a mismatch between blog, implementation and
documentation.
For the Blogpost i need something like
On Wed, 20 Oct 2010 18:04:17 -0400
Eric Lavigne wrote:
> The short answer is that it's okay to use Clojure directly. You don't
> need Leiningen.
>
> If you are familiar with C programming, the difference between the
> Clojure compiler and Leiningen is like the difference between GCC and
> Make.
I understand that contrib wasn't intended to be a standard library,
but it inclusion in contrib did suggest to me that a library was being
widely used (and tested) and is relatively stable, and
that is there was a common problem, then contrib would likely have a
library for it
Then there is the co
On Wed, 20 Oct 2010 09:59:26 -0600
"Eric Schulte" wrote:
> Mike Meyer writes:
>
> > It was also more work than submitting patches looks to be for apache,
> > django, gnu
>
> FWIW in gnu projects if your patch is >10 lines long then they do
> require you to go through a fairly lengthy attributi
The short answer is that it's okay to use Clojure directly. You don't
need Leiningen.
If you are familiar with C programming, the difference between the
Clojure compiler and Leiningen is like the difference between GCC and
Make. Using the compiler directly is fine when you have only one file
of so
You can use @x as shorthand for (force x) too, since delays implement
IDeref.
On Oct 20, 1:25 pm, Paul Richards wrote:
> On 20 October 2010 21:21, Paul Richards wrote:
>
>
>
> > On 20 October 2010 20:45, Paul Richards wrote:
> >> On 20 October 2010 20:23, Alan wrote:
> >>> Augh no, future is n
On 20 October 2010 21:21, Paul Richards wrote:
> On 20 October 2010 20:45, Paul Richards wrote:
>> On 20 October 2010 20:23, Alan wrote:
>>> Augh no, future is not lazy; it's for multithreading. Try delay - it's
>>> identical to the (suspend) given by the OP.
>>>
>>> user=> (time (def x (delay (
Looks like its already done:
https://www.assembla.com/spaces/clojure/tickets/103-gc-issue-99--incorrect-error-with-if-let
On 20 October 2010 22:20, David Jagoe wrote:
> Hi all,
>
> I noticed today (clojure 1.2) that using if-let incorrectly thusly:
>
> (if-let [a 1]
> (println "1")
> (println
On 20 October 2010 20:45, Paul Richards wrote:
> On 20 October 2010 20:23, Alan wrote:
>> Augh no, future is not lazy; it's for multithreading. Try delay - it's
>> identical to the (suspend) given by the OP.
>>
>> user=> (time (def x (delay (Thread/sleep 1
>> "Elapsed time: 0.256312 msecs
Hi all,
I noticed today (clojure 1.2) that using if-let incorrectly thusly:
(if-let [a 1]
(println "1")
(println "2")
(println "3"))
Instead of e.g.
(if-let [a 1]
(println "1")
(do
(println "2")
(println "3")))
Results in this error
if-let requires a vector for its binding
great! good to know
On Oct 20, 3:21 pm, Rich Hickey wrote:
> On Oct 20, 1:34 pm, cej38 wrote:
>
>
>
>
>
> > This question leads into something that I read in Joy of Clojure (page
> > 161 in the latest MEAP edition):
> > "If you manage to hold onto the head of a sequence somewhere within a
> > fu
On 20 October 2010 20:23, Alan wrote:
> Augh no, future is not lazy; it's for multithreading. Try delay - it's
> identical to the (suspend) given by the OP.
>
> user=> (time (def x (delay (Thread/sleep 1
> "Elapsed time: 0.256312 msecs"
> #'user/x
> user=> (time (force x))
> "Elapsed time:
Augh no, future is not lazy; it's for multithreading. Try delay - it's
identical to the (suspend) given by the OP.
user=> (time (def x (delay (Thread/sleep 1
"Elapsed time: 0.256312 msecs"
#'user/x
user=> (time (force x))
"Elapsed time: 1.19261 msecs"
See also promise/deliver:
user=>
On Oct 20, 1:34 pm, cej38 wrote:
> This question leads into something that I read in Joy of Clojure (page
> 161 in the latest MEAP edition):
> "If you manage to hold onto the head of a sequence somewhere within a
> function, then that sequence will be prevented from being garbage
> collected. Th
user=> (doc future)
-
clojure.core/future
([& body])
Macro
Takes a body of expressions and yields a future object that will
invoke the body in another thread, and will cache the result and
return it on all subsequent calls to deref/@. If the computation has
not yet f
Hi,..
Having just completed reading "Purely Functional Data Structures"
(Chris Okasaki), I'm keen to try things out in Clojure.. Something
used fairly often in the book is the notion of a suspension. It's
effectively a way to mark an expression as being lazy and memoized.
I've not seen anything
thanks guys, im at school right now so i cant really try anything out,
i think im just going to use a text editor with coljure via command
line.. yes i was using repl, later i found that i could edit full
files by simply saving a new file but could not compile them, i think
i will try using command
Not only did my question get answered, but I learned several new
things in the process.
Thanks!
Dave
On Wed, Oct 20, 2010 at 1:52 PM, Alan wrote:
> When you work with a lazy sequence, Clojure (java really)
> automatically garbage-collects elements you're done with. It can only
> be certain you'
On Wed, Oct 20, 2010 at 10:46 AM, zkim wrote:
> Hey All,
>
> ClojureDocs is now in beta, relevant info below.
>
> Site: http://clojuredocs.org
> Beta Info: http://clojuredocs.wordpress.com/2010/10/19/clojuredocs-beta/
> Main Repo: http://github.com/zkim/clojuredocs
>
> Thanks, Zack.
Hey All,
When you work with a lazy sequence, Clojure (java really)
automatically garbage-collects elements you're done with. It can only
be certain you're done with them if you no longer have any reference
to them, direct or indirect. If you've bound the head of the sequence
to a local, then you can still a
This question leads into something that I read in Joy of Clojure (page
161 in the latest MEAP edition):
"If you manage to hold onto the head of a sequence somewhere within a
function, then that sequence will be prevented from being garbage
collected. The simplest way to retain the head of sequence
By the way, http://tinyurl.com/2a235cn is an example of your style of
let being used in the Clojure source: the definition of defn itself.
It's a little overdone and weird-looking, but the alternative of
deeply nested forms would be much worse.
I didn't notice your question about technical tradeof
Hi,
readability might be a concern but it's not the only criteria.
a) Do you need to trace intermediate results ? Then you need a
binding so you do not redo the work twice (presumably, I exclude memoized
functions here). Of course if the code has some side effects, the choice
is obvious,
I agree with Tom (and with Stuart). I tend to like using ->> when it's
convenient, since all you're really doing is performing a list of
transformations on a single object. However, the let is better
documentation if that's ever going to matter. Not because it makes it
easier to understand what ope
Hey All,
ClojureDocs is now in beta, relevant info below.
Site: http://clojuredocs.org
Beta Info: http://clojuredocs.wordpress.com/2010/10/19/clojuredocs-beta/
Main Repo: http://github.com/zkim/clojuredocs
Thanks, Zack.
--
You received this message because you are subscribed to the Google
G
All right, I suppose I can accept that. I'm not quite at the point
where I can fix bugs, but maybe that will happen soon. I do know that
the more I use this language, the more I dig it.
Thanks for the feedback,
David
On Oct 15, 7:24 am, Stuart Halloway wrote:
> It's all about priorities. At this
Mike Meyer writes:
> It was also more work than submitting patches looks to be for apache,
> django, gnu
FWIW in gnu projects if your patch is >10 lines long then they do
require you to go through a fairly lengthy attribution process.
http://www.gnu.org/prep/maintain/html_node/Copyright-Papers.
I apologize for presenting you with a moving target. That was
definitely not my attention.
I should have realized I messed up the content of the files but
unfortunately had no clue what all these exceptions meant.
Therefore I really appreciate your detailed description of the
conclusion you draw
Hi,
On 20 Okt., 14:04, Stefan Rohlfing wrote:
> I really learned at lot about dealing with namespaces today.
I hope you also learned a bit about error messages. ;)
"No such var: user/create": That means you get past the namespace
declaration. Hence they load fine. But in the user namespace the
You were right again. I left a code snippet from the book in
charge.clj and forgot to remove it later.
Now everything seems to work fine, even when importing the active-
record.user namespace as 'user':
(ns active-record.program.cor
Hi,
On 20 Okt., 11:35, Stefan Rohlfing wrote:
> Evaluating your suggested declaration:
>
> (ns active-record.program.core
> (:require [active-record.user :as u])
> (:require [active-record.charge :as charge]))
>
> I get the following error message:
>
> ;; Unable to resolve symbol: user=>
Evaluating your suggested declaration:
(ns active-record.program.core
(:require [active-record.user :as u])
(:require [active-record.charge :as charge]))
I get the following error message:
;; Unable to resolve symbol: user=> in this context
;; [Thrown class java.lang.Exception]
The sam
Hi,
On 20 Okt., 11:09, Stefan Rohlfing wrote:
> Yes, I also tried charge/create. The error message is different, but
> it still does not work:
More evidence for a problem with the user alias. Try a different one
like (:require [active-record.user :as u]).
Sincerely
Meikel
--
You received thi
Yes, I also tried charge/create. The error message is different, but
it still does not work:
;; No such namespace: charge
;; [Thrown class java.lang.Exception]
On Oct 20, 5:03 pm, Meikel Brandmeyer wrote:
> Hi,
>
> On 20 Okt., 10:46, Stefan Rohlfing wrote:
>
> > You are right, there was a syn
Hi,
On 20 Okt., 10:46, Stefan Rohlfing wrote:
> You are right, there was a syntax error in charge.clj. However, after
> correcting the error I get the same error message as with the other
> namespace declaration:
Did you try the same with charge/create? Examples in books are not
necessarily cor
You are right, there was a syntax error in charge.clj. However, after
correcting the error I get the same error message as with the other
namespace declaration:
;; No such var: user/create
;; [Thrown class java.lang.Exception]
On Oct 20, 4:37 pm, Meikel Brandmeyer wrote:
> Hi,
>
> On 20 Okt.,
Hi,
On 20 Okt., 10:09, Stefan Rohlfing wrote:
> ;; EOF while reading
> ;; [Thrown class java.lang.Exception]
Are you sure, that you don't have some syntax error somewhere?
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post
The name 'user' is taken from an example in the book. The author
executes the code at the REPL like this:
(require '(active-record [user :as user]))
user=> (user/create {:login "rob"
:first_name "Robert"
:last_name "Berger"
On 20 October 2010 10:09, Stefan Rohlfing wrote:
> Dear Clojure group,
>
> I am currently reading chapter 9.1 MySQL & clj-record of 'Clojure in
> Action'.
>
> clj-record seems pretty awesome, but I once again got lost in
> namespace jungle.
>
> Here is a concrete example:
>
> -
Dear Clojure group,
I am currently reading chapter 9.1 MySQL & clj-record of 'Clojure in
Action'.
clj-record seems pretty awesome, but I once again got lost in
namespace jungle.
Here is a concrete example:
File 1:
Yup, it's an autodoc bug. I had fixed the bug, but forgot to pull the
new version into the area where the autodoc robot runs. So the next
time the robot ran, it undid the fixes. :(
All fixed up now.
Tom
On Oct 19, 7:42 pm, Sean Corfield wrote:
> On Tue, Oct 19, 2010 at 6:37 PM, Brent Millare
47 matches
Mail list logo