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 wrote: > 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 s

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 wrote: > Hmm, I'm Googling to find a good example. > > Haskell forums...nope, rubbish. > Python forums...nope

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 wrote: > I don't see it as an experience thing. T

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 wrote: > Clojure has compojure ... which is a sinatra like web framework and > you can create a new project using"lein new

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

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 arg

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 Cl

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=4QacPa1vwMUC&pg=PA24&lpg=PA24&dq=clojure+star+character&source=bl&ots=2yDJkpf6ni&sig=2bV8rr5qpn-ev5Y50MW9XpE5fKA&hl=en&sa=X&ei=

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 wrote: > Makes sense but why don't we have it in

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 Europ

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 wrote: > First, IPersistentSeq is the interface, PersistentSeq is the actual class. > > If you look at it a little more closely, PersistentLis

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/cloju

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 wrote: > I've

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)

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 wrote: > Hi, > I would like to know common technics that make c

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

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

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: 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 (MyCla

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 > This is really interesting. Is there a sourcecode for the light table ? I > couldn't find it... > > пятница, 13 апреля 2012 г., 21:34:54 UTC+3 пользователь looselytyp

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 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

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 wrote: > > > On Fri, Mar 30, 2012 at 1:35 PM, David Jagoe wrote: > >> G'day everyone >> >> I am increasingly relying on clojure and plan to us

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 wrote: > Could anyone point me to a description of "->" and "->>", please? > > I've seen a few references to them (e.g. git://gist

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,

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 wrote: > Great question. And great answer. > Seriously! I did not know it coul

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 wrote: > So I've hit an issue with the ClojureScript compiler memor

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, Timot

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

2011-07-21 Thread Tamreen Khan
gt; - something like lib/clojure.jar;lib/goog.jar;lib/compiler.jar > > Just some thoughts > > On Jul 21, 5:50 pm, Tamreen Khan wrote: > > Hmm, I have clojure.jar, but not clojure-1.3.jar in clojurescript/lib > > > > > > > > > > > > > > > >

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 wrote: > Yes. It worked fine. > > > On Thu, Jul 21, 2011 at 5:48 PM, Devin Walters wrote: > >> Did you run script/bootstrap? >> >> Y

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 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

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(URL

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 technic

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 wrote: > > - I just created a new project and I get a user pr

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

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; Clojur

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,

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 wrote: > Clojure koans is > awesome to learn cloj

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/b