Re: Debugging a custom reader literal for a sorted-set

2013-08-09 Thread Jozef Wagner
This ticket may be related, http://dev.clojure.org/jira/browse/CLJ-1093 On Friday, August 9, 2013 12:08:06 AM UTC+2, Jozef Wagner wrote: > > 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 > > af

RE: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Phillip Lord
Also here on linux. Unfortunately, after upgrading the bash script, so it leaves a broken install. Phil From: clojure@googlegroups.com [clojure@googlegroups.com] on behalf of Alex Ott [alex...@gmail.com] Sent: 09 August 2013 07:36 To: clojure@googlegroup

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Mikera
On Friday, 9 August 2013 03:58:40 UTC+8, Jace Bennett wrote: > Thanks, Mike. > > I guess my simple example is too simple. Out of the hypothetical, have you > used techniques like this? > Not exactly your use case, but I've written probably the two most complex games so far in Clojure... games

Re: butlast with reducers

2013-08-09 Thread Christophe Grand
Gaving slept on it I realize that by adding before popping I allowed the buffer to grow to n+1 thus causing a realloc. (defn drop-last [n coll] (reducer coll (fn [f1] (let [buffer (java.util.ArrayDeque. (int n))] (fn self ([] (f1)) ([ret x] (let

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Mikera
On Friday, 9 August 2013 05:07:10 UTC+8, Jonathan Fischer Friberg wrote: > 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. > I'm n

Re: Confused by var eval behaviour

2013-08-09 Thread Christophe Grand
You are right, it's beacsue of print-dup. Hence it works only on functions which aren't closures: => (let [a nil x (fn [] a)] (eval [x])) IllegalArgumentException No matching ctor found for class user$eval3989$x__3990 Why is emitValue used? Regular code forms (as returned by the reader) don't us

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Jim - FooBar();
same here! can we get the 2.3.0.-jar from clojars? does anybody know? Jim On 09/08/13 08:14, Phillip Lord wrote: Also here on linux. Unfortunately, after upgrading the bash script, so it leaves a broken install. Phil From: clojure@googlegroups.com [cl

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Jean Niklas L'orange
Hey guys, I've hacked together a temporary fix for people who really, really, really want to use 2.3.0 right away, or have broken their lein script and just want to solve this "the easy way". I would NOT recommend people to upgrade right now, just wait until the jar has been set up with the rig

Re: [proposal] simplified but extensible ns declaration

2013-08-09 Thread Phillip Lord
So, my proposal got no comments -- not surprising, it was too long. So I decided to just implement it instead.It's not terribly usable at the moment, because it needs to be use'd before it can be, er used. Here are a rough set of exemplars that give an idea of what I have in mind. . https://gith

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Matt Mitchell
The upgrade ended up "breaking" lein on my system. This fix worked for me. Thanks! On Friday, August 9, 2013 5:30:42 AM UTC-4, Jean Niklas L'orange wrote: > > Hey guys, > > I've hacked together a temporary fix for people who really, really, really > want to use 2.3.0 right away, or have broken t

Re: Confused by var eval behaviour

2013-08-09 Thread Jamie Brandon
Ah, I found out that java bytecode can't contain data literals so the compiler has to emit a constructor instead. Also, since the jvm doesn't gc classes there might be confusing memory leaks if you could embed a closure in evaluated code. On 9 August 2013 09:13, Christophe Grand wrote: > You are

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Jace Bennett
Thanks again, Mike. That's really helpful. I'll take a look at the core.matrix stuff to try and understand implementation and motivation better. What games did you make? I'd love to check them out. Jace On Fri, Aug 9, 2013 at 4:10 AM, Mikera wrote: > On Friday, 9 August 2013 05:07:10 UTC+8, J

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Jonathan Fischer Friberg
I agree! :) On Fri, Aug 9, 2013 at 10:10 AM, Mikera wrote: > On Friday, 9 August 2013 05:07:10 UTC+8, Jonathan Fischer Friberg wrote: > >> 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 reall

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Jace Bennett
Obviously I've encountered the advice "no macros unless you know you need them" before. And I even sort of know the syntax and what they do. I don't think that's my problem. I think I've lived a life without macros. I mean, clearly dynamic-functional and even OOP styles are perfectly capable of bu

[ANN] jvm.tools.analyzer 0.4.3 - CLJS hygienic transformation

2013-08-09 Thread Ambrose Bonnaire-Sergeant
Hi, [org.clojure/jvm.tools.analyzer "0.4.3"] jvm.tools.analyzer now supports transformations on CLJS code. https://github.com/clojure/jvm.tools.analyzer Examples: Normal AST generation: (cljs.tools.analyzer/ast 1);=> {:op :constant, :env {:ns {:defs {a {:column 18, :line 2, :file nil, :name clj

Re: IDE feature

2013-08-09 Thread Laurent PETIT
Le vendredi 9 août 2013, Sean Corfield a écrit : > On Thu, Aug 8, 2013 at 5:00 PM, Mark Engelberg > > > 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 DrRack

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Armando Blancas
[Mac OS X 10.8.4] I followed this same procedure as Sean and it worked for me last night. On Thursday, August 8, 2013 9:16:06 PM UTC-7, Sean Corfield wrote: > > 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 p

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Andrew Stine
For a pretty decent cover of when and how to use macros, On Lisp[1] is a pretty good book. It's written mainly for Common Lisp but most of it translates to Clojure well enough. I find that for common code, writing macros isn't so useful as most of the goods ones are already part of clojure.core

Re: IDE feature

2013-08-09 Thread Sean Corfield
On Fri, Aug 9, 2013 at 6:58 AM, Laurent PETIT wrote: > What does it do? (first time I encounter it) DrRacket? It's the "standard" IDE for the Racket language (and all of its teaching subsets etc). -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Moritz Ulrich
Phil Hagelberg writes: > 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 > > -- https

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Lee Spector
On Aug 9, 2013, at 11:01 AM, Andrew Stine wrote: > For a pretty decent cover of when and how to use macros, On Lisp[1] is a > pretty good book. It's written mainly for Common Lisp but most of it > translates to Clojure well enough. I find that for common code, writing > macros isn't so useful

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Sean Corfield
On Fri, Aug 9, 2013 at 12:14 AM, Phillip Lord wrote: > Unfortunately, after upgrading the bash script, so it leaves a broken install. I keep my lein script under Git so it was easy to revert, but we're still on 2.1.3 because I ran into a number of problems with 2.2.0 (that I no longer remember bu

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Sean Corfield
Gmail search is defeating my efforts to locate what my problems with 2.2.0 were so I'll just wait until I can download 2.3.0 and re-run all our tests anyway. Sigh. On Fri, Aug 9, 2013 at 8:12 AM, Sean Corfield wrote: > On Fri, Aug 9, 2013 at 12:14 AM, Phillip Lord > wrote: >> Unfortunately, afte

Re: IDE feature

2013-08-09 Thread Ambrose Bonnaire-Sergeant
I'll bet Laurent means paredit-convolute-sexpr :-) Ambrose On Fri, Aug 9, 2013 at 11:09 PM, Sean Corfield wrote: > On Fri, Aug 9, 2013 at 6:58 AM, Laurent PETIT > wrote: > > What does it do? (first time I encounter it) > > DrRacket? It's the "standard" IDE for the Racket language (and all of >

Re: IDE feature

2013-08-09 Thread Sean Corfield
Ah, yes... it turns this ( | represents the cursor ): (f a b (g c d |e f)) into this: (g c d (f a b e f)) I find I use it most often when moving `let` forms around, but also for other constructs occasionally. Sean On Fri, Aug 9, 2013 at 8:15 AM, Ambrose Bonnaire-Sergeant wrote: > I'll bet La

Re: IDE feature

2013-08-09 Thread Laurent PETIT
Le vendredi 9 août 2013, Sean Corfield a écrit : > Ah, yes... it turns this ( | represents the cursor ): > > (f a b (g c d |e f)) > > into this: > > (g c d (f a b e f)) > > I find I use it most often when moving `let` forms around, but also > for other constructs occasionally. Sorry, maybe it's

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Marcus Blankenship
No good deed goes unpunished, so here's my error *after* upgrading… Error occurred during initialization of VM java/lang/ClassNotFoundException: error in opening JAR file /Users/marcus/.lein/self-installs/leiningen-2.3.0-standalone.jar Any ideas? On Aug 8, 2013, at 8:28 PM, Phil Hagelberg wro

Commercial Users of Functional Programming (Sep 22-24, Boston): Call for Participation

2013-08-09 Thread Michael Sperber
Functional programming has been at the forefront of a new generation of programming technologies: Companies employing functional programming use it to enable more effective, robust, and flexible software development. The annual CUFP workshop is designed to serve the growing community of commercia

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Tim Visher
`lein upgrade` Just Worked™ for me. On Fri, Aug 9, 2013 at 11:48 AM, Marcus Blankenship wrote: > No good deed goes unpunished, so here's my error *after* upgrading… > > Error occurred during initialization of VM > java/lang/ClassNotFoundException: error in opening JAR file > /Users/marcus/.lein/

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Marcus Blankenship
Lucky… On Aug 9, 2013, at 9:06 AM, Tim Visher wrote: > `lein upgrade` Just Worked™ for me. > > On Fri, Aug 9, 2013 at 11:48 AM, Marcus Blankenship > wrote: >> No good deed goes unpunished, so here's my error *after* upgrading… >> >> Error occurred during initialization of VM >> java/lang/Clas

Re: IDE feature

2013-08-09 Thread Sean Corfield
Suppose I start out writing this: (if some-expr (let [x (something y)] (process x)) (deal-with ...)) and I get to the ... and realize I need x in that expression as well. I just place my cursor before (process x) and do M-x conv RET and I get this code: (let [x (something y)] (if some-

Re: Interest in a commercial IDE for Clojure?

2013-08-09 Thread Francesco Bellomi
Hi Colin, I'm a long time IntelliJ user and I would gladly pay for a serious Clojure plugin. Francesco On Saturday, July 27, 2013 1:54:58 PM UTC+2, Colin Fleming wrote: > > Hi all, > > I was planning to wait a little longer before going public, but since it's > pretty relevant to the other Int

[ANN] Compliment - a completion library you deserve

2013-08-09 Thread Alexander Yakushev
Dear community, I've just released the initial version of my clojure-complete fork, Compliment. I decided to move it into a separate project after I rewrote most of it. Here is project's link: https://github.com/alexander-yakushev/compliment . There is a rationale in README, where I explain wh

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread icamts
Hi Jace, this is my first answer in this group. Maybe I'm at the same point you are, except my background is in Java, so I just want to share what I understood in the hope to expand your question for the comunity. I found myself to use a lot of code generation in Java to have the glue among com

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Andrew Stine
The difficulty with On Lisp when applied to Clojure is that the specific macros On Lisp demonstrates either depend on state, which Clojure avoids, or are already present in Clojure core. (if-let is a big one in my book.) Some of them also run into conflicts with Clojure implicit gensyming. I do

Re: [ANN] Compliment - a completion library you deserve

2013-08-09 Thread Andrew Stine
Looks *very* cool. I like the drop-down list in ac-nrepl-compliment. On Friday, August 9, 2013 12:19:40 PM UTC-4, Alexander Yakushev wrote: > > Dear community, > > I've just released the initial version of my clojure-complete fork, > Compliment. I decided to move it into a separate project after

structure-related support for editing code as text

2013-08-09 Thread Lee Spector
The recent discussion of paredit reminded me that some Lisp editors have simple features that let you deal with code structurally, in a sense, while also editing it as text and using fairly standard GUI gestures. I haven't seen these yet in the Clojure world. One that I've found helpful is t

Re: [ANN] Compliment - a completion library you deserve

2013-08-09 Thread Ravindra Jaju
Indeed! Seems to be pretty cool! Thanks for the compliments! :) Best, jaju On Fri, Aug 9, 2013 at 10:38 PM, Andrew Stine wrote: > Looks *very* cool. I like the drop-down list in ac-nrepl-compliment. > > > On Friday, August 9, 2013 12:19:40 PM UTC-4, Alexander Yakushev wrote: >> >> Dear communi

Re: Debugging a custom reader literal for a sorted-map

2013-08-09 Thread David James
Should I file a bug report at this point? (Correcting the email title.) On Fri, Aug 9, 2013 at 3:04 AM, Jozef Wagner wrote: > This ticket may be related, http://dev.clojure.org/jira/browse/CLJ-1093 > > > On Friday, August 9, 2013 12:08:06 AM UTC+2, Jozef Wagner wrote: >> >> It may be a bug somew

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Phil Hagelberg
Hey everyone; sorry for the chaos around this release. The upload process is now fully automated[1] to reduce manual error, and I'm going to make sure a few other people have access to the S3 bucket so if something like this happens again it can be fixed when I'm not around. There's been one bu

[ANN] Clojure Cheatsheet for Emacs

2013-08-09 Thread Kris Jenkins
Hi, I find the Clojure Cheatsheet really useful, but since I often need at those times I don't have wifi, I've packaged it up into an Emacs plugin: In the hope that someone else finds

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-09 Thread Simone Mosciatti
Thank you so much... Actually was kinda funny, I typed something like "clojure cheatsheet offline" and your github link was one of the first, and I was very surprised... "Wow, it is possible that I didn't know of it ?" Well now I understand why I didn't know of it yet, it is only few hours old

Re: Negation in core.logic

2013-08-09 Thread Alex Dowad
Sorry to post on an old thread, but just in case someone comes here from Google: I'm just playing with core.logic, and I think I found a way to negate a goal... I don't know if this is advisable or not, but it seems to work: (== 0 (count (run* [arg] (goal arg -- -- You received this mess

Re: Negation in core.logic

2013-08-09 Thread David Nolen
I've since added an experimental Prolog style negation as failure constraint `nafc`. On Fri, Aug 9, 2013 at 5:19 PM, Alex Dowad wrote: > Sorry to post on an old thread, but just in case someone comes here from > Google: > > I'm just playing with core.logic, and I think I found a way to negate a

Re: [Proposal] Simplified 'ns' declaration

2013-08-09 Thread ngieschen
Now that refer is part of require, I don't think the existing syntax is too hard for new comers. The only thing I would suggest is adding the ability to :rename to require. That is, now that :refer is in require, require can handle anything except :rename and :exclude. I'm not concerned with :e

Re: [ANN] Clojure Cheatsheet for Emacs

2013-08-09 Thread Andy Fingerhut
Very nice, Kris! In case anyone wants to use the Clojure cheatsheet offline using a web browser, in a form similar to the on-line one that includes the tooltips, there is a git command documented at the link below to create a full local copy of it on your computer: http://jafingerhut.github.i

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-09 Thread Laurent PETIT
Hello Kovas, I had the chance to quickly play a little bit with the widget as integrated into nightcode, and it's already really enjoyable ! I think that it would indeed be fair to have a way to put it off. As a reminder, find below the possibilities of switching it off, as currently offereded b

Re: Negation in core.logic

2013-08-09 Thread Norman Richards
On Fri, Aug 9, 2013 at 4:19 PM, Alex Dowad wrote: > > (== 0 (count (run* [arg] (goal arg > What this is actually doing (run* [q] ;;... some stuff -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojur

Re: Negation in core.logic

2013-08-09 Thread Norman Richards
Sorry - gmail spasm What I was trying to say is that what I think your code is doing is running a Clojure expression once and unifying with 0. It's equivalent to precomputing that outside of the run*: (let [result (count (run* [arg] (goal arg))] (run* [q] ;; whatever-else-you-were doi

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Jace Bennett
Thanks everyone. Good stuff. I have Let over Lambda, but I didn't glean what I wanted from it (or probably even what it wanted from me). I'll pick up On Lisp. I didn't realize it was focused on macros. Also, I think Luca has given me a clue. I used code gen techniques long before I started using

Re: [Proposal] Simplified 'ns' declaration

2013-08-09 Thread Mark Derricutt
How does gen-class etc. fit into this new (ns) world? On 6/08/2013, at 4:28 AM, Greg wrote: > I haven't put enough thought into this as I could, but this seems good enough > already to kick the ball rolling. > > If the above syntax can't be made to support the old school syntax as well, > an

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-09 Thread kovas boguta
Hi Laurent, Thanks for the ideas; I'll think about how to implement them with a sensible API. I have one question which you might have some expertise on: How does eclipse / CCW deal with the alt/option key on the Mac? The issue is that option+key on mac is generally intercepted and turned into

Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata

2013-08-09 Thread Marcus Magnusson
I remember this talk to be very informative, I'm sure you'll find it useful: http://www.infoq.com/presentations/Clojure-Namespaces-Vars-Symbols Den lördagen den 10:e augusti 2013 kl. 00:21:02 UTC+2 skrev Jace Bennett: > > Out of curiousity, where do the defs go? Could one iterate over all the > v

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread John Jacobsen
Hi Phil, all, I'm still seeing the error which (I think) others have been reporting here: vagrant@precise32:/tmp$ lein upgrade Downloading Leiningen to /home/vagrant/.lein/self-installs/leiningen-2.3.0-standalone.jar now... /home/vagrant/bin/lein: line 57: /home/vagrant/.lein/self-installs/lei

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Phil Hagelberg
On Friday, August 9, 2013 6:32:06 PM UTC-7, John Jacobsen wrote: > please advise? Thanks! Hm; looks like self-install is getting invoked too soon. Not sure why it was working for me earlier. Try setting `export HTTP_CLIENT="wget -O"` for now. -Phil -- -- You received this message because yo

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread John Jacobsen
That worked for now, thanks! On Friday, August 9, 2013 10:58:30 PM UTC-5, Phil Hagelberg wrote: > > On Friday, August 9, 2013 6:32:06 PM UTC-7, John Jacobsen wrote: > > please advise? Thanks! > > Hm; looks like self-install is getting invoked too soon. Not sure why it > was working for me earl

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Sean Corfield
Yup, this killed my whole team for half a day today since I'd pushed the 2.3.0 script to our repo after the upgrade worked for me, and then hit the road for So. Cal. and everyone else then had a broken build for the rest of the day because the upgrade process broke due to this 403 forbidden issue a

Re: Negation in core.logic

2013-08-09 Thread Alex
Hi, Norman Richards, In the example, "arg" and "goal" were not literal but were meant to be replaced with something appropriate to whatever you are trying to do. Yes, unless you use a projected value, it is equivalent to precomputing it outside the run*. The point was that, although very hacky, th

Re: [ANN] Leiningen 2.3.0 released

2013-08-09 Thread Michael Klishin
2013/8/10 Sean Corfield > Perhaps put Leiningen JARs on Clojars instead of this flaky custom > location? I personally think there should be a fallback location for the jar that does not use SSL. I'd be happy to host one if needed. -- MK http://github.com/michaelklishin http://twitter.com/mich