Re: Multiple replacements in string using a map

2013-04-23 Thread rod naph
I scratched my itch with... (defn map-replace [m text] (reduce (fn [acc [k v]] (s/replace acc (str k) (str v))) text m)) Hope it helps. On Tuesday, April 23, 2013 5:55:51 AM UTC+1, Mond Ray wrote: Man - you guys are good and *fast*. I was pootling around with a version that

Re: Head retention example

2013-04-23 Thread xumingmingv
Thanks a lot Michal! 在 2013-4-21,上午6:51,Michał Marczyk michal.marc...@gmail.com 写道: On 20 April 2013 23:41, Tonino Jankov tyaa...@gmail.com wrote: I mean, I think that in both cases the original sequence at one point in time must be, entirely realized, in memory. Well no, it doesn't.

Re: binding funkiness

2013-04-23 Thread Daniel Higginbotham
That clears things up completely. Thanks for the help, everybody! On Monday, April 22, 2013 10:48:11 PM UTC-4, tbc++ wrote: To simplify the problem: ((binding [*funkybind* true] (fn [] *funkybind*))) This is the same problem as your lazy-seq example. The issue is that *funky-bind* is

Re: Head retention example

2013-04-23 Thread xumingmingv
Michal, do you know any resources/links that introduce the internals of local-clearing? or The Clojure source files which implemented this technique? 在 2013-4-23,下午3:55,xumingmingv xumingmi...@gmail.com 写道: Thanks a lot Michal! 在 2013-4-21,上午6:51,Michał Marczyk michal.marc...@gmail.com 写道:

Any help on starting Android with clojure?

2013-04-23 Thread Erlis Vidal
Hi guys, I want to start Android development and I was following the tutorial found here http://developer.android.com/training/basics/firstapp/index.html I'm wondering if there's something like this but done for clojure development with Android. Thanks! Erlis -- -- You received this message

Re: Lambda Jam schedule posted (Chicago, July 8-10)

2013-04-23 Thread Korny Sietsma
Sounds awesome. For folks in (or near) Australia, we also have the Yow! Lambda Jam conference in Brisbane in May: http://www.yowconference.com.au/lambdajam/index.html Not as stellar a lineup as the Chicago one, but should be a great conference nonetheless. - Korny On 20 April 2013 16:21, Alex

Thanks!

2013-04-23 Thread JvJ
I just submitted my master's thesis, written in Clojure, and I'd just like to say the community here has been really helpful. Thanks to David Nolen and Ambrose Bonnaire-Sergeant for helping me out with a number of core.logic questions. Thanks to Norman Richards for the pldb library, which

Re: Thanks!

2013-04-23 Thread Ambrose Bonnaire-Sergeant
Awesome, congrats! Is there a copy available? Thanks, Ambrose On Wed, Apr 24, 2013 at 12:17 AM, JvJ kfjwhee...@gmail.com wrote: I just submitted my master's thesis, written in Clojure, and I'd just like to say the community here has been really helpful. Thanks to David Nolen and Ambrose

Image analysis library recommendations

2013-04-23 Thread Nils Blum-Oeste
Hi, I would like to do some image analysis with clojure. So I am looking for good libraries for that. Most important would be a good support for image segmentation. Tresholding, histogram based methods, edge detection and region growing are among the things I would like to have. Support for

Clojure on top of ObjC?

2013-04-23 Thread Steven Degutis
Currently Clojure exists on the JVM, the CLR, and the JSVM. Why not put it on top of ObjC too? Then we could create stand-alone executables written in Clojure! Or it could be used as an embedded scripting language. The ObjC runtime and Foundation.framework are close enough to Java that it

Re: Clojure on top of ObjC?

2013-04-23 Thread Gary Trakhman
It's already possible via https://github.com/takeoutweight/clojure-scheme Gambit scheme provides objective-C interop. The author demonstrated this stuff at Clojure/West this year. One difference between your proposed approach is it's both compiled and highly optimized. On Tue, Apr 23, 2013

Re: Multiple replacements in string using a map

2013-04-23 Thread mond
Chapeau - nicely, ahem, reduced On Tuesday, April 23, 2013 8:23:27 AM UTC+2, rod naph wrote: I scratched my itch with... (defn map-replace [m text] (reduce (fn [acc [k v]] (s/replace acc (str k) (str v))) text m)) Hope it helps. On Tuesday, April 23, 2013 5:55:51 AM UTC+1,

Re: Clojure on top of ObjC?

2013-04-23 Thread Steven Degutis
It would be neat, if only I could figure out how to use it. Thanks though. -Steven On Tue, Apr 23, 2013 at 2:50 PM, Gary Trakhman gary.trakh...@gmail.com wrote: It's already possible via https://github.com/takeoutweight/clojure-scheme Gambit scheme provides objective-C interop. The author

Re: Clojure on top of ObjC?

2013-04-23 Thread Steven Degutis
Never mind, count me dumb. Just forgot to do ./script/bootstrap On Tue, Apr 23, 2013 at 3:24 PM, Steven Degutis sbdegu...@gmail.com wrote: It would be neat, if only I could figure out how to use it. Thanks though. -Steven On Tue, Apr 23, 2013 at 2:50 PM, Gary Trakhman gary.trakh...@gmail.com

[GSoC 2013] core.logic CLP(Prob)

