Re: clojureans in Boston and NYC

2013-03-11 Thread Tamreen Khan
The Clojure NYC meetup gets together about once a month:
http://www.meetup.com/Clojure-NYC/


On Mon, Mar 11, 2013 at 10:06 AM, Giacomo Cosenza
mimmo.cose...@gmail.comwrote:

 Hello everyone,
 on march 29th I'm moving from Milan (Italy) to Boston and I'm going to
 stay there for a month. During that month I'm pretty sure I'm going to
 visit NYC for few days. It would be an honor for me to have the opportunity
 to meet any clojurean living in Boston and NYC. There few italian
 clojureans and most of them live abroad and the only italian clojureans
 that I personally know are the ones working in my small sw company.

 If someone is interested to meet me, just let me know. I'll appreciate a
 lot.

 Thanks so much for your attention.

 Mimmo









 --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: A forum for Clojure...?

2013-03-05 Thread Tamreen Khan
It's a little different for language communities. More experienced
developers will tend to use mailing lists or IRC. Also, I think
stackoverflow is quickly become the go-to place for beginners to a language.

On Tue, Mar 5, 2013 at 2:14 PM, BJG145 benmagicf...@gmail.com wrote:

 I don't see it as an experience thing. There are a lot of highly skilled
 professionals on the Edugeek and Sound On Sound forums...

 --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: A forum for Clojure...?

2013-03-05 Thread Tamreen Khan
True, but the gaming community itself is heavily forum-based, so it makes
sense that gaming frameworks and libraries will also have active forums.


On Tue, Mar 5, 2013 at 2:21 PM, BJG145 benmagicf...@gmail.com wrote:

 Hmm, I'm Googling to find a good example.

 Haskell forums...nope, rubbish.
 Python forums...nope.

 Maybe it's not a programmer thing. The gaming frameworks have nice forums
 - Unity for example. They're not all newbies.

 http://forum.unity3d.com/forum.php

  --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [GSoC Idea] cljs layer/dsl over express js

2013-02-14 Thread Tamreen Khan
But compojure isn't in cljs, so you have to use the jvm. A wrapper around
express would mean you could run it on node.


