Re: [ANN] clojure.math.combinatorics 0.0.6

2013-10-31 Thread Ambrose Bonnaire-Sergeant
Thanks Mark and Alex! Ambrose On Fri, Nov 1, 2013 at 12:20 PM, Mark Engelberg wrote: > I'm pleased to announce the latest version of clojure.math.combinatorics. > https://github.com/clojure/math.combinatorics > > clojure.math.combinatorics is a library of functions to generate > permutations, s

[ANN] clojure.math.combinatorics 0.0.6

2013-10-31 Thread Mark Engelberg
I'm pleased to announce the latest version of clojure.math.combinatorics. https://github.com/clojure/math.combinatorics clojure.math.combinatorics is a library of functions to generate permutations, subsets, combinations, cartesian products, and selections of collections. NEW TO 0.0.6 -- partitio

Re: .length vs. count for string length

2013-10-31 Thread Mikera
On Wednesday, 30 October 2013 18:44:47 UTC+8, Alice wrote: > Which one is preferred? > > .length needs to be type hinted, so more verbose. > The performance penalty of count is negligible in most cases. > Doing a quick micro-benchmark with criterium I get: - .length at 5.5 ns - count at 50.0 ns

Re: [ANN] clojure.data.priority-map 0.0.3

2013-10-31 Thread Matthew Chadwick
very cool - thankyou On Wednesday, October 23, 2013 5:46:00 PM UTC+11, puzzler wrote: > > https://github.com/clojure/data.priority-map/ > > A priority map is similar to a sorted map, but sorts the entries by the > values rather than the keys in the map. Think of it as a kind of priority > queue

Re: .length vs. count for string length

2013-10-31 Thread Luc Prefontaine
I meant collection ... not sequence. Luc P. > Strings are character sequences, count is a better option to stay > within the sequence abstraction. > > Lic P. > > > > count does some type checks, but it's negligible in most cases as I already > > said. len can give a clear intention than cou

Re: Any interest in Compojure/Ring screencasts?

2013-10-31 Thread Tilak Thapa
+1, @James, i'm in. On Wednesday, October 30, 2013 4:32:18 AM UTC+5:45, Russell Whitaker wrote: > > I, for one, would happily pay (my employer's) money for such a thing. > > R > > On Tue, Oct 29, 2013 at 3:39 PM, James Reeves > > > wrote: > > I'm considering putting together a screencast, or

Potential improvement to select-keys ?

2013-10-31 Thread Don Jackson
select-keys currently returns a regular hash-map, regardless of the kind of map provided as the input argument. Alternately, select-keys could call empty on it’s map argument to obtain the map it will return, thereby preserving the type of map provided. FYI, Mark Engelberg recently pushed a c

Re: Any interest in Compojure/Ring screencasts?

2013-10-31 Thread Scott Thoman
On Thursday, October 31, 2013 7:28:39 PM UTC-4, Amr Malik wrote: > > Yes please, I'd be interested :) > > -A > > On Tuesday, 29 October 2013 18:39:05 UTC-4, James Reeves wrote: >> >> I'm considering putting together a screencast, or a series of >> screencasts, based on my Functional Web >> Arch

Re: Any interest in Compojure/Ring screencasts?

2013-10-31 Thread Amr Malik
Yes please, I'd be interested :) -A On Tuesday, 29 October 2013 18:39:05 UTC-4, James Reeves wrote: > > I'm considering putting together a screencast, or a series of screencasts, > based on my Functional Web > Architecture talk. > The base p

[ANN] cljs-start with batteries included

