Re: how do I clojure.string/replace regex characters? Escaping gives me StringIndexOutOfBoundsException

2014-08-04 Thread Andy Fingerhut
Or even more simply, since the thing you want to replace is a single character, you do not need a regex to match it, but can match a string that is not a regex at all, e.g.: (st/replace "**username" "*" "$") The doc string for clojure.string/replace is fairly explicit on this. Andy On Mon, Aug

Re: how do I clojure.string/replace regex characters? Escaping gives me StringIndexOutOfBoundsException

2014-08-04 Thread Vincent H
On Tuesday, August 5, 2014 7:49:21 AM UTC+2, larry google groups wrote: > > I'm working on a website with a frontender who asked to be able to save > JSON maps that contain field names such as: > > "$$hashKey" : "00C" > > The dollar signs are a violation of MongoDB limits on field names, so i >

how do I clojure.string/replace regex characters? Escaping gives me StringIndexOutOfBoundsException

2014-08-04 Thread larry google groups
I'm working on a website with a frontender who asked to be able to save JSON maps that contain field names such as: "$$hashKey" : "00C" The dollar signs are a violation of MongoDB limits on field names, so i need to convert to something else and then convert back. So I thought I would convert

Re: [ANN] Silk, an isomorphic routing library for Clojure and ClojureScript

2014-08-04 Thread Craig
How would you position Silk in relation to Bidi? Thanks for any insights. -- 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 patien

[ANN] Silk, an isomorphic routing library for Clojure and ClojureScript

