#clojure log - Aug 16 2008

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

3:27 parth_m_: Hi Rich.

3:27 I posted a cleaned up (version) API here. Does that look ok to you? Any suggestions.

3:28 http://groups.google.com/group/clojure/msg/453b10cc286fb1c8

3:38 rhickey_: parth_m_: I think your method is probably fine, but am still lukewarm to the concept, as per Chouser's comments

3:40 parth_m_: Do you have any particular versioning scheme in mind?

3:42 rhickey_: I date releases and use SVN - people can pull SVN at any particular rev. That seems enough for me - any 'versioning' of SVN seems perilous as you can selectively pull down bits. I will look into tagging releases in SVN or at least documenting the SVN rev that corresponds to a release

3:45 parth_m_: I was thinking that eventually an end user would probably want to just pick up a jar file (I know thats what I did the first time). Plus this can be a good debugging aid so that novice users can also help our. But I have pretty much summarized my thoughts here: http://groups.google.com/group/clojure/msg/943599230914f1b0

3:45 Tagging sounds like a good idea.

3:45 Perhaps major/minor version can be pulled into the build based on tags.

3:45 Of course all this works assuming ant and subversion.

3:46 rhickey_: parth_m_: well, the releases are there for first-timers. I wouldn't jar up each revision in any case

3:47 parth_m_: Thats true. Having the rev number in is just nice to have for people using clojure via source control.

3:50 rhickey_: parth_m_: if using source control, there are all the SVN facilities. For instance, I may fix something in one file but not recommend pulling all of head - what rev is that file set? None really. Each file has a rev level and accessible history

3:52 parth_m_: I think subversion uses changesets so the rev number is given to the entire repository, even for a single file change ... thats one thing I like about svn.

3:52 Question. Do you have an official build system in mind? Ant or Maven?

3:54 rhickey_: parth_m_: the scenario I was describing was this - I've changed 3 files at overlapping times/changesets, one of which fixes your problem and the other 2 are currently broken/incompatible, so I recommend that you take just the latest version of the file containing your fix. Your resulting fileset no longer represents a point-in-time of the repository

3:54 I build with ant

3:56 parth_m_: Oh. I get it.

3:56 rhickey_: people pulling head with SVN can just do svn info to see what they've got

3:58 parth_m_: Thats true. I just think its pretty convenient to put everything together for easy query. Plus it allows to check things programatically. But you need to take a call based on the overall value to the project.

4:05 We could put it on hold for now if you prefer.

4:07 rhickey_: parth_m_: yes, I think what you've done so far is along the right line when/if I decide to incorporate it

4:08 parth_m_: Sounds fine. Thanks for Clojure by the way :)

4:09 rhickey_: You're welcome! Thanks for the additions to the Wiki - it needs some love

4:09 parth_m_: :)

4:10 Well. I am off for dinner. Bye.

4:11 rhickey_: bye

10:21 arohner: I have a question about lib.clj. should (use) be transitive?

10:21 in file A I have (use 'clojure.contrib.sql), and then define some other methods

10:21 in file B I have (require 'fileA)

10:22 in B, I can refer to methods in A's namespace, but I can't refer to the clojure contrib methods that A imported, using A's namespace

10:22 i.e. A/execute-prepared-statement

10:24 it seems strange to me that in A I said 'take all of the functions, and put them in my namespace', but that's only true inside A

10:26 Chouser: I think it's inheriting that behavior from the builtin "refer"

10:31 I know that doesn't really answer your question, but that's about all I know.

10:47 arohner: thanks anyways

12:05 rhickey_: arohner: no, it's not transitive, because refer doesn't put names in your namespace, rather it makes them available to code in your namespace

12:05 arohner: is there a way to accomplish that?

12:05 if for example, I want file A to be a wrapper around clojure.contrib.foo?

12:05 rhickey_: no

12:06 arohner: and that's because you want namespaces to be a compile time lookup?

12:08 rhickey_: it's really about what being a namespace means. For Clojure, I've chosen a simple meaning. It's very much like importing packages/namespaces in Java/C# - such imports are only for the implementation's use, not creating composite namespaces

12:09 arohner: ok

12:09 worse comes to worse, I can automatically generate a wrapper

12:10 look up all the symbols in the ns, create functions in my namespace that call the imported functions

12:10 rhickey_: why/

12:10 ?

12:10 arohner: just for abstraction

12:12 rhickey_: well, you wonlt need to create functions, just (def myfn 'hidden-fn)

12:12 arohner: ah, even better

12:12 so for example in clojure.contrib.sql, I've wanted to create extra functions that are similar in spirit

12:13 so it feels weird to have clojure.contrib.sql/foo and mycode.sql/bar

12:13 when what I really want is sql/foo, sql/bar

12:17 rhickey_: oops (def myfn #'hidden-fn), will track changes that way

12:24 arohner: is there a way to undef a symbol in the repl?

12:25 for dev purposes

12:27 rhickey_: arohner: ns-unmap

12:28 arohner: thanks

Logging service provided by n01se.net