Re: "core.matrix" proposal

2013-01-06 Thread Konrad Hinsen
Mikera writes: > Initial tests seem to suggest that supporting N-dimensional arrays > should be pretty easy in terms of the API itself. We could also > provide fast-paths for 1D and 2D arrays. > > Of course, actual support for N-dimensional arrays would depend on > the underlying implementa

Re: Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread Vedang
I remembered bookmarking a library that did something similar, so I looked at my bookmarks. Here is Zach Tellman's "potemkin" library, you might be interested in checking it out: https://github.com/ztellman/potemkin >From the README : "Clojure’s namespaces conflate how you implement your code and

Re: "core.matrix" proposal

2013-01-06 Thread Mikera
Yep, the idea is to be flexible enough to support many different implementations. The pure Clojure version should be very easy to use and flexible since it uses regular Clojure persistent vectors. The trade-off is of less performance compared to the Java/native implementations. As an added bon

Re: "core.matrix" proposal

2013-01-06 Thread Mikera
Initial tests seem to suggest that supporting N-dimensional arrays should be pretty easy in terms of the API itself. We could also provide fast-paths for 1D and 2D arrays. Of course, actual support for N-dimensional arrays would depend on the underlying implementation. On Monday, 7 January 20

Re: "core.matrix" proposal

2013-01-06 Thread James Sofra
+1 on Konrad's comment about N-dimensional arrays for me. I think the issue of using immutable arrays (which can be important for performance) in Clojure is interesting to think about. I have had some ideas about how to use arrays with restricted or limited mutability but haven't solidified anyt

Re: Unable to save the source file which loads repl

2013-01-06 Thread Stephen Compall
On Jan 6, 2013 10:22 PM, "Alice" wrote: > C:\>java -jar clojure-1.4.0.jar hello.clj > user=> > > And then the file becomes read-only. > I'm launching repl myself to avoid threading issue in my wpf project. > (https://gist.github.com/3062194) It's how Windows works. You'll have to do something el

Unable to save the source file which loads repl

2013-01-06 Thread Alice
c:\hello.clj: (clojure.main/repl) C:\>java -jar clojure-1.4.0.jar hello.clj user=> And then the file becomes read-only. I'm launching repl myself to avoid threading issue in my wpf project. (https://gist.github.com/3062194) -- You received this message because you are subscribed to the Goog

Re: Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread Sean Corfield
On Sun, Jan 6, 2013 at 6:17 PM, Stuart Sierra wrote: > 1. `refer`. Define a public function that `refer`s all the symbols you want. > It's an extra step for the user, but that's good because it makes it evident > that extra symbols are being added. Forcing all users of a library to refer a whole

Re: Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread Leonardo Borges
On Mon, Jan 7, 2013 at 1:17 PM, Stuart Sierra wrote: > I've said it before and I will keep saying it: copying symbols by interning > vars breaks the identity of the original vars. It breaks dynamic binding, > with-redefs, and the ability to redefine functions at the REPL. > > Clojure has a two per

Re: Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread Stuart Sierra
I've said it before and I will keep saying it: copying symbols by interning vars breaks the identity of the original vars. It breaks dynamic binding, with-redefs, and the ability to redefine functions at the REPL. Clojure has a two perfectly good mechanisms for making vars available in other na

Re: Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread Leonardo Borges
+1 I was thinking of doing the same in the validation lib I published recently [1] and this thread came in handy. I haven't implemented it yet but having a common way in which people do this seems reasonable - if it's in core then all the better. Cheers, Leo [1] - https://github.com/leonardobor

Re: Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread Brian Marick
On Jan 6, 2013, at 3:34 PM, Sean Corfield wrote: > Here's what I use to pull symbols from Enlive into FW/1: Midje plays similar tricks to make namespace abilities available via one `use`. Which makes me think: 1: In the old patterns world, there was a "rule of three" which claimed that som

Clojure/Script pr-str/read-string roundtrip differences