On Thu, Feb 14, 2013 at 5:35 PM, Josh Kamau joshnet2...@gmail.com wrote:

 Clojure has compojure ... which is a sinatra like web framework  and
 you can create a new project usinglein new compojure   and start
 creating your request handler functions from there ... Just like in
 express.  If you want a jade equivalent... you can use hiccup .

 Josh.


 On Fri, Feb 15, 2013 at 12:30 AM, Omer Iqbal momeriqb...@gmail.comwrote:

 Just throwing ideas. Feel free to shoot it down if you folks think its
 not worth it :).
 Also, I'm a student, and would actually be participating in GSOC, so this
 is more of a shoutout for possible mentors, if you guys think the project
 makes sense.

 The Problem:
 1. cljs doesn't yet have a library/framework of its own to facilitate
 serverside web dev over nodejs. (I might be wrong here, and please correct
 me if I am).
 2. Expressjs(http://expressjs.com/) is an awesome sinatra inspired, very
 popular, web app framework for node.
 3. Using express directly using js interop calls can get ugly
 QED: It would make sense to have a cljs layer over express

 The Solution:
 I haven't ironed this out fully, but it would probably be a good idea to
 produce a compojure like framework, so its easier to adopt. Under the hood
 you'll obviously have either interop calls, or cljs implementations for the
 same functionality.

 Would love feedback on the idea! And whether can haz mentor?

 Cheers,
 Omer
 (@olenhad)

  --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




  --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Clojure - Python Style suggestion

2013-02-04 Thread Tamreen Khan
Sergey's example code seems to have arguments to a function happen on the
same line while new function calls appear on new lines. So:

filter
  smaller xs

...would be the equivalent of filter(smaller(xs)).

Anyway, I agree that parens don't add any more clutter. Having to *always*
have all the arguments on the same line could lead to needlessly long
lines. I also don't see how syntax like this would make the transition to
full Clojure with all the parentheses any easier. Beginners would still shy
away from all the parens and never go beyond playing around with the
language.

Would Python ever have a indent-lite version that allowed beginners to
use braces instead of indentation? Of course not, because learning to read
and write code with significant whitespace is an important part of python.
If a beginner doesn't learn those things from the start they'll only
handicap themselves more later on. And the same goes with Clojure, it's
important to learn those parentheses from the beginning so you can lose
your fear of them earlier on.

Tamreen


On Mon, Feb 4, 2013 at 3:06 PM, Timothy Baldridge tbaldri...@gmail.comwrote:

 Parens actually don't complect, they have a very very clear meaning. They
 organize functions and arguments. Let's take one line from your example:

 filter smaller xs

 Sois that the python equivalent to which of these?

 filter(smaller(xs))
 filter(smaller, xs)
 filter(smaller(), xs())
 filter(smaller(xs()))

 I would also assert that Python complects formatting and semantic meaning
 of the code. I'm quite proficient at Python and even I hate that fact.

 Timothy



 On Mon, Feb 4, 2013 at 1:01 PM, Sergey Didenko 
 sergey.dide...@gmail.comwrote:

 Hi,

 For us as Clojure community it is easy to see how Clojure benefits
 from being a Lisp. Homoiconity, extreme conciseness, esoteric look and
 feel, etc.

 However it is hard to see from the inside how Clojure as ecosystem
 (probably) suffer from being a Lisp. Please don't throw rotten eggs at
 me, I mean only the part of Lisp that is ... parentheses.

 I remember a number of people that mention parentheses as obstacles to
 the wider Clojure adoption, in the Clojure space - in the Clojure
 related discussions, even on this mailing list IIRC.

 But the number of people thinking this way outside the Clojure groups
 is even bigger! We probably don't notice it because got immune to this
 famous argument it has too many parentheses early when diving into
 Clojure.

 I suggest there are a big number of people that could gain interest in
 clojure if we provide them with parentheses-lite Clojure syntax. For
 example we can steal Python way of intending blocks.

 For example the following quicksort implementation

 (defn qsort [[pivot  xs]]
   (when pivot
 (let [smaller #( % pivot)]
   (lazy-cat (qsort (filter smaller xs))
 [pivot]
 (qsort (remove smaller xs))

 could be written as

 (set! python-style-op-op true)

 defn qsort [[pivot  xs]]
   when pivot
 let [smaller #( % pivot)]
   lazy-cat
 qsort
   filter smaller xs
 [pivot]
 qsort
   remove smaller xs

 What do you think?

 Isn't is less complex?


 P.S. Ok, I must confess, the mention of the C-Word in the last
 sentence was just a desperate way to get Rich's attention.

 P.P.S. Actually I would also love to see Clojure community making
 video clip Clojure - Python Style as a remix for G... Style, but
 this idea is probably way ahead of its time.


 Regards, Sergey.

 --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.





 --
 “One of the main causes of the fall of the Roman Empire was that–lacking
 zero–they had no way to indicate successful termination of their C
 programs.”
 (Robert Firth)

 --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving 

Re: Clojure - Python Style suggestion

2013-02-04 Thread Tamreen Khan
Again, I don't think it will help attract new users, at least not the way
we want. Parentheses are an important part of the language and it's not
something a beginner can just pick up later. If they're scared of
parentheses now, they'll be scared when they try to jump from this
paren-lite syntax to full Clojure. And it's for the same reasons that
Python doesn't have a 'simpler' version without significant whitespace.


On Mon, Feb 4, 2013 at 3:30 PM, Sergey Didenko sergey.dide...@gmail.comwrote:

 My point is to introduce a second-class syntax to attract orthodox
 users. Definitely not migrating.

 The rules of transformation can be so simple that any useful library
 written by Clojure Python style adopters could be translated to the
 canonical style automatically with a few line program.

  I can't see the community migrating to such a syntax, even if somebody

 --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Is there any reason to make different file extension (clj and cljs) for Clojure and ClojureScript?

2012-10-19 Thread Tamreen Khan
While Clojurescript aims to be close to Clojure, they're still
different languages, with entirely different compilers. Much of the
Clojure toolchain uses the extension to figure out how to compile a
given file. Otherwise, as far as I know there's no reasonable way to
tell apart Clojure code from Clojurescript code.

On Fri, Oct 19, 2012 at 9:24 AM, Mamun mamuni...@gmail.com wrote:
 Hi All,

 I've just started to learn Clojure and interested to see more ClojureScript.
 It is really nice stuff- data structure, function and code sharing. But Is
 there any reason to make different file extension (*.clj and *.cljs) for
 Clojure and ClojureScript?

 Regards,
 Mamun

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: *foo*

2012-10-09 Thread Tamreen Khan
Asterisks are valid characters for names, just like alphanumeric
characters, dashes, question marks, etc.

According to Practical Clojure
(http://books.google.com/books?id=4QacPa1vwMUCpg=PA24lpg=PA24dq=clojure+star+charactersource=blots=2yDJkpf6nisig=2bV8rr5qpn-ev5Y50MW9XpE5fKAhl=ensa=Xei=w2V0UM3cFq6H0QGx6YHwBgved=0CEsQ6AEwBQ#v=onepageq=clojure%20star%20characterf=false):

   If a symbol is a constant or a global program setting, it often
begins and ends with the star character (*).

On Tue, Oct 9, 2012 at 1:55 PM, Grant Rettke gret...@acm.org wrote:
 On Tue, Oct 9, 2012 at 12:54 PM, Brian Craft craft.br...@gmail.com wrote:
 I know I saw an explanation of this on some obscure page, but I can't find
 it now. What's up with the symbols with stars at front  end?

 http://mumble.net/~campbell/scheme/style.txt

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: strange pattern to implement comp, juxt and partial

2012-10-02 Thread Tamreen Khan
My guess is that it's useful in the core functions which are more
heavily used. Otherwise you're getting into premature optimization if
you use it in any of your own functions without profiling it first.

On Tue, Oct 2, 2012 at 4:18 PM, Balint Erdi balint.e...@gmail.com wrote:
 Makes sense but why don't we have it in all possible places then?

 Thank you.


 On Tuesday, October 2, 2012 9:55:42 PM UTC+2, Herwig Hochleitner wrote:

 That is because dispatch on argument count is fast, while apply is slow.
 Especially so since it might have to create an intermediate seq.
 It's a performance optimization.

 kind regards

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: how do we go about promoting new clojure libraries?

2012-09-26 Thread Tamreen Khan
I think the consensus is that an electronic way to send the CA is just
the right amount of effort required. You stil have to take the time to
fill out a legally binding agreement but it also doesn't rule out
those for whom snail mail is just too unpractical because they live
outside the US or Europe, for example

On Wed, Sep 26, 2012 at 3:49 PM, Aaron Cohen aa...@assonance.org wrote:
 On Wed, Sep 26, 2012 at 3:40 PM, Michael Klishin
 michael.s.klis...@gmail.com wrote:
 2012/9/26 Stuart Sierra the.stuart.sie...@gmail.com

 http://dev.clojure.org/display/community/Libraries is unorganized and out
 of date - volunteers welcome.


 Stuart,

 No, that's not how it works. You *first* make contribution process easy,
 *then* ask people to volunteer.

 Not the other way around, no.
 --

 No, only if you want an unfiltered stream of absolutely anyone to
 contribute is that true. If you're ok with restricting volunteers to
 the subset who are actually willing show a little effort, making the
 process slightly cumbersome might even be a net benefit.

 --Aaron

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Tamreen Khan
First, IPersistentSeq is the interface, PersistentSeq is the actual class.

If you look at it a little more closely, PersistentList extends ASeq, which
is an abstract class. ASeq implements the ISeq interface. So PersistentList
does implement ISeq through its parent class.

https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentList.java#L16
-
PersistentList extending ASeq
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ASeq.java#L16
-
ASeq implementing ISeq


On Fri, Aug 31, 2012 at 12:58 PM, Andrei Zhlobich a.zhlob...@gmail.comwrote:

 Why IPersistentList doesn't extend ISeq?

 Clojure docs say:
   Lists are collections. They implement the ISeq interface directly
 (except for the empty list, which is not a valid seq)

 At this moment EmptyList implements ISeq, but PersistentList doesn't. It
 seems very strange for me.
 Also PersistentQueue implements IPersistentList, but semantically it is
 not a list.

 I think we can do 2 changes in hierarchy:
 1) extend IPersistentList from ISeq;
 2) extend PersistentQueue directly from IPersistentStack instead of
 IPersistentList.

 Is it possible?

  --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Why IPersistentList doesn't extend ISeq?

2012-09-02 Thread Tamreen Khan
Sorry, I meant IPersistentList and PersistentList in the first sentence of
my previous email.

On Sun, Sep 2, 2012 at 11:00 PM, Tamreen Khan histor...@gmail.com wrote:

 First, IPersistentSeq is the interface, PersistentSeq is the actual class.

 If you look at it a little more closely, PersistentList extends ASeq,
 which is an abstract class. ASeq implements the ISeq interface. So
 PersistentList does implement ISeq through its parent class.


 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentList.java#L16
  -
 PersistentList extending ASeq

 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ASeq.java#L16
  -
 ASeq implementing ISeq


 On Fri, Aug 31, 2012 at 12:58 PM, Andrei Zhlobich a.zhlob...@gmail.comwrote:

 Why IPersistentList doesn't extend ISeq?

 Clojure docs say:
   Lists are collections. They implement the ISeq interface directly
 (except for the empty list, which is not a valid seq)

 At this moment EmptyList implements ISeq, but PersistentList doesn't. It
 seems very strange for me.
 Also PersistentQueue implements IPersistentList, but semantically it is
 not a list.

 I think we can do 2 changes in hierarchy:
 1) extend IPersistentList from ISeq;
 2) extend PersistentQueue directly from IPersistentStack instead of
 IPersistentList.

 Is it possible?

  --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en




-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Practice?

2012-09-01 Thread Tamreen Khan
http://www.4clojure.com/

Pretty much exactly what you need. It has a series of problems from very
easy to more advanced ones that cover a wide range of what programming in
clojure involves, and you can type in and run the code right on the site.

On Sat, Sep 1, 2012 at 4:56 PM, JvJ kfjwhee...@gmail.com wrote:

 I've been interested in Clojure for some time, but I haven't really needed
 to code much recently (in any language).  Does anyone have any ideas on
 good ways to practice Clojure (like websites with practice problems or
 whatever)?

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: anonymous functions with names

2012-08-31 Thread Tamreen Khan
The name given an anonymous function can only be used within the scope of
that function.

This will work:

(fn my-func1 [x] (my-func x)) ; Leads to infinite recursion, of course

This won't work because my-func1 is called outside of the function's
lexical scope:

(fn my-func1 [x] x)
(my-func1 100)

However, functions defined with defn use a global var, so they're not
limited to any particular lexical scope.

On Fri, Aug 31, 2012 at 11:52 AM, Erlis Vidal er...@erlisvidal.com wrote:

 Hi guys,

 I've been reading but I'm still confused about the difference between an
 anonymous function with name vs a defn function

 (fn my-func1[x] x)

 (defn my-func2[x] x)

 Thanks,
 Erlis

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Pattern of Succinctness

2012-08-12 Thread Tamreen Khan
Is the last one considered generally more readable? I think the following
is clearer while still not having as much noise as the first filter example:

(filter (partial not nil?) coll)

On Sun, Aug 12, 2012 at 1:35 PM, Takahiro Hozumi fat...@googlemail.comwrote:

 Hi,
 I would like to know common technics that make code succinct.

 For example:
 (or (:b {:a 1}) 0)
 (:b {:a 1} 0)

 (if-not x 1 2)
 (if x 2 1)

 (filter #(not (nil? %)) coll)
 (filter identity coll) ;; nearly equal

 Please let me know any tips you found.

 Cheers,
 Takahiro.

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Why Clojure map literal creates an instance of array map?

2012-08-10 Thread Tamreen Khan
It's not dependent on whether it's a literal but on the size of the map, 8
key-value pairs is the threshold.

This results in a PersistentHashMap
(class {1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9})  =
clojure.lang.PersistentHashMap

This gets you a PersistentArrayMap
(class {1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8})  = clojure.lang.PersistentHashMap

You can see where this happens in the source here:
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentArrayMap.java#L115

HASHTABLE_THRESHOLD is a constant set to 16, 8 keys and 8 values. So when
you assoc onto an arraymap with 8 key-value pairs it returns a hashmap.

The reason for this, as far as I understand it, is that with small hashmaps
it's more efficient to do simple copy-on-write. In other words when you
assoc onto it, it copies the entire map, adds the new key-value pair to the
copy, and then returns the copy. With larger hashmaps, it becomes more
useful to do use a more complicated tree structure which uses structural
sharing so that assoc doesn't copy the entire map. Copying a small 5
element map isn't a big deal, but copying one with several thousand
elements is.

On Fri, Aug 10, 2012 at 5:43 PM, Hussein B. hubaghd...@gmail.com wrote:

 Hi,
 Why Clojure map literal creates an instance of array map but not hash map?
 What are the advantages of array map over hash map?
 Thanks.

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: CSV Parser

2012-07-26 Thread Tamreen Khan
The usual filename extension for Clojure files is .clj. Renaming it to that
will also get you syntax highlighting on the gist.

On Thu, Jul 26, 2012 at 4:10 PM, Christian Sperandio 
christian.speran...@gmail.com wrote:

 Below the link :) https://gist.github.com/3184210
 Thanks


 2012/7/26 Jeremy Heiler jeremyhei...@gmail.com:
  On Wed, Jul 25, 2012 at 7:31 PM, Christian Sperandio
  christian.speran...@gmail.com wrote:
  hi,
 
  I started learning Clojure programming these last days. For my
 training, I
  developped a CSV parser.
  I propose to everyone and I'd like to hava advice about my development
 (is
  it in the FP logic? Do I use the good practices ?)
 
  My attachment contains the source file and a test file. I simulate a
 file
  content by using vector. I used the Clojure 1.3 for my dev.
 
  You would probably be better off if you put your project on GitHub (or
  as a Gist) so we can view it online.
 
 
  Thanks for your advice :)
 
  Chris
 
  --
  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 group, send email to
  clojure+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

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 beginning to the end, which is exactly what the last
function does.

On Thu, Jun 28, 2012 at 7:36 PM, David Nolen dnolen.li...@gmail.com wrote:

 On Thu, Jun 28, 2012 at 7:32 PM, Warren Lynn wrn.l...@gmail.com 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

 As of Clojure 1.4, seems nothing changed, as source show here:

 user (source last)
 (def
  ^{:arglists '([coll])
:doc Return the last item in coll, in linear time
:added 1.0
:static true}
  last (fn ^:static last [s]
 (if (next s)
   (recur (next s))
   (first s

 Any reason for that? Thanks.


 Don't hold your breath. Assume that the language was designed after much
 consideration. last is a sequence operation, not a collection operation. If
 the distinction doesn't make sense, I suggest you explore the design
 decision by writing some non-trivial Clojure code so you can arrive at your
 own satisfying answer why this was done. Otherwise you'll just listen to
 people repeat the same answer without hearing what is being said.

 David

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: what is js/ in clojurescript?

2012-05-02 Thread Tamreen Khan
A quick explanation is that functions/other javascript objects that
otherwise exist in the global namespace (ie. document, console, window) are
accessed through the js/ in Clojurescript. This is a JS-specific thing and
therefore you don't find js/ in regular Clojure.

However, doing the form (MyClass/MyStaticMethod arg1 arg2 ...) *does* exist
in Clojure. It's a way of calling static Java methods or accessing static
fields. See  http://clojure.org/java_interop for more info.

On Thu, May 3, 2012 at 12:12 AM, Rob rob.nikan...@gmail.com wrote:

 Hi,

 Syntax like this doesn't work in normal Clojure, right?

 js/document.body.style

 It just did in a ClojureScript repl.  Is there something magic about js/
 ?  What is it?

 thanks,
 Rob

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Light Table - a new IDE concept

2012-04-13 Thread Tamreen Khan
Nope, the source hasn't been released yet. I think Chris is still trying to
figure out what to do with it.

2012/4/13 D.Bushenko d.bushe...@gmail.com

 This is really interesting. Is there a sourcecode for the light table ? I
 couldn't find it...

 пятница, 13 апреля 2012 г., 21:34:54 UTC+3 пользователь looselytyped
 написал:

 This is an awesome implementation of Brett Victors Inventing On
 Principle [http://vimeo.com/36579366] using Clojure and Noir by Chris
 Granger (who also wrote Noir).

 Figured I would share it with the group.

 http://www.chris-granger.com/**2012/04/12/light-table---a-**
 new-ide-concept/http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/

 Raju


 пятница, 13 апреля 2012 г., 21:34:54 UTC+3 пользователь looselytyped
 написал:

 This is an awesome implementation of Brett Victors Inventing On
 Principle [http://vimeo.com/36579366] using Clojure and Noir by Chris
 Granger (who also wrote Noir).

 Figured I would share it with the group.

 http://www.chris-granger.com/**2012/04/12/light-table---a-**
 new-ide-concept/http://www.chris-granger.com/2012/04/12/light-table---a-new-ide-concept/

 Raju

  --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Where to post job ad

2012-03-30 Thread Tamreen Khan
Yep, just make sure to mention that it's an offer and the location in the
subject to make it easy to spot.

On Fri, Mar 30, 2012 at 11:39 AM, David Powell djpow...@djpowell.netwrote:



 On Fri, Mar 30, 2012 at 1:35 PM, David Jagoe davidja...@gmail.com wrote:

 G'day everyone

 I am increasingly relying on clojure and plan to use clojureclr and
 clojurescript in production too. I will soon need to hire a clojure
 developer and was hoping that someone could suggest a good place to post a
 job ad. I've never seen a job posted here but I would like to reach the
 community.


 They've been posted here before.  I'm sure nobody will mind.

 --
 Dave

  --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Alternative download site for Clojure 1.3?

2012-03-30 Thread Tamreen Khan
And like Sean mentioned, using Leiningen *really* helps. Especially when
you have Emacs with clojure set up as well.

On Fri, Mar 30, 2012 at 8:17 AM, Murphy McMahon pande...@gmail.com wrote:

 Learning Clojure is the fun part. Setup and maintenance of the tools is a
 little less fun, IMO. But where there's a will (and a connection to
 freenode), there's a way.
  On Mar 30, 2012 9:09 AM, Chris Webster cmhwebs...@gmail.com wrote:

 Thanks for the advice, guys.

 I think it must just have been some temporary problem on the site, as I
 finally got it to download late last night.  Now all I have to do is learn
 Clojure, eh?


  --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

  --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: - and -

2012-02-08 Thread Tamreen Khan
- - http://clojuredocs.org/clojure_core/clojure.core/-%3E
- http://clojuredocs.org/clojure_core/clojure.core/-%3E%3E

On Wed, Feb 8, 2012 at 11:16 AM, Simon Holgate simon.holg...@gmail.com wrote:
 Could anyone point me to a description of - and -, please?

 I've seen a few references to them (e.g. git://gist.github.com/1761143.git)
 but nothing in Programming Clojure. Google doesn't seem to like
 searching for such strings.

 Thanks.

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Opposite function to cons, but in terms of construction, not destruction.

2011-12-10 Thread Tamreen Khan
Conj (http://clojuredocs.org/clojure_core/clojure.core/conj) does what
you need for vectors. It's behavior depends on the type of collection
passed, so if you did:

(conj '(1 2 3) 4) you would end up with '(4 1 2 3).

For vectors it appends to the end of the list, for lists the beginning.

On Sat, Dec 10, 2011 at 6:13 AM, Michael Jaaka
michael.ja...@googlemail.com wrote:
 Is there something like:

 (defn snoc[ col item ]
        (lazy-seq
                (if (seq col)
                        (let[ [f   r] col ]
                                (if (seq r)
                                        (cons f (snoc r item))
                                        (cons f [item])))
                        [item])))

 already here?


 (snoc (snoc (snoc [ 1 2 3] 4) 6) 7)

 gives:

 (1 2 3 4 5 6 7)

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: I/O

2011-08-25 Thread Tamreen Khan
For that you'll have to look into the clj-http library:
https://github.com/mmcgrana/clj-http

From the readme: (client/post http://site.com/resources; {:body string})

On Thu, Aug 25, 2011 at 2:00 PM, Terje Dahl te...@terjedahl.no wrote:

 Great question.  And great answer.
 Seriously!  I did not know it could be that easy.
 So an http GET just needs 1 lines!:

(slurp (reader http://google.com;))

 (Don't forget: (use 'clojure.java.io) )


 Is there an equally easy way to do an http POST?
 And also a multi-part (including one or more files in the POST)?



 On 25 Aug, 18:24, Mats Rauhala mats.rauh...@gmail.com wrote:
  I too stumbled upon this a while ago. I might even say that on some
  level it's so simple that there is not much documentation about it, and
  at some point it gets 'complex' enough that you should know about java
  enough.
 
  The simplest way is to slurp or spit. slurp reads a file into a string,
  and spit writes a string into a file.
 
  Then there is the with-open macro(?) which opens connections and closes
  them when one. The reader and writer opens a java Reader and Writer
  classes respectively. (They're interfaces, but those functions try to
  figure out what kind of handle you're trying to open). Also the
  output-stream and input-stream handle it a bit.
 
  (with-open [r (reader http://www.reddit.com;)]
   (.read r))
 
  And to finish this off with a shameless plug; I wrote a blog post about
  downloading a random wallpaper from reddit, which handles reading http
  content, parsing json and reading/writing binary files.
 
  http://users.utu.fi/machra/posts/2011-08-24-2-reddit-clojure.html
 
  --
  Mats Rauhala
  MasseR
 
   application_pgp-signature_part
   1 KVisLast ned

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ClojureScript Memory Requirements

2011-07-26 Thread Tamreen Khan
I've removed the first two flags since I work on a 32 bit machine and
haven't run into any problems either. I'm guessing the the extra memory
simply helps with compilation times.

On Tue, Jul 26, 2011 at 9:49 AM, Timothy Baldridge tbaldri...@gmail.comwrote:

 So I've hit an issue with the ClojureScript compiler memory
 requirements several times now. The command line arguments in use for
 both the compiler and the repl are thus:

 -Xmx2G -Xms2G -Xmn256m

 So basically this requires 2GB of memory right off the bat to even run
 the compiler. Now I'm not interested in a discussion of the memory
 usage of Clojure, we all know it's a bit more memory intensive than C
 or plain Java, and that's not my point. My question is, is this 2GB
 really needed? On Windows boxes, and perhaps some Linux Machines, this
 is not 2GB of virtual memory, but actually 2GB of read RAM. So my main
 workstation, which has 4GB of ram will fail to run this compiler if I
 have too many programs open. So I thought I'd try this in a VMbut
 my VM needs to have at least 2GB of RAM?

 As a test, I removed these options from the command line scripts and a
 simple hello world compiled fine...so I'm not sure what the issue
 is.

 Any thoughts on all this?

 Thanks,

 Timothy

 --
 “One of the main causes of the fall of the Roman Empire was
 that–lacking zero–they had no way to indicate successful termination
 of their C programs.”
 (Robert Firth)

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ClojureScript on Windows

2011-07-25 Thread Tamreen Khan
I've gotten the basics working. Haven't had the time to write up a full blog
post, though. Basically I used Cygwin so that I could run the bootstrap
script. In any of the shell scripts where it sets a classpath you'll have to
change the colons to semicolons.

On Mon, Jul 25, 2011 at 10:59 AM, Timothy Baldridge tbaldri...@gmail.comwrote:

 Is there a documented way to get ClojureScript working on Windows?
 While I'm familiar with Linux, and use it in several server
 environments, all my development is on Windows, so I don't really have
 access to a Linux box for development.

 Timothy

 --
 “One of the main causes of the fall of the Roman Empire was
 that–lacking zero–they had no way to indicate successful termination
 of their C programs.”
 (Robert Firth)

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Hi everyone, I'm trying to get the repl for Clojurescript to start under
Windows but keep running into the following error:

Exception in thread main java.lang.NoClassDefFoundError: clojure/main
Caused by: java.lang.ClassNotFoundException: clojure.main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: clojure.main.  Program will exit.

I've tried both running the script under cygwin and putting the contents
into a batch file and running it with cmd.exe (it shouldn't be a problem
since script/repl just contains one command which starts the java runtime
with a few options). I've even tried changing the forward slashes in the
command to backslashes.

Also, I'm running these commands from the clojurescript root directory. Even
though it probably won't affect it I've set CLOJURESCRIPT_HOME as well. Any
ideas?

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Yes. It worked fine.

On Thu, Jul 21, 2011 at 5:48 PM, Devin Walters dev...@gmail.com wrote:

  Did you run script/bootstrap?

 You need a clojure-1.3 jar in your clojurescript/lib directory.

 On Thursday, July 21, 2011 at 4:45 PM, Tamreen Khan wrote:
  Hi everyone, I'm trying to get the repl for Clojurescript to start under
 Windows but keep running into the following error:
 
  Exception in thread main java.lang.NoClassDefFoundError: clojure/main
  Caused by: java.lang.ClassNotFoundException: clojure.main
   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  Could not find the main class: clojure.main. Program will exit.
 
 
  I've tried both running the script under cygwin and putting the contents
 into a batch file and running it with cmd.exe (it shouldn't be a problem
 since script/repl just contains one command which starts the java runtime
 with a few options). I've even tried changing the forward slashes in the
 command to backslashes.
 
  Also, I'm running these commands from the clojurescript root directory.
 Even though it probably won't affect it I've set CLOJURESCRIPT_HOME as well.
 Any ideas?
 
   --
   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 (mailto:
 clojure@googlegroups.com)
   Note that posts from new members are moderated - please be patient with
 your first post.
   To unsubscribe from this group, send email to
  clojure+unsubscr...@googlegroups.com (mailto:
 clojure+unsubscr...@googlegroups.com)
   For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en


 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Hmm, I have clojure.jar, but not clojure-1.3.jar in clojurescript/lib

On Thu, Jul 21, 2011 at 5:49 PM, Tamreen Khan histor...@gmail.com wrote:

 Yes. It worked fine.


 On Thu, Jul 21, 2011 at 5:48 PM, Devin Walters dev...@gmail.com wrote:

  Did you run script/bootstrap?

 You need a clojure-1.3 jar in your clojurescript/lib directory.

 On Thursday, July 21, 2011 at 4:45 PM, Tamreen Khan wrote:
  Hi everyone, I'm trying to get the repl for Clojurescript to start under
 Windows but keep running into the following error:
 
  Exception in thread main java.lang.NoClassDefFoundError: clojure/main
  Caused by: java.lang.ClassNotFoundException: clojure.main
   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  Could not find the main class: clojure.main. Program will exit.
 
 
  I've tried both running the script under cygwin and putting the contents
 into a batch file and running it with cmd.exe (it shouldn't be a problem
 since script/repl just contains one command which starts the java runtime
 with a few options). I've even tried changing the forward slashes in the
 command to backslashes.
 
  Also, I'm running these commands from the clojurescript root directory.
 Even though it probably won't affect it I've set CLOJURESCRIPT_HOME as well.
 Any ideas?
 
   --
   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 (mailto:
 clojure@googlegroups.com)
   Note that posts from new members are moderated - please be patient with
 your first post.
   To unsubscribe from this group, send email to
  clojure+unsubscr...@googlegroups.com (mailto:
 clojure+unsubscr...@googlegroups.com)
   For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en


 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en




-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Changing colons to semicolons did it! I guess since the classpath is a
string that's passed to Java it still treats it like it would any path on
Windows, even though I'm using it through Cygwin.

Thanks again!

On Thu, Jul 21, 2011 at 6:49 PM, Brenton bashw...@gmail.com wrote:

 That clojure.jar file is clojure 1.3.

 Something is wrong with the classpath.

 Here are a couple of things to try:

 - when using a batch file the classpath must be delimited with
 semicolons instead of colons
 - try replacing lib/* with an explicit list everything that is in lib
 - something like lib/clojure.jar;lib/goog.jar;lib/compiler.jar

 Just some thoughts

 On Jul 21, 5:50 pm, Tamreen Khan histor...@gmail.com wrote:
  Hmm, I have clojure.jar, but not clojure-1.3.jar in clojurescript/lib
 
 
 
 
 
 
 
  On Thu, Jul 21, 2011 at 5:49 PM, Tamreen Khan histor...@gmail.com
 wrote:
   Yes. It worked fine.
 
   On Thu, Jul 21, 2011 at 5:48 PM, Devin Walters dev...@gmail.com
 wrote:
 
Did you run script/bootstrap?
 
   You need a clojure-1.3 jar in your clojurescript/lib directory.
 
   On Thursday, July 21, 2011 at 4:45 PM, Tamreen Khan wrote:
Hi everyone, I'm trying to get the repl for Clojurescript to start
 under
   Windows but keep running into the following error:
 
Exception in thread main java.lang.NoClassDefFoundError:
 clojure/main
Caused by: java.lang.ClassNotFoundException: clojure.main
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: clojure.main. Program will exit.
 
I've tried both running the script under cygwin and putting the
 contents
   into a batch file and running it with cmd.exe (it shouldn't be a
 problem
   since script/repl just contains one command which starts the java
 runtime
   with a few options). I've even tried changing the forward slashes in
 the
   command to backslashes.
 
Also, I'm running these commands from the clojurescript root
 directory.
   Even though it probably won't affect it I've set CLOJURESCRIPT_HOME as
 well.
   Any ideas?
 
 --
 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(mailto:
   clojure@googlegroups.com)
 Note that posts from new members are moderated - please be patient
 with
   your first post.
 To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com (mailto:
   clojure+unsubscr...@googlegroups.com)
 For more options, visit this group at
   http://groups.google.com/group/clojure?hl=en
 
   --
   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 group, send email to
   clojure+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: principle of least surprise

2011-07-20 Thread Tamreen Khan
It's because functions such as reduce, map, reverse, etc. only work on
sequences, so they have to call seq on that argument. Strings just
happen to be seq-able but calling seq on one returns a list of
characters, so the result is one too. Reverse always returns a
sequence and strings aren't technically sequences, so that's why it
doesn't convert the characters back into a string.

On Wednesday, July 20, 2011, Basi Lambanog restyc...@gmail.com wrote:
 Hello,
 Any reason for the change in type after some operations, for example:

 user=
 (type (reverse abc))
 clojure.lang.PersistentList

 user=
 (type abc)
 java.lang.String

 Since reverse operates on a string, shouldn't the result be a string
 as well? There's a few more of these type re-casting after an
 operation.

 Tuba

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clooj, a lightweight IDE for clojure

2011-07-18 Thread Tamreen Khan
It's a little confusing to see what's normally the text for the prompt,
user=, be in the window that shows the result. Why can't both the prompt
and the results be shown in the same area?

On Mon, Jul 18, 2011 at 8:32 AM, Adam Burry abu...@gmail.com wrote:

  - I just created a new project and I get a user prompt in the REPL pane
 but I can't type anything into that... so I can't actually try it... I click
 in there but I don't get a cursor there, and typing does nothing. In case it
 matters I'm running Mac OS 10.6.8 and java -version says:

 Re-read the OP. The right hand column has two parts: the top part
 shows REPL evaluation, the bottom part is your REPL input window.

 Adam

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Repeating a vector n times

2011-07-13 Thread Tamreen Khan
Damn, Meikel's solution is better, I was thinking:

(apply concat (repeat n xs))

On Wed, Jul 13, 2011 at 10:54 AM, Bhinderwala, Shoeb 
sabhinderw...@wellington.com wrote:

 **

 I have to write a function that will take a vector as input, repeat the
 elements multiple times and return back a single vector of the repeated
 items. I came up with the following but am wondering if there is a better
 or simpler way to write this:

 (def xs [a b c])

 (defn repeat-vec-n

   [xs n]

   (vec

 (reduce concat []

   (take n (repeat xs)

 OUTPUT:

 user= xs

 [a b c]

 user= (repeat-vec-n xs 3)

 [a b c a b c a b c]

 ***-- Shoeb*

  --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: monads macros

2011-07-12 Thread Tamreen Khan
Are monads all that special? My understanding is that even in Haskell
its wise to not use monads all that much, since it starts to make the
code look a little too imperative if not wielded correctly. They're
not really the meat of haskell/fp. Macros on the other hand are an
important part of lisp, although their overuse is also discouraged :)

On Tuesday, July 12, 2011, James Keats james.w.ke...@gmail.com wrote:

 I'm mildly concerned about macros being seen as the secret weapon of
 clojure(/lisp).

 In their place, i wish monads would get a wider attention and embrace.

 Discuss? :-)

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Results from 2011 State of Clojure survey

2011-07-12 Thread Tamreen Khan
What does something being shiny and new have to do with how good its
libraries, community, platforms, and support are? Heck, I'd say something
being new would detract from it library-wise. Sergey's point was that when
someone begins a new project they have the options of all those languages;
Clojure isn't just competing with new and shiny things.

On Tue, Jul 12, 2011 at 6:23 PM, Ken Wesson kwess...@gmail.com wrote:

 On Tue, Jul 12, 2011 at 8:55 AM, Sergey Didenko
 sergey.dide...@gmail.com wrote:
  You know that from inside. A Clojure outsider can have a completely
 other
  point of view.
 
  He can choose between Python

 Not new

  server side Javascript

 Not new

  new C#

 Despite what you just said, not new

  Go

 Haven't heard of it, so probably not shiny enough

  Scala, F#

 Mentioned those

  Haskell

 Not new

  Erlang

 Not new

  haXe

 Haven't heard of it, so probably not shiny enough

  Clojure.

 So far, looks like the shiny and new category is Clojure, Scala, F#,
 and maybe one or both of the Go and haXe you mentioned. The rest
 definitely aren't particularly new.

  Besides the languages itself, the outsider wants to evaluate libraries,
  community, platforms, support, etc.

 That puts Clojure and Scala ahead of F# and the three of them ahead of
 nearly everything else.

 --
 Protege: What is this seething mass of parentheses?!
 Master: Your father's Lisp REPL. This is the language of a true
 hacker. Not as clumsy or random as C++; a language for a more
 civilized age.

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Koans and others interactive exercises to learn clojure?

2011-07-03 Thread Tamreen Khan
http://4clojure.com/ comes to mind, it has the same koan-style but what
looks like a lot more problems and you can run the code on the site itself.

On Sun, Jul 3, 2011 at 11:52 PM, Antonio Recio amdx6...@gmail.com wrote:

 Clojure koans https://github.com/functional-koans/clojure-koans is
 awesome to learn clojure. Do you know other projects with exercises to learn
 clojure?

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Cons vs List vs. ISeqs

2011-06-24 Thread Tamreen Khan
This stackoverflow page seems to have some info that might help:
http://stackoverflow.com/questions/3008411/clojure-seq-cons-vs-list-conj

Source for Cons:
https://github.com/hiredman/clojure/blob/master/src/jvm/clojure/lang/Cons.java
Source for PersistentList:
https://github.com/hiredman/clojure/blob/master/src/jvm/clojure/lang/PersistentList.java

From looking at the source it looks like one major difference between Cons
and PersistentList is that Cons can have anything that implements ISeq for
_rest while PersistentList must have another PersistentList.

On Fri, Jun 24, 2011 at 7:35 PM, Tim Robinson tim.blacks...@gmail.comwrote:

 I'm under the impression that traditional lisps have a greater
 distinction between a cons operation vs. a list operation.
 Specifically I had believed that consing was a more efficient and
 better performing operation than using list.

 Is this true? and if so, given both the Cons and Lists are actually
 both just seqs in Clojure, does the above statement still hold true in
 the Clojure world?

 Thanks
 Tim

 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en