hash function behaves different with empty vector in clojure and clojurescript

2015-01-05 Thread Feng Xue
These days, I was trying to utilize function hash in clojure/clojurescript to generate unique id, but it turns out this function has very strange behaviour to empty vector parsed from read-string in cljs with in clj. In clojure, hash function return -2017569654 for empty vector and the one p

Re: Clojure web server benchmarks

2014-01-14 Thread Shen, Feng
Hi, nginx-clojure looks great! A small tip: ab may not be the best tool, since it's single threaded. A better tool is wrk: https://github.com/wg/wrk You can use wrk to better test nginx-clojure, It should perform even better than others. 沈锋 http://shenfeng.me On Tue, Jan 14, 2014 at 5:

Re: Nginx-Clojure Let You Deploy Clojure Web App on Nginx Without Any Java Web Server

2014-01-14 Thread Feng Shen
Hi, Thanks for your work on nginx-clojure. It looks great! As I know Nginx spawns many processes(correct me if I am wrong), does that mean, there will be many JVM process? On Tuesday, January 14, 2014 4:44:18 PM UTC+8, Xfeep Zhang wrote: > > > I have done the first one. The result is >

http-kit 2.1.16: bug fixes, new features

2014-01-03 Thread Shen, Feng
Hi, [http-kit "2.1.16"] Change log: https://github.com/http-kit/http-kit/blob/master/history.md 2.1.16 (2014/1/3) HTTP Client: follow 301, 302, 303, 307, 308 properly (thanks paulbutcher) 2.1.15 (2014/1/1) HTTP client:

Re: ANN: ClojureScript 0.0-2060

2013-11-21 Thread Feng Hou
cljs.core.Keyword(null, "end-line", "end-line", 2693041432), 3852, new cljs.core.Keyword(null, "end-column", "end-column", 3799845882), 69], null)), 0); No error in advanced mode though (optimized out?) Thanks, Feng -- -- You received this message because yo

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2060

2013-11-21 Thread Feng Hou
On Thursday, November 21, 2013 10:48:42 PM UTC-5, Tim Visher wrote: > Thanks for the patch, Feng. > > > > Patches don't tend to get discussed on the mailing list for Clojure. > > Do you have your CA signed yet? http://clojure.org/contributing > > > >

Re: ANN: ClojureScript 0.0-2060

2013-11-21 Thread Feng Hou
On Thursday, November 21, 2013 10:12:55 AM UTC-5, David Nolen wrote: > ClojureScript, the Clojure compiler that emits JavaScript source code. > > > README and source code: https://github.com/clojure/clojurescript > > > > New release version: 0.0-2060 > > > Leiningen dependency information: >

[ANN] http-kit 2.1.5 released, bug fix, please upgrade if using the Websocket API

2013-07-05 Thread Shen, Feng
Hi, [http-kit "2.1.5"] Just released, if you are using the Websocket API, please upgrade. This release fixes a bug reported by Andrew Rudenko: #68 Loop of Close frames 1. A WebSocket client like Autobahn.Android w

[ANN] http-kit 2.1.1. Bug fix release, please upgrade if using the WebSocket

2013-05-06 Thread Shen, Feng
Hi, It's a bug fix release. *If using the WebSocket support, please upgrade. All older version has this bug.* The bug is "Large websocket requests get corrupted". Detail: https://github.com/http-kit/http-kit/issues/47. And thanks Gal Dolber for reporting it. Condition this bug will be triggered:

Re: [ANN] http-kit 2.0.0 released

2013-05-04 Thread Shen, Feng
; On Friday, March 29, 2013 1:03:38 PM UTC+7, Feng Shen wrote: >> >> Hello folks. >> >> I just released version 2.0.0 of http-kit. >> > > Looks great, Feng Shen. > I couldn't find a road-map so I ask here. Will there be a client-side for > browsers in Cloju

Re: [ANN] http-kit 2.0.0 released

2013-05-04 Thread Shen, Feng
> I hope support autoload .It's very useful for develop! http://http-kit.org/migration.html#reload 沈锋 On Sat, May 4, 2013 at 9:08 PM, 张保良 wrote: > I hope support autoload .It's very useful for develop! > > 在 2013年3月29日星期五UTC+8下午2时03分38秒,Feng Shen写道: > >> Hel

