On 4 February 2010 09:04, Wardrop wrote:
> I often myself creating functions which perform a rather clear and
> simple task, but which is hard to describe, either because I don't
> know the term for what I've just implemented, or because the function
> is difficult to summarise in a couple of word
On 04.02.2010, at 03:20, Timothy Pratley wrote:
My initial reaction is that I will use a central dedicated ns template
for convenience.
That's what I do as well - one template per project.
One thing I've wondered about with clojure core namespaces is:
(clojure.xml/parse "foo.xml") ;; works
I often myself creating functions which perform a rather clear and
simple task, but which is hard to describe, either because I don't
know the term for what I've just implemented, or because the function
is difficult to summarise in a couple of words. As an example, I've
just created a function whi
Hi,
On Feb 4, 4:42 am, Greg wrote:
> The magic happens here:
>
> (while (list? (setf values (sql:next-row)))
> (eval (expand (cons 'begin $args) (unify keys
> values)))
> )
>
> $args is equivalent to the 'body' in [& body] in clojure, and
the 11th at Zokas is good for me
On Wed, Feb 3, 2010 at 10:07 PM, ajay gopalakrishnan wrote:
> I'm in!
> But on 11th. I cannot make it on 15th
>
>
> On Wed, Feb 3, 2010 at 7:01 PM, Phil Hagelberg wrote:
>>
>> Hello, clojurists of Seattle.
>>
>> Let's meet! I'm thinking of getting folks together
I'm in!
But on 11th. I cannot make it on 15th
On Wed, Feb 3, 2010 at 7:01 PM, Phil Hagelberg wrote:
> Hello, clojurists of Seattle.
>
> Let's meet! I'm thinking of getting folks together from 7pm to 9pm at Zoka
> in the University District: http://bit.ly/c9jinW Topics may include
> Leiningen, d
Hi there, I'm rather new to Clojure but have a lot of experience with newLISP.
I wrote a nifty function the other day that I'm trying to port to Clojure but
my inexperience with the language and lack of knowledge of the api (which is
down ATM) is making this difficult, maybe someone can help.
T
So, Amit, any updates? Bear in mind that ICFP is Sept. 27-29 this
year.
-mike
On Jan 28, 4:40 pm, Amit Rathore wrote:
> The JavaOne alignment will probably work. The last time, we had a
> special Bay Area Clojure meetup following it, and it was our biggest
> ever (around 80 people). Of course,
A function would be named based on what it is that it does.
Difficulty naming functions would imply to me that the functions
involved do not contain a clear functionality.
The names of the functions should sort of be an 'emergent property' of
a larger process of reasoning through the programming
On Feb 3, 7:18 pm, James Reeves wrote:
> On Feb 3, 8:44 pm, Vagif Verdi wrote:
>
> This again is something that's limited to Compojure, and not
> necessarily indicative of a problem with the functional approach.
I agree. As long as session implementation is robust and simple to use
without corn
On Wed, Feb 3, 2010 at 10:47 PM, Wardrop wrote:
> I've always struggled when it comes to defining good names for
> functions and methods. Now that I'm learning Clojure, function naming
> becomes even more imperative, as you don't have classes and objects to
> help give meaning to a method. I'm fi
On Feb 3, 11:31 am, Rich Hickey wrote:
> One idea is to pass commute-like and deref-like functions to the
> handling code for sending change to, and accessing, the session state.
> The state will be an immutable value as usual. This encapsulates
> everything about the session data.
That's an inte
I've always struggled when it comes to defining good names for
functions and methods. Now that I'm learning Clojure, function naming
becomes even more imperative, as you don't have classes and objects to
help give meaning to a method. I'm finding at the moment that I'm
spending half my time thinkin
On Feb 3, 8:44 pm, Vagif Verdi wrote:
> Invalidating sessions do not work. James replied that it would be hard
> to fix with immutable
> sessions:http://groups.google.com/group/compojure/browse_thread/thread/b27ab40...
Actually, I was completely wrong in that instance. I'm not sure what I
was th
Hello, clojurists of Seattle.
Let's meet! I'm thinking of getting folks together from 7pm to 9pm at Zoka
in the University District: http://bit.ly/c9jinW Topics may include
Leiningen, deftype/protocols, getting set up with Emacs, or even getting
another pair of eyes on that pet project that you've
On Feb 3, 6:41 pm, Tayssir John Gabbour
wrote:
> ;; Works, but is ugly.
> (let [xset #{{:a 1, :b 1, :c 1}
> {:a 2, :b 2, :c 2}
> {:a 3, :b 3, :c 3}}]
> (project (select #(= (:a %) 1) xset)
> [:b :c]))
>
> So what I currently do is this:
>
> ;; Works, with
On 4 February 2010 03:56, CuppoJava wrote:
> 1. That indentation is *extremely* important.
> 2. That it's not straightforward ( relative to C-languages ).
> 3. You're not expected to easily indent code manually.
This is insightful and succinct advise which would be a great FAQ or
pre-amble to
On 4 February 2010 03:38, Konrad Hinsen wrote:
> For now, I'd like to get feedback and ideas for improvements!
Hi Konrad, I like it!
My initial reaction is that I will use a central dedicated ns template
for convenience.
One thing I've wondered about with clojure core namespaces is:
(clojure.xm
On Feb 3, 3:55 pm, Mark McGranaghan wrote:
> One thing that would help us a lot with choosing the right interface
> for sessions is examples of session use from real application code. We
> have considered simple examples like incrementing a counter and
> logging in / logging out (http://gist.githu
On Feb 3, 8:55 pm, braver wrote:
> Meikel -- cool lazy solution, but doesn't generalize to replace <=
> with a predicate. Here's my non-lazy, reduce-based one generic with
> instantiations:
>
> (defn clis-pred
> [pred s]
> (let [[x & xs] s [r zs _]
> (reduce (fn [[r zs z] e]
> (if (
On Feb 3, 2:49 pm, Travis wrote:
> I'm writing an app that will be dealing with large numbers of numbers.
> Perhaps I should gloss over the memory problem until it actually
> becomes a problem, but I'm coming across really weird behavior.
>
> user=> (type (first r9))
> java.lang.Double
> user=>
Michal, thanks for your example. I didn't seem to work too well for me
though, but they may have been partly my fault. It did expose me to
however to some new concepts and their uses.
Ataggart, what an excellent solution. It's pretty much exactly what I
was after, and the code is very clean and ea
Hi Vagif,
On Feb 3, 4:27 pm, Vagif Verdi wrote:
> Whatever you guys chose, do not go the immutable road. Compojure took
> that approach and now many people (including me) are stuck with
> situations where they need to update session in a middle and pass it
> somewhere else, and they can't. Sessio
On 3 February 2010 17:14, Stephen C. Gilardi wrote:
> I believe it's also possible to make the change backward compatible so
> arguments to the new require macro would work quoted or not. (by detecting
> and ignoring (quote ...) special forms in arguments).
That's a good idea! A simple-minded m
On Feb 3, 10:41 pm, wlr wrote:
> Can you somehow use ->> ?
>
> user> (->> #{1 2 3 4} (clojure.set/select even?))
> #{2 4}
D'oh, I was terribly unclear. I want to do something neat and pretty
like:
;; Doesn't work!
(-> #{{:a 1, :b 1, :c 1}
{:a 2, :b 2, :c 2}
{:a 3, :b 3, :c 3}}
(s
I would imagine opening a clojure repl and loading the leiningen
library.
http://github.com/technomancy/leiningen/blob/94c675afe6767aa142bfc882298f0f828e476e24/README.md
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send emai
If "normal" is a binary heap with log(n) for most things, no. This is
better.
You can check out the paper(s) I based it on included in the project. It
has runtimes equivalent to Fibonacci Heap except that Fib-Heaps only have
amortized worst case.
insert: O(1)
findMin: O(1)
meld: <--- i don't rem
Hi
Pulling off of GIT I got the following 4 errors in the unit tests:
FAIL in (test-relative-path-string) (run-test5258617284758852043.clj:
45)
absolute path strings are forbidden
expected: (thrown? IllegalArgumentException (relative-path-string "/
baz"))
actual: nil
FAIL in (test-relative-pat
I'm writing an app that will be dealing with large numbers of numbers.
Perhaps I should gloss over the memory problem until it actually
becomes a problem, but I'm coming across really weird behavior.
user=> (type (first r9))
java.lang.Double
user=> (type (first (into-array Double/TYPE r9)))
java.l
Hi,
I was wondering if the time is right to replace Perl/Bash/Ruby/Python with
Clojure for system administration / dev productivity scripts. I would not do
things in Java (for obvious reasons), but clearly Clojure is more concise
than Java in most cases.
I would however want to know in detail if i
Can you somehow use ->> ?
user> (->> #{1 2 3 4} (clojure.set/select even?))
#{2 4}
Walt
--
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 -
Whatever you guys chose, do not go the immutable road. Compojure took
that approach and now many people (including me) are stuck with
situations where they need to update session in a middle and pass it
somewhere else, and they can't. Session is a data storage, just like a
database.
One of the str
Meikel -- cool lazy solution, but doesn't generalize to replace <=
with a predicate. Here's my non-lazy, reduce-based one generic with
instantiations:
(defn clis-pred
[pred s]
(let [[x & xs] s [r zs _]
(reduce (fn [[r zs z] e]
(if (pred z e) [r (conj zs e) e] [(conj r zs) [e] e]))
On Thu, Feb 4, 2010 at 12:55 AM, Stuart Sierra
wrote:
> On Feb 3, 1:20 pm, Ramakrishnan Muthukrishnan
> wrote:
>> I uploaded clojure-contrib 1.1 debian package into the debian repos.
>
> I hope that's the 1.1 release, not the current github master.
yes, 1.1 release as I have written above.
--
On Feb 3, 1:20 pm, Ramakrishnan Muthukrishnan
wrote:
> I uploaded clojure-contrib 1.1 debian package into the debian repos.
I hope that's the 1.1 release, not the current github master.
-SS
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to
I found some thoughts about a clojure lint:
http://stackoverflow.com/questions/1938242/how-would-one-create-a-clojure-lint
--
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 f
>
>
> The algorithm used is identical, but the structure of the code is
> quite different, perhaps being more or less readable. It may be worth
> including such details in addition to where one sticks whitespace.
>
>
I think it should be in a different tool but a Clojure lint is an awesome
idea.
On Wed, Feb 3, 2010 at 11:43 PM, Stuart Sierra
wrote:
> On Feb 3, 2:03 am, Ramakrishnan Muthukrishnan
> wrote:
>> I hope this will be added back into the repo soon.
>
> It's in now.
Thanks.
I uploaded clojure-contrib 1.1 debian package into the debian repos.
It should hit the debian archive in
On Feb 3, 10:06 am, Stuart Sierra wrote:
> On Feb 2, 8:40 pm, Stuart Halloway wrote:
>
> > SS: is require* an acceptable name for the function version?
>
> I don't care what it's called so long as there's a function there.
> While we're at it, I want import* back as a function.
>
> -SS
Out of
On Feb 3, 2:03 am, Ramakrishnan Muthukrishnan
wrote:
> I hope this will be added back into the repo soon.
It's in now.
-SS
--
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
On Feb 2, 8:40 pm, Stuart Halloway wrote:
> SS: is require* an acceptable name for the function version?
I don't care what it's called so long as there's a function there.
While we're at it, I want import* back as a function.
-SS
--
You received this message because you are subscribed to the G
We should note that formatting the code means more than just
indentation. E.g.:
(map vec
(partition 2
(map foo
(filter bar? baz
vs.
(->> baz
(filter bar?)
(map foo)
(partition 2)
(map vec))
The algorithm used is identical, but the structure of the code is
quite different
Hi!
set/select is hard to thread with the other clojure.set functions
using ->, because its argument order is different.
I currently use a reverse-args function like the following:
(defn revargs [f]
(fn [& args]
(apply f (reverse args
((revargs select) xset pred)
Is there a better w
On Wed, Feb 3, 2010 at 12:11 PM, Laurent PETIT wrote:
> I think there are also several ways of identing clojure code, depending on
> what the tools provide out-of-the-box, and of devs personal preferences:
>
> * do you see a reindenter like something that will just correctly change
> the number o
hmm...interesting view.
Now I don't have really expressive examples of using reader macro.
Also it seems that I find another way to achieve the functionality
that I need.
So all thanks for discussion.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
I think there are also several ways of identing clojure code, depending on
what the tools provide out-of-the-box, and of devs personal preferences:
* do you see a reindenter like something that will just correctly change
the number of beginning spaces of each line, or also something that could
re
As trivial as it seems, proper indentation was also my most
significant hurdle when learning Clojure. I finally was only able to
"get" s-exps after realizing:
1. That indentation is *extremely* important.
2. That it's not straightforward ( relative to C-languages ).
3. You're not expected to
2010/2/3 Laurent PETIT
> And it's also standard in maven to have the final artifact (e.g. a jar) be
> self-documented by having pom.xml and pom.properties in the META-INF
> directory of the jar :
>
See:
http://maven.apache.org/guides/getting-started/index.html#How_do_I_add_resources_to_my_JAR
I see why you want to create your own reader macros—you want to set
apart certain code visually. But ataggart has a good point when he
keeps asking you for specific examples of your code. Do you want to
use reader macros to change something like this:
(make-data "red" "blue" "green")
into somethi
And it's also standard in maven to have the final artifact (e.g. a jar) be
self-documented by having pom.xml and pom.properties in the META-INF
directory of the jar :
META-INF/maven///pom.xml
META-INF/maven///pom.properties
Not sure if clojars can be fed by simply providing a jar providing
self-d
On Mon, Feb 1, 2010 at 2:42 AM, Moss Prescott wrote:
> Hi,
>
> As a very green Clojure user and a big fan of persistent data
> structures, I'm struggling to grasp the significance of transients in
> Clojure 1.1. In particular, the implementation seems to be less safe
> and less consistent than it
On Wed, Feb 3, 2010 at 8:27 AM, James Reeves wrote:
> Hi folks,
>
> Mark McGranaghan and I have recently been working on new functionality
> for Ring, a web application library for Clojure. Ring is similar to
> Rack on Ruby, and provides a simple, functional interface for handling
> HTTP requests.
On Fri, Jan 29, 2010 at 9:40 AM, Chouser wrote:
> On Fri, Jan 29, 2010 at 8:44 AM, Rich Hickey wrote:
>> On Fri, Jan 22, 2010 at 8:57 AM, Chouser wrote:
>>> On Thu, Jan 21, 2010 at 10:11 PM, Sean Devlin
>>> wrote:
Sometimes you don't want assoc-in to create a hash-map. Sometimes you
On Fri, Jan 29, 2010 at 8:53 AM, Sean Devlin wrote:
> The following doesn't currently work:
>
> user=> (assoc [] 1 :a)
> #
>
But this does:
user=> (assoc [] 0 :a)
[:a]
> So I say this should be map only.
I don't think so.
> Also, what do you mean by your question "Where would the default go"
On Wed, Feb 3, 2010 at 8:08 AM, Dan wrote:
> Once a month, we get a proposal about how to remove the parens so that the
> language would be more usable for newbies who are afraid of them. Invariably
> this turns out into experienced clojure users telling that the parens aren't
> a problem and that
A typical situation in a Clojure project is that several namespaces
start with the same combination of use-require-import, or at least
have much of these references to the outside world in common. However,
Clojure currently has no way to define a combination of external
references once and
On 2 Feb 2010, at 21:52, Alex Osborne wrote:
Sure, you can just write the POM by hand. The reason the POM is
necessary is so clojars knows the groupId, artifacId, version and
description of your lib. So just create the jar however you want (eg
just use the 'jar' command-line tool). Then creat
On Feb 2, 2010, at 8:40 PM, Stuart Halloway wrote:
> In teaching people Clojure, non-intuitive behavior with use/require is the #1
> problem for beginners, by a mile. I believe we need both ordinary function
> and macro versions, and I am pretty sure that a well-considered patch
> implementing
A good front end for Clojars would be a better long term solution.
Sean
On Feb 2, 3:44 pm, "John \"Z-Bo\" Zabroski"
wrote:
> http://clojure.org/librariesis out of date
>
> Gorilla was merged with VimClojure, and I think I saw other
> problems...
>
> Also, the organization of this page is messy a
On Tue, Feb 2, 2010 at 2:35 PM, Meikel Brandmeyer wrote:
> PS: On Windows deployment to Clojars does not work due to scp trouble. Only
> Unix/Mac OS X supported at the moment for deployment.
>
If that's a blocker for anyone on Windows, they should parameterize the
Clojars scp program and set it
Hi,
On Feb 3, 3:58 pm, Konrad Hinsen wrote:
> Gradle would be just a development dependency, right? Users of my
> library would not need to install Gradle I guess.
Yes. The users of your library can use whatever they want: maven, ant
+ivy, gradle, wget, bit hand carry, ... They specify the de
On Feb 3, 9:21 am, Eric Lavigne wrote:
> With the same issue in mind, I propose design 3. Like design 1 except
> (ref {}) instead of (atom {}) because I may want to coordinate changes
> between the session and some other transaction-aware state.
Sessions can be implemented with many storage engin
On 2 Feb 2010, at 20:35, Meikel Brandmeyer wrote:
clojuresque is independent of the Clojure version used in the
project and allows easy deployment of non-AOT'd jars to Clojars. It
handles POM and jar generation and gives reflection warnings (if
desired) even if not AOT'ing. But gradle might
Also I can try to implement them by myself. I have some ideas how to
do this.
--
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 pati
On Wed, Feb 3, 2010 at 9:09 AM, .Bill Smith wrote:
> I won't tell you what editor you ought to use, but Emacs in clojure-
> mode takes care of the indentation for you. I suspect editors/IDEs
> that "support" clojure do as well.
>
> Another data point: the Clojure source code (the part that's actu
> Currently we have two possible designs:
>
> Design 1:
> The session is stored as an mutable atom map in (request :session). To
> update the session, use the standard Clojure swap! function, e.g.
>
> Design 2:
> The session is an immutable map in (request :session). To update the
> session, add th
I won't tell you what editor you ought to use, but Emacs in clojure-
mode takes care of the indentation for you. I suspect editors/IDEs
that "support" clojure do as well.
Another data point: the Clojure source code (the part that's actually
written in Clojure) is indented, and it's open source.
I'm trying to get Clojure to work with axis2.
Anybody playing with that. The best I get is error message:
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Caused by:
java.io.FileNotFoundException: Could not locate e
Hi folks,
Mark McGranaghan and I have recently been working on new functionality
for Ring, a web application library for Clojure. Ring is similar to
Rack on Ruby, and provides a simple, functional interface for handling
HTTP requests.
We've recently added support for urlencoded parameters and coo
Once a month, we get a proposal about how to remove the parens so that the
language would be more usable for newbies who are afraid of them. Invariably
this turns out into experienced clojure users telling that the parens aren't
a problem and that they become invisible once you start indenting your
On Tue, Feb 2, 2010 at 3:57 PM, Aaron Cohen wrote:
> What I meant to say, was that, unfortunately the video cuts off after
> 10 minutes. Are the slides for this talk available somewhere?
I was sitting behind the guy who was recording the talks and watched
his battery die and was like "doh, someon
On 3 February 2010 08:58, Meikel Brandmeyer wrote:
> condp was specifically designed to be a scheme-like cond with :>>
> support and such.
Well, I like condp a lot (really, condp FTW! -- definately worth a
define-syntax in Scheme :-)), but it's nothing like Scheme's cond
(which is a good thing, a
Thanks for all the responses!
> http://dishevelled.net/Generating-Clojure-import-lines-using-SLIME.html
Hey that's making life TOO easy! I especially love that it has REPL lookup.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group
Timothy Pratley writes:
> I've found myself a few times in a situation where I'm banging some
> java code into clojure, and the java source uses import foo.* blah.*
> bar.* How do other people do this?
If there's a lot of stuff I have to import I use Mark's nifty addition
to SLIME:
http://dis
74 matches
Mail list logo