Comments anyone ?
>
>
I can get pretty far writing an application in Python with nothing more than
good command line support and syntax highlighting in any text editor.
Anything extra like completions, refactoring, etc, are just nice-to-haves. I
don't see why an IDE is required for writing
ld be friendly on all
> supported platforms.
I don't have a Windows machine so I can't easily add Windows support. I'm
assuming that what I'm doing with Bash should be possible to accomplish in
Windows, perhaps using BATCH scripts. Patches/pull requests are welcome :)
--
Cosmin Ste
ven (not to mention neither lein or
clojure-mavne-plugin were available at the time AFAIK). I still find this
the quickest way to get Clojure working on a new machine.I would appreciate
any feedback.
http://github.com/offbytwo/cljenv
--
Cosmin Stejerean
http://offbytwo.com
--
You received t
ulties in deploying Clojure
applications. At least as far as web applications go, I really like the one
WAR file deployment of Java applications. It's certainly far easier in
general than deploying Python applications for example.
--
Cosmin Stejerean
http://offbytwo.com
--
You received this
ing to 23 yet.
If you have a choice you should probably start with 23.
--
Cosmin Stejerean
http://offbytwo.com
--
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 me
for clojure-contrib I only see snapshots at
> http://build.clojure.org/snapshots/org/clojure/clojure-contrib/
>
The release jars are at
http://build.clojure.org/releases/org/clojure/clojure-contrib/
--
Cosmin Stejerean
http://offbytwo.com
--
You received this message because you ar
ake long.
>
> Should I make heartbeat commits once a week so people will know
> there's still life in the body? :)
>
I vote for checking in once in a while, perhaps on a separate
development branch.
--
Cosmin Stejerean
http://offbytwo.com
--
You received this message because yo
definitely sounds like the right solution for this type of problem.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send em
esting idea, not sure if anything but a brute force method is
> possible ?
>
Given the time constraints I don't think even a brute force solution is
feasible (for less than the $2000 prize). Looks more like a lottery, but I
guess I'll have to wait until after the contest to see if anyone c
7;ve had plenty of confusion when switching from SF with
people running old code, and now that there are 2 repos around that are no
longer maintained I suspect the confusion will only increase.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You rece
;i must be blind") (int 4))
java.lang.IllegalArgumentException: No matching method found: substring for
class java.lang.StringBuilder (NO_SOURCE_FILE:0)
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscri
t;(recur (assoc map (first ks) (first vs))
> > (next ks)
> > (next vs))
> >map)))
> > nil
>
> Yes, this (Steve's) version, using next and testing directly with (and
> ks vs) is the idiomatic way when you are not in turn
map)))
user=> (my-zipmap [:a :b :c] [1 2 3])
{:c 3, :b 2, :a 1}
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send emai
{:a [1], :b [3
> 5], :c [1]})
>
(defn mystery-fn [coll] (reduce (fn [map [k v]] (assoc map k (conj (get map
k []) v))) {} coll))
user=> (mystery-fn [[:a 1] [:b 3] [:b 5] [:c 1]])
{:c [1], :b [3 5], :a [1]}
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~--
h Winzip, and compile with ant.
By the way, there is a Download button on
http://github.com/richhickey/clojure/tree/master and
http://github.com/richhickey/clojure-contrib/tree/master that allows you to
download a snapshot in zip or tgz formats.
--
Cosmin Stejerean
http://offbytwo.com
--~--~
re was an updated post to the list from David on May 31st, although it
seems to be pretty hard to find using search on the google group. I finally
tracked a link to it down by going backwards through the archive and looking
at all the threads from May 31st.
http://grou
On Thu, May 21, 2009 at 3:35 AM, Michael Wood wrote:
>
> On Thu, May 21, 2009 at 9:15 AM, Christophe Grand
> wrote:
> >
> > Cosmin Stejerean a écrit :
> >> On Wed, May 20, 2009 at 7:04 PM, George Jahad
> >> mailto:andr...@blackbirdsystems.net>>
&
; "/"
>
> to this:
>
> (def s1 (Symbol/create (.intern (first (.split "user/n1" "/")
>
> will fix your problem.
>
That makes a lot of sense and I guess I should have paid attention to the
fun
/")) "user")
true
user=> (class (first (.split "user/n1" "/")))
java.lang.String
user=> (ns-publics s1)
java.lang.Exception: No namespace: user found (NO_SOURCE_FILE:0)
user=> (ns-publics s2)
{s2 #'user/s2, s1 #'user/s1}
--
Cosmin Stejerean
ht
On Tue, May 19, 2009 at 12:58 PM, Michel S. wrote:
>
> On May 19, 12:45 pm, Cosmin Stejerean wrote:
> > The second Chicago Clojure meetup will focus on a in-depth introduction
> to
> > Clojure concepts and syntax, presented by Frederick Polgardy. You
> definitely
>
ions for food and drinks during the
meeting.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googl
aintaining that, it's what I always use to check out Clojure.
I'm curious, how frequently is that updated from SVN? (Meaning, what is the
longest amount of time a commit can exist in SVN but not in your mirror?)
I've never had a problem, but I'd like to know for future refe
;
This kind of functionality reminds me of the "os" module in Python. I
propose a similarly sounding namespace under contrib.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
e) will have to produce patches of (only!)
> fixes from the trunk for the release branch, and occasionally produce
> point releases (1.0.x) from that branch.
This is actually something that I am interested in doing (porting fixes from
trunk to 1.0) so I would love to help with that process
unning with minimal fuss.
That still leaves open the question of how to decide which third party
libraries are OK to include as a dependency. That seems to require a more
formal process similar to the PEP's in Python. Maybe it's too early for
someth
t; operations that would really, really be
> useful. Especially if it responded automatically such that when you
> dropped new jars you could kill slime and restart and you would be
> good (although emacs insta-starts on my mac so it isn't a big deal).
>
None of that is hard to do
On Thu, Apr 9, 2009 at 2:00 PM, Rich Hickey wrote:
>
> Got a Clojure user group, meetup etc?
>
> Reply to this message and let me know, I'll add them to the Clojure
> site.
>
Chicago
http://onclojure.com/chicago/
--
Cosmin Stejer
to remember though you can
quickly try out an example at the REPL. I do that all the time in Python
when I want to verify that what I remember is in fact correct.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because y
-all, because it
takes an argument for how many bytes to read. This argument just happens to
be optional, in which case it will read everything. This is particularly
useful when reading data from a binary file where you have to read the data
in chunks (and you obviously can'
If you're in or around Chicago I'd like to invite you to come out for
the first meeting of the Chicago Clojure User Group on April 15th.
Full details are at http://onclojure.com/chicago/
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
Yo
on retries that
> occurred in a particular run of an application. If such a tool isn't
> needed or wouldn't be useful, I'd like to understand why.
>
I can imagine how in certain situations a profile mode where Clojure keeps
t
us. That doesn't mean Java's approach is bad, after all the internals
of Clojure are implemented using Java locks. But explicit management of
locks is often too low level and unnecessarily complex, and Clojure provides
a higher level way of dealing with concurrency that makes it eas
est for the 'defn'
macro
If it worked correctly then the following expression should be true
(= (macroexpand-1 '(defn foo [x y] (+ x y)))
'(def foo (clojure.core/fn ([x y] (+ x y)
and it is, because (defn foo [x y] (+ x y)) does in fact expand out to (def
foo
clojure and slime from
> their respective version control systems.
>
As a workaround you can try adding ~/.clojure to the classpath, Clojure will
automatically load user.clj if found on the classpath.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You
ing the above techniques that makes it easy
(I think) to separate code and data in Python by composing instances that
provide data with classes that provide behavior at runtime.
http://gist.github.com/77848
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~
On Wed, Mar 11, 2009 at 1:03 PM, Jon Harrop wrote:
>
> On Wednesday 11 March 2009 15:30:01 Cosmin Stejerean wrote:
> > Actually it happens a lot in real code and in many non-trivial programs
> in
> > static typed languages you end up with a proliferation of types that ar
__getattr__ or __getattribute___). I've used these
techniques in places where I need to treat an object like a dictionary for
interop, or places where I wanted to use a dictionary but with the nicer
syntax for attribute access on objects ( a.foo instead of a['foo'] saves 3
keystrokes
to write a new language I would make it dynamically typed because that
is my preference, not because it is easier. I can imagine that there is some
subset of language designers that really would prefer to use a statically
typed language but end up not implementing it beca
e the exception IMHO.
I don't fully understand the reaons for loading user.clj at all outside of
the REPL, could someone explain the benefits of the current approach?
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message bec
rib such as the repl-utils and the stacktrace libraries
> whenever it first loads.
>
> Thanks for your in advance.
>
IIRC Clojure will automatically load user.clj if found in CLASSPATH, so I
think it would be a good place to put any kind of customizations.
--
Cosm
is.
If anyone else is interested here is a link to github for
chrono.clj<http://bit.ly/d8sYf> (syntax
highlighting). For some reason I couldn't locate test-chrono.clj in the
repo.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You r
http://onclojure.com/2009/03/05/a-monad-tutorial-for-clojure-
> programmers-part-1/
>
> Feel free to post comments!
>
Here's a shorter URL if you'd like, the longer link got broken up for me
http://bit.ly/E81zf
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~--
venience vs speed is always a trade-off, but I think convenience
> should win in the default case. What do others think about this?
>
I would much rather have a fast-math library that redefined common operators
for numeric types only, and had the default +, <, > be multimethods.
--
On Tue, Feb 24, 2009 at 11:21 AM, Konrad Hinsen
wrote:
>
> On Feb 24, 2009, at 17:55, Cosmin Stejerean wrote:
>
> > But more importantly you can't expect that people go ahead and
> > change all (any really) of the existing git or mercurial clones of
> > the rep
oup.
>
git://github.com/kevinoneill/clojure.git
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@goog
r email address sooner
or later someone puts up an archive of a mailing list you are on and exposes
your email address. (For example
http://www.derkeiler.com/Newsgroups/comp.security.ssh/2003-01/0402.html)
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--
es my recommendation would be to
use to :use statements
:use foo.bar :only [eggs, spam]
:use foo.bar :as fb
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure
ure I've seen at least one).
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
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
To un
> (:use clojure.zip :only (xml-zip node))
> (:use clojure.contrib.zip-filter :as zf))
>
+1
I think :as should be mutually exclusive with :only (and friends).
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because
range of versions) of
Clojure should be sufficient to ensure that the code is run against a
compatible version of Clojure. For now I assume that means SVN revision
numbers until we get to 1.0
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received
ader" when you say "preprocessor"? :)
>
> No. This would be a translation step before the code is fed to the
> current Clojure reader.
>
This sounds to me like a better fit for an editor plugin (that would
add parentheses as you type based on indentation, and optionally
On Thu, Jan 29, 2009 at 3:56 PM, Dan Larkin wrote:
>
> On Jan 29, 2009, at 2:55 PM, Cosmin Stejerean wrote:
>
>
>
> On Thu, Jan 29, 2009 at 1:06 PM, Paul Mooser wrote:
>
>>
>> I know this has been discussed on the list before to some extent, but
>> does
; collection has a value for that key, I think the name would ideally
> express that, like:
>
> contains-key?
> has-key?
> maps?
>
I would prefer has-key? for checking if a key is in a map and contains? for
checking if an element is in a collection.
--
Cosmin Stejerean
http:
valent vector (and any vector as
an equivalent list) I can imagine this making sense.
user=> (apply list [1 2 1])
(1 2 1)
user=> (apply vector '(1 2 1))
[1 2 1]
But I don't see how this would ever apply to sets or maps so I don't see why
empty sets and maps should be an
;t
> understand "println".
>
#!/path/to/an/executable/but/not/a/shell/script
You can't have your #! line point to another file with a #! line in it.
(Well, you can but it won't do what you want).
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~--
On Mon, Jan 26, 2009 at 4:48 PM, James Reeves wrote:
>
> On Jan 26, 10:29 pm, Cosmin Stejerean wrote:
> > Can you help me understand the difference between this and use (or :use
> in
> > ns)?
>
> use is internal to the current namespace. You can use other namespaces
&g
up a set of specific libraries into a
> more general package, so your users don't have to type so much if they
> just want the defaults.
>
> - James
Can you help me understand the difference between this and use (or :use in
ns)?
--
Cosmin Stejerean
http://offbytwo.com
--~--~--
On Mon, Jan 26, 2009 at 12:07 PM, Rich Hickey wrote:
>
>
>
> On Jan 26, 11:15 am, Cosmin Stejerean wrote:
> > On Mon, Jan 26, 2009 at 6:34 AM, Rich Hickey
> wrote:
> >
> > > On Jan 25, 4:10 pm, Laurent PETIT wrote:
> > > > #- makes s
>
>
> Yes, the issues are:
>
> #; is bad for editors
>
> #- would be incompatible with CL's #-, and couldn't be upgraded to
> compatibility without breakage.
>
> I'm not sure the latter is a big deal, as #-test ... in CL is just an
> alter
om what I've seen in
the past clojure-contrib is the place for functions like the fast set
operations discussed here. This gives people a chance to use them and
identify any problems, etc before being considered for a move into clojure
core.
--
Cosmin Stejerean
http://offbytwo.com
--~--~
>
>
Use dorun when you want to do something purely for the side effects. If you
don't need what doall would return then you can use dorun instead to clearly
indicate your intent.
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You recei
oblem, and I hope future versions of the JVM will address it but I
don't think it's a huge problem. There are plenty of languages that also
don't support TCO and there are usually ways to work around them. Clojure
already provides two such options, recur and
urce code
from one of the unofficial mirrors, like http://*github*.com/kevinoneill/*
clojure*
--
Cosmin Stejerean
http://offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To pos
e line
> format and save it for a legacy app)
>
Well, if you just want to print to standard out you could use print or
println. Apparently there's also with-out-file which I'm assuming
temporarily binds *out* so all output goes to a file. That might be the
simplest way to do what
should avoid side effects in most of your functions, but
> at least one of them needs to have a side effect for most
> applications.
>
> Does anyone recall who said something like that?
>
I remember reading something very similar, most likely on Hacker News <
http://news.ycombinator
On Fri, Dec 19, 2008 at 10:30 AM, Kevin Martin wrote:
>
> Thanks Rich! I'll keep an eye on the defect(shame there isn't a watch
> feature on google code). Other than this little minor annoyance, the
> new AOT changes are working great. Thanks for all the work, I'm
> really enjoying Clojure.
>
perfect use-case for triple quoted strings. +1
on including something similar in Clojure.
--
Cosmin Stejerean
http://www.offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to
> > Another issue I had is we don't have a good blanket term for Vars,
> > Refs, Agents, and Atoms.
>
> Speaking of these, your article mentions and describes only Var, Ref and
> Agent in your "Reference Types" section.
>
"The text is also a bit out of date a
here's what happens when someone new to Python tries to exit
the interactive console.
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> quit()
--
Cosmin Stejerean
http://www.offbytwo.com
--~--~-~--~~~---~--~~
You received this message be
. What does the "#^" part do?
>
See http://clojure.org/java_interop#toc34
--
Cosmin Stejerean
http://www.offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to t
. What does the "#^" part do?
>
See http://clojure.org/java_interop#toc34
--
Cosmin Stejerean
http://www.offbytwo.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to t
On Tue, Nov 18, 2008 at 12:17 AM, Raffael Cavallaro <
[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 17, 11:55 pm, "Cosmin Stejerean" <[EMAIL PROTECTED]> wrote:
>
> > Most of these projects change on a daily basis and so far I've never run
> > in
rsion (and updating regularly) is a good thing, I
would recommend using the latest version to any newcomer and posting
questions here including detailed explanation of what was tried and what
happened.
--
Cosmin Stejerean
http://www.offbytwo.com
--~--~-~--~~~---~--~---
On Tue, Nov 4, 2008 at 6:45 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 4, 2:56 am, "Christian Vest Hansen" <[EMAIL PROTECTED]>
> wrote:
> > On Tue, Nov 4, 2008 at 6:23 AM, Mark H. <[EMAIL PROTECTED]> wrote:
> >
> > &g
On Nov 3, 2008, at 8:35 PM, Mark H. wrote:
>
> On Nov 3, 5:39 pm, "Paul Stadig" <[EMAIL PROTECTED]> wrote:
>> Could/Should the max function be modified to work against the
>> Comparable interface instead of expecting its arguments to be
>> numbers?
>>
>> I'm working with a sequence of strings
75 matches
Mail list logo