Re: Why cannot "last" be fast on vector?

2012-06-28 Thread Meikel Brandmeyer (kotarak)
Hi, Am Freitag, 29. Juni 2012 05:26:07 UTC+2 schrieb tbc++: For instance, one such function I wrote tonight is called every-other > (returns '(1 3 5) if you hand it (1 2 3 4 5)) > user=> (take-nth 2 [1 2 3 4 5]) (1 3 5) Kind regards Meikel -- You received this message because you are subs

Re: Why cannot "last" be fast on vector?

2012-06-28 Thread David Nolen
So you recommend that "last" should be only function that accepts IPersistentStack *and* ISeqable and does the appopiate thing? Or are there others? On Thursday, June 28, 2012, Mark Engelberg wrote: > On Thu, Jun 28, 2012 at 6:59 PM, Tamreen Khan > > > wrote: > >> Here's a somewhat old but stil

Re: Why cannot "last" be fast on vector?

2012-06-28 Thread Timothy Baldridge
> Nevertheless, I hope I've clarified the reasoning behind the current > design.  Early Clojure design decisions have a lot of inertia, so as David > pointed out, this is very unlikely to change. Well put. I would argue as well, that many functional languages I've come across take this stance: th

Re: Why cannot "last" be fast on vector?

2012-06-28 Thread Mark Engelberg
On Thu, Jun 28, 2012 at 6:59 PM, Tamreen Khan wrote: > Here's a somewhat old but still generally useful article on how Clojure > vectors are implemented: > http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/ > > > Vectors are optimized for random access

Re: Why cannot "last" be fast on vector?

2012-06-28 Thread Tamreen Khan
Here's a somewhat old but still generally useful article on how Clojure vectors are implemented: http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/ Vectors are optimized for random access, whereas lists are optimized for going through from the beginnin

Re: Why cannot "last" be fast on vector?

2012-06-28 Thread David Nolen
On Thu, Jun 28, 2012 at 7:32 PM, Warren Lynn wrote: > This is an off-shoot subject from my last post "General subsequence > function". > > I found people had similar questions before (one year ago): > > http://groups.google.com/group/clojure/browse_thread/thread/712711f049507c63/aea7cf438aa22922

Why cannot "last" be fast on vector?

2012-06-28 Thread Warren Lynn
This is an off-shoot subject from my last post "General subsequence function". I found people had similar questions before (one year ago): http://groups.google.com/group/clojure/browse_thread/thread/712711f049507c63/aea7cf438aa22922 As of Clojure 1.4, seems nothing changed, as "source" show here

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-28 Thread David Nolen
reducers are already available - though further perf work needs to be done to really deliver on the performance promises. Even so I wouldn't be surprised if they already outperform many chained sequence operations. David On Thu, Jun 28, 2012 at 5:45 PM, Ben Mabey wrote: > On 6/24/12 10:31 PM, C

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-28 Thread Ben Mabey
On 6/24/12 10:31 PM, Christian M. wrote: I think the only problem (if it is a problem at all), which won't be solved soon is ClojureScript's performance resulting from creating a lot of implicit objects in very high level computations. Something like (filter (map (reduce ... ... (map ... ca

Re: General subsequence function

2012-06-28 Thread Warren Lynn
Is there any reason why "last" needs to be slow on vectors? Can it just do the right thing and be fast on it? On Thursday, June 28, 2012 4:28:30 PM UTC-4, Meikel Brandmeyer (kotarak) wrote: > > Hi, > > Am 28.06.2012 um 20:52 schrieb Tassilo Horn: > > > And yes, there are some counter examples

Re: General subsequence function

2012-06-28 Thread David Nolen
It's a sequence operation and plenty useful. On Thu, Jun 28, 2012 at 4:56 PM, Tassilo Horn wrote: > Meikel Brandmeyer writes: > > Hi Meikel, > > >> And yes, there are some counter examples like `count` and `last`... > > > > last is not a counterexample. last is a sequence function, which acts >

Re: General subsequence function

2012-06-28 Thread David Nolen
On Thu, Jun 28, 2012 at 4:28 PM, Meikel Brandmeyer wrote: > Hi, > > Am 28.06.2012 um 20:52 schrieb Tassilo Horn: > > > And yes, there are some counter examples like `count` and `last`... > > last is not a counterexample. last is a sequence function, which acts on > seqs. It just calls seq on its

Re: General subsequence function

2012-06-28 Thread Tassilo Horn
Meikel Brandmeyer writes: Hi Meikel, >> And yes, there are some counter examples like `count` and `last`... > > last is not a counterexample. last is a sequence function, which acts > on seqs. It just calls seq on its argument so you may pass in a vector > (or anything seqable). The vector equiv

Re: General subsequence function

2012-06-28 Thread Meikel Brandmeyer
Hi, Am 28.06.2012 um 20:52 schrieb Tassilo Horn: > And yes, there are some counter examples like `count` and `last`... last is not a counterexample. last is a sequence function, which acts on seqs. It just calls seq on its argument so you may pass in a vector (or anything seqable). The vector

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-28 Thread David Nolen
On Mon, Jun 25, 2012 at 12:31 AM, Christian M. wrote: > I have developed a tiny web app in Clojure/ClojureScript and have written > an overview here . In > general, it was an exciting experience, but I also faced several problems > with ClojureSc

Re: General subsequence function

2012-06-28 Thread Warren Lynn
Andy: Thanks for laying out the options to move it forward. I think those functions belong to clojure.core, but I will see how persuasive I am, or how receptive the community is. :-) On Thursday, June 28, 2012 2:53:27 PM UTC-4, Andy Fingerhut wrote: > > From quick & easy, to slower & more diffi

Re: General subsequence function

2012-06-28 Thread Warren Lynn
Tassilo: Thanks a lot. Your version may be my private version before it (may) make into the language itself. When I raise an issue like this, a very common answer is "you can do this yourself". Maybe I can, but what is the purpose of a language? It gives you a common framework so nobody needs

Re: General subsequence function

2012-06-28 Thread Andy Fingerhut
>From quick & easy, to slower & more difficult, here are some options: Use the functions you want in your own code, and find happiness in the fact that they are quick & easy to write. Make a library of this and perhaps other related functions on github. Perhaps also release JARs to clojars.org

Re: General subsequence function

2012-06-28 Thread Tassilo Horn
Warren Lynn writes: Hi Warren, > 1. add a new function "append", which splices multiple ordered collection > together and always returns the result in the concrete type of its first > argument. So: > (append [1] '(2 3)) => [1 2 3] > (append '(1) [2 3])) => (1 2 3) > > It is different from "con

Re: General subsequence function

2012-06-28 Thread Warren Lynn
Here is "another language" elisp: Anybody who use Emacs can do this: (subseq (make-vector 5 10) 2 4) => [10 10] (subseq '(10 10 10 10 10) 2 4) => (10 10) As simple as that. Is that even worth the debate? :-) On Thursday, June 28, 2012 11:30:25 AM UTC-4, Warren Lynn wrote: > > Some of my thought

Re: General subsequence function

2012-06-28 Thread Warren Lynn
Some of my thoughts: 1. The argument that other languages do not have a similar thing is not valid. If that is valid, we don't need Clojure in the first place. 2. The argument that other people did not raise the issue before and not enough people support it so this is a non-issue is also not va

Re: [ANN] C2 v0.2.0: now with cljs data binding

2012-06-28 Thread Kevin Lynagh
Thanks Las, the page is now updated with the latest version and additional description. -- 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 - ple

Re: Bug in passing closured fns to eval

2012-06-28 Thread Tassilo Horn
myk writes: Hi! > Hi - I'm pretty sure I've found a bug in the way eval (Clojure 1.4) > deals with fns that have closures (in that it doesn't). > > I've posted my examples on stack overflow, so I won't reproduce them here: > http://stackoverflow.com/questions/11191992/functions-with-closures-and

Printing non-serializable data that can be read back in

2012-06-28 Thread Jeff Weiss
I am using clojure for functional testing ('functional' as opposed to unit testing, I don't mean in the FP sense). My tests write a clojure-formatted file containing all the test results. Each result may include: 1) The code of the test 2) Parameters of a data-driven test 3) Trace of a failed

Re: General subsequence function

2012-06-28 Thread Timothy Baldridge
> I like Lisp in general but it frustrated me (before also with Common Lisp) > that it seems Lispers often claim the language can help you fly higher while > in reality it actually makes your walking more difficult. Even it can help > you fly higher, that will still turn off many people because we

Re: Anyone using Sublime Text 2 + SumblimeREPL with Windows?

2012-06-28 Thread Wojciech Bederski
Hi Jacobo, sorry for responding so late. Usually I try to keep an eye on SublimeREPL Google Alerts and forums, but I've been buried with paperwork for the past several weeks (and there is no end in sight). Regarding text transfer shortcuts. Please move them to Preferences -> Key Bindings -

Bug in passing closured fns to eval

2012-06-28 Thread myk
Hi - I'm pretty sure I've found a bug in the way eval (Clojure 1.4) deals with fns that have closures (in that it doesn't). I've posted my examples on stack overflow, so I won't reproduce them here: http://stackoverflow.com/questions/11191992/functions-with-closures-and-eval-in-clojure/11202589#1

Re: [ANN] lib-noir 0.1.1

2012-06-28 Thread Ryan McGowan
I just wanted to say that this seems like a great idea. +1 On Saturday, June 23, 2012 11:08:47 PM UTC-7, Anthony Grimes wrote: > > Chris Granger and I decided that a lot of the stuff in Noir is also useful > outside of Noir, so I took a bunch of Noir's middleware and such and split > it out int

[ANN] table - Display ascii tables for almost any data structure with ease

2012-06-28 Thread Gabriel Horner
Hi Clojuristas, I'm announcing my first clojar - table, https://github.com/cldwalker/table. table handles rendering combinations of maps, vecs, lists and sets nested in one another as ascii tables. Four ascii table styles exist and more welcome: plain, org, unicode and github markdown. See the re

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-28 Thread Christian M.
I have developed a tiny web app in Clojure/ClojureScript and have written an overview here . In general, it was an exciting experience, but I also faced several problems with ClojureScript. For example, if you compile your code to JS, then the

Re: How I can convert this python line to clojure?

2012-06-28 Thread tutysara
Hi, If you have a variable vtkDataSetAttributes defined and if it contains the SCALARS method/field, it can be called using (.SCALARS vtkDataSetAttributes) On Monday, June 25, 2012 1:37:47 AM UTC+5:30, Antonio Recio wrote: > > The python line that I have rote before is not the one that I want

Re: leinigen 1.7.1 stalled when used from Jenkins

2012-06-28 Thread Pierre Allix
I found the error. Somehow it was caused by Jenkins started as standalone JAR by the nohup command but nonetheless not properly being "daemonized". -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Re: [ANN] C2 v0.2.0: now with cljs data binding

2012-06-28 Thread László Török
Great, can't wait to try it, note the http://keminglabs.com/c2/ page still refers to 0.1.0. 2012/6/28 Kevin Lynagh > Of course, you may want a link to the library itself: > > https://github.com/lynaghk/c2 > > As always, to use from Clojure/ClojureScript just add this to your > `project.clj`

Re: [ANN] Leiningen 2.0.0-preview7

2012-06-28 Thread Laurent PETIT
2012/6/28 Phil Hagelberg : > > I'm happy to announce the release of Leiningen version 2.0.0-preview7. > > This release introduces mirror support as well as the ability to sign > deployments and verify signatures and changes to credentials. > > ## 2.0.0-preview7 / 2012-06-27 > > * Fix a bug where fa