On 09.01 12:56, Donald Bruce Stewart wrote:
Entries that may currently be worth submitting:
takfp - http://www.haskell.org/hawiki/TakfpEntry
Committed.
pidigits (currently 2nd!) - http://www.haskell.org/hawiki/PidigitsEntry
Committed.
mandelbrot
ekarttun:
On 09.01 12:56, Donald Bruce Stewart wrote:
Entries that may currently be worth submitting:
takfp - http://www.haskell.org/hawiki/TakfpEntry
Committed.
pidigits (currently 2nd!) - http://www.haskell.org/hawiki/PidigitsEntry
Committed.
Thanks for all infos.
I'll apply that Ref-datatype from the observable sharing paper
to my problem and see where this brings me. I'm also looking
into the solution Paul Hudak presented in the
Detecting Cycles in Datastructures thread in october.
For the problem at hand (involving the STLC),
Donald Bruce Stewart wrote:
Entries that may currently be worth submitting:
takfp - http://www.haskell.org/hawiki/TakfpEntry
pidigits (currently 2nd!) - http://www.haskell.org/hawiki/PidigitsEntry
mandelbrot-
Donald Bruce Stewart wrote:
d:
Regarding the Fannkuch Shootout Entry:
If we are willing to specialize flop in the way shown on the wiki,
another 8% can be gained by similarly specializing rotate:
rotate 2 (x1:x2:xs) = x2:x1:xs
rotate 3 (x1:x2:x3:xs) = x2:x3:x1:xs
...
Cheers,
David F. Place wrote:
main' n = let p = permutations [1..n]
in do mapM_ (putStrLn . concatMap show) $ take 30 p
putStr $ Pfannkuchen( ++ show n ++ ) =
putStrLn . show $ foldl' (flip (max .
bertram.felgenhauer:
The flop machinery can still be made faster, stealing an idea from the
icc entry (namely, treating the first entry separately):
Great. This pushes the pure version up a notch.
I've updated the wiki, showing how the code has progressed:
Author Time in
Bulat Ziganshin wrote:
the same is for Int32 (and i think other fixed-width integrals). i just
noticed that one simple loop in my program allocates 2.5 times more
data and works 2 times slower when loop variable switched from Int
to Int32
There's no reason that Int32 should be slower than
Joel Reymont wrote:
I compiled a simple one-liner: main = print Blah.
This is the GC report:
5,620 bytes allocated in the heap
0 bytes copied during GC
0 collections in generation 0 ( 0.00s)
0 collections in generation 1 ( 0.00s)
1 Mb total
Sebastian Sylvan wrote:
It would be neat if the PackedString library contained functions such
as hGetLine etc. It does have a function for reading from a buffer,
but it won't stop at a newline...
But yeah, fast string manipulation is difficult when using a
linked-list representation...
My
I'm trying to use parsec for parsing a custom input stream. As far as I
understood the manual correctly I need to define the primitive parser:
type MyParser a = GenParser (SourcePos,Tok) () a
mytoken :: (Tok - Maybe a) - MyParser a
mytoken test
= token showToken posToken testToken
where
Am Sonntag, 8. Januar 2006 15:45 schrieben Sie:
Daniel Fischer wrote:
Cool. So let's see if I got it.
If I have
n - readIO
...
mapM_ (func n) list
...
in my programme, the runtime system will/might build object code for
func n that is then used instead of using the
Am Montag, 9. Januar 2006 12:52 schrieb Gerd M:
I'm trying to use parsec for parsing a custom input stream. As far as I
understood the manual correctly I need to define the primitive parser:
type MyParser a = GenParser (SourcePos,Tok) () a
mytoken :: (Tok - Maybe a) - MyParser a
mytoken
Hi Gerd,
despite SourcePos being abstract, it can be fully manipulated using newPos.
import Text.ParserCombinators.Parsec.Pos
If you can compute the positions from your Tok-stream then you may
consider using tokenPrim and work with GenParser Tok () a
HTH Christian
Gerd M wrote:
I'm trying
Daniel Fischer wrote:
So back to square one.
What then _is_ run-time compilation?
In the virtual machine community, run-time compilation refers to the
translation of program code at run-time, for example the compilation of
Java byte code to machine code in a JIT (just-in-time) compiler. Other
Hi all,A bit strange behaviour with hPutStrLn. Consider following program:main = do handle - openFile output.txt WriteMode hPutStrLn handle (unlines contLines2) -- hFlush houtput
where contLines2 = flip map [1..2000] $ \x - show x ++ been there done thatOutputs file which ends with following
On 1/9/06, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 1/9/06, Gracjan Polak [EMAIL PROTECTED] wrote:
Hi all,
A bit strange behaviour with hPutStrLn. Consider following program:
main = do
handle - openFile output.txt WriteMode
hPutStrLn handle (unlines contLines2)
On Mon, Jan 09, 2006 at 04:57:51PM +0100, Gracjan Polak wrote:
Hi all,
A bit strange behaviour with hPutStrLn. Consider following program:
main = do
handle - openFile output.txt WriteMode
hPutStrLn handle (unlines contLines2)
-- hFlush houtput
where
contLines2 =
On Mon, 9 Jan 2006, Stepan Golosunov wrote:
On Mon, Jan 09, 2006 at 04:57:51PM +0100, Gracjan Polak wrote:
...
So the output is truncated. When I uncomment hFlush, file is fully written.
Is this expected/documented behaviour?
This is the usual behavior when file is not closed. And example
It might be nice to at least include some disclaimers of warranty.
I'm not a lawyer. But those US copyright lawyers I've spoken with
have expressed doubts
about anybody's ability to put things into the public domain.
Certainly, if you put it in the
public domain, you can't also disclaim a
despite SourcePos being abstract, it can be fully manipulated using newPos.
Thanks for the tip, I thought it wasn't exported.
Gerd M wrote:
I'm trying to use parsec for parsing a custom input stream. As far as I
understood the manual correctly I need to define the primitive parser:
type
On Monday 09 January 2006 04:09 am, Tim Walkenhorst wrote:
Thanks for all infos.
I'll apply that Ref-datatype from the observable sharing paper
to my problem and see where this brings me. I'm also looking
into the solution Paul Hudak presented in the
Detecting Cycles in Datastructures thread
Yeah. this is a major bug in ghc IMHO. I believe it has been fixed, but
am unsure. Since we can't rely on finalizers to run in general, some
sort of 'atexit' routine is needed. (which would be a good addition to
the standard libraries anyway)
John
--
John Meacham - ⑆repetae.net⑆john⑈
On Sun, Jan 08, 2006 at 11:26:05AM +, Andreas Kägi wrote:
hello
i want to read a file encoded in utf8 and at a later time output portions of
it
on the console. Is there an easy way to do this in haskell? using the standard
i/o functions i can read the file but the output gives me \1071
Thanks for the answers. I can go with hFlush or hClose, no problem here. Anyway this is a bit surprising that default stdout behaves different than file opened with default options. -- Gracjan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
25 matches
Mail list logo