Re: Alright, fess up, who's unhappy with clojurescript?

2011-07-27 Thread Daniel Werner
On 27 July 2011 01:43, Mark Derricutt m...@talios.com wrote: My unhappiness with it is more akin to my unhappiness with ANY language that tries to target multiple VM platforms, and that's mostly due to the -potential- to break the community. It may be helpful to approach the issue with the

Re: using regex reader macro with generated code

2011-06-16 Thread Daniel Werner
On Jun 16, 4:47 am, Alex Baranosky alexander.barano...@gmail.com wrote: IS it possible to use the regex reader macro # with generated code?  What I mean is do something like: #${(join | (range 1 1))} I'm using ${...} to mean string interpolation, though I know Clojure doesn't have that

Re: We need a better way to handle errors.

2011-05-23 Thread Daniel Werner
On May 23, 12:24 am, Aaron Bedra aaron.be...@gmail.com wrote: Have you signed a CA yet? If so, you can sign up for a confluence account and start a wiki page around this.  This way the appropriate discussions and review can take place and then possibly a JIRA ticket/patch to fix things up.

Re: Clojure stack

2011-05-23 Thread Daniel Werner
On May 22, 10:53 pm, Laurent PETIT laurent.pe...@gmail.com wrote: Your discussion has been slowly getting me into the mindstate that I'll add this missing reindent whole file/current selection feature in CCW, AH ! Or, perhaps into a separate library so we can use your reindenting feature in

Re: cond in dosync problem

2011-04-26 Thread Daniel Werner
On Apr 26, 10:52 pm, Jonathan Fischer Friberg odysso...@gmail.com wrote: No, that isn't possible.http://clojure.org/refs I disagree: In the example given, dereferencing happens outside the dosync block, thus outside of any transaction, so a race where map1 and map2 change midway through the

Re: fs - file system utilities for Clojure

2011-03-23 Thread Daniel Werner
On 23 March 2011 15:21, Jeffrey Schwab j...@schwabcenter.com wrote: Not so.  Windows commands of the form someProgram /some/path often mistake /some/path for command-line switches (like Unix flags). Yes, working around this issue is discussed in the Wikipedia article I linked to. I had

Re: fs - file system utilities for Clojure

2011-03-22 Thread Daniel Werner
On 22 March 2011 05:47, Shantanu Kumar kumar.shant...@gmail.com wrote: On Mar 22, 3:29 am, siyu798 siyu...@gmail.com wrote: (dirname /a/b/c) should return /a/b/ on both win and unix You can write such a function yourself. Irrespective of the platform, Java works fine with '/' as a separator

Re: Throwing an Exception with get

