New concise guide I am creating:
http://www.coolpage.com/commentary/economic/shelby/Functional_Programming_Essence.html
I was able to condense Category theory and implementation of Monads to one
screen:
http://www.coolpage.com/commentary/economic/shelby/Functional_Programming_Essence.html#Monads
David Leimbach wrote:
I have to admit, the first time I hit the wiki page for DDC I said to
myself "Self, this sounds crazy complicated". Then I read part of the
PDF (your thesis I believe) about Region Types on the bus ride to work
and thought. "Gee I think I scared myself off too quickly".
kenny lu wrote:
Hi Michael,
Could you give an example of what patterns you want to write?
Regards,
Kenny
Something like
text = "11\n abcd \n22"
answer = text =~ "11.*22" ::
and have it find the entire string. The default behavior is to stop
matching when it encounters a newline. There
Hi Michael,
Could you give an example of what patterns you want to write?
Regards,
Kenny
On Wed, Nov 4, 2009 at 1:35 PM, Michael Mossey wrote:
> I have some very simple regex-matching needs, and Text.Regex.Posix will
> work fine, EXCEPT I need to match multi-line patterns, and/or find all
> occ
mpm:
> I have some very simple regex-matching needs, and Text.Regex.Posix will
> work fine, EXCEPT I need to match multi-line patterns, and/or find all
> occurrences of text that may occur several times on different lines. So I
> need to turn on some kind of flag. Can someone show me how to do
I have some very simple regex-matching needs, and Text.Regex.Posix will
work fine, EXCEPT I need to match multi-line patterns, and/or find all
occurrences of text that may occur several times on different lines. So I
need to turn on some kind of flag. Can someone show me how to do that? I
have
UArr operations subject to stream fusion:
http://code.haskell.org/~dons/code/uvector/Data/Array/Vector/Strict/
Direct-style operations, not subject to the optimization:
http://code.haskell.org/~dons/code/uvector/Data/Array/Vector/UArr.hs
/me needs to write a tutorial on this.
-- Don
b
On Mon, Oct 26, 2009 at 12:24:39AM -0200, Maurício CA wrote:
> > Well, before trying to get it standardized, you need to get it
> > implemented and tested by at least one compiler to explore the
> > design space and tradeoffs. I would happily accept any patches
> > into jhc that a support for such
Don,
There is more than one indexU ?
In Data.Array.Vector there is only 1 indexU that I can find.
Brian
On Nov 3, 2009, at 9:15 PM, Don Stewart wrote:
Well, it depends on which indexU the OP means. The one linked in the
docs is
the O(1) UA type class version.
-- Don
gcross:
Actually, it'
gcross:
> Oh, that's strange... the type class "UA" is defined twice, once in
> Data.Array.Vector and once in Data.Array.Vector.UArr; in the first
No, its exported from the former.
> module indexU is a separate function with the sources I exhibited, in
> the second module it is a method o
Oh, that's strange... the type class "UA" is defined twice, once in
Data.Array.Vector and once in Data.Array.Vector.UArr; in the first
module indexU is a separate function with the sources I exhibited, in
the second module it is a method of the UA type-class which seems to
have O(1) acces
ok:
>
> On Nov 4, 2009, at 9:30 AM, Deniz Dogan wrote:
>> So what's the deal with Clean? Why is it preferable to Haskell? Why is
>> it not?
>
> (1) Speed.
I'd strongly argue that speed is not a reason to use Clean -- esp. if
you have more than one core:
http://shootout.alioth.debian.org/u64
Given the Shootout results, the difference is a matter of a few
seconds. If Clean Programmers need those few extra seconds, they're
welcome to them.
We're Lazy around here. :)
/Joe
On Nov 4, 2009, at 12:16 AM, Gregory Crosswhite wrote:
So I take it you are saying that it really *cleans* H
So I take it you are saying that it really *cleans* Haskell's clock
when it comes to speed? ;-)
- Greg
On Nov 3, 2009, at 9:04 PM, Richard O'Keefe wrote:
On Nov 4, 2009, at 9:30 AM, Deniz Dogan wrote:
So what's the deal with Clean? Why is it preferable to Haskell? Why
is it not?
(1) S
Well, it depends on which indexU the OP means. The one linked in the docs is
the O(1) UA type class version.
-- Don
gcross:
> Actually, it's not a typo. If you look at the source, what you'll see
> is
>
> indexU arr n = indexS (streamU arr) n
>
> and then tracking down indexS, you'll see
>
>
>
On Nov 4, 2009, at 9:30 AM, Deniz Dogan wrote:
So what's the deal with Clean? Why is it preferable to Haskell? Why
is it not?
(1) Speed.
(2) If you are a Windows developer, the fact that Windows is the primary
platform and others (even Mac OS, which is historically ironic) are
second-
On Thu, Oct 08, 2009 at 11:13:42PM +0200, Peter Verswyvelen wrote:
> I briefly read about Hugs record system Trex, and at first sight this
> was really nice!
>
> I know this question was asked a long time ago already, but are there
> any plans to add this extension to GHC?
>
> What about the othe
On 04/11/2009, at 14:38, Philippos Apolinarius wrote:
And here comes the reason for writing this article. In the previous
version of the Gauss elimination algorithm, I have imported
Data.Array.IO. I also wrote a version of the program that imports
Data.Array.ST. The problem is that I don't
On Nov 3, 2009, at 7:38 PM, Philippos Apolinarius wrote:
Brian wrote:
> Really, arrays in Haskell are the most @#!$! confusing thing in
the world.
Hi, Brian.
I am having a great difficulty with arrays in Haskell. In the
university where I study, functional programming is taught in Clean
On Tue, Oct 27, 2009 at 12:48:32AM -0200, Maurício CA wrote:
> This could be beside castPtr, castCharToCChar etc.
>
>
>
> castAny :: (Storable a, Storable b) => a -> b
> castAny = unsafePerformIO . genericCast
> where
> genericCast :: (Storable a, Storable b) => a -> IO b
> genericC
How do you read in the IOUArray? By parsing a character string
or do you treat the file as binary numbers or ... ?
--
Jason Dusek
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 04/11/2009, at 14:07, Gregory Crosswhite wrote:
Actually, it's not a typo. If you look at the source, what you'll
see is
indexU arr n = indexS (streamU arr) n
I suspect it gets rewritten back to the O(1) version somewhere after
is has had a chance to fuse. If not, then it's a bug. In
On 04/11/2009, at 13:35, wren ng thornton wrote:
Roman Leshchinskiy wrote:
On 04/11/2009, at 13:23, Daniel Peebles wrote:
In the presence of fusion (as is the case in uvector), it's hard to
give meaningful time complexities for operations as they depend on
what operations they are paired with.
I see that section 4.1 of the user guide -
http://feldspar.sourceforge.net/documents/language/FeldsparLanguage.html#htoc23
- includes an example involving autocorrelation.
Does this mean I could use Feldspare to easily build my own Autotune
program? I love T-Pain and Autotune the News!
Warren
On
I'm happy to announce the first release of Feldspar, which is an
embedded domain-specific language with associated code generator mainly
targeting DSP algorithms. The language is developed in cooperation by
Ericsson, Chalmers University and Eötvös Loránd University.
Feldspar stands for *F*unct
Brian wrote:
> Really, arrays in Haskell are the most @#!$! confusing thing in the world.
Hi, Brian.
I am having a great difficulty with arrays in Haskell. In the university where
I study, functional programming is taught in Clean or in Haskell, depending on
the professor who is teaching the s
On Tue, Nov 3, 2009 at 1:37 PM, Andrew Coppin
wrote:
> Deniz Dogan wrote:
>
>> Recently there has been a lot of discussion on this list about the
>> programming language Clean and converting Clean programs to Haskell.
>> Reading the Wikipedia article on the language, I can't really see any
>> majo
David Leimbach wrote:
Disciplined Disciple might be interesting to look at here too, but i'm
not sure I'd deploy anything with DDC just yet :-)
:) Nor would I (and I wrote most of it). I think the approach is right,
but the compiler itself is still in the "research prototype" stage.
Ben.
On Tue, Nov 3, 2009 at 12:02 PM, Philippos Apolinarius
wrote:
> 1 --- The program must be implemented using arrays.
> Update must be done in place, in order to minimize use of the garbage
> collector.
> I have used Data.Array.IO, but I guess that Data.Array.ST is better. Is it
> easy to
> rewr
On Tue, Nov 3, 2009 at 1:42 PM, Martijn van Steenbergen
wrote:
> Dear café,
>
> I am looking for a function that does an N-dimensional diagonal traversal. I
> want the traversal to be fair: the sum of the indices of the produced
> combinations should be non-decreasing. Let me illustrate with an ex
On Tue, 3 Nov 2009 03:15:03 -0800 (PST)
>> "Philippos" == wrote:
Philippos> I tryed it, and noticed that it is very slow, compared both
Philippos> with Emacs, TextPad, and Emerald.
Is it usable (btw, what hardware?) or just slow?
Philippos> I tryed also leksah, but it is always complaini
Recently there has been a lot of discussion on this list about the
programming language Clean and converting Clean programs to Haskell.
Reading the Wikipedia article on the language, I can't really see any
major difference between that and Haskell, except for the monads vs.
uniqueness types.
So wh
G'day all.
Quoting wren ng thornton :
Sometimes in Haskell I've thought about how uniqueness typing would
make something faster, but in general all the plumbing associated with
it in Clean makes me feel like I'm writing systems-level code (i.e. C,
asm) instead of using a high-level language. Th
Actually, it's not a typo. If you look at the source, what you'll see
is
indexU arr n = indexS (streamU arr) n
and then tracking down indexS, you'll see
indexS (Stream next s0 _) n0
| n0 < 0= error "Data.Array.Vector.Stream.indexS: negative
index"
| otherwise = loop_index n0
> I had to implement a ring buffer, and I wanted the code using it to be
> written in Haskell. I ended up implementing the buffer in C, and wrapping
> it in FFI from Haskell because implementing a destructive array in Haskell
> is kind of unwieldy to someone of my experience level. In Clean, it l
On Tue, Nov 3, 2009 at 2:16 PM, Tracy Wadleigh wrote:
>
> I had to implement a ring buffer, and I wanted the code using it to be
>> written in Haskell. I ended up implementing the buffer in C, and wrapping
>> it in FFI from Haskell because implementing a destructive array in Haskell
>> is kind of
Deniz Dogan wrote:
Recently there has been a lot of discussion on this list about the
programming language Clean and converting Clean programs to Haskell.
Reading the Wikipedia article on the language, I can't really see any
major difference between that and Haskell, except for the monads vs.
uni
On Tue, Nov 3, 2009 at 3:14 PM, Ben Lippmeier wrote:
> David Leimbach wrote:
>
>> Disciplined Disciple might be interesting to look at here too, but i'm not
>> sure I'd deploy anything with DDC just yet :-)
>>
> :) Nor would I (and I wrote most of it). I think the approach is right, but
> the comp
> So what's the deal with Clean? Why is it preferable to Haskell? Why is it not?
Purely from glancing through the language reference, two things that
it looks like clean has that I would love to have in haskell are
better records and better arrays. The records don't implement any of
the fancy sub
David Leimbach wrote:
> Disciplined Disciple might be interesting to look at here too, but i'm not
> sure I'd deploy anything with DDC just yet :-)
Indeed. What DDC needs most at the moment is more people working
on it.
I've fixed a couple of bugs and I'm working on some others, but
there are a
phi500ac:
> import Control.Monad
> import Data.Array.IO
You're using boxed arrays here -- try Data.Array.Unboxed and IOUArray's
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
+1 on Control.Monad.Omega. In point of fact, your diagN function is simply
diagN = runOmega . mapM Omega
You'll find it an interesting exercise to grok the source of
Control.Monad.Omega, obviously, but essentially, you're replacing concatMap
with a fair (diagonal) traversal order version.
Louis
briand:
> Really, arrays in Haskell are the most @#!$! confusing thing in the
> world.
>
> There's a bunch of different array structures.
>
> I can't tell which one works best, and all I want to do is x[i] = value.
>
> I thought uvector was the answer, you know, fast unboxed ARRAYs.
> Imagine
Roman Leshchinskiy wrote:
On 04/11/2009, at 13:23, Daniel Peebles wrote:
In the presence of fusion (as is the case in uvector), it's hard to
give meaningful time complexities for operations as they depend on
what operations they are paired with. We need to think of a better way
to express this
The purpose behind the weird signature there is so that the
computations in DBus.Bus can be passed directly to mkClient. Because
of the design of dbus-client, you probably don't want to keep the
connection around separately.
-
client <- mkClient getSessionBus
-
Here's a quick-and-dir
See also the paper "Idioms are oblivious, arrows are meticulous,
monads are promiscuous" [1]. Functors can be extended to give
applicative functors (idioms) which can then be extended to arrows,
and then monads. So all arrows are also (applicative) functors.
[1]:
http://homepages.inf.ed.ac.uk/wa
On 04/11/2009, at 13:23, Daniel Peebles wrote:
In the presence of fusion (as is the case in uvector), it's hard to
give meaningful time complexities for operations as they depend on
what operations they are paired with. We need to think of a better way
to express this behavior in the documentati
Stephen Tetley wrote:
2009/11/3 Andrew Coppin :
As far as I can tell, Clean is to Haskell as C is to Pascal. I.e., Clean is
notionally very similar to Haskell, but with lots of added clutter,
complexity and general ugliness - but it's probably somehow more
machine-efficient as a result.
(All o
On 04/11/2009, at 13:12, brian wrote:
indexU :: UA e => UArr e -> Int -> e
O(n). indexU extracts an element out of an immutable unboxed array.
This is a typo (unless Don inserted a nop loop into the original DPH
code).
Roman
___
Haskell-Cafe
In the presence of fusion (as is the case in uvector), it's hard to
give meaningful time complexities for operations as they depend on
what operations they are paired with. We need to think of a better way
to express this behavior in the documentation though.
On Tue, Nov 3, 2009 at 9:12 PM, brian
2009/11/3 Andrew Coppin :
>
> As far as I can tell, Clean is to Haskell as C is to Pascal. I.e., Clean is
> notionally very similar to Haskell, but with lots of added clutter,
> complexity and general ugliness - but it's probably somehow more
> machine-efficient as a result.
>
> (All of which make
Dear café,
I am looking for a function that does an N-dimensional diagonal
traversal. I want the traversal to be fair: the sum of the indices of
the produced combinations should be non-decreasing. Let me illustrate
with an example.
The type of a 2-dimensional traversal would look like this:
stephen.tetley:
> 2009/11/3 Andrew Coppin :
>
> >
> > As far as I can tell, Clean is to Haskell as C is to Pascal. I.e., Clean is
> > notionally very similar to Haskell, but with lots of added clutter,
> > complexity and general ugliness - but it's probably somehow more
> > machine-efficient as a
Really, arrays in Haskell are the most @#!$! confusing thing in the
world.
There's a bunch of different array structures.
I can't tell which one works best, and all I want to do is x[i] = value.
I thought uvector was the answer, you know, fast unboxed ARRAYs.
Imagine my surprise when I saw
The problem with Leo is that although there are rarely performance
problems when navigating and editing the outline, the text pane can be
very slow at times when using the Tk-based GUI --- even on modern
hardware --- because the syntax highlighter is written in Python.
(Incidentally, as mu
I am keeping with my project of translating programs from Clean to Haskell. As
far as arrays go, I don't understand well how to use them in Haskell.
Therefore, I will appreciate if somebody can find time to check the program
below, and make suggestions to improve it. My Haskell program is about
I´m running windows, ghc 6.10.3 and 6.10.4 in two different machines.
2009/11/3 Alberto G. Corona
> : hPutBuf: illegal operation (handle is finalized)
>
> I´m a bit lost trying to find the source of this error.
> I´m running an hack application (package hack). Basically it is a handler
> of we
: hPutBuf: illegal operation (handle is finalized)
I´m a bit lost trying to find the source of this error.
I´m running an hack application (package hack). Basically it is a handler
of web requests.
hack can be used with different web servers: Hyena, simpleserver,
HappStack
all of them produce
On Sun, Nov 1, 2009 at 8:20 PM, Svein Ove Aas wrote:
> Fellow haskellers:
>
> Haskell-mode 2.6 has been released.
>
2.6.2 is now out.
This is a pure bugfix release; it fixes some parse issues in
haskell-decl-scan and haskell-indentation.
--
Svein Ove Aas
___
Hi Steve,
Steve yahoo.com.au> writes:
>
> Hi Will,
>
> I had previously tested the Melissa O'Neil prime function (using the
> primes 0.1.1 package) and found it to be fast (for a functional
> approach), but with high memory use.
>
> To fully test a prime function, I think you should:
> 1. Te
On 03/11/2009, at 14:24, Henning Thielemann wrote:
Jose Iborra schrieb:
Folks,
I'm happy to announce a new release of control-monad-exception with
monadic call traces,
available in Hackage. Grab it now while it is still online!
Monadic stack traces are described in detail in a blog post [1].
When using happstack, I find it really annoying to get a Prelude.head:
null list error (or similar) in my web browser window because
somewhere, some library used something unsafe -- and of course, since
this is haskell, no stack trace.
if c-m-e can offer benefits around this, I would be very inter
Excerpts from Neil Brown's message of Tue Nov 03 13:45:42 +0100 2009:
> Hi,
>
> I was thinking about some of my code today, and I realised that where I
> have an arrow in my code, A b c, the type (A b) is also a functor. The
> definition is (see
> http://www.haskell.org/ghc/docs/latest/html/li
Jose Iborra schrieb:
> Folks,
>
> I'm happy to announce a new release of control-monad-exception with
> monadic call traces,
> available in Hackage. Grab it now while it is still online!
>
> Monadic stack traces are described in detail in a blog post [1].
>
> In short, what this means for your c
2009/11/3 Neil Brown :
> Hi,
>
> I was thinking about some of my code today, and I realised that where I have
> an arrow in my code, A b c, the type (A b) is also a functor. The
> definition is (see
> http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Arrow.html):
>
> fmap = (^<<)
Hi,
I was thinking about some of my code today, and I realised that where I
have an arrow in my code, A b c, the type (A b) is also a functor. The
definition is (see
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Arrow.html):
fmap = (^<<)
-- Or, in long form:
fmap f x =
Hi.
I've released timeplot on hackage: http://hackage.haskell.org/package/timeplot
Timeplot is a program for visualizing time series from log files.
The typical usage scenario:
- Take a big log file of your program (100k-1m lines is OK)
- Preprocess it with an awk one-liner to obtain a trace f
Jason Dagit codersbase.com> writes:
> By the way, do you understand where the speedup with Int is coming from? As I
understand it, there are two main places. One is that the type class dictionary
passing can be removed (GHC might figure this out already, I'd need to check the
core to be sure).
I tryed it, and noticed that it is very slow, compared both with Emacs,
TextPad, and Emerald. I tryed also leksah, but it is always complaining about
something missing in Pango, although it works fine. Here is the error message
(leksah.exe:1588): Pango-WARNING **: error opening config file '"C:\
Warren Henning wrote:
> $83 and "3-4 weeks" for a 300 page book? Oy vey.
Yeah, I'm not going to buy it. :(
Regards,
apfelmus
--
http://apfelmus.nfshost.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
Hi Will,
I had previously tested the Melissa O'Neil prime function (using the
primes 0.1.1 package) and found it to be fast (for a functional
approach), but with high memory use.
To fully test a prime function, I think you should:
1. Test for more than the first 10^6 primes.
Generating all primes
Gour,
Yes, I use Leo for Haskell development. You will need to use the
development trunk, though, since it contains a necessary patch I
submitted to make Leo work correctly with Haskell sources. You can
download this from Launchpad:
https://launchpad.net/leo-editor
It is possi
On Fri, 16 Oct 2009 10:41:05 -0700
>> "Gregory" == >> wrote:
Hi Greg,
Gregory> While Emacs has some outline capabilities, they are not at
Gregory> this time remotely as nice or as powerful as Leo, which among
Gregory> other things:
Do you use Leo for Haskell development?
I've asked on
73 matches
Mail list logo