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 with

Re: A strange syntax about clojure defn

2013-08-22 Thread 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 file) The new style of type hint is just ^Server. Both forms of type hint still work at present, but you should prefer the

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 file)

Re: problem with edn

2013-08-22 Thread Jim
Oh wow! I shouldn't have turned my computer off yesterday evening!!! there were many suggestions to try out... :) Ok let's see...I've got a record with meta-data let's call it FOO and its instance MFOO: user= (defrecord FOO [a b c]) user.FOO user= (def MFOO (with-meta (FOO. 1 2 3) {:x false

Re: problem with edn

2013-08-22 Thread Meikel Brandmeyer (kotarak)
Hi, Am Donnerstag, 22. August 2013 11:32:37 UTC+2 schrieb Jim foo.bar: Oh wow! I shouldn't have turned my computer off yesterday evening!!! there were many suggestions to try out... :) Ok let's see...I've got a record with meta-data let's call it FOO and its instance MFOO: user=

Re: problem with edn

2013-08-22 Thread Jim
Hi Meikel, this is funny! I thought about this approach but I originally considered it to be a clever hack rather than the official way to do this...Since I can't test it yet with my record , I hope you don't mind me asking another question... there is no need for print-dup bound to true

Re: problem with edn

2013-08-22 Thread John D. Hume
On Aug 22, 2013 6:25 AM, Jim jimpil1...@gmail.com wrote: this is funny! I thought about this approach but I originally considered it to be a clever hack rather than the official way to do this... If you need some data persisted or sent over the wire, then it should probably be considered part of

Re: Two Way DOM binding in clojurescript

2013-08-22 Thread ewen . grosjean
Hi, you might be interested in flapjax-cljshttps://github.com/Ewen0/flapjax-cljs, a clojurescript wrapper for flapjax http://www.flapjax-lang.org/. Ewen. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

[ANN] pdfkit-clj: Produce PDFs from HTML in Clojure

2013-08-22 Thread Kendall Buchanan
In case anybody needs HTML to PDF using wkhtmltopdf: https://github.com/banzai-inc/pdfkit-clj Of course, I'd welcome feedback or pull requests... -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: problem with edn

2013-08-22 Thread kawas
Jim, This is indeed a hack and not a best practice, maybe you're not using the right tool for your problem... - If you want to exchange data (think values), you should not be in need of keeping types and meta data when you exchange data in json, for example, you're not providing object

Re: problem with edn

2013-08-22 Thread Jim - FooBar();
all I'm trying to do is to provide a uniform mechanism to save/load game-states across my 2D board-games. Everything works just fine without that trick for most games but chess is peculiar (or my implementation is peculiar if you like) because in order to implement castling/enpassant moves

Re: problem with edn

2013-08-22 Thread Softaddicts
Jim, This is indeed a hack and not a best practice, maybe you're not using the right tool for your problem... - If you want to exchange data (think values), you should not be in need of keeping types and meta data Metadata is part of the Clojure environment and part of the value

ANN Spyglass 1.1.0 is released

2013-08-22 Thread Michael Klishin
Spyglass is a very fast Clojure client for Memcached [1] built on top of SpyMemcached. 1.1.0 is a minor release that introduces several new features, usability improvements and has some breaking changes. Release notes: http://blog.clojurewerkz.org/blog/2013/08/22/spyglass-1-dot-1-0-is-released/

ANN Money 1.4.0 is released

2013-08-22 Thread Michael Klishin
Money [1] is a Clojure library for working with monetary amounts. 1.4.0 is a minor release that fixes one bug. Release notes: http://blog.clojurewerkz.org/blog/2013/08/22/money-1-dot-4-0-is-released/ 1. https://github.com/clojurewerkz/money -- MK http://github.com/michaelklishin

Re: problem with edn

2013-08-22 Thread John D. Hume
On Aug 22, 2013 2:19 PM, Softaddicts lprefonta...@softaddicts.ca wrote: Jim, This is indeed a hack and not a best practice, maybe you're not using the right tool for your problem... - If you want to exchange data (think values), you should not be in need of keeping types and meta

Re: problem with edn

2013-08-22 Thread Softaddicts
I disagree... strongly. The value domain I am referring to is the one covered by your application, customized metadata is of little value elsewhere obviously. In typed languages the container defines a lot about what can be done with a value and what is forbidden. Nobody would try to rely on

Re: Two Way DOM binding in clojurescript

2013-08-22 Thread Sean Corfield
flapjax seems to be abandonware? Last source update a year ago, last website update two years ago. Or is it just one of those rare completely stable, needs no enhancements libraries? On Thu, Aug 22, 2013 at 1:09 AM, ewen.grosj...@free.fr wrote: Hi, you might be interested in flapjax-cljs, a

cgrand's parsley... text offsets ?

2013-08-22 Thread Jörg Winter
Hi, Is there any existing option/fn to get the offsets and lengths of parsed content ? For example for this: (- sexpr p/incremental-buffer (p/edit 0 0 () (p/edit 1 0 x)) p/parse-tree clojure.pprint/pprint) ...instead of: {:tag :root, :content [{:tag :list, :content [( {:tag :symbol,

Re: Two Way DOM binding in clojurescript

2013-08-22 Thread ewen . grosjean
I don't know. My guess would be that it is some kind of an academic project that evolve mostly when a student decides to work on it during a project (thus not often). The mailing list https://groups.google.com/forum/#!forum/flapjax is still active though. From what I tried it is quite stable.

Re: Two Way DOM binding in clojurescript

2013-08-22 Thread Sean Corfield
On Thu, Aug 22, 2013 at 2:41 PM, ewen.grosj...@free.fr wrote: I don't know. My guess would be that it is some kind of an academic project that evolve mostly when a student decides to work on it during a project (thus not often). The mailing list is still active though. Good to know, thanx.

Re: problem with edn

2013-08-22 Thread Cedric Greevey
::meta would be better, to ensure against clashing with a key that a Foo might happen to use. On Thu, Aug 22, 2013 at 7:00 AM, Meikel Brandmeyer (kotarak) m...@kotka.dewrote: Hi, Am Donnerstag, 22. August 2013 11:32:37 UTC+2 schrieb Jim foo.bar: Oh wow! I shouldn't have turned my