clojure.contrib.repl-utils.show and bigint

2009-04-22 Thread miki
Hello All, Is the fact that the output of (show java.math.BigInteger) and (show bigint) differ is a bug or a feature? :) All the best, -- Miki --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure"

Re: clojure.contrib.repl-utils.show and bigint

2009-04-22 Thread miki
Hello, > > Is the fact that the output of (show java.math.BigInteger) and (show > > bigint) differ is a bug or a feature? :) > > java.math.BigInteger is a class. > > bigint is a function. > > Differing output from show is expe

ANN: WebDriver wrapper

2009-12-04 Thread Miki
Hello All, A wrapper for WebDriver (http://code.google.com/p/selenium/) can be found at http://github.com/mikitebeka/webdriver-clj. Have fun testing your web site. Since I'm both a Clojure newbie and a WebDriver newbie I'm expecting a lot of enlightenment in the near future :) Thank

Web testing with Selenium

2009-12-28 Thread Miki
/parallel-clojure-example. Since I'm new to Clojure, any comments will be greatly appreciated. Thanks, -- Miki -- 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 f

"Wrapping" Java object

2010-03-02 Thread Miki
Hello All, I wrote a little utility that "wraps" Java object into a hash map (coming to think of it, "wrap" is not that good name). The code is at http://bitbucket.org/tebeka/clojurewise/src/tip/wrap.clj. Since I'm a Clojure newbie, I'll be glad to hear any comment

Re: "Wrapping" Java object

2010-03-02 Thread Miki
ction uses beans reflection, you   > should take a look at it. Ah, nice to know I've (poorly) implemented the "bean" function :) Thanks for the information, I keep on learning... All the best, -- Miki -- You received this message because you are subscribed to the Google Groups

Re: Beginning Clojure. Recursion

2010-03-24 Thread Miki
t;       word-map >       (recur (rest my-words) (merge-with + word-map {(first my-words) > 1}) You can also use "frequencies" from c.c.seq-utils (http:// richhickey.github.com/clojure-contrib/seq-api.html#clojure.contrib.seq/ frequencies) HTH, -- Miki -- You received this m

newInstance with parameters?

2010-03-26 Thread Miki
IllegalArgumentException: No matching method found: newInstance for class java.lang.Class (NO_SOURCE_FILE:0) user=> I can't use the "new" macro since I store several classes in a hash and pick the one I want in runtime (factory like). newInstance with no argument work though: user=

Re: converting long string to number

2010-03-26 Thread Miki
> You want (java.math.BigInteger. "2342343..."). java.lang.Integer is > limited to 2^31-1. Clojure has a "bigint" function, so (bigint (apply str (re-seq #"[0-9]+" big-num-str))) will work as well. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: newInstance with parameters?

2010-03-26 Thread Miki
-array Object args)) >     (.newInstance c))) Works like a charm, thanks! -- Miki -- 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

Re: Questions about program design

2010-04-27 Thread Miki
me are http://mitpress.mit.edu/sicp/full-text/book/book.html and http://www.paulgraham.com/onlisptext.html HTH -- Miki -- 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 post

Re: Artificial Intelligence in Clojure

2010-05-15 Thread Miki
You can use Weka (java). On May 14, 10:56 pm, nathaniel wrote: > I saw a post about this from June 2009 or thereabouts, but it did not > get much follow-up.  I'm curious about AI libraries for Clojure, > partly since I imagine some Lisp AI code could be translated to > Clojure fairly easily.  I a

Looking for new maintainer for "fs"

2017-02-08 Thread Miki
Hi There, We're looking for a new maintainer for "fs". See https://github.com/Raynes/fs/issues/106 and https://github.com/clojars/clojars-web/issues/618 for context. If you're able and willing, please ping me. Thanks, -- Miki -- You received this message because you a

Re: Looking for new maintainer for "fs"

2017-02-17 Thread Miki
org :D > > Andrey > > On Wed, Feb 8, 2017 at 3:33 PM, Miki > > wrote: > >> Hi There, >> >> We're looking for a new maintainer for "fs". >> See https://github.com/Raynes/fs/issues/106 and >> https://github.com/clojars/clojars

[ANN] New maintainer for "fs"

2017-02-19 Thread Miki
Hi, Andrey Antukh has kindly volunteered to step up as the mainatiner of "fs". He'll fork from Raynes and can update clojars. I'm sure he'll give more details later on. All the best, -- Miki -- You received this message because you are subscribed to the Google Groups

Re: Macros, any reading suggestion?

2010-06-03 Thread Miki
t's about common lisp, but taught me a lot about macros. HTH, -- Miki -- 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 - ple

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Miki
Hello David, > while aleph (via Netty) is easily getting 600-700 rq/s > even if I'm writing to a database (CouchDB). Can you share the code for this? All the best, -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: bigint discrepency

2010-07-10 Thread Miki
mes from Java's implementation of BigInteger user=> (new BigInteger "1.5") java.lang.NumberFormatException: For input string: "1.5" (NO_SOURCE_FILE:0) user=> (new BigInteger "1") 1 However I agree Clojure should fix that. All the best, -- Miki -- You received this mess

Re: Databases for a Concurrent World

2010-07-10 Thread Miki
Hello David, > http://dosync.posterous.com/22516635 I'm interested to see what will be CouchDB numbers when there are indexes on the data. In my experience, this is a speed killer. All the best, -- Miki -- You received this message because you are subscribed to the Google Groups

Re: Recent builds have failed on http://build.clojure.org

2010-07-10 Thread Miki
> The current build.clojure.org is about to be replaced. We have a new build > box that we should be pointing the DNS to, hopefully this weekend. Maybe clojurebot can announce build results in #clojure? Miki -- You received this message because you are subscribed to the Google Groups &q

Re: processing sequence/collection of functions

2010-08-04 Thread Miki
user/f1 user=> (defn f2[] 2) #'user/f2 user=> (defn f3[] 3) #'user/f3 user=> (def v [f1 f2 f3]) #'user/v user=> (map #(%) v) (1 2 3) HTH, -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: Somnium.congomongo missing contribs json

2010-08-30 Thread Miki
Try using [congomongo "0.1.3-SNAPSHOT"] in project.clj. Works for me with 1.2. On Aug 30, 1:37 pm, Linus Ericsson wrote: > I have problems loading somnium.congomongo. > > My Leiningen project.clj looks like this: > > (defproject system1 "0.1.0" >   :description "System1" >   :dependencies [ >    

Re: Multimethods and multiple bodies method

2010-09-01 Thread Miki
ot;}) You can read more about multimethods http://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples/Multimethod HTH, -- Miki On Sep 1, 9:26 pm, HB wrote: > Hey, > How a multimethod in Clojure differs from a method that have multiple > bodies? > When to use each approac

Re: multiple parameters passed to fns

2010-09-02 Thread Miki
Hello Glen, I'd use the first two forms to set startidx and size and then call the "full" form: (def inf java.lang.Double/POSITIVE_INFINITY) (defn make-target "Parses text file for single sweep specified by sweepidx. If size is not specified will parse till end of sweep. If startidx and si

Re: Thinking in Clojure

2010-09-02 Thread Miki
I'd go over SICP, though it not in Clojure but in Scheme - it will show you how to "think" functional. On Sep 2, 6:29 pm, HB wrote: > Hey, > I finished reading "Programming Clojure" and "Practical Clojure" and > I'm hooked :) > Please count me in the Clojure club. > But I failed how to think in C

Shootout "fannkuch"

2010-09-02 Thread Miki
tebeka/shootout-clj/src/tip/fannkuch.clj All the best, -- Miki -- 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

Re: Shootout "fannkuch"

2010-09-03 Thread Miki
> Fannkuch has required the permutations to be generated in a particular > order for years because too many programmers contributed programs that > did not generate some of the permutations or used faster algorithms to > generate the permutations. I've read several implementation so far and I'm sti

Re: drop-while and (pred item) returns nil?

2010-09-09 Thread Miki
Boolean seems to work: user=> (drop-while #(< % 4) (range 10)) (4 5 6 7 8 9) user=> On Sep 9, 2:51 pm, Jacek Laskowski wrote: > Hi, > > According to drop-while doc, (pred item) will return nil. It struck me > as I thought the form would only return a boolean. Is the doc correct? > What would be

Re: simplest graphics?

2010-09-14 Thread Miki
Maybe the ants demo will help - http://tinyurl.com/29rqe5r On Sep 14, 9:55 am, Lee Spector wrote: > I'm looking for a way to do simple colored-lines-and-shapes graphics in a > window that requires: > > - No libraries beyond what is built into java, clojure 1.2, and > clojure-contrib (which is w

Re: Displaying POSTed string from form text-field in Compojure

2010-09-17 Thread Miki
My *guess* it's somehow connected to the code of "view-layout" since it shows the representation of the function "str". Can place the full code (including view-layout) somewhere? On Sep 17, 12:35 pm, Victor wrote: > Hi all, > > I'm having a problem that may or may not be Compojure specific, so I

datastore not saving? [appengine-clj]

2010-09-17 Thread Miki
one "2"})) (count (select "users")) The last statement return 0, so it looks to me that nothing was saved. What am I doing wrong? Thanks, -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: datastore not saving? [appengine-clj]

