semantics of >! on closed channels

2014-01-23 Thread t x
## What I believe should be right: ** case 1: (>! on-closed-channel val) ==> exception thrown or ** case 2: (>! open-channel val) ==> returns val (>! closed-channel val) ==> returns nil ## race condition: note: I do not consider the following to be a valid "solution" (if (open?

Re: core.async over websocket + cljs + clojure

2014-01-23 Thread t x
For anyone else interested, http://www.youtube.com/watch?v=Nb3ztFeFfdw is the talk. On Wed, Jan 22, 2014 at 11:55 PM, Sean Corfield wrote: > Ah, what good timing! > > David Pollak's project Plugh does this, essentially as an implementation > detail. I spent some time with him today discussing t

Re: core.async over websocket + cljs + clojure

2014-01-23 Thread Sean Corfield
On Jan 23, 2014, at 12:18 AM, t x wrote: > For anyone else interested, http://www.youtube.com/watch?v=Nb3ztFeFfdw is the > talk. That's David Pollak's talk at Clojure/conj. You'll probably also want to watch his Strange Loop talk first, where he introduced the concepts: http://www.infoq.com/pr

Re: [ANN] Jig

2014-01-23 Thread Joachim De Beule
Op maandag 21 oktober 2013 02:41:43 UTC+2 schreef frye: > > Also, is there a Google Group for Jig? I'm playing around with it, can see > the potential, and already have some questions. > +1 for the google group .. -- -- You received this message because you are subscribed to the Google Grou

Re: avoiding repetition in ns declarations

2014-01-23 Thread Konrad Hinsen
--On 21 janvier 2014 23:15:50 -0800 t x wrote:   I have the following problem: (ns foo.bar   ...   ...   ... ) There's basically 10 lines of require that I want as part of nearly _every_ ns I declare is there a way to define some soft of alias / abbrevraviation that is used in namespaces at w

Help about using clojure in org mode in Emacs with CIDER

2014-01-23 Thread Rui Yang
Trying to use org mode with clojure. I'd like to use cider as the REPL server. Things is fine if I have only one statement in org source block. If I have more than one, then I got exception. for example #+name: basic-clojure #+begin_src clojure (defn greeting "Returns a greeting of the form 'He

Informatica Online Training By Experienced Trainers in Australia, USA, Canada

2014-01-23 Thread Online Training
SunItLabs provides the best Software’s training for various Computer IT courses through Webex, Gotomeeting. We are providing Informatica Trainingbased on specific needs of the learners especially we will give innovative one to one Classes which

[ANN] Stasis - not another static site framework

2014-01-23 Thread Magnar Sveen
Stasis A Clojure library of tools for developing static web sites. Another static site framework? Why? Well, that's exactly it. I didn't want to use a framework. I don't like the restrained feeling I get wh

Re: [ANN] Stasis - not another static site framework

2014-01-23 Thread Dmitry Groshev
And here is a link to the project, just in case you've missed it like I did: https://github.com/magnars/stasis :) On Thursday, January 23, 2014 2:16:48 PM UTC+4, Magnar Sveen wrote: > > Stasis > > A Clojure library of tools for developing static web sites. > >

Re: [ANN] Stasis - not another static site framework

2014-01-23 Thread Magnar Sveen
Oh, look at that. Thanks! :) On Thu, Jan 23, 2014 at 11:27 AM, Dmitry Groshev wrote: > And here is a link to the project, just in case you've missed it like I > did: https://github.com/magnars/stasis :) > > > On Thursday, January 23, 2014 2:16:48 PM UTC+4, Magnar Sveen wrote: >> >> Stasis >> >>

Re: avoiding repetition in ns declarations

2014-01-23 Thread Phillip Lord
t x writes: > Staurt, Phillip: > > Correct me if I'm wrong, the main idea recommended is: > > (1) don't try to do it via (:require ...) inside of (ns ... ) > (2) define a function, which calls (require ... ) [i.e. the function, > outside of (ns ... )] > > Thus, the end solution ends up being: > >

trouble with setting up cider within org mode

