Re: What's the best way to do this?

2010-01-21 Thread Dan Schmidt
I don't know how efficient it is (or how idiomatic it really is), but this should work: (defn find-files "Find files in directory that match predicates pred & others" [in-dir pred & others] (reduce (fn [xs f] (filter f xs)) (file-seq in-dir) (cons pred others))) Dan On

Re: Trait-like behavior with Protocols

2010-02-08 Thread Dan Larkin
stop [self]) > (span-length [self])) > > Now I know I can just make span-length a function on Span as opposed > to part of the protocol. Is that what one should do? Can you show me what this looks like? Thanks, Dan -- You received this message because you are subscribed to the Googl

feedback on modified clojure.test.are macro

2010-02-22 Thread Dan Becker
@the-list#))) Is this a good solution? Is there a better approach? The call to eval seems unfortunate to me. Thanks, Dan -- 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 th

Implementing a class in clojure, calling it from java

2010-02-28 Thread Dan Becker
2 { public static void main(String argv[]) { hello h = new hello(); System.out.println(h.fooMeth()); } } I compile this in clojure: c:\Users\dan\workspace\genc>java -cp .;.\classes;clojure.jar - Dclojure.compile.p ath=classes clojure.main Clojure 1.1.0 user=> (compi

Re: Implementing a class in clojure, calling it from java

2010-02-28 Thread Dan Becker
Ah, thank you! I guess that makes sense. But it doesn't seem to be documented directly anywhere, though the examples at http://clojure.org/compilation do show the need to do this. Dan On Feb 28, 7:10 am, Adrian Cuthbertson wrote: > Hi Dan, you need to include an arg for "this"

Re: codeq: add support for importing from github, importing tags & branches

2013-05-19 Thread Dan Burkert
On Sunday, May 19, 2013 7:08:19 PM UTC-4, Rich Morin wrote: > On May 18, 2013, at 16:36, Dan Burkert wrote: > > What mechanisms are you using to manage and run Codeq? > Right now I don't do a whole lot with Codeq (beyond working with its internals). I've had t

Re: codeq: add support for importing from github, importing tags & branches

2013-05-19 Thread Dan Burkert
they will not appear in a query asking for all the commits of danburkert/codeq. This commit<https://github.com/danburkert/codeq/commit/910e5e1f8c69c43653a0a922d57b4c9a7e62655d> fixes the issue, I can make a patch if there is interest. -- Dan -- -- You received this message because y

Re: Loop run until a Clojure Agent send-off is complete

2013-05-28 Thread Dan Neumann
Aw, come on. No need to squander value back out of the world. On Monday, May 27, 2013 8:02:28 PM UTC-5, Kelker Ryan wrote: > > I wrote it for fun and deleted after no one took interest. There was no > real purpose other than to see if it could be done. > > 28.05.2013, 08:33, "Plínio Balduino"

Re: Making cryptograms, my first Clojure function. Feedback welcome.

2013-06-13 Thread Dan Neumann
I actually like the original lower/upper/digit the best: lower (seq "abcdefghijklmnopqrstuvwxyz") upper (seq "ABCDEFGHIJKLMNOPQRSTUVWXYZ") digit (seq "0123456789") It's just immediately obvious, especially for instance if you wanted to remove ambiguous chars like 0, O, l, I. On Wednesday, June

Re: [ANN] byte-streams: a rosetta stone for all the byte representations the jvm has to offer

2013-06-30 Thread Dan Burkert
s the number of steps...)? Thanks for releasing this! -- Dan On Saturday, June 29, 2013 1:57:58 PM UTC-4, Zach Tellman wrote: > > I've recently been trying to pull out useful pieces from some of my more > monolithic libraries. The most recent result is 'byte-streams' [1],

Re: #|| notation for the Clojure reader

2013-07-10 Thread Dan Cross
ge, just that it would be unfortunate if Clojure adopted the Common Lisp comment syntax for escaped symbols. :-) - Dan C. Was some work done on this since this proposal was expressed? > > Best regards. > > > > -- > -- > You received this message because you are subscr

Re: Do you like the Clojure syntax?