Re: http-kit 2.0.0 released

2013-05-03 Thread Shen, Feng
TCP buffer to flush. 沈锋 On Sat, May 4, 2013 at 3:58 AM, Shantanu Kumar wrote: > Congratulations on the release! Could you please let me know whether > HTTP-Kit has built-in support for applying backpressure, and if it > does then how to configure the same? > > Shantanu > >

Re: [ANN] http-kit 2.0.0 released

2013-05-03 Thread Shen, Feng
e perf. improvements, is it client or server? > > Thx > > Las > > > 2013/5/3 Michael Klishin > >> >> 2013/5/3 Feng Shen >> >>> Compare to 2.0.0, noticeable changes: >>> >>>1. Much faster: about 30%~80% faster. >>>

Re: [ANN] http-kit 2.0.0 released

2013-05-03 Thread Feng Shen
bugs fixes 2. less RAM usage The full update log: https://github.com/http-kit/http-kit/blob/master/history.md Updated client documentation: http://http-kit.org/client.html On Friday, March 29, 2013 2:03:38 PM UTC+8, Feng Shen wrote: > > Hello folks. > > I just released ver

Re: http-kit on heroku?

2013-04-30 Thread Feng Shen
Hi, here is how to do hot code reload: http://http-kit.org/migration.html#reload On Monday, April 15, 2013 12:48:50 PM UTC+8, Wei Hsu wrote: > > Thanks guys, got it sorted out. > > If I may ask a followup question, how do you run it in development? > Pre-http-kit, I've been using lein ring se

Re: [GSOC 2013] Android UI as Clojure Data

2013-04-11 Thread Osbert Feng
Be sure to look at neko and lein-droid, both most recently being worked on by alexander-yakushev, I believe as a previous GSOC project: http://clojure-android.blogspot.com/ https://gist.github.com/alexander-yakushev/2907442 https://github.com/alexander-yakushev/lein-droid/blob/master/sample/src/cl

[ANN] http-kit 2.0.0 released

2013-03-28 Thread Shen, Feng
stand and use. The old's documentation can be found here <http://http-kit.org/server_old.html> - feng -- -- 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

Re: what is a good book about Java queues?

2013-03-09 Thread Feng Shen
Yes, the javadoc is quite good, paste a link here: http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/BlockingQueue.html On Friday, March 8, 2013 4:32:38 AM UTC+8, larry google groups wrote: > > > At some point on this mailist, someone suggested that to best understand > concurrency

Re: AOT and side-effects associated to ns initialization

