Re: browser lisp editor

2014-04-21 Thread Bruce Wang
Hi Brian, Try Ace (https://github.com/ajaxorg/ace) it has both Clojure and Lisp mode, should be enough for your requirements. Cheers, Bruce On Tue, Apr 22, 2014 at 2:30 PM, Brian Craft wrote: > Slightly off topic. > > Anyone know of a simple browser-based lisp editor that can be embedded in >

browser lisp editor

2014-04-21 Thread Brian Craft
Slightly off topic. Anyone know of a simple browser-based lisp editor that can be embedded in a page? Indenting & matching parens would be sufficient. I don't need evaluation. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Re: puzzled by RuntimeException

2014-04-21 Thread Greg D
Steve, Thanks. I did a quick check, and it seems that I don't get exceptions when I start the repl as you do. I normally start mine with 'lein repl'. You've given me a good lead to investigate. Greg -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Clojure source releases issue for Maven Central

2014-04-21 Thread Jeff Valk
Thanks, Alex. On Monday, April 21, 2014 4:30:09 PM UTC-4, Alex Miller wrote: > > Seems to have been fixed only for snapshots; reopened. > > -- 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

Re: puzzled by RuntimeException

2014-04-21 Thread Stephen Gilardi
> The sequence in the transcript below shows runtime exceptions when a numeric > keyword is followed by a list starting with a symbol or character. > > Would anyone help me with a reason for the failing cases? > > user=> (clojure-version) > "1.6.0" > user=> '(:42 a) > (:42 a) > user=> '(:42 "a"

puzzled by RuntimeException

2014-04-21 Thread Greg D
The sequence in the transcript below shows runtime exceptions when a numeric keyword is followed by a list starting with a symbol or character. Would anyone help me with a reason for the failing cases? user=> (clojure-version) "1.6.0" user=> '(:42 a) (:42 a) user=> '(:42 "a") (:42 "a") user=> '(

Re: [ANN] immutable-int-map

2014-04-21 Thread PlĂ­nio Balduino
Got it. Awesome. Good job, Zach On Mon, Apr 21, 2014 at 1:52 AM, Zach Tellman wrote: > I could represent the map {0 :foo, 100 :bar} as an array, but it would > have to be a million element array with a lot of empty space. This would be > (maybe) faster w.r.t. lookups, but would be vastly s

clojurescript sandboxed code execution

2014-04-21 Thread t x
Hi, 1) I'm writing code in Clojurescript. 2) I want to have some level of user customizibility (i.e. think elisp) 3) I want this to be sandboxed. (i.e. not full javascript) 4) How do I do this in cljs, given I don't have eval? Thanks! -- You received this message because you are subs

Re: Clojure source releases issue for Maven Central

2014-04-21 Thread Alex Miller
Seems to have been fixed only for snapshots; reopened. On Thursday, April 17, 2014 11:51:31 AM UTC-5, Jeff Valk wrote: > > Current builds of the Clojure "sources" jar (clojure-1.6.0-sources.jar, > clojure-1.5.1-sources.jar, etc) available from the Maven Central "releases" > repository contain th

Re: Why this Clojure part is working in Korma and no exception is thrown?

2014-04-21 Thread James Reeves
Try expanding out the expression. The macro starts with: `(-> (~query-fn-var ~@args) ~@body) Now plug in the values: `(-> (#'insert* users) (values {:first "john" :last "doe"})) Then expand the threading macro: `(values (#'insert* users) {:first "john" :last "doe"}) So we end up w

Re: Idiomatic Clojure for iterating all items of a map

2014-04-21 Thread Justin Smith
small correction: sometimes one does need to nest a for or doseq call, but not for the usual nested iteration case On Monday, April 21, 2014 8:57:49 AM UTC-7, Justin Smith wrote: > > That doseq is a no-op, because str has no side effects and doseq always > returns nil. Also there is no need to n

Re: Idiomatic Clojure for iterating all items of a map

2014-04-21 Thread Justin Smith
That doseq is a no-op, because str has no side effects and doseq always returns nil. Also there is no need to nest doseq calls. for is much like doseq except it actually returns the result. user> (for [lang (:langs langs) k (keys lang)] (str k " " (k lang))) (":lang

Re: [ANN] immutable-int-map

2014-04-21 Thread Zach Tellman
Correct. I'll clarify that I mean 64 bit integers in the readme. On Apr 21, 2014 5:26 AM, "Alex Miller" wrote: > Never mind, look like you mean integer in the generic sense and you are > using longs, right? > > -- > You received this message because you are subscribed to the Google > Groups "Cloj

Re: Idiomatic Clojure for iterating all items of a map

2014-04-21 Thread Timothy Washington
You can simply call *seq* on your map, and get a sequence of all map entries. user> (seq {:a 1 :b 2 :c 3}) ([:a 1] [:c 3] [:b 2]) Hth Tim Washington Interruptsoftware.com On Mon, Apr 21, 2014 at 11:32 AM, Hussein B. wrote: > Hi, > > For a data structure such

Re: Idiomatic Clojure for iterating all items of a map

2014-04-21 Thread Moritz Ulrich
Really depends on that you want. First thing coming to my mind is: (for [l (:langs langs) [k v] l] (str k " " v)) This will give you a flat lazy list of strings. On Mon, Apr 21, 2014 at 5:32 PM, Hussein B. wrote: > Hi, > > For a data structure such as: > > (def langs {:langs [ {:lang "C

Idiomatic Clojure for iterating all items of a map

2014-04-21 Thread Hussein B.
Hi, For a data structure such as: (def langs {:langs [ {:lang "Clojure" :version 1.6} {:lang "Erlang" :version 17} ] } ) How to iterate all the items of the maps? I tried this but it is too imperative to me: (doseq [lang (:langs langs) (doseq [k (keys lang)]

[ANN] play-clj 0.3.0

2014-04-21 Thread Zach Oakes
This is a new release of my game library, play-clj. I released 0.1.0 here three months ago, and a lot has changed since then. You can read through the release notes to see the details. This latest version supports

Why this Clojure part is working in Korma and no exception is thrown?

2014-04-21 Thread Hussein B.
Hi, I'm trying to study the source code of Korma project. (insert users (values {:first "john" :last "doe"})) This will resolve to (defmacro insert) https://github.com/korma/Korma/blob/master/src/korma/core.clj#L143 Will call (defn- make-query-then-execute) https://github.com/korma/Korma/

[ANN] immutable-int-map

2014-04-21 Thread Alex Miller
Never mind, look like you mean integer in the generic sense and you are using longs, right? -- 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

[ANN] immutable-int-map

2014-04-21 Thread Alex Miller
This is great stuff. Why not longs? Are you going for space savings? -- 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