I took a stab at it in pure core.async, unfortunately, it does not work; I
would be curious if anyone could explain why.
(use '[clojure.core.async :only [timeout ! go !! alts!]])
(defn fib [n tmout]
(let [res (go (if ( n 2)
n
(let [r1 (! (fib (- n 1)
I am not actually familiar with this form, don't know what [types] actually
does:
(:require [macros.arrow :refer (=)]
[types])
I don't think you need to be requiring the cljs macros twice as you seem to
be doing in both forms.
Macros are in general somewhat of a sore spot in
Did you mean
*(go (loop [ ... ]*
* (case ...*
*.. (func arg1 foo1)*
*.. (func arg2 foo2)*
*.. (func arg3 foo3)))*
*where (defn func [ ... ] (.. ! .. ))*
, as func (not foo) is the thing in function position?
Ignoring that, and working in a general sense:
I
I just want to re-iterate that there are many (some are probably better)
ways to do this, but using what I suggested above it would be:
(defn foo []
(async/go hi))
(defn test []
(println (async/! (foo
(defn test []
(let [c (async/chan 10)]
(async/go
(async/! c (async/!
And already, I see that the first one should have been
(defn test []
(async/go
(println (async/! (foo)
Boy I wish you could edit this post after the fact.
On Monday, January 13, 2014 3:32:39 PM UTC-8, Stephen Cagle wrote:
I just want to re-iterate that there are many (some
But
be warned that the author of those is very opinionated and feels that he is
writing about the one true way ;-)
On 23 December 2013 19:32, Stephen Cagle sam...@gmail.com
javascript:wrote:
Cross posted from pedestal-users group, as many people who are not
using pedestal may still
map to another path
are possibly separate from the schema that specifies which dataflow
function is associated with which path.
On Tuesday, December 24, 2013 1:36:16 PM UTC-8, Stephen Cagle wrote:
Thank you. I only read the last two articles so far; some notes.
http://my.opera.com/Vorlath/blog
how evident optimizations might be when you
use a dataflow processing model.
On Tuesday, December 24, 2013 3:50:43 PM UTC-8, Stephen Cagle wrote:
One thing that I am seeing on a re-read is that I conflated the notion of
the data flow function and the paths. I was sort of thinking that the data
Cross posted from pedestal-users group, as many people who are not using
pedestal may still know about dataflow, terms like effect are used in the
context of pedestal
Pedestal seems strongly based on dataflow based programming. The gigantic
tutorial just sort of jumps in on it.
Based on my
core.async discourages you from placing nil in a channel, as nil is only
taken when the channel has been closed. However, if I create a go block
with a body that evaluates to nil, core.async will return a channel that
contains nil. This is a nil as a take! value, not a nil to indicate the
Huh, that is pretty clever.
You're right, I just assumed I was seeing the body result. That is a pretty
clever way to fix the issue. nil just closes the returned channel, causing
future takes on it to return nil. Neat.
On Saturday, December 14, 2013 11:18:07 AM UTC-8, Stephen Cagle wrote
Did you try out test.generative? If so, how does simple check contrast to
test.generative?
On Thursday, November 21, 2013 11:31:19 AM UTC-8, Chas Emerick wrote:
simple-check is planning on remaining Clojure-only, at least for the
foreseeable future. This non-fork fork is the best
.
On Monday, September 30, 2013 11:07:56 PM UTC-7, Stephen Cagle wrote:
Basically, I get a error when I try to follow the directions at
http://ianeslick.com/2013/05/17/clojure-debugging-13-emacs-nrepl-and-ritz/ .
In my init.el, I get a error when evaluating:
*(require 'nrepl-ritz) ;;after
Basically, I get a error when I try to follow the directions at
http://ianeslick.com/2013/05/17/clojure-debugging-13-emacs-nrepl-and-ritz/ .
In my init.el, I get a error when evaluating:
*(require 'nrepl-ritz) ;;after (require 'nrepl)*
the error is:
*Debugger entered--Lisp error:
*
(ns com.samedhi.app.test.behavior-test
(:require
[clojure.test.generative :as generative])
(:use
[com.samedhi.quizry.app.test.defspec :only [defspec]]
))
*
*... ommited content ...*
*
*
*(def ^:dynamic *view* nil)*
*
*
*(binding [*view* (atom
ugh, I also see that for the last example, where I just removed the binding
I said all 4 threads, I should have said all N threads. (There are 4 in
my case, but that is just on my machine)
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
-on-quiz-view*
* b/quiz-view*
* [^{:tag `random-loc} loc*
* ^{:tag (clojure.core/constantly :ignored)} key*
* ^{:tag `view} value])*
On Friday, September 20, 2013 12:01:41 AM UTC-7, Stephen Cagle wrote:
*
(ns com.samedhi.app.test.behavior-test
(:require
[clojure.test.generative
is being shared among all 4
threads, which isn't really what I wanted. Furthermore, without some
additional synchronization, I am pretty sure that I could have some invalid
state.
On Friday, September 20, 2013 12:01:41 AM UTC-7, Stephen Cagle wrote:
*
(ns com.samedhi.app.test.behavior-test
with that, but it seems to work well enough for me.
On Thursday, August 15, 2013 11:39:19 PM UTC-7, Laurent PETIT wrote:
2013/8/16 Stephen Cagle sam...@gmail.com javascript::
Sorry if I am being dense, just want to make sure I understand what you
are
saying...
So, I was including
I have project 'base' that has a logback.xml file and project 'derive' that
also has a logback.xml file. Project 'derive' has a dependency on 'base'.
When I lein trampoline repl on project 'derive', I get the following
warning.
15:34:30,066 |-INFO in
,
best loaded from the file system (possibly through -D). It doesn't matter
what settings base has for logging, derive should set all logging
parameters.
jason
On Thursday, August 15, 2013 3:51:04 PM UTC-7, Stephen Cagle wrote:
I have project 'base' that has a logback.xml file and project
environment-specific logging configured in that environment.
jason
On Thu, Aug 15, 2013 at 5:06 PM, Stephen Cagle sam...@gmail.comjavascript:
wrote:
I don't know what -D is, other than a one eyed laughing face. :D
Is there some sort of standard for this? Do people simply write
So, I was having trouble requiring some namespaces in test.generative . I
have the following project.clj
(defproject gen 0.1.0-SNAPSHOT
:description FIXME: write description
:url http://example.com/FIXME;
:license {:name Eclipse Public License
:url
/variable
names that are meant to be publicly used. As an example, here's the
externs file for jquery:
https://github.com/ibdknox/jayq/blob/master/resources/externs/jquery.js .
On Wednesday, May 30, 2012 12:15:35 PM UTC-7, Stephen Cagle wrote:
When I compile in advanced mode, I get thousands
I have a file (tree.clj) that I have written. All is well with that file. I
want to use this file from both clojure and clojurescript.
I can see that this works fine on the clojure side of things, as I type (at
the repl) (use 'rpc.tree) and get back nil, I can then go ahead and do
whatever
25 matches
Mail list logo