2010-09-17 Thread Miki
Found it, should be "user" (singular) On Sep 17, 2:56 pm, Miki wrote: > Greetings, > > I'm trying to use appengine-clj (http://github.com/r0man/appengine- > clj) datastore and having a problem. This is probably not a bug but > something I'm missing. > >

Re: Displaying POSTed string from form text-field in Compojure

2010-09-17 Thread Miki
my input is strings-- which doesn't seem to be the > case, and there are no "parseString" methods that I could use instead. > > Thank you, > Victor > > > > On Fri, Sep 17, 2010 at 5:30 PM, Miki wrote: > > My *guess* it's somehow connected to the code

Re: Clojure meetup group listing

2010-09-20 Thread Miki
The L.A. one is at http://www.meetup.com/Los-Angeles-Clojure-Users-Group/ On Sep 20, 8:33 am, Andrew Gwozdziewycz wrote: > Hey All, > > I know there are certainly a few groups out there (organized via > Meetup.com or otherwise) which I see things posted about from time to > time on the list. I'd

clojure-contrib wiki on Google Code

2010-09-24 Thread Miki
. Maybe write a disclaimer on the page that things have moved? All the best, -- Miki -- 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 - pl

Re: Looking for more affordable sleeping options for clojure-conj

2010-09-28 Thread Miki
Maybe http://www.couchsurfing.org/ will be of help? On Sep 28, 6:58 am, Scott Jaderholm wrote: > Hey guys, > > I'm looking for one of the following more affordable sleeping options at > clojure-conj (Thu, Fri, and Sat nights): > > 1) Someone willing to gift or rent space for an air mattress in th