2014-01-23 Thread Rui Yang
Hi, I tried to setup cider to use within org mode. I managed to evaluate single clojure statement but not multiple. For example: #+name: basic-clojure #+begin_src clojure (defn greeting "Returns a greeting of the form 'Hello, username.'" [username] (str "Hello, " username)) #+end_src will be ok.

Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-23 Thread Bastien
Hi Rui, Rui Yang writes: > Any suggestions on fixing this or it is by design ob-clojure only > evaluate one statement? What version of Emacs/Org are you using? C-h v emacs-version RET C-h v org-version RET ob-clojure.el in latest stable release of Org works fine. The one bundled with current

Re: trouble with setting up cider within org mode

2014-01-23 Thread Bastien
Rui Yang writes: > I tried to setup cider to use within org mode. I managed to evaluate > single clojure statement but not multiple. See my reply in the other group where you posted this. This works fine with latest stable Org-mode version, which is not the one that comes with latest stable Ema

Re: semantics of >! on closed channels

2014-01-23 Thread Meikel Brandmeyer (kotarak)
Hi, probably the idea is, that the one who's feeding the channel is the one in charge of closing it. After all, they know when there is no more input available. Do you have a use case where this problem manifests? Or is that just a vague fear that it might happen? Kind regards Meikel -- --

Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-23 Thread Rui Yang
Thanks for the quick reply. Emacs version: 24.3.1 Org version: Org-mode version 8.2.4 I actually copied codes of ob-clojure from master to include support for cider (sorry, my bad hack). But I found it strange in the org-mode git. the latest stable tag is 8.2.5g doesn't include supporting of *c

Re: semantics of >! on closed channels

2014-01-23 Thread t x
Hi, * This is the time I've heard "the one who's feeding the channel is the one in charge of closing it" -- previously, my channel code was fairly ad-hoc and agressive (since I need to kill many (go-loop [msg (wrote: > Hi, > > probably the idea is, that the one who's feeding the channel is the

Re: semantics of >! on closed channels

2014-01-23 Thread t x
Following up on this, will something terrible happen if: https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/channels.clj#L59 was changed from (box nil) to (box :chan-closed) On Thu, Jan 23, 2014 at 4:21 AM, t x wrote: > Hi, > > * This is the time I've

Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-23 Thread Bastien
Rui Yang writes: > Sorry if missed sth. No, my bad: cider is supported in the master (development)* branch, not in the latest stable Org release. > I will try to install org from master and have a try. ~$ git clone git://orgmode.org/org-mode.git ~$ make autoloads and update your load-path i

Re: semantics of >! on closed channels

2014-01-23 Thread Meikel Brandmeyer (kotarak)
Hi, there is only one reason I can imagine to close a channel: the one in charge determined that there is not more input. And the one in charge is either the producing side, or a kind of supervisor. In the latter case a separate way of communication is needed to inform the sender, that they sh

Re: avoiding repetition in ns declarations

2014-01-23 Thread Phillip Lord
Konrad Hinsen writes: >>   I have the following problem: >> >> (ns foo.bar >>   ... >>   ... >>   ... ) >> >> There's basically 10 lines of require that I want as part of nearly >> _every_ ns I declare is there a way to define some soft of alias / >> abbrevraviation that is used in namespaces at w

Re: [ANN] Jig

2014-01-23 Thread Malcolm Sparks
Hi Joachim The component lifecycle protocol is used to group together the init, start and stop functions tied to ephemeral services common to many Java server-side applications. I'm not sure it makes sense for components to satisfy other protocols that are functional in nature, as this invite coup

[core.async] New put api

2014-01-23 Thread Timothy Baldridge
I'm looking for some feedback on recent changes Rich and I have made to core.async: I merged the "put ret" branch into master of core.async. This commit introduces some changes to the core.async API that provides feedback during a put! operation. The changes to the public api are fairly simple:

Re: semantics of >! on closed channels

2014-01-23 Thread Timothy Baldridge
t x, these change you suggest are almost exactly what we have done in the "put ret" branch. I merged these changes into master this morning, and would be interested in your feedback. Within a few hours these changes should be available via the 0.1.0-SNAPSHOT version of core.async, or via downloadin

Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-23 Thread greg r
We had a discussion about this in the cider-emacs group: https://groups.google.com/forum/#!topic/cider-emacs/xj-HYTAA-D0 Bastien's page on using Overtone with Clojure in org code blocks is very informative with regards to setting it all up: http://bzg.fr/emacs-org-babel-overtone-intro.html Not

