On Sun, Dec 11, 2005 at 01:21:50AM +0100, Marc A. Ziegert wrote:
> - clisp or scheme
> forget those lisp languages. boooring. brackets everywhere. lisp was
> one of the first (was the first?) functional languages.
What does clisp mean here? A Common Lisp implementation
(http://clisp.cons.org/) or
On Sun, Dec 11, 2005 at 02:25:55AM +0300, Bulat Ziganshin wrote:
> don't forget that real program will make a lot of I/O and use C
> libraries, so difference will be less and can be even close to 0.
I disagree that every real Haskell program has to do a lot of I/O and
has to use FFI. Most of the t
From: "Branimir Maksimovic" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
CC: Haskell-Cafe@haskell.org
Subject: RE: [Haskell-cafe] RE: Substring replacements (was: Differences
inoptimisiation Date: Sun, 11 Dec 2005 07:29:46 +
I've found one remaining bug, and this is cor
Am Sonntag, 11. Dezember 2005 09:58 schrieb Tomasz Zielonka:
> [...] I would like to see some support in tools for enforcing such a coding
> policy. It could look like this - a function written using only safe
> components would be marked as safe. Every unsafe feature like FFI,
> unsafePerformIO, e
Hello Joel,
but anyway Erlang is dynamic alnguage, and this make things go slower.
on the other side, it is strict
Sunday, December 11, 2005, 7:02:57 AM, you wrote:
JR> Erlang can be compiled to machine code with the built-in HiPE compiler.
JR> You just have to explicitly make use of this facili
Hello Branimir,
Sunday, December 11, 2005, 4:09:00 AM, you wrote:
BM> replace1 is Bulat's newest algorithm. It is really incredibly fastest with
BM> this setup.
to be honest, it is combination of 4 lines from Tomasz's algorithm and
3 lines of mine :)
--
Best regards,
Bulat
Hello Branimir,
Sunday, December 11, 2005, 5:19:22 AM, you wrote:
BM> After seeing your test, I've implemented full KMP algorithm, which
BM> is blazingly fast with your test. It is slower in mine test due excessive
are you seen http://haskell.org/hawiki/RunTimeCompilation ?
can you formulate c
I would surmise that speed is not always the point. This is what's
usually used to defend the laziness of Haskell :-).
Erlang is _the_ language for network programming, trust me on this
one. My dreamhost site seems to be down at the moment but you can
poke around the Erlang category at http
Am Samstag, 10. Dezember 2005 23:22 schrieben Sie:
> On 10/12/05, Daniel Fischer <[EMAIL PROTECTED]> wrote:
> > Am Samstag, 10. Dezember 2005 15:34 schrieben Sie:
> > > On 12/10/05, Daniel Fischer <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > > That's probably because Lemmih's is polymorphic.
> > >
Am Samstag, 10. Dezember 2005 22:42 schrieb Bulat Ziganshin:
> Hello Branimir,
>
> Saturday, December 10, 2005, 8:29:09 PM, you wrote:
> >>Can you check this version?
>
> and this:
>
> replace from to = repl
> where repl s | Just remainder <- start_from from s = to ++ repl
> remainder repl (c:c
Cale Gibbard:
> Hello, I've just started writing bindings to the Enlightenment
> Foundation Libraries, using c2hs. I've run into the following problem
> with the types in the foreign import declarations generated.
>
> In Imlib2.h, there is a function prototype:
> int imlib_get_visual_depth(Display
Another belated reply to an old thread...
Andrew Pimlott wrote:
> On Fri, Nov 18, 2005, Paul Hudak wrote:
> > unwind :: Expr -> Expr
> > unwind (Add e1 e2) = Add (unwind e1) (unwind e2)
> > unwind (Rec fe)= x where x = unwind (fe x)
> > unwind e = e
>
> Since this discussion started
From: Daniel Fischer <[EMAIL PROTECTED]>
To: Bulat Ziganshin <[EMAIL PROTECTED]>
CC: Haskell-Cafe@haskell.org
Subject: Re: [Haskell-cafe] Differences in optimisiation with interactive
andcompiled mo
Date: Sun, 11 Dec 2005 14:59:55 +0100
Am Samstag, 10. Dezember 2005 22:42 schrieb Bulat Ziga
On 11/12/05, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote:
> Cale Gibbard:
> > Hello, I've just started writing bindings to the Enlightenment
> > Foundation Libraries, using c2hs. I've run into the following problem
> > with the types in the foreign import declarations generated.
> >
> > In Iml
From: Bulat Ziganshin <[EMAIL PROTECTED]>
Reply-To: Bulat Ziganshin <[EMAIL PROTECTED]>
To: "Branimir Maksimovic" <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], Haskell-Cafe@haskell.org
Subject: Re: [Haskell-cafe] RE: Substring replacements (was: Differences in
optimisiation ...)
Date: Sun, 11 D
Folks,
I'm kind of stuck on this and can't figure it out...
Take a look at the trace below, this is Mac OSX Tiger.
(gdb) where
#0 0x90006068 in syscall ()
#1 0x9004420c in sigpause ()
#2 0x001791b8 in awaitUserSignals () at Signals.c:256
#3 0x0012e1a8 in schedule (mainThread=0x1300360,
in
I looked at the scheduler source code and it appears that GHC goes to
wait for signals when a deadlock is detected and there's nothing else
to do.
It still does not explain where the signal comes from when I'm away
from the keyboard.
On Dec 11, 2005, at 4:10 PM, Joel Reymont wrote:
(gdb
From: Joel Reymont <[EMAIL PROTECTED]>
To: Haskell Cafe
Subject: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
Date: Sun, 11 Dec 2005 16:33:36 +
I looked at the scheduler source code and it appears that GHC goes to wait
for signals when a deadlock is detected and there's no
On Dec 11, 2005, at 4:50 PM, Branimir Maksimovic wrote:
This is not signal, it is result from call to pause() .
[...]
you have to look elsewhere as this is normal behavior.
You are saying that triggering my ^C handler randomly is normal
behavior? I understand why it goes to wait for signals
Linking ...
/usr/bin/ld: can't locate file for: -lHSrts_thr_debug
collect2: ld returned 1 exit status
How do I get a threaded+debug runtime?
On Dec 11, 2005, at 4:50 PM, Branimir Maksimovic wrote:
Strange is that you are using threaded
run time (I guess ) but this function is defined only for
On Sun, Dec 11, 2005 at 01:07:47PM +0100, Sven Panne wrote:
> Am Sonntag, 11. Dezember 2005 09:58 schrieb Tomasz Zielonka:
> > [...] I would like to see some support in tools for enforcing such a coding
> > policy. It could look like this - a function written using only safe
> > components would be
Unfortunately:
Prelude SearchRep> searchReplace "aabaabba" "iii" "aabaabaabbaa"
"aabaabaabb"
Prelude SearchRep> searchReplace "abaaba" "-" "abaaabaaba"
"abaaabaab"
Seemingly, your algorithm assumes that the last component of the
result of search'' is the beginning of the searched for pattern reve
I've got two versions:
HSrts_thr and HSrts_thr_p
I don't know what's second for? but there is only one with
debug in it's name. So I'm not much of a help here.
Greetings, Bane.
From: Joel Reymont <[EMAIL PROTECTED]>
To: Branimir Maksimovic <[EMAIL PROTECTED]>
CC: haskell-cafe@haskell.org
Subj
Joel Reymont writes:
> How do I get a threaded+debug runtime?
You have to build GHC from source code for that. When you
do, make sure your ${srcdir}/ghc/mk/build.mk file contains:
GhcRTSWays += thr_debug
Peter
___
Haskell-Cafe mailing list
Haskell
Nothing like answering your own questions...
There's no deadlock information for the threaded version of the
runtime so I would not have deadlock information if I were to compile
with -threaded.
On Dec 11, 2005, at 5:00 PM, Joel Reymont wrote:
Linking ...
/usr/bin/ld: can't locate file fo
The second one is the threaded and profiled runtime.
On Dec 11, 2005, at 5:14 PM, Branimir Maksimovic wrote:
I've got two versions:
HSrts_thr and HSrts_thr_p
I don't know what's second for? but there is only one with
debug in it's name. So I'm not much of a help here.
--
http://wagerlabs.com/
Would there be any advantage in doing this? There's no deadlock info
produced for a debug threaded runtime, for example. Not according to
ghc/rts/Schedule.c.
Of course I could print the capabilities of the main thread (TSO
structure) and see what it's blocked on, etc. but I could do that
From: Joel Reymont <[EMAIL PROTECTED]>
To: Branimir Maksimovic <[EMAIL PROTECTED]>
CC: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
Date: Sun, 11 Dec 2005 16:56:23 +
On Dec 11, 2005, at 4:50 PM, Branimir Maksimovic wrote:
This is not si
Though I frorgot to add that deadlock can be caused by signal somewhere else
(eg other thread) if signal handler eg locks mutex internally or calls some
other non asynchronous safe functions like locking functions.
This is likely scenario, if you doubt at signal handlers but I don;t know
the det
Understood. But I'm printing things in the signal handler to show
that it was triggered. And I trigger it when ^C is pressed (well, one
more signal):
initSnippets :: IO ()
initSnippets =
do initSSL
installHandler sigPIPE Ignore Nothing
flip mapM_ [sigTERM, sigINT] $ \sig ->
From: Joel Reymont <[EMAIL PROTECTED]>
To: "Branimir Maksimovic" <[EMAIL PROTECTED]>
CC: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
Date: Sun, 11 Dec 2005 18:25:47 +
Understood. But I'm printing things in the signal handler to show tha
What I do works so I don't see any reason to do it otherwise.
Now, it might work by luck and chance, by some ghc magic or otherwise,
but it does work and causes me no problems. Not when I press ^C
and everything shuts down cleanly.
My issues are
1) A phantom sigINT that gets sent to me out of no
John Meacham wrote:
PS. many, including me, feel 'forall' is a misnomer there and should be
the keyword 'exists' instead. so just read 'foralls' that come _before_
the type name as 'exists' in your head and it will make more sense.
I disagree. When you write
forall a. D (P a) (Q a)
it mea
On Sun, Dec 11, 2005 at 07:09:20PM +, Joel Reymont wrote:
> {-# NOINLINE children #-}
> children :: MVar [Child a]
> children = unsafePerformIO $ newMVar []
This is asking for disaster. children shouldn't have a polymorphic type!
Best regards
Tomasz
--
I am searching for a programmer who is
Quoth Joel Reymont <[EMAIL PROTECTED]>:
...
| My program is currently stuck here. The man pages say that sigpause
| will only terminate by being interrupted and EINTR will be the errno.
| EINTR is signal 2, the same one that I'm trapping and the one sent
| when ^C is pressed.
I sure haven't
Would you care to elaborate? This has not caused any problems for me
so far but this is probably due to my usage.
On Dec 11, 2005, at 8:09 PM, Tomasz Zielonka wrote:
On Sun, Dec 11, 2005 at 07:09:20PM +, Joel Reymont wrote:
{-# NOINLINE children #-}
children :: MVar [Child a]
children =
On Dec 11, 2005, at 8:35 PM, Donn Cave wrote:
Now if you actually have observed that your SIGINT handler was entered
at this point, then please ignore me.
Yes, I have observed my SIGINT handler being triggered out of nowhere.
Since I'm printing the signal# in the handler I actually know that
Quoth Tomasz Zielonka <[EMAIL PROTECTED]>:
...
| What I fear about the future of Haskell, is that we will have so many
| libraries FFIying to C, that our programs will crash as often as
| programs written in C.
|
| FFI is necessary, but IMO it shouldn't be used when it doesn't have
| to be.
I spen
On Sun, Dec 11, 2005 at 08:37:06PM +, Joel Reymont wrote:
> Would you care to elaborate? This has not caused any problems for me
> so far but this is probably due to my usage.
This is a know danger of using unsafePerformIO and one reason for
"unsafe" in its name.
>From http://www.cse.unsw.e
Hi everybody,
First I'd like to thank all of you for the answers and the discussion.
On Sun, Dec 11, 2005 at 02:25:55AM +0300, Bulat Ziganshin wrote:
> Hello Christophe,
>
> Saturday, December 10, 2005, 7:03:57 PM, you wrote:
>
> CP> - ada;
> CP> - erlang;
> CP> - clisp or scheme;
> CP> and of
From: Joel Reymont <[EMAIL PROTECTED]>
To: "Branimir Maksimovic" <[EMAIL PROTECTED]>
CC: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
Date: Sun, 11 Dec 2005 19:09:20 +
What I do works so I don't see any reason to do it otherwise.
Oh, I
From: Daniel Fischer <[EMAIL PROTECTED]>
To: "Branimir Maksimovic" <[EMAIL PROTECTED]>
CC: Haskell-Cafe@haskell.org
Subject: Re: Substring replacements (was: Differences inoptimisiation
Date: Sun, 11 Dec 2005 18:12:12 +0100
Unfortunately:
Prelude SearchRep> searchReplace "aabaabba" "iii" "aab
Oh, right. It does not apply in my case, though, so I thought it was
safe.
I'm not sure what the proper Haskell wording is to explain but it
seems like the type system catches if a user of the library tries to
use two different a's (Child a) and complains. Exactly what I need as
access to
Howdy, y'all!
I've written a small program that takes a (Haskell) type
and gives you back a function of that type if one exists.
It's kind of fun, so I thought I'd share it.
It's probably best explained with a sample session.
calvin% djinn
Welcome to Djinn version 2005-12-11.
Type :h to g
Allright, I _am_ convinced. How do I ready ^C from the keyboard???
On Dec 11, 2005, at 10:02 PM, Branimir Maksimovic wrote:
This should be enough reason to scan for keyboard events instead.
There is no guarantee that SIGINT would be sent only by keyboard.
--
http://wagerlabs.com/
__
^C seems to be '\ETX' so ignoring SIGINT and using getChar should
probably do it.
On Dec 11, 2005, at 11:31 PM, Joel Reymont wrote:
Allright, I _am_ convinced. How do I ready ^C from the keyboard???
On Dec 11, 2005, at 10:02 PM, Branimir Maksimovic wrote:
This should be enough reason to sc
G'day.
Quoting Joel Reymont <[EMAIL PROTECTED]>:
> writeLoop :: (Event a -> IO ()) -> Handle -> (SSL, BIO, BIO) -> IO ()
> writeLoop post h ssl =
> do handle (\e -> post $ NetworkError e) $
>do cmd <- read h ssl
> post $! Cmd $! cmd
> writeLoop post
On Dec 11, 2005, at 10:02 PM, Branimir Maksimovic wrote:
Problem with mt programs is that they just appear to work but in
havy load
situation those errors show once a while.
My loads are pretty heavy. Did not see any problems with SSL yet.
This should be enough reason to scan for keyboar
Thank you Andrew! Does it have any effect on performance? Is there a
speed up of any sort from not passing parameters?
On Dec 11, 2005, at 11:50 PM, [EMAIL PROTECTED] wrote:
Good, but even better is this:
writeLoop :: (Event a -> IO ()) -> Handle -> (SSL, BIO, BIO) -> IO ()
writeLoop post h
On Sunday 11 December 2005 06:54 pm, Joel Reymont wrote:
> Thank you Andrew! Does it have any effect on performance? Is there a
> speed up of any sort from not passing parameters?
Shooting from the hip here, but I doubt it -- AFAIK it all gets lambda-lifted
in the compiler anyway.
> On Dec 11, 2
Okay, I have looked up KMP and implemented it.
Seems to work -- my first use of QuickCheck, too.
It's slower than Bulat's and Tomasz' for Branimir's test :-(,
but really fast for my test.
Undoubtedly, one can still tune it.
Here's the code:
module KMP where
import Data.Array
searchReplace :: Str
From: Joel Reymont <[EMAIL PROTECTED]>
To: Branimir Maksimovic <[EMAIL PROTECTED]>
CC: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
Date: Sun, 11 Dec 2005 23:31:44 +
Allright, I _am_ convinced. How do I ready ^C from the keyboard???
If
On 12/12/05, Daniel Fischer <[EMAIL PROTECTED]> wrote:
> Okay, I have looked up KMP and implemented it.
> Seems to work -- my first use of QuickCheck, too.
> It's slower than Bulat's and Tomasz' for Branimir's test :-(,
> but really fast for my test.
> Undoubtedly, one can still tune it.
Perhaps b
From: Joel Reymont <[EMAIL PROTECTED]>
To: Branimir Maksimovic <[EMAIL PROTECTED]>
CC: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
Date: Sun, 11 Dec 2005 23:52:19 +
On Dec 11, 2005, at 10:02 PM, Branimir Maksimovic wrote:
This does no
Cale Gibbard:
> On 11/12/05, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote:
> > You need to tell c2hs to what Haskell type a C pointer type maps before
> > it can generate the right signature for the import declaration. This is
> > done using a pointer hook:
> >
> > http://www.cse.unsw.edu.au
Joel Reymont wrote:
> > This should be enough reason to scan for keyboard events instead.
> > There is no guarantee that SIGINT would be sent only by keyboard.
>
> import System.Posix.Signals
>
> main =
> do installHandler sigINT Ignore Nothing
> x <- getChar
> if x == '\E
My client _is_ single-threaded, I do not use bound (OS) threads at
all. Does this shed any light on why my OpenSSL stuff is working as
well as my signal handler? ;-)
On Dec 12, 2005, at 12:21 AM, Branimir Maksimovic wrote:
In single threaded client you can handle ^C if you like in signal
G'day all.
Quoting Joel Reymont <[EMAIL PROTECTED]>:
> Thank you Andrew! Does it have any effect on performance?
Yes, however I believe that GHC can perform this transformation
automatically at high optimisation levels. Even so, for portability,
it's wise not to rely on your implementation perf
From: Daniel Fischer <[EMAIL PROTECTED]>
To: Haskell-Cafe@haskell.org
Subject: [Haskell-cafe] Substring replacements
Date: Mon, 12 Dec 2005 01:14:37 +0100
Okay, I have looked up KMP and implemented it.
Seems to work -- my first use of QuickCheck, too.
It's slower than Bulat's and Tomasz' for
From: Joel Reymont <[EMAIL PROTECTED]>
To: "Branimir Maksimovic" <[EMAIL PROTECTED]>
CC: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
Date: Mon, 12 Dec 2005 02:28:54 +
My client _is_ single-threaded, I do not use bound (OS) threads at al
Hello
It seems that opening the same file multiple times (one writer
and multiple readers) is not supported at least on *nix with
GHC. I want to use one Handle to use append data till the
end of the file while other Handles perform random access
IO with seeks on the file.
Sharing the same Handle
Quoth Einar Karttunen :
| It seems that opening the same file multiple times (one writer
| and multiple readers) is not supported at least on *nix with
| GHC. I want to use one Handle to use append data till the
| end of the file while other Handles perform random access
| IO with seeks on the file
On 11.12 22:26, Donn Cave wrote:
> Quoth Einar Karttunen :
> | It seems that opening the same file multiple times (one writer
> | and multiple readers) is not supported at least on *nix with
> | GHC. I want to use one Handle to use append data till the
> | end of the file while other Handles perfor
On Sun, Dec 11, 2005 at 10:37:12PM +, Joel Reymont wrote:
> Oh, right. It does not apply in my case, though, so I thought it was
> safe.
>
> I'm not sure what the proper Haskell wording is to explain but it
> seems like the type system catches if a user of the library tries to
> use two
Quoth Einar Karttunen :
| On 11.12 22:26, Donn Cave wrote:
| > Quoth Einar Karttunen :
| > | It seems that opening the same file multiple times (one writer
| > | and multiple readers) is not supported at least on *nix with
| > | GHC. I want to use one Handle to use append data till the
| > | end of
65 matches
Mail list logo