Re: ..a couple of pastes; STM and data-flow stuff..
- From: Lars Rune Nøstdal <larsnostdal@xxxxxxxxx>
- Date: Thu, 16 Apr 2009 08:11:42 -0700 (PDT)
On Apr 14, 8:48 pm, Slobodan Blazeski <slobodan.blaze...@xxxxxxxxx>
wrote:
On Apr 14, 1:57 am, Lars Rune Nøstdal <larsnost...@xxxxxxxxx> wrote:
Hey,
So much spam. Here is some code-spam:
STM (similar to what clojure has):
http://paste.lisp.org/display/78259#3
dataflow (hi kt):
http://paste.lisp.org/display/78490
STM and dataflow combined, just finished this:
http://paste.lisp.org/display/78522
"processes" / message-queue (more "absolute worlds" for STM to sync
against == more concurrency):
http://paste.lisp.org/display/78520
..there is more work to do. Need a killer-app. also. Online, real-time
collaboration on a spread-sheet? Bit boring, and I guess Google has
this already ..
PS: IMHO Lisp still rocks. I can't imagine doing this in Java .. :/
Cool dataflow examples, just below with-cells looks blockish.
(with-cells (cell-1 cell-2 cell-3)
(dbg-princ cell-3)
(incf cell-1)
(dbg-princ cell-3)
(incf cell-1)
(dbg-princ cell-3)
(incf cell-1)
(dbg-princ cell-3)))
with-cells is just a macro that expands to a symbol-macrolet and
reduces the amount of typing one need to do; it is not needed. with-
formula has an implicit with-cells. with-refs is the same thing; I'll
quote from one of the comments in the pastes:
#|
WITH-REFS just reduces the amount of typing needed.
Without it, you'd have to do things like:
(incf (value-of a))
(assert (= (value-of a) (value-of b)))
|#
...and similarly with-sync has an implicit with-refs, like this:
(with-refs (,@(when (listp (first args)) (first args)))
I'm not sure what you mean by blockish, but it doesn't block or
anything like that; it's just a convenience macro like the standard
cl:with-slots macro really.
bobihttp://tourdelisp.blogspot.com/
.
- Follow-Ups:
- Re: ..a couple of pastes; STM and data-flow stuff..
- From: Slobodan Blazeski
- Re: ..a couple of pastes; STM and data-flow stuff..
- References:
- ..a couple of pastes; STM and data-flow stuff..
- From: Lars Rune Nøstdal
- Re: ..a couple of pastes; STM and data-flow stuff..
- From: Slobodan Blazeski
- ..a couple of pastes; STM and data-flow stuff..
- Prev by Date: Re: Rebuilding functions at run-time
- Next by Date: Re: ..a couple of pastes; STM and data-flow stuff..
- Previous by thread: Re: ..a couple of pastes; STM and data-flow stuff..
- Next by thread: Re: ..a couple of pastes; STM and data-flow stuff..
- Index(es):