I'd suggest avoiding macros until you absolutely know that you need them.
Usually they aren't necessary.
Prefer writing pure functions (without side effects) - these are easier to
reason about, easier to test, simpler to write correctly and easier to plug
together / compose via higher order
The vast majority of people who have tried paredit prefer using it, your
reaction is very rare. So this is as far from YMMV as you can get.
On Wed, Aug 7, 2013 at 9:58 PM, Lee Spector lspec...@hampshire.edu wrote:
On Aug 7, 2013, at 2:06 PM, Norman Richards wrote:
Structural editing, like
Lee has a valid point. Lee's point is: let me decide. Put paredit in, but
let me turn it off if I want.
I agree that paredit is the only sane way for me and for anyone who doesn't
have Lee's muscle memory to overcome. But for Lee, paredit is 'doing it
wrong', because he doesn't enjoy it and
I've tried paredit several times and dislike it. I found that while
editing the code, I spent a lot of mental energy trying to figure out how
to edit the code within the constraints of the structure-preserving
transformation key combos, which took away from my ability to concentrate
on the
Mark Engelberg mark.engelb...@gmail.com writes:
I've tried paredit several times and dislike it. I found that while
editing the code, I spent a lot of mental energy trying to figure out
how to edit the code within the constraints of the
structure-preserving transformation key combos, which
Hi,
Am Donnerstag, 8. August 2013 10:05:28 UTC+2 schrieb Tassilo Horn:
now I don't know how people can edit Lisp without it.
Quite simple: You type an (, you type some more code, you type ). Easy as
that.
Can we stop this arrogant smug paredit weenie discussion now? Writing
great code
Meikel Brandmeyer (kotarak) m...@kotka.de writes:
now I don't know how people can edit Lisp without it.
Quite simple: You type an (, you type some more code, you type ). Easy
as that.
Writing is easy. IMO, paredit (or structural editing in general) shines
when refactoring code.
Can we
Hi,
Am Donnerstag, 8. August 2013 10:45:34 UTC+2 schrieb Tassilo Horn:
I've never called anybody insane. I just wanted to transport that
paredit and other tools need some time to get used to, but then the
investment might be worth it.
I meant the overall discussion. Not you in person.
Tassilo Horn t...@gnu.org writes:
Writing great code would be a much better use of our time than calling
other people insane.
I've never called anybody insane. I just wanted to transport that
paredit and other tools need some time to get used to, but then the
investment might be worth it.
Is it possible to implement efficient butlast (and drop-last, take-last)
with reducers? The only solution I can think of needs additional reduce to
compute count, which may often be undesirable.
Or is it OK to say that reducers are not designed for such cases?
JW
--
--
You received this
Hi there,
it seems that loop bindings cant's see prior bindings made in
the same loop when the loop is in a go block:
(require '[clojure.core.async :refer [go]])
(go (loop [x 41 y (inc x)] (println y)))
Rather than printing 42, it either complains that x can't be
resolved in that context (in
On Aug 8, 2013, at 3:34 AM, Robert Stuttaford wrote:
Lee has a valid point. Lee's point is: let me decide. Put paredit in, but let
me turn it off if I want.
I agree that paredit is the only sane way for me and for anyone who doesn't
have Lee's muscle memory to overcome. But for Lee,
Lee Spector lspec...@hampshire.edu writes:
On Aug 8, 2013, at 3:34 AM, Robert Stuttaford wrote:
Lee has a valid point. Lee's point is: let me decide. Put paredit in, but
let me turn it off if I want.
I agree that paredit is the only sane way for me and for anyone who doesn't
have Lee's
I can see this as a problem, although, there again new programmers are
likely to have problems getting parens balanced. I've never taught lisp
to new programmers, but given the difficult those I have taught Java
have with brace/paren matching, I guess it's a problem.
It's always hard to know
On Aug 8, 2013, at 8:15 AM, Phillip Lord wrote:
I'm happy to drop this after this message too. I just couldn't let such an
unnecessarily insulting email stand without a response
I think he was trying to support you actually. He's saying it doesn't
work for you, which means it's the wrong
Just for the record:
I've been coding in Lisp for close to 30 years
make that 20 years in my case and I agree with Lee.
Can't live without C-M-q, TAB, M-left/right, C-M-SPC but paredit is
interfering too much for /my/ taste.
stefan
--
--
You received this message because you are
You need to use a buffer to defer calls to the reduced function
(defn drop-last [n coll]
(reducer coll
(fn [f1]
(let [buffer
(atom clojure.lang.PersistentQueue/EMPTY)]
(fn self
([] (f1))
([ret x]
(let [b (swap! buffer conj x)]
You can report issues here: http://dev.clojure.org/jira/browse/ASYNC
On Thu, Aug 8, 2013 at 7:02 AM, Kemar ke.mar...@gmail.com wrote:
Hi there,
it seems that loop bindings cant's see prior bindings made in
the same loop when the loop is in a go block:
(require '[clojure.core.async :refer
ArrayDeque based versions:
(defn drop-last [n coll]
(reducer coll
(fn [f1]
(let [buffer (java.util.ArrayDeque. (int n))]
(fn self
([] (f1))
([ret x]
(.add buffer x)
(if (= (count buffer) n)
ret
(f1 ret
This has me stumped:
user= (with-local-vars [x nil] (eval x))
#Var: --unnamed--
user= (with-local-vars [x nil] (eval [x]))
CompilerException java.lang.NullPointerException, compiling:(NO_SOURCE_PATH:1:1)
By comparison:
user= (def x nil)
#'user/x
user= (eval #'x)
#'user/x
user= (eval [#'x])
The error is caused by the fact that eval sees the var as a constant (or
part of) and tries to serialize the constant.
#Var: --unnamed-- is unreadable while #'user/x is that explains teh
difference in behaviour.
On Thu, Aug 8, 2013 at 3:40 PM, Jamie Brandon
ja...@scattered-thoughts.netwrote:
Yep, this is bug, please submit a bug report through JIRA, and I'll try to
get it fixed ASAP.
Timothy
On Thu, Aug 8, 2013 at 9:22 AM, David Nolen dnolen.li...@gmail.com wrote:
You can report issues here: http://dev.clojure.org/jira/browse/ASYNC
On Thu, Aug 8, 2013 at 7:02 AM, Kemar
Haha, I come back to this list after a good few months of not being able to
keep up with the volume to find a rant about paredit - priceless!
Seriously though, these things are all personal and as such clearly get
people's backs up. So for what it's worth, let me throw my thoughts in...
I
Hey everyone,
I just thought I'd give you a heads up of what I'm currently doing with Clojure
and Overtone within the music space. I gave a talk at a music tech conference
in London a good few months ago and they just put the video online:
https://www.youtube.com/watch?v=zJqH5bNcIN0
It's a
Tim,
I'm with you 100% on the mind-blowing greatness of literate programming,
but I do have to correct you on org-babel. It is actually a very nicely
done LP development system. You write your content as you would a book or
article, using sections and subsections, paragraphs, ordered and
I've posted a bug report:
http://dev.clojure.org/jira/browse/ASYNC-17
Am Donnerstag, 8. August 2013 16:04:15 UTC+2 schrieb tbc++:
Yep, this is bug, please submit a bug report through JIRA, and I'll try to
get it fixed ASAP.
Timothy
On Thu, Aug 8, 2013 at 9:22 AM, David Nolen
What if it isn't inside a constant?
user= (eval `(fn [] ~#'x))
#user$eval1366$fn__1367 user$eval1366$fn__1367@15dbb76
user= (with-local-vars [x nil] (eval `(fn [] ~x)))
CompilerException java.lang.NullPointerException, compiling:(NO_SOURCE_PATH:1:1)
How about functions? These are unreadable but
Wow, thank you very much! A perfect solution.
At the end, wouldn't be good if the reducers would implement alongside
CollReduce also a Seqable interface, so that reducers could be used as a
drop in replacement for today's sequence functions (map, filter, ...)?
CollReduce implements 'eager'
This actually seems to work for deftypes too:
user= (deftype Foo [])
user.Foo
user= (eval (Foo.))
#Foo user.Foo@4450c45f
user= (eval [(Foo.)])
[#Foo user.Foo@71c76cf5]
But not for arbitrary objects:
user= (eval (java.io.StringReader. foo))
#StringReader java.io.StringReader@7e5ef8e8
user=
I struggled for many working days a while back trying to get my
Clojure-and-JavaFX app to run as JWS.
The app ran fine when launched as a stand-alone (from the jar). And code
signing and JNLP were supposedly done state-of-the-art. But I kept getting
a security exception à la accessing a
progressbar transparently wraps any map-able object to print
feedback to standard out as items in the seq are processed:
user (require '[progressbar.core :refer [progressbar]])
user (doall (map identity (progressbar (range 10) :print-every 2)))
[) # this is animated from [) to [) using
Find me a person who fluently used paredit that stopped and reverted back to
manual parenthesis manipulation.
/me raises my hand.
Structural editing was useful in LispVM (on IBM mainframes) where the
display was 12 lines by 40 characters. It might also be useful for the
iPad lisping app. If
Re: org-mode.
I stand corrected. Some days my religious zeal overwhelms my fingers.
Thanks for setting the record straight.
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
On 8 Aug 2013, at 16:29, Tim Daly d...@axiom-developer.org wrote:
Find me a person who fluently used paredit that stopped and reverted back to
manual parenthesis manipulation.
/me raises my hand.
Structural editing was useful in LispVM (on IBM mainframes) where the
display was 12 lines
Right now I ca't figure why the fn case is working but the anonyous Var is
failing because the vars are specially handled:
else if(value instanceof Var)
{
Var var = (Var) value;
gen.push(var.ns.name.toString());
gen.push(var.sym.toString());
I'm with you 100% on the mind-blowing greatness of literate
programming,
Actually, it's not the technology of literate programming I'm on about.
Rich Hickey comes up with marvelous and insightful ideas and reduces
them to practice, like his work on reasonable big-O data structures
or his
On Thu, 08 Aug 2013, Sam Aaron wrote:
Haha, I come back to this list after a good few months of not being able
to keep up with the volume to find a rant about paredit - priceless!
Seriously though, these things are all personal and as such clearly get
people's backs up. So for what it's
The Fn case works because print-dup is defined on fns:
user= (binding [*print-dup* true] (println (fn [] nil)))
#=(user$eval2502$fn__2503. )
nil
user= (read-string #=(user$eval2502$fn__2503. ))
#user$eval2502$fn__2503 user$eval2502$fn__2503@19037d90
I still can't figure out why
Hi Andy,
This cheatsheet of yours is wonderful!
Are there any chances of getting it to clojure.org/cheatsheet? It is a
shame that the cheatsheet at clojure.org is only for Clj 1.4 and doesn't
have the beautiful tooltips.
Thank you, Jakub
On Monday, April 23, 2012 8:35:12 PM UTC+2, Andy
Here is a somewhat simplified example:
Lets say you decide to model positions as {:x 12 :y 10} {:x 23 :y 34}
...And then you want to describe what is present at each of these positions
Then this can simply be done using a map
{ {:x 12 :y 10} A house,
{:x 23 :y 34} Other house}
This may
I am having trouble with an implementation of a custom reader literal
called #sorted-set.
Please see my short code first:
https://github.com/xpe/sorted-map-literal
Why does this work correctly:
(to-sorted-map '(1 2 3 4))
#sorted-map (1 2 3 4) ; correct
While this does not?
#sorted-map (1 2 3 4)
It is relatively easy (with help from the right person with permission to
update clojure.org/cheatsheet) to update the non-tooltip version of the
cheatsheet there.
When last they checked for me some months ago, it was less easy to enable
the tooltip version of the cheatsheet at
The problem is the evaluation. PersistentTreeMap evaluates to the
PersistentArrayMap (or PersistentHashMap).
user= (class (to-sorted-map '(1 2 3 4)))
clojure.lang.PersistentTreeMap
user= (class #sorted-map (1 2 3 4))
clojure.lang.PersistentArrayMap
user= (class #sorted-map (1 2 3 4 5 6 7 8 9 0
That's a good point about:
user= eval (to-sorted-map '(1 2 3 4)))
{1 2, 3 4}
But this should work, right?
user= (assoc #sorted-map (:a 1 :b 2) :c 3)
{:c 3, :a 1, :b 2} ; incorrect
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
It seems there is something else in data reader which causes this change.
user= (class '#foo/sm (1 2 3 4))
clojure.lang.PersistentArrayMap
user= (class (read-string #foo/sm (1 2 3 4)))
clojure.lang.PersistentTreeMap
It's quite puzzling. In both cases the evaluation does not take place, but
Thanks, Mike.
I guess my simple example is too simple. Out of the hypothetical, have you
used techniques like this?
I have this nagging feeling that there is a more direct and idiomatic way
to glean this sort of information from my code. I mean, that's why we use
AST's, right? So we can process
I'd really appreciate if others could take a look. I wonder if it may
be a Clojure reader bug.
On Thu, Aug 8, 2013 at 3:55 PM, Jozef Wagner jozef.wag...@gmail.com wrote:
It seems there is something else in data reader which causes this change.
user= (class '#foo/sm (1 2 3 4))
Again. I'm with you on this one, Tim. Fear not. You aren't the only crazy
Clojure programmer putting the LP bug in people's ears. I must say, your
work on creating a literate version of the Clojure source was really
amazing. Any plans for maintaining it in the future as new Clojure releases
I'd suggest avoiding macros until you absolutely know that you need them.
Usually they aren't necessary.
Problem with this is that you don't really know when you need them unless
you know what they do.
On Thu, Aug 8, 2013 at 9:58 PM, Jace Bennett jace.benn...@gmail.com wrote:
Thanks, Mike.
It may be a bug somewhere in a Compiler. I've lost track at
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6624
after debugging this:
user (def x `(quote ~(list 1 (clojure.lang.PersistentTreeMap/create (seq
[1 2 3 4])
#'user/x
user x
(quote (1
Great demonstration. I'd love to have the camera video side-by-side w/
screencast video (and large enough to read your code as you play).
On Thu, Aug 8, 2013 at 9:16 AM, Sam Aaron samaa...@gmail.com wrote:
Hey everyone,
I just thought I'd give you a heads up of what I'm currently doing with
I started the post primarily to see if anyone else was using story, and if
anyone knew the status of that application, and this has turned more into a
discussion about literate programming. That's okay though. I'm very
interested in literate programming, and am always looking for a viable
On Thu, Aug 8, 2013 at 7:44 AM, Lee Spector lspec...@hampshire.edu wrote:
I was referring to Norman Richard's comment, which is what set me off:
Structural editing, like paredit, is really the only sane way to do
Clojure code. I honestly thing anyone who manually balances parenthesis or
On Thu, Aug 8, 2013 at 4:50 PM, Norman Richards o...@nostacktrace.comwrote:
I do stand by comment. You are free to disagree. It's so painful to
watch people (experienced LISPers and newbies alike) manually balancing
parenthesis and spending inordinate amounts of time to do the simplest
Again. I'm with you on this one, Tim. Fear not. You aren't the only crazy
Clojure programmer putting the LP bug in people's ears. I must say, your
work on creating a literate version of the Clojure source was really
amazing. Any plans for maintaining it in the future as new Clojure releases
On Thu, Aug 8, 2013 at 5:00 PM, Mark Engelberg mark.engelb...@gmail.com wrote:
Getting back to the point of the original post, one of the nice features of
DrRacket is that when you type `]`, it automatically puts either ']' or ')'
Having used DrRacket quite a bit lately, I do not find its
As far as I can tell, neither your script nor org-babel mode address the
third prong of literate programming as defined by Knuth, specifically, the
extensive cross-indexing, letting you know not only where functions are
defined, but also where defined functions are used. Why do you not
I'm concerned that the ability to freely order comments and code will not
interact well with Clojure's namespaces.
Hmmm. If raw code is confusing because namespaces are not apparent
perhaps it would help to surround the code with some natural language
that explains the specific namespace used.
On Thu, Aug 8, 2013 at 7:20 PM, Sean Corfield seancorfi...@gmail.comwrote:
Yes, paredit is a bit of a pain to get used to at first, but it really
does remove a whole slew of issues around parentheses in code, and it
really does make you a lot more productive, especially once you learn
the
On Aug 8, 2013, at 5:44 AM, Lee Spector lspec...@hampshire.edu wrote:
Agreed. But good brace/paren *matching* (highlighting the mate and/or
unmatched brackets) solves this problem without all the downsides (IMHO) of
paredit.
I too had a similar experience. Often when writing code I don't
I'm concerned that the ability to freely order comments and code will not
interact well with Clojure's namespaces. With Clojure's namespaces, you
can have things with the same name in two different namespaces. Functions
local to a namespace are referred to in one way, whereas you need
I updated the cheatsheet on clojure.org to the latest version (no
tooltips). I don't have enough access to add the additional assets that
would make that possible.
Alex
On Thursday, August 8, 2013 2:13:24 PM UTC-4, Andy Fingerhut wrote:
It is relatively easy (with help from the right person
Upgrading failed for me.
C:\Users\majyk\Desktoplein upgrade
The script at C:\Users\majyk\Desktop\local\lein.bat will be upgraded to the
late
st version in series 2.3.0-SNAPSHOT.
Do you want to continue (Y/N)?Y
Downloading latest Leiningen batch script...
1 file(s) moved.
Upgrading...
Looks like I was way too fast. Upgrading just worked for me. Thank you!
On Thu, Aug 8, 2013 at 11:47 PM, Frank Hale frankh...@gmail.com wrote:
Upgrading failed for me.
C:\Users\majyk\Desktoplein upgrade
The script at C:\Users\majyk\Desktop\local\lein.bat will be upgraded to
the late
st
It failed for me on Mac OS X 10.8.4 - this has also been a problem on
Windows for me (which doesn't have curl / wget anyway). Can we please
get the Leiningen JAR posted somewhere that is not prone to this sort
of SSL problem?
(! 536)- lein upgrade
The script at
On Thursday, August 8, 2013 8:52:47 PM UTC-7, Frank Hale wrote:
Looks like I was way too fast. Upgrading just worked for me. Thank you!
I got the ACL wrong on the initial upload but fixed it a few minutes after
the email went out.
-Phil
--
--
You received this message because you are
I'm still getting the 403 forbidden error. Mac and Windows.
On Thu, Aug 8, 2013 at 10:06 PM, Phil Hagelberg p...@hagelb.org wrote:
On Thursday, August 8, 2013 8:52:47 PM UTC-7, Frank Hale wrote:
Looks like I was way too fast. Upgrading just worked for me. Thank you!
I got the ACL wrong on
67 matches
Mail list logo