Topics

programming

php drupal scheme scheming macros design patterns da la

design

design css

random thoughts

scribbles

alter ego

other me 'em that link us my space me linked in

Collections

Programmable web
PHP design patterns

Home

haskell

Learning to speak - erlang style concurrency in haskell ( part II )

Submitted by vlado on Fri, 2007-11-23 00:19.code | erlang | haskell | scribbles

A second installment of my attempt to code erlang-style concurrency abstraction in haskell. The effort in part I, was a bit short of the mark. Here I try to address some of the shortcomings, while leaving others open.

The main problem was that the receiver could escape outside of the process, which can cause various hard to debug mayhem. What will happen if two different threads receive data from the same channel? Yes, it might be intentional, but you could always duplicate a channel for that. What if it is a bug? What if it is a piece of malicious code? Better safe than sorry.

read more | vlado's blog | add new comment | 2 attachments

Learning to speak - erlang style concurrency in haskell

Submitted by vlado on Thu, 2007-11-15 17:41.code | erlang | haskell | scribbles

I'm on a learning haskell journey. But reading someone else's code and thoughts while educational is not that enlightening. Anyway, to cut the long story short:

  • I (still) want to see what this haskell thing is all about
  • I need a moderately complex problem to get a feeling of the haskell type system works, face the dreaded IO, while not wasting too much time
  • I need a decent actor style abstraction for some social/population based methods experiments I'm into

So this is how ended with Why not try my hand at erlang style concurrency. The best thing about it is that it aligns nicely with an individualistic view of the world. I can write sequential code to do something, which from time to time communicates with the rest of them, while the rest of the time doesn't really care.

Erlang implements lightweight processes with asynchronous messaging. The cool twist it puts on it is having reception guards - if a message is not matched by the guard conditions it stays in the mailbox (channel), and the rest of the messages are scanned. The first matching message is removed from the mailbox, the remaining messages are left in the mailbox in arrival order.

read more | vlado's blog | 2 comments | 2 attachments

To view - A Taste of Haskell Part

Submitted by vlado on Mon, 2007-11-12 00:28.haskell | lectures
Very good tutorial on Haskell by Samuel Peyton-Jones - A Taste of Haskell Part I & II And the slides.
read more | vlado's blog | add new comment

macros, higher-order functions, datatypes and design patterns

Submitted by vlado on Tue, 2006-08-29 14:09.design patterns | dylan | haskell | macros | php | programming | scheme

While reading, researching and experimenting for my macros project the terms in the title get mixed a lot. I'll try to summarise what is my understanding of a lot of the above. To be fair, most of these words are heavily overloaded with sometimes contradictory and or ovelapping meanings, so this short is only about my personal summary, no pretence for a general study or lit review.

Generic programming intuitevely corresponds to design patterns, or a tool to implement them. There should be a distinction between the functional or algorithmic side of the term and the structural or data (type) genericity.

read more | vlado's blog | add new comment
Syndicate content
Home

dikini.net

spreading confusion by accident since 1970