Re: Meta-circular STM for teaching purposes

2011-04-22 Thread Tom Van Cutsem
Devin,

No course notes at the moment, but there is a slide set that should make it
easier to digest the code: 
http://soft.vub.ac.be/~tvcutsem/talks/presentations/STM-in-Clojure.pdf

Cheers,
Tom

2011/4/21 Devin Walters dev...@gmail.com

 +1

 Thanks so much.  Looking forward to digging into the code this evening.

 Any chance you will have any online course materials for public
 consumption?

 Thanks again,
 Sent via mobile

 On Apr 21, 2011, at 1:25 PM, Ambrose Bonnaire-Sergeant 
 abonnaireserge...@gmail.com wrote:

 This is great, thanks for sharing!

 Ambrose

 On Thu, Apr 21, 2011 at 10:57 PM, Tom Van Cutsem  http://tomvc.be
 tomvc.be@ http://gmail.comgmail.com wrote:

 The following might be of interest to Clojurians:

 https://github.com/tvcutsem/stm-in-clojure
 https://github.com/tvcutsem/stm-in-clojure is a meta-circular
 implementation of STM in Clojure. It was created purely for educational
 purposes (to allow people to better understand STM by reading a Clojure
 implementation, without having to descend into the Java implementation). The
 simplest meta-circular MVCC implementation weighs in at less than 200 LOC.

 I use this implementation for teaching. There's a set of slides that
 accompany this code at http://www.slideshare.net/tvcutsem/stm-inclojure
 http://www.slideshare.net/tvcutsem/stm-inclojure

 I welcome any feedback on this implementation. I'm fairly new to Clojure
 myself, so comments on style are also appreciated. For those into
 Clojure's real STM implementation, pointing out any aspects of my
 meta-circular implementation that may be misleading as compared to the
 built-in STM would be particularly helpful.

 Kind regards,
 Tom

 2010/11/2 Tom Van Cutsem  http://tomvc.betomvc.be@ http://gmail.com
 gmail.com

 Hi,

 In a couple of months I will teach a new course on concurrent/parallel
 programming at the University of Brussels. I will use Clojure for a large
 part of the course. I primarily want the students to learn how to make
 effective use of the STM as Clojure programmers, but I would also like to
 expose them to some under the hood implementation details. One option
 would be to dive into the actual Java implementation of Clojure's STM, but
 my fear is that this will be too complex. Another option I've been thinking
 of is to write a simple, didactic STM in Clojure itself (following the SICP
 meta-circular interpreters tradition). It goes without saying that high
 performance is not the goal here. Rather, it should help students to grasp
 atomicity, isolation, interactions between readers/writers, the differences
 between alter and commute, etc.

 My questions to the list:
 - has anyone already experimented with a toy STM in Clojure for didactic
 purposes?
 - what would be a good resource to start such a design from? (my current
 plan is to start from  http://java.ociweb.com/mark/stm/article.html
 http://java.ociweb.com/mark/stm/article.html)

 Thanks,
 Tom


  --
 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
 clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
  clojure%2bunsubscr...@googlegroups.com
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en
 http://groups.google.com/group/clojure?hl=en


  --
 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
 clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
  clojure+unsubscr...@googlegroups.com
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
  http://groups.google.com/group/clojure?hl=en
 http://groups.google.com/group/clojure?hl=en

  --
 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 posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en


-- 
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 posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Meta-circular STM for teaching purposes

2011-04-21 Thread Tom Van Cutsem
The following might be of interest to Clojurians:

https://github.com/tvcutsem/stm-in-clojure is a meta-circular implementation
of STM in Clojure. It was created purely for educational purposes (to allow
people to better understand STM by reading a Clojure implementation, without
having to descend into the Java implementation). The simplest meta-circular
MVCC implementation weighs in at less than 200 LOC.

I use this implementation for teaching. There's a set of slides that
accompany this code at http://www.slideshare.net/tvcutsem/stm-inclojure

I welcome any feedback on this implementation. I'm fairly new to Clojure
myself, so comments on style are also appreciated. For those into
Clojure's real STM implementation, pointing out any aspects of my
meta-circular implementation that may be misleading as compared to the
built-in STM would be particularly helpful.

Kind regards,
Tom

2010/11/2 Tom Van Cutsem tomvc...@gmail.com

 Hi,

 In a couple of months I will teach a new course on concurrent/parallel
 programming at the University of Brussels. I will use Clojure for a large
 part of the course. I primarily want the students to learn how to make
 effective use of the STM as Clojure programmers, but I would also like to
 expose them to some under the hood implementation details. One option
 would be to dive into the actual Java implementation of Clojure's STM, but
 my fear is that this will be too complex. Another option I've been thinking
 of is to write a simple, didactic STM in Clojure itself (following the SICP
 meta-circular interpreters tradition). It goes without saying that high
 performance is not the goal here. Rather, it should help students to grasp
 atomicity, isolation, interactions between readers/writers, the differences
 between alter and commute, etc.

 My questions to the list:
 - has anyone already experimented with a toy STM in Clojure for didactic
 purposes?
 - what would be a good resource to start such a design from? (my current
 plan is to start from http://java.ociweb.com/mark/stm/article.html)

 Thanks,
 Tom


-- 
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 posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Meta-circular STM for teaching purposes

2011-04-21 Thread Ambrose Bonnaire-Sergeant
This is great, thanks for sharing!

Ambrose

On Thu, Apr 21, 2011 at 10:57 PM, Tom Van Cutsem tomvc...@gmail.com wrote:

 The following might be of interest to Clojurians:

 https://github.com/tvcutsem/stm-in-clojure is a meta-circular
 implementation of STM in Clojure. It was created purely for educational
 purposes (to allow people to better understand STM by reading a Clojure
 implementation, without having to descend into the Java implementation). The
 simplest meta-circular MVCC implementation weighs in at less than 200 LOC.

 I use this implementation for teaching. There's a set of slides that
 accompany this code at http://www.slideshare.net/tvcutsem/stm-inclojure

 I welcome any feedback on this implementation. I'm fairly new to Clojure
 myself, so comments on style are also appreciated. For those into
 Clojure's real STM implementation, pointing out any aspects of my
 meta-circular implementation that may be misleading as compared to the
 built-in STM would be particularly helpful.

 Kind regards,
 Tom

 2010/11/2 Tom Van Cutsem tomvc...@gmail.com

 Hi,

 In a couple of months I will teach a new course on concurrent/parallel
 programming at the University of Brussels. I will use Clojure for a large
 part of the course. I primarily want the students to learn how to make
 effective use of the STM as Clojure programmers, but I would also like to
 expose them to some under the hood implementation details. One option
 would be to dive into the actual Java implementation of Clojure's STM, but
 my fear is that this will be too complex. Another option I've been thinking
 of is to write a simple, didactic STM in Clojure itself (following the SICP
 meta-circular interpreters tradition). It goes without saying that high
 performance is not the goal here. Rather, it should help students to grasp
 atomicity, isolation, interactions between readers/writers, the differences
 between alter and commute, etc.

 My questions to the list:
 - has anyone already experimented with a toy STM in Clojure for didactic
 purposes?
 - what would be a good resource to start such a design from? (my current
 plan is to start from http://java.ociweb.com/mark/stm/article.html)

 Thanks,
 Tom


  --
 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 posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Meta-circular STM for teaching purposes

2011-04-21 Thread Devin Walters
+1

Thanks so much.  Looking forward to digging into the code this evening.

Any chance you will have any online course materials for public consumption?

Thanks again,
Sent via mobile

On Apr 21, 2011, at 1:25 PM, Ambrose Bonnaire-Sergeant 
abonnaireserge...@gmail.com wrote:

 This is great, thanks for sharing!
 
 Ambrose
 
 On Thu, Apr 21, 2011 at 10:57 PM, Tom Van Cutsem tomvc...@gmail.com wrote:
 The following might be of interest to Clojurians:
 
 https://github.com/tvcutsem/stm-in-clojure is a meta-circular implementation 
 of STM in Clojure. It was created purely for educational purposes (to allow 
 people to better understand STM by reading a Clojure implementation, without 
 having to descend into the Java implementation). The simplest meta-circular 
 MVCC implementation weighs in at less than 200 LOC.
 
 I use this implementation for teaching. There's a set of slides that 
 accompany this code at http://www.slideshare.net/tvcutsem/stm-inclojure
 
 I welcome any feedback on this implementation. I'm fairly new to Clojure 
 myself, so comments on style are also appreciated. For those into Clojure's 
 real STM implementation, pointing out any aspects of my meta-circular 
 implementation that may be misleading as compared to the built-in STM would 
 be particularly helpful.
 
 Kind regards,
 Tom
 
 2010/11/2 Tom Van Cutsem tomvc...@gmail.com
 Hi,
 
 In a couple of months I will teach a new course on concurrent/parallel 
 programming at the University of Brussels. I will use Clojure for a large 
 part of the course. I primarily want the students to learn how to make 
 effective use of the STM as Clojure programmers, but I would also like to 
 expose them to some under the hood implementation details. One option would 
 be to dive into the actual Java implementation of Clojure's STM, but my fear 
 is that this will be too complex. Another option I've been thinking of is to 
 write a simple, didactic STM in Clojure itself (following the SICP 
 meta-circular interpreters tradition). It goes without saying that high 
 performance is not the goal here. Rather, it should help students to grasp 
 atomicity, isolation, interactions between readers/writers, the differences 
 between alter and commute, etc.
 
 My questions to the list:
 - has anyone already experimented with a toy STM in Clojure for didactic 
 purposes?
 - what would be a good resource to start such a design from? (my current plan 
 is to start from http://java.ociweb.com/mark/stm/article.html)
 
 Thanks,
 Tom
 
 -- 
 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 posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 
 -- 
 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 posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Meta-circular STM for teaching purposes

2010-11-04 Thread ka
Hi Tom,

I might not be even remotely qualified but since I'm interested and
find the idea cool, so here's my take:

 - has anyone already experimented with a toy STM in Clojure for didactic 
 purposes?

No idea :)

 - what would be a good resource to start such a design from? (my current plan 
 is to start from http://java.ociweb.com/mark/stm/article.html)

I would think a good place to start is to define the primitives and
goals:
Primitives: assume existence of monitors in Clojure
Goals: Implement dosync in Clojure (hefty goal :))

I would love to help out in any capacity since I myself want to get
started with understand the STM in more detail. If you need a
volunteer you may contact me personally.

Thanks

-- 
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 posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Meta-circular STM for teaching purposes

2010-11-02 Thread Tom Van Cutsem
Hi,

In a couple of months I will teach a new course on concurrent/parallel
programming at the University of Brussels. I will use Clojure for a large
part of the course. I primarily want the students to learn how to make
effective use of the STM as Clojure programmers, but I would also like to
expose them to some under the hood implementation details. One option
would be to dive into the actual Java implementation of Clojure's STM, but
my fear is that this will be too complex. Another option I've been thinking
of is to write a simple, didactic STM in Clojure itself (following the SICP
meta-circular interpreters tradition). It goes without saying that high
performance is not the goal here. Rather, it should help students to grasp
atomicity, isolation, interactions between readers/writers, the differences
between alter and commute, etc.

My questions to the list:
- has anyone already experimented with a toy STM in Clojure for didactic
purposes?
- what would be a good resource to start such a design from? (my current
plan is to start from http://java.ociweb.com/mark/stm/article.html)

Thanks,
Tom

-- 
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 posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en