Pete Kazmier wrote:
Jules Bean [EMAIL PROTECTED] writes:
E,F. Progressive GET
pSynGET :: URL - ((Bool,ByteString) - IO ()) - IO ()
pAsynGET :: URL - ((Bool,ByteString) - IO ()) - IO (MVar ())
Incidentally there are more complex options than (Bool,Bytestring)
- IO (). A
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
Hi,
I installed the Network.CGI package and tried to compile the Hello World
example on my Ubuntu machine.
ghc cgi.hs -o cgi
gives me
cgi.o: In function `r1hk_info':
(.text+0x56): undefined reference to
aneumann:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
Hi,
I installed the Network.CGI package and tried to compile the Hello World
example on my Ubuntu machine.
ghc cgi.hs -o cgi
Missing --make to link against the cgi and network and mtl packages.
Also, -O or -O2, you may as
At Fri, 25 May 2007 12:23:24 -0500, Doug Kirk [EMAIL PROTECTED] wrote:
I realise that everyone wants to eat their own dog food, but really,
if you want the code samples to be available to the masses, you'll use
Subversion instead of darcs.
No offense to the darcs creators, but
1) Only
Steffen Mazanek wrote:
apfelmus wrote
The key point of the dynamic programming algorithm is indeed to memoize
the results gs i j for all pairs of i and j. In other words, the insight
that yields a fast algorithm is that for solving the subproblems gs i j
(of which there are n^2), solution to
Since the online lambdabot still doesn't seem to want to talk to me,
I've been thinking about how I might rectify the situation...
Apparently GHC has a flag that makes it execute a Haskell expression
directly. For example,
C:\ ghc -e map (2*) [1,2,3]
[2,4,6]
Now, if I could just figure out
andrewcoppin:
Since the online lambdabot still doesn't seem to want to talk to me,
I've been thinking about how I might rectify the situation...
Apparently GHC has a flag that makes it execute a Haskell expression
directly. For example,
C:\ ghc -e map (2*) [1,2,3]
[2,4,6]
Now, if I
On 26/05/07, Matthew Sackman [EMAIL PROTECTED] wrote:
(On the other hand, I don't know of anyone outside immediate
haskellers using Darcs.)
A lot of people in the Emacs subcommunity use darcs; many of them may
have heard of Haskell but certainly wouldn't describe themselves as
Haskellers. See
On 26/05/07, Matthew Sackman [EMAIL PROTECTED] wrote:
(On the other hand, I don't know of anyone outside immediate
haskellers using Darcs.)
Good idea to get some data on this, instead of speculating. Let's do that.
A quick google reveals the Haskell crew is far from alone as users.
On 26/05/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote:
darcs.pugscode.org/_darcs/
www.n-heptane.com/nhlab/repos/cabalDebianTemplate/_darcs/
www.khjk.org/~sm/code/advopost/_darcs/
These are also Haskell repos that you missed, bringing the figure up
to 8. Still, I wouldn't
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Judah Jacobson wrote:
Hi all,
Given the recent discussion about adding top-level mutable state to
Haskell, I thought it might be a good time to throw my own proposal
into the ring. If enough people think it's worth considering, I can
add it to
On Fri, May 25, 2007 at 07:57:45PM +0200, Joachim Breitner wrote:
I???m writing a TCP server app ATM. It has one thread per client. Some of
the clients want to be notified if the internal state changes, while
others are happily chatting with the server, possible modifying the
internal state.
On 5/26/07, Isaac Dupree [EMAIL PROTECTED] wrote:
(P.S. having read the Top_level_mutable_state page now, it is definitely
worth reading)
I'm a newbie in Haskell, but for me this seems to be the better
proposal until now. It's definitely worth adding to the wiki, at
least.
--
Felipe.
claus.reinke:
Oh, but there is the *minor* detail that I am literally allowing
unauthenticated users to perform arbitrary code execution. For example,
..
AFAIK, Lambdabot dissalows any expression that performs IO. In Haskell,
this is beautifully easy: reject any expression having an IO type.
Don't use parsing for security, use the type checker. By using 'show',
you can write an instance for IO a that renders all IO harmless. Then
just wrap your user's arbitrary expression in 'show.
OK, what... the... hell...?
I just looked on the list archive, and sure enough that's a quote from
i thought the discussion had actually progressed a little further than
might be obvious from
http://www.haskell.org/haskellwiki/Top_level_mutable_state
here is my summary of what i thought was the state of the discussion,
followed by a hopefully simpler proposal.
first, i'd like to
it would really be nice if someone would sit down and sort this all out
in detail. there'd still be no guarantee that such a Haskell sandbox was
totally safe, but at least all issues and solutions could be shared, making
it as safe as the community knows how.
The #haskell people have been
Hello,
It's nice to see someone else is seriously thinking about this and
I can't see anything obviously wrong with this on first inspection so
by all means add it to the wiki. I have a few issues with it on
aesthetic grounds though. There also seems to be a bit of problem with
using this
Oh, but there is the *minor* detail that I am literally allowing
unauthenticated users to perform arbitrary code execution. For example,
..
AFAIK, Lambdabot dissalows any expression that performs IO. In Haskell,
this is beautifully easy: reject any expression having an IO type.
..
Don't use
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Donald Bruce Stewart wrote:
Lambdabot uses 1) type guarantee of no-IO at the top level, along with
2) a trusted module base (pure module only, that are trusted to not
export evil things), as well as 3) restricting only to H98-language only
(things
isaacdupree:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Donald Bruce Stewart wrote:
Lambdabot uses 1) type guarantee of no-IO at the top level, along with
2) a trusted module base (pure module only, that are trusted to not
export evil things), as well as 3) restricting only to
The #haskell people have been working on this for about 3 years now.
The result is the 'runplugs' program, which I've talked about in
previous mails.
http://www.cse.unsw.edu.au/~dons/code/lambdabot/scripts/RunPlugs.hs
It uses hs-plugins for the evaluation, along with the points about IO
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Donald Bruce Stewart wrote:
isaacdupree:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Donald Bruce Stewart wrote:
Lambdabot uses 1) type guarantee of no-IO at the top level, along with
2) a trusted module base (pure module only, that are
I would expect
foo r@(Range BITSTRING _ _) x = []
to give an error but it doesn't. Writing
t = Range BITSTRING
gives one so why not the pattern match?
Dom.
data BitString = BitString [Bool]
deriving Show
data ConstrainedType :: * - * where
INTEGER :: ConstrainedType Int
Hi
I'm having some problems using ByteString.Char8.readFile to read
/proc/interrupts. I reads nothing. I guess maybe that's because the
file is sort of special, but I could read it by opening and using
ByteString.Char8.hGetContents.
The part of interest is:
findInterrupts :: B.ByteString
Donald Bruce Stewart wrote:
The #haskell people have been working on this for about 3 years now.
The result is the 'runplugs' program, which I've talked about in
previous mails.
http://www.cse.unsw.edu.au/~dons/code/lambdabot/scripts/RunPlugs.hs
It uses hs-plugins for the evaluation, along
HI
For me, the unfortunate thing is that there seems to be no interpreter
for Haskell written in Haskell. (Except for GHC, which is *huge*.)
What do you mean by *huge*? Takes up to much memory at runtime?
Requires too long to compile? Has had too many experts spending lots
of time writing it?
Neil Mitchell wrote:
HI
For me, the unfortunate thing is that there seems to be no interpreter
for Haskell written in Haskell. (Except for GHC, which is *huge*.)
What do you mean by *huge*? Takes up to much memory at runtime?
Requires too long to compile? Has had too many experts spending
As far as I know, hs-plugins works by taking an expression, writing it
to a file, calling GHC to parse it, transform it to Core, optimise it,
transform it to STG, optimise it, transform it to C--, optimise it,
transform it to ANSI C, optimise it, pass it to GCC, compile it, link
it, and *then*
Rodrigo Queiro wrote:
As far as I know, hs-plugins works by taking an expression, writing it
to a file, calling GHC to parse it, transform it to Core, optimise
it,
transform it to STG, optimise it, transform it to C--, optimise it,
transform it to ANSI C, optimise it, pass
Just wondering if anyone else who frequents this list is planning on
going to Wolverhampton for LRL in July?
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
[EMAIL PROTECTED] Jabber: [EMAIL PROTECTED]
http://therning.org/magnus
Software is not manufactured,
On Sat, May 26, 2007 at 07:41:19PM +0100, Andrew Coppin wrote:
Donald Bruce Stewart wrote:
The #haskell people have been working on this for about 3 years now.
The result is the 'runplugs' program, which I've talked about in
previous mails.
Border conditions in the Haskell Library
have finally made the mainstream media:
http://www.cnn.com/2007/US/05/26/border.quirk.ap/index.html
-Yitz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Dominic Steinitz wrote:
I would expect
foo r@(Range BITSTRING _ _) x = []
to give an error but it doesn't. Writing
t = Range BITSTRING
gives one so why not the pattern match?
AFAICS, this is because when you construct a value, as in t, you have to
provide the required context (Ord in
Do you guys know of a good example of Haskell
calling functions to a thread-safe library
(like an existing interface to a real
library)? I have a function to which I need
to alocate memory for each thread calling it,
but I don't know how to do that.
Thanks,
Maurício
Stefan O'Rear wrote:
Actually, there exists no interpreter for Haskell. Period.
Haskell has never been implemented. Every implementation has a large
collection of corner cases that aren't correctly parsed; these can be
recognized as the wontfix bugs.
Erm... I'm having a there is no
Roberto Zunino wrote:
Dominic Steinitz wrote:
I would expect
foo r@(Range BITSTRING _ _) x = []
to give an error but it doesn't. Writing
t = Range BITSTRING
gives one so why not the pattern match?
AFAICS, this is because when you construct a value, as in t, you have to
provide the
On Sat, May 26, 2007 at 08:12:13PM +0100, Andrew Coppin wrote:
It's too large and complicated to use for small things. E.g., if you
want to just dash off a little something that needs to evaluate an
expression... Well, you can use the GHC API. But this is highly
nontrivial. You get the
On 26/05/07, Dominic Steinitz [EMAIL PROTECTED] wrote:
This seems even worse to me. A is not inhabited so how can 42 be of type A?
I think it should work. The context on the F constructor says that A
is an instance of Num, so you could only have an F value if you could
prove that A was an
Hello,
We recently had a challenge as follows:
Given a word, find all the words in the dictionary which can be made
from the letters of that word. A letter can be used at most as many
times as it appears in the input word. So, letter can only match
words with 0, 1, or 2 t's in them.
I opted
On Sat, 26 May 2007, Andrew Coppin wrote:
This leaves only the problem of how to make a web server call GHC. I can
think of a number of possibilities.
- Write my own HTTP server from scratch. (Not keen...)
Hacking existing ones is easier:
On Fri, 25 May 2007, Doug Kirk wrote:
What about a public darcs repository where people can constantly download
and review modifications? People could even send patches to the authors
(editors?).
I realise that everyone wants to eat their own dog food, but really,
if you want the code
On Fri, 25 May 2007, Neil Mitchell wrote:
http://darcs.haskell.org/darcsweb/darcsweb.cgi?r=yhc;a=summary - most
things on haskell.org have a darcsweb, thats the one for Yhc.
Nice, I have not seen this before. Not all of my packages at
darcs.haskell.org are listed. How can I add more of them?
Note that there are very systematic and natural ways to derive dynamic
programming algorithms in functional languages. In a sense, much of the
work of R. Bird centers this topic. The book Algebra of Programming
http://web.comlab.ox.ac.uk/oucl/research/pdt/ap/pubs.html#Bird-deMoor96:Algebra
Hi
I don't know about Linux, but Hugs is currently hopelessly unstable on
Windoze.
Have you filed bugs in the hugs bug tracker?
No bugs have been filed from this. In general Windows and Hugs is rock
solid, I use it every single day without issue - including to develop
Yhc (an compiler). If
Jason Dagit wrote:
Given a word, find all the words in the dictionary which can be made
from the letters of that word. A letter can be used at most as many
times as it appears in the input word. So, letter can only match
words with 0, 1, or 2 t's in them.
I don't know about the ByteString
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David House wrote:
On 26/05/07, Dominic Steinitz [EMAIL PROTECTED] wrote:
This seems even worse to me. A is not inhabited so how can 42 be of
type A?
I think it should work. The context on the F constructor says that A
is an instance of Num, so
Dominic Steinitz wrote:
I suppose I could read my example as if there is anything that matches
Range BITSTRING _ _ then do the following and since nothing can ever
match it then it's a redundant case. But I would expect the compiler to
at least warn me that nothing can ever match this.
Why
Jason Dagit wrote:
I think, given my simple algorithm that means that (==) for
ByteStrings is slower than (==) for String. Is this possible?
Yes indeed. Over ByteStrings, (==) is implemented as a call to memcmp.
For small strings, this loses by a large margin because it has to go
through
overdrigzed:
As far as I know, hs-plugins works by taking an
expression, writing it
to a file, calling GHC to parse it, transform it to Core,
optimise it,
transform it to STG, optimise it, transform it to C--,
optimise it,
transform it to ANSI C,
Hi
I'm using the System.Timeout module from base, copied into my local
repo, so that I can work with GHC 6.6.1. My copy is at:
http://www.cs.york.ac.uk/fp/darcs/catch/catch_1/System/TimeoutGHC.hs
(but it is identical to the one in base)
Sadly, it doesn't seem to work for me. Here are the tests
Leandro Lisboa Penz:
I'm having some problems using ByteString.Char8.readFile to read
/proc/interrupts. I reads nothing. I guess maybe that's because the
file is sort of special, but I could read it by opening and using
ByteString.Char8.hGetContents.
ByteString.Char8.readFile uses
I'd like to write a memoization utility. Ideally, it would look
something like this:
memoize :: (a-b) - (a-b)
memoize f gives you back a function that maintains a cache of
previously computed values, so that subsequent calls with the same
input will be faster.
I've searched the web for
On 5/26/07, Mark Engelberg [EMAIL PROTECTED] wrote:
I don't see any elegant way to do this in Haskell, and I'm doubting
its possible. Can someone prove me wrong?
Provided some sort of memoize :: (a-b) - (a-b), I'd do something like
f = memoize g where
g = recursive call to f, not g ...
On Sat, May 26, 2007 at 11:41:28PM -0300, Felipe Almeida Lessa wrote:
On 5/26/07, Mark Engelberg [EMAIL PROTECTED] wrote:
I don't see any elegant way to do this in Haskell, and I'm doubting
its possible. Can someone prove me wrong?
Provided some sort of memoize :: (a-b) - (a-b), I'd do
Stefan O'Rear wrote:
memofix :: ((a - b) - (a - b)) - a - b
memofix ff = let g = memoize (ff g) in g
fib = memofix $ \fib k - case k of
0 - 0
1 - 1
n - fib (n-1) + fib (n-2)
Stefan, these is something missing here. Where is memoize
defined?
Erik
--
On 5/27/07, Stefan O'Rear [EMAIL PROTECTED] wrote:
memofix :: ((a - b) - (a - b)) - a - b
memofix ff = let g = memoize (ff g) in g
fib = memofix $ \fib k - case k of
0 - 0
1 - 1
n - fib (n-1) + fib (n-2)
But this way you miss pattern matching and guards? How would you
claus.reinke:
The #haskell people have been working on this for about 3 years now.
The result is the 'runplugs' program, which I've talked about in
previous mails.
http://www.cse.unsw.edu.au/~dons/code/lambdabot/scripts/RunPlugs.hs
It uses hs-plugins for the evaluation, along with the
bos:
Jason Dagit wrote:
I think, given my simple algorithm that means that (==) for
ByteStrings is slower than (==) for String. Is this possible?
Yes indeed. Over ByteStrings, (==) is implemented as a call to memcmp.
For small strings, this loses by a large margin because it has to go
59 matches
Mail list logo