2013-01-06 Thread Thomas Heller
Hey, I'm writing a Clojure Webapp with a CLJS Frontend and expected to be able to cljs.reader/read-string everything I pr-str'd on the CLJ side. That however does not work for defrecords and BigDecimals (1.1M) . 1. defrecord In CLJ I can: (ns dummy) (defrecord Foo [bar]) (pr-str (

Re: Suggestion: add `into` on clojure.org/data_structures page

2013-01-06 Thread Sean Corfield
And there's also the excellent http://clojureatlas.com for exploring concepts and their implementations within the Clojure ecosystem. On Sun, Jan 6, 2013 at 3:08 PM, Andy Fingerhut wrote: > For most of the documentation on clojure.org, only a few people have > authorization to modify it. You cou

Re: Suggestion: add `into` on clojure.org/data_structures page

2013-01-06 Thread Andy Fingerhut
For most of the documentation on clojure.org, only a few people have authorization to modify it. You could create a JIRA ticket suggesting a change here: http://dev.clojure.org/jira/browse/CLJ Such tickets can take anywhere from a few days to many months before someone acts upon them, de

Suggestion: add `into` on clojure.org/data_structures page

2013-01-06 Thread David James
I noticed that `into` is not currently mentioned on http://clojure.org/data_structures How do community-suggested documentation changes work? Is there a wiki? Auto-generated docs from source? Thanks, David -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread Sean Corfield
Here's what I use to pull symbols from Enlive into FW/1: (def ^:private enlive-symbols ['append 'at 'clone-for 'content 'do-> 'html-content 'prepend 'remove-class 'set-attr 'substitute]) (defmacro enlive-alias ^:private [sym] `(let [enlive-sym# (resolve (symbol (str "html/" ~sym)))] (int

Re: core.match gotcha

2013-01-06 Thread Chas Emerick
On Jan 6, 10:48 am, Ambrose Bonnaire-Sergeant wrote: > On a related note, combining a quoted symbol and a named wildcard pattern > seems to be buggy. > > clojure.core.match=> (match 'my-sym a a) > # ocr-3612 in this context, compiling:(REPL:79)> > clojure.core.match=> (macroexpand-1 '(match 'my-sy

Copying (immigrating) macros from namespace to namespace

2013-01-06 Thread the80srobot
I have come up with a solution to a problem I don't think exists outside of my mind, but since I can't for the life of me figure out how Clojure 'wants' me to do this, I thought I would bounce this off the Google Group. *The scenario:* I am trying to collect a bunch of functions and macros from

Re: Extracting map values matching a pattern

2013-01-06 Thread Stephen Compall
On Jan 6, 2013 1:55 PM, "Jonathon McKitrick" wrote: > My first thought is to simply iterate the web parameter map, and convert each key to a string using NAME and then a regex on the name. Is there a better way? If the numeric range may not be contiguous or start at 0 or 1, and you do not need t

Extracting map values matching a pattern

2013-01-06 Thread Jonathon McKitrick
I have a web handler which will take any number of parameters beginning with 'q' and a number, like 'q1', 'q2', etc. I want to iterate and operate on just those parameters. My first thought is to simply iterate the web parameter map, and convert each key to a string using NAME and then a regex

Re: core.match gotcha

2013-01-06 Thread Chas Emerick
On Jan 6, 2013, at 10:48 AM, Ambrose Bonnaire-Sergeant wrote: > On a related note, combining a quoted symbol and a named wildcard pattern > seems to be buggy. > > clojure.core.match=> (match 'my-sym a a) > # ocr-3612 in this context, compiling:(REPL:79)> > clojure.core.match=> (macroexpand-1 '(

core.match gotcha

2013-01-06 Thread Chas Emerick
I've recently started using core.match, which has been quite pleasant and successful; thank you to David Nolen, and all others that have contributed. The only hiccup I've had has been around how core.match incorporates bindings from local scope into pattern rows. A stupid example demonstrating

ANN clj-javafx 0.2

2013-01-06 Thread Christian Sperandio
Hi, I released the version 0.2 of clj-javafx. You can find it here: https://github.com/chrix75/clj-javafx/tree/clj-javafx/0.2 As a reminder, this project helps you out to use JavaFX with Clojure. You have information about this project in the Wiki pages. Chris -- You received this message bec

Upcoming London Clojurian Events

2013-01-06 Thread Bruce Durling
Roll up! Roll up! We have 2 Clojure events coming up in the next 7 days here are the details! - Bodil Stokke and ClojureScript all the way down Thursday 10 January at Skills Matter 18:30 http://skillsmatter.com/event/scala/clojurescript-all-the-way-down Node.js is really hip these days. Of cours

Re: Clojure Conj Videos

2013-01-06 Thread kinleyd
You are right Alex. I got it mixed up since I've been waiting for both the Strange Loop and the Clojure Conj talks on InfoQ. On Sunday, January 6, 2013 7:29:15 AM UTC+6, Alex Miller wrote: > > Barski hasn't spoken at Strange Loop, perhaps you mean his talk at the > conj? > > On Friday, January 4

Re: Google+ community

2013-01-06 Thread kinleyd
Well, thanks @dspiteself for bringing up the topic. I like the interaction at G+ and joined the larger G+ Clojure community as a result of this thread. On Sunday, January 6, 2013 3:51:26 AM UTC+6, dspiteself wrote: > > Thanks I am surprised I did not see it when I created it a week or 2 ago. > I