Re: Project Euler problem 14: Maybe it's me but hash maps don't seem to work

2010-10-07 Thread Miki
FWIW: I've used the built in "memoize" and had not problem. You can view my solution at http://bitbucket.org/tebeka/euler-clj/src/tip/14.clj On Oct 6, 10:46 pm, Jarl Haggerty wrote: > Problem 14 on project Euler is to find the number under 1,000,000 that > is the start of the longest Collatz sequ

Re: Newbie - Map to String

2010-10-08 Thread Miki
Note that apart from the answers above, you'll probably need to encode the parameters, something like: (import 'java.net.URLEncoder) (defn encode [s] (URLEncoder/encode s)) (defn urlencode [s] (apply str (interpose "&" (for [[k v] d] (str (encode (name k)) "=" (encode v) -- You receive

BigInt + 0.5 = Infinity?

2010-10-08 Thread Miki
If the following intentional? user=> (defn fact [n] (reduce * 1 (range 1 (inc n #'user/fact user=> (fact 1000) 402387260077093773543702433923003985719374864210714632543799910... user=> (+ 0.5 (fact 1000)) Infinity -- You received this message because you are subscribed to the Google Grou

Re: [ANN] fs - file system utilities for Clojure

2011-03-16 Thread Miki
> We are planning to use this file system utilities, and we need a function > to get file extension. Currently we're using apache common for that, but we > want to get rid of apache common altogether. Can you add this functionality > to the fs.clj? Thx > > Added in 0.7.1 (thanks to Steve Mi

Re: [ANN] fs - file system utilities for Clojure

2011-03-18 Thread Miki
st. However I don't have access to a windows machine to make sure this work. You can track this bug at https://bitbucket.org/tebeka/fs/issue/4/dirname-test-fails-on-windows All the best, -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: [ANN] fs - file system utilities for Clojure

2011-03-21 Thread Miki
I *think* it's fixed, can you test with the latest sources in bitbucket? -- 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 w

Re: [ANN] fs - file system utilities for Clojure

2011-03-21 Thread Miki
h to be right depending on the OS, meaning \ on windows and / on *nix. HTH, -- Miki -- 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 -

Re: Clojure Code Highlighting in Presentations

2011-04-03 Thread Miki
f VIm showing the code, this we done in http://goo.gl/wAbXY HTH, -- Miki -- 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

Re: Parallelism

2011-04-30 Thread Miki
I think you'll find http://blip.tv/file/4645227 relevant to the subject. I shows the inner working of pmap. -- 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

Re: Multi-level bucketing problem

2011-05-02 Thread Miki
One way is not to use a tree structure but to aggregate by "composed" keys, starting with [:attr1] then [:attr1 :attr2] ... (defn sum-by [data attrs] (let [aggregated (group-by (apply juxt attrs) data)] (zipmap (keys aggregated) (map #(reduce + (map :mv %)) (vals aggregated) (println

Re: How to convert a string to a data structure

2011-05-25 Thread Miki
read-string -- 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 em

Re: fs and with-tempdir

2011-05-27 Thread Miki
I've opened https://bitbucket.org/tebeka/fs/issue/5/with-tempdir-macro and will try to get to it soon. If you'd like to submit a patch (with test and documentation) ... ;) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send em

Re: fs and with-tempdir

2011-05-29 Thread Miki
> Cool, I'll clean up the code and submit it along with tests and docs. While > Im about it i may as well write the equivalent macro for tempfile. > Thanks! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloju

Re: fs and with-tempdir

2011-05-31 Thread Miki
Just uploaded fs 0.8.0 to clojars with your changes. Thanks! (I've changed the assert in your code to :pre checks) -- 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 m

Re: CSV Handling

2011-06-06 Thread Miki
http://clojars.org/search?q=csv -- 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

Re: Best practice for distributing a standalone clojure command line utility

2011-06-16 Thread Miki
> A few approaches I have thought about: 1) Upload the stand alone jar > to github and have the "gantry" script pull down the standalone into > ~/.gantry and construct the command line. 2) Create a cake wrapper > (not preferred because it introduces a dependency). 3) Forget the > wrapper and

Re: Best practice for distributing a standalone clojure command line utility

2011-06-16 Thread Miki
One more option is to embed the jar in base64 encoding in a script, extract the jar to a temp location and run it. The following Perl script does that (it uses the base64 executable, but you can probably use MIME::Base64 as well). #!/usr/bin/env perl $jar = "/tmp/lp-$ENV{USER}.jar"; unless (-e

Re: clojure-csv Extracting one column from each line

2011-06-17 Thread Miki
parse-csv returns a sequence of vectors. The "functional way" of traversing a sequence is using map: (ns foo (:gen-class) (:use clojure-csv.core)) (defn process-file "Process csv file and prints first item in every row" [file-name] (let [data (slurp file-name) rows (parse-csv

Re: Best practice for distributing a standalone clojure command line utility

2011-06-17 Thread Miki
Not my idea, can't recall where I've seen it first (nvidia driver?) -- 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 y

Re: clojure-csv Extracting one column from each line

2011-06-17 Thread Miki
So, it looks like by using slurp, there is still > lazy-io going on. > I don't think slurp is lazy. user=> (doc slurp) - clojure.core/slurp ([f & opts]) Reads the file named by f using the encoding enc into a string and returns it. nil user=> -- You received thi

PragPub July 2011 - A Clojure Edition

2011-07-06 Thread Miki
Greetings, PragPub for July 2011 is a Clojure edition. You can read it at http://pragprog.com/magazines/2011-07/content Enjoy, -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

Re: ANN: fs (Filesystem Utilities) 1.0.0 Released

2011-12-11 Thread Miki
Thank you Anthony! I'm happy that fs found a good home and I'm sure it'll be much more awesome now. Let the revolution begin! ;) -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Is ClojureCLR converging toward a release?

2010-10-13 Thread Miki
What's the status on Mono? On Oct 11, 3:39 pm, dmiller wrote: > Check out the downloads area onhttp://github.com/richhickey/clojure-clr. > Grab clojure-clr-1.2.0.zip.  Unzip, start up Clojure.Main.exe and you > should be running.  The zip also contains Clojure.Compile.exe, which > you can invoke

Re: clojure.java.*

2010-10-19 Thread Miki
> Just wondering what are the plans for clojure.java.* > > It used to be inhttp://richhickey.github.com/clojure/ > > but now that we are usinghttp://clojure.github.com/clojure > clojure.java.* is no longer listed. user=> (use 'clojure.java.io) nil Seems like it's there, just not documented. --

Re: (count (filter ...)) much slower in 1.3 Alpha 2?

2010-10-29 Thread Miki
I see the same problem: Clojure 1.3.0-alpha1 user=> (load-file "/tmp/foo.clj") "Elapsed time: 402.588654 msecs" 1 Clojure 1.3.0-alpha2 user=> (load-file "/tmp/foo.clj") "Elapsed time: 4584.271921 msecs" 1 On Oct 29, 9:41 am, Btsai wrote: > Could someone else also try the sample code I included

Re: Is this bug in Google AppEngine, appengine-clj or Clojure itself?

2010-11-03 Thread Miki
Does anybody know if this fix made it to the released jar? On Oct 17, 12:18 am, Mike Hinchey wrote: > I think it is caused by those 2 clojure bugs (which seem to be the same > thing).  You may be able to work around that problem by patching > appengine-clj to hint the method call to be on the pub

Re: Is this bug in Google AppEngine, appengine-clj or Clojure itself?

2010-11-04 Thread Miki
FYI: 0.4.1-SNAPSHOT has this fix On Nov 3, 11:07 am, Miki wrote: > Does anybody know if this fix made it to the released jar? > > On Oct 17, 12:18 am, Mike Hinchey wrote: > > > I think it is caused by those 2 clojure bugs (which seem to be the same > > thing).  You ma

Re: could clojure be androids joker card

2010-11-07 Thread Miki
You might find http://www.slideshare.net/smartrevolution/using-clojure-nosql-databases-and-functionalstyle-javascript-to-write-gextgeneration-html5-apps an interesting alternate approach. As I see it a language is a tool, and I'm still not convinced that Clojure is the right tool for UI. On Nov 7,

Macro help

2010-11-08 Thread Miki
SER bugs" (is (= (:user @session) "bugs")) (is (= (get-one session) "+OK Hello bugs\n"))) But I get the following error; Caused by: java.lang.Exception: Can't let qualified name: pop32imap- test/session I probably need to add some magic to the session e

Re: Macro help

2010-11-08 Thread Miki
ot; uses it. All the best, -- Miki -- 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 unsubs

Re: Macro help

2010-11-08 Thread Miki
bugs" (is (= (:user @session) "bugs")) (is (= (get-one session) "+OK Hello bugs\n"))) On Nov 8, 9:59 am, Miki wrote: > Hello Sunil, > > >  Just to elaborate on what I said before, session# creates a new symbol > > using gensym with a prefix session.

Re: Macro help

2010-11-08 Thread Miki
7;ll use ~ to say you want the value of (quote session) > (quote session returns the symbol session when evaluated). > > that is, use ~'session instead of just session. > > HTH, > > -- > Laurent > > 2010/11/8 Miki : > > > Greetings, > > >

Re: Macro help

2010-11-08 Thread Miki
>> that is, use ~'session instead of just session. > What you really want in this case is a binding. Try this: > ... > The added parameter just before the body specifies a name to bind the > session object to; this name can then be used in the body. This is good a well, but I prefer to dark magic s

Re: Macro help

2010-11-08 Thread Miki
> I just want to make sure *he* knows that this is considered > a little smelly: Clojure gives you the power to do stuff like this, > and it's appropriate to use it sometimes, but you should be careful - > it's hard for a reason. I know it smells, and regularly I won't use such a thing (didn't like

Re: clojure.core function decision tree

2010-11-10 Thread Miki
> How many methods, total, are in the java.lang classes, I wonder? Or > functions in the C standard library, or the C++ STL. It doesn't mean it's a good thing :) IMO there's another problem with many function in the core namespace - it becomes harder and harder to find good names for user function

Re: Newbie question

2010-11-13 Thread Miki
> Which natural language processing tools have you used that worked well with   > clojure? I haven't personally, but heard someone saying he successfully used clojure-opennlp. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: fastest way to remove nils

2010-11-16 Thread Miki
user=> (time (remove nil? (repeat 100 nil))) "Elapsed time: 0.079312 msecs" () user=> (time (filter identity (repeat 100 nil))) "Elapsed time: 0.070249 msecs" () Seems like filter is a bit faster, however YMMV On Nov 16, 4:48 pm, Glen Rubin wrote: > What is the fastest way to remove nils

Clojure on the AppEngine Talk

2010-11-18 Thread Miki
Greetings, I gave a short presentation on getting started with Clojure on the AppEngine tonight at the clj-la meetup. Slides can be found at https://docs.google.com/present/view?id=ah82mvnssv5d_1784s26pwsh Comments welcomed. Enjoy, -- Miki -- You received this message because you are

ANN: Dr. Evil - the evil web debugger

2010-11-21 Thread Miki
ot;) (EVIL "/evil") (route/not-found "Dude! I can't find it.")) Due to some problem with SSH keys in clojars there is not jar out, grab the sources from https://bitbucket.org/tebeka/dr-evil/src (the jar is there as well). Comments/criticism/improvements welc

Re: ANN: Dr. Evil - the evil web debugger

2010-11-22 Thread Miki
Now in clojars as well, use [dr-evil "1.0.0-SNAPSHOT"] in your project.clj On Nov 21, 2:57 pm, Miki wrote: > Hello All, > > Dr. Evil is a simple web debugger that provides a REPL to your web > application in a "hidden" location. > > Usage is simple - add

Re: hashCode?

2010-11-23 Thread Miki
equality testing and key generation (in hash tables). > if so what things can we assume about them? See http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#hashCode%28%29. Note that you can override hashCode in your code so it's not guaranteed to have the above behavior. HTH,

Re: ANN: Dr. Evil - the evil web debugger

2010-11-29 Thread Miki
> This is pretty useful, thanks! Glad someone other than me likes it :) > I tried adding Dr. Evil into a test app, but I'm having trouble > switching namespaces in the REPL: > > => *ns* > # > => (in-ns 'cv-test-1.core) > # > => *ns* > # > > It seems to always reset the namespace to clojure.core. Y

Re: ANN: Dr. Evil - the evil web debugger

2010-11-30 Thread Miki
> > I've tried some namespace hacking to allow the user to define the > > namespace, but couldn't make it work > > (there's a FIXME in the code about that). > > > Currently I using names with namespace - (cv-test-1.core/some-func > > arg1 arg2). Will try to fix that soon. > > Could (eval (read-st

appengine-clj and appengine 1.4 SDK error

2010-12-04 Thread Miki
://bitbucket.org/tebeka/biggieurl/src Thanks, -- Miki -- 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

Re: Tailing a file in Clojure

2010-12-05 Thread Miki
http://jnotify.sourceforge.net/ ? On Dec 3, 11:20 am, Stuart Sierra wrote: > On Dec 2, 10:55 pm, patrickdlogan wrote: > > > Java has a file watch API to avoid polling. Stuart Sierra uses it to > > good effect in lazytest. > > No, there is no such Java API that I am aware of.  Lazytest watches >

Re: math utilities question

2010-12-05 Thread Miki
Have you looked at Incanter? (http://incanter.org/) On Dec 5, 3:27 pm, Robert McIntyre wrote: > I'm trying to use clojure for scientific data analysis but I keep > running into lacunas of functionality. > > I'd love to hear the community's recommendations and experiences with this: > > Is there a

Re: appengine-clj and appengine 1.4 SDK error

2010-12-05 Thread Miki
Seems like the problem was with lein 1.4, see https://github.com/technomancy/leiningen/issues#issue/142 On Dec 4, 8:21 am, Miki wrote: > Greetings, > > My toy application stopped working after an upgrade to appengine SDK > 1.4, does anyone else have the same experience? Any soluti

Re: ANN: Dr. Evil - the evil web debugger

2010-12-06 Thread Miki
I've played a bit with the code and now namespaces behave. There's even a set-ns! function to set the current namespace to what you want. On Nov 30, 9:07 am, Constantine Vetoshev wrote: > On Nov 29, 2:25 pm, Miki wrote: > > > Yeah, it uses "load-string" w

Re: ANN: Dr. Evil - the evil web debugger

2010-12-07 Thread Miki
> > Comments/criticism/improvements welcomed. > > "EVIL" doesn't have to be a macro. You could just make it a function: > > (defn EVIL [path] >   (GET path [expr] >     (if (nil? expr) >       (html path) >       (json-str (eval-expr expr Right you are kind Sir. Pushed to clojars. -- You rec

Re: String-friendly first/rest?

2010-12-08 Thread Miki
> (.substring test 1 (count test)) "bc" FYI: Clojure has "subs" -> (subs test 1 (count test)) -- 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

Re: Adding an interface with (proxy) produces NoClassDefFoundError

2010-12-11 Thread Miki
the code again ("lein run"), it works. So there is some weird behavior with AOT compilation... No sure, but maybe it's related to https://github.com/technomancy/leiningen/issues#issue/141? HTH, -- Miki -- You received this message because you are subscribed to the Google Groups &quo

Re: Compile problem with clojureql

2010-12-12 Thread Miki
You probably need to add " :keep-non-project-classes true" to project.clj, see https://github.com/technomancy/leiningen/issues/#issue/141 On Sunday, December 12, 2010 3:34:29 AM UTC-8, manuel.weikert wrote:Hi, I'm trying to write a little tool that fetches data from the web and stores it to a mysq

Re: Clojure 1.3 Alpha 4

2010-12-14 Thread Miki
(defn fact [n] (reduce * (range 1 (inc n (fact 100) This produces the right result on 1.2 but "ArithmeticException integer overflow" on 1.3-alpha4. Is this intentional? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Getting body of HTTP POST in Compojure

2010-12-18 Thread Miki
le-post body)) (route/not-found "Sorry, can't find it.")) When I send the server a POST request, -1 is logged (which means not input available). Any ideas how to do it right? Thanks, -- Miki -- You received this message because you are subscribed to the Google Groups &qu

Re: HTML5 Validator

2010-12-18 Thread Miki
> > I'd like to unit test my html output for well-formedness. What's an > easy way to test it for HTML5 validity? Are there good Clojure libs > for this? I only need to check for validity, not parse. > > Not sure, but maybe you can use htmlunit? All the best

Re: Getting body of HTTP POST in Compojure

2010-12-18 Thread Miki
not a form, just a JSON object. Is there way to tell Comojure not to do this magic? Thanks, -- Miki -- 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 memb

Re: clj-http timeouts

2010-12-19 Thread Miki
> Does anyone know how to set connection or read timeouts for clj-http? I didn't see anything in the API. clj-apache-http has that option though (setting http.socket.timeout parameter). HTH, -- Miki -- You received this message because you are subscribed to the Google Groups

Time/size bounded cache?

2010-12-30 Thread Miki
094) The problem is that "seen" will grow without bounds. Is there a built in way to have some sort of LRU cache or should I use external libraries (like plru)? Thanks, -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" group. To p

Re: Time/size bounded cache?

2010-12-31 Thread Miki
I wrote a persistent LRU cache: > >https://github.com/scode/plru > > Yup, I've looked at it (mentioned in the original post). I might end up using it, thanks. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: A Web Server in Clojure

2010-12-31 Thread Miki
Both of these examples work for me (clojure 1.2). Is there an error on the console when you access the site? Also, if this is not a learning exercise, I recommend having a look at Compojure for web development. HTH, -- Miki -- You received this message because you are subscribed to the

Re: using aset in clojure-1.3-alpha4

2010-12-31 Thread Miki
> (aset (make-array Integer/TYPE 3 4 5) 1 2 3 -1) > can anybody tell me as to how to do this right? > > (aset (make-array Long/TYPE 3 4 5) 1 2 3 -1) I *think* that number by default are long, and the array is of ints. HTH, -- Miki http://clojurewise.blogspot.com/ -- You r

Re: Clojure Newbie trying to represent electrical circuit

2011-01-03 Thread Miki
You might be interested in reading http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-22.html#%_sec_3.3.4 (It's in Scheme, but I don't think you'll have hard time to translate). -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

#clojure in 2010

2011-01-04 Thread Miki
.clj All the best, -- Miki -- 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

Re: #clojure in 2010

2011-01-04 Thread Miki
If someone is interested in some other statistics, please let me know and I'll try to make it happen. -- 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 m

  1   2   >