Re: new Clojure Compiler...
first that dinamic languages are better for developers, but you loose some performance compared to typed languages.. and jvm was created with types in mind.. so right now clojure data structures are implemented in java and typed, when you get it in the clojure runtime its boxed already. theres some good approaches for dinamic languages like trace-jits(notably the new mozilla-javascript and luajit) .. but we are not there yet.. (JSR's was created as lazy sequences .. rsrs) for the immutability you could see you can see the performance gains when you use transients against the immutable data.. i guess it cant compare in with mutable data when you use it sequentially(thats why transients get in the game)... but when you add concurrency to that scenario.. things get better and simpler for us.. :) On Mon, May 17, 2010 at 2:08 AM, Rob Lachlan wrote: > > for the persistent data.. well all this "laziness" and dinamic types, and > on > > top of that immutability should not perform well in pure clojure > > Why? > > -- > 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 > -- 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
Re: new Clojure Compiler...
> for the persistent data.. well all this "laziness" and dinamic types, and on > top of that immutability should not perform well in pure clojure Why? -- 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
Re: ANN: try clojure
Pretty enough for you now, David? You can thank Lau Jensen for tons of help making it pretty. Since I didn't know Heinz had already decided to throw my stuff out to the world, I'll go ahead and point out my plans now, since it still isn't finished. Right now, I'm working on making it a bit of a Clojure resource for new people. I'm adding links and such, and learning more JQuery as I go along. The most important thing that I know you're all wondering about is the tutorial. There obviously has to be a tutorial. I for one, have never really cared for the tightly integrated REPL tutorials in which you have to type into the REPL to move along. I understand that the whole point is to get the users to use the REPL, but I think I can do that by making most of the tutorial useless without trying stuff out in the REPL. The tutorial will be below the REPL, and it will be click- through. It will be mostly based on examples that should be tried out in the REPL, like the other ones, but not so tightly integrated with the REPL that you have to type expressions to move along. This is just my point of view, and that's how I'll do this. If everybody thinks that TryHaskell-like integratedness with the REPL is important enough, Heinz/somebody else is welcome to do it themselves. Just see if you like my version when it's done before you do so. ;) I should have some new stuff ready in a couple of days, and I'll post back when I do. On May 16, 2:09 pm, "Heinz N. Gies" wrote: > On May 13, 2010, at 7:31 , Heinz N. Gies wrote: > > > Anyway, enjoy:http://www.try-clojure.org > > Since Rayens original repo has improved to the point where it had become > better then my quick hack fork I've changed the running version back to his > original, enjoy! > > -- > 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 > athttp://groups.google.com/group/clojure?hl=en -- 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
Re: Actors not good for concurrency model
Nice diatribe against actors by someone who's apparently never... actually... used... actors. Clojure is really nice, but that doesn't mean I'm going to buy into weak arguments against features it doesn't have in its core. On May 16, 12:19 pm, Fabio Kaminski wrote: > Sorry about using the list like twitter.. > > but i thought this is a pretty good "article" about functional programming > side effects, and why actors are not very good design decision.. > > Actors not good for concurrency model > :http://pchiusano.blogspot.com/2010/01/actors-are-not-good-concurrency... > > just another prove that Rich thoughts are pretty concise , > and that all are pretty well materialized in clojure's framework. > > what convinced me to embrace clojure, is that it choose to make the right > thing , instead of the popular one.. > > as haskell community says wisely : "avoid success at all costs " :) > > -- > 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 > athttp://groups.google.com/group/clojure?hl=en -- 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
Re: how do I clojurize this java ?
Works fine for me: $ java -cp clojure.jar:twitter4j-core-2.1.2.jar clojure.main Clojure 1.2.0-master-SNAPSHOT user=> (import 'twitter4j.TwitterStreamFactory) twitter4j.TwitterStreamFactory user=> (.getInstance (TwitterStreamFactory.) "foo" "bar") [Sun May 16 17:09:37 PDT 2010]Using class twitter4j.internal.logging.StdOutLoggerFactory as logging factory. # On May 16, 1:25 pm, Brian Wolf wrote: > Hi, > > I was wondering how to 'clojurize' > > twitterStream = new TwitterStreamFactory().getInstance(args[0], > args[1]); > > from the java code below,which is the from the open source twitter4j > java library (http://twitter4j.org/en/index.html) > > from the source, .getInstance(args[0], args[1]) is a "protected" > method of TwitterStreamFactory, : > > so I think should be callable on the function (?), > > tried this and various permutations > > (.getInstance ( new TwitterStreamFactory) "something" "other") > > but the error says > > "cant call public method on non-public class > : public java.lang.Object twitter4j.TwitterFactoryBase.getInstance > > or twitterStream can to be instantiated using a public method using > 'this' like below (if im following the java code right), but I > understand the java concept of 'this' doesn't exist in clojure > > Thanks, > > Brian > > import twitter4j.Status; > import twitter4j.StatusDeletionNotice; > import twitter4j.StatusListener; > import twitter4j.TwitterException; > import twitter4j.TwitterStream; > import twitter4j.TwitterStreamFactory; > > /** > * This is a code example of Twitter4J Streaming API - sample > method support. > * Usage: java twitter4j.examples.PrintSampleStream > [TwitterScreenName TwitterPassword] > * > * @author Yusuke Yamamoto - yusuke at mac.com > */ > public final class PrintSampleStream implements StatusListener{ > /** > * Main entry of this application. > * @param args String[] TwitterID TwitterPassword > */ > public static void main(String[] args)throws TwitterException { > PrintSampleStream printSampleStream = new > PrintSampleStream(args); > printSampleStream.startConsuming(); > } > > TwitterStream twitterStream; > > PrintSampleStream(String[] args) { > try { > twitterStream = new > TwitterStreamFactory(this).getInstance(); > } catch (IllegalStateException is) { > // screen name / password combination is not in > twitter4j.properties > if (args.length < 2) { > System.out.println( > "Usage: java > twitter4j.examples.PrintSampleStream [ScreenName Password]"); > System.exit(-1); > } > twitterStream = new > TwitterStreamFactory().getInstance(args[0], args[1]); > } > } > > -- > 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 > athttp://groups.google.com/group/clojure?hl=en -- 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
Which git version for cells?
I'm experimenting with cells in clojure and am currently using the "lazy" branch for this. However, I'm getting some strange behavior. So my question is: which branch should I be using if I want to test- drive the watcher feature? Thanks -- 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
Wrapping lines in the REPL
I am using La Clojure (IntelliJ) for editing my programs. Is there any way (pseudo-variable, perhaps) to get the REPL to wrap lines after a specified number of characters? If I print a sequence containing a large number of items, I have to scroll right to see the whole thing. Thanks, Ralph -- 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
how do I clojurize this java ?
Hi, I was wondering how to 'clojurize' twitterStream = new TwitterStreamFactory().getInstance(args[0], args[1]); from the java code below,which is the from the open source twitter4j java library ( http://twitter4j.org/en/index.html ) from the source, .getInstance(args[0], args[1]) is a "protected" method of TwitterStreamFactory, : so I think should be callable on the function (?), tried this and various permutations (.getInstance ( new TwitterStreamFactory) "something" "other") but the error says "cant call public method on non-public class : public java.lang.Object twitter4j.TwitterFactoryBase.getInstance or twitterStream can to be instantiated using a public method using 'this' like below (if im following the java code right), but I understand the java concept of 'this' doesn't exist in clojure Thanks, Brian import twitter4j.Status; import twitter4j.StatusDeletionNotice; import twitter4j.StatusListener; import twitter4j.TwitterException; import twitter4j.TwitterStream; import twitter4j.TwitterStreamFactory; /** * This is a code example of Twitter4J Streaming API - sample method support. * Usage: java twitter4j.examples.PrintSampleStream [TwitterScreenName TwitterPassword] * * @author Yusuke Yamamoto - yusuke at mac.com */ public final class PrintSampleStream implements StatusListener{ /** * Main entry of this application. * @param args String[] TwitterID TwitterPassword */ public static void main(String[] args)throws TwitterException { PrintSampleStream printSampleStream = new PrintSampleStream(args); printSampleStream.startConsuming(); } TwitterStream twitterStream; PrintSampleStream(String[] args) { try { twitterStream = new TwitterStreamFactory(this).getInstance(); } catch (IllegalStateException is) { // screen name / password combination is not in twitter4j.properties if (args.length < 2) { System.out.println( "Usage: java twitter4j.examples.PrintSampleStream [ScreenName Password]"); System.exit(-1); } twitterStream = new TwitterStreamFactory().getInstance(args[0], args[1]); } } -- 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
Actors not good for concurrency model
Sorry about using the list like twitter.. but i thought this is a pretty good "article" about functional programming side effects, and why actors are not very good design decision.. Actors not good for concurrency model : http://pchiusano.blogspot.com/2010/01/actors-are-not-good-concurrency-model.html just another prove that Rich thoughts are pretty concise , and that all are pretty well materialized in clojure's framework. what convinced me to embrace clojure, is that it choose to make the right thing , instead of the popular one.. as haskell community says wisely : "avoid success at all costs " :) -- 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
Re: ANN: try clojure
On May 13, 2010, at 7:31 , Heinz N. Gies wrote: > Anyway, enjoy: http://www.try-clojure.org Since Rayens original repo has improved to the point where it had become better then my quick hack fork I've changed the running version back to his original, enjoy! -- 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
Re: Clojure web app + js libraries - any suggestions?
If you are taking Saul's approach, you might also want to take a look at generating XHTML, since XML support in Clojure is so easy, and strict HTML is a little more limiting. And if you were looking at Raphael, take a second look at plain-ol' SVG. It's already very good in Opera, Chrome, FireFox, and Safari. Microsoft will finally support it in IE 9. Raphael does not use a standard data form, so you could be stuck with your Raphael code for a decade after it's no longer necessary. SVG is more capable (Raphael uses it when available), is a stable, mature standard, and is part of HTML 5. To get an understanding of SVG, go grab Inkscape, draw a simple picture, and look at the SVG file it creates. It's beautiful stuff. -- 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
Re: Running Clojure scripts in Maven
On May 16, 7:22 am, "Hugo Duncan" wrote: >> ... > > In case you are interested, I recently implemented some of the > infrastructure to allow you to write maven plugins in clojure. A simple > example that just logs basedir is here: > > http://github.com/hugoduncan/clojure-mojo-example/blob/master/src/mai... > > The annotation support isn't complete yet, but the simple example works. > > -- > Hugo Duncan On a related note, I was wondering if anyone had taken a stab at Clojure stub generation. That is, on the "generate-sources" phase, you generate .java files that stub out the classes you mean to create in Clojure. Javac comes along, sees the stubs, and can compile all the classes together. Then, once Javac has done its work, you run Clojure to replace the stubbed .class files with the real thing. Solves the "chicken-and- egg" problem quite nicely. The stubs would contain Javadoc, annotations, and generics (eventually...), allowing Java frameworks to easily consume classes compiled from Clojure. That is, it would work with the compile-time annotation processor from Java 5 and 6, and it would also work with Maven plugins, since they use Javadoc (in Maven 2, at least) for annotations. I had imagined that Maven plugins would just sort of fall out from having a good stub generator. Has anyone talked about doing something like this??? This is how the Groovy cross-compiler works, and how GMaven (the Groovy Maven plugin) performs cross compilation. Of course, it should be much easier to do with Clojure. With Groovy you have to worry about all the intricacies of ANTLR, but parsing in Clojure is dead simple. Theoretically you should just have to look for the correct function names and metadata and spit out Java source. -- 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
Re: Clojure web app + js libraries - any suggestions?
Thanks much Saul. This is exactly what I am looking for! Let the webapps begin! On May 16, 7:15 am, Saul Hazledine wrote: > On May 15, 5:23 pm, Base wrote: > > > So I would love to hear what others have done in the past to integrate > > clojure into a web app. Any info would be most appreciated. > > I use compojure 0.4 with hiccup to generate the HTML. It feels like a > very "old school" way of developing a web application because it isn't > a do everything web framework. However, things have gone smoothly and > I've had no problems with this approach. Despite being a clojure > newbie I have found my productivity is very good with slowdowns caused > by having to write things such as user management and form validation > myself. > > I haven't integrated any javascript yet and the application is > responsive enough that I may only add minimal javascript as needed > after the first release. My intention is to use jquery and scriptjure: > > http://arohner.blogspot.com/2010/04/writing-jquery-code-with-scriptju... > > I'm using an embedded H2 database engine which is low latency (5 -> 10 > ms to get query results back) and has made a big difference to how the > application feels. > > Overall I would recommend this setup as (very) enjoyable and flexible > but if you're on a tight deadline then a full web framework may be > more appropriate. > > Saul > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group.To post to this group, send email > tocloj...@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email > toclojure+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/clojure?hl=en -- 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
Re: Running Clojure scripts in Maven
On Sat, 15 May 2010 21:54:55 -0400, Jason Smith wrote: http://sandflea.googlecode.com/svn/site/SNAPSHOT/maven-clojure-plugin/example-execute-simple.html I was originally going to try to put this into *clojure-maven-plugin*, but realized that there are lots of subtleties to cover that would be difficult as a sub-contributor. So I have created sandflea.clojure:maven-clojure-plugin. It currently has one goal, *execute*, that lets you execute Clojure scripts at any lifecycle state in the Maven build, with in-process access to various Maven objects (project, session, log, etc.). In case you are interested, I recently implemented some of the infrastructure to allow you to write maven plugins in clojure. A simple example that just logs basedir is here: http://github.com/hugoduncan/clojure-mojo-example/blob/master/src/main/clojure/maven/clojure/example/plugin.clj The annotation support isn't complete yet, but the simple example works. -- Hugo Duncan -- 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
Re: Dynamic use of protocols
On Saturday, May 15, 2010, Mikhail Kryshen > set of extenders and implementing functions. This state (what > types currently implement the protocol and how) is what I really > want to be able to manipulate. The way it is tied to the protocol > definition and changed by the extend function seems to cause the > problem. > Have you considered using multimethods instead? David -- 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
Re: Dynamic use of protocols
On 16 май, 05:57, ataggart wrote: > Perhaps you misunderstand protocols. Protocols don't support a > hierarchy, thus you don't extend them; you have types implement/reify > them. Any "extending" you do will be against a type. By extending the protocol I mean "extending the polymorphism of the protocol's methods to call the supplied functions when an AType is provided as the first argument" (http://clojure.org/ protocols) > Further, a protocol is a set of abstract function definitions; it is > not a type, as such the notion of "functions that accept or return > protocols" doesn't apply. For example, with the following: > (defprotocol P > (foo [x]) > (bar-me [x] [x y])) > It would make no sense to say some function "takes an instance of P", > unless you're talking about the two functions, foo and bar-me. While in theory protocol is a set of abstract function definitions, in actual implementation protocol structure includes set of extenders and implementing functions. This state (what types currently implement the protocol and how) is what I really want to be able to manipulate. The way it is tied to the protocol definition and changed by the extend function seems to cause the problem. -- 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
Re: Why is JLine better than just command-line?
Thanks for the feedback! It seems like JLine operation is supposed to be obvious to anyone who uses *nix regularly. I know a couple of guys who this might interest, so I'll run this info by them and see if they bite. Thanks again! -- 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
Re: Dynamic use of protocols
On 16 май, 05:57, ataggart wrote: > Perhaps you misunderstand protocols. Protocols don't support a > hierarchy, thus you don't extend them; you have types implement/reify > them. Any "extending" you do will be against a type. By extending the protocol I mean "extending the polymorphism of the protocol's methods to call the supplied functions when an AType is provided as the first argument" (http://clojure.org/ protocols) > Further, a protocol is a set of abstract function definitions; it is > not a type, as such the notion of "functions that accept or return > protocols" doesn't apply. For example, with the following: > (defprotocol P > (foo [x]) > (bar-me [x] [x y])) > It would make no sense to say some function "takes an instance of P", > unless you're talking about the two functions, foo and bar-me. While in theory protocol is a set of abstract function definitions, in actual implementation protocol structure includes set of extenders and implementing functions. This state (what types currently implement the protocol and how) is what I really want to be able to manipulate. The way it is tied to the protocol definition and changed by the extend function seems to cause the problem. -- 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
Running Clojure scripts in Maven
http://sandflea.googlecode.com/svn/site/SNAPSHOT/maven-clojure-plugin/example-execute-simple.html I was originally going to try to put this into *clojure-maven-plugin*, but realized that there are lots of subtleties to cover that would be difficult as a sub-contributor. So I have created sandflea.clojure:maven-clojure-plugin. It currently has one goal, *execute*, that lets you execute Clojure scripts at any lifecycle state in the Maven build, with in-process access to various Maven objects (project, session, log, etc.). The link above shows an example. It's fairly simple. I'll add a few more, including adding new artifacts using Clojure, and maybe some ANT stuff. If you're into Maven, this might interest you. Still at an early stage in development, and I welcome feedback. This is not going to be a replacement for *clojure-maven-plugin*. I am not planning to add any functions that overlap what they are already doing so very well! -- 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
Re: Clojure web app + js libraries - any suggestions?
On May 15, 5:23 pm, Base wrote: > So I would love to hear what others have done in the past to integrate > clojure into a web app. Any info would be most appreciated. > I use compojure 0.4 with hiccup to generate the HTML. It feels like a very "old school" way of developing a web application because it isn't a do everything web framework. However, things have gone smoothly and I've had no problems with this approach. Despite being a clojure newbie I have found my productivity is very good with slowdowns caused by having to write things such as user management and form validation myself. I haven't integrated any javascript yet and the application is responsive enough that I may only add minimal javascript as needed after the first release. My intention is to use jquery and scriptjure: http://arohner.blogspot.com/2010/04/writing-jquery-code-with-scriptjure.html I'm using an embedded H2 database engine which is low latency (5 -> 10 ms to get query results back) and has made a big difference to how the application feels. Overall I would recommend this setup as (very) enjoyable and flexible but if you're on a tight deadline then a full web framework may be more appropriate. Saul -- 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
Re: Why is JLine better than just command-line?
Hi, On Sat, May 15, 2010 at 03:32:13PM -0700, Jason Smith wrote: > Okay, so you can actually print password-masked characters. But I > can't figure out how to actually do anything I couldn't already do > with my command-line before JLine, except I can't seem to exit the > Clojure REPL with CTRL+c. > > I'm curious because I have a number of Java-ish command line > utilities, and if I can figure out how JLine is supposed to work, > maybe it could benefit them as well. But as of now, I am stumped. > > Can someone point me in the right direction or give me a clue? Besides the already mentioned line editing you also get command history. For this alone, I'd use it. You might also want to look into rlwrap. For Ctrl+C: it does not exit the Repl, it shoots your process in the head. Use Ctrl+D (with JLine or on Unix) or Ctrl+Z Enter (on Windows) to indicate end of input and shut down the system gracefully. Sincerely Meikel -- 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
Re: Why is JLine better than just command-line?
> Okay, so you can actually print password-masked characters. But I > can't figure out how to actually do anything I couldn't already do > with my command-line before JLine, except I can't seem to exit the > Clojure REPL with CTRL+c. I presume you've read about JLine at http://jline.sourceforge.net/ given your masked character comment? I guess it's up to what you think is important. In my case I use jline because it gives proper line editing functionality with (by default) emacs key bindings. For example, "ctrl-a, ctrl-k" kills a line. "ctrl-p" gives me the line I just wrote, etc. For me, being used to primarily sitting at the zsh command line,I would not be able to use the plain REPL without it or I'd go nuts ;) -- / Peter Schuller -- 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