Home > Archive > Functional > June 2007 > best pattern matching
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
best pattern matching
|
|
| Grasper 2007-06-21, 8:05 am |
| Hi,
Which language has pattern matching that could run in independent instances
on several threads, have flexible support from top level synthesis and yet
be efficient. I was thinking of Haskell, Alice or F# as they are
multithreaded. I know that pattern matching in Haskell is hidden below much
of syntactic sugar but it is probably best for building something on top of
threads.
Any advice highly welcomed:-)
Regards,
grasper
| |
| Jon Harrop 2007-06-21, 8:05 am |
| Grasper wrote:
> Which language has pattern matching that could run in independent
> instances on several threads, have flexible support from top level
> synthesis and yet be efficient. I was thinking of Haskell, Alice or F# as
> they are multithreaded. I know that pattern matching in Haskell is hidden
> below much of syntactic sugar but it is probably best for building
> something on top of threads.
In F#, you could do:
match spawn_threads() with
| A -> ...
| B -> ...
where A and B are active patterns that collect the results of asynchronous
computations.
You can do similar things in OCaml too.
--
Dr Jon D Harrop, Flying Frog Consultancy
The OCaml Journal
http://www.ffconsultancy.com/produc...journal/?usenet
| |
| Carlo Capelli 2007-06-22, 8:07 am |
|
"Grasper" <grasper1@o2.pl> ha scritto nel messaggio
news:f5bhms$7f2$1@achot.icm.edu.pl...
> Hi,
>
> Which language has pattern matching that could run in independent
> instances
> on several threads, have flexible support from top level synthesis and yet
> be efficient. I was thinking of Haskell, Alice or F# as they are
> multithreaded. I know that pattern matching in Haskell is hidden below
> much
> of syntactic sugar but it is probably best for building something on top
> of
> threads.
Take a look to Curry at
http://en.wikipedia.org/wiki/Curry_programming_language (as i've done
recently). It seems to me the best language i ever seen, and if
appropriately developed, surely it will gain much attention.
Bye Carlo
> Any advice highly welcomed:-)
>
> Regards,
>
> grasper
>
>
| |
|
|
| Pierpaolo BERNARDI 2007-06-27, 8:06 am |
| On Fri, 22 Jun 2007 10:34:37 +0200, Jon Harrop <jon@ffconsultancy.com> wrote:
> Carlo Capelli wrote:
>
> Sounds interesting but the Curry mailing list gets as many posts in 10 years
> as the OCaml list gets in 1 month... :-)
One point for Curry.
P.
| |
| Arved Sandstrom 2007-06-28, 7:07 pm |
| "Jon Harrop" <jon@ffconsultancy.com> wrote in message
news:46799356$0$8732$ed2619ec@ptn-nntp-reader02.plus.net...
> Grasper wrote:
>
> In F#, you could do:
>
> match spawn_threads() with
> | A -> ...
> | B -> ...
>
> where A and B are active patterns that collect the results of asynchronous
> computations.
>
> You can do similar things in OCaml too.
>
> --
> Dr Jon D Harrop, Flying Frog Consultancy
> The OCaml Journal
> http://www.ffconsultancy.com/produc...journal/?usenet
Side question, Jon. How out of date am I with a F# 1.1.12.5 install?
It's already there. I really don't want to intstall another unless I am
going to miss something important.
AHS
| |
| Jon Harrop 2007-06-28, 7:07 pm |
| Arved Sandstrom wrote:
> Side question, Jon. How out of date am I with a F# 1.1.12.5 install?
>
> It's already there. I really don't want to intstall another unless I am
> going to miss something important.
That's before my time! They're on something like 1.9.2.3 now.
They've added lots of features like:
'a list is a subtype of 'a seq
Comprehensions
Active patterns: let you view data structures in different ways using
pattern matching (very ).
Asynchronous programming: special syntax for asynchronous invocation that
looks just like normal functional programming.
Better Visual Studio mode
and so on. I suspect many of our demos won't work with your version:
http://www.ffconsultancy.com/dotnet/fsharp/
I would highly recommend upgrading. Also, did you know a book on F# was
published recently (not ours)? Foundations of F# by Robert Pickering is a
sound introduction, particularly for Java and C# developers (IMHO).
--
Dr Jon D Harrop, Flying Frog Consultancy
The OCaml Journal
http://www.ffconsultancy.com/produc...journal/?usenet
| |
| Arved Sandstrom 2007-06-30, 4:12 am |
| "Jon Harrop" <jon@ffconsultancy.com> wrote in message
news:4683ed20$0$8756$ed2619ec@ptn-nntp-reader02.plus.net...
> Arved Sandstrom wrote:
>
> That's before my time! They're on something like 1.9.2.3 now.
>
> They've added lots of features like:
>
> 'a list is a subtype of 'a seq
>
> Comprehensions
>
> Active patterns: let you view data structures in different ways using
> pattern matching (very ).
>
> Asynchronous programming: special syntax for asynchronous invocation that
> looks just like normal functional programming.
>
> Better Visual Studio mode
>
> and so on. I suspect many of our demos won't work with your version:
>
> http://www.ffconsultancy.com/dotnet/fsharp/
>
> I would highly recommend upgrading. Also, did you know a book on F# was
> published recently (not ours)? Foundations of F# by Robert Pickering is a
> sound introduction, particularly for Java and C# developers (IMHO).
>
> --
> Dr Jon D Harrop, Flying Frog Consultancy
> The OCaml Journal
> http://www.ffconsultancy.com/produc...journal/?usenet
OK, thanks, Jon. I won't normally upgrade unless there are serious changes.
In this case there certainly are. In fact, since I am a newbie to F#, there
is no point in getting proficient with an old version. For a language that I
was good with I'd think differently, and decide whether I needed the new
stuff.
If you think the book is good (I take it you've read it and recommend it) I
will check it out. I do have a solid background in Java and C# and C++, so a
book would help. Mind you, the docs that come with the bundle aren't bad - a
decent programmer can get up to speed on them.
AHS
|
|
|
|
|