Re: Issues with posix-realtime package

Hi Manlio, I am the author of this package. Let me think about what you have said. Regards, Vasili

Galchin, Vasili ha scritto:
Hi Manlio,
I am the author of this package. Let me think about what you have said.
Regards, Vasili
Thanks. Note that there are no problems if I compile my program, instead of running it using ghci. Manlio Perillo

hmmmmmm ....
Vasili
On Fri, Jan 9, 2009 at 5:30 PM, Manlio Perillo
Galchin, Vasili ha scritto:
Hi Manlio,
I am the author of this package. Let me think about what you have said.
Regards, Vasili
Thanks.
Note that there are no problems if I compile my program, instead of running it using ghci.
Manlio Perillo

Manlio,
so compiling to native machine code works ok but if using ghci byte-code
interpreter doesn't ..... can you supply your program please?
Vasili
On Fri, Jan 9, 2009 at 5:30 PM, Manlio Perillo
Galchin, Vasili ha scritto:
Hi Manlio,
I am the author of this package. Let me think about what you have said.
Regards, Vasili
Thanks.
Note that there are no problems if I compile my program, instead of running it using ghci.
Manlio Perillo

Galchin, Vasili ha scritto:
Manlio,
so compiling to native machine code works ok but if using ghci byte-code interpreter doesn't ..... can you supply your program please?
Right. Can't you reproduce the problem? The program is very simple (I was just testing your package, since I suggested the use of clock_gettime to Mauricio in a previous post): import System.Posix.Realtime.RTTime import System.Posix.Realtime.RTDataTypes main = do time <- clockGetTime Clock_Monotonic; print $ tvSec time print $ tvNsec time runghc rttime.hs I suspect that this is a problem with shared library loading in ghci, since the C code you use for your package, is also used by the base package (for the Posix subsystem). By the way: I don't see reasons to add all that code, since it is not used. However, when I tried to remove all the unused code, executing the program gave me a stack exception (maybe I have removed too many things...). One personal note: I don't like `tvSec` and `tvNsec`, I think `seconds` and `nanoSeconds` is a better choice. Also, it would useful a function to compute elapsed time (maybe a general class in base package, and a specialized instance declaration in posix-realtime for the timespec?)
Vasili
[...]
Manlio

On Sat, Jan 10, 2009 at 5:52 AM, Manlio Perillo
Galchin, Vasili ha scritto:
Manlio,
so compiling to native machine code works ok but if using ghci byte-code interpreter doesn't ..... can you supply your program please?
Right. Can't you reproduce the problem?
The program is very simple (I was just testing your package, since I suggested the use of clock_gettime to Mauricio in a previous post):
import System.Posix.Realtime.RTTime import System.Posix.Realtime.RTDataTypes
main = do time <- clockGetTime Clock_Monotonic; print $ tvSec time print $ tvNsec time
runghc rttime.hs
I suspect that this is a problem with shared library loading in ghci, since the C code you use for your package, is also used by the base package (for the Posix subsystem).
By the way: I don't see reasons to add all that code, since it is not used.
^^^ which code?
However, when I tried to remove all the unused code, executing the program gave me a stack exception (maybe I have removed too many things...).
One personal note: I don't like `tvSec` and `tvNsec`, I think `seconds` and `nanoSeconds` is a better choice. ^^^ ok .. I agree and will change. I asked others for criticisms(constructive) when I put to hackage but didn't get any. This is good ...
Also, it would useful a function to compute elapsed time (maybe a general class in base package, and a specialized instance declaration in posix-realtime for the timespec?)
Vasili
[...]
Manlio

Galchin, Vasili ha scritto:
[...] I suspect that this is a problem with shared library loading in ghci, since the C code you use for your package, is also used by the base package (for the Posix subsystem).
By the way: I don't see reasons to add all that code, since it is not used.
^^^ which code?
Code from HsUnix.h and execvpe.h.
One personal note: I don't like `tvSec` and `tvNsec`, I think `seconds` and `nanoSeconds` is a better choice. ^^^ ok .. I agree and will change. I asked others for criticisms(constructive) when I put to hackage but didn't get any. This is good ...
I would like to help to develope any wrappers around POSIX API. Manlio

On Sat, Jan 10, 2009 at 4:37 PM, Manlio Perillo
Galchin, Vasili ha scritto:
[...] I suspect that this is a problem with shared library loading in ghci, since the C code you use for your package, is also used by the base package (for the Posix subsystem).
By the way: I don't see reasons to add all that code, since it is not used.
^^^ which code?
Code from HsUnix.h and execvpe.h.
One personal note: I don't like `tvSec` and `tvNsec`, I think `seconds` and `nanoSeconds` is a better choice. ^^^ ok .. I agree and will change. I asked others for criticisms(constructive) when I put to hackage but didn't get any. This is good ...
I would like to help to develope any wrappers around POSIX API.
^^^ you are suggesting to change current wrapper API? Vasili
Manlio

Galchin, Vasili ha scritto:
[...] I would like to help to develope any wrappers around POSIX API.
^^^ you are suggesting to change current wrapper API?
No, but I don't understand why to link code that seems to be not used. P.S.: is the problem I have reported riproducible? I'm on Linux Debian Lenny. Manlio Perillo

Hi Manlio,
Are you now talking about code in Code from HsUnix.h and execvpe.h?
Vasili
On Tue, Jan 13, 2009 at 5:09 AM, Manlio Perillo
Galchin, Vasili ha scritto:
[...] I would like to help to develope any wrappers around POSIX API.
^^^ you are suggesting to change current wrapper API?
No, but I don't understand why to link code that seems to be not used.
P.S.: is the problem I have reported riproducible?
I'm on Linux Debian Lenny.
Manlio Perillo

Hi Manlio,
ok .. yeh ... I will have to remove the code in HsUnix.h and/or remove
references. Currently I am trying to finish another Haskell project. I don't
think these include files shouldcause "correctness" problems, yes? If so, I
will get to this problem later. ???
Regards, Vasili
On Wed, Jan 14, 2009 at 5:03 AM, Manlio Perillo
Galchin, Vasili ha scritto:
Hi Manlio,
Are you now talking about code in Code from HsUnix.h and execvpe.h?
Yes.
Manlio

Galchin, Vasili ha scritto:
Hi Manlio,
I am the author of this package. Let me think about what you have said.
Regards, Vasili
If you can't reproduce the problem: there is a possibility that I have messed up my (GHC) system. I'm on Linux Debian Lenny. GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help <interactive>:1:22: attempting to use module `System.IO' (System/IO.hs) which is not loaded <interactive>:1:22: Not in scope: `System.IO.stderr' <interactive>:1:22: Not in scope: `System.IO.stdin' ghc-6.8.2: panic! (the 'impossible' happened) (GHC version 6.8.2 for i386-unknown-linux): interactiveUI:setBuffering Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Yesterday there were no problems with ghci, and I don't remember having done something strange. P.S: the impossible can always happen! Thanks Manlio Perillo
participants (2)
-
Galchin, Vasili
-
Manlio Perillo