2008-08-16
| 03:27 | parth_m_ | Hi Rich. |
| 03:27 | parth_m_ | I posted a cleaned up (version) API here. Does that look ok to you? Any suggestions. |
| 03:28 | parth_m_ | http://groups.google.com/group/clojure/msg/453b10cc286fb1c8 |
| 03:38 | rhickey_ | parth_m_: I think your method is probably fine, but am still lukewarm to the concept, as per Chouser's comments |
| 03:40 | parth_m_ | Do you have any particular versioning scheme in mind? |
| 03: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 |
| 03: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 |
| 03:45 | parth_m_ | Tagging sounds like a good idea. |
| 03:45 | parth_m_ | Perhaps major/minor version can be pulled into the build based on tags. |
| 03:45 | parth_m_ | Of course all this works assuming ant and subversion. |
| 03:46 | rhickey_ | parth_m_: well, the releases are there for first-timers. I wouldn't jar up each revision in any case |
| 03:47 | parth_m_ | Thats true. Having the rev number in is just nice to have for people using clojure via source control. |
| 03: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 |
| 03: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. |
| 03:52 | parth_m_ | Question. Do you have an official build system in mind? Ant or Maven? |
| 03: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 |
| 03:54 | rhickey_ | I build with ant |
| 03:56 | parth_m_ | Oh. I get it. |
| 03:56 | rhickey_ | people pulling head with SVN can just do svn info to see what they've got |
| 03: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. |
| 04:05 | parth_m_ | We could put it on hold for now if you prefer. |
| 04: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 |
| 04:08 | parth_m_ | Sounds fine. Thanks for Clojure by the way :) |
| 04:09 | rhickey_ | You're welcome! Thanks for the additions to the Wiki - it needs some love |
| 04:09 | parth_m_ | :) |
| 04:10 | parth_m_ | Well. I am off for dinner. Bye. |
| 04:11 | rhickey_ | bye |
| 10:21 | arohner | I have a question about lib.clj. should (use) be transitive? |
| 10:21 | arohner | in file A I have (use 'clojure.contrib.sql), and then define some other methods |
| 10:21 | arohner | in file B I have (require 'fileA) |
| 10:22 | arohner | 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 | arohner | i.e. A/execute-prepared-statement |
| 10:24 | arohner | 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 | Chouser | 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 | arohner | 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 | arohner | worse comes to worse, I can automatically generate a wrapper |
| 12:10 | arohner | look up all the symbols in the ns, create functions in my namespace that call the imported functions |
| 12:10 | rhickey_ | why/ |
| 12:10 | rhickey_ | ? |
| 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 | arohner | so for example in clojure.contrib.sql, I've wanted to create extra functions that are similar in spirit |
| 12:13 | arohner | so it feels weird to have clojure.contrib.sql/foo and mycode.sql/bar |
| 12:13 | arohner | 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 | arohner | for dev purposes |
| 12:27 | rhickey_ | arohner: ns-unmap |
| 12:28 | arohner | thanks |