2013-04-23 Thread Radosław Piliszek
Hi! Let me introduce myself. I'm a second-year student of Computer Science at the University of Białystok in Poland. I've had some exposure to Prolog and programmed in functional style in several languages (Common Lisp, Haskell, Racket, Scala). I'm picking up Clojure quickly now. ;-) I'm

Re: Clojure on top of ObjC?

2013-04-23 Thread Steven Degutis
While this is certainly neat, it doesn't allow Clojure to be used as an embedded scripting language inside an ObjC app. On Tue, Apr 23, 2013 at 2:50 PM, Gary Trakhman gary.trakh...@gmail.com wrote: It's already possible via https://github.com/takeoutweight/clojure-scheme Gambit scheme provides

Re: Clojure on top of ObjC?

2013-04-23 Thread Andy Fingerhut
There may be more relevant or up-to-date links, but do a Google search for clojure objective c, and you will see this has been discussed a little bit in this group: https://groups.google.com/forum/?fromgroups=#!topic/clojure/6i9D5QOq7Cc Also, one person started a couple of projects on

Re: [GSoC 2013] core.logic CLP(Prob)

2013-04-23 Thread David Nolen
On Tue, Apr 23, 2013 at 2:10 PM, Radosław Piliszek radzio.c...@gmail.comwrote: 1) Is this place the best to discuss this? Yes. 2) Are there some set goals that CLP(Prob) should achieve? (,,Basic support of CLP(Prob).'' does not express it too well! :-P ) This seems like a pretty

Re: Clojure on top of ObjC?

2013-04-23 Thread Gary Trakhman
There's lots of ways to 'eval' a script. One way is to embed something like LLVM, a compiler within the app, compile something, get back a function pointer and run it. This is what Cloudera Impala does to run real-time HiveQL queries.

style questions -- clojure newbie

2013-04-23 Thread Huey Petersen
Howdy, I'm a clojure fan but quite new to writing clojure. I'm writing my first app and had a few style questions. I'm doing a web service call to the lastfm api. It returns some json like: { results: { albummatches: { album: [ {

Re: style questions -- clojure newbie

2013-04-23 Thread Steven Degutis
I'm also quite new to Clojure, but here are some very superficial changes I would make to your code, without actually giving much thought to your algorithms: (defn- transform-album-images [images] (into {} (for [image images] [(:size image) (:#text image)]))) (defn-

Re: style questions -- clojure newbie

2013-04-23 Thread Huey Petersen
Thanks, superficial changes are good too :) One question I forgot that is important is: - how would I accomplish the 'maybe' monad style where the web service call would return nil? on failure. Is the normal pattern for this an if-let at the top before the rest of the transformations

Re: Clojure on top of ObjC?

2013-04-23 Thread Rich Morin
On Apr 23, 2013, at 12:38, Steven Degutis wrote: Currently Clojure exists on the JVM, the CLR, and the JSVM. Why not put it on top of ObjC too? +1 I'd be delighted to have such a port. It could extend Clojure's span to include OSX (including OpenStep) and iOS (in a somewhat diminished

Re: Image analysis library recommendations

2013-04-23 Thread Cedric Greevey
On Tue, Apr 23, 2013 at 2:54 PM, Nils Blum-Oeste nblumoe...@googlemail.comwrote: Furthermore I am looking for a nice image import/export. This does not have to be the same library, but would be great if things work together nicely. If you're using ClojureJVM, at least, you have this already

Re: Clojure on top of ObjC?

2013-04-23 Thread Steven Degutis
I have used MacRuby in the past with good success. I like its technique of using ObjC as the underlying VM, using pure ObjC objects. Unfortunately, it's impractical to write the majority of a Mac or iOS app using anything other than Xcode + ObjC, especially the UI. So the goal of this endeavor

Re: Head retention example

2013-04-23 Thread Colin Fleming
I'm pretty sure the implementation of locals clearing is all in Compiler.java, in the LocalsBinding class. See canBeCleared in that class. On 23 April 2013 23:37, xumingmingv xumingmi...@gmail.com wrote: Michal, do you know any resources/links that introduce the internals of local-clearing?

Re: Head retention example

2013-04-23 Thread xumingmingv
Thanks Colin! 在 2013-4-24,上午9:23,Colin Fleming colin.mailingl...@gmail.com 写道: I'm pretty sure the implementation of locals clearing is all in Compiler.java, in the LocalsBinding class. See canBeCleared in that class. On 23 April 2013 23:37, xumingmingv xumingmi...@gmail.com wrote:

Re: style questions -- clojure newbie

2013-04-23 Thread Alan Malloy
Raynes recently released https://github.com/Raynes/least, a Clojure client for the last.fm API. Have you looked into just using his, rather than reinventing the API layer yourself? On Tuesday, April 23, 2013 2:12:37 PM UTC-7, Huey Petersen wrote: Howdy, I'm a clojure fan but quite new to

Re: How to import classes from a runtime-defined ClassLoader?

2013-04-23 Thread tbatchelli
This worked for me: (with-bindings {clojure.lang.Compiler/LOADER dcl} ...) (from: http://stackoverflow.com/questions/10941330/class-forname-in-clojure-not-respecting-contextclassloader ) On Wednesday, February 27, 2013 9:45:32 AM UTC-8, dgrnbrg wrote: I am trying to include some Groovy

Re: style questions -- clojure newbie

2013-04-23 Thread Huey Petersen
I'll definitely take a look but mostly just to see style :). It is a toy app purely for learning so I can get away with duplicating a bit of effort. Plus I only use read only end points that don't require user auth so the api code is really short (8 lines). -- -- You received this message