Greetings.
On 2012 Jan 20, at 01:26, Mark Nutter wrote:
On Thu, Jan 19, 2012 at 11:42 AM, David Brunell quantal...@gmail.com wrote:
How long did it take you to get comfortable with paredit? I keep getting
frustrated and going back to manually matching parens.
I had the same experience
Thanks for the suggestions, I have created a wrapper function and it
works, but it seems, there are more problems.
I use reader/read-string function to parse clojure data structures
sent as POST messages, and it doesn't recognize keywords in IE.
For example, it treats {:status :ok} as
I just have tried to replace all special characters in core.js to
their escaped equivalents (\uFDD0 for keywords) and it works fine.
But I still not certain where this bug comes from.
On Jan 20, 12:56 pm, gchristnsn gchrist...@gmail.com wrote:
Thanks for the suggestions, I have created a wrapper
On Thursday, January 19, 2012 9:52:44 PM UTC, bsmith.occs wrote:
Incidentally, what's with this strange form of let?
(let (font-lock-mode) ;; - shouldn't this bind variables?
(clojure-mode-font-lock-setup))
In Common Lisp (and presumably in Emacs Lisp as well), 'let' takes an
Is there a way to pretty-print an object with its metadata?
If I (set! *print-meta* true) at the REPL, I can see the metadata. If I
use (pprint thing), I can see the structure much more easily. How can I do
both?
- Chris
--
You received this message because you are subscribed to the Google
Hi,
how about something like this?
(defn pprint-with-meta
[thing]
(when (instanceof? IMeta thing)
(print ^)
(pprint (meta thing))
(print ))
(pprint thing))
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
Thanks Meikel.
So I guess from your reply that there is no built-in way to do this, right?
The objects I'm trying to inspect can be deeply nested maps and vectors,
and I want to see all the metadata - not just on the root object. I guess
I would have to either re-implement some of the logic
It would be helpful if you could investigate the precise problem if there
is one and submit a JIRA ticket.
On Friday, January 20, 2012, gchristnsn gchrist...@gmail.com wrote:
Thanks for the suggestions, I have created a wrapper function and it
works, but it seems, there are more problems.
I
Hi,
I don't know a built-in way. But that doesn't mean, that there isn't one.
You could ask Tom Faulhaber directly. He did the pretty print stuff.
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
By looking at pprint.clj, I have come up with something that seems to work.
No hacking is necessary - the code in pprint is impressively clear and
extensible. It's obviously designed to allow exactly this sort of
extension to the printing mechanism.
user (defn ppm [obj]
(let
Cool. :) Good to hear, that things are working. Nice to have around.
Meikel
--
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
Interning a string is caching it in a string pool that lives in the jvm's
permgen space. Calling .intern() on a string either adds it to the pool or
return the string object that's already in the pool. This is safe to do
for strings that are defined statically, generally you don't want to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 01/15/2012 06:18 PM, Matt Stump wrote:
Is there a way to set different values for global vars when running
tests as opposed to the development or production environment? I
need to control which database my tests for a noir project connect
We have released JARs for ClojureScript to the Sonatype OSS
repository. They will be uploaded to the Maven Central repository
within 24 hours.
We do not yet have any automated build/release cycle for
ClojureScript. If you want to track the latest ClojureScript
development, please continue to use
Hi All,
Here is a simple problem for which I nevertheless can't seem to find
the right solution: How to run over several sequences in parallel for
side-effects? Here is one way:
(dorun (map some-fn-with-side-effects sequence-1 sequence-2))
However, I was told that the form (dorun (map ...
Hey everyone,
I've been playing around with Clojure, and came up with this little
thing to allow you to easily pull scripts in from Gist and execute
them. Thought it might be useful to someone!
https://gist.github.com/1646223
- DAemon
--
You received this message because you are subscribed to
That third trick works in standard vim when you type da(...except you
don't have to be on the opening paren, you can be anyplace within the sexp
(as long as you're not within a smaller sexp, in which case you'll get that
one.)
A couple quick macros can handle the other two. If those three are the
Agreed. I find paredit mode essential for any serious coding. That said,
there are brief periods in which I find I like it off.
On Jan 19, 2012 1:57 PM, Sean Corfield seancorfi...@gmail.com wrote:
On Thu, Jan 19, 2012 at 9:07 AM, Laurent PETIT laurent.pe...@gmail.com
wrote:
I've tried paredit
On Thu, Jan 19, 2012 at 2:37 PM, Maris maris.orbid...@gmail.com wrote:
Emacs + Paredit is probably the best IDE.
Nothing improves productivity like paredit.
Hi,
Hopefully you won't consider it too much self promotion ;-), but I gave
brief (7 mins) lightning talk at the london clojure user
I have always used UML to document the design of software projects I
have worked on in object-oriented languages. I am now working on a
Clojure project and am required to document the design so anyone
reading these documents will understand the design of the software.
I was wondering if there is
On Jan 18, 8:23 pm, Andy Fingerhut andy.finger...@gmail.com wrote:
I don't have some code lying around to do that, but I might make one. The
name strings would require several megabytes of storage, but as long as you
don't mind that...
I wouldn't mind, but the code your provided is already
Ah,
thank you, so a newbie question.
But helped me a lot.
Andreas
On Jan 18, 10:26 pm, Jack Moffitt j...@metajack.im wrote:
doesn't show any effect of the for.
The only difference is the additional statement at the end.
I can not imagine how this statement sequentially behind can
I find the idea of using a special filename extension rather
appealing. A couple of notes:
(1) I'm not sure there is a generic clojure. ClojureScript has a
couple serious differences from Clojure, such as the way macros are
included in (ns ...).
(2) ClojureScript macro files, AFAICT, really
emacs. :D
Seriously though, start with viper-mode.
---
Joseph Smith
j...@uwcreations.com
(402)601-5443
On Jan 18, 2012, at 1:35 PM, Jeb Beich wrote:
Any suggestions for a vim man?
On Wed, Jan 18, 2012 at 1:29 PM, Cedric Greevey cgree...@gmail.com wrote:
On Wed, Jan 18, 2012 at 11:18
I am using lein run -m to execute a simple database preparation task.
I issue 2 very simple commands that execute very fast on their on own
when executed in the shell. They also appear to execute very fast
based on the print output to stdout. However, the problem is that
after executing the 2
Sweet!
On Fri, Jan 20, 2012 at 2:14 PM, Stuart Sierra
the.stuart.sie...@gmail.comwrote:
We have released JARs for ClojureScript to the Sonatype OSS
repository. They will be uploaded to the Maven Central repository
within 24 hours.
We do not yet have any automated build/release cycle for
On Fri, Jan 20, 2012 at 8:18 AM, joachim joachim.de.be...@gmail.com wrote:
Hi All,
Here is a simple problem for which I nevertheless can't seem to find
the right solution: How to run over several sequences in parallel for
side-effects? Here is one way:
(dorun (map
Hi,
I think your problem is more general than just Clojure. Actually there
was a long
discussion on the Functional Programming group over at LinkedIn
about applying
UML to functional languages.
The general consensus is that you can somehow adapt UML concepts to
describe
data structures and
Weekend made.
Thank you!
--
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.
To unsubscribe from this
I say just to use whichever environment you like most. I use Intellij. And
its all good.
Ctrl-w to grab matching parens.
Ctrl-shift up/down to move lines of code.
Etc... What I'm saying is that most modern tools can generally get you
where you want to go, so pick what you are comfortable with.
On Fri, Jan 20, 2012 at 00:45, Jack Moffitt j...@metajack.im wrote:
(add-hook 'slime-repl-mode-hook
(lambda ()
(clojure-mode-font-lock-setup)
(font-lock-mode)
(font-lock-mode)))
Excellent! This worked for me.
Many thanks for the
Hi,
to add to Lars answer:
(doseq [[a b c] (map vector s1 s2 s3)]
(side-effect-fn a b c))
This should do the trick.
Sincerely
Meikel
--
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
On Jan 20, 2012, at 2:41 PM, Lars Nilsson wrote:
= (map #(vector %1 %2) [1 2 3] ['a 'b 'c])
([1 a] [2 b] [3 c])
Sorry if I'm drifting a bit off topic, but I just wanted to point out that it's
convenient to use just the function name if the arguments are already in the
appropriate order.
But I don't see any reason why this would be faster than (dorun (map
side-effect-fn s1 s2 s3)). You're creating and then dismantling a
three-element vector at every iteration to no purpose.
On Jan 20, 12:40 pm, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
to add to Lars answer:
(doseq [[a b c]
Yeah, but it won't quite work if even the metadata has metadata.
user= (def x (with-meta {:b 1} (with-meta {:a 1} {:x 1})))
#'user/x
user=
x
{:b 1}
user=
(meta x)
{:a 1}
user=
(meta (meta x))
{:x 1}
The code above would leave out the metadata {:x 1} on {:a 1}, though
it should display the
techwhizbang techwhizb...@gmail.com writes:
I am using lein run -m to execute a simple database preparation task.
I issue 2 very simple commands that execute very fast on their on own
when executed in the shell. They also appear to execute very fast
based on the print output to stdout.
On Jan 6, 8:20 am, Bill Robertson billrobertso...@gmail.com wrote:
On Jan 3, 4:26 pm, Matthew O. Smith m0sm...@gmail.com wrote:
There is a mismatch between hibernate maps and clojure maps which
means that there is some translating between them. Hopefully, this
will be smoothed over in
Good catch! I was about to add this to my personal toolkit of generally
useful random crap (every programmer has one of those, right?). I'll make
sure to cover that edge-case. Thanks.
- Chris
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To
Hi David,
Setting aside the data binding aspect of the problem for a minute..
jQuery, Dojo and other JS libs seem to be going all-in on the event
delegation paradigm.
The idea is: instead of binding event handlers to each individual
instance, you let the events bubble up to the top of the
On Fri, Jan 20, 2012 at 6:06 PM, kovas boguta kovas.bog...@gmail.comwrote:
Hi David,
Setting aside the data binding aspect of the problem for a minute..
jQuery, Dojo and other JS libs seem to be going all-in on the event
delegation paradigm.
Yup event delegation is definitely the way to
nice!
--
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.
To unsubscribe from this group, send email to
I've been trying to write a macro to generate predicates from maps,
for instance the map {1 :one 2 :two} would define two predicates, one?
and two? Here's the first part of the macro:
(defmacro make-predicate [keyword-pair]
`(defn ~(symbol (str (name (nth (eval keyword-pair) 1)) ?)) [~'x]
It shouldn't, obviously. It appears to be holding on to a compile-
time value somewhere. I'll track it down this weekend.
-David
On Jan 19, 10:25 pm, jayvandal s...@ida.net wrote:
Why does the clr point to d: work?
user= (use :reload 'ui)
FileNotFoundException Could not locate
I aam trying hello-seesaw tutorial in clooj. I don't see output or
screens as in running Leiningen. I trie adding all the commands
and didn't see any output, so I went back line by line and can't
see any screens.
What commands should I be using to see progres? I am still trying to
write
On Fri, Jan 20, 2012 at 9:54 PM, drewn naylor...@gmail.com wrote:
I've been trying to write a macro to generate predicates from maps,
for instance the map {1 :one 2 :two} would define two predicates, one?
and two?
What's the use case for this?
(def one? #{1})
(def two? #{2})
isn't much
Thank you, that works great! It's a nice use of destructuring too,
which I should of thought of.
I guess this is one case where solving the problem in pieces does not
help. Actually, I seem to remember seeing idioms like that for other
macros over sequences. I understand a little more now why.
46 matches
Mail list logo