Re: Paper on Immutable Persistent Data Structures

2015-07-22 Thread Ruslan Prokopchuk
I think Chapter 2 from here http://daly.axiom-developer.org/clojure.pdf could be helpful. вторник, 21 июля 2015 г., 2:43:54 UTC+3 пользователь JvJ написал: > > Does anyone know if there exists a paper/web page describing in detail how > each of Clojure's data structures are implemented? > -- Y

confusion about some paragraph in book "clojure programming" By Chas Emerick, Brian Carper, Christophe Grand 2012

2015-07-22 Thread Johnny Wong
page 27(pdf version): " Local Bindings: let let allows you to define named references that are lexically scoped to the extent of the let expression. Said another way, let defines locals. .. ... Note that let is implicitly used anywhere locals are required. In particular, fn (and therefore

Re: How to make a static variable dynamic at runtime?

2015-07-22 Thread Yuri Govorushchenko
Thank you for a reply, I totally agree with you on dependency injection. Though I'm exercising in writing a mocking framework and thought it would be an interesting feature to implement a thread-safe mocking of an implicit dependency. среда, 22 июля 2015 г., 5:03:36 UTC+3 пользователь Surgo нап

Re: confusion about some paragraph in book "clojure programming" By Chas Emerick, Brian Carper, Christophe Grand 2012

2015-07-22 Thread Gary Trakhman
I am looking at the definition of fn and I can't see where let is used inside the function definition: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4335 I think they're saying the binding forms are equivalent in power (destructuring), not implementation. On Wed, Jul 22

Re: How to make a static variable dynamic at runtime?

2015-07-22 Thread Alexander Yakushev
Sorry, didn't link to the exact time. The correct link is: https://youtu.be/8NUI07y1SlQ?t=217 -- 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

Re: How to make a static variable dynamic at runtime?

2015-07-22 Thread Alexander Yakushev
Hello Yuri, You probably need something like with-redefs[1] to do mocking. Setting a var to dynamic at runtime will have impact only on code that was *compiled* after doing that. See the excerpt from Daniel's talk about this behavior[2]. [1] http://conj.io/store/v1/org.clojure/clojure/1.7.0/c

Re: How to make a static variable dynamic at runtime?

2015-07-22 Thread Marc O'Morain
Hi Yuri, You need to call .setDynamic before the access to the var is compiled. In your test, the call to .setDynamic is invoked when the function is called, which is after the function has been compiled. So when compiler sees the read of static-var the var is still static, and it can emit a read

Re: confusion about some paragraph in book "clojure programming" By Chas Emerick, Brian Carper, Christophe Grand 2012

2015-07-22 Thread Fergal Byrne
The vector of parameter names is matched to the actual parameter values when the fn is called, so it's equivalent to (let [x val1 y val2] ...) when (hypot val1 val2) is called. -- Fergal Byrne, Brenter IT Author, Real Machine Intelligence with Clortex and NuPIC https://leanpub.

Best Practice on loading namespaces

2015-07-22 Thread keegan myers
I've begun building a rather complex web application in Clojure/ClojureScript. After some evaluation I decided that CQRS + event sourcing would fit the requirements well. As such I have a bunch of aggregates (models) each in their own namespace that contain all the applicable record definitions

Re: How to make a static variable dynamic at runtime?

2015-07-22 Thread Yuri Govorushchenko
Hello Alexander, Marc, Ah, now I get this. Thank you for your responses! вторник, 21 июля 2015 г., 17:54:42 UTC+3 пользователь Yuri Govorushchenko написал: > > The problem I'm trying to solve is how to stub a variable (e.g. a function > from a third-party lib) in tests so that the stubbing occu

run Clojurescript via %magic in an iPython notebook?

2015-07-22 Thread Lee Spector
It is apparently possible to run javascript via "magic" commands in iPython notebooks (https://ipython.org/ipython-doc/3/interactive/magics.html). I assume that this would make it possible also to use Clojurescript, but I don't know what would be involved. I have a fair bit of Clojure experienc

Re: Best Practice on loading namespaces

2015-07-22 Thread Colin Yates
Ah, one of the eternal questions, so there isn’t really a ‘do this’ answer. My experience: [multi-methods/protocols] You need to include the namespace they are compiled in for those methods to take effect and because they are defn’d at the root you cannot provide collaborators easily. You cann

Re: [ANN] Replete ClojureScript REPL iOS app available

2015-07-22 Thread Mars0i
Wow. That will be great. On Tuesday, July 21, 2015 at 1:01:36 PM UTC-5, Mike Fikes wrote: > > Yes, that's part of what I have in mind, in addition to downloading JARs > from, say, Clojars. > > On Jul 21, 2015, at 1:55 PM, Fergal Byrne > wrote: > > Really nice, thanks Mike for such a clean app.

Re: confusion about some paragraph in book "clojure programming" By Chas Emerick, Brian Carper, Christophe Grand 2012

2015-07-22 Thread Johnny Wong
clear, thanks for your reply, i am new clojure learner , i am trying to fully understand the book, On Wednesday, July 22, 2015 at 11:48:06 PM UTC+8, Fergal Byrne wrote: > > The vector of parameter names is matched to the actual parameter values > when the fn is called, so it's equivalent to >

Re: Project Better Clojure/Android integration

2015-07-22 Thread Devang Shah
Can anyone please help? On Saturday, July 18, 2015 at 8:33:58 PM UTC-7, Devang Shah wrote: > > Hello > > I am a master's student and would like to contribute to the > clojure/android platform. I found this project > http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-BetterClojur

Re: Project Better Clojure/Android integration

2015-07-22 Thread Di Xu
I believe student application for GSoC 2015 is already closed at March, you can only try it next year. 2015-07-23 11:12 GMT+08:00 Devang Shah : > Can anyone please help? > > > On Saturday, July 18, 2015 at 8:33:58 PM UTC-7, Devang Shah wrote: >> >> Hello >> >> I am a master's student and would l

Re: Project Better Clojure/Android integration

2015-07-22 Thread Devang Shah
I know, it's over. Can I do it as a project outside of the GSoC? I believe it should not be a problem. Would it be? On Wednesday, July 22, 2015 at 9:14:30 PM UTC-7, Di Xu wrote: > > I believe student application for GSoC 2015 is already closed at March, > you can only try it next year. > > > 201

Re: Project Better Clojure/Android integration

2015-07-22 Thread Dave Sann
Talk to the people on this forum https://groups.google.com/forum/#!forum/clojure-android and see how you go. I am sure that they would welcome your participation. There was an talk at euroclojure by Alexander Yakushev: https://www.youtube.com/watch?v=mVXTcAEKgF8 Dave On Thursday, 23 July 2

Re: Project Better Clojure/Android integration

2015-07-22 Thread Devang Shah
Thank you. Let me try that forum. On Wednesday, July 22, 2015 at 9:49:58 PM UTC-7, Dave Sann wrote: > > Talk to the people on this forum > https://groups.google.com/forum/#!forum/clojure-android > > and see how you go. I am sure that they would welcome your participation. > > There was an talk