Hi,
the first form is idiomatic. This seems to be a problem in emacs.
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
Note that posts from new members are moderated -
Hi,
BTW: the linked discussion pre-dates the time when docstring support à la
defn was added to defmulti. Now that it is available, you should use it
just as for defn.
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
Hello,
weird, I know, but I have keywords in a map like this:
:first/second
I want to convert such a keyword to a string and I'm doing this with the
name function. This doesn't work with a slash:
(def x :first/second)
(name x)
second
(The reason why I have such keywords at all is that
Hi,
(defn to-string-keys
[the-map]
(into (empty the-map) (for [[k v] the-map] [(if-let [nspace (namespace
k)] (str nspace / (name k)) (name k)) v])))
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send
I'm impressed. Thank you very much!
--
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
Hi,
keywords can qualified - just as symbols. Compare: :foo, :user/foo, ::foo
(assuming you are in a fresh REPL). You can also use namespace aliases:
(require '[some.name.space :as short]) ::short/foo.
(shameless-promotion self http://bit.ly/cqbm6F)
Sincerely
Meikel
--
You received this
Clojure/West is a new Clojure conference March 16-17th in San Jose,
CA. The Clojure/West call for presentations is now open! For full
details go here:
http://clojurewest.org/call-for-presentations/
You can submit 50 minute sessions - speakers for these will receive
hotel, airfare, and
In the week leading up to the Clojure/West conference, we will have
five training classes available:
- Mar 12-13, 14-15 - Clojure Web with Chris Granger (creator of Noir,
Pinot, Korma)
- Mar 13-15 - Cascalog with Sam Ritchie (committer on Cascalog)
- Mar 13-15 - Intro to Clojure with members of
On Sun, 4 Dec 2011 21:53:39 -0800 (PST), thenwithexpandedwingshesteershisflight
mathn...@gmail.com wrote:
Has anyone tried using the google chart library in Clojurescript ?
http://code.google.com/apis/chart/interactive/docs/quick_start.html
- it uses a dynamically-loaded-from-the-web api
(side note: what is different between Long/MAX_VALUE and the
function call (Long/MAX_VALUE)?
None. Both are syntax sugar for (. Long MAX_VALUE)
It seems like unchecked-multiply doesn't like vars, but thats surprising.
What am I doing wrong here?
unchecked-multiply only does unchecked
Here's a Google Maps Clojurescript example of mine that might be helpful:
https://github.com/sritchie/contour
Cheers,
Sam
On Mon, Dec 5, 2011 at 6:48 AM, Chris Gray chrismg...@gmail.com wrote:
On Sun, 4 Dec 2011 21:53:39 -0800 (PST),
thenwithexpandedwingshesteershisflight mathn...@gmail.com
Hey all,
I've separated out the macro magic behind the wonderful
clojure-koanshttps://github.com/functional-koans/clojure-koans into
its own project
(clojure-koan-enginehttps://github.com/functional-koans/clojure-koan-engine),
making it easy for anyone to write koans for any clojure library!
I've added a new ticket http://dev.clojure.org/jira/browse/CLJ-891 to jira
for adding the ability to make (symbol some-ns bar) work. That tackles
half of the issue in #4, and reduces your example to just (symbol *ns*
(name sym)).
--
You received this message because you are subscribed to the
On Mon, Dec 5, 2011 at 11:10 AM, Sam Ritchie sritchi...@gmail.com wrote:
Hey all,
I've separated out the macro magic behind the wonderful
clojure-koanshttps://github.com/functional-koans/clojure-koans into
its own project
Really great. Looking forward to boring everyone with contracts-
koans. The next step is to have this project spit out a 4clojure-
esque site automatically. ;-)
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Hello,
While I am going through the Programming Clojure 2nd edition book, I
am entering the code into a REPL.
Sometimes when entering the code I enter a typo and hit enter and
cannot get the REPL to close that malformed line.
It often happens with an errant closing ] or ).
Frequently this
2011/12/5 Stuart Sierra the.stuart.sie...@gmail.com
(side note: what is different between Long/MAX_VALUE and the
function call (Long/MAX_VALUE)?
None. Both are syntax sugar for (. Long MAX_VALUE)
It seems like unchecked-multiply doesn't like vars, but thats surprising.
What am I
You can't store primitives in vars. But you can cast their contents to
primitives with (long ...) (int ...) etc
David
On Mon, Dec 5, 2011 at 12:16 PM, Linus Ericsson
oscarlinuserics...@gmail.com wrote:
2011/12/5 Stuart Sierra the.stuart.sie...@gmail.com
(side note: what is different
David and Stu to the rescue. Of course that's the way to do it.
Thank you both,
/Linus
2011/12/5 David Nolen dnolen.li...@gmail.com
You can't store primitives in vars. But you can cast their contents to
primitives with (long ...) (int ...) etc
David
On Mon, Dec 5, 2011 at 12:16 PM, Linus
On Mon, Dec 5, 2011 at 5:29 PM, Linus Ericsson oscarlinuserics...@gmail.com
wrote:
David and Stu to the rescue. Of course that's the way to do it.
Not sure if this is what you want, but Clojure 1.3 introduced ^:const.
This lets you store a primitive constant value:
(def ^:const hash
My apologies for the noise.
I had entered
(interleave (whole-numbers) [A B C] [)
on the repl and hit enter.
When I went back and tried again and looked and looked. The problem is
the open string prior to what appears to be a closing paren. In this
instance it isn't a closing paren but a part of
I'd like to be using swank-cdt, but I'm running into the tools.jar
problem
warning: unabled to add tools.jar to classpath.
CDT 1.4.0a startup failed: #RuntimeException
java.lang.RuntimeException: java.io.IOException: Not a debuggee, or
not listening for debugger to attach
In project.clj, I've
After a bit more messing around - the problem is a little different...
I fixed the swank plugin version to 1.4.0-SNAPSHOT and updated clojure-
mode to 1.11.4
Now I get
error in process filter: Search failed: (run-hooks 'slime-load-
hook) ; on port
when I try to run clojure-jack-in
Thoughts?
On
this error:
java.io.IOException: Not a debuggee, or not listening for debugger to
attach
is usually caused by not having this line in your project.clj:
:jvm-opts [-agentlib:jdwp=transport=dt_socket,server=y,suspend=n]
if that doesn't fix your problem, send me your project.clj and the
name of
Thats a great feature as well! It is very good not to clutter the code with
magic constants, but to be able to name them in a sane way.
Thank you all again,
/Linus
Den 5 dec 2011 18:38 skrev David Powell djpow...@djpowell.net:
On Mon, Dec 5, 2011 at 5:29 PM, Linus Ericsson
I'm wondering if core.logic can be used to solve equations over reals
or rationals; all the examples I've seen are with with integers and
'Oleg numbers'. I'm talking about something like this:
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-22.html#%_sec_3.3.5
What spurred me was this
I'm a third (?) of the way through implementing cKanren which brings
Constraint Logic Programming (CLP) to core.logic. It going a bit slower
than expected since this is not a simple port - I'm making quite a few
representation / efficiency changes. cKanren supports arithmetic w/
integers, CLP(FD).
David:
Very good news. This stuff is awesome as is, but still really excited
to see cKanren in all its optimized glory! Thanks for all your work on
it.
Nick.
On Dec 5, 4:13 pm, David Nolen dnolen.li...@gmail.com wrote:
I'm a third (?) of the way through implementing cKanren which brings
On Sat, Dec 03 2011, Stuart Sierra wrote:
I think that Common Lisp macros are, strictly speaking, more powerful
than Scheme macros, but I don't have a citation.
That's only true for syntax-rules macros. syntax-case macros, which
most schemes provide and are required by R6RS, are, strictly
For those of you following along at home, my spate of bad luck continues….
A week or so ago, I was happily writing and reading UUIDs into Postgres with
ClojureQL.
Then, all of a sudden, it stopped working, and I can't figure out why.
Shame on me for not being more careful about documenting
On 12/03/2011 10:16 AM, Henrik Lundahl wrote:
Hi Rett
There is no such type as org.gnome.gtk.Window$__KeyPressEvents, at least
not in 4.1 of the Java Gnome API
http://java-gnome.sourceforge.net/doc/api/4.1/org/gnome/gtk/Window.html.
org.gnome.gtk.Window$__KeyPressEvent
exists though. I'd
On Mon, 2011-12-05 at 09:51 -0800, jlhouchin wrote:
When I entered the closing and then closing
paren. I was fine.
You may also try backspace; unusually for a REPL, that works.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message
If it helps someone debug this for Don (since he and I discussed this off-list):
The stack trace from ClojureQL originates in its function to return
generated keys and it's calling .getInt on the (generated) key which
fails because it's a UUID.
So the question is probably: why is ClojureQL
On 12/5/2011 7:19 PM, Stephen Compall wrote:
On Mon, 2011-12-05 at 09:51 -0800, jlhouchin wrote:
When I entered the closing and then closing
paren. I was fine.
You may also try backspace; unusually for a REPL, that works.
I tried that. But as I was on a new line after hitting the enter/
cheers guys that's very helpful
On Dec 6, 2:43 am, Sam Ritchie sritchi...@gmail.com wrote:
Here's a Google Maps Clojurescript example of mine that might be
helpful:https://github.com/sritchie/contour
Cheers,
Sam
On Mon, Dec 5, 2011 at 6:48 AM, Chris Gray chrismg...@gmail.com
2011/12/6 jlhouchin jlhouc...@gmail.com:
On 12/5/2011 7:19 PM, Stephen Compall wrote:
On Mon, 2011-12-05 at 09:51 -0800, jlhouchin wrote:
When I entered the closing and then closing
paren. I was fine.
You may also try backspace; unusually for a REPL, that works.
I tried that. But as I was
2011/12/6 Laurent PETIT laurent.pe...@gmail.com:
2011/12/6 jlhouchin jlhouc...@gmail.com:
On 12/5/2011 7:19 PM, Stephen Compall wrote:
On Mon, 2011-12-05 at 09:51 -0800, jlhouchin wrote:
When I entered the closing and then closing
paren. I was fine.
You may also try backspace; unusually
Clojure REPL in Counterclockwise
(http://code.google.com/p/counterclockwise/) is pretty nice.
And yes, allowing multi-line expressions and having no way to edit
them is annoying.
On Tue, Dec 6, 2011 at 11:45 AM, jlhouchin jlhouc...@gmail.com wrote:
On 12/5/2011 7:19 PM, Stephen Compall wrote:
38 matches
Mail list logo