Phil Hagelberg napisał(a):
> Rob Wolfe writes:
>
> > Yes, there are some escaping problems on Windows. I changed a little bit
> > "lein.py" and this worked for me on Windows and Linux:
>
> Can I include this in Leiningen 1.1.0+ with a note saying it's only
> experimentally supported?
Sure.
Br,
On Dec 15, 8:42 pm, Phil Hagelberg wrote:
> > Ah, OK. That explains the overload of the term "compile"
>
> I'll add a note to this to the swank-clojure readme.
Cool.
> I wasn't even aware that the CL version provided error navigation
> here. But it looks like it shouldn't be too hard to fix no
On Dec 15, 8:26 am, David Nolen wrote:
>
> Rereading your post I realize that most of your concerns are about the
> general unfriendliness of SLIME and not so much that it isn't working. As
> Phil alludes, SLIME wasn't designed with Clojure in mind, so a lot of things
> happen that don't make a
I'm glad Rich stepped up and made this difficult but important point
clearly. With a gentle yearly reminder I will continue to contribute.
For other revenue, I'm glad to say that I've signed up for the
Pragmatic Studio's Clojure training in March 2010 --
https://pragmaticstudio.com/clojure
Severa
The response to the funding appeal has been very encouraging. I can't
express how proud and privileged I am to be part of this community.
What you are doing is tremendous and, I think, unprecedented. Many,
many thanks to everyone who has participated so far:
http://clojure.org/funders
(note: not
Mike K writes:
> (add-to-list 'load-path "C:\\Program Files (x86)\\Clojure Box\\swank-
> clojure")
>
> (require 'swank-clojure-autoload)
Sounds like you're using an old-ish version of swank-clojure; the
autoloads are now generated automatically by elpa.
>> Slime was designed for use with Common
Rob Wolfe writes:
> Yes, there are some escaping problems on Windows. I changed a little bit
> "lein.py" and this worked for me on Windows and Linux:
Can I include this in Leiningen 1.1.0+ with a note saying it's only
experimentally supported?
-Phil
--
You received this message because you ar
> I have following script to show the progress status in Console. But I
> am having an issue where print only prints final string (after 100
> times loop finished) not those in between thread sleeps but println
> prints out all in between. I am pretty new to Clojure ( Lisp for the
> matter) and hav
I have following script to show the progress status in Console. But I
am having an issue where print only prints final string (after 100
times loop finished) not those in between thread sleeps but println
prints out all in between. I am pretty new to Clojure ( Lisp for the
matter) and have no idea
On Dec 15, 9:05 pm, Laurent PETIT wrote:
>
> The final step is to apply return-fn to the result:
> (return-fn
> (first (remove
> (comp not predicate-fn)
> (iterate recur-fn a0)))
>
Damn, well played sir; that's much cleaner. If I might offer one
small tw
On Dec 15, 7:33 pm, Zach Tellman wrote:
> At first glance I don't see a clean to make this completely higher-
> order, but here's a shorter (albeit a little messy) version:
>
> (loop [a a0]
> (let [[a b c d e] (reduce #(conj %1 (%2 (last %1))) [a] [f1 f2 f3
> f4])
> g (f5 c)
>
I suggest to make a call for popularizing Clojure also.
I feel lack of publicity and *quick explanations* with *simple examples* of
why Clojure is better than others.
May be we have a situation when everybody thinks that Clojure is so
excellent that everybody understands it. But though Clojure is
Hi,
Am 15.12.2009 um 20:06 schrieb Sean Devlin:
> Could you re-write this w/ comp, and repost?
Because you need all intermediate results comp is totally useless here. (Unless
you want to recompute everything several times, of course. But that might be
prohobitive due to performance reasons...)
On Tue, Dec 15, 2009 at 9:11 AM, Garth Sheldon-Coulson wrote:
> OTOH, when Rich gave a talk at MIT recently he mentioned he wasn't terribly
> interested in type systems for Clojure apart from (potentially) a simple
> binary type system to distinguish I/O-side-effecty things from
> non-I/O-side-ef
Wonderful. I'm still getting used to juggling functions like this,
rather than doing standard loops. But it's so much cleaner.
Thanks again, everyone; your explanations showed me not only how to
solve my problem, but to organize my logic better too.
On Dec 15, 2:32 pm, Laurent PETIT wrote:
> Of
Maybe it would be reasonable to charge for support if it added
something to that already available on the list. After all, the list
is made up for the most part of volunteers who do not need to earn a
living answering questions, so it seems a little strange to gate
access to them for \anyone, no m
I had some trouble trying to explain my university to pay for free
software as well. They will much rather pay for a mathematica licence.
How about just a printed install CD for clojure. Utterly useless, but
very tangible :).
On Dec 15, 11:20 pm, Mike Hogye wrote:
> Maybe take your ease-of-use i
Maybe take your ease-of-use idea in a slightly different direction and
call it "support." Lots of business models rely on selling support.
I have found the support available through the Clojure community
(specifically: this Google Group, and the IRC channel) to be superb.
Could commercial/corporat
Of course you're right. I couldn't remember filter, was somehow "stuck" with
some which does not do the job of course, and playing with the doc did not
help since my version of clojure still has the bug on filter's lack of
documentation :-)
2009/12/15 Sean Devlin
> On Dec 15, 4:05 pm, Laurent PE
On Dec 15, 4:05 pm, Laurent PETIT wrote:
> Hello,
>
> it seems to me that your example is unnecessary complicated.
> Let's refactor it a bit before trying to obtain your goal.
>
> First,
>
> your example can be, for the purpose of your goal, simplified as :
>
> (loop [a a0]
> (if (predicate-fn a
Hello,
so you have a mutating object. To mutate it you must call a method (please
note, I don't use the term function, which has a different meaning than a
class method, especially in clojure where functions are first class).
You want a final call something like that:
(mystery-fn-or-macro object
Hello,
it seems to me that your example is unnecessary complicated.
Let's refactor it a bit before trying to obtain your goal.
First,
your example can be, for the purpose of your goal, simplified as :
(loop [a a0]
(if (predicate-fn a)
(return-fn a)
(recur (recur-fn a
So now, what
Maybe the _thing_ could be a more packaged version of Clojure;
something for which setup is a little more seamless, etc. No extra
features, just convenience. Maybe an IDE plugin with extra debugging/
instructional features, and more facilities for browsing libraries
(java and clojure). It could
+1 for the idea of offering a _thing_ for sale.
The company I work for isn't going to give a donation; that's just not
something it does. But if there were a _thing_ I could purchase on the
company's dime, well ... it's much more standard for a company to make
a purchase than a donation. Particula
I'm just learning lisp but wouldn't a macro be overkill?
; manually add each item
(doseq [item items]
(.add obj item))
; or wrapped in a function
(defn add-all [obj items]
(doseq [item items]
(.add obj item)))
(add-all obj items)
If your java object had an addAll method that accepted a
I think I misunderstood you. Battling a cold so I'm sorry if I'm way
off here but did you want a macro like this?
(defmacro my-doall [obj func-sym items]
(let [func-name (symbol (str "." (name func-sym)))
item (gensym)]
`(doseq [~item ~items]
(~func-name ~obj ~item
(my-do
Mike---
> the thought that the key developer might just stop working on it doesn't
> exactly
> give me a warm fuzzy feeling.
Look at the last paragraph of Rich's message. He has every intention
to keep working on it. Surely he will speak for himself, but my
impression is that he wants to be ab
At first glance I don't see a clean to make this completely higher-
order, but here's a shorter (albeit a little messy) version:
(loop [a a0]
(let [[a b c d e] (reduce #(conj %1 (%2 (last %1))) [a] [f1 f2 f3
f4])
g (f5 c)
h (-> e f2 f5)]
(if (or (f6? b) (<= g h))
Could you re-write this w/ comp, and repost?
On Dec 15, 2:00 pm, samppi wrote:
> I'm trying to rewrite a loop to use higher-level functions instead.
> For pure functions f1, f2, f3, f4, f5, f6?, and f7, and a Clojure
> object a0, how can one rewrite the following loop to use map, reduce,
> etc.?
I'm trying to rewrite a loop to use higher-level functions instead.
For pure functions f1, f2, f3, f4, f5, f6?, and f7, and a Clojure
object a0, how can one rewrite the following loop to use map, reduce,
etc.?
(loop [a a0]
(let [b (f1 a)
c (f2 b)
d (f3 c)
e (f4
> Isn't the whole point of a struct that it guarantees that certain keys
> are present?
Oh, I agree -- dissoc on a struct-map would return a non-struct-map.
I'm not suggesting that struct-maps should be able to be dissociated
from one of their keys, I'm wondering whether it's better to return
> while writing this email i had a light switch on that i could simply
> do it like this:
> (let [obj (MutatingJavaObject.)]
> (loop [in list-items]
> (when (not (empty? in))
> (.add obj (first in))
> (recur (rest in
> obj)
> but i would still like to know if there is a way
Hi guys,
I have a list (which i don't know the size of) and i want to do
something like this:
(doto (MutatingJavaObject.) (.add (first list-items)) (.add (second
list-items)) . (.add (last list-items)))
Now I may be doing this the complete wrong way, so if you have a
better solution please te
If Clojure type checking becomes a frequent request/complaint, please
build a lint type tool, not some twisted logic embedded in the
compiler :)))
C did not have any decent type checking when it came out and we had to
use lint to find bad parameter on fn calls and other similar errors.
They were n
On Tue, Dec 15, 2009 at 10:54 AM, Greg Harman wrote:
>> doseq is a macro, not a function, and its expansion expands the loop right
>> in place :
>
> Right. Why does it work (in the finally block) when wrapped up in a
> function, but not when doseq is called directly?
The complexity comes from a r
doseq expands into a loop.
2009/12/15 Greg Harman
> > doseq is a macro, not a function, and its expansion expands the loop
> right
> > in place :
>
> Right. Why does it work (in the finally block) when wrapped up in a
> function, but not when doseq is called directly?
>
> --
> You received this
> doseq is a macro, not a function, and its expansion expands the loop right
> in place :
Right. Why does it work (in the finally block) when wrapped up in a
function, but not when doseq is called directly?
--
You received this message because you are subscribed to the Google
Groups "Clojure" gr
doseq is a macro, not a function, and its expansion expands the loop right
in place :
$ java -cp clojure/clojure.jar:clojure-contrib/clojure-contrib.jar
clojure.contrib.repl_ln
Clojure 1.1.0-master-SNAPSHOT
1:1 user=> (require 'clojure.contrib.pprint)
nil
1:2 user=> (clojure.contrib.pprint/pprint
Why does that work? The same recursion happens in the finally. There's
a layer of indirection now, but the doseq was already a layer of
indirection between the finally and doseq's internal recur.
I see from the linked thread above that the basic issue is a known
implementation issue with Clojure t
On Tue, Dec 15, 2009 at 2:08 AM, Mike K wrote:
> I hadn't considered another IDE. Clojure is my first real exposure to
> the JVM, so I'm not familiar with Java IDEs. OTOH, Emacs has been my
> editor of choice for over two decades (yikes!) so it's definitely home
> turf for me. Besides, I'm alr
Isn't the whole point of a struct that it guarantees that certain keys
are present? I think the current behavior is correct.
On Dec 15, 5:21 am, Garth Sheldon-Coulson wrote:
> I wonder if the fact that this currently doesn't work the way you want it to
> is a necessary consequence of structural
On Tuesday 15 December 2009 06:21 PM, ajay gopalakrishnan wrote:
> Oh ... I know all that. What I wanted to know is that is there any way
> to FORCE compile time checking by providing some flag or the other to
> Clojure compiler. If not, I guess a good set of test cases is the only
> way to fix it.
On Tue, Dec 15, 2009 at 1:08 AM, Greg Harman wrote:
> Actually, the for didn't work for me either but I believe that was a
> lazy evaluation issue. The doseq seems to use internal recursion,
> which breaks the try/finally. My final solution was to build up doseq
> functionality with reduce. See be
On Dec 15, 1:23 pm, Baishampayan Ghose wrote:
> PS - If you are worried about "compile time type checking", I think it's
> prudent to mention now that Clojure is a dynamically typed programming
> language where types are checked at run-time and not compile time.
Actually, there are Common Lisp co
That's very interesting. I haven't run into this issue before.
One cleanish way to side-step it is to use
(defn foo2 []
(try
(println "body")
(finally
(doall (for [x (range 3)] (println x))
Which is perhaps a little cleaner in meaning to the original doseq
than a reduce.
-Patri
OTOH, when Rich gave a talk at MIT recently he mentioned he wasn't terribly
interested in type systems for Clojure apart from (potentially) a simple
binary type system to distinguish I/O-side-effecty things from
non-I/O-side-effecty things. He also mentioned something extremely
interesting about wa
2009/12/15 ajay gopalakrishnan
> Oh ... I know all that. What I wanted to know is that is there any way to
> FORCE compile time checking by providing some flag or the other to Clojure
> compiler. If not, I guess a good set of test cases is the only way to fix
> it. (Good test cases are always rec
Oh ... I know all that. What I wanted to know is that is there any way to
FORCE compile time checking by providing some flag or the other to Clojure
compiler. If not, I guess a good set of test cases is the only way to fix
it. (Good test cases are always recommended, it's just that in this case it
Ajay,
> It tried the following in REPL and got no error. Personally, I feel that
> I should get an error because calling square on strings is wrong in both
> cases.
>
> Is there a way out of this in Clojure?
>
> |(defn square[n] (* n n))
>
> (if (= 0 0) (println"hello") (map square["a" "b"
I'm not convinced donations alone is a sustainable funding method. Why
don't you derive a commercial product ? You could build an IDE for
Clojure and sell it. You could write a book (although that is unlikely
to really pay). You could build a "stackoverflow"-type community,
organize events/conferen
Rich,
What prevents Clojure from being funded by grants like NSF and DARPA
which normally fund academic research?
Best,
Brent Millare
--
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
Hi,
On Dec 15, 7:08 am, Greg Harman wrote:
> Actually, the for didn't work for me either but I believe that was a
> lazy evaluation issue. The doseq seems to use internal recursion,
> which breaks the try/finally. My final solution was to build up doseq
> functionality with reduce.
See also her
On Dec 14, 12:19 pm, BerlinBrown wrote:
> Have you ever considered working with a larger company like Oracle/
> Sun, IBM or Google in some kind of research capacity and working on
> Clojure full time there? For example, I believe the JRuby developers
> worked for Sun at one point while they devel
You might find this interesting:
http://www.oreillynet.com/ruby/blog/2008/03/the_ruby_mendicant_project.html
Or this:
http://www.modrails.com/enterprise.html
There are only a handful of such efforts in the Ruby community, but
when buoyed by a reasonably large and active community, it is possibl
I'm sorry, but I find the whole "donate" thing a little
off-putting. I've just started looking into Clojure, and the thought
that the key developer might just stop working on it doesn't exactly
give me a warm fuzzy feeling. Now the evaluation will have to include
looking at the community, and tryin
I haven't used Clojure for anything yet, but I've really liked your
recorded presentations--they've already had an effect on how I
program. I also would love to see an open source project like this be
able to survive on contributions from individual developers so I've
donated.
While I appreciate
I wonder if the fact that this currently doesn't work the way you want it to
is a necessary consequence of structural sharing and the desired performance
guarantees of dissoc.
In other words: I wonder if, on account of how struct maps are implemented
(sort of like a vector, right?), the only way t
On Dec 15, 1:49 am, ataggart wrote:
> On Dec 14, 5:48 am, Mark Tomko wrote:
>
> > I wrote this implementation of a heap (or priority queue) in pure
> > Clojure:
>
> >http://pastebin.com/m2ab1ad5a
>
> > It's probably not of any quality sufficient to be make it to the
> > contrib package, but it
Rob, DTH,
Thanks for the responses. I guess that's more or less what I feared. I
had hoped that I was overlooking something. I'll just put a little
script on my integration branch which calls install:install-file with
the proper arguments. (The pom.xml solution is too great a violation
of DRY for
On Dec 14, 11:23 pm, Richard Newman wrote:
> Something I keep bumping into: the SQL library returns rows as struct-
> maps. Often I want to do things like rename keys (:foo_bar => :foo-
> bar), strip out :id columns, etc.
>
> Nope!
>
> java.lang.Exception: Can't remove struct key
>
> Any opin
On Dec 14, 5:48 am, Mark Tomko wrote:
> I wrote this implementation of a heap (or priority queue) in pure
> Clojure:
>
> http://pastebin.com/m2ab1ad5a
>
> It's probably not of any quality sufficient to be make it to the
> contrib package, but it seems to work. Any thoughts on how it might
> be
61 matches
Mail list logo