Re: Help about using clojure in org mode in Emacs with CIDER

2014-01-23 Thread Bastien
Hi Greg, greg r writes: > I would like to edit this page to bring it up to date with Cider, and > I would like to help > as soon as I figure out the process with keys and git! Great -- the steps 1. Create your public key if needed: ~$ ssh-keygen 2. Send ~/.ssh/id_rsa.pub to me 3. Wait for my c

leiningen and local maven repo

2014-01-23 Thread Maris
I added this to project.clj :repositories {"project" "file:/home/maris/.m2/repository"} Exception in thread "FileRepositoryConnector-1" java.lang.IllegalArgumentException: number of transferred bytes cannot be negative at org.sonatype.aether.util.listener.DefaultTransferEvent.setTransferredB

Re: [ANN] mod-lang-clojure (for Vert.x) 1.0.0.Beta1 released

2014-01-23 Thread Josh Kamau
Awesome work guys. I noted there is also some activity on the lein-vertx github project. Josh On Tue, Jan 21, 2014 at 7:32 PM, Toby Crawley wrote: > mod-lang-clojure[0] 1.0.0.Beta1 is no available in Maven Central. > > With this release, the API should be complete, and we hope to get a > 1.0

Re: leiningen and local maven repo

2014-01-23 Thread Andy Fingerhut
Why did you add that to your repositories? You can do 'lein install' to install a project into your local Maven repo, and by default Leiningen will check for local copies of JARs in your local Maven repo before going out to the Internet to look for them. Andy On Thu, Jan 23, 2014 at 9:35 AM, Ma

Re: semantics of >! on closed channels

2014-01-23 Thread t x
With apologies for my ignorance: Is there a way to tell lein: I want to pull the code state defined by this commit: ? https://github.com/clojure/core.async/commit/76b25bf91c670b0c3542ed9cb687ff29fb2183a7 (I tried "0.1.0-SNAPSHOT" but it appears not updated yet.) On Thu, Jan 23, 2014 at 6:07

Re: semantics of >! on closed channels

2014-01-23 Thread Timothy Baldridge
This document should help you find the repo you need to add: http://dev.clojure.org/display/community/Maven+Settings+and+Repositories Timothy On Thu, Jan 23, 2014 at 1:49 PM, t x wrote: > With apologies for my ignorance: > > Is there a way to tell lein: > > I want to pull the code state def

Re: Informatica Online Training By Experienced Trainers in Australia, USA, Canada

2014-01-23 Thread Sean Corfield
This company has been spamming various technical lists lately with this same generic promotion. Can a moderator please report them for spam and ban them? Thank you! Sean On Jan 23, 2014, at 2:04 AM, Online Training wrote: > SunItLabs provides the best Software’s training for various Computer

Re: Informatica Online Training By Experienced Trainers in Australia, USA, Canada

2014-01-23 Thread Andy Fingerhut
Banned from the Clojure group for reason of spamming. Andy On Thu, Jan 23, 2014 at 1:11 PM, Sean Corfield wrote: > This company has been spamming various technical lists lately with this > same generic promotion. Can a moderator please report them for spam and ban > them? > > Thank you! > > Se

Solutions for subclassing java.io.InputStream

2014-01-23 Thread James Reeves
Hi folks, Is anyone aware of any Clojure solutions or libraries for subclassing the java.io.InputStream class? The proxy function doesn't work in this case, and gen-class requires some fiddling to get operational. Ideally I'd be looking for a library that derives an InputStream from an IFn. Is t

Re: Clojure run time isolation with the ability to share data structures

2014-01-23 Thread Arnout Roemers
Hi Giri, At my company, we also desired multiple, isolated Clojure runtimes in one JVM instance, sharing Clojure data structures/types. So indeed, we also created special ClassLoaders in order to do this. We had the same problem with some data types being tied to the Clojure runtime somehow. Ev

Re: [core.async] New put api

