Hello, I'll try to answer your questions related to Eclipse: 2010/2/28 Lee Spector <lspec...@hampshire.edu>
> > I've just recently begun to work with Clojure and I am finding it quite > gratifying. I am a long-time Lisper (several dialects) but my Java > experience is limited and largely in the sheltered environment of Processing > (processing.org). > > Anyway, my first Clojure exercise has been a version of my PushGP genetic > programming system, without a GUI, adapted most directly from a recent > Scheme version. Since I've seen such wonderful code critiques on this list I > thought I would post it and solicit any comments that any of you have. I'd > be interested in comments on any aspect of the code, but I'm particularly > eager to hear what people think of the approach to concurrency, which I > describe briefly in the next paragraph. I have posted the code at > http://hampshire.edu/lspector/clojush > > PushGP is a "generational" genetic programming system which means that it > processes generations of programs -- Push programs, in this case -- > sequentially, but that the fitness tests (error computations) of all of the > programs within each generation are independent, as are all of the of the > breeding operations to produce the next generation (aside from the > possibility that multiple breeding operations will access the same parents, > for reading only). So what I've done is to make the population a vector of > agents (called pop-agents) each of which has as its content a struct-map > that contains a program and error values. I use send to ask each agent to > compute its error values and I use await to wait until all of these have > finished. I use a second vector of agents, child-agents, for breeding: I ask > all of the child-agents to construct their new programs based on the > programs in pop-agents, I await their completion, and then I copy all of the > children back into pop-agents and proceed with the next generation. I > realize that I could get better processor utilization without the > synchronization, and I plan to experiment with other (e.g. non-generational) > approaches to GP parallelism -- in fact, I edit a journal that just > published a special issue on parallel evolutionary algorithms, so I know of > a lot of options there! -- but for now I just want the basic generational > algorithm to be expressed as naturally as possible in Clojure. There seem to > be many other options for how to do this using Clojure's concurrency > concepts... Does what I've done seem to be the natural Clojure approach? > > On the development environment front: Is anyone contemplating creating a > Mac OS X "Clojure in a Box"? I would be an enthusiastic user. If it could > have roughly the feature set of the old Macintosh Common Lisp IDE then I > would be ecstatic. Despite a fair amount of tinkering I don't currently have > a functional SLIME setup, and despite the nice screencasts for > Eclipse/Counterclockwise (and very nice features it seems to have -- e.g. > the namespace browser and integrated documentation... is there any > environment that has a debugging environment approximating a Lisp break > loop?) that's not really working for me yet either. (A few specifics: In > emacs, using a variety of configuration instructions and hints from the web, > I get syntax coloring and indentation but not a functional inferior Lisp > mode. > Eclipse is a bit confusing to me overall, I can't seem to figure out how to > get Clojure indenting, Yes, this feature is still not yet available. Since it is one that is recurrently occuring on the wish list of users, I think I'll upgrade its priority ... Note that there's also a "formatting" feature just around the corner, waiting for me to take time to create a new release (thanks to a great contribution from Tuomas). > and it seems to be re-evaluating my buffers without me asking it to :-(. This is is configurable. The auto-compilation of clojure stuff is just bound to the auto-compilation of the project. Simply go to the menu "Project > Build automatically" to enable/disable it. > And saving an awful lot of files to its workspace directory.) The auto-compilation feature is currently dependent on whether the user has launched a REPL for the project or not. If so, then every time a file in an editor is saved, the auto-compilation will be launched in the background. New versions of functions will generate new versions of classes. This is the default behaviour of the clojure compiler. All the generated classes are located in a classes/ directory in your project. This also is the default for clojure projects. It is possible to "clean" the classes/ directory via the per-project "Project > Clean ..." menu. Note that doing so while a REPL is still running doesn't work smoothly under windows. HTH, -- Laurent -- 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