Re: Ring: How to auto-redirect URI's missing trailing slash

2013-07-25 Thread ljcppunix
Hi, Could you try (str uri_path "/") 在 2013年7月26日星期五UTC+8上午9时08分50秒,Reginald Choudari写道: > > Hello, I'm trying to figure out what is the best way in handling this > problem. > > Using Ring I have a handlers set to direct routes with relative URI paths > (e.g. "/", "./posts", "/about"). But I w

How convert from string to symbol?

2013-07-25 Thread ljcppunix
Hello, I have a problem how we convert from string to symbol, for example: (def str_name "name") I want have a result that symbol is :name through processing str_name, could you a best advice? thank you! -- -- You received this message because you are subscribed to the Google Groups "Clo

Re: How convert from string to symbol?

2013-07-25 Thread ljcppunix
Hi, Gary Trakhman Good job, thank you very much! On Friday, July 26, 2013 9:44:31 AM UTC+8, Gary Trakhman wrote: > > It might be more clear if you simply show sample inputs and outputs. > Something like this: > > in: "name" > out: 'name > > probably what you want is: > (symbol (name x)) > > w

A strange syntax about clojure defn

2013-08-22 Thread ljcppunix
Hi, I read source code about run-jetty, as such, at 01 line: "(defn #^Server run-jetty", what's mean "#^Server", could you give a explanation? thank you! 01(defn #^Server run-jetty 02 "Serve the given handler according to the options. 03 Options: 04:configurator - A function called

Re: A strange syntax about clojure defn

2013-08-22 Thread ljcppunix
It's concise, and you know the history of clojure, thank you expert! 在 2013年8月22日星期四UTC+8下午5时01分55秒,Mikera写道: > > It's an old style type hint, indicating that the function returns a value > of class "Server" (the full Java class name is probably in an :import > declaration at the top of the fi

Can you explain the result of a expression?

2013-08-27 Thread ljcppunix
Hi, (take 1 (map #(do (print \.) %) (range))) result: (0) I think it should be (.0), why? thank you! -- -- 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

strange map

2013-08-28 Thread ljcppunix
Hi (map #(do (print "-") %) '(1 2 3 4 5)) I think the result should be (-1 -2 -3 -4 -5), but it is (--1 -2 -3 -4 5), it's difficult to understand, Can someone give answer? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: strange map

2013-08-28 Thread ljcppunix
Hi, Nothing to get, Nothing to println, please give a detail, thank you. On Wednesday, August 28, 2013 4:57:49 PM UTC+8, Christian Sperandio wrote: > > Hi, > > Try just one thing: > > (def r (map #(do (print "-") %) '(1 2 3 4 5))) > > And after, do (println r) > > What do you get? > > > > > > >

Re: strange map

2013-08-28 Thread ljcppunix
Right, thank you! On Wednesday, August 28, 2013 4:59:33 PM UTC+8, Alex Baranosky wrote: > > map is lazy. You shouldn't call side effect functions from it. I > recommend you use doseq instead. > > > On Wed, Aug 28, 2013 at 1:57 AM, Christian Sperandio < > christian...@gmail.com > wrote: > >> Hi

Re: strange map

2013-08-28 Thread ljcppunix
Hi user=> (def r (map #(do (print "-") %) '(1 2 3 4 5))) #'user/r user=> (println r) (--1 -2 -3 -4 5) nil On Wednesday, August 28, 2013 4:57:49 PM UTC+8, Christian Sperandio wrote: > > Hi, > > Try just one thing: > > (def r (map #(do (print "-") %) '(1 2 3 4 5))) > > And after, do (println r) >

Re: strange map

2013-08-28 Thread ljcppunix
Hi user=> (def r (map #(do (print "-") %) '(1 2 3 4 5))) #'user/r user=> (println r) (--1 -2 -3 -4 5) nil On Wednesday, August 28, 2013 4:57:49 PM UTC+8, Christian Sperandio wrote: > > Hi, > > Try just one thing: > > (def r (map #(do (print "-") %) '(1 2 3 4 5))) > > And after, do (println r) >

Does lib-nor has function which support https server?

2014-03-21 Thread ljcppunix
Hi, noir.util.middleware.war- handler startup a http server, then which function support https server? Does lib-nor has function which support https server? thank you. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send ema

About with-meta source, can explain it by itself?

2013-09-21 Thread ljcppunix
Hi, I read the source about with-meta, and find def with-meta using with-meta, can it? someone give a explain? user=> (source with-meta) (def ^{:arglists '([^clojure.lang.IObj obj m]) :doc "Returns an object of the same type and value as obj, with map m as its metadata." :added "1.

Re: About with-meta source, can explain it by itself?

2013-09-21 Thread ljcppunix
You are right, i noticed "it calls withMeta", but in the expression, actually use with-meta to define with-meta, it's very strange, thank you very much! (def with-meta (fn ^:static with-meta [^clojure.lang.IObj x m] (. x (withMeta m On Saturday, September 21, 2013 3:3

Could not find artifact org.clojure:clojure:pom:1.2.0-master-SNAPSHOT in central

2013-09-27 Thread ljcppunix
Hi, I run "lein deps",then error message: D:\clojure\4clojure-develop>lein deps Could not find artifact org.clojure:clojure:pom:1.2.0-master-SNAPSHOT in central (http://repo1.maven.org/maven2) Could not find artifact org.clojure:clojure:pom:1.2.0-master-SNAPSHOT in clojars (https://clojar

Warning: *retry-limit* not declared dynamic and thus is not dynamically rebindable

2013-04-16 Thread ljcppunix
Dear all, When I installed leiningen and clojure, I run command "lein repl", then prompt some message like such --- C:\lein>lein repl Warning: *default-javac-options* not declared dynamic and thus is not dynamicall y rebindable, but its name suggests otherwise. Please either indicate ^:dy

Re: Warning: *retry-limit* not declared dynamic and thus is not dynamically rebindable

2013-04-18 Thread ljcppunix
On Wednesday, April 17, 2013 7:23:32 PM UTC+8, Marko Topolnik wrote: > > Seems like old leiningen + new Clojure. You should upgrade to the latest > leiningen, which is 2.1.3. > > On Wednesday, April 17, 2013 3:04:18 AM UTC+2, ljcp...@gmail.com wrote: >> >> Dear all, >> >> When I installed le

Re: Warning: *retry-limit* not declared dynamic and thus is not dynamically rebindable

2013-04-18 Thread ljcppunix
Dear Marko Topolnik You are right, it's correct when I upgrade to leiningen213, and no these warning messages, thank you again! On Wednesday, April 17, 2013 9:04:18 AM UTC+8, ljcp...@gmail.com wrote: > > Dear all, > > When I installed leiningen and clojure, I run command "lein repl",

Do you know which language the clojure is written by?

2013-04-22 Thread ljcppunix
Hi, Do you know which language the clojure is written by? -- -- 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 f