2014-01-23 Thread Sean Corfield
Can you confirm: * Today, calling put! on a closed channel throws an exception (according to its docstring). * After this change, calling put! on a closed channel will return nil instead. The current docstring says that the function will be called "when complete" which I took to mean when the v

Re: [core.async] New put api

2014-01-23 Thread Timothy Baldridge
Sadly, put! on a closed channel has never thrown an exception (regardless of what the docstring says). I'll list the semantics, but note that the wording gets a bit clumsy due to the way threading works. So if I say "if the channel is closed when the put! occurs", the "occurs" is at the time that

[ANN] Counterclockwise 0.23.0

2014-01-23 Thread Laurent PETIT
Hello, New release for Counterclockwise. It is a small release, but with features important for end users: - works again with Eclipse Indigo - Version numbers are more apparent in the Install section of the documentation, the About page of the Standalone product, and in the filename of the Stand

Re: core.async over websocket + cljs + clojure

2014-01-23 Thread ckirkendall
I recently gave a talk about doing this. You can find the code for my talk here: https://github.com/ckirkendall/chatter-box, Its a group chat application that has the feel of twitter. It uses core.async and websockets. The core.async code is bit dated but the websocket stuff should be good

[ANN?]: ring-jetty-adapter with jetty 9.1.x

2014-01-23 Thread Andrey Antukh
Hi! I have port the current ring-jetty-adapter from current ring repository to use jetty 9.1.1 version. I understand that current ring-jetty-adapter uses 7.6.x branch for java 1.5 compatibility, but in environments when all apps runs over jdk7, jetty 9.x seems more modern environment. if the mai

Re: [ANN?]: ring-jetty-adapter with jetty 9.1.x

2014-01-23 Thread James Reeves
You might want to give it a different name, like ring-jetty9-adapter, otherwise it might be confused with the ring-jetty-adapter package in Ring itself. - James On 23 January 2014 22:39, Andrey Antukh wrote: > Hi! > > I have port the current ring-jetty-adapter from current ring repository to >

Re: semantics of >! on closed channels

2014-01-23 Thread t x
Everything works as expected now. Thanks! On Thu, Jan 23, 2014 at 12:54 PM, Timothy Baldridge wrote: > This document should help you find the repo you need to add: > > http://dev.clojure.org/display/community/Maven+Settings+and+Repositories > > Timothy > > > On Thu, Jan 23, 2014 at 1:49 PM, t x

Re: core.async over websocket + cljs + clojure

2014-01-23 Thread Logan Linn
I've been working on a game in my spare time that does this. The Clojure backend and ClojureScript client communicate with core.async over WebSocket carrying edn data Game: https://github.com/loganlinn/ji Client WebSocket using: https://github.com/loganlinn/cljs-websockets-async Server WebSocket

Re: core.async over websocket + cljs + clojure

2014-01-23 Thread Mark Mandel
I'm sure Plugh probably does similar things, but my "learning clojure app" has my own custom RPC mechanism over websockets that I wrote (because it was fun) that is all based around core.async and uses edn to transfer data back and forth. https://github.com/markmandel/chaperone Server Side: https

Re: [ANN] Jig

2014-01-23 Thread Joachim De Beule
Hi Malcolm, Thank you for your very helpful reply! Indeed, I've also been thinking about "database components", "elasticsearch components", "memcache components" and so on that all are async/channels (or something) but failed to find the right abstraction so far, so probably it is best to sep

Re: core.async over websocket + cljs + clojure

2014-01-23 Thread t x
Fantastic! I will study these solutions and spam questions later. On Thu, Jan 23, 2014 at 3:59 PM, Mark Mandel wrote: > I'm sure Plugh probably does similar things, but my "learning clojure app" > has my own custom RPC mechanism over websockets that I wrote (because it > was fun) that is all ba

Re: core.async over websocket + cljs + clojure

2014-01-23 Thread Alexander Hudek
We've had something like this working for a while now, though our system uses browserchannel rather than websockets since we need to support older browsers. On the plus side, browserchannel handles some issues already such as managing the state of the connection to the server and retrying when i

Re: [ANN] Stasis - not another static site framework

2014-01-23 Thread Ryan McGowan
Very minimalist. I appreciate that. As the author of incise I'd like to point out a few things though. :) 1. You did not specifically say that incise forced some sort of templating option though it was implied (along with the other static site generators). Incise does not force any suc

