[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: 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

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: GPU computing on core.matrix implementation

2014-08-09 Thread Miki Nobuhiro
#!forum/numerical-clojure > > > On Tuesday, 5 August 2014 16:22:17 UTC+8, Miki Nobuhiro wrote: >> >> Hello, everyone. >> I want to calculate matrix operations by GPU compuring, >> and here is my code. >> >> https://github.com/bobuhiro11/aparapi-matrix

Re: GPU computing on core.matrix implementation

2014-08-09 Thread Miki Nobuhiro
oup: > https://groups.google.com/forum/#!forum/numerical-clojure > > > On Tuesday, 5 August 2014 16:22:17 UTC+8, Miki Nobuhiro wrote: >> >> Hello, everyone. >> I want to calculate matrix operations by GPU compuring, >> and here is my code. >> >> https://gith

GPU computing on core.matrix implementation

2014-08-05 Thread Miki Nobuhiro
Hello, everyone. I want to calculate matrix operations by GPU compuring, and here is my code. https://github.com/bobuhiro11/aparapi-matrix https://clojars.org/aparapi-matrix Now, I have some questions. 1. aparapi-matrix uses Aparapi(https://code.google.com/p/aparapi/). Is this choice correct? A

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

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: 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

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
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-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: 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: 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: 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: 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-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: 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: 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: 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: 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: [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: [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-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-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: Web/Screenscraping Library?

2011-03-06 Thread Miki
https://github.com/nathell/clj-tagsoup seems to be in the right direction. You might consider wrapping HtmlUnit (which have XPath support) -- 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 No

Re: [Code Bounty] Implementing "ClojureScript" - command-line/sys-admin scripting with Clojure

2011-03-04 Thread Miki
> The first and biggest is the JVM startup time, I agree. Maybe newlisp (which starts up blazingly fast) will fit the bill better. -- 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

Re: processing a socket stream

2011-03-03 Thread Miki
> But how do I notify my working threads that the cache was updated? Are > there some (clojure) patterns that I can use? > > add-watch? (http://clojuredocs.org/clojure_core/clojure.core/add-watch) -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: Handling of unsigned bytes

2011-02-11 Thread Miki
> How on earth is one supposed to do communication programming (not to > mention handling binary files etc) without an unsigned byte type? > > I see that this issue has been talked about vaguely - is there a > solution? > http://www.darksleep.com/player/JavaAndUnsignedTypes.html ? -- You

Re: a handy little function I haven't seen before

2011-02-02 Thread Miki
FYI: There is clojure.contrib.repl-utils/show -- 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 un

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

2011-01-27 Thread Miki
> -I'd rather (copy-tree src dest) worked like "cp -R src dest" (including > when dest doesn't exist) rather than "cp -R src/* dest/". > Done in 0.6.0. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@go

Re: Problem Installing VimClojure + lein-vimclojure

2011-01-27 Thread Miki
> Does anybody know how to build the Nailgun client on Linux when using > VimClojure + lein-vimclojure? > > Clone the project from https://bitbucket.org/kotarak/vimclojure. Then "(cd client && make)", there should be a client/ng. HTH, -- Miki -- You receive

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

2011-01-24 Thread Miki
> > -I'd rather (copy-tree src dest) worked like "cp -R src dest" (including > when dest doesn't exist) rather than "cp -R src/* dest/". > > I agree, working on that. > -It would be nice if functions that create files or dirs (like mkdir and > touch) returned the new object's path, to allow ch

Creating standalone executable

2011-01-22 Thread Miki
the opinion of the community. 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 firs

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

2011-01-19 Thread Miki
> > I have one question, is there any documentation available for the > functions provided by fs? I would love a place where I could go to scan > the available functions, other than the source code. > https://bitbucket.org/tebeka/fs/src -- You received this message because you are subscribed t

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

2011-01-19 Thread Miki
l gladly add them. But this is just a bunch of file system functions. Also I don't see how users of the code suffer from having one short namespace. I'd appreciate some comments about need functionality, bugs, code reviews and such. All the best, -- Miki -- You received this messag

Re: Problem with garbage collection? Was Euler 14

2011-01-19 Thread Miki
> (defn cseq [n] > (if (= 1 n) > [1] > (cons n (cseq (if (even? n) > (/ n 2) > (+ (* 3 n) 1 )) > > (apply max-key count (map cseq (range 1 100))) > > Gives a heap error. > cseq is at most 525 elements long. > The solution is much more than 525 (> 80).

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

2011-01-14 Thread Miki
> First, I suggest that you look at the standard clojure.java.io package for > some useful functions that are already in Clojure 1.2. > Done in 0.3.0 (as well as some other added functions), thanks again. -- You received this message because you are subscribed to the Google Groups "Clojure"

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

2011-01-13 Thread Miki
> there is also this: > > https://github.com/jashmenn/clj-file-utils > Wasn't aware of this one, will have a look. At first glance it uses common.io and I tried to depend on clojure only. Thanks, -- Miki -- You received this message because you are subscribed to the Googl

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

2011-01-13 Thread Miki
> First, I suggest that you look at the standard clojure.java.io package for > some useful functions that are already in Clojure 1.2. In particular, you > could use io/file instead of (File. xxx) in your code to add some > flexibility to the kinds of things that can be treated as a "file". I

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

2011-01-13 Thread Miki
can get it from https://bitbucket.org/tebeka/fs/downloads/fs-0.2.0.jar 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 mode

Re: fs - file system utilities for Clojure

2011-01-13 Thread Miki
> > [fs "0.2.0-SNAPSHOT"] is out > > A SNAPSHOT is "out"? Please don't do this. If it is a release, get rid > of the SNAPSHOT. :( > > Done, please use [fs "0.2.0"] :) All the best, -- Miki -- You received this message because you are

[ANN] fs - file system utilities for Clojure

2011-01-12 Thread Miki
e, calling function on every step writeable? Check if path is writable Have fun, -- 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 m

Re: clojure.java.shell hanging issues

2011-01-06 Thread Miki
> Looking at the source code I'm not sure if the patches were applied. > Maybe there was a "regression". The symptoms seem consistent with what > was supposed to have been fixed. > > Following the clojure.org api docs, I clicked through on the source code > link on > > http://richhickey.github.c

Re: #clojure in 2010

2011-01-06 Thread Miki
If someone is interested in some other statistics, please let me know and I'll try to make it happen. > > >> > The most talkative person per session would be interesting :) though > perhaps session time is a PITA to establish particularly across days > boundaries. > Define "session" (a day? a su

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

#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 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,

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: 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: 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

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: 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

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: 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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 >

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: 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

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: 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-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

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

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

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

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: 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: 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: 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
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
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
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

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: 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,

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: 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: (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: 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: 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

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: 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

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: 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

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: 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

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: 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. > >

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: 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

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: 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: 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

  1   2   >