#clojure logs

2008-08-16

03:27parth_m_Hi Rich.
03:27parth_m_I posted a cleaned up (version) API here. Does that look ok to you? Any suggestions.
03:28parth_m_http://groups.google.com/group/clojure/msg/453b10cc286fb1c8
03:38rhickey_parth_m_: I think your method is probably fine, but am still lukewarm to the concept, as per Chouser's comments
03:40parth_m_Do you have any particular versioning scheme in mind?
03:42rhickey_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
03:45parth_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
03:45parth_m_Tagging sounds like a good idea.
03:45parth_m_Perhaps major/minor version can be pulled into the build based on tags.
03:45parth_m_Of course all this works assuming ant and subversion.
03:46rhickey_parth_m_: well, the releases are there for first-timers. I wouldn't jar up each revision in any case
03:47parth_m_Thats true. Having the rev number in is just nice to have for people using clojure via source control.
03:50rhickey_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
03:52parth_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.
03:52parth_m_Question. Do you have an official build system in mind? Ant or Maven?
03:54rhickey_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
03:54rhickey_I build with ant
03:56parth_m_Oh. I get it.
03:56rhickey_people pulling head with SVN can just do svn info to see what they've got
03:58parth_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.
04:05parth_m_We could put it on hold for now if you prefer.
04:07rhickey_parth_m_: yes, I think what you've done so far is along the right line when/if I decide to incorporate it
04:08parth_m_Sounds fine. Thanks for Clojure by the way :)
04:09rhickey_You're welcome! Thanks for the additions to the Wiki - it needs some love
04:09parth_m_:)
04:10parth_m_Well. I am off for dinner. Bye.
04:11rhickey_bye
10:21arohnerI have a question about lib.clj. should (use) be transitive?
10:21arohnerin file A I have (use 'clojure.contrib.sql), and then define some other methods
10:21arohnerin file B I have (require 'fileA)
10:22arohnerin 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:22arohneri.e. A/execute-prepared-statement
10:24arohnerit 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:26ChouserI think it's inheriting that behavior from the builtin "refer"
10:31ChouserI know that doesn't really answer your question, but that's about all I know.
10:47arohnerthanks anyways
12:05rhickey_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:05arohneris there a way to accomplish that?
12:05arohnerif for example, I want file A to be a wrapper around clojure.contrib.foo?
12:05rhickey_no
12:06arohnerand that's because you want namespaces to be a compile time lookup?
12:08rhickey_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:09arohnerok
12:09arohnerworse comes to worse, I can automatically generate a wrapper
12:10arohnerlook up all the symbols in the ns, create functions in my namespace that call the imported functions
12:10rhickey_why/
12:10rhickey_?
12:10arohnerjust for abstraction
12:12rhickey_well, you wonlt need to create functions, just (def myfn 'hidden-fn)
12:12arohnerah, even better
12:12arohnerso for example in clojure.contrib.sql, I've wanted to create extra functions that are similar in spirit
12:13arohnerso it feels weird to have clojure.contrib.sql/foo and mycode.sql/bar
12:13arohnerwhen what I really want is sql/foo, sql/bar
12:17rhickey_oops (def myfn #'hidden-fn), will track changes that way
12:24arohneris there a way to undef a symbol in the repl?
12:25arohnerfor dev purposes
12:27rhickey_arohner: ns-unmap
12:28arohnerthanks