Re: [ANN] Stasis - not another static site framework

2014-01-23 Thread Magnar Sveen
> > Very minimalist. I appreciate that. > Thank you :-) And let me say that out of the five frameworks, I think Incise is the most exciting - with its focus on extensibility. This makes sharing implementations easier. The stasis way to do this is for > everyone to write it and integrate themse

Re: semantics of >! on closed channels

2014-01-23 Thread Cedric Greevey
[meta, but about something apparently triggered by the message, from this thread, that I'm quoting] Why did reading this post cause gmail to go bonkers? I saw this thread had new articles since earlier today, brought it up, and read the previous message, then just after I'd scrolled down to this o

Re: semantics of >! on closed channels

2014-01-23 Thread Timothy Baldridge
Umwat? On Jan 23, 2014 7:17 PM, "Cedric Greevey" wrote: > [meta, but about something apparently triggered by the message, from this > thread, that I'm quoting] > > Why did reading this post cause gmail to go bonkers? I saw this thread had > new articles since earlier today, brought it up,

Re: semantics of >! on closed channels

2014-01-23 Thread Cedric Greevey
Which part didn't you understand? When I scrolled down to "t x"'s message, after a short delay *something* wrested control of Firefox away from me and issued a sequence of navigation commands the effect of which was to log me out of gmail, much as if I'd clicked the little down arrow by my username

Re: semantics of >! on closed channels

2014-01-23 Thread Timothy Baldridge
>Which part didn't you understand? The part where you think that this is the appropriate channel for discussing general IT problems you are having with your computer > I don't know if it was something in "t x"'s message that triggered it Well you accused him of that pretty much right off the bat

Re: [ANN] Stasis - not another static site framework

2014-01-23 Thread Ryan McGowan
Thanks! I agree. I think they both have there uses as things stand right now. Maybe Incise could even use Stasis as a lib to build its more elaborate > features on top of? I was thinking the same thing. Unfortunately, I think there are a few blockers right now (serving is done very differentl

Re: semantics of >! on closed channels

2014-01-23 Thread Cedric Greevey
I didn't say "a virus". I pointed out that it appeared to be triggered by viewing a particular message in this thread. It may be that there's some gimmick text you can embed in a mail that screws up gmail -- there's certainly precedent, anyone on a dialup connection will get their line dropped when

Re: semantics of >! on closed channels

2014-01-23 Thread john walker
This is a common windows problem. On Thursday, January 23, 2014 9:17:09 PM UTC-5, Cedric Greevey wrote: > > [meta, but about something apparently triggered by the message, from this > thread, that I'm quoting] > > Why did reading this post cause gmail to go bonkers? I saw this thread had > new a

Re: MyType cannot be cast to MyType?

2014-01-23 Thread Jonathan Barnard
Excellent, that looks quite useful, thank you. On Thursday, 23 January 2014 01:59:21 UTC+11, Mauricio Aldazosa wrote: > > Take a look at Stuart's tools.namespace ( > https://github.com/clojure/tools.namespace), although be wary of the > protocol issue as it is something that is pointed out in the

ANN: clojure-objc

2014-01-23 Thread Gal Dolber
clojure-objc is a clojure compiler that generates java(instead of bytecode) and uses j2objc(https://code.google.com/p/j2objc/) to translate it to objc. Goals * Write iOS and MacOS apps in clojure * Future proof: new features on clojure should be easy to add * Distribute clojure-objc libs usin

[ANN] clj-flume-node 0.1.0

2014-01-23 Thread Yoshitaka Kawashima
Hi, I released clj-flume-node v0.1.0. It's a clojure library for Apache Flume . Apache Flume is a very useful tool for collecting events and logs. But Its configuration file is Java properties. It's boring for me. So, I enabl

Re: MyType cannot be cast to MyType?

2014-01-23 Thread Laurent PETIT
Hello Jonathan, As Stuart said, the problem is probably appearing the second (and more) times you evaluate the namespace in the repl, whatever the method. To mitigate the issue, you can also try to avoid redefining the whole namespace containing the type definitions, and just use Ctrl+enter to se