Re: Socket.IO and Clojure?

2013-07-18 Thread Hoàng Minh Thắng
I had the same concern and have searched for solutions. IMO sockjs is well designed and perfectly fits my needs*.* You can use sockjs with Clojure, though we'll need more tweaks to make it pass all the sockjs specs: https://github.com/jenshaase/methojure/tree/master/methojure-sockjs If you really

Re: How core.async compares to agents, future and promise?

2013-07-18 Thread julius
It brother me too. Thanks On Friday, July 5, 2013 3:28:54 AM UTC+8, Hussein B. wrote: > > Hi, > > How core.async compares to agents, future and promise? > > When to use core.async and when to use agents, future and promise? > > Thanks for help and time. > -- -- You received this message becaus

Re: Domain-specific language design books

2013-07-18 Thread Leonardo Borges
Then something more generic might be helpful, such as Fowler's DSL book: http://www.amazon.com/Domain-Specific-Languages-Addison-Wesley-Signature-ebook/dp/B003ZUYJ3G/ref=sr_1_1?ie=UTF8&qid=1374198990&sr=8-1&keywords=domain+specific+languages It's a bit dense - 600+ pages - but I've heard good thin

Re: Domain-specific language design books

2013-07-18 Thread JvJ
Thanks. Mostly, I'm looking for something that's about design principles rather than a "how-to". I figure I might as well get educated before I just dive blindly in. On Thursday, 18 July 2013 13:30:06 UTC-7, JvJ wrote: > > Does anyone know of any good books on DSL design, in Clojure or any oth

Re: ns defaults

2013-07-18 Thread Gary Trakhman
Could you abuse a reader literal? Seems like it could work at first glance. On Thu, Jul 18, 2013 at 4:34 AM, Jozef Wagner wrote: > Compiler loads and refers clojure.core namespace for each new namespace. In > my projects, I often have one or two namespaces I use nearly in every other > namespac

core.async: Hoare's coroutine examples in Clojure

2013-07-18 Thread Alan Shaw
These are now working properly and ought to be readable by core.async beginners (I hope). https://github.com/nodename/async-plgd -A -- -- 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: Domain-specific language design books

2013-07-18 Thread Leonardo Borges
Every time you write a macro, you're writing a domain specific language. To that end, I have found Let Over Lambda most valuable. Cheers On 19 Jul 2013 06:30, "JvJ" wrote: > Does anyone know of any good books on DSL design, in Clojure or any other > Lisp? > > -- > -- > You received this message

Domain-specific language design books

2013-07-18 Thread JvJ
Does anyone know of any good books on DSL design, in Clojure or any other Lisp? -- -- 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: Proposed formal syntax for edn

2013-07-18 Thread kovas boguta
I agree that would be a Good Thing. This looks like an excellent start. Is this specification executable in Instaparse? IMO specs that are immediately computable are more useful and more likely to be correct. On Thu, Jul 18, 2013 at 10:38 AM, Ben Smith-Mannschott < bsmith.o...@gmail.com> wro

Re: Proposed formal syntax for edn

2013-07-18 Thread Ben Smith-Mannschott
On Thu, Jul 18, 2013 at 7:46 PM, kovas boguta wrote: > I agree that would be a Good Thing. This looks like an excellent start. > > Is this specification executable in Instaparse? > > IMO specs that are immediately computable are more useful and more likely > to be correct. > No, not as it stands

Proposed formal syntax for edn