2013-08-14 Thread Dan Cross
On Wed, Aug 14, 2013 at 12:08 PM, Chris Ford wrote: > Two obviously. It's the only compromise between those who want everything > to be a prime number, and those who want everything to be a power of two. > I used to sometimes use 3 spaces, just to be a contrarian. Then I learned the error of my

Resources don't work in uberjar

2015-01-26 Thread Dan Harbin
I've created a sample project at Github[1] to demonstrate the problem I'm facing with accessing a resource file when using an uberjar. Could someone point out what I'm doing wrong here? Thanks! [1]: https://github.com/RasterBurn/halp ### Given this code: ### ```clojure (ns ha

Re: Resources don't work in uberjar

2015-01-27 Thread Dan Harbin
> anymore. > > I could turn around using an InputStream (I was in the case I wanted to > serve a resource via http-kit) > > If you want more info, I can point you to the code where I use it > > Hope it helps, > Ben > > > > > On Tue, Jan 27, 2015 at 5:04 AM,

Re: Resources don't work in uberjar

2015-01-28 Thread Dan Harbin
java:152) at clojure.lang.RestFn.applyTo(RestFn.java:132) at halp.core.main(Unknown Source) It doesn't look like io/copy works with a URL. On Tuesday, January 27, 2015 at 2:52:00 PM UTC-6, Marshall Bockrath-Vandegrift wrote: > > On Monday, January 26, 2015 at 9:2

Re: Resources don't work in uberjar

2015-01-28 Thread Dan Harbin
Here's my goal: I have a thread that listens on a channel for tuples of [file-path, file-contents] and writes files to a zip file using clojure.java.io/copy. It's been really nice to be able to specify file-contents as anything clojure.java.io/copy can consume, such as a byte[] or a String, and

Re: Resources don't work in uberjar

2015-01-28 Thread Dan Harbin
It seems my problem is related to this line in io.clj: https://github.com/clojure/clojure/blob/f437b853adeaffc5cad9bb1e01e2355357a492c9/src/clj/clojure/java/io.clj#L60 (if (= "file" (.getProtocol u)) (as-file (escaped-utf8-urlstring->str (.replace (.getFile u) \/ File/se

Re: Resources don't work in uberjar

2015-01-28 Thread Dan Harbin
After perusing stackoverflow, it's evident to me that the "proper" way to access a file within a jar is to use getResourceAsStream (as was mentioned in the thread above, thank you), and I suppose clojure's io/input-stream does the trick as well. Thanks, all! -- You received this message bec

Re: can binary arithmetic guru help improve these "bitmasking" ops?

2015-02-23 Thread Dan Lentz
Actually, yes, your code is exactly what I was looking for. Your "countTrailingZeros" is what I'm calling "mask-offset". Very helpful, thank you. Although, I gotta say, I'm still gonna do it in Clojure. This is supposed to be programming for enjoyment! :) Best,

Re: Who's using Clojure?

2015-03-03 Thread Dan Hammer
We used Clojure and Cascalog to generate the monthly deforestation alerts from satellite imagery for Global Forest Watch . This is the "real-time" component of the project. On Tuesday, April 19, 2011 at 10:38:14 AM UTC-4, Damien wrote: > > Hi Everyone, > > I'm on

Re: clj-uuid: time-based uuid now 350% faster than java.util.UUID/randomUUID

2015-03-04 Thread Dan Lentz
millisecond by millisecond (the high order bits). If you had some means to know the specific range of time to search (and a very fast test to determine when you had guessed correctly) you would certainly improve your odds vs guessing a purely random UUID. Best, Dan On Wednesday, March 4, 2015

How to get the namespace from an external Clojure resourcescript, from Java

2015-03-17 Thread Dan Campbell
Hi, At http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Invoking_Clojure_from_Java , they use this clojure source file, from inside the classpath: ; foo.clj(ns user) (defn foo [a b] (str a " " b)) , to demonstrate this code for calling functions in a Clojure so

Sonian is hiring for remote Clojure positions!

2015-03-19 Thread Dan Dillinger
For the official job opening, look here: http://sonian.com/about/careers/software-engineer-core/ -- there are a few other openings as well, have a look around! At Sonian, we work in Clojure full-time. We use it for just about everything, and wouldn't have it any other way. We're a fully remote

how do you re-load a clojure library?

