Re: Has anyone on this group ever tried Forth?
On Apr 10, 12:13 am, CuppoJava wrote: > Hi everyone, > I was browsing through webpages and the language Forth caught my eye. > Reading through it's supposed advantages it sounded very interesting, > and I was wondering if anyone here has any experience with it, and can > comment. > > I'm asking on the Clojure forum instead of the Forth forum because I > agree with the programming values that Clojure emphasizes, and would > like to hear opinions from people with similar values to myself. > > I'm most interested in it's productivity aspect. (ie. how quick can I > get real work done) > > Thanks for your opinions > -Patrick I find stack languages to be obtuse. Sometimes Forth programmers need variables, and what they do is usually just mutable some global ones. Also Forth programmers always have to document what they are doing with the stack: what arguments are consumed what results are left, i.e. this is a calling convention "by convention". Why not let the compiler enforce these rules instead of leaving it up to the comments? Basically, applicative languages (like C) are to Forth, what GC is to malloc/free and what STM is to locks: a huge step forward. I don't know what Factor people are doing. It's Forth with dynamic typing, as far as I know. --~--~-~--~~~---~--~~ 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: Got a Clojure user group?
Atlanta Clojure User Group http://www.atlclj.org/ On Apr 9, 3:00 pm, Rich Hickey wrote: > Got a Clojure user group, meetup etc? > > Reply to this message and let me know, I'll add them to the Clojure > site. > > Please supply a primary URL for getting info for your group. > > Thanks! > > Rich --~--~-~--~~~---~--~~ 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: [ANN] Compiling Clojure applications using Ant
Cool. Thanks for the pointer to clojure.lang.Compile and the reminder about failonerror - I'll update it as soon as I can. I'll also look into coming up with a clearer explanation of the app variable. Thanks! -Rich On Sat, Apr 11, 2009 at 3:55 PM, John D. Hume wrote: > > On Sat, Apr 11, 2009 at 3:49 PM, Richard Lyman > wrote: > > http://www.lithinos.com/Compiling-Clojure-applications-using-Ant.html > > > > What do you guys think? > > > > -Rich > > It's a bit simpler to use clojure.lang.Compile as a main class. > Here's the relevant bit from one of my build.xmls: > > > classpathref="project.classpath" > fork="true" > failonerror="true"> > > > > > > > > http://github.com/duelinmarkers/clj-record/blob/c8235e7d854c0049a785d7773665cb6c62efb024/build.xml#L30 > > I strongly recommend failonerror="true" so that your build will abort > if compilation fails. (If you stick with the clojure.main -e > "(compile..." approach I think you'll find clojure.main doesn't exit > with an error code, so it won't work. There's another recent thread > about that and I'm planning to open an issue and submit a patch for it > when I have a chance. clojure.lang.Compile does exit with an error > when compilation fails, so the above will fail a build appropriately.) > > Also, I'd recommend being clearer in describing the "app" variable. It > will need to be a Clojure namespace that when loaded will (one way or > another) load in all of your Clojure code. If someone is building a > library, it's relatively likely there is no such namespace. > > -hume. > -- > http://elhumidor.blogspot.com/ > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[ANN] test-expect functional mocking/expectation library
When I started working on this library, I thought to myself, "I can't believe no one has put together an expectation/mocking library" but I couldn't find one so I went ahead and started my own. Of course, it was not until I had an early working version that I discovered Allen Rohner's expectation tools, but I figured that mine were sufficiently different to merit further development (at least relative to the latest code of his I could find). In the past week or so I've been refactoring and fixing bugs on my test-expect library and I find it much improved over what I previously had. The salient improvements on the latest on trunk include: - Removal of dependency on test-is. Tests have been moved to a separate file instead. The library is still geared toward easy integration with test-is, but the explicit dependency is gone. - Replaced "exceptions on error" with the new and improved error functions that are ready to be overridden or used as-is. They also include reporting the expected behavior in an unevaluated form, a la test-is. - Added convenience methods such as (once) (more-than x) for invocation count and argument matching.\ - Default has-args argument matchers to being equality matchers so you can say (has-args [5]) instead of (has-args [#(= 5 %)]) - Bug fixes The latest is available for public consumption at http://code.google.com/p/test-expect/ Basically the gist of it is it sets up the bindings for any functions you'd rather not touch while testing the function you're working on. So, you just say: (expect [dep-fn1 (has-args [5 (less-than 4)] (returns "a string!"))] (fn-under-test-which-calls-dep-fn1)) Any unexpected or unmatched calls are reported. Successful execution is silent, which mirrors other libraries I have used in other languages. Further details to be found in the source. Suggestions for further changes or improvements are more than welcome. If people find this library useful I'd be more than happy to sign the CA and put this in contrib. Also, Allen, if you are interested in merging our efforts let me know. Is your latest code available? -Matt --~--~-~--~~~---~--~~ 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.main always exits with code 0
Rich, Can I submit an issue and patch for this? I have a CA on file. Thanks. -hume. On Sun, Apr 5, 2009 at 8:15 PM, John D. Hume wrote: > Currently it does this: > (try > the good stuff ... > (catch Exception e > (.printStackTrace e *err*))) > (flush)) > > Instead I'd like it to: > (try > the good stuff ... > (flush) > (catch Exception e > (flush) > (throw e))) > > Basically just let Java do what Java does when an unhandled exception > is thrown (after flushing *out* to keep from confusing people). I know > a lot of what's in clojure.main is meant to be useful for embedding in > larger programs, but it doesn't look to me like the main function is > intended for that. -- http://elhumidor.blogspot.com/ --~--~-~--~~~---~--~~ 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: [ANN] Compiling Clojure applications using Ant
On Sat, Apr 11, 2009 at 3:49 PM, Richard Lyman wrote: > http://www.lithinos.com/Compiling-Clojure-applications-using-Ant.html > > What do you guys think? > > -Rich It's a bit simpler to use clojure.lang.Compile as a main class. Here's the relevant bit from one of my build.xmls: http://github.com/duelinmarkers/clj-record/blob/c8235e7d854c0049a785d7773665cb6c62efb024/build.xml#L30 I strongly recommend failonerror="true" so that your build will abort if compilation fails. (If you stick with the clojure.main -e "(compile..." approach I think you'll find clojure.main doesn't exit with an error code, so it won't work. There's another recent thread about that and I'm planning to open an issue and submit a patch for it when I have a chance. clojure.lang.Compile does exit with an error when compilation fails, so the above will fail a build appropriately.) Also, I'd recommend being clearer in describing the "app" variable. It will need to be a Clojure namespace that when loaded will (one way or another) load in all of your Clojure code. If someone is building a library, it's relatively likely there is no such namespace. -hume. -- http://elhumidor.blogspot.com/ --~--~-~--~~~---~--~~ 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: compare bug?
That's more likely a bug in the documentation that in the compare function. On Apr 11, 4:09 pm, fft1976 wrote: > user=> (doc compare) > - > clojure.core/compare > ([x y]) > Comparator. Returns 0 if x equals y, -1 if x is logically 'less > than' y, else 1. Same as Java x.compareTo(y) except it also works > for nil, and compares numbers and collections in a type-independent > manner. x must implement Comparable > nil > user=> (compare "a" "z") > -25 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
compare bug?
user=> (doc compare) - clojure.core/compare ([x y]) Comparator. Returns 0 if x equals y, -1 if x is logically 'less than' y, else 1. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable nil user=> (compare "a" "z") -25 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[ANN] Compiling Clojure applications using Ant
Searching for 'clojure ant compile' returns pages that talk about the process of compiling the Clojure and Contrib JARs - but I couldn't find pointers on setting up a project to use Ant, so... http://www.lithinos.com/Compiling-Clojure-applications-using-Ant.html What do you guys think? -Rich --~--~-~--~~~---~--~~ 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: Got a Clojure user group?
On Thu, Apr 9, 2009 at 2:00 PM, Rich Hickey wrote: > > Got a Clojure user group, meetup etc? > > Reply to this message and let me know, I'll add them to the Clojure > site. > Chicago http://onclojure.com/chicago/ -- Cosmin Stejerean http://offbytwo.com --~--~-~--~~~---~--~~ 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 dependency management and build
Hi Bradford, Am 08.04.2009 um 21:31 schrieb Bradford Cross: I heard some chatter yesterday on #clojure about using Ivy with Clojure. Yes. I'm working on marrying Clojure and Ivy. So far with, IMHO, great success. I set up a little ivy repo with clojure and contrib. The clojure module has the following configurations: - default => AOT compiled clojure jar - dev => the previous + a source jar - slim => Java source compiled, clojure sources as is The contrib module has (roughly) one configuration per unit, ie. def, pprint, stacktrace, with the following exceptions: - I grouped together the scattered math stuff into a math configuration. - generic and types depend on each other so their combined into the generic configuration. Similar to clojure a source configuration is included, which adds a source jar to the dependencies This allows very fine-grained control of what is needed. So if you want only def, you only download a 13k not 2.5M. To use this setup, you only have to specify the dependencies in your ivy.xml and ivysettings.xml files. Here an example: ivysettings.xml: http://kotka.de/ivy/ivysettings.xml"/> The first line sucks in the default configuration, the second tells Ivy how to resolve the clojure and contrib dependencies. ivy.xml: ... conf="default"/> rev="1.0.0" conf="default->def"/> Now you only have to integrate Ivy with your build system. It can be done very easily with ant, but may also be used standalone, eg. with make. Here you can see an example how I integrated Ivy with my lazymap project. http://bitbucket.org/kotarak/lazymap/src/ It is avalaible via the kotka.de ivysettings as conf="default"/> I can't speak for SLIME, but VimClojure can be simply started with the resolved jars from lib directory in the classpath. -I download lots of little projects things from github and i want to munge them all together for my app. This means I need to build jars (some with ant, otehrs with maven, etc.) and in other cases I want to depend directly on the .clj files using clojures namespace-to-dir- structure conventions. So there are a couple different ways to build of the classpath - one for .clj and one for .jar. I'm not sure, that Ivy can help in the general case, where you have to build the dependencies. I think it only downloads the files and makes them available. In particular it doesn't seem to handle subdirectories. So vanilla clj might not work. -Many projects also have their own lib foler - with both jars and cljs, so I need to pick those deps up transatively. This is a breeze with Ivy. It must say, that this just works beautifully. The dependencies either work with Ivy or with Maven and are resolved transitively. You can also mirror dependencies locally, to make sure they don't go away. -The work in the Clojure community is proceeding very fast, so I'd like updating all the projects from git to be automated as well. This could be easily done with Ivy. Check out the dependencies you need. Add an ivy.xml and a custom build script for ant. Then you can create a master build.xml, which iterates through all dependencies in the right order to pull changes, rebuild and publish into your local repository. I actually haven't set up production version of such a structure but I tried around and it worked without problems. The Ivy documentation has some tutorial on this. So what is a good solution to these problems? Perhaps it would be cool to build some git/maven/lancet aware infrastructure to do this refreshing of deps, building the deps, and building up the classpath. It may also be good to configure .emacs to be able to load projects and rebuild the classpath dynamically based on lancet build files - much in the way that intelliJ or eclipse load projects from ant .builds or maven poms. I'm not sure for bigger setups, but for my current needs Ivy Just Works. So I think it's certainly worth a look. Sincerely Meikel PS: May changes to clojure and contrib are attached as diffs. They add the Ivy information and a new build+ivy.xml for ant. clojure-ivy2.diff Description: Binary data contrib-ivy2.diff Description: Binary data smime.p7s Description: S/MIME cryptographic signature
Re: Got a Clojure user group?
Washington DC Clojure Study Group http://groups.google.com/group/clojure-study-dc On Thu, Apr 9, 2009 at 3:00 PM, Rich Hickey wrote: > > Got a Clojure user group, meetup etc? > > Reply to this message and let me know, I'll add them to the Clojure > site. > > Please supply a primary URL for getting info for your group. > > Thanks! > > Rich > > > > --~--~-~--~~~---~--~~ 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: Has anyone on this group ever tried Forth?
Thinking Forth is also a great read: http://thinking-forth.sourceforge.net/ On Apr 10, 2009, at 10:18 PM, Dave Rothlisberger wrote: > > I can't speak for "getting real work done", but out of academic / > enlightening-in-its-simplicity interest, I think everyone should read > Leo Brodie's "Starting Forth": > > http://www.forth.com/starting-forth/sf1/sf1.html > > > > On Apr 10, 2:13 am, CuppoJava wrote: >> Hi everyone, >> I was browsing through webpages and the language Forth caught my eye. >> Reading through it's supposed advantages it sounded very interesting, >> and I was wondering if anyone here has any experience with it, and >> can >> comment. >> >> I'm asking on the Clojure forum instead of the Forth forum because I >> agree with the programming values that Clojure emphasizes, and would >> like to hear opinions from people with similar values to myself. >> >> I'm most interested in it's productivity aspect. (ie. how quick can I >> get real work done) >> >> Thanks for your opinions >> -Patrick > > > --~--~-~--~~~---~--~~ 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: Has anyone on this group ever tried Forth?
On 11/04/2009, at 12:53 PM, e wrote: > J seems cool, and, from what I understand, is a descendant of > forth. How does Factor compare to J? J is a descendent of APL, done by the late Ken Iverson, the creator of APL. A big change is the substitution of ASCII for the traditional APL operators. More convenient, but for me it loses some of the charm of APL. Not at all Lispy. Antony Blakey -- CTO, Linkuistics Pty Ltd Ph: 0438 840 787 A priest, a minister and a rabbi walk into a bar. The bartender says "What is this, a joke?" --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---