Re: Leiningen capabilities (was Re: A newbie's summary - what worked, what didn't)
On Tue, 29 Mar 2011 16:49:48 -0700 (PDT) Phil Hagelberg p...@hagelb.org wrote: On Mar 28, 10:24 pm, Andy Fingerhut andy.finger...@gmail.com wrote: And I should have known about this before, but had not used it. It adds to Leiningen the capability to search, and I'm not sure, but perhaps also add dependencies that were found: https://github.com/Licenser/lein-search The part that modifies project.clj to insert new dependencies will probably not be merged because 0) abritrary code may be embedded in project.clj, so the :dependencies list is not necessarily a data structure you can just splice however you feel like and 1) it's basic text editing; asking Leiningen to do it for you is hardly more convenient than doing it yourself. It could be done in a 3rd-party plugin with caveats that it will not always work correctly though. Being able to type lein add library and have it take care of everything is a lot more convenient than typing lein search library, selecting the appropriate stretch of text, copying it to the clipboard (or not, if you're brave), switching to an editor, finding the right place to insert it, pasting the clipboard, then saving the file. This seems to be a downside to switching from XML to Clojure. Not that I think that was a bad idea - the upsides far outweigh this. Maybe project.clj should be automatically merged with a project.xml when lein runs, where project.xml is created with a for machine editing only - humans edit project.clj comment at the top. Then tasks could edit project.xml without running into those problems. mike -- Mike Meyer m...@mired.org http://www.mired.org/consulting.html Independent Software developer/SCM consultant, email for more information. O ascii ribbon campaign - stop html mail - www.asciiribbon.org -- 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 patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Leiningen capabilities (was Re: A newbie's summary - what worked, what didn't)
comments directed to me Fair enough. It would be great if Clojure tools were as mature as Java's Eclipse or IntelliJ, but hey, Java's been around for 15 years. Probably unrealistic to expect more. Perhaps we can look forward to tools created by you. On Mar 28, 10:32 pm, ultranewb pineapple.l...@yahoo.com wrote: This won't get you a corporate job though. I've been writing lisp code for 40 years and I can't find anyone willing to hire me for my lisp skills Tim Daly Elder of the Internet It's okay. I couldn't get hired as a C programmer for NASA years ago, and I had already written my own working C compiler! The idiot interviewer opened some huge C library reference manual to some random page, and asked me to recite whatever function he had the page opened to from memory. Of course I couldn't do that, and explained to him that this wasn't important, that any decent programmer would simply do what he was doing (open up the reference manual, look up the function, and be using that function within a minute). But of course idiots will be idiots. Either way, if you are in the USA (don't know if you are or aren't), these days corporations just hire Indians on H1-B visas, or they just outsource the work over to there. So you don't have a shot anyway. Jon Seltzer While I agree that clear steps should be provided to assist newcomers, I don't have sympathy for newcomers more interested in bashing other languages and people than in actually learning something. Note sure if this was directed at me or not, but the only language I've bashed is Java. I won't apologize for that, though, so if it offended you, tough ;-) I started learning clojure over a year ago and I don't recall any issues getting started. I fired up a REPL almost immediately. I've stated at the top that I could get REPLs without difficulty. Frankly, I'm a little annoyed by people who want to blame everyone else if something new is not immediately obvious to them. Don't know why you feel as if you or your tribe is being attacked. I'm not blaming anyone or anything, I created a thread on what worked, what didn't as a resource for 1) newbs interested in trying Clojure (I wish I had this resource from the get-go), and 2) as feedback for whatever Clojure people are out there who are making tools and IDEs or who are concerned with the newbie newcomer situation. As to #2, my thread already seemed to help the ClojureW guy make an improvement in a bug I found. If you aren't in group 1 or group 2, don't feel the need to hang out in this thread and feel so annoyed or attacked if you don't want. -- 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 patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Leiningen capabilities (was Re: A newbie's summary - what worked, what didn't)
Changing subject line for this one. On Mar 28, 2011, at 5:38 PM, Mike Meyer wrote: Consider this a features request for cake/leiningen: 1) A task to search clojars. 2) A task take a name from #1 and add the appropriate data to project.clj. 3) Extend the deps task to install libraries required by any dependency. I am not claiming that Leiningen does #1 or #2 already, but in case you were unaware, you can go to clojars.org, type something like hadoop in the search box at the upper right, and see a list of matching packages. Clicking on one of them gives me text I can copy and paste into a Leiningen project.clj file, or into a Maven pom.xml file. Here is the text shown for one version of hadoop-core that was shown when I searched for hadoop: [org.apache.hadoop/hadoop-core 0.20.2-dev] If I add that appropriately to a project.clj file created from making a new empty except for clojure core project with lein new name, save it, and type lein deps, it does do #3, i.e. adds hadoop-core and everything that it requires. They are all put into the lib directory in the project. This is with Leiningen 1.5.0, but that behavior has worked for several versions now. I believe it is implemented under the covers via Maven's dependency management. Have you tried lein deps and found that it failed to install libraries required by a dependency you had already added to your project.clj file? Andy -- 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 patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en