Re: clojure.contrib.repl-utils/source: getting "source not found"
Hi Sigrid, Was clojure-contrib compiled with a relevant "-Dclojure.jar=" option? For example, ant -Dclojure.jar=/path/to/clojure.jar For what it's worth, I startup a Clojure REPL with: java -cp c:\dl\clojure\clojure.jar;c:\dl\clojure-contrib\clojure- contrib.jar;. clojure.lang.Repl And I was able to run: user=> (use 'clojure.contrib.repl-utils) nil user=> (source map) (defn map "Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments." ([f coll] (lazy-seq (when-let [s (seq coll)] (cons (f (first s)) (map f (rest s)) ([f c1 c2] (lazy-seq (let [s1 (seq c1) s2 (seq c2)] (when (and s1 s2) (cons (f (first s1) (first s2)) (map f (rest s1) (rest s2))) ([f c1 c2 c3] (lazy-seq (let [s1 (seq c1) s2 (seq c2) s3 (seq c3)] (when (and s1 s2 s3) (cons (f (first s1) (first s2) (first s3)) (map f (rest s1) (rest s2) (rest s3))) ([f c1 c2 c3 & colls] (let [step (fn step [cs] (lazy-seq (let [ss (map seq cs)] (when (every? identity ss) (cons (map first ss) (step (map rest ss)))] (map #(apply f %) (step (conj colls c3 c2 c1)) nil Kev On Apr 25, 4:41 pm, Sigrid wrote: > Hi, > > I'm just starting with clojure, and I cannot get to use the > clojure.contrib.repl-utils/source function: > > user=> (use 'clojure.contrib.repl-utils) > nil > user=> (source map) > Source not found > nil > > I have the clojure-sources.jar in my classpath: > > alias repl='java -cp /Users/hunli/Library/clojure/clojure.jar:/Users/ > hunli/Library/clojure/clojure-contrib.jar:/Users/hunli/Library/clojure/ > clojure-sources.jar clojure.lang.Repl' > > Does anyone have an idea what I'm doing wrong? > > thanks a lot for any help > Sigrid --~--~-~--~~~---~--~~ 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 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: Abstract data types in functional languages
It's worth considering how *nested* accessors would work in the context of immutability. The nested maps approach works really nicely, due in part to functions like assoc-in: ; From Mark Volkmann's tutorial (assoc-in person [:employer :address :city] "Clayton") What would the above update look like if 'address' was accessed using functions like get-address and set-address? Functions like assoc-in clearly rely on a uniform way of getting/ setting fields (i.e. maps). My *hunch* is that the right avenue is to extend/implement clojure's map classes if injecting behaviour is ever necessary. (A standard/ supported way to do this would be nice.) I'd be happy using constructor functions like (make-complex-number) and (make-person) which can hide detail of their implementations, but I'd also like to benefit from all that goes with the idiomatic use of maps. (My 2c) --~--~-~--~~~---~--~~ 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 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: Google announcement, version 1.0 & SCM Holy War (not really)
On 24 Apr., 20:24, Sean Devlin wrote: > There recently was a ton of traffic about SCM in the "Path to 1.0" > thread. Google made the following announcement: > > http://google-code-updates.blogspot.com/2009/04/mercurial-support-for... > > Does this make changing the SCM tool to Hg a real possibility? While > this might not be such a big deal for Clojure core, I would *LOVE* an > easy way to fork contrib, and I bet I'm not the only one. > > Can this be part of the 1.0 push? Oh very nice. It could be a very nice descision to switch to Mercurial. It is an easy upgrade for SVN, as some knowledge can be reused. Good for Rich. Also it offers all major features and is one of the easiest systems out there. We recently switched away from Git to Hg for more simplicity and don't regret it. And btw, NetBeans ships directly with support for Hg. --~--~-~--~~~---~--~~ 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 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: clojure.contrib.repl-utils/source: getting "source not found"
Hi Kevin, thanks for your answer! Unfortunately, it doesn't work yet. > Was clojure-contrib compiled with a relevant "-Dclojure.jar=" > option? For example, > ant -Dclojure.jar=/path/to/clojure.jar As I didn't remember, I recompiled it now like this, and still it doesn't work... > For what it's worth, I startup a Clojure REPL with: > java -cp c:\dl\clojure\clojure.jar;c:\dl\clojure-contrib\clojure- > contrib.jar;. clojure.lang.Repl The only difference here I saw to mine (I removed the clojure- sources.jar again now, as it works for you without) was having the current path on the classpath - and although I can't imagine this could be related, I tried this too, but it didn't change anything. I wonder what I'm doing wrong... Thanks anyway, Sigrid --~--~-~--~~~---~--~~ 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 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: PeepCode screencast
Phil Hagelberg wrote: > I'm proud to announce that the "Functional Programming with Clojure" > PeepCode screencast has just been published: Wow! This is awesome. I bought it right-away! Thanks. Regards, BG -- Baishampayan Ghose --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Testing a character with a Unicode range
Let's say I want to test if a Unicode character is within a certain range, #x0-#x1F. What can I do? (defn char-in-range? [minimum maximum testee] ???) (def x \3) (char-in-range? \u \u001F x) ; false --~--~-~--~~~---~--~~ 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 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: clojure.contrib.repl-utils/source: getting "source not found"
On Sat, Apr 25, 2009 at 7:13 PM, Sigrid wrote: > > Hi Kevin, > > thanks for your answer! Unfortunately, it doesn't work yet. > >> Was clojure-contrib compiled with a relevant "-Dclojure.jar=" >> option? For example, >> ant -Dclojure.jar=/path/to/clojure.jar > > As I didn't remember, I recompiled it now like this, and still it > doesn't work... I think we'll need more information in order to help you. Did you start with "ant clean" in both the clojure and clojure-contrib working copies and did you build clojure first? :) What revisions of clojure and clojure-contrib are you using? What is the output when you run "ant -Dclojure.jar=/path/to/clojure.jar" in order to build clojure-contrib? -- Michael Wood --~--~-~--~~~---~--~~ 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 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: Testing a character with a Unicode range
(defn char-in-range? [minimum maximum testee] (let [int-testee (int testee)] (and (>= int-testee (int minimum)) (<= int-testee (int maximum) On Apr 25, 12:47 pm, samppi wrote: > Let's say I want to test if a Unicode character is within a certain > range, #x0-#x1F. What can I do? > > (defn char-in-range? [minimum maximum testee] > ???) > > (def x \3) > > (char-in-range? \u \u001F x) ; false --~--~-~--~~~---~--~~ 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 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: Google announcement, version 1.0 & SCM Holy War (not really)
> Git even works relatively well on Windows (I've used it lightly and not > encountered a bug yet). The last time I tried, it did not (few months back) compared to mercurial. Personally I prefer mercurial to git, but did not use either for too advanced stuff yet... Kind regards, Vlad --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
How do you "boot-strap" clojure from java?
Hello, Currently, I do the following (the clojure application is called "isi"): 1. set-up a java netbeans project (called isi) with main class 2. add the clojure.jar (and other libraries) to the project 3. in the main class: package isi; /** * loads the clojure script */ public class Main { public static final String[] script = {"@/app/isi.clj"}; /** * @param args the command line arguments */ public static void main(String[] args) throws java.lang.Exception { clojure.main.main(script); } } The isi.clj (the clojure application) lives in "java" package called "app" (under src directory). When the project is run, the main class loads the isi.clj script. This also works when project .jar is build and works as expected (and the isi.clj clojure script gets stored in the source form). What do you do? Kind regards, Vlad PS: Not that there is a problem (so far) with the above approach, but I would like to know what other possibilities exist... --~--~-~--~~~---~--~~ 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 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: clojure.contrib.repl-utils/source: getting "source not found"
Hi, Did you update to the newest versions of clojure and clojure-contrib? I think the way source filenames are stored in metadata changed recently, and "source" was temporarily broken by this change. Cheers, Jason On Apr 24, 11:41 pm, Sigrid wrote: > Hi, > > I'm just starting with clojure, and I cannot get to use the > clojure.contrib.repl-utils/source function: > > user=> (use 'clojure.contrib.repl-utils) > nil > user=> (source map) > Source not found > nil > > I have the clojure-sources.jar in my classpath: > > alias repl='java -cp /Users/hunli/Library/clojure/clojure.jar:/Users/ > hunli/Library/clojure/clojure-contrib.jar:/Users/hunli/Library/clojure/ > clojure-sources.jar clojure.lang.Repl' > > Does anyone have an idea what I'm doing wrong? > > thanks a lot for any help > Sigrid --~--~-~--~~~---~--~~ 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 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: Testing a character with a Unicode range
Wonderful; thank you! On Apr 25, 10:57 am, billh04 wrote: > (defn char-in-range? [minimum maximum testee] > (let [int-testee (int testee)] > (and (>= int-testee (int minimum)) (<= int-testee (int maximum) > > On Apr 25, 12:47 pm, samppi wrote: > > > Let's say I want to test if a Unicode character is within a certain > > range, #x0-#x1F. What can I do? > > > (defn char-in-range? [minimum maximum testee] > > ???) > > > (def x \3) > > > (char-in-range? \u \u001F x) ; false --~--~-~--~~~---~--~~ 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 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: How do you "boot-strap" clojure from java?
I've got a related question: how do you embed Clojure into an existing application? If I'd like to provide a clojure console in an application how do I do the following things: 1. Start a REPL - I guess that this can just be done with clojure.main.main(String...) 2. Redirect STDIN/OUT/ERR so that I can hook the REPL up to, say, a JTextPane. 3. Set up variables for the console to use? Ideally I'd like to do something like the following (not real code): Clojure clojure = new Clojure(); clojure.setIn(myReader); clojure.setOut(myWriter); clojure.set("*domain-object-1*", myDomainObject); clojure.set("*domain-object-2*", myOtherDomainObject); to let the user interact with the REPL. Anyone have examples of something like 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 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: possibly interesting ui 'framework'
Raoul Duke wrote: > http://alarmingdevelopment.org/?p=217 > > seems like it would be an interesting fit with Clojure. > > sincerely. > > So, I looked at it... it doesn't seem to be a UI framework as in a framework for creating UIs. Its more to do with an programming editor which helps write logically convolved code better (actually a great talk...). I would love to see an editor like _that_ for clojure :) Pinocchio --~--~-~--~~~---~--~~ 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 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: Testing a character with a Unicode range
A shorter version: (defn char-in-range? [minimum maximum testee] (<= (int minimum) (int testee) (int maximum))) On Apr 25, 1:52 pm, samppi wrote: > Wonderful; thank you! > > On Apr 25, 10:57 am, billh04 wrote: > > > (defn char-in-range? [minimum maximum testee] > > (let [int-testee (int testee)] > > (and (>= int-testee (int minimum)) (<= int-testee (int maximum) > > > On Apr 25, 12:47 pm, samppi wrote: > > > > Let's say I want to test if a Unicode character is within a certain > > > range, #x0-#x1F. What can I do? > > > > (defn char-in-range? [minimum maximum testee] > > > ???) > > > > (def x \3) > > > > (char-in-range? \u \u001F x) ; false --~--~-~--~~~---~--~~ 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 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: possibly interesting ui 'framework'
Hello Pinocchio, > So, I looked at it... it doesn't seem to be a UI framework as in a > framework for creating UIs. Its more to do with an programming editor > which helps write logically convolved code better (actually a great > talk...). I look at is as a "transactional change propagation" framework and to some extent, it is automatically parallel. It is also a different model of computation (if I understood correctly) by using trees. The talk was definitely worth reading... Kind regards, Vlad --~--~-~--~~~---~--~~ 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 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: priority queue: some results
new operations available for heap: http://code.google.com/p/jc-pheap/source/list changeVal < any value inside the heap, not just the min. honor system. if you didn't put a value in, don't lie and changes its value. runtime varies from O(1) to O(logn). code has explanation. was ambitious and went for 'changeVal()' so values can go *up*, *in addition* to decreasing. lazyDelete < tries to put off work by usually being O(1). also relies on honor system. notes available on when amortization breaks down in functional setting eagerDelete < tries to do as much garbage collection as possible, so is always at least O(logn). More if lazy stuff has bubbled to top of heap. On Thu, Apr 23, 2009 at 8:19 PM, e wrote: > "meld" results look good (unless I made a mistake somewhere). > > I merged two collections, each with 2 million unique elements. did union > of sorted sets, then did meld with my heap implementation: > > > performing union of two sorted sets > "Elapsed time: 18881.81 msecs" > - > making another heap > performing meld of two heaps > "Elapsed time: 0.146 msecs" > > > checking in latest version of test. > > > On Tue, Apr 21, 2009 at 2:10 AM, e wrote: > >> I've done a little comparing to sorted-set as recommended. The following >> test (in case there is anything bogus about it) is checked in with the java >> project: >> http://code.google.com/p/jc-pheap/source/browse/trunk/jc-pheap/src/persistent_heap/testing/test.clj?spec=svn8&r=8 >> >> deduping 2,000,000 nums >> shuffling 1999019 nums >> = >> inserting into sorted set >> "Elapsed time: 39375.887 msecs" >> >> popping from front of sorted set >> "Elapsed time: 15189.0 msecs" >> = >> heap insert >> "Elapsed time: 15101.546 msecs" >> -- >> heap pop >> "Elapsed time: 59715.796 msecs" >> = >> >> What I am finding consistently (again, unless the test is bogus) is pretty >> much expected. *Overall* the excellently implemented sorted-set outperforms >> the heap I'm working on if you add the all the "insert" times to all the the >> "pop-front" times. >> >> That said, if you want fast inserts, and you're not even sure yet if >> people want all the elements in sorted order, the heap has advantages ... >> especially if you're not even planning on referencing elements in the middle >> of the list (something I do hope to support in some fashion eventually, >> note). It may also be the case that some smart java/algorithm people could >> find opportunities to speed up my deleteMin().* >> >> a note on deduping:* >> >> One difference that doesn't seem to matter performance-wise much is that >> sorted-set elements are unique. I'm not sure if clojure currently has a >> data structure (other than considering the heap) that works like a sorted >> multimap or sorted multiset. Would it be the same to sort a vector in >> between inserts? That doesn't sound fast, but maybe I should have done that >> test, too. >> >> So, anyway, for this test, I inserted unique elements into both structures >> so one wouldn't have way more than the other when comparing things like >> popping. I also sampled from a wide range of numbers, so I probably didn't >> have to go to such lengths, as it turns out. >> >> >> > --~--~-~--~~~---~--~~ 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 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: How do you "boot-strap" clojure from java?
Hi Vlad, Are you aware you can compile Clojure code directly into Java class files? - James On Apr 25, 7:10 pm, prhlava wrote: > Hello, > > Currently, I do the following (the clojure application is called > "isi"): > > 1. set-up a java netbeans project (called isi) with main class > 2. add the clojure.jar (and other libraries) to the project > 3. in the main class: > > package isi; > > /** > * loads the clojure script > */ > public class Main { > public static final String[] script = {"@/app/isi.clj"}; > > /** > * @param args the command line arguments > */ > public static void main(String[] args) throws java.lang.Exception > { > clojure.main.main(script); > } > > } > > The isi.clj (the clojure application) lives in "java" package called > "app" (under src directory). > > When the project is run, the main class loads the isi.clj script. This > also works when project .jar is build and works as expected (and the > isi.clj clojure script gets stored in the source form). > > What do you do? > > Kind regards, > > Vlad > > PS: Not that there is a problem (so far) with the above approach, but > I would like to know what other possibilities exist... --~--~-~--~~~---~--~~ 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 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: PeepCode screencast
Just to provide a review - I must say, I really wanted to like this screencast, and failed, unfortunately. It tries to cover everything from "what is functional programming?" (tracing through passing functional arguments, and basic map/reduce stuff, for example) to the intricacies of STM use and clojure syntax/semantics. While all of these are worthwhile talks, trying to cover all of them in an hour means flying through them and really barely getting into any of them. On Fri, Apr 24, 2009 at 1:03 PM, Phil Hagelberg wrote: > > I'm proud to announce that the "Functional Programming with Clojure" > PeepCode screencast has just been published: > > http://peepcode.com/products/functional-programming-with-clojure > > It's a professionally-produced 65-minute video that introduces all the > foundational concepts of Clojure by stepping through the creation of a > multiplayer text adventure game. If you've been looking for a quick > way to get up to speed on Clojure, this is your ticket. > > The screencast is sold for $9, and there's a preview available: > > http://peepcode.com/system/uploads/2009/peepcode-clojure-preview.mov > > Hope you like it! > > -Phil Hagelberg > > http://technomancy.us > > > > --~--~-~--~~~---~--~~ 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 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: Google announcement, version 1.0 & SCM Holy War (not really)
On Sat, Apr 25, 2009 at 1:59 PM, prhlava wrote: > > > > Git even works relatively well on Windows (I've used it lightly and not > encountered a bug yet). > > The last time I tried, it did not (few months back) compared to > mercurial. > Which version did you try? msysgit works very well. --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
xg-model-gf 1,0
A convenient packaging of the xg-model-gf library is available now at http://explorersguild.googlecode.com/files/xg-model-gf.zip xg-model-gf provides a simple record scheme ("model") and an implementation of CLOS-flavored generic functions for those of us who prefer that style of polymorphism. model and gf are completely independent of one another, but can be usefully combined; a gf domain that implements dispatching on models is included. Briefly, model provides a means of defining the keys that may be expected on a set of Map objects, and a function for creating Map objects that match the specifications defined by a model. You can optionally restrict the keys allowed in instances of a model, or the objects that may be used as keys or values. You can optionally derive models from previously- existing models, and combine two or more models to yield a new one (provided they can be combined without violating their respective restrictions). gf implements CLOS-style generic functions plus user-definable dispatch. A parameter called a gf domain defines the dispatch algorithm used by generic functions. Example domains are supplied, including one that dispatches on Java classes and the global Clojure derive hierarchy, one that implements a simple form of predicate dispatch with user-defined implication, and one that implements dispatch on xg models. This version fixes several bugs in earlier versions, but the code is young and you should not expect it to be bug-free; bug reports are gladly received. It adds a domain that considers the global Clojure derive hierarchy in its dispatching, and a README that may make it easier to use model and gf. Besides that, the chief reason for this release is to make it easy for those who are interested in it to get it: it's now packaged as a zip archive, and is a featured download at http://code.google.com/p/explorersguild/ --~--~-~--~~~---~--~~ 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 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: Google announcement, version 1.0 & SCM Holy War (not really)
On Apr 24, 4:27 pm, Stuart Sierra wrote: > On Apr 24, 5:16 pm, e wrote: > > > But let me understand ... when you do a commit, you haven't really > > done anything that "counts"? Loaded question, I know, but it seems like you > > have to do a commit, and then do a "send" or something, to actually share > > your changes. Is that right? > > Sort of. First you "git add", which puts changes in the "staging > area" of your local repository. Then you "git commit", which records > a commit, still in your local repository. Then you "git push" to copy > your commits to the remote repository (usually called "origin"). > > Everything counts, and nothing counts, since git allows you to delete > or undo almost anything, including commits in the remote repository. > That's actually one of the reasons Google gives for not supporting git > -- all that freedom makes it hard to re-implement git on top of their > infrastructure. > > -Stuart Sierra Yes, Git has superpowers. We're a Git shop, and I haven't used Hg at all, but after most of a year now using Git, it's a super powerful tool. We migrated from SVN and have no regrets whatsoever. I think the main consideration in choosing a SCM ought to be making Rich's job manageable. The model of Clojure development is a lot like Linux, with Rich as Linus. They both are the ultimate merge master, and managing branches and merging is what Git is all about. Linus wrote Git with this use case in mind. Hg and bzr probably have similar capabilities. But I can attest to how easy Git makes it to manage some amazingly tangled graphs. Hugh --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
SLIME/elisp hack to generate import lines
Hi all, I just thought I'd write to share a terrible (but maybe useful!) hack for SLIME. I've written some code that sniffs around the classpath to find libraries matching some regexp, then inserts the appropriate `import' sexps into the current buffer. For example: M-x clj-import [RET] IndexWriter [RET] inserts (for my classpath): (import '(org.apache.lucene.index IndexWriter IndexWriter $MaxFieldLength)) Yep, I'm *that* lazy. I've put the code here: http://dishevelled.net/Generating-Clojure-import-lines-using-SLIME.html Cheers, Mark --~--~-~--~~~---~--~~ 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 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: clojure.contrib.repl-utils/source: getting "source not found"
Hi Michael, hi Jason, thanks for your help! I have it running now - but as I tried two things at once, one of them being the svn update (or rather, a fresh checkout), I cannot say if I really had the broken svn version. I think my problem was that I used separate directories to update and compile clojure and clojure-contrib on the one hand, and for the compiled jars on the other hand. And I compiled clojure-contrib against the compiled-jar-only clojure.jar location. So if source would use this clojure.jar location (by stripping the .jar) to get at the sources under src/ or in the clojure-sources.jar it could of course not have found anything. I should have looked at the "source of source" to find out how it works I guess :-) Anyway my setup did not make much sense as it would have involved a jar-copying step after every update. Thanks again Sigrid On 25 Apr., 20:43, Jason Wolfe wrote: > Hi, > > Did you update to the newest versions of clojure and clojure-contrib? > I think the way source filenames are stored in metadata changed > recently, and "source" was temporarily broken by this change. > > Cheers, > Jason > > On Apr 24, 11:41 pm, Sigrid wrote: > > > Hi, > > > I'm just starting with clojure, and I cannot get to use the > > clojure.contrib.repl-utils/source function: > > > user=> (use 'clojure.contrib.repl-utils) > > nil > > user=> (source map) > > Source not found > > nil > > > I have the clojure-sources.jar in my classpath: > > > alias repl='java -cp /Users/hunli/Library/clojure/clojure.jar:/Users/ > > hunli/Library/clojure/clojure-contrib.jar:/Users/hunli/Library/clojure/ > > clojure-sources.jar clojure.lang.Repl' > > > Does anyone have an idea what I'm doing wrong? > > > thanks a lot for any help > > Sigrid --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---