Twitter api?
I see twitter-api and clojure-twitter in clojars. Which one do you use? -- 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
Twitter api?
I see twitter-api and clojure-twitter in clojars. Which one do you use? -- 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: Re: Clojure online university
P2PU.org is a great format to teach a class. I took a Javascript class there. I wish someone would teach a class on clojure there. On , Peter Hanak ptr6...@gmail.com wrote: Sean thanks for pointing me to Amit Rathore's course. I really like his book and am looking forward to learn from him. I am glad that you guys think Clojure Uni is good idea. I think that best approach will be to start with Khan Academy. It is free and it seems easy to create new exercises. It might catch on. On Feb 18, 9:08 am, diepeglo diepe...@googlemail.com wrote: +1. To get an impression how this could look like check the upcoming Stanford, MIT and udacity classes: www.class-central.orgwww.udacity.com and of course not to forget the legendary ai-class.com (Sebastian Thrun's follow-up robotics class is at udacity.com and starts on Monday!!) - Dietmar -- 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
Help! Migrating to 1.3.0
I have a few issues. What do the following warnings mean and what should I do about them? user= (require 'mypackage) Warning: *default-encoding* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *default-encoding* or change the name. Warning: *buffer-size* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *buffer-size* or change the name. Warning: *byte-array-type* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *byte-array-type* or change the name. Warning: *append-to-writer* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *append-to-writer* or change the name. nil -- 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
help with web server
I have the following web server that I pieced together from code snippets so I'm not sure how everything works really but most of it works. Now, I want to put a file for download in download.html. I tried all kinds of href specs but nothing works. Where should I put my file for download? Here's the code below. Any constructive criticism welcome! melipone (ns fileupload.core (:use [net.cgrand.enlive-html :only [deftemplate defsnippet content clone-for nth-of-type first-child do- set-attr sniptest at emit*]] [compojure.core] [ring.adapter.jetty]) (:require (compojure [route :as route]) (ring.util [response :as response]) (ring.middleware [multipart-params :as mp]) (clojure.contrib [duck-streams :as ds])) ) (defn render [t] (apply str t)) (deftemplate index fileupload/resources/index.html []) (deftemplate download fileupload/resources/download.html []) (deftemplate upload-success fileupload/resources/success.html []) (defn upload-file [file] ; (ds/copy (file :tempfile) (ds/file-str file.out)) (ds/copy (file :tempfile) (ds/file-str (file :filename))) (render (upload-success))) (defn(ns fileupload.core (:use [net.cgrand.enlive-html :only [deftemplate defsnippet content clone-for nth-of-type first-child do- set-attr sniptest at emit*]] [compojure.core] [ring.adapter.jetty]) (:require (compojure [route :as route]) (ring.util [response :as response]) (ring.middleware [multipart-params :as mp]) (clojure.contrib [duck-streams :as ds])) ) (defn render [t] (apply str t)) (deftemplate index fileupload/resources/index.html []) (deftemplate download fileupload/resources/download.html []) (deftemplate upload-success fileupload/resources/success.html []) (defn upload-file [file] ; (ds/copy (file :tempfile) (ds/file-str file.out)) (ds/copy (file :tempfile) (ds/file-str (file :filename))) (render (upload-success))) (defn pload [params] (println params) (upload-file (get params file))) (defroutes public-routes (GET /upload [] (render (index))) (GET /download [] (render (download))) (mp/wrap-multipart-params ;(POST /file {params :params} (upload-file (get params file))) (POST /file {params :params} (pload params)) ) ) (defn start-app [] (future (run-jetty (var public-routes) {:port 8000}))) -- 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
help with webserver
I'm using a combination of clojure, enlive and jetty. I want to be able to serve arbitrary files. Can somebody show me an example? -- 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: Re: help with webserver
Thanks everybody. Adding a resources route did work. The link below was helpful: http://stackoverflow.com/questions/7816465/serving-static-files-with-ring-compojure-from-a-war On , Mark Rathwell mark.rathw...@gmail.com wrote: Generally, in production, jetty or tomcat would be fronted by a web server like nginx or apache httpd, and those would be setup to serve your static files. In development, or if you just don't want to set that up, with Compojure you can use compojure.route/files to serve static files [1]. Or, as Chris said, Noir might make your life easier. [1] http://weavejester.github.com/compojure/compojure.route-api.html On Wed, Dec 14, 2011 at 3:46 PM, labwor...@gmail.com wrote: I'm using a combination of clojure, enlive and jetty. I want to be able to serve arbitrary files. Can somebody show me an example? -- 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 -- 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: Re: help with webserver
Thanks everybody. Adding a resources route did work. The link below was helpful: http://stackoverflow.com/questions/7816465/serving-static-files-with-ring-compojure-from-a-war On , Mark Rathwell mark.rathw...@gmail.com wrote: Generally, in production, jetty or tomcat would be fronted by a web server like nginx or apache httpd, and those would be setup to serve your static files. In development, or if you just don't want to set that up, with Compojure you can use compojure.route/files to serve static files [1]. Or, as Chris said, Noir might make your life easier. [1] http://weavejester.github.com/compojure/compojure.route-api.html On Wed, Dec 14, 2011 at 3:46 PM, labwor...@gmail.com wrote: I'm using a combination of clojure, enlive and jetty. I want to be able to serve arbitrary files. Can somebody show me an example? -- 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 -- 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
clojure-opennlp
That's probably an OpenNLP question, but here it goes. Is there a way to tell the tokenizer to make tokens of more than one word according to a multi-word lexicon? Thanks for any ideas. melipone -- 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: Re: Re: java logging properties and lein
Okay, thanks. I think the library I interface with is using java.util.logging. I might need to reset the logging configuration. I recall something like that in the past like LogManager.reset(); On , Mark Rathwell mark.rathw...@gmail.com wrote: You still need to load the properties and tell the logger to use them. Assuming it is using log4j, something like the following should do that (completely untested though): ... (:require [clojure.java.io :as io]) ... (with-open [s (io/input-stream (io/resource logging.properties))] (org.apache.log4j.PropertyConfigurator/configure (doto (java.util.Properties.) (.load s I should have noted: Unless the library you're using is already checking for and loading a resource called logging.properties, in which case it should work just by dropping in the properties file in the resources directory. -- 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: Re: Re: java logging properties and lein
Okay, thanks. I think the library I interface with is using java.util.logging. I might need to reset the logging configuration. I recall something like that in the past like LogManager.reset(); On , Mark Rathwell mark.rathw...@gmail.com wrote: You still need to load the properties and tell the logger to use them. Assuming it is using log4j, something like the following should do that (completely untested though): ... (:require [clojure.java.io :as io]) ... (with-open [s (io/input-stream (io/resource logging.properties))] (org.apache.log4j.PropertyConfigurator/configure (doto (java.util.Properties.) (.load s I should have noted: Unless the library you're using is already checking for and loading a resource called logging.properties, in which case it should work just by dropping in the properties file in the resources directory. -- 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
Forcing computation
I understand that lazy sequences are very useful but sometimes, I want to compute everything, go away, and have it there when I come back. How do I do that with a map? (def x (map fn coll)) -- 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
java logging properties and lein
I'm interfacing with a java library. I'm getting logging info messages. Where do I put the logging.properties file in a lein project? -- 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
java logging properties and lein
I'm interfacing with a java library. I'm getting logging info messages. Where do I put the logging.properties file in a lein project? -- 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: Re: java logging properties and lein
I put a logging.properties file in the resources directory of the project but it does not seem to pick it up. Do I have to do something else to override the default logging from the java library I am using? On , Phil Hagelberg p...@hagelb.org wrote: On Mon, Nov 14, 2011 at 9:22 AM, joegallo joega...@gmail.com wrote: You could drop it into the root of src, or you can add a :resources-path etc in your project.clj and then put it in the root of that. Some purists would probably argue that the latter is better, but the former should work just fine, too. Actually if the resources/ dir exists in the project root you don't have to add anything to project.clj; it will use it by default. -Phil -- 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
sqlitejdbc jar on clojars
sqlite3 had some problems but a later version (3.7.9) seems to work. Now the sqlitejdbc jar on clojars version 0.5.6 has the same problems as the old sqlite3 command line. Basically, I get this error below when reading certain .sqlite files. Is there a latest version of the sqlitejdcb driver for clojure? cljstudent.sqlite= (get-data) java.sql.SQLException: file is encrypted or is not a database (NO_SOURCE_FILE:0 -- 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: Re: sqlitejdbc jar on clojars
Thanks but I am not getting anything with it. Here's what I have. Does it seem correct? (ns cljstudent.sqlite (:require [clojure.contrib.sql :as sql])) ;; need this to load the sqlite3 driver (as a side effect of evaluating the expression) ;;(Class/forName org.sqlite.JDBC) (def db-path /home/melipone/cljstudent/places.sqlite) (def db-specs {:classname org.sqlite.JDBC, :subprotocol sqlite, :subname db-path}) (def db-query select * from moz_places where visit_count 100) (defn get-data [] (sql/with-connection db-specs (sql/with-query-results results [db-query] (doall results On , willyh wheine...@gmail.com wrote: I'm using the sqlite-jdbc jar from a maven repository. I use this in my leiningen project to fetch it: [org.xerial/sqlite-jdbc 3.7.2] I haven't had any issues with it, but that doesn't mean you won't. On Nov 9, 12:50 pm, labwor...@gmail.com wrote: sqlite3 had some problems but a later version (3.7.9) seems to work. Now the sqlitejdbc jar on clojars version 0.5.6 has the same problems as the old sqlite3 command line. Basically, I get this error below when reading certain .sqlite files. Is there a latest version of the sqlitejdcb driver for clojure? cljstudent.sqlite= (get-data) java.sql.SQLException: file is encrypted or is not a database (NO_SOURCE_FILE:0 -- 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: Re: sqlitejdbc jar on clojars
Sorry, I had my query wrong. This driver does work now. Thanks! On , willyh wheine...@gmail.com wrote: I'm using the sqlite-jdbc jar from a maven repository. I use this in my leiningen project to fetch it: [org.xerial/sqlite-jdbc 3.7.2] I haven't had any issues with it, but that doesn't mean you won't. On Nov 9, 12:50 pm, labwor...@gmail.com wrote: sqlite3 had some problems but a later version (3.7.9) seems to work. Now the sqlitejdbc jar on clojars version 0.5.6 has the same problems as the old sqlite3 command line. Basically, I get this error below when reading certain .sqlite files. Is there a latest version of the sqlitejdcb driver for clojure? cljstudent.sqlite= (get-data) java.sql.SQLException: file is encrypted or is not a database (NO_SOURCE_FILE:0 -- 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: statistics library?
Yes, those errors in Incanter are unfortunate. I had another weird one occurred which David Liebke attributed to the underlying Colt library. user= (sd (repeat 9 0.65)) NaN The sd function calls the variance function, which calls a function in Colt; the trouble is Colt is returning a number very, very close to zero, but just a bit under (ie it's negative) user= (variance (repeat 9 0.65)) -1.1102230246251565E-16 and the sqrt of a negative number is NaN. On , Lee Spector lspec...@hampshire.edu wrote: I need to do some pretty simple statistics in a Clojure program and Incanter produces results that I think must be wrong (details below). So I don't think I can trust it. Is there other code for statistical testing out there? Or maybe somebody could explain to me how to interpret the seemingly anomalous Incanter results? (I received no reply on the Incanter list). I only need a t-test at the moment, but this is a bit of a pain to code from scratch (because of the table that it uses). I'm trying to use an un-paired, two-tailed t-test to tell whether the means of two sets of numbers differ significantly. (Whether or not this is the right test for my application -- eg whether the assumptions of normal distributions are valid -- is another matter. I just want to know it the tests are being calculated correctly.) If I understand correctly the t-test should produce a p-value which ranges from 0 to 1. If it's less than 0.05 we can say that the means differ. (Again, there would be more to say here about what's statistically meaningful, but that discussion isn't relevant to my question). Again, if I understand correctly, under no circumstances should the p-value ever be outside of the range from 0 to 1. It's a probability, and no value outside of that range makes any sense. But Incanter sometimes returns p-values greater than 1. Sometimes it seems to give reasonable results: = (use 'incanter.stats) nil = (t-test [2 3 4 3 2 3] :y [3 4 5 6 5 4 3]) {:conf-int [-2.6129722457891322 -0.2917896589727722], :x-mean 2.8335, :t-stat -2.7883256115163184, :p-value 0.018335366451909547, :n1 6, :df 10.519255193727584, :n2 7, :y-var 1.2380952380952408, :x-var 0.5658, :y-mean 4.285714285714286} But in other cases the :p-value is over 1. Here's an example from Incanter's own documentation: = (t-test (range 1 11) :mu 0) {:conf-int [3.33414941027723 7.66585058972277], :x-mean 5.5, :t-stat 5.744562646538029, :p-value 1.9997218039889517, :n1 10, :df 9, :n2 nil, :y-var nil, :x-var 9.166, :y-mean nil} Here's an example that's closer to what can arise in my application, and again I just don't see how the calculation can be right if it's producing this kind of p-value: = (t-test '(40 5 2) :y '(1 5 1)) {:conf-int [-39.46068349230474 66.12735015897141], :x-mean 15.666, :t-stat 1.0866516498483223, :p-value 1.6115506955016772, :n1 3, :df 2.0477900396893336, :n2 3, :y-var 5.332, :x-var 446.37, :y-mean 2.3335} Am I missing something that would rationalize these results? If not, then does anyone have a pointer to more reliable statistics code in Clojure? Or pointers to using a Java library? I see that there are libraries out there -- eg http://commons.apache.org/math/api-1.2/org/apache/commons/math/stat/inference/TTest.html -- but Java interop is not my strong suit and I'm not sure how to call this from my Clojure code. Any pointers would be appreciated. Thanks, -Lee -- 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
lein repl newbie question
I like the lein repl. However, when I try to exit I get this error below. Any ideas? user= (System/exit 0) Exception in thread Thread-3 java.lang.RuntimeException: java.lang.IndexOutOfBoundsException at parsepcap.scrapeindex= (System/exit 0) Exception in thread Thread-3 java.lang.RuntimeException: java.lang.IndexOutOfBoundsException at clojure.lang.AFn.run(AFn.java:28) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IndexOutOfBoundsException at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:102) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:90) at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) at leiningen.repl$copy_out_loop.invoke(repl.clj:87) at leiningen.repl$repl_client$fn__2971.invoke(repl.clj:93) at clojure.lang.AFn.run(AFn.java:24) ... 1 more -- 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: Re: lein repl newbie question
well, I was doing control+c which works too. How is control+d different? On , Islon Scherer islonsche...@gmail.com wrote: Have you tried control+d? -- 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
clojars question
I'm confused on what version to obtain from clojars for enlive. I see 1.2.0-alpha1 dated yesterday but I also see 2.00 dated from August. Which one should I pick? are there several versions? Please enlighten me. -- 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: Re: clojars question
Thanks. It does get confusing some times. On , Mark Rathwell mark.rathw...@gmail.com wrote: Anyone can create their own account on clojars and publish their own forks to their own group name. There are 22 forks of enlive on github, the original is by Chrisotphe Grand [1], [2]. His most recent version published to clojars is 1.0.0. Generally, people try not to publish their own forks to clojars unless they have good reason (eg the original is no longer maintained, or will not accept desired patches, or doesn't publish quickly enough, etc.). Unless there is something in one of the forked versions that you want, I would use the original: [enlive 1.0.0]. You may, however, want to post to the enlive group [3] to see if maybe there is a reason to use one of the other versions. [1] https://github.com/cgrand/enlive [2] http://clojars.org/enlive [3] http://groups.google.com/group/enlive-clj On Wed, Sep 21, 2011 at 5:12 PM, labwor...@gmail.com wrote: I'm confused on what version to obtain from clojars for enlive. I see 1.2.0-alpha1 dated yesterday but I also see 2.00 dated from August. Which one should I pick? are there several versions? Please enlighten me. -- 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 -- 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: Re: clojure and emacs
Thanks, that's a good idea and best of all, it's working for me! I didn't know the Mx cd command to change default directory. On Sep 3, 2011 9:40pm, Benny Tsai benny.t...@gmail.com wrote: Sorry, what I meant to say in the last line is: And as long as you start emacs somewhere in your lein project directory (or Mx cd to it), you'll automatically be dropped into the main namespace (if you have one defined via :main in project.clj), and the other project namespaces will be available to (require ...) in your REPL buffer. On Saturday, September 3, 2011 7:32:28 PM UTC-6, Benny Tsai wrote:You can set lein repl as your inferior lisp program via: Mx describe-variableinferior-lisp-program And as long as you start emacs somewhere in your lein project directory (or Mx cd to it), you'll have all the libraries loaded in your REPL buffer. On Thursday, September 1, 2011 11:03:13 AM UTC-6, melipone wrote:I do like lein repl on the command line. How can I have that in emacs? Basically, if I have a project in Lein, how can I do a (require 'projectname) and have all the libraries loaded in emacs? I'm just using Mx inferior-lisp at this point. I find swank-clojure too complex for right now. Maybe later. TIA melipone -- 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
clojure and emacs
I do like lein repl on the command line. How can I have that in emacs? Basically, if I have a project in Lein, how can I do a (require 'projectname) and have all the libraries loaded in emacs? I'm just using Mx inferior-lisp at this point. I find swank-clojure too complex for right now. Maybe later. TIA melipone -- 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
newbie questions
(1) I have followed the Getting started steps and installed clojure-mode in Emacs. However, when I edit a .clj file, I am in clojure-mode (Ch m) but no clojure on the menubar. There should be one, right? What am i missing. (2) I just use Mx inferior-lisp. But how do you get out of clojure? I tried (exit) or (quit) or .System.exit(0) but none worked. TIA -- 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
Stanford AI Class
As most of you probably already know, Peter Norvig and S. Thrun will offer a free online intro to AI class in the Fall. The problem is that it will probably require Python since the third edition of the book is in Python. I am somewhat upset that this will make Python the de facto language of AI for a very large number of students. I was hoping for Clojure frankly or have some breathing room. Anybody knows anything about that? -- 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: Re: Stanford AI Class
But it could also mean that you are expected to learn Python while taking the class. On Aug 8, 2011 4:17pm, Mark Engelberg mark.engelb...@gmail.com wrote: The course website (for the actual classroom-based class that underlies the online class) doesn't list any programming language as a prerequisite. The only prerequisites listed are a strong understanding of probability and linear algebra. -- 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: Crack-proofing the Scratch Lottery Code [long]
But that doesn't help me win the lottery :-) On Feb 9, 2011 6:21am, Ken Wesson kwess...@gmail.com wrote: It's likely that many of you have read, or at least encountered links to, this Wired article recently: http://www.wired.com/magazine/2011/01/ff_lottery/all/1 In it, a particular tic-tac-toe themed scratch lottery is examined in detail. A mathematician, Mohan Srivastava, discovered weaknesses in it and many similar lotteries. The article claims: Fundamentally, he believes that creating impregnable tickets is extremely difficult, if not impossible. “There is nothing random about the lottery,” he says. “In reality, everything about the game has been carefully designed to control payouts and entice the consumer.” Of course, these elaborate design elements mean that the ticket can be undesigned, that the algorithm can be reverse-engineered. The veneer of chance can be peeled away. I had my doubts whether it was impossible to make it secure while still controlling payouts so I took a stab at writing my own algorithm to generate tic-tac-toe cards that follow the same rules as the ones depicted in the Wired article. Particularly, the player gets 24 hidden numbers, selected from the numbers between 1 and 39 inclusive, and eight tic-tac-toe boards with exposed numbers. No board has two of the same number; no board has more than one winning row, column, or diagonal; and all of the rows, columns, and diagonals on the board have the same prize values. My thought was to use a two stage process. First, generate the part of the ticket visible without scratching anything. Then, generate the 24 hidden numbers, in such a way that the same visible-part can be made a winner or a loser. Of course it's a bit more complex than just that. The 8 visible tic-tac-toe grids cannot be truly random without it being impossible to get a desired statistical distribution of prizes. So the grid generation has to be constrained somewhat. Eventually I came up with a program that produces visible-parts that the user can, with some difficulty, assort into five distinguishable species with three subspecies each, but I tuned the hidden-number algorithm so that the average payout for all combinations is roughly a dollar (with the ticket price being three, and also the minimum non-zero prize, so the house should make about two bucks a ticket on average, coming out in the black). Therefore the user cannot game the distinguishable species and subspecies to cherry-pick any subset of tickets with a statistically significantly higher expected payout. In particular they can expect to lose a couple of bucks on each ticket no matter what numbers they see in the uncovered part of that ticket. Here is a sample ticket generated with this program by calling (create-ticket): [(3 4 6 11 13 14 15 16 17 18 19 20 ; hidden numbers 21 24 27 28 29 30 32 33 34 35 37 39) (((37 33 10) (35 25 17) ; upper left tic-tac-toe grid (26 15 3)) ((10 3 37) (17 25 33) ; upper right grid (34 15 26)) ((23 18 39) (14 24 5) ; second-to-top left (22 31 27)) ((37 3 10) (33 25 17) (26 15 27)) ((6 13 7) (20 1 2) (8 11 30)) ((37 33 10) (29 25 17) (26 15 35)) ((28 34 38) (36 19 30) ; lower left (13 9 12)) ((6 18 7) (4 1 2) ; lower right (8 11 34)))] There are a few patterns that might leap out at more mathematically inclined readers; certain of the number positions, such as the center and upper corners, have only four possible values with two of them more common than the other two. This is unavoidable but it is also the case that these patterns cannot be used to guess the prize amount without knowing the hidden numbers. In fact the most that can be determined from them is whether it has about a 1 in 3 chance of being a $3 winner and a 2 in 3 chance of losing, an almost certain loser with a 1% chance of winning $100, or able to generate a variety of prizes other than $3 and averaging $1 per ticket. The most serious weakness here is that a thrill-seeking player can, in theory, zero in on roughly half of the tickets as having no chance to generate the big-money prizes ($250 and up) and avoid those. They can't, however, game these tickets to alter substantially their expected loss of $2 per ticket bought. The above has three discernible groups of grids: four with 25 in the center, two with mostly smaller numbers, and two more. This indicates that it's a species likely to produce 0, 1, or 2 winning grids and very unlikely to produce more; the bottom left corner is one of the odd ones and the top right isn't so it probably belongs to the varied-prizes subspecies capable of generating the big $50,000 maximum prize. The odds of a ticket like this one winning $50,000 are
Newbie question
Which natural language processing tools have you used that worked well with clojure? -- 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: Re: Clojure for NSF grant funding
All I know is that you have to show educational value for NSF. So, funding for development should be accompanied by teaching or lecturing. On Jul 7, 2010 4:14pm, Luc Préfontaine lprefonta...@softaddicts.ca wrote: Here in Canada we have a number of programs for RD and the bureaucratic burden is not worth the $$$ you get back for it except if you a budget in the 6 digits range. And if you want to get the paper done by a consultant, he/she will charge 20% of the expected refund. I looked at the NSF documentation and I am not convinced that the red tape is minimal. You certainly loose some flexibilty by having to get scope changes approved by them. Anyone got involved with them ? Luc P Sent from my iPod On 2010-07-07, at 14:49, David Blubaugh davidblubaugh2...@gmail.com wrote: To All, I am extremely interested in LISP and Clojure. I was wondering if it would be possible to obtain NSF grant funding for further development of Clojure ?? thanks, David Blubaugh -- 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 -- 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 Conference Poll
DC Clojure vacation + Friday tutorial On Jan 22, 2010 12:36pm, dysinger t...@dysinger.net wrote: We will be organizing a conference in the next month for 2010 (probably in the fall). One question I would like to ask is, given the conference is probably going to be a 2-day conference, would you rather have it during the week or weekend ? I would think a weekend (meet greet friday night, saturday sunday) would work good. -Tim -- 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