2013-07-18 Thread Ben Smith-Mannschott
I think it would aid compatibility between edn implementations if we had an agreed upon formal syntax. To that end, I've tried my hand at specifying one. I've posted it as issue 56 on edn-format/edn: https://github.com/edn-format/edn/issues/56 I'll incorporate fixes for any problems that are iden

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Timothy Washington
Hadn't thought about spam detection, comment design, or versioning. But I like the ideas a lot. I'll design with these features in mind. On Thu, Jul 18, 2013 at 12:17 PM, Thorsten Wilms wrote: > On 07/18/2013 04:24 PM, Timothy Washington wrote: > >> I know that I currently wish I had a Clojur

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Timothy Washington
Hadn't thought about it along those lines. But I'm glad you brought it up. Ok. On Thu, Jul 18, 2013 at 11:33 AM, Mikera wrote: > It sounds like a great project. > > I think the challenge will be the making the different pieces fit together > neatly: there are lots of somewhat-overlapping librar

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Timothy Washington
Too right. Ok, I'll factor that in. On Thu, Jul 18, 2013 at 11:16 AM, Gary Trakhman wrote: > Django's pretty good at this with it's auto-gen'd Admin interface, if we > had something comparable it would be compelling to a large audience, but I > worry that it becomes 'frameworky' at a certain po

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Thorsten Wilms
On 07/18/2013 04:24 PM, Timothy Washington wrote: I know that I currently wish I had a Clojure weblog engine that I could stick into a site I'm building. If there's already something available, I'll obviously just use that. But otherwise, is this something that would be interesting to people? O

Re: core.async: leak in the examples

2013-07-18 Thread Timothy Baldridge
Yes, channels are GC'd and so are any gos that are connected to them (who are not also being held by some other reference). Timothy On Thu, Jul 18, 2013 at 9:42 AM, Alice wrote: > https://github.com/clojure/core.async/blob/master/examples/ex-async.clj > https://github.com/clojure/core.async/bl

core.async: leak in the examples

2013-07-18 Thread Alice
https://github.com/clojure/core.async/blob/master/examples/ex-async.clj https://github.com/clojure/core.async/blob/master/examples/ex-go.clj One uses future, and the other uses go. The code runs query twice for each search type, and takes only one, whichever comes first, from the channel, so I'm

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Mikera
It sounds like a great project. I think the challenge will be the making the different pieces fit together neatly: there are lots of somewhat-overlapping libraries and I don't think anyone has yet figured out the right way to plug everything together - at least in the sense that "composability"

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Gary Trakhman
Django's pretty good at this with it's auto-gen'd Admin interface, if we had something comparable it would be compelling to a large audience, but I worry that it becomes 'frameworky' at a certain point, and clojure has a bias against that. On Thu, Jul 18, 2013 at 11:10 AM, Timothy Washington wrot

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Timothy Washington
Ok, I'll start to flesh this out a little more - overall architecture, 3rd-party libs, etc. And I'll get some more of your feedback from there. Please add anymore ideas to this effect, if you have them. More soon Tim Washington Interruptsoftware.ca / Bkeeping.com On Thu, Jul 18, 2013 at 10:55

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Michael Fogus
That's what I hoped you meant. Sounds fun. On Thu, Jul 18, 2013 at 10:44 AM, Timothy Washington wrote: > Ah, by composable, I meant you could choose to only use a core server > component, posting txt entries, let's say with an in-memory data store ( who > knows.. it's your blog :). And if you wan

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Timothy Washington
Ah, by *composable*, I meant you could choose to only use a core server component, posting txt entries, let's say with an in-memory data store ( who knows.. it's your blog :). And if you want a little more, you can choose to add a DB adapter out to Datomic, and Import / Export support. This is all

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Mayank Jain
+1. I also have been thinking about the same. Would be interesting to see how you do it. On Thu, Jul 18, 2013 at 8:14 PM, Timothy Washington wrote: > Ah, by *composable*, I meant you could choose to only use a core server > component, posting txt entries, let's say with an in-memory data store

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Michael Fogus
Quick answer: Yes. I'd love to see a legitimate, maintained Clojure-based blogging engine. I have one question: what does "composable blogging engine" mean? On Thu, Jul 18, 2013 at 10:24 AM, Timothy Washington wrote: > Hello, > > I'm thinking of how to build a composable blogging engine in Clo

Interest in a Full Featured Clojure Blog Engine

2013-07-18 Thread Timothy Washington
Hello, I'm thinking of how to build a composable blogging engine in Clojure. There have been a few attempts at this, with cow-blogand my-blog . But these seem to be abandoned, and not heavily used. Vijay Kiran, las

nrepl-inspect on load

2013-07-18 Thread Timothy Washington
Hi there, I took a look at the nrepl middleware project "nrepl-inspect", as described in this article . I'm using emacs-live, and thus have the initialization code in my "* ~/.live-packs/-pack/init.el*" file. Now,

Re: merge nested maps

