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
Zach,
it might be interesting to keep an eye on the newly-announced ObjectLayout
project by Gil Tene and Martin Thompson. Discussion/overview is on this
mail thread
https://groups.google.com/forum/m/#!topic/mechanical-sympathy/9PNuQKuWVa4
and the project is here
Hi,
This will sound strange from me, but are these macros really to be added to
the core?
Firstly, I don't see they extend the language in any way new. Instead they
ease some very special cases, which could have been done with the
combination of existing core functions/macros just as well,
On 19 July 2013 10:24, Daniel Dinnyes dinny...@gmail.com wrote:
Why don't we have a candidate name-space, a separate library, like the
contrib before, which most people who prefer to be on the cutting edge just
include automatically. That would give reasonable feedback on how much
traction new
This book has examples in several JVM languages like Java, Scala, Clojure,
Ruby, and Groovy and contains fully explained code snippets that implement
real-world DSL designs.
http://www.manning.com/ghosh/
I found it quite good.
--
--
You received this message because you are subscribed to
Hello Folks,
I am a complete Clojure newbie and trying to achieve something pretty
simple and looking for an idiomatic, if I can make it work at all, way to
do it.
My issue is I need to retain the LevelDB descriptor and share it between
requests, LevelDB is already thread-safe.
For example:
this is a great book:
http://www.amazon.com/Domain-Specific-Languages-Addison-Wesley-Signature-Series/dp/0321712943
don't let the language selection deter you. the patterns are abstract and
can easily be applied to Clojure.
On Thu, Jul 18, 2013 at 4:30 PM, JvJ kfjwhee...@gmail.com wrote:
Does
I'm already using as- in prod. I think the ship has sailed on convincing
Rich not to include them.
On Fri, Jul 19, 2013 at 5:39 AM, Alex Baranosky
alexander.barano...@gmail.com wrote:
I use some- and cond- pretty heavily... I know I'm just one dude, but I
am grateful they're in core so I
Let me give a short description of each and perhaps that will help explain
when each would be preferred:
promise - creates a object that can be deref'd. The result of the promise
can be delivered once, and deref-ing a undelivered will cause the deref-ing
thread to block. A single producer can
Yeah, seemingly I am still a newcomer here. As long as no one minds me
coming up with great ideas, I don't mind looking stupid either... it will
improve hopefully :)
On Friday, July 19, 2013 9:38:48 AM UTC+1, Michał Marczyk wrote:
On 19 July 2013 10:24, Daniel Dinnyes dinn...@gmail.com
On Fri, Jul 19, 2013 at 8:25 AM, Timothy Baldridge tbaldri...@gmail.comwrote:
channels - allow multiple producers to provide data to multiple consumers
on a one-to-one basis. That is to say, a single value put into a channel
can only be taken by a single consumer.
Although, you can implement
But notice that each of these examples uses either uses multiple channels.
Or is unrecommended behavior.
In your latter example, you're throwing parallelism out of the window. It
might work better if you had something like (go (f x)) but that then
creates an unbounded queue. Why not allow
Occurs to me that a common async pattern is going to be to put an
unconditional infinite loop in a go block, so we might want a macro for
such loops if they'll become much more common:
(defmacro endlessly
Executes the body over and over again.
[ body]
`(loop [] ~@(concat body '(recur
On Fri, Jul 19, 2013 at 9:16 AM, Timothy Baldridge tbaldri...@gmail.comwrote:
But notice that each of these examples uses either uses multiple
channels. Or is unrecommended behavior.
In your latter example, you're throwing parallelism out of the window. It
might work better if you had
Instead of using the var #'web/app in run-jetty, use a function that takes
your main-db as an argument and returns the routes for your app. You can
use the compojure.core/routes to build your app routes rather than using a
global var.
On Fri, Jul 19, 2013 at 3:42 AM, Tarik Ansari
On Monday, July 15, 2013 11:53:09 PM UTC+1, Jeremy Heiler wrote:
On July 15, 2013 at 6:30:28 PM, Daniel Dinnyes
(dinn...@gmail.comjavascript:)
wrote:
Hmm, good point, especially the `let` one... What is `as-`? I can't find
anything about that.
On Thursday, July 18, 2013 4:34:49 AM UTC-4, 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 namespace. (e.g.
clojure.tools.logging or clojure.string). It would be
Cheers mate, good point there!
On Wednesday, July 17, 2013 6:03:41 PM UTC+1, David Nolen wrote:
While the macro can do what the original enhancement request suggested
that's not the actual problem the new threading macros were intended to
solve. They were primarily added to eliminate:
We just released[0] v1.0.0.cr1 of Immutant, and plan to have 1.0.0 final
out in about a week. If you are an Immutant user, please upgrade as soon
as you can to help us track down any remaining bugs.
## What is Immutant?
Immutant[1] is an application server for Clojure. It's an integrated
If you want to do in in pure functional style then I would suggest a
single atom / ref that contains the whole game state (including monsters,
players, map, items etc.)
That's the approach I've taken in the two Clojure games I've written so
far, and it has worked pretty well. You might be
Featuring: distributed actors, supervisors, fiber-blocking IO, and an
implementation of core.async.
Read the announcement
herehttp://blog.paralleluniverse.co/post/55876031297/quasar-pulsar-0-2-0-distributed-actors-supervisors
.
Imagine running an entire Ring handler inside a go-block...
--
--
Note: what concerns me about using a* ref of a hashmap that holds agents of
monsters* is that I would loose the transaction benefits of the ref (hence
I can't safely move items from a player to a monster).
--
--
You received this message because you are subscribed to the Google
Groups Clojure
Hey guys,
I am playing around with a gameserver in clojure, here is the situation:
- I have a *ref of a hashmap that holds refs of players*
- I have a *ref of a hashmap that holds refs of monsters*
I used refs of players and refs of monsters because at some point I
might have to transfer things
While I haven't tried libgdx myself, you should be able to do something
like this:
1. Create a global namespace (or similar), which should contain global
variables
and/or functions that should never be reloaded. In this namespace you
essentially
put the things that there can only be one of - the
If you want something robust I'd recommend something like http-kit or Netty
on the backend + using websockets (and a shim) directly on the frontend, or
possibly browserchannel if you need to worry about firewalls and ancient
browsers.
Socket.IO is a moving target intended for a single audience
Oh, and the implementation is clean and simple. Just cleaned it up a bit
from all the clutter:
;;; The DUH..IT'S SO SIMPLE! macro
(defmacro duh-
([x alias form]
`(let [~alias ~x] ~form))
([x alias form more]
`(duh- (duh- ~x ~alias ~form) ~@more)))
This gives YOU the full power of
On Fri, Jul 19, 2013 at 3:03 PM, Jozef Wagner jozef.wag...@gmail.comwrote:
Yes, but this seems to work only in Clojure, not in ClojureScript.
That's true.
-S
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
On 07/19/2013 08:46 PM, Timothy Washington wrote:
There would just be a core data model of posts, assets and tags, that
would exists as definitions, and could be pulled into a runtime soup.
How about unifying everything that may be mapped to its own URL as
resource? Such a resource would have
Ok, so I've thought a little more about the architecture of a
Clojure-based, composable blogging system. I put up my initial notes in
this github repo: Stefon https://github.com/twashing/stefon. I've ordered
the system components, based on core functionality, outwards.
- There would just be a
I'm not 100% on how the data_readers.clj file works. It's just a map with
no namespace that appears to get loaded by some kind of black magic.
Is it possible to provide a library which includes its reader macros, so
that the library user's project doesn't need to include their own
On July 19, 2013 at 11:28:50 AM, Daniel Dinnyes (dinny...@gmail.com) wrote:
Oh, and the implementation is clean and simple. Just cleaned it up a bit from
all the clutter:
;;; The DUH..IT'S SO SIMPLE! macro
(defmacro duh-
([x alias form]
`(let [~alias ~x] ~form))
([x alias form more]
*tools.namespace:* utilities to search for, parse, move, and
reload namespaces with awareness of their dependencies
Release 0.2.4: bug fixes only
README and source code:
https://github.com/clojure/tools.namespace
Leiningen dependency information:
[org.clojure/tools.namespace 0.2.4]
My spidey sense is that the proposed data types (posts, assets, tags,
comments too ?), will have to be handled differently.
What I plan to do though, is go through some basic workflow cases, and work
out the best data relationships. That's the point at which I think common
data types could be
When Clojure starts it will search for files named data_readers.clj at the
root the Java classpath. Every library JAR can have its own
data_readers.clj and they will all be loaded and merged.
Be careful with this: if there's a conflict in data reader bindings,
Clojure won't start. If your
Facades and workarounds for things that are more difficult than they
should be. Very nice.
On Friday, 19 July 2013 13:06:50 UTC-7, JvJ wrote:
I'm creating a library with a lot of available functions in a lot of
different namespaces, and I'd like many of them to be available to users of
I'll second that you are usually doing something unidiomatic if you're
using refs of refs.
On Fri, Jul 19, 2013 at 2:44 PM, vis thevisualist...@gmail.com wrote:
Good point, I didn't think about that for some reason.
Yes I will give it a read, thanks for the link!
On Friday, July 19, 2013
Good point, I didn't think about that for some reason.
Yes I will give it a read, thanks for the link!
On Friday, July 19, 2013 6:19:03 PM UTC+2, Mikera wrote:
If you want to do in in pure functional style then I would suggest a
single atom / ref that contains the whole game state (including
I'm creating a library with a lot of available functions in a lot of
different namespaces, and I'd like many of them to be available to users of
the library without having to specify a number of different import
statements.
Is there a way to have the core namespace 'export' the other
Hehe, yep. I mean, it's super useful for any library that needs more than
one file. Which is most of them.
Jonathan
On Sat, Jul 20, 2013 at 12:57 AM, JvJ kfjwhee...@gmail.com wrote:
Facades and workarounds for things that are more difficult than they
should be. Very nice.
On Friday, 19
Ok, that makes sense. Thanks Chas.
On Fri, Jul 19, 2013 at 7:53 PM, Chas Emerick c...@cemerick.com wrote:
On Jul 19, 2013, at 2:46 PM, Timothy Washington wrote:
I've deliberately proposed a small core, so that you can use only the
pieces you absolutely need. Additionally, I think it
I understood David's comment differently, that the current threading
macros exist so that explicit bindings for each threaded form are not
needed for they very specific cases they intend to simplify. I'm not saying
your macro is dumb, I just don't find the sugar particularly tasty. ;-)
Got a link?
On July 19, 2013 at 8:37:13 PM, Sebastian Rojas
(sebastian.rojas.viva...@gmail.com) wrote:
A library for RESTFul applications built on top of Compojure, includes routing
abstractions with reverse routing functionalities and validation helpers.
--
--
You received this message
https://github.com/sebastiansen/rip
On Fri, Jul 19, 2013 at 7:49 PM, Jeremy Heiler jeremyhei...@gmail.comwrote:
Got a link?
On July 19, 2013 at 8:37:13 PM, Sebastian Rojas (
sebastian.rojas.viva...@gmail.com) wrote:
A library for RESTFul applications built on top of Compojure, includes
On Jul 19, 2013, at 2:46 PM, Timothy Washington wrote:
I've deliberately proposed a small core, so that you can use only the pieces
you absolutely need. Additionally, I think it encourages a clean design,
forcing explicit interaction semantics between system components. If we
accept this
On Friday, July 19, 2013 7:18:15 AM UTC-7, Daniel Dinnyes wrote:
You are trying to pick it up on the wrong end. Check this out:
(- test-string-with-lots-of-dashes
(fn [x] (s/split x #-))
(fn [y] (interleave y (range)))
(fn [z] (s/join #_ z))
(fn [z] (s/join * [I am
A library for RESTFul applications built on top of Compojure, includes
routing abstractions with reverse routing functionalities and validation
helpers.
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
I'm unable to find any examples of primitive array casts, and the docs are
not helpful. Can someone point me to examples or docs that explain what
they do?
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
On Friday, July 19, 2013 4:20:36 PM UTC+2, Stuart Sierra wrote:
On Thursday, July 18, 2013 4:34:49 AM UTC-4, 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
For implementing a method with this signature
int getType(int[] inputTypes)
How would I declare inputTypes in gen-class?
--
--
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
An opensource memcached client for clojure,it wraps xmemcached.
0.2.3 releases, main highlights:
1.Supports delete with CAS value in binary protocol
;;delete with CAS
(xm/delete num (:cas (gets num)))
2.Supports lighweight distribution lock with try-lock macro:
(def counter (atom
Thanks for your hard work Stuart.
Ambrose
On Sat, Jul 20, 2013 at 4:37 AM, Stuart Sierra m...@stuartsierra.comwrote:
*tools.namespace:* utilities to search for, parse, move, and
reload namespaces with awareness of their dependencies
Release 0.2.4: bug fixes only
README and source code:
Yes, there is https://github.com/ztellman/potemkin
Jonathan
On Fri, Jul 19, 2013 at 10:06 PM, JvJ kfjwhee...@gmail.com wrote:
I'm creating a library with a lot of available functions in a lot of
different namespaces, and I'd like many of them to be available to users of
the library without
From the peanut gallery:
I think this basic idea sounds fabulous. I've been kicking clojure's tires,
and I keep meaning to slap a blog engine together. But then I go into
tailspin because I want to blog about the experience, but my blogs are down
and I don't want to go through setting up WP
Thanks. I'll make sure users know about it. It's a game engine, so I'll
mostly be using it for things like Box2D vector literals (i.e. v#(1,2)),
and floating-point numbers ( f#(1.4), so they don't have to say (float
1.4)).
On Friday, 19 July 2013 13:48:50 UTC-7, Stuart Sierra wrote:
When
Thanks for the release. Coincidentally, yesterday I wrote a command-line
Kestrel client (a script) using clj-xmemcached 0.2.2, lein-exec and
tools.cli - it works very well.
Shantanu
On Saturday, 20 July 2013 08:50:02 UTC+5:30, dennis wrote:
An opensource memcached client for clojure,it wraps
55 matches
Mail list logo