Design advice/patterns for Clojure concurrency

2009-04-15 Thread Robert Feldt
Although I understand each of the concurrency "primitives"/systems (stm, agents, atoms, dynvars) in isolation I find it harder to choose wisely between them when designing/implementing specific algorithms and programs. Do you have any advice/tips for how to choose between Clojure's different conc

Re: Accessing ASM?

2009-03-05 Thread Robert Feldt
On Mar 5, 1:48 am, MikeM wrote: > > I meant if ASM is already coming with clojure since it is used by > > clojure when generating bytecode. Maybe I am missing something... ;) > > You can look at genclass.clj for an example of using the ASM that is > bundled with Clojure. > Ah, of course... Than

Re: Accessing ASM?

2009-03-04 Thread Robert Feldt
ojure > works with Java. > Where's the catch? (or maybe I am missing something) > > -- > Itay Mamanhttp://javadots.blogspot.com > > On Mar 4, 11:09 pm, Robert Feldt wrote: > > > Can we access the ASM used by clojure internally from clojure code? > > Anyone

Accessing ASM?

2009-03-04 Thread Robert Feldt
Can we access the ASM used by clojure internally from clojure code? Anyone has an example? I need to write a bytecode transformer to trace the execution of a Java class. Would be great to be able to work with asm from within clojure. --~--~-~--~~~---~--~~ You receiv

Re: Functional way to implement a VM?

2008-12-22 Thread Robert Feldt
On Dec 22, 2:39 pm, Ola Bini wrote: > Well, the "classical" functional way of writing a language > implementation is to use continuation passing style. > Since you always pass one the new state to the waiting continuation you > never need to keep any explicit state around. > Yes, but I fail to

Re: Functional way to implement a VM?

2008-12-22 Thread Robert Feldt
On Dec 22, 12:27 pm, verec wrote: > The design simplicity is certainly very appealing, though it appears > that you can only operate on a predetermined fixed set of > "registers" (ie: a and b in your example) and would need to define as > many add_, sub_, mul_ ... variants as there are 'registe

Functional way to implement a VM?

2008-12-22 Thread Robert Feldt
I'm playing around with different designs to implement VM's (in a functional style). Think for parsing, FSM etc. One of the simpler I've come up with uses normal clojure funcs for each instruction to the vm. They all take the state as a map as input and then additional arguments. They all return

Re: DISCUSS: replace (rand)

2008-12-06 Thread Robert Feldt
type hints could speed it up... For details check: http://www.ms.uky.edu/~mai/RandomNumber Cheers, Robert Feldt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send