Re: Implementation of min-key inefficient?

2015-02-09 Thread Frank Schmidt
Thanks a lot. I voted :) -- 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: ANN: ClojureScript 0.0-2814, Nashorn REPL, async testing, and much more

2015-02-09 Thread Ivan L
Congratulations David and CLJS team, you guys are on fire lately. On Monday, February 9, 2015 at 7:47:41 PM UTC-5, David Nolen wrote: > > ClojureScript, the Clojure compiler that emits JavaScript source code. > > README and source code: https://github.com/clojure/clojurescript > > New release vers

Re: ANN: ClojureScript 0.0-2814, Nashorn REPL, async testing, and much more

2015-02-09 Thread David Nolen
Oh also thanks to Leon Grapenthin for working on the async testing support. And of course a general round of thanks to everyone who submitted patches of any kind and size for this release. David On Mon, Feb 9, 2015 at 7:47 PM, David Nolen wrote: > ClojureScript, the Clojure compiler that emits

ANN: ClojureScript 0.0-2814, Nashorn REPL, async testing, and much more

2015-02-09 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript New release version: 0.0-2814 Leiningen dependency information: [org.clojure/clojurescript "0.0-2814"] There are numerous enhancements in this release inc

Re: New Member Initiation

2015-02-09 Thread Christopher Small
Hi Shubham Welcome to the Clojure community :-) Have you already been programming for a while? Are you new to functional programming, or programming in LISPs? Or just new to Clojure, and interested in learning more and helping develop things within the community. There are a lot of resources a

Re: Extending the LispReader with "embeded language lorms"

2015-02-09 Thread Luc Prefontaine
I apologize to the readers that may have a hard time getting rid of the image of myself in a bath :))) Sorry :) > Hi, > > Nice feature if you write a spreadsheet app maybe. > Still wonder who would use a console to interact with a spreadsheet :)) > > Just kidding. > > Tagged literals are the

Re: Extending the LispReader with "embeded language lorms"

2015-02-09 Thread Luc Prefontaine
Hi, Nice feature if you write a spreadsheet app maybe. Still wonder who would use a console to interact with a spreadsheet :)) Just kidding. Tagged literals are the way to go to extend the reader. If lisp notation is so much a pain then build your own reader using a tool like ... instaparse. Y

Re: Extending the LispReader with "embeded language lorms"

2015-02-09 Thread henrik42
Not anybody? I'm a little puzzled: is this feature so useless? I thought embedding stuff like CSV data in Clojure code "as is" could be a nice feature. https://github.com/henrik42/extended-lisp-reader#parsing-csv No need to rewrite it in Clojure syntax/string literals or other forms. I think aft

Inconsistency in overflow handling between type-hinted and reflective calls

2015-02-09 Thread Michael Blume
(import 'java.io.DataOutputStream) (import 'java.io.ByteArrayOutputStream) (defn- ->bytes "Convert a Java primitive to its byte representation." [write v] (let [output-stream (ByteArrayOutputStream.) data-output (DataOutputStream. output-stream)] (write data-output v) (seq (.

Re: Implementation of min-key inefficient?

2015-02-09 Thread Andy Fingerhut
Probably it was simplicity of coding, but that is just my guess. There is a ticket open for Clojure suggesting reducing the number of calls to the function. You, and anyone else who would like to see this changed in the future, are welcome to vote on this ticket. http://dev.clojure.org/jira/brow

Implementation of min-key inefficient?

2015-02-09 Thread Frank Schmidt
Hi, the min-key function is implemented recursively. Therefore in (min-key #(.length ^String %) "a" "aa" "aaa") the .length function is evaluated 4 times instead of 3 times. What are the reasons for this nice but inefficient implementation? Best wishes, Frank Schmidt -- You received this mes

Clojure/West 2015 - CFP and Opportunity Grants

2015-02-09 Thread Alex Miller
Hello all, The Clojure/West CFP ends this Wednesday and we are still looking for more proposals! * Feb 11th - CFP closes * Feb 27th - notifications to speakers * Sessions will be published soon after this * Speakers receive free admission, air (limited for international), and hotel for the confere

Re: OO Programmer trying to move to Clojure: Encapsulation

2015-02-09 Thread Gregg Williams
@Dru, I feel I'm ahead of you in learning Clojure, but I'm not yet to where @Colin is. However, I'm close enough that I recognize how accurate and concise his advice is--in fact, I'm saving it to remind myself! Also, I just finished reading Functional Programming Patterns in Scala and Clojure,

parameterized/-izable transducers

2015-02-09 Thread Sam Raker
So I've written a transducer to build up urls from relative links: (defn build-url ([root] (fn [xf] (fn ([] (xf)) ([links] (xf links)) ([links suffix] (xf links (let [root (if (.endsWith root ".html")

[ANN] Om-Bootstrap 0.4.0, w/ support for Om 0.8

2015-02-09 Thread Sam Ritchie
I last wrote about om-bootstrap at version 0.2.6. This new version is compatible with Om 0.8.x and React 012.x. We've also added a few new features - modals and pagers, plus some collapsible functionality for navbars and panels. Thanks to all the contributors on this release! Docs site: htt

Re: ANN: Clojure-Miniprofiler, a web application profiling tool

2015-02-09 Thread tcrayford
Sven, As a followup, I have an example library that wraps liza (a key-value store library) in miniprofiler calls here: http://yellerapp.com/opensource/clojure-miniprofiler-liza.html Similar could be accomplished for pretty much any other database library out there, though it depends on how goo

Re: Combining reloaded workflow in web dev with dynamic var approach

2015-02-09 Thread Steve Ashton
I've had the same question. What I've come up with is to introduce a new middleware in the the dev-system, which wraps the both the creation of the app handler and calling the handler with the request map. The prod-system would still refer directly to a single instance of the app handler. Now i

Re: Reducers question

2015-02-09 Thread Thomas Heller
Cat is just missing a print-method entry. Try (into [] (r/fold 1 r/cat r/append! [1 2 3])), the result is what you'd expect. The n parameter isn't actually about parallelism but partition size. Fork/Join will decide the parallelism. In the case of n=1 the input will be split into 3 partition of

Reducers question

2015-02-09 Thread Aaron Cohen
I'm not sure if the 4-arity fold function is working as expected. My understanding is that it should be equivalent to the 3-arity version, but with specified parallelism. However: (r/fold r/cat r/append! [1 2 3]) => [1 2 3] (r/fold 1 r/cat r/append! [1 2 3]) => # I don't actually understand how

Re: OO Programmer trying to move to Clojure: Encapsulation

2015-02-09 Thread Henrik Eneroth
If you find yourself passing the same argument over and over, you can always work in a partial: (def save-account (partial save db)) On Sunday, February 8, 2015 at 6:47:29 PM UTC+1, Colin Yates wrote: > > I missed the salient point about data transformations which is that of > abstractions. In