2011-03-21 Thread Daniel Werner
On 21 March 2011 15:52, Jonathan Smith jonathansmith...@gmail.com wrote: Here is a way that should work. (let [missing (gensym)]  (defn get-with-exception [map key]    (let [res (get map key missing)]      (if (= res missing)          (throw (new Exception my-exception))        res

Re: Throwing an Exception with get

2011-03-20 Thread Daniel Werner
On Mar 20, 10:50 am, Andreas Kostler andreas.koestler.le...@gmail.com wrote: I would like to throw an exception when I'm trying to retrieve a value in a map for a key that doesn't exist. Another concise solution (thanks, Conj Labs): (defn get-o­r-exc [map key] (if-l­et [[_ v] (find­ map

Re: Throwing an Exception with get

2011-03-20 Thread Daniel Werner
On 20 March 2011 22:02, Andreas Kostler andreas.koestler.le...@gmail.com wrote: Would that be flow control though? I see this exception as a rather exceptional circumstance for this application... If a missing key signifies an error, then yes, it should probably throw an exception. It seems

Re: Monad Lessons

2011-03-11 Thread Daniel Werner
On Mar 9, 8:15 pm, jim jim.d...@gmail.com wrote: So, my question is how many would be interested in such a session? This would be a basic introduction to monads. Future session could be about more advanced monad topics, if there was a demand for that. I'd *love* to attend. Even with such a

Re: Summer of Code 2011

2011-03-06 Thread Daniel Werner
On 5 March 2011 20:35, Timothy Washington twash...@gmail.com wrote: I've actually been thinking about that. And from what I can tell, LISP DSLs are simply extensions to the LISP language. But maybe I still haven't gotten my head wrapped around 'defmacros' and how they implements DSLs. It seems

Re: Entity component system

2011-03-06 Thread Daniel Werner
Hi msappler, On Jan 12, 12:27 pm, msappler damnedmar...@web.de wrote: No i do not mind. A blog is being planned for promotion of my game and sharing. Only have to find a domain name which i like. Have you put anything in the meantime? I'd be very interested to read about your game's progress

Re: better error messages smaller stack traces

2011-03-03 Thread Daniel Werner
On 2 March 2011 09:32, Alan a...@malloys.org wrote: '(apply + 1 1) would be how you create a list of those symbols. ('apply + 1 1) says call the function 'apply with the arguments of + 1 and 1. Note that this will still break at runtime because Integers are not seqable. :-) You probably want

Re: Arithmetic operations on custom types

2011-03-01 Thread Daniel Werner
On Feb 28, 9:31 pm, Seth wbu...@gmail.com wrote: Or, if you dont feel like doing refer-clojure every time, you might be interested in this:http://planet-clojure.org/page28.html under Computing with Units and Dimension Your link only gives me a 404, unfortunately, but Google's cached text- only

Re: Master worker pattern

2011-03-01 Thread Daniel Werner
On Feb 28, 3:34 pm, Zlaja zlatko.jo...@gmail.com wrote: How I can achieve master worker pattern in clojure with agents. For example I have components that write messages to a queue. I would like to process messages parallel by agents. Is it posible? This use case sounds like a job for Lamina:

Re: better error messages smaller stack traces

2011-02-27 Thread Daniel Werner
On 27 February 2011 20:50, Mark markaddle...@gmail.com wrote: I wrote that up quickly without thinking much about it.  Yes, the invocation is definitely a macro and not a function.  Still, I think it would be helpful to see the symbol's value and, if possible, the macro's arity. Is calling

Re: Trouble with type hints

2011-02-18 Thread Daniel Werner
On Feb 16, 6:20 am, Nick npatric...@gmail.com wrote: (let [  newv1  (time (doall (map (fn [v u I] (+ ^java.lang.Double v (* 0.5 (+ (* (+ (* 0.04 ^java.lang.Double v) 5) ^java.lang.Double v) 140 (- ^java.lang.Double u) ^java.lang.Double I v u I)))         newv  (time (doall (map (fn [v u I]

Re: Implementing destructuring without setting your hair on fire

2011-02-16 Thread Daniel Werner
On Jan 22, 1:19 am, Mark Triggs mark.h.tri...@gmail.com wrote: Daniel Werner daniel.d.wer...@googlemail.com writes: After a few tries I've come up with the following algorithm to transform :keys syntax into normal destructuring syntax, but am still appalled by its complexity: (let [vmap

Re: better error messages smaller stack traces

2011-02-12 Thread Daniel Werner
On 10 February 2011 21:33, Fogus mefo...@gmail.com wrote: Additionally, I've always hoped for separate PreConditionAssertionError and PostConditionAssertionError types, but keep forgetting to discuss it. A while ago Stuart Sierra wrote about using typed assertions in unit testing. One of his

Re: better error messages smaller stack traces

2011-02-10 Thread Daniel Werner
On 10 February 2011 17:05, Jeff Rose ros...@gmail.com wrote: Sorry for the reply spam, but I've just remembered another error reporting issue: pre and post conditions.  They are a great feature and I'd like to use them more often, but the error messages they produce are virtually useless in

Implementing destructuring without setting your hair on fire

2011-01-21 Thread Daniel Werner
Hi everyone, let's play a round of golf. I am currently implementing associative destructuring for ClojureJS while trying not to peek into clojure.core too often -- which wouldn't make things much easier since the 'destructure fn is a huge beast. After a few tries I've come up with the following

Re: How do I find implemented protocols in Clojure object?

2011-01-13 Thread Daniel Werner
On 13 January 2011 15:52, Maurits maurits.r...@gmail.com wrote: (defn all-protocols []  (filter #(protocol? @(val %)) (ns-publics *ns*))) (defn implemented-protocols [sym]  (filter #(satisfies? @(val %) sym) (all-protocols))) Of course, this will restrict your search to protocols in a given

Re: ANN: clojurejs -- a Clojure (subset) to Javascript translator

2011-01-12 Thread Daniel Werner
On Jan 11, 4:20 pm, Ram Krishnan kriyat...@gmail.com wrote: * Mozilla's JS 1.7 supports a let statement[1] with lexical scoping, ... That's an interesting idea, although I'm not too keen on specializing for any one browser. The other problem is I don't see any reasonable way of providing

Re: Odd behavior calling a fn test or try

2011-01-11 Thread Daniel Werner
On Jan 11, 2:28 am, Tom Hall thattommyh...@gmail.com wrote: I know I should not be naming my functions the same thing as ones in core You can and should, as long as it makes your life easier and doesn't get too confusing for readers. Just make sure you're able to access the original core

Re: ANN: clojurejs -- a Clojure (subset) to Javascript translator

2011-01-11 Thread Daniel Werner
Hi Ram, your take on Clojure to JS translation seems very interesting to say the least. Thanks for sharing your work. A few points I tripped over while reading the example: * Why are functions being defined as join = function (...) instead of function join (...)? Does this make a semantic

Re: Funding 2011?

2011-01-05 Thread Daniel Werner
On 4 January 2011 19:20, Jon Seltzer seltzer1...@gmail.com wrote: Why not update the funding from simple donation to a purchase of clojure/core software like a refined version of the eclipse plugin or some other incentive based approach?  I think I understand why rich might find 'donation'

Re: Funding 2011?

2011-01-04 Thread Daniel Werner
Hi Rich, On 4 January 2011 06:31, Rich Hickey richhic...@gmail.com wrote: I was going to continue the funding effort, but have decided against it for the reasons given here: Regarding the entitlement [...] as to what I do with my time, I believe I know of one of the discussions that lead you

Re: Calling methods with a dollar sign in them

2010-12-22 Thread Daniel Werner
On 22 December 2010 23:22, Seth wbu...@gmail.com wrote: ok, thats what i thought. Any change of a literal syntax for symbols like in lisp, |symbol|?? There is no special reader syntax for weirdly named symbols, at least as far as I am aware, but you can always use: (symbol strange$name) --

Re: Waiting for agents

2010-12-18 Thread Daniel Werner
On 18 December 2010 10:41, nicolas.o...@gmail.com nicolas.o...@gmail.com wrote: Thank you very much for the explanations. I will go for Fork/join. Anybody is working on a clojure wrapper? Take a look at Clojure's par branch: https://github.com/clojure/clojure/tree/par It has proof-of-concept

Re: Waiting for agents

2010-12-18 Thread Daniel Werner
On 18 December 2010 16:29, Ken Wesson kwess...@gmail.com wrote: Once Java 7 is out is starting to seem like once LaTeX3 is out or Oh, you haven't heard the news yet? LaTeX3 has already been superseded anyway: http://river-valley.tv/tug-2010/an-earthshaking-announcement -- You received this

Re: Null-safe threading macro?

2010-12-10 Thread Daniel Werner
On Dec 10, 6:35 am, Alex Baranosky alexander.barano...@gmail.com wrote: Thanks, it is so hard to google symbols. Use the search bar on ClojureDocs: http://clojuredocs.org/ -- Daniel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: Null-safe threading macro?

2010-12-10 Thread Daniel Werner
On 10 December 2010 22:08, Alex Baranosky alexander.barano...@gmail.com wrote: I actually did use that search and a search of -? doesn't come find -? The incremental search feature actually suggests -? while you're still typing, and clicking on the suggestion will take you to the correct docs

Re: will calling set on an existing set shortcircuit the call and return the same set or would it create a new one?

2010-12-02 Thread Daniel Werner
On Nov 30, 3:08 am, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote:  I didn't realize I could test it so easily. But I would like it to ideally return the same collection .. Shouldn't be hard to write a wrapper .. But I think it should be the default behaviour. What benefit do you hope to

Re: why not change type compare functions do a compare on strings as well?

2010-12-01 Thread Daniel Werner
On 1 December 2010 02:01, Chris Riddoch riddo...@gmail.com wrote: Which reminds me, I'd really love to see a good comparison of freely available benchmarking tools for Clojure.  From past discussions on the list, I gather that benchmarking in the JVM is a rather tricky thing in general, but

Re: Regarding The Implementation of 'merge-with'

2010-11-26 Thread Daniel Werner
On Nov 26, 1:42 pm, Stefan Rohlfing stefan.rohlf...@gmail.com wrote: Question 1: (when (some identity maps) This expression from the original implementation checks if the provided coll is empty. However, why not just use (when (empty? maps) or (when (seq maps) instead? Note also that (seq

Re: Regarding The Implementation of 'merge-with'

2010-11-26 Thread Daniel Werner
On 26 November 2010 16:48, Laurent PETIT laurent.pe...@gmail.com wrote: 2010/11/26 Steven E. Harris s...@panix.com Daniel Werner daniel.d.wer...@googlemail.com writes: (some identity maps), on the other hand, checks whether there is any non-empty map *in the coll of maps*. By non-empty

Re: Question about an idiom.....

2010-11-24 Thread Daniel Werner
On 24 November 2010 21:40, Mike Meyer mwm-keyword-googlegroups.620...@mired.org wrote: Could someone explain where this urge to write (- expr (func arg)) instead of (func expr arg) comes from? I like to use - and - because they allow me to add more steps to the pipeline as needed, without

Re: Clojure application in the wild, to learn beautiful Clojure technique(s) from

2010-10-31 Thread Daniel Werner
I'd consider the following projects: Compojure is written in an almost purely functional style and demonstrates well how Clojure values can act almost as their own DSLs while keeping the semantics clear and concise. http://github.com/weavejester/compojure Christophe's Regex lib shows how to use

Re: matching with wild-cards in clojure multi-methods

2010-09-09 Thread Daniel Werner
On 9 September 2010 07:31, Meikel Brandmeyer m...@kotka.de wrote: derive works with non-qualified keywords, but the contract disallows that: Apparently the contract given in the docstring is being enforced in derive's 2-arg definition, but the must be namespaced parts of the assertions are

Re: Mapping a function to a map

2010-09-08 Thread Daniel Werner
On Sep 7, 9:00 am, Thomas thomas.g.kristen...@gmail.com wrote: I've also been using my own version of a map-to-values function extensively and it would be really nice to have something like that, either in contrib or in core. It comes in handy surprisingly often. +1 I find myself writing

Re: matching with wild-cards in clojure multi-methods

2010-09-08 Thread Daniel Werner
On Sep 6, 4:43 pm, Meikel Brandmeyer m...@kotka.de wrote: You can use qualified keywords with an hierarchy. (def your-hierarchy   (- (make-hierarchy)     (derive ::hello ::anything)     (derive ::world ::anything)     (derive ::city ::anything)     (derive ::us ::anything))) Building your

Re: Why the mix of dot syntax in clojure.core?

2010-08-23 Thread Daniel Werner
On Aug 22, 2:39 am, Legilimens bort...@gmail.com wrote: Would people be interested in a patch that replaces all of the older static calls using . to the newer method using / ? I personally don't mind the leftovers of old syntax in core. However, the question of why is it being used comes up

Re: Why does using a dynamic binding make a function impure?

2010-07-21 Thread Daniel Werner
On 20 July 2010 11:50, Paul Richards paul.richa...@gmail.com wrote: So back to my example: (def forty-two 42) (defn func [] (* forty-two forty-two)) (defn other-func [] (binding [forty-two 6] (func))) func is impure, and other-func is pure.  It's really nothing to do with whether the

Re: ClojureDocs.org

2010-07-16 Thread Daniel Werner
Hi Zack, I just take a quick look at your site and must say that I'm impressed. This is going to become one of the utilities I constantly keep open in the background while developing. Especially since features like the Var cross-referencing tend to make easier to get the big picture. One thing I

Re: Clojure Futures Docs and Functionality

2010-06-25 Thread Daniel Werner
On 25 June 2010 05:27, Ryan Senior senior.r...@gmail.com wrote: (future-await fut2 2 :minutes) ; = done Your implementation points into the right direction (again, IMHO). I'd like to offer two suggestions: 1. Leave out the three-arg version of future-await. The time unit conversion seems

Re: Clojure Futures Docs and Functionality

2010-06-23 Thread Daniel Werner
Hello Ryan, On Jun 21, 7:34 am, Ryan Senior senior.r...@gmail.com wrote: 1 - I think a good improvement would be updating the docs for the future related functions to indicate what kind of objects are passed in and returned.  Users would then not have to go through the source to see what's

Re: STM style disk persistance

2010-06-23 Thread Daniel Werner
On Jun 22, 7:57 pm, Timothy Baldridge tbaldri...@gmail.com wrote: system it uses. Has anyone tried marrying the two system systems to create a truly persistent data primitive where any updates to a map is written to the disk? There has been an attempt at integrating STM transactions with DB

Re: Interface to integrate transactions with Clojure transactions

2010-06-12 Thread Daniel Werner
On Jun 11, 11:41 pm, Chris Kent cjk...@gmail.com wrote: Is this what you're thinking of? http://groups.google.com/group/clojure/browse_thread/thread/aa22a7095... I'm not sure what happened, it sounded promising but I've not seen it mentioned again since this thread went quiet. This is

Re: Interface to integrate transactions with Clojure transactions

2010-06-11 Thread Daniel Werner
On Jun 10, 12:26 pm, Michael Jaaka michael.ja...@googlemail.com wrote: Is there any way to integrate database transaction with Clojure transaction? It would be nice if operations done in memory and on database would be commited atomicly with the end of transaction scope in Clojure. Such

Re: A simple csv parsing library

2010-06-09 Thread Daniel Werner
Jonas, Thanks for stepping forward and publishing your work. From the short glance I had at it already, your code seems very low-level (probably for performance), but sound. The only thing that, compared to other CSV libraries I've used, I miss somewhat is explicit support for dialects. While the

Re: (apply interleave [[1 2]])

2010-05-31 Thread Daniel Werner
On May 30, 12:51 am, Eugen Dück eu...@dueck.org wrote: How often do you do: (+ 5) or (* 3) ? But you might have used something like (apply + coll) or (reduce + coll) and under certain circumstances your coll might have had only one element. This is a good line of reasoning. Let's add

Re: (apply interleave [[1 2]])

2010-05-31 Thread Daniel Werner
On May 31, 10:07 pm, Daniel Werner daniel.d.wer...@googlemail.com wrote: quantitative logic That should have been quantification logic. -- 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

Re: promoting contrib.string to clojure, feedback requested

2010-05-27 Thread Daniel Werner
On May 26, 8:12 pm, Mohammad Khan beepl...@gmail.com wrote: personally, I like strip or trim [rather] than chomp/chop. +1 from a mostly-Python programmer :-) On May 26, 8:15 pm, Mark Engelberg mark.engelb...@gmail.com wrote: If you're developing a trio, like ltrim, trim, rtrim, wouldn't it be

Re: agents returning nil by default

2010-05-20 Thread Daniel Werner
On 20 May 2010 11:42, Anders Rune Jensen anders.rune.jen...@gmail.com wrote: The algorithm: (defn change-state [cur-state]   (when ( (:value cur-state) 10)      (assoc cur-state :message danger, danger))) How I'd have to write it when using an agent: (defn change-state [cur-state]  

Re: ANN: try clojure

2010-05-17 Thread Daniel Werner
Having a web-based zero-deployment-effort REPL is pretty nifty, especially for newcomers. Thanks Rayne/Heinz/etc.! Already found a small bug: HTML entities are apparently quoted twice and appear in the output. Clojure blah quot;blahquot; Clojure filter #lt;core$filter__5084

Re: Clojure Added to Casting SPELs Site

2010-04-01 Thread Daniel Werner
Hi Conrad, thanks for putting this tutorial up. Casting SPELs was actually one of the documents that inspired me to start learning Lisp, so I'm happy to see it may help others get started with Clojure. Adding to the corrections: The Addendum (page 8) seems to have remained CL-centric

Re: Prefixed or suffixed symbols?

2010-02-25 Thread Daniel Werner
Hello Joshua, I don't think there is an official standard in Clojure, at least not yet. For a source of inspiration, you may be interested in this thread, in case you haven't found it yourself yet: http://groups.google.com/group/clojure-dev/browse_thread/thread/d090b5599909497c Personally, I

Re: Question about how I got run?

2010-02-16 Thread Daniel Werner
On Feb 16, 2:12 am, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org wrote: Wouldn't be hard to do, either. Just bind *script-name* (or some such) to the path in script-opt, and let the client decide if it's the same as *file*. It would indeed be helpful if clojure.main bound a Var to the

Re: Multimethods vs. cond?

2010-02-12 Thread Daniel Werner
On Feb 11, 4:04 pm, Bryce fiat.mo...@gmail.com wrote: I'm wondering what the rationale is for using multimethods vs. cond, and where it's best to use either?  Multimethods seem to be very seldom used, usually to dispatch on type, but I can see advantages to using data to dynamically define

Re: Detecting Number of Available CPU Threads

2010-02-11 Thread Daniel Werner
On Feb 9, 2:37 am, Wardrop t...@tomwardrop.com wrote: That seems like what I'm after, thanks. I assume this would be pretty reliable across all platforms running the JVM. In .NET, on the other hand, this value is stored in System.Environment.ProcessorCount. Perhaps it would be worthwhile to

Re: Run expression, with particular functions replaced

2010-02-06 Thread Daniel Werner
On Feb 4, 8:11 pm, Bryce fiat.mo...@gmail.com wrote: I take your point; I've given up trying to actually define a function with the expression for the moment (I'd imagine it's still possible, just much trickier than I thought).  My intention was to fake operator overloading.  For my purposes

Re: idiom question: infinite sequence as data source for many threads?

2010-02-01 Thread Daniel Werner
On Jan 30, 8:09 am, Timothy Pratley timothyprat...@gmail.com wrote: Below I present 'submit-future' which is similar to the existing 'future' call in that it spawns a thread to execute a task, but differs in that it will block if n submitted futures are already running, where n is the number

Re: idiom question: infinite sequence as data source for many threads?

2010-02-01 Thread Daniel Werner
On Jan 30, 7:07 am, free_variation cane.c...@gmail.com wrote: (defn init-features [stream] (let [feature-stream (ref stream)] (dosync (ref-set feature-stream stream)) The call to ref-set seems redundant here since you already initialize the ref with stream as its value.

Re: update-in and get-in why no default?

2010-01-31 Thread Daniel Werner
([m ks not-found] (if-let [v (reduce get m ks)] v not-found))) If I understand this arity version of get-in correctly, won't the default also be used if the value stored in the nested data structure evaluates to something false-y? Anyway, thanks for creating the patches! -- You

Re: Using map on multiple collections.

2009-12-26 Thread Daniel Werner
On Dec 23, 6:04 am, Nicolas Buduroi nbudu...@gmail.com wrote: Hi, today I needed to use the map function on multiple collections which didn't had all the same length. In this case, it returns a sequence of the size of smallest one. But the problem I was facing was required to map until the end

Re: Clojure newbie question regarding compile time type checking.

2009-12-24 Thread Daniel Werner
On Dec 13, 5:24 am, ajay gopalakrishnan ajgop...@gmail.com wrote: It tried the following in REPL and got no error. Personally, I feel that I should get an error because calling square on strings is wrong in both cases. Is there a way out of this in Clojure? I hope you don't mind me bumping

Re: :pre and :post throwing Exception - is this a smell?

2009-12-24 Thread Daniel Werner
On Dec 24, 7:08 am, Mike Douglas mike.doug...@gmail.com wrote: Previously: Caused by: java.lang.Exception: Assert failed: (= % x) With your patch, assert does not include x in its message anymore in case s is not given. Also, as a non-native speaker I find the phrase failed when somewhat

Re: Parenthesis Inference

2009-12-19 Thread Daniel Werner
On Dec 18, 8:07 pm, Martin Coxall pseudo.m...@me.com wrote: I had this thought at work, when I should have been working, so please bear with me if it's nonsense. One of the things that always puts people off of Lisp, as we all know, are the parentheses. Now, many ways have been suggested of

Re: Fine-grained locals clearing

2009-12-12 Thread Daniel Werner
On Dec 10, 3:10 pm, Rich Hickey richhic...@gmail.com wrote: I'm happy to announce I have implemented this fine-grained locals clearing in the compiler, in the 'new' branch. Is there a chance for this feature to find its way into master before Clojure 1.1 is released? -- You received this

Re: roll call of production use?

2009-12-01 Thread Daniel Werner
On Dec 1, 5:20 pm, Luc Préfontaine lprefonta...@softaddicts.ca wrote: http://www.infoq.com/news/2009/01/clojure_production Slightly off-topic: What prompted you to choose ActiveMQ over other popular message bus systems like RabbitMQ? Was it the ease of operability with Clojure/ Java, or are

Minor inconsistency in 'some docstring

2009-11-11 Thread Daniel Werner
(doc some) says: ... this will return true if :fred is in the sequence, otherwise nil: (some #{:fred} coll) However, some returns the matching value instead: = (some #{:fred} [:foo :fred :ethel]) :fred Attached patch fixes the docstring. (Not that applying the patch would be any easier than

Re: ClojureCLR: out parameters

2009-11-02 Thread Daniel Werner
On Nov 2, 4:07 pm, Miron Brezuleanu mbr...@gmail.com wrote: On Mon, Nov 2, 2009 at 4:30 PM, dmiller dmiller2...@gmail.com wrote: For ref out parameters, the problem is that let bindings and fn parameters are not variables.  You can't change the values they are bound to.  ref and out

Re: Generalizing - -

2009-10-31 Thread Daniel Werner
On Oct 29, 9:35 pm, AndrewC. mr.bl...@gmail.com wrote: Here's a macro that generalizes the two 'threading' macros - and -. There have been multiple discussions on this group where similar operators have been proposed, with some implementations very closely matching this one. If the demand is so

Re: college courses

2009-10-22 Thread Daniel Werner
On Oct 19, 5:03 pm, artg artgittle...@gmail.com wrote: I'm using Programming Clojure in a grad course and doing a short Clojure unit in a senior programming languages course at Calif State Univ Long Beach. Art, what kind of pre-existing knowledge do you expect or require in your students? In

Re: Is there a standard function transforming a map's vals

2009-10-11 Thread Daniel Werner
On Oct 11, 6:02 am, samppi rbysam...@gmail.com wrote: Oops, you're right; I was thinking about something else. And I have another mistake in my function too—I meant: (defn transform-map [f a-map] (into {} (map #(vector (key %) (f (val %))) a-map))) It's unfortunate that it's not in

Re: Schema for data structures

2009-09-26 Thread Daniel Werner
On Sep 24, 10:14 am, Miron Brezuleanu mbr...@gmail.com wrote: about). The degree of typing can be varied (i.e. a person is any map with a :name key, or any map with only a :name key, or any map with a :name key which is nil or string etc.) You may be interested in Konrad Hinsen's (algebraic)

Re: Getting REPL transcript

2009-09-26 Thread Daniel Werner
On Sep 23, 6:20 pm, Emeka emekami...@gmail.com wrote: Hello All, I would like to have a transcript of Repl. Could someone help me out here? Regards, Emeka If you use rlwrap, you can give it the --log-file (-l) argument: $ rlwrap -l repl.log java -cp ...

Re: frameworks

2009-09-19 Thread Daniel Werner
On Sep 18, 2:08 pm, demet8 dem...@gmail.com wrote: Im new to Clojure. Are there any development frameworks for clojure worth noting yet? There is quite a range of frameworks available already, covering topics such as web development, database persistence, MapReduce and computer algebra. Try

Re: Uncle Bob looking for clojure help!

2009-08-16 Thread Daniel Werner
David, could you please post a version of your solution[1] annotated with some comments on where you used which kind of optimization, and why? Your code looks very clean to me, and with some additional explanations I think this could become a good example on how to optimize computation-heavy

Re: a better reductions?

2009-08-09 Thread Daniel Werner
On Aug 7, 8:40 pm, Vagif Verdi vagif.ve...@gmail.com wrote: I'd suggest to include into library for teaching purposes variants of unoptimized functions with a suffix -naive. Say reduction-naive. This way you could have both beautiful algorithm for teaching purposes, and optimized function for