2015-03-29 Thread Dan Campbell
If you wanted to sort of 'clean out' a clojar or any contrib, korma or core.async or whatever, how would you do that? In other words, if you wanted a specific library to be re-downloaded and deployed (i.e., refreshed) on your desktop, what command would you run? Or what folders would you clea

Re: how do you re-load a clojure library?

2015-03-29 Thread Dan Campbell
There it is, in Windows, at c:\Users\DC\.m2\repository, will try that, thanks Juvenn. On Sunday, March 29, 2015 at 8:08:22 AM UTC-4, juvenn wrote: > > Hi Dan, > > All jars files are kept at `~/.m2/repositories` on *nix, as far as I know. > So you can just find and delete

Re: [ANN] Clojure Applied: From Practice to Practitioner

2015-04-09 Thread Dan Young
Awesome thanx! Picked up a copy yesterday and looking fwd to the weekend! Regards, Dano On Wednesday, April 8, 2015 at 7:27:58 AM UTC-6, Alex Miller wrote: > > Hey all, > > I'm very happy to announce that Clojure Applied is now available in beta: > > https://pragprog.com/book/vmclojeco/clojure-

Re: Composing Stuart Sierra's components

2015-04-15 Thread Dan Kee
oo Starting bar Starting baz Starting qux Starting foo Starting bar ``` Thank you! --Dan On Wednesday, March 18, 2015 at 8:51:17 AM UTC-5, platon...@gmail.com wrote: > > A possible implementation for the idea expressed in the previous post - > https://github.com/stuartsierra/component/p

Re: Composing Stuart Sierra's components

2015-04-16 Thread Dan Kee
Ah, that makes sense. Thanks for the thorough response! On Thursday, April 16, 2015 at 7:00:16 AM UTC-5, Stuart Sierra wrote: > > Hi Dan, > > The key to understanding what's happening here is to > remember that `component/start` combines both dependency > ordering *an

Looking for a clojure expert to help fill in a language feature reference

2015-05-18 Thread Dan Cancro
e delivers. Please let me know about the big things I've missed and I'll add them to the list. Thanks, Dan -- 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 post

Re: Looking for a clojure expert to help fill in a language feature reference

2015-05-19 Thread Dan Cancro
me that is spent researching and choosing among technology options and also to get people to work together instead of competing and creating factions. On Monday, May 18, 2015 at 1:36:19 PM UTC+2, Atamert Ölçgen wrote: > > Hi Dan, > > Who are the people you help understand t

[ANN] clafka 0.1.0 - a clojure kafka client focusing on the SimpleConsumer and KafkaProducer.

2015-06-09 Thread dan . stone16321
the default zookeeper consumer in kafka (like us!) c. Use a clojure wrapper for the new KafkaProducer api (including broker acknowledgement) Source and docs here: https://github.com/mixradio/clafka Questions, comments and contributions very welcome! Regards, Dan -- You received this message

clojure 1.6 eval from Java

2014-07-22 Thread Dan Campbell
Hi, I'm confused about the new api, with reference to using eval, from a non-clojure jvm app. Are we still supposed to invoke eval from RT.var? That's working fine for me, so far. The new clojure.java.api seems to be relevant only to calling individual functions. My current app just need

Clojure Inspector navigation error

2014-08-05 Thread Dan Campbell
In 1.6.0, If you create a mixed nested object, such as ( def nst ( vec '( ( 3 7 22 ) 99 ( 123 18 225 437 ) ) ) ) , and then you inspect the tree representing the object ( inspect-tree nst ) Most of the navigation with the keyboard proceeds fine. However

Weird data reader issue (clj-time)

2014-08-20 Thread dan . stone16321
Maybe I am missing something obvious - I am using custom data readers for joda-time instants. time/inst strings are coerced into utc date times, time/insto keep the offset around. Using the exact same function to parse the string via the data-reader, and just calling the function - I get diff

Re: Weird data reader issue (clj-time)

2014-08-21 Thread dan . stone16321
Thats it! Thanks for the great explanation. On Wednesday, August 20, 2014 5:55:18 PM UTC+1, Marshall Bockrath-Vandegrift wrote: > > What's your `print-dup` for instants print them as? The way compilation > for these expressions is going to work is: > > (a) The initial form will be read using th

Re: CCW bug [SEVERE]

2014-10-28 Thread Dan Cross
Can we please stop feeding the troll? Thanks. -- 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 u

Hierarchical data core.logic

2014-11-13 Thread dan . stone16321
I think this is a dummy question, but wondering whether this is possible in core.logic? Lets say I have a set of relations (db-rel foo p) (db-rel bar p) (db-rel fooz p p2) and facts [foo 1] [bar 2] [fooz 2 1] [bar 3] [fooz 3 1] See that the fooz relation is potentially describing bar as chil

Re: style question on tightly coupled functions

2014-11-20 Thread Dan Girellini
Using letfn allows the local functions to reference each other arbitrarily. In your example, f2 can call f1 but not vice versa. On Thu, Nov 20, 2014 at 11:08 AM, Alex Baranosky < alexander.barano...@gmail.com> wrote: > letfn has no value imo. It is an unwritten stylistic rule I have to never > us

How do you refer to a previous value of a var, within a loop/recur?

2014-11-23 Thread Dan Campbell
Hi, I have to loop through a string, consecutively replacing substrings with single characters, one substring at a time. Each time through the loop, I need to use a cond to check that the length of the last replaced string, is shorter than the length of the previous replaced string. So, as an

Re: How do you refer to a previous value of a var, within a loop/recur?

2014-11-23 Thread Dan Campbell
gth 1, or a string that > cannot be reduced any further? > > So in that case, something like: > > (defn simplify [expr translations] > (if (= (count expr) 1) > expr > (let [next-expr (reduce-kv str/replace expr translations)] > (if (< (count

Re: How do you refer to a previous value of a var, within a loop/recur?

2014-11-23 Thread Dan Campbell
ou're correct. On Sun, Nov 23, 2014 at 5:27 PM, Sean Corfield wrote: > Dan, I’m with James here. Your code as presented is really hard to read > for folks used to the "standard Clojure style" - the strange layout of > parentheses is very distracting. The use of underscore i

Re: How do you refer to a previous value of a var, within a loop/recur?

2014-11-23 Thread Dan Campbell
"As long as you’re prepared to be told this every time you show your code to people, that’s up to you." I think you misunderstood the response. On Sun, Nov 23, 2014 at 5:49 PM, Sean Corfield wrote: > On Nov 23, 2014, at 2:41 PM, Dan Campbell wrote: > > Sorry man, but

Re: How do you refer to a previous value of a var, within a loop/recur?

2014-11-24 Thread Dan Campbell
receive my contributions or requests for assistance in a form that's palatable to them, it's not anyone's business how I code on a daily basis. On Mon, Nov 24, 2014 at 9:10 AM, Plínio Balduino wrote: > Hi Dan > > Please accept my two cents. > > "I prefer

Re: How do you refer to a previous value of a var, within a loop/recur?

2014-11-24 Thread Dan Campbell
enough. Of course we don't > care what you do when you're working alone and just for yourself. > > On Monday, 24 November 2014, Dan Campbell wrote: > >> Thanks for the input, Plinio. >> >> If the community jumps to the conclusion that I'm arrogant, becau

[ANN] silc - a tiny entity database for clojure (games)

2014-12-02 Thread dan . stone16321
games, that is how I am using it. However I'd be very interested to hear if there are any other compelling use cases for this. Pull requests welcome! Thanks, Dan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: [ANN] silc - a tiny entity database for clojure (games)

2014-12-03 Thread dan . stone16321
at allows you to manage many entities and their attributes in a pure way >>> with indexing for performance, include composite indexes. >>> >>> The intention of the library is certainly as the basis for an entity >>> component system for games, that is how I am u

Re: [ANN] silc - a tiny entity database for clojure (games)

2014-12-03 Thread dan . stone16321
> > Is it possible to retrieve all entities with a set of attributes, > regardless of the attribute values? Not yet, I haven't indexed for it. You could approximate it using the ave index if you just concat any set of entities under any value. However it would require the attributes you are

Re: [ANN] silc - a tiny entity database for clojure (games)

2014-12-03 Thread dan . stone16321
I have released an update to the lib with a new index the `attribute-entity` index, and improved the readme (I hope). Check it out! Regards, Dan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: November machine learning study meetings

2020-10-29 Thread dan...@madlan.co.il
The times for the November machine learning study meetings are set: https://time.is/1100_13_Nov_2020_in_UTC/ https://time.is/1600_13_Nov_2020_in_UTC/ https://time.is/1200_14_Nov_2020_in_UTC/ https://time.is/1700_14_Nov_2020_in_UTC/ https://time.is/1400_15_Nov_2020_in_UTC/ All meetings will be 2-

Re: Is this behavior of clojure.core/pr a bug?

2016-08-03 Thread Dan Burton
gt; >> >> >> >> >> -- > 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 pat

Re: Meta-data should be added to deprecated functions?

2016-08-09 Thread Dan Burton
ng pushed for Clojure 1.9! Nice work. -- Dan Burton On Tue, Aug 9, 2016 at 1:49 PM, Alex Miller wrote: > There are really two aspects to this - one is actually including the > metadata in core.async, which can definitely be done. > > The second is adding functionality to Clojure c

Re: It's time for Google Summer of Code 2017!

2017-02-06 Thread Dan Burton
Note that when Haskell.org didn't make it into gsoc last year, they successfully organized a similar program through private donations. While one hopes that Clojure will be accepted into gsoc, consider having a similar course of action as Plan B. -- Dan Burton On Thu, Feb 2, 2017 at 10:

Re: Release date for 1.9

2017-02-28 Thread Dan Burton
Obligatory: "our team uses clojure-future-spec with clojure-1.8" -- no problems so far. -- Dan Burton On Tue, Feb 28, 2017 at 11:59 AM, Sean Corfield wrote: > On 2/28/17, 10:26 AM, "Erik Assum" e...@assum.net> wrote: > > And, yes, I'm aware of the fact th

Re: [ANN] New Clojure story pages on clojure.org

2017-04-06 Thread Dan Carpenter
Great work, but I just wanted to say it doesn't look optimal on mobile. Maybe 1 item per column on most phones rather than 3? On Wednesday, April 5, 2017 at 11:00:12 AM UTC-7, Alex Miller wrote: > > I wanted to let people to know that we've been updating the clojure.org > site to add some deeper

Re: Clojure spec keys is considering all key within namespace although it is not defined

2017-06-28 Thread Dan Burton
This design is surprising to me. If this is the case, then I don't understand the point of `:opt` for s/keys. -- Dan Burton On Wed, Jun 28, 2017 at 2:17 AM, Max Penet wrote: > Hi, > > It's by design, as the doc of s/keys states: > > In addition, the values of *all*

Re: Migrating nREPL out of Clojure Contrib

2017-07-18 Thread Dan Larkin
Hi Chas! This is great news, I'm glad to hear development will resume. What's the downside to just forking? aka why bother rebooting from scratch? > On Jul 18, 2017, at 05:48, Chas Emerick wrote: > > Hi all, > > I've been approached many, many times over the years (and more frequently > sin

Re: Migrating nREPL out of Clojure Contrib

2017-07-18 Thread Dan Larkin
ing helped clarify things for me: > specifically, if I'm going to maintain the project outside of contrib, I > will reboot it as previously described. > > Thanks, > > - Chas > > On 7/18/2017 13:19, Dan Larkin wrote: >> Hi Chas! >> >> This is great news, I&#

Re: A Failure To Understand lazy-seq

2017-09-05 Thread Dan Burton
q after the first two hard-coded values, and it worked. What happens when you put it after just the first hard-coded value? Can you explain why? (def fibs (cons 0 (lazy-seq (cons 1 (map +' fibs (rest fibs)) -- Dan Burton On Mon, Sep 4, 2017 at 5:33 PM, mrwizard82d1 wrote: > I

Clojure Development jobs?

2015-07-30 Thread Dan McLaughlin
Wanted to check in to see if it was OK to post any Clojure job openings here? Is that cool or not acceptable? We have multiple openings, great team, phenomenal compensation and bonus, and backend is all Clojure. Let me know, thanks! Dan -- You received this message because you are subscribed

[ANN] clafka 0.2.2

2015-08-07 Thread dan . stone16321
h the SimpleConsumer and the PooledClient implement this interface. As always, contributions are very welcome! Cheers! Dan -- 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 f

Re: macro question

2016-01-26 Thread Dan Burton
lojure+unsubscr...@googlegroups.com > > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and st

Re: Porting Clojure to Native Platforms

2016-04-25 Thread Dan Girellini
Not knowing the problem you’re specifically trying to solve, would using using the GNU java compiler work to take byte code to native? On April 25, 2016 at 12:47:37 PM, JvJ (kfjwhee...@gmail.com) wrote: I've been wondering lately about getting Clojure to compile to native code, and so I've b

Re: Using a try catch inside a future

2016-04-29 Thread Dan Burton
same technique probably works. A simpler technique in this case would be to only catch the kinds of exceptions that you expect the inner block to throw, rather than "catching all exceptions" with (catch Exception e ...). -- Dan Burton On Fri, Apr 29, 2016 at 6:35 AM, Ashish Negi wrote:

Re: Using a try catch inside a future

2016-04-29 Thread Dan Burton
re-cancel thread#)) (throw e#) Try running (def f2 (test-f2 11)) with that future-try, and it goes crazy. After waiting 5 seconds, it spews out numbers up to around 2031, then stops because (second f2) wasn't able to allocate any more threads. I have no explanation for this.

Re: Using a try catch inside a future

2016-04-29 Thread Dan Burton
true ...) and it still behaves this way. It might seem unexpected or undesirable that it runs the "catch" branch, but it does seem like a good idea to let a future-try/catch block clean up after itself. /shrug -- Dan Burton On Fri, Apr 29, 2016 at 6:26 PM, Dan Burton wrote: >

Re: reader conditional not handling defmacro?

2016-05-20 Thread Dan Burton
cljs, and gotten-obj is js/Object. Thus, you can write cljc macros that symbolically refer to obj/obj and turn out as the correct thing. This is because the macro doesn't refer to the *value* of obj, just to the symbol, which isn't evaluated until runtime. -- Dan Burton On Fri, May 20,

Re: new learner question

2016-05-23 Thread Dan Girellini
em in the collection ’s’. So you’re calling first on each item in s and you can’t call first on a number. Thus the error you got. —dan. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

Re: ANN: Reagent 0.3.0 - now with async rendering

2014-02-04 Thread Dan Holmsand
nts more or less directly. Reagent on the other hand keeps the UI description as immutable data until it really has to tell React what to put out there. Then there are obviously some differences in API, but I think that these are more superficial. David might disagree strongly, of course :) /d

Re: ANN: Reagent 0.3.0 - now with async rendering

2014-02-05 Thread Dan Holmsand
has-children [props children] (into [:div {:style {:color "red"}}] children)) used like this: [has-children "foo" [:i "bar"]] /dan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr

Re: Question about Reagent

2014-02-11 Thread Dan Holmsand
and the like at all, so you will have to use some other way to get state from the server. You could use for example the functions provided by the Closure library, or some ClojureScript-friendlier lib, like cljs-ajax: https://github.com/yogthos/cljs-ajax /dan -- You received this mes

ANN: Reagent 0.4.0

2014-02-21 Thread Dan Holmsand
-arguments.html The project page is here: https://github.com/holmsand/reagent Cheers, /dan -- 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

Re: ANN: Reagent 0.4.0

2014-02-22 Thread Dan Holmsand
Reagent is now at 0.4.1, with support for ClojureScript 0.0-2173. Reagent's atom now implements the necessary IAtom, ISwap and IReset protocols. Reagent should still be compatible with older ClojureScript versions, but you will get a lot of compilation warnings. /dan On 21 feb 2014,

Re: Reagent: ReactCSSTransitionGroup

2014-02-28 Thread Dan Holmsand
;) (aget "ReactCSSTransitionGroup"))) and then call that with e.g [ctg {:transitionName "foo"} [:p "child1"] [:p "child2"]] or somesuch (I'm probably messing something up here, being away from Emacs for the moment, but you get the idea...). /dan O

core.cache strange behaviour for short ttl

2014-02-28 Thread dan . stone16321
Taking the code below, if I repeatedly read from a cache I will occasionally get nil back from the cache. This seems to happen on my machine for ttl's under 5 ms. Although I'm sure I would never use such a short TTL in the wild, I would like to know why I am seeing this... Has anybody else notic

Re: core.cache strange behaviour for short ttl

2014-03-03 Thread dan . stone16321
In case anyone was wondering I worked out what was going on and it makes perfect sense. I was being stupid :) If you ask for a value via 'lookup' expired values will not be returned at this point as 'has?' is called internally. I made a quick and dirty library to reflect the behaviour I want f

Re: let-while

2014-03-05 Thread Dan Cross
there is wider demand for this sort of thing. Is it worth asking that this be added to e.g. the core library? Or even to core.async? Thanks, - Dan C. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: let-while

2014-03-05 Thread Dan Cross
(And for context, here is Christophe's 'while-let' from 2009): (defmacro while-let "Makes it easy to continue processing an expression as long as it is true" [binding & forms] `(loop [] (when-let ~binding ~@forms (recur On Wed, Mar

Re: Why I'm giving Clojure a try

2014-04-16 Thread Dan Cross
r is, if it can be configured to do automatic parenthesis matching, fixing alignment and the like, that will go a long way towards mitigating the parenthesis burden. - Dan C. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Code layout

2013-12-10 Thread Dan Cross
Why not just, (reduce + (filter even? nuns)) ? That's a simple enough form I wouldn't bother with the line breaks. On Tue, Dec 10, 2013 at 9:24 PM, Plínio Balduino wrote: > Hi there > > What is the ideal way to format Clojure code? I'm following Batsov's Style > Guide but, in some moments, it

[ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-10 Thread Dan Holmsand
Cloact is a minimalistic interface between ClojureScript and React.js, that now has a proper introduction, some documentation and a few examples here: http://holmsand.github.io/cloact/ Project page and installation instructions are here: https://github.com/holmsand/cloact Enjoy, /dan

Re: [ClojureScript] [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-10 Thread Dan Holmsand
On Friday, January 10, 2014 5:23:19 PM UTC+1, David Nolen wrote: > Looks very nice :) Thanks! /dan -- -- 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 fro

Re: [ClojureScript] [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-11 Thread Dan Holmsand
om is changed. Quite another thing is if it is a good idea to do that :-) If possible, I'd say it is better to keep state that belongs together in a single atom. /dan On 11 jan 2014, at 16:58, Peter Taoussanis wrote: > Hi Dan, > > This seems like a really smart approach to me

Re: [ClojureScript] [ANN] Cloact 0.1.0 - Yet another React wrapper for ClojureScript

2014-01-11 Thread Dan Holmsand
re-rendered when its arguments (i.e the params map and possible children) changes. Also, React is fast enough that a few re-renderings won't even be noticeable most of the time. Unless React actually has to change the DOM the cost is very low. /dan -- -- You received this message beca

ANN: Cloact is now Reagent 0.2.0

2014-01-24 Thread Dan Holmsand
The new project page is here: https://github.com/holmsand/reagent Cheers, /dan -- -- 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: [ClojureScript] Re: ANN: Cloact is now Reagent 0.2.0

2014-01-24 Thread Dan Holmsand
ot; (:prod-code (reagent/props this})) and then use prod-code-img like this: [prod-code-img {:prod-code "foo" :src "bar"}] /dan -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

ANN: Reagent 0.3.0 - now with async rendering

2014-02-03 Thread Dan Holmsand
Cheers, /dan -- 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 from this g

Re: [ClojureScript] ANN: Reagent 0.3.0 - now with async rendering

2014-02-03 Thread Dan Holmsand
I don't think that is from Reagent. But maybe it comes from css? It does look a bit like a clearfix (or somesuch) css rule gone wrong. /dan On 4 feb 2014, at 04:53, ritchie turner wrote: > > Hi Dan > > This is a long shot, but I do have some wierd stuff going on at the m

Re: [ClojureScript] ANN: Reagent 0.3.0 - now with async rendering

2014-02-04 Thread Dan Holmsand
Thanks, I enjoy writing it! ClojureScript is such a delight to use (except, of course, when Closure's advanced compilation bites you where it hurts). :) /dan On 4 feb 2014, at 09:09, Henrik Eneroth wrote: > Cheers, Dan! > > > I'm doing experiments with both Reagen

Re: ANN Introducing Clochure: a better Clojure

2013-04-01 Thread Dan Cross
Well played. On Mon, Apr 1, 2013 at 10:28 AM, Michael Klishin < michael.s.klis...@gmail.com> wrote: > Introducing Clochure: a better Clojure. > > Quoting project's README: > > Clochure (http://clochure.org) is an educated attempt to solve Clojure's > number one problem and first obstacle that pu

Re: New CSS library - Garden

2013-04-10 Thread Dan Neumann
Good stuff! I'm using it in my hobby apps while I continue to cut my teeth on Clojure's web development toolkit. I'll definitely communicate any problems/improvements I spot as I try to scratch my own itch. -- -- You received this message because you are subscribed to the Google Groups "C

agents sending-off to other agents blocks?

2010-06-12 Thread Dan Larkin
ich is that actions sent to an agent from another agent won't be started until the first agent returns from its current action. Does anyone have insight as to the reasoning here? Is it a bug? If it's intended behavior is there something I can do to circumvent it? Dan -- You received th

Re: agents sending-off to other agents blocks?

2010-06-12 Thread Dan Larkin
Maybe I'll write a function that pulls from a BlockingQueue and run it on a Thread. Anyway, thanks again. Dan On Jun 12, 2010, at 3:46 PM, Moritz Ulrich wrote: > Sorry for the second mail, but here is the passage from clojure.org > which mentions the behavior you've seen: &

Re: agents sending-off to other agents blocks?

2010-06-16 Thread Dan Larkin
Ah thanks for pointing out release-pending-sends, I didn't know about that; it's exactly what I need in my case. On Jun 16, 2010, at 9:52 AM, YD wrote: > Yeah, it's intended, just like what Ulrich showed. The same comment > appears on the doc of release-pending-sends. > In your case, the inner s

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Dan Kersten
There are more rasons to want to avoid using threads than memory. Besides the obvious cost of creating and destroying threads (which is reduced or removed by using thread pools), you also have the cost of time slicing once you have more software threads than hardware threads: there is the obvious c

Re: Why no tail call optimization

2010-08-02 Thread Dan Kersten
Why can't the clojure bytecode compiler hand-perform this like functional languages do when compiling to native code? Is it to keep the clojure compiler fast (for dynamic runtime compilation), since performing tail call optimisation presumably requires a bunch of extra checks and more complex code

Re: Slightly Off Topic: .NET books

2010-08-06 Thread Dan Moniz
Standard_ by Jon Jagger, Nigel Perry, and Peter Sestoft - _Expert .NET 2.0 IL Assembler_ by Serge Lidin Hope this helps. If you read any of these, I would be interested in your feedback. I'm also interested in other people's recommendations. -- Dan Moniz [http://pobox.com/~dnm/] -- Y

Re: Slightly Off Topic: .NET books

2010-08-07 Thread Dan Moniz
(a > lot of cool stuff came in 3.0 and 4.0 [LINQ, implicit type > (inference), initializers, extension methods, lambdas, named and > optional parameters, to name a few]). My copy of Third Edition covers C# 3.0. -- Dan Moniz [http://pobox.com/~dnm/] -- You received this message

Re: a library I'm working on for generating PDFs from Clojure

2012-04-21 Thread Dan Cross
On Sat, Apr 21, 2012 at 6:20 AM, David Jagoe wrote: > Can anybody tell me whether wkhtmltopdf or flying-saucer deal with > pagination properly? I've been templating TeX to get properly laid out > tables broken over multiple pages. But of course I'd much rather just > generate the PDFs from the HTM

Re: a library I'm working on for generating PDFs from Clojure

2012-04-23 Thread Dan Cross
On Sun, Apr 22, 2012 at 3:33 AM, David Jagoe wrote: > On 21 April 2012 14:41, Dan Cross wrote: >> On Sat, Apr 21, 2012 at 6:20 AM, David Jagoe wrote: >> > Can anybody tell me whether wkhtmltopdf or flying-saucer deal with >> > pagination properly? I've been tem

Re: docstrings of if-let and when-let incorrect

2012-05-15 Thread Dan Cross
let [a (allocate-thing) b (read-into-thing a) c (extract-something-from-thing b)] (do-something-with c)) makes intuitive sense to me. If, at any stage of the execution, any of a, b or c was nil, the evaluation would stop and the (when-let) form would return nil. - Dan C. -- Y

<    1   2   3   >