2013-07-18 Thread Uwe Dauernheim
The implementation(s) acts a bit counter-intuitive on non-nested maps: FAIL in (deep-merge-test) (test.clj:5) expected: (= (merge {:a 1, :d 1} {:a 2, :c 1}) (deep-merge {:a 1, :d 1} {:a 2, :c 1})) actual: (not (= {:c 1, :a 2, :d 1} {:a 2, :c 1})) ERROR in (deep-merge-with-test) (Numbers.java:9

Re: How do I setup a Clojurescript REPL with emacs?

2013-07-18 Thread Chris Bui
Thanks so much! I slept on it and followed your instructions and now everything works perfectly. On Wednesday, July 17, 2013 11:43:38 PM UTC-5, ktsujister wrote: > > > Here's how I did it. > > 1. I setup brepl environment with help of below tutorial. > > https://github.com/magomimmo/modern-

Re: Making RPCs with Shoreleave

2013-07-18 Thread terjesb
The default /_shoreleave endpoint should work if you're running using lein ring server. Are you running a WAR in a container? If so, I don't think Shoreleave currently picks up the context. If you have only one client app, you could proxy this using nginx in front on your container. For multipl

Re: Implementation of the special form if

2013-07-18 Thread Burt
Hi Ambrose, yes. Thanks. Burt Am Donnerstag, 18. Juli 2013 10:55:38 UTC+2 schrieb Ambrose Bonnaire-Sergeant: > > Clojure uses Boolean.FALSE and null are the only two false values by > design. c.c/boolean can be useful for > converting Boolean instances that are false in Java into those tha

Re: Implementation of the special form if

2013-07-18 Thread Ambrose Bonnaire-Sergeant
Clojure uses Boolean.FALSE and null are the only two false values by design. c.c/boolean can be useful for converting Boolean instances that are false in Java into those that are false in Clojure. Does that answer your question? Ambrose On Thu, Jul 18, 2013 at 4:50 PM, Burt wrote: > Hi Ambrose

Re: Implementation of the special form if

2013-07-18 Thread Burt
Hi Ambrose, thanks for the hint. The background of my question: Let's do something silly, namely: (def falsefalse (Boolean. false)) Then (we have been warned) we get (if falsefalse :t :f) ==> :t Reason: Compiler.java#L2569 checks on Boolean.FALSE But if we use the function boolean, we get (b

Re: Implementation of the special form if

2013-07-18 Thread Ambrose Bonnaire-Sergeant
Hi Burt, See the "eval" and "emit" methods of IfExpr in Compiler.java for evaluation and bytecode output respectively (IIUC) for "if". https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L2551 Thanks, Ambrose On Thu, Jul 18, 2013 at 4:30 PM, Burt wrote: > In whi

ns defaults

2013-07-18 Thread Jozef Wagner
Compiler loads and refers clojure.core namespace for each new namespace. In my projects, I often have one or two namespaces I use nearly in every other namespace. (e.g. clojure.tools.logging or clojure.string). It would be convenient if I could specify ns defaults somewhere and those declaration

Implementation of the special form if

2013-07-18 Thread Burt
In which source file is the special form if implemented? -- -- 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 fi

Re: Calling Clojure from Emacs Lisp

2013-07-18 Thread Tassilo Horn
JvJ writes: > I'd like to be able to define some custom emacs commands that send > clojure code strings to a running repl, and to which I could attach > key bindings. Does anyone know an easy way to do this? Well, I guess that should be fairly straightforward using nrepl.el. ,[ C-h f nrepl

Calling Clojure from Emacs Lisp

2013-07-18 Thread JvJ
I'd like to be able to define some custom emacs commands that send clojure code strings to a running repl, and to which I could attach key bindings. Does anyone know an easy way to do this? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: Prismatic Plumbing and Graph Open-Source Release

2013-07-18 Thread Jason Wolfe
It's out now (under a different name) since it's not just for floating point numbers anymore! https://github.com/Prismatic/hiphip Release announcement: https://groups.google.com/forum/#!topic/clojure/F0jg2-uBW6U On Wed, Jul 17, 2013 at 11:14 PM, Vishi wrote: > Nice! > > Any more info on flip