2013-02-27 Thread Feng Shen
Hi, Another option: (ns you.ns // add :aot [you.ns] to project.clj (:gen-class)) (def server (atom nil)) (defn -main [& args]; command line args (reset! server (jetty/run-jetty #'app {:port 8000 :join? false}))) ;;; run it and pass command line arguments java -cp your-

Re: Building/inserting multiple records

2013-02-15 Thread Feng Shen
> Is it easy (and immutable) to build a collection of records to insert? I've been told CONJ is a good start. map maybe be helpful: (map (fn [d] return-map-of-records) datasets) > Does the clojure jdbc interface support insertion of multiple records? I haven't seen such a function yet. cloj

Re: Help on drafting a protocol for realtime communication between client and ring server

2013-02-15 Thread Feng Shen
Opps, this post is intended to be posted on the Ring group, sorry for the noise. On Friday, February 15, 2013 5:50:15 PM UTC+8, Feng Shen wrote: > > Hi, I am trying to draft a protocol for realtime communication between > client and ring server. > > http-kit <http://htt

Help on drafting a protocol for realtime communication between client and ring server

2013-02-15 Thread Feng Shen
both close the channel Useful for clean up. Status code: 0 if closed by sever, closed by client: -1 if streaming, websocket: http://tools.ietf.org/html/rfc6455#section-7.4.1";)) Thanks. Feng -- -- You received this message because you are subscribed to the Google Groups "C

Re: Packaging/Deploying Web App

2013-02-13 Thread Feng Shen
Hi, here is one solution: add (:gen-class) to the main namespace, add something in your project.clj :aot [rssminer.main, rssminer.admin] :main rssminer.main :uberjar-name "rssminer-standalone.jar" lein uberjar Package up the project files and all dependencies into a jar file java -jar

Re: Bootstrapping Web Apps

2013-02-12 Thread Feng Shen
Hi, here is what I did for rssminer (A Clojure web app): https://github.com/shenfeng/rssminer/blob/master/src/rssminer/main.clj define a main function, accept args from stdin, parse them, save the argument, call `start-server`, do init, bind to port, accept request On Wednesday, February

Re: Clojure + Web Services + Web Sockets

2013-02-12 Thread Feng Shen
I updated http-kit's server documentation: http://http-kit.org/server.html How http-kit is used to serve both HTTP and websocket: http://http-kit.org/server.html#routing Cheers, Feng On Tuesday, February 12, 2013 7:36:46 AM UTC+8, Ryan T. wrote: > > Thanks both for your answers.

Re: how to automatically and idiomatically add newlines to clojure code in emacs

2013-02-11 Thread Feng Shen
(defun indent-buffer () (interactive) (indent-region (point-min) (point-max))) (defun cleanup-buffer () (interactive) (indent-buffer) (untabify-buffer) (delete-trailing-whitespace)) ;; bind to other key if you like(global-set-key (kbd "M-q") 'cleanup-buffer) cleanup-buffer is very f

Re: Building a REST API / efficient RPC interface in Clojure

2013-02-08 Thread Feng Shen
Hi, I did something similar during work (we are using Clojure) 1. Use HTTP as the transport: browser ajax call, mobile API call, intertal use 2. JSON as encoding. Javascript support it natively, mobile can decode it easily, Clojure has very good support for it Clojure can decod

Re: ANN: http-kit 2.0.0.RC2, high performance HTTP Server & Client for Clojure

2013-02-08 Thread Feng Shen
Just to add: 2.0.0-RC3 released, with a general purpose timer added: http://http-kit.org/timer.html On Sunday, February 3, 2013 11:20:27 AM UTC+8, Feng Shen wrote: > > Hi, > > After extensive test, known bugs fixed, documentation ready, http-kit > reaches 2.0.0.RC2 >

Re: Clojure Wiki

2013-02-08 Thread Feng Shen
http://clojure-docs.org/ => http://clojuredocs.org/ On Friday, February 8, 2013 8:17:41 PM UTC+8, Konrad wrote: > > Hello, fellow clojurians! > > For the next couple of months (or until I get a new functional job), I'll > be working on honing my clojure skills, starting with getting a perspecti

Re: Simple Network Messaging

2013-02-07 Thread Feng Shen
For json, Clojure has a convenient lib: https://github.com/clojure/data.json for networking, how about using HTTP as the transport? Clojure has many libraries for HTTP server & client, c# has many libraries too. On Friday, February 8, 2013 5:44:06 AM UTC+8, JvJ wrote: > > I'm looking to d

Re: Sending Clojure Objects over TCP

2013-02-07 Thread Feng Shen
slacker - Transparent, non-invasive RPC by clojure and for clojure. https://*github*.com/sunng87/*slacker* * * 1. 2. On Thursday, February 7, 2013 9:16:03 AM UTC+8, JvJ wrote: > > Does anyone know if there's a simplified networking library that allows > this? -- -- You received

Re: Callbacks as Sequences

2013-02-06 Thread Feng Shen
I did something for a http lib: ;; get them concurrently(let [response1 (http/get "http://http-kit.org/";) response2 (http/get "http://clojure.org/";)] ;; handle responses one-by-one, waiting for response as necessary ;; other keys :headers :status :error :opts (println "response1: " (

Re: dictionary sort in sortedmap

2013-02-04 Thread Feng Shen
Hi, "11" < "2" if string, 11 > 2 if integer. Your keys are string, convert to integer if need numeric order. On Monday, February 4, 2013 6:37:13 PM UTC+8, Amir Wasim wrote: > > I want to sort a map by its keys according to dictionary when i do the > following > > (into (sorted-map) {"1" "A"

Re: ANN: http-kit 2.0.0.RC2, high performance HTTP Server & Client for Clojure

2013-02-04 Thread Feng Shen
964.05 [#/sec] (mean) ab -n 10 -c 100 -k http://127.0.0.1:8080 On Sunday, February 3, 2013 11:20:27 AM UTC+8, Feng Shen wrote: > > Hi, > > After extensive test, known bugs fixed, documentation ready, http-kit > reaches 2.0.0.RC2 > > [http-kit "2.0.0-RC2"]

Re: Why is this code so slow?

2013-02-03 Thread Shen, Feng
:42 PM, Shantanu Kumar wrote: > > > On Feb 3, 12:54 pm, Curtis Gagliardi > wrote: > > I took your version Feng and used rem instead of mod and added a type > hint > > and got down from: > > 23217.321626 => 11398.389942 > > > > No idea where to go from her

Re: Why is this code so slow?

2013-02-02 Thread Feng Shen
I can only think about a bit faster version: 46555ms => 23846ms for 20 (defn smallest-multiple-of-1-to-n [n] (let [divisors (range 2 (inc n))] (loop [i n] (if (loop [d 2] (cond (> d n) true (not= 0 (mod i d)) false :else (recur (inc d i

ANN: http-kit 2.0.0.RC2, high performance HTTP Server & Client for Clojure

2013-02-02 Thread Shen, Feng
ed to have a look, questions/comments/suggestions/whatever are welcome! Thanks @ptaoussanis and others for their contribution. Feng -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups

Re: is intellij idea a good ide for clojure development?

2013-01-29 Thread Feng Shen
I have programming Clojure for almost 2 years, for a living. Emacs is highly recommended. Emacs Lisp => lisp, Clojure is also Lisp. Emacs has special support for Lisp than others. As for intellj: I think it's quite good. Emacs is the perfect one. On Monday, January 28, 2013 7:37:54 PM UTC+8

Re: Clojure web server benchmarks

2013-01-25 Thread Feng Shen
Hey, thanks for point out latency, I haven't look at them deeply. Here is how http-kit compare to Nginx when concurrency is 96: Server Software:http-kit Server Hostname:127.0.0.1 Server Port:8087 Document Path: / Document Length:1163 bytes Concurr

Re: a question about running embedded jetty

2013-01-19 Thread Feng Shen
I did not know #'app is for reload. It's very helpful. Thanks. On Saturday, January 19, 2013 5:26:06 PM UTC+8, Baishampayan Ghose wrote: > > On Sat, Jan 19, 2013 at 5:24 AM, faenvie > > wrote: > > i have learned that for a ring/compojure-app the embedded jetty > > service can be started like t

Re: a question about running embedded jetty

2013-01-18 Thread Feng Shen
Hi: (var app) can be simplified to just app. The detail: app is a function: accept a request map, return a response map. your server's logic is in app. ( see ring spec https://github.com/ring-clojure/ring/blob/master/SPEC for more detail) (var app) or #'app: get the var (clojure.lang.Var) of t

Re: How to (easily) show the advantages of Clojure

2013-01-16 Thread Feng Shen
How about Clojure's web 1. Plain Clojure function as handler, request and response are just maps, they are printable. 2. Easy testable: handler is a function, pass a request, get the response, assert the response is wanted. 3. Easy mockable: use bindings to mock centain functions

Re: emacs - how to wean me off the family of Java IDEs

2013-01-16 Thread Feng Shen
d some time to set it up. Here<https://github.com/shenfeng/dotfiles/blob/master/emacs.d/feng-anything.el>is my config for your reference. rainbow-delimiters is helpful for my lisp coding. On Wednesday, January 16, 2013 10:29:36 PM UTC+8, Colin Yates wrote: > > Hi all, > >

Re: How to integrate front-end designers into Clojure/Ring/Jetty workflow?

2013-01-12 Thread Feng Shen
I have some similar experience, put here try to be helpful I am in a team: 1. 1 designer: No experience with Clojure, little knowledge about programming, but knowing HTML & CSS well 2. 1 fronend developer: No experience with Clojure, knowing JS & HTML well, 3. 2 Clojure coder.

Re: [ANN] Yet another {{mustache}} for Clojure

2012-07-19 Thread Shen, Feng
s in Stencil. > I'm not satisfied with those numbers, and will continue to push them > lower in future versions, but the 10x difference in runtime is clearly > no longer the case. > > David > > On Wed, Jul 11, 2012 at 8:50 PM, Shen, Feng wrote: > > Yes, you are right

Re: {ANN} ring.velocity: render apache velocity templates for ring in clojure.

2012-07-17 Thread Shen, Feng
同感enlive较复杂。前段时间,转向了Mustache。 沈锋 美味书签 http://mei.fm On Wed, Jul 18, 2012 at 11:59 AM, dennis zhuang wrote: > 其实就是几行代码封装下,我觉的velocity比什么enlive好用多了。 > > 2012/7/18 Shen, Feng > > 不错不错。 >> velocity 在java中用得较广。 >> 这样为potential 的 clojure用户铺了一下道路。 >> >> 沈锋

Re: {ANN} ring.velocity: render apache velocity templates for ring in clojure.

2012-07-17 Thread Shen, Feng
不错不错。 velocity 在java中用得较广。 这样为potential 的 clojure用户铺了一下道路。 沈锋 美味书签 http://meiwei.fm On Wed, Jul 18, 2012 at 12:00 AM, dennis zhuang wrote: > A little error in getting started missing :age > > (render "test.vm" :name "dennis" :age 29) > > > 2012/7/17 dennis zhuang > >> Hi,all >

Re: [ANN] Yet another {{mustache}} for Clojure

2012-07-11 Thread Shen, Feng
s to be totally > spec compliant and as fast as possible. However, implementing the slow > parts of the spec is important too. > > > On Wednesday, July 11, 2012 6:28:23 PM UTC-5, Feng Shen wrote: >> >> From http://mustache.github.com/, I only notice clostache, which is a >

Re: [ANN] Yet another {{mustache}} for Clojure

2012-07-11 Thread Feng Shen
>From http://mustache.github.com/, I only notice clostache, which is a little slow. I have not noticed stencil, if I do, probability, I will not do one myself. It's pretty fast. My implementation seems faster than stencil, in a test run, up to 10x. Test code: https://github.com/shenfeng/mustache

[ANN] Yet another {{mustache}} for Clojure

2012-07-11 Thread Shen, Feng
Hi: I did yet another {{mustache }} implementation for Clojure https://github.com/shenfeng/mustache.clj I did it because I need a faster one when I am doing Rssminer . And I dit it. By the way, Rssminer is yet another RSS reader, but written in

Re: Tornado-like async (web) server framework?

2012-04-16 Thread Feng Shen
I am working on a tiny web server and http client in clojure and java. It's using java's async Socket IO. https://github.com/shenfeng/http-kit The code is mostly written in java, It will expose a nice clojure API. My goal are async, fast, RAM efficiency, clean and compact code. I write it for Rssmi

Re: How to write `when-lets`

2011-08-05 Thread Shen, Feng
I learned a lot. Thanks. Best Regards Shen Feng On Wed, Jul 27, 2011 at 8:50 PM, Feng Shen wrote: > Clojure core.clj has a macro when-let, > I am wondering how to write a macro `when-lets` > > (when-lets [symbol-1 test-1 >

How to write `when-lets`

2011-07-27 Thread Feng Shen
Clojure core.clj has a macro when-let, I am wondering how to write a macro `when-lets` (when-lets [symbol-1 test-1 symbol-2 test-2 ... ] body ) body only get evaluated when (and test-1 test-2 ) I am thinking about it, anybody ha

Re: Clojure for large programs

2011-07-07 Thread Feng Shen
Our codebase is 6.8k kloc of production code, 4k of test code. We use emacs, slime+swank to develop. The editor is great, REPL is great. But lacking debuging and refactoring support is a pain. On Jul 3, 9:26 am, Mark Engelberg wrote: > Ideally, I was hoping to start a more in-depth discussion ab

1.3 master commit for lazy defn loading

2011-03-31 Thread Feng
jure/commit/71930b6b6537a796cdf13c4ffa7cf93eb53b6235 Regards, - Feng -- 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

Re: trunk

2011-03-06 Thread Feng
On Mar 4, 8:08 pm, Feng wrote: > On Mar 4, 1:45 pm, Stuart Sierra wrote: > > > swank-clojure breaks in a number of small ways on Clojure 1.3 alphas, mostly > > because of moved/renamed functions. > > This seems not the case. I'm aware of print-doc and pprint cau

Re: trunk

2011-03-04 Thread Feng
amed functions in that commit. Stacktrace and Var value clearly show it has something to do with FnLoaderThunk. It's ok master branch break things. I just want to report this early so that it won't become too hard later to narrow down which commit caused it. Regards, - Feng > -Stu

trunk

2011-03-02 Thread Feng
(:pid "789" :style :spawn :lisp-implementation (:type "Clojure" :name "clojure" :version "1.2.0") :package (:name "user" :prompt "user") :version "20100404") user=> (var-get #'swank.commands.basic/connection-info) # Sorry I wa

Re: ANN: ClojureQL 1.0.0 now released

2011-01-07 Thread Feng
> This is all separate from parsing from ClojureQL to SQL/JDBC, of course. > > > > > > > > On Fri, Jan 7, 2011 at 10:22 AM, Feng wrote: > > I'd suggest ClojureQL only optimize lisp form to SQL text > > transformation, and provide options whether to use

Re: ANN: ClojureQL 1.0.0 now released

2011-01-07 Thread Feng
I'd suggest ClojureQL only optimize lisp form to SQL text transformation, and provide options whether to use PreparedStatement or not. Leave other kind of optimizations to databases/drivers. Some thoughts below: - PreparedStatement avoids high cost of frequent query planning (oracle call it hard

Re: Possible BUG: NPE

2009-12-09 Thread Feng
on (build 1.5.0_19- b02-306) Java HotSpot(TM) Client VM (build 1.5.0_19-138, mixed mode, sharing) - Feng > On Mon, Dec 7, 2009 at 9:34 PM, David Nolen wrote: > > Looking at the stacktrace it looks like this is because of swank_fuzzy.clj. > > I can start up the SLIME Repl no problem

Re: Possible BUG: NPE

2009-12-07 Thread Feng
Yes, fuzzy-completion seems the only way to trigger it. For what it's worth, it did not happen if reset to commit a3e95cf5a72b22cd0728aba152d5f77603b722fc Author: Rich Hickey Date: Fri Dec 4 11:22:04 2009 -0500 update example in reify doc - Feng On Dec 7, 9:34 pm, David Nolen

Re: Possible BUG: NPE

2009-12-07 Thread Feng
s. > David > > On Mon, Dec 7, 2009 at 8:31 PM, Feng wrote: > > Hi, > > > After git pull on new branch > > > commit 1da63ad10d2531264e86eb705a10b3cebc9b1067 > > Author: Rich Hickey > > Date:   Mon Dec 7 16:44:41 2009 -0500 > &g

Possible BUG: NPE

2009-12-07 Thread Feng
Hi, After git pull on new branch commit 1da63ad10d2531264e86eb705a10b3cebc9b1067 Author: Rich Hickey Date: Mon Dec 7 16:44:41 2009 -0500 init CLEAR_SITES Got NPE in slime java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java

Re: question about deftype usage

2009-05-25 Thread Feng
On May 25, 6:47 am, Konrad Hinsen wrote: > On 24.05.2009, at 07:01, Feng wrote: > > > clojure.contrib.types/deftype assumes data to tag are created fresh > > with no meta data. Would it be useful to have it update meta data if > > data are already initialized with meta

Re: question about deftype usage

2009-05-23 Thread Feng
On May 24, 1:01 am, Feng wrote: > Hi, > > clojure.contrib.types/deftype assumes data to tag are created fresh > with no meta data. Would it be useful to have it update meta data if > data are already initialized with meta data, e.g. from file or db with > other me

question about deftype usage

2009-05-23 Thread Feng
#x27;x {}))) + (~deconstructor (with-meta ~'x (dissoc (meta ~'x) {:type ::constructor} (defmacro deftype- "Same as deftype but the constructor is private." Regards, - Feng --~--~-~--~~~---~--~~ You received this message

Re: Question about building modular code in Clojure

2009-05-18 Thread Feng
> Thanks! Hi Mark, You might find "Lexical contexts; or, Lambda, the Ultimate Module?" post by Scott Burson inspiring. http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/ef3b989e8dabad62/a6ceac2011b8b66c?hl=en&#a6ceac2011b8b66c It does not use CL package and d

clojure.contrib.pprint.PrettyWriter ClassNotFoundException

2009-05-09 Thread Aaron Feng
When I tried to import PrettyWriter from clojure-contrib I'm getting java.lang.ClassNotFoundException. Am I missing something? Thanks, Aaron --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post t

Re: Is Clojure production ready?

2009-04-17 Thread Aaron Feng
Thanks to all of you for the input. It sounds like most people are comfortable with the current state of clojure. That is great to hear! I know there has been a lot of talk to "1.0fy" clojure yesterday. Going 1.0 will definitely help us make the jump (maybe others too?). I understand 1.0 is onl

Is Clojure production ready?

2009-04-15 Thread Aaron Feng
Hi, I work for a large financial software company, and we are interested in using Clojure for our new project. Due to the concurrent nature of the project, we are evaluating three possible languages: Erlang, Scala, and Clojure. This project will be a hosted solution, but availability and perfor

What's this?

2009-02-20 Thread Feng
Exception java.lang.StackOverflowError: [1] clojure.lang.PersistentHashMap$LeafNode.nodeSeq (PersistentHashMap.java:567), pc = 2 [2] clojure.lang.PersistentHashMap$BitmapIndexedNode$Seq.create (PersistentHashMap.java:503), pc = 21 [3] clojure.lang.PersistentHashMap$BitmapIndexedNode.nodeSeq

Re: Fully lazy sequences are coming - feedback wanted!

2009-02-15 Thread Feng
On Feb 15, 11:46 pm, Feng wrote: > I tried to migrate swank-clojure to lazy branch rev1282. Here are > steps I did. > > 1) search and replace rest to next > 2) search and replace seq? to sequence? > 3) change lazy-cons to lazy-seq following the recipe > 4) fixed if LazyS

Re: Fully lazy sequences are coming - feedback wanted!

2009-02-15 Thread Feng
estFn.invoke(RestFn.java:402) 25: clojure.lang.AFn.run(AFn.java:37) 26: java.lang.Thread.run(Thread.java:613) thanks, - Feng diff --git a/swank/commands/basic.clj b/swank/commands/basic.clj index 79d4354..8072d5b 100644 --- a/swank/commands/basic.clj +++ b/swank/commands/basic.clj @@ -98,8 +98,9

Initialize java.util.TreeSet/TreeMap using clojure set/map value

2008-12-15 Thread Feng
2 })) #'user/m user=> m #=(java.util.TreeMap. {}) user=> (.put m :a 2) nil user=> m #=(java.util.TreeMap. {:a 2}) user=> (.put m :c 3) java.lang.RuntimeException: java.lang.ClassCastException: clojure.lang.Keyword (NO_SOURCE_FILE:0) Is this an oversight or a

Re: Patch: precompiling Clojure core sources in Ant build script

2008-12-14 Thread Feng
This is due to the change in clojure svn 1158. (.method ClassName ...) syntax has been changed to call java.lang.Class method for ClassName, not static field/method any more. Use namespace syntax instead. diff --git a/swank/commands/basic.clj b/swank/commands/basic.clj index ac0736f..4705cd5 1006

Possible bug? StringIndexOutOfBoundException

2008-11-20 Thread Feng
{ //cv.visitSource(source, null); String smap = "SMAP\n" + source.substring(0,source.lastIndexOf ('.')) + ".java\n" + regards, - Feng --~--~-~--~~~---~--~~

Re: Patch: precompiling Clojure core sources in Ant build script

2008-11-14 Thread Feng
ta) (slime-search-paths)))] `((~(str "(defn " (:name meta) ")") (:location ~path (:line ~(:line meta)) nil))) `((~(str (:name meta)) (:error "Source definition not found."))) regards, - Feng --~--~---

Re: A question about ns-resolve

2008-09-16 Thread Feng
On Sep 16, 7:41 am, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Sep 16, 12:26 am, Feng <[EMAIL PROTECTED]> wrote: > > > Hi, > > > It appears that ns-resolve only resolves alias qualified symbol in > > current clojure/*ns*, but not in the namespace passed

Should meta :file include namespace/package path?

2008-09-01 Thread Feng
(clojure.lang.RT/baseLoader) src) nil user=> (.getResource (clojure.lang.RT/baseLoader) "clojure/contrib/sql/ sql.clj") file:/Users/fenghou/lib/clojure/contrib/src/clojure/contrib/sql/ sql.clj user=> regards, Feng --~--~-~--~~~---~--~~ You received