2013-10-31 Thread Mimmo Cosenza
Hi all, I just create a simple leon-template to create CLJS libs with batteries included: - separation of concerns between the user view and the dev view of the created lib (obtained by using the profiles.clj local to the project - http server and brepl (with piggieback by Chas) to bREPLing with

Re: request for feedback

2013-10-31 Thread Julien
Very nice! Definitively something I find useful. I guess most are already part of your todo list but here are some features I think might be interesting for library writers: * receive some notification when new versions are available * update some dedicated branch with new versions so they can be

Instaparse google group

2013-10-31 Thread Mark Engelberg
I've had a few people email me, asking if I could create an instaparse google group. It's hard for me to know for sure whether there really are enough instaparse users to justify a separate group, but I've noticed a surge in instaparse activity in the past couple of weeks (maybe due to EuroClojure

Debugging with Cider

2013-10-31 Thread Matthew O. Smith
Hi all, Has anyone gotten debugging in emacs working with cider (was nrepl). I did fork and update cljdb but it is pretty old school. https://github.com/m0smith/cljdb Is there any work on ritz or cdt? Thanks. -- -- You received this message because you are subscribed to the Google Groups "

Re: instaparse question

2013-10-31 Thread Jim - FooBar();
On 31/10/13 17:21, Lars Nilsson wrote: Perhaps remove DRUG from the grammar and use the transform function on a parse-result to do something like (insta/transform {:WORD (fn [w] (if (...) [:DRUG w] [:WORD w]))} parse-result) so [:DRUG w] is emitted for whatever criteria you may have (lookup) wh

Re: instaparse question

2013-10-31 Thread Lars Nilsson
On Thu, Oct 31, 2013 at 12:47 PM, Jim - FooBar(); wrote: > On 31/10/13 16:23, Jim - FooBar(); wrote: >> >> The result of this is a parser which sees everyhting as :TOKEN. That is >> because WORD matches almost everything. However I thought that putting it >> last would remedy the situation...it se

[ANN] lein-sync -- load lein project dependencies into an existing REPL

2013-10-31 Thread Phillip Lord
This is the first release of lein-sync, a new leiningen plugin which makes an existing REPL look like one launched in a leiningen project. Comments welcome. https://github.com/phillord/lein-sync >From the readme! A leiningen plugin to enable syncing an existing Clojure REPL to the current

Re: road map for clojure?

2013-10-31 Thread Alex Miller
Hi Julius, Clojure is (always) under dev. The issue and commit pipeline is bursty due to the process followed by contributors (http://dev.clojure.org/display/community/JIRA+workflow, more links here: http://dev.clojure.org/display/community/Contributing). Tickets pool in the Screened list and

Re: [ANN] lein-pedantic is now deprecated

2013-10-31 Thread David Goldfarb
Count me as another +1 for both these features. On Thursday, May 30, 2013 4:25:22 AM UTC+3, Nelson Morris wrote: > > Good news everybody! As of leiningen 2.2.0 using `lein deps :tree` will > perform version checks and version range detection. Therefore, I have > deprecated lein-pedantic. I appr

Re: Resources for learning techniques for isolating pure functions

2013-10-31 Thread Gary Trakhman
Well, though your DB is side-effects, your functions that write to it don't have to be aware of that. That's more a matter of dependency injection, passing components around, and being careful to return a new object from each operation. Once you decouple your components from each other via some k

Re: instaparse question

2013-10-31 Thread Jim - FooBar();
On 31/10/13 16:23, Jim - FooBar(); wrote: The result of this is a parser which sees everyhting as :TOKEN. That is because WORD matches almost everything. However I thought that putting it last would remedy the situation...it seems that the most general rule is applied first. Is that by design?A

Re: Request for help optimising a Clojure program

2013-10-31 Thread Jim - FooBar();
awesome news :) Jim On 31/10/13 14:19, Andy Fingerhut wrote: Just a follow up after a fair amount of thinking and experimentation has been done on this problem. Mark Engelberg has a very nice document describing the existing hash functions used by Clojure, examples with why they can cause co

instaparse question

2013-10-31 Thread Jim - FooBar();
Hi all, I'm starting to get the hang of instaparse and it just looks awesome! However there is a little thing that bugs meI may be doing it wrong that why I'm asking here. The behaviour that I want sounds reasonable at least to me...so here is an example: (insta/parser "S = TOKEN (SP

Re: Why isn't a docstring allowed for defrecord?

2013-10-31 Thread Mars0i
OK, I get it now. By using Point. I'm ... temporarily descending into the Java world, on top of which Clojure is built. By using ->Point I remain in the more harmonious Clojure world, which usually hides the darkness of Java from me. (No offense meant to Java afficionados. One of the thi

Re: What non-deprecated Clojure Web libraries to use?

2013-10-31 Thread Brian Craft
Yes, exactly. Currently, korma's data modeling occurs via macros that create data structures which aren't exactly part of the public API. So, your options are to wrap all the macros in a way that exposes the data model, or to try to interpret the data structures that it creates, without any gua

Re: Why isn't a docstring allowed for defrecord?

2013-10-31 Thread Mauricio Aldazosa
On Thu, Oct 31, 2013 at 9:15 AM, Mars0i wrote: > Excellent. Thanks Tassilo. I had attempted to do the same sort of thing > using > Point. > rather than > ->Point > which didn't work: > user => (doc Point.) > nil > user=> Point. > CompilerException java.lang.ClassNotFound

Re: Why isn't a docstring allowed for defrecord?

2013-10-31 Thread Gary Trakhman
The Java class lifecycle and namespaces/vars are separate sorts of 'resolution contexts', but they're (un)fortunately deeply tied together. On Thu, Oct 31, 2013 at 11:24 AM, Mars0i wrote: > On the other hand, the behavior of Point. might be considered a good thing > (or not): > > user=> (defrec

Re: Why isn't a docstring allowed for defrecord?

2013-10-31 Thread Mars0i
On the other hand, the behavior of Point. might be considered a good thing (or not): user=> (defrecord Point [x y]) user.Point user=> (meta #'Point.) CompilerException java.lang.RuntimeException: Unable to resolve var: Point. in this context, compiling:(NO_SOURCE_PATH:6:1) user=> (meta #'->Poi

Re: Why isn't a docstring allowed for defrecord?

2013-10-31 Thread Mars0i
Excellent. Thanks Tassilo. I had attempted to do the same sort of thing using Point. rather than ->Point which didn't work: user => (doc Point.) nil user=> Point. CompilerException java.lang.ClassNotFoundException: Point., compiling:(NO_SOURCE_PATH:0:0) user=> ->Poi

Re: core.async, returning a value from a channel

2013-10-31 Thread Leon Grapenthin
Thank you very much for the clarification and your incredibly fast reply :) Leon. On Thursday, October 31, 2013 3:16:22 PM UTC+1, tbc++ wrote: > > Yes, returning a value that will be created in some sort of async fashion, > directly from a function is not idiomatic. Instead, you should be return

Re: Request for help optimising a Clojure program

2013-10-31 Thread Andy Fingerhut
Just a follow up after a fair amount of thinking and experimentation has been done on this problem. Mark Engelberg has a very nice document describing the existing hash functions used by Clojure, examples with why they can cause collisions so often, and suggestions for changes to them to have fewe

Re: road map for clojure?

2013-10-31 Thread Gary Trakhman
Seems to me clojure's went past critical mass in terms of sustainability a long time ago. The ideas are going to be relevant until shared-memory architecture and systems made of those no longer dominate our hardware and thought processes, which is not within the foreseeable future. Maybe 15 years

Re: core.async, returning a value from a channel

2013-10-31 Thread Timothy Baldridge
Yes, returning a value that will be created in some sort of async fashion, directly from a function is not idiomatic. Instead, you should be returning channels and calling ! and >!!. As an example, here is how you would use http-kit's http async client from core.async: (require '[org.httpkit.clien

core.async, returning a value from a channel

2013-10-31 Thread Leon Grapenthin
Hello everyone, (I am posting here because I could not find a dedicated core.async group) recently I made a rather obscure bug-report (ASYNC-29). As a comment Rich Hickey stated that !! should not be used in library code. I can now reproduce the same problem without !! by simply derefing 50 und

Re: Incanter/vector-clj use error

2013-10-31 Thread Jim - FooBar();
On 31/10/13 12:43, P Martin wrote: To clarify my error, I did not put your suggestion into the ns declaration. I called it on a separate line of code. I now just have all of my require statements at the top of my clj files with proper aliasing and it works fine. well yes if you do have a name

Re: Incanter/vector-clj use error

2013-10-31 Thread P Martin
Ok, I think I get it now. Thanks for the explanation! To clarify my error, I did not put your suggestion into the ns declaration. I called it on a separate line of code. I now just have all of my require statements at the top of my clj files with proper aliasing and it works fine. Thanks again

Re: road map for clojure?

2013-10-31 Thread Craig
As Alan Kay said: "Lisp isn't a language, it's a building material." So we might ask: What other properties do we builders require from this material? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Re: Resources for learning techniques for isolating pure functions

2013-10-31 Thread Jozef Wagner
Following presentations may help http://www.infoq.com/presentations/Clojure-Design-Patterns http://www.infoq.com/presentations/Thinking-in-Data JW On Thu, Oct 31, 2013 at 3:42 AM, Ben Brinckerhoff wrote: > Clojure is the first functional programming language I've used for > anything more than

Re: Why isn't a docstring allowed for defrecord?

2013-10-31 Thread Tassilo Horn
"Jim - FooBar();" writes: > Ok my bad...for a second there I thought that a defrecord expression > returns a Var but it doesn't. It returns a Class object. You can't put > anything on that therefore 'doc' won't work on it anyway. Hm, well, the only thing a record has to document are its fields.

Re: road map for clojure?

2013-10-31 Thread Baishampayan Ghose
Please don't judge activity of a programming language ecosystem by just looking at the frequency of commits in the main language. Clojure the language evolves relatively slowly and every new feature is added after a lot of careful design. Unlike most mainstream languages many important features of

Re: road map for clojure?

2013-10-31 Thread Michael Klishin
2013/10/31 julius > Is clojure under dev? there is no much commits in months, any plan or road > map for clojure? I don't remember the exact quote but Clojure is developed as fast as it is designed. It's a pretty well known fact that Clojure's primary designer prefers to analyze the problem de