Am 01.02.11 12:34, schrieb Daniel Fischer:
> On Tuesday 01 February 2011 11:45:58, Julian Bean wrote:
>>> It indeed does, even though I doubted it at first. As far as I
>>> remember the type in
>>>
>>>getnArrayST n bs :: ST s (Maybe (UArray Int Word8, [Word8])) =
>>>
>>> used to be necessary t
Am 01.02.11 11:05, schrieb Daniel Fischer:
> On Tuesday 01 February 2011 10:20:26, Carsten Schultz wrote:
>> Hello everyone,
>>
>> I am trying to compile some code that I have written a long time ago
>> (might have been for ghc 6.3), and I have not done much Haskell
Hello everyone,
I am trying to compile some code that I have written a long time ago
(might have been for ghc 6.3), and I have not done much Haskell in the
meantime. I have trouble compiling the code, maybe only because I do
not remember the necessary flags (yes, these should be in the source
fil
Luca Ciciriello schrieb:
> Thanks Carsten, I've compiled your example and all works as expected.
>
> Just a note.
> If I load the module in GHCi (intead of compiling it) and launch main
> function the result is quite strange. I obtain:
>
> He lwloorld
So we actually observe the concurrency her
Brent Yorgey schrieb:
> On Fri, Oct 02, 2009 at 06:16:49PM +0200, Luca Ciciriello wrote:
>> Compiling this module with:
>>
>> ghc --make Main.hs -o Main
>>
>> and launcing ./Main the result is just:
>>
>> Terminal> world
>
> Also, the reason you only get "world" here is likely because the main
> t
, otherwise it would be an opportuniy to
reconsider the problems mentioned there.
Take care,
Carsten
--
Carsten Schultz (2:38, 33:47)
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
pgpHPMFoJaYLE.pgp
Description: PGP signature
pic ;-)
Just do an strace, if you want to know (and are running Linux).
Take care,
Carsten
--
Carsten Schultz (2:38, 33:47)
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
___
Glasgow-haskell-users
Oops, I initially hit r instead of L...
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
--- Begin Message ---
Hi!
On Sun, Jan 16, 2005 at 06:17:24PM -0800, Ashley Yakeley wrote:
>
Hi!
Is there anybody who has compiled a profiling version of the HaXml
libraries and might share a suitable make file?
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page
MyClass)
should also be possible. The advantage would be that only the module
defining the deriving would have to know about TH, not the one using
it. On other systems, the deriving could then be realized via a
pre-processor or similar means.
Greetings,
Carsten
--
Carsten Schultz (2:38,
imes))
then putStrLn "It is odd!"
else putStrLn "It is 2!"
Another example is in the use of `interact'. You dot not want to
print a partial answer before a question is given.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http:/
tion
> meaning.
If p x == _|_ and foo _|_ /= _|_, then (1) does not equal (2).
> I have a large program which is easily written in the style of (1),
> (and in many places it sets `case' instead of `if').
> Annoyingly, it prints out in a not a lazy manner.
You get wh
Hi!
I want to read a text file from a socket and process it as a String
(using Parsec). Is hGetContent ok, or are there mor efficient
alternatives available, even if I want a String anyway?
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de
_s1XA new_s;
};
};
};
} in go10 1;
};
SRT(T.$wfor2): []
T.for2 =
\r [w w1] case w of w2 { GHC.Base.I# ww -> T.$wfor2 ww w1; };
SRT(T.for2): []
Playing with the code gene
compare (L x) (L y) = compare x y
compare (L _) (R _) = LT
compare (R _) (L _) = GT
compare (R x) (R y) = compare x y
min (L x) (L y) = L (min x y)
min (L x) (R _) = L x
min (R _) (L x) = L x
min (R x) (R y) = R (min x y)
I think that it is completel
en discussed before?
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
pgpsSaU1emaMt.pgp
Description: PGP signature
___
Glasgow-haskell-
root) (concat . map kids)
unfold :: (b -> Bool) -> (b -> a) -> (b -> b) -> b -> [a]
unfold p h t = unfoldr u
where
u x | p x = Nothing
| otherwise = Just (h x, t x)
===
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://
ld be good if ghc-users would
> keep that in mind when writing portable Haskell code.
Maybe someone should have a look at popen functionality in Python.
IMHO Python seems to have quite good libraries which work on Windows
and Unix.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47
/Custom-Allocation.html
Be sure to call mp_set_memory_functions only when there are no
active GMP objects allocated using the previous memory functions!
Usually that means calling it before any other GMP function.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathem
e we are not changing
> behavior, just doing a pure type based optimization, perhaps RULES is
> the better way to go.
Exactly.
> (can RULES even be used in this way?
I think so:
http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#SPECIALIZE-PRAGMA
Greetings,
Carsten
--
(I have not done any testing, though.) Maybe some kind soul with
knowledge of the ghc innards can provide an implementation that
reduces to a memcpy call, at least for some specializations.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de
Option a where [...]
instance SocketOption Debug [...]
instance SocketOption SendBuffer [...]
[...]
setSocketOption :: SocketOption a => Socket -> a -> IO ()
getSocketOption :: SockerOption a => Socket -> IO a
However, while quite clever :-), this would not be far from having a
sep
P.S.: Is there a special reason for the Simons on this list not to
produce messages with proper References headers? *duck*
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
pgphSFv
in that result. Thus, the function code itself here does
> not force the evaluation of h.
The point is that, because the function is strict, its implementation
may force the evaluation of h, if it so chooses. This is up to the
compiler, and as Simon pointed out, it actually does force h when
com
s strict in the first argument.
I do not know, what the strictness analyzer makes of it, though.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
pgp1oAogFYQMJ.pgp
Descr
Hi!
On Sun, Jun 06, 2004 at 09:33:39PM +, Gerd M wrote:
> Is there a simple way to execute a different process from a Haskell
> program, waiting for it's termination and then continuing with the next IO
> action?
Have a look at the module System.Cmd.
Greetings,
Carste
t; > problem on a 32 bit platform.
>
> In fact, the only way this will be a problem is if your list is lazy and
> consumed by the length function, but it's hard to see how that could happen
> except in strange example code. That is, it's hard to imagine when you'
s the problem in
Data.HashTable? I have tested, 6.0, 6.2, 6.2.20040304.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
module Main(main) where
import qualified Data.HashTable as
> compete with Python (which is rather... slow).
You should look at the individual examples and see how relevant their
results are for you. And keep in mind that strings tend to be slow in
Haskell (being lazy lists of characters), a fact that may influence
some of the tests.
Greetings,
Carsten
portant.
Just my humble opinion...
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
pgp0.pgp
Description: PGP signature
__
problems are more in
this area.
Greetings,
Carsten
--
Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin
http://carsten.codimi.de/
PGP/GPG key on the pgp.net key servers,
fingerprint on my home page.
pgp0.pgp
Description: PGP signature
___
scape c(_, str) = (False, c : str)
>
Neat. If I understand the specs correctly, the following should also
work.
translate str = '"' : foldr escape ('"':[]) str
where escape '"' t = '\\':'"':t
escape
s sufficient for english.
>
> I am talking about respect for non english speaking people.
>
> But if nobody cares ...
I, too, speak a language that can't be fully expressed in ASCII, but I
do not think that the behaviour of `show' should be changed in this
respect.
Greetings,
[]
===
and replacing [1..] by (elementStrict [1..]).
With that, the following program will also work.
===
module Main(main) where
main = print (fibs!!20)
fibs :: [Integer]
fibs = 1 : elementStrict (map snd $ iterate (\(x,y) -> (y, x+y)) (1,1))
===
It produces a result with 41798 decimal digits.
Hi,
is any workable example code for using Template Haskell to generate
instance declarations available, eg the function `genEq' mentioned in
the Template Haskell paper?
Greetings,
Carsten
--
Carsten Schultz (2:40, 33:47), FB Mathematik, FU Berlin
http://carsten.fu-mathe-team.de/
PGP/GP
erver written in Erlang
that can compile and load Erlang code embedded in HTML files to
produce dynamic pages. I have played with it a bit, and it seems
useful to me, but I would prefer Haskell over Erlang.
Greetings,
Carsten
--
Carsten Schultz (2:40, 33:47), FB Mathematik, FU Berlin
http://www.ma
unnecessary?
* If I add an {-# INLINE addSTcol #-} in module MatrixSparse and no paragmas in module RealStateMatrixMonads, does that make it less likely that addColOMC will be inlined in module Matrix?
* What should the information in RealStateMonads.hi look like?
Lots of questio
[],[]) xs
where select x ~(ts,fs) | p x = (x:ts,fs)
| otherwise = (ts,x:fs)
This is equivalent to the one given by Tom.
Greetings,
Carsten
---
Carsten Schultz, Fachbereich Mathematik, FU Berlin
http://www.math.fu-
I wrote
> zipRem (0:_|_) [0] = (0,0):_|_.
when I meant
zipRem (0:_|_) [0] = ((0,0):_|_ , _|_ , _|_).
Sorry.
---
Carsten Schultz, Fachbereich Mathematik, FU Berlin
http://www.math.fu-berlin.de/~cschultz/
"To match the silent eloquence of the created world
I have had to learn
G,
> #-}
> may do the algebraic simplification, like
> map ((x+1)+) [1,-1,-1-x] -->
> [x+2,x,0].
[...]
Ther same applies to our beloved monads. The compiler could be told about the monad
laws.
Carsten
---
Carsten Schultz, Fachbereich Mathematik, FU Berlin
"To matc
40 matches
Mail list logo