2014-08-04 Thread Dom Kiva-Meyer
I have recently been experimenting with isomorphic Clojure and ClojureScript architecture . The goal is to make Clojure[Sc

ANN Quartzite 1.3.0 is released

2014-08-04 Thread Michael Klishin
Quarzite [1] is a powerful Clojure scheduling library built on top the Quartz Scheduler. Release notes: http://blog.clojurewerkz.org/blog/2014/07/31/quartzite-1-dot-3-0-is-released/ 1. http://clojurequartz.info/  -- @michaelklishin, github.com/michaelklishin -- You received this message beca

ANN Chash 1.1.0 is released

2014-08-04 Thread Michael Klishin
chash [1] is a consistent hashing library for Clojure. Release notes: http://blog.clojurewerkz.org/blog/2014/07/31/chash-1-dot-1-0-is-released/ 1. https://github.com/michaelklishin/chash  -- @michaelklishin, github.com/michaelklishin -- You received this message because you are subscribed to

ANN Mailer 1.3.0 is released

2014-08-04 Thread Michael Klishin
Mailer [1] is an ActionMailer-inspired mailer library for Clojure. Release notes: http://blog.clojurewerkz.org/blog/2014/08/03/mailer-1-dot-1-0-is-released/ 1. https://github.com/clojurewerkz/mailer  -- @michaelklishin, github.com/michaelklishin -- You received this message because you are su

ANN Validateur 2.2.0 is released

2014-08-04 Thread Michael Klishin
Validateur [1] is a functional validations library for Clojure and ClojureScript. Release notes: http://blog.clojurewerkz.org/blog/2014/08/03/validateur-2-dot-2-0-is-released/ 1. http://clojurevalidations.info/ -- @michaelklishin, github.com/michaelklishin -- You received this message becaus

IntelliJ / ClojureScript Integration...

2014-08-04 Thread John Szakmeister
Sorry for pestering the list about this, but despite trying to follow several different blog posts about this, I seem unable to get a working ClojureScript REPL that connects to the browser. Ideally, I'd like to start from a clean project using "lein new om-start project_name" and get the right bi

Re: lein-ring :init only runs once, never on reload

2014-08-04 Thread James Reeves
You can initiate the database connection via middleware, or use defonce to ensure that your database connection isn't overwritten by a reload. - James On 4 August 2014 19:59, Joseph Guhlin wrote: > I'm sure this may be desired functionality for many, but I use the :init > fn to connect to the

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Herwig Hochleitner
2014-08-04 22:28 GMT+02:00 David Nolen : > I meant would not > > > On Mon, Aug 4, 2014 at 4:28 PM, David Nolen > wrote: > >> I would rely on the behavior in the REPL to check this - the REPL >> compilation environment is likely different. >> > Yes, I noticed that ./script/repl has different behav

ANN: Om 0.7.1

2014-08-04 Thread David Nolen
This release includes some long outstanding proposed enhancements: ### Changes * OM-133: validate Om component fn return values * OM-134: add om.core/set-state-nr! and om.core/update-state-nr!, they do not refresh (experimental) * OM-162: extend default cursor to IEmptyableCollection (experimental

Re: ANN: Namespace browser for Emacs users

2014-08-04 Thread Bozhidar Batsov
On August 5, 2014 at 0:29:33, John Andrews (john.m.andr...@gmail.com) wrote: Hi Bozhidar, I think adding it to main Cider sounds like a great idea! I'll work up a pull request in the next few days. Thanks, John Looking forward to it! :-) On Fri, Aug 1, 2014 at 6:09 AM, Bozhidar Batsov   wrot

Re: ANN: Namespace browser for Emacs users

2014-08-04 Thread John Andrews
Hi Bozhidar, I think adding it to main Cider sounds like a great idea! I'll work up a pull request in the next few days. Thanks, John On Fri, Aug 1, 2014 at 6:09 AM, Bozhidar Batsov wrote: > Nicely done! As you might know I'm cider's maintainer and I actually had a > namespace browser on the

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Luc Prefontaine
That's what I inferred but it has nothing to do with my astonishing ESP capabilities, currently drinking an excellent beer in Rabat :) Cheers, Luc P > I meant would not > > > On Mon, Aug 4, 2014 at 4:28 PM, David Nolen wrote: > > > I would rely on the behavior in the REPL to check this - t

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread David Nolen
I meant would not On Mon, Aug 4, 2014 at 4:28 PM, David Nolen wrote: > I would rely on the behavior in the REPL to check this - the REPL > compilation environment is likely different. > > > On Mon, Aug 4, 2014 at 3:59 PM, Sam Ritchie wrote: > >> Hey Herwig, >> >> I'm currently on [org.clojure/

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread David Nolen
I would rely on the behavior in the REPL to check this - the REPL compilation environment is likely different. On Mon, Aug 4, 2014 at 3:59 PM, Sam Ritchie wrote: > Hey Herwig, > > I'm currently on [org.clojure/clojurescript "0.0-2261"], and I'm seeing no > munging: > > paddleguru.api.register.v

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Sam Ritchie
Hey Herwig, I'm currently on [org.clojure/clojurescript "0.0-2261"], and I'm seeing no munging: paddleguru.api.register.validation> (defn console []) # nil paddleguru.api.register.validation> (defn console [s] (.log js/console s)) # nil paddleguru.api.register.validation> (console "HI!") "Erro

lein-ring :init only runs once, never on reload

2014-08-04 Thread Joseph Guhlin
I'm sure this may be desired functionality for many, but I use the :init fn to connect to the database. When files are reloaded, this is never called again and my database connection is lost. Is there another way or is it possible to check for connection from the handler itself? :ring {:handle

[ANN] dar/container - simple and concise container with seamless support for multiple runtime levels and async computations

2014-08-04 Thread Эльдар Габдуллин
Hi, I am pleased to announce a new dependency injection container - dar/container The key idea is to keep there all sort of things, not just connection strings, but response objects, parsed request body, user identity, authorization checks, etc. Hence

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Herwig Hochleitner
Thomas, in my test, (defn console []) is munged aswell, so I'm guessing that Sam is using a version from before https://github.com/clojure/clojurescript/commit/f371c04d95a00cdda79c63f89f35088d62de8e73 Sam, is that correct? The observation that eval should be in js-globals is irrelevant, because as

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Thomas Heller
https://gist.github.com/thheller/4731f682665d38b1053c On Monday, August 4, 2014 3:34:33 PM UTC+2, Nicola Mometto wrote: > > > Try with (fn document [] js/document) > > Thomas Heller writes: > > > I was not able to reproduce Sam's initial problem. > > > > "eval" as I said does not appear in the

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Herwig Hochleitner
2014-08-04 16:27 GMT+02:00 David Nolen : > > We don't gensym let bindings - the shadowing logic was added to create > stable names. In fact, we do within statement contexts. I wrote that as a fix for the case (do (let [x 1] (fn [] x)) (let [x 2] (comment clobbered x in fn))) (as well as topl

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread David Nolen
On Mon, Aug 4, 2014 at 9:11 AM, Herwig Hochleitner wrote: > I dug a bit deeper to see where :js-globals came from and found the old > ticket for this exact issue: http://dev.clojure.org/jira/browse/CLJS-680 > I propose that we remove it, because it's unnessecary when we gensym fn > names the same

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Nicola Mometto
Try with (fn document [] js/document) Thomas Heller writes: > I was not able to reproduce Sam's initial problem. > > "eval" as I said does not appear in the :js-globals which seems like a > mistake. -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Thomas Heller
I was not able to reproduce Sam's initial problem. "eval" as I said does not appear in the :js-globals which seems like a mistake. -- 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 tha

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Herwig Hochleitner
I dug a bit deeper to see where :js-globals came from and found the old ticket for this exact issue: http://dev.clojure.org/jira/browse/CLJS-680 I propose that we remove it, because it's unnessecary when we gensym fn names the same way as let bindings + blacklists are never a great solution, but in

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Herwig Hochleitner
That's curious, here's my console interaction: % git remote show origin * remote origin Fetch URL: git://github.com/clojure/clojurescript.git Push URL: git://github.com/clojure/clojurescript.git % git fetch origin && git checkout -b master origin/master Branch master set up to track remote b

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Thomas Heller
FWIW I was not able to reproduce this behavior? What exactly does your code look like? See the source and the compiled version: https://gist.github.com/thheller/4731f682665d38b1053c Seems to me the shadowing kicked in correctly. "eval" seems to be missing in :js-globals though. https://github.c

Re: CLJS Function clobbering js function of same name

2014-08-04 Thread Herwig Hochleitner
Ticket'd http://dev.clojure.org/jira/browse/CLJS-833 2014-08-04 0:57 GMT+02:00 David Nolen : > Ah hm, yeah I'm surprised this isn't caught by the existing shadowing > and :js-globals logic. Sure open a ticket, patch welcome of course. > > David > > On Sun, Aug 3, 2014 at 6:23 PM, Herwig Hochleit