[Haskell-cafe] Error during hlint install ?

2009-08-26 Thread Dusan Kolar
Hello all, Am I doing something wrong if I get the following error during cabal installation of hlint? Is there any way how to solve it? I run on: Linux pc 2.6.30-ARCH #1 SMP PREEMPT Fri Jul 31 07:30:28 CEST 2009 x86_64 Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz GenuineIntel GNU/Linux The

[Haskell-cafe] Library function for map+append

2009-08-18 Thread Dusan Kolar
Hello all, During a small project I'm trying to develop a small application. It becomes quite often that I need a function mapapp: mapapp _ [] ap = ap mapapp f (a:as) ap = f a : map f as ap I tried hoogle to find such a function with no success. Is there any function/functions built-in

Re: [Haskell-cafe] Library function for map+append

2009-08-18 Thread Dusan Kolar
Dlists maybe good it all the app is written using them. Probably not good idea to switch to them in the middle of project... I know it is lazy, but I don't think it is able to eliminate operations, is it? At least intuitively, the map f list takes n*C ticks (C is for application of f and

Is 78 characters still a good option? Was: [Haskell-cafe] breaking too long lines

2009-04-21 Thread Dusan Kolar
Dear all, reading that according the several style guides, lines shouldn't be too long (longer than 78 characters). http://www.cs.caltech.edu/courses/cs11/material/haskell/misc/haskell_style_guide.html http://www.haskell.org/haskellwiki/Programming_guidelines I would like to know, whether

[Haskell-cafe] Re: Is 78 characters still a good option? Was: breaking too long lines

2009-04-21 Thread Dusan Kolar
The longer a line the more difficult it is to move the focus to the beginning of the next line when reading. Hmm, then I must be doing something wrong, I do not fully fill program lines... ;-) Or my comments are too short. I do not think, this is an issue, to catch the next line, if the

Re: [Haskell-cafe] Memoization local to a function

2009-02-26 Thread Dusan Kolar
/expressions are discarded/not shared after/to the next computation, that means separated closure is built for them? Dusan Henning Thielemann wrote: On Wed, 25 Feb 2009, Luke Palmer wrote: On Wed, Feb 25, 2009 at 10:38 AM, Dusan Kolar ko...@fit.vutbr.cz wrote: I have a function

[Haskell-cafe] Memoization local to a function

2009-02-25 Thread Dusan Kolar
Dear all, I have a function a computation of which is quite expensive, it is recursively dependent on itself with respect to some other function values - we can roughly model its behaviour with fib function (returns n-th number of Fibonacci's sequence). Unfortunately, it is not fib, it is

[Haskell-cafe] GHC 6.8.3 package for ArchLinux x86_64

2008-08-15 Thread Dusan Kolar
Hello all, Is there any plan to make a package for archlinux x86_64 with (more or less) complete GHC 6.8.3 binaries? I know I can download and install myself, usually I do so myself, but the reason is to prepare a list of packages for others. So far, the 6.8.2 is available. Is there any

Re: [Haskell-cafe] GHC 6.8.3 package for ArchLinux x86_64

2008-08-15 Thread Dusan Kolar
Is there any plan to make a package for archlinux x86_64 with (more or less) complete GHC 6.8.3 binaries? I know I can download and install myself, usually I do so myself, but the reason is to prepare a list of packages for others. So far, the 6.8.2 is available. Hi, Arch ghc

[Haskell-cafe] Bug in parallel GHC runtime?

2008-05-23 Thread Dusan Kolar
Hello all, The attached file was compiled by the following command: ghc -O2 --make -threaded ltest1pl.hs -o alall When run in a sequential mode, I get this result: ./alall Starting ... Lst1: 416665 Lst2: 4166916670 T1: 0m 1.0e-6s 36 End! On the other hand, when run in a threaded

Re: [Haskell-cafe] ByteString.pack behavior

2008-05-18 Thread Dusan Kolar
error? ByteStrings take Word8 values as input, so x `div` 256 , where 256 :: Word8, overflows to 0. -- Don -- Dusan Kolartel: +420 54 114 1238 UIFS FIT VUT Brno fax: +420 54 114 1270 Bozetechova 2 e-mail: [EMAIL PROTECTED] Brno 612 66 Czech Republic

[Haskell-cafe] True parallelism missing :-(

2008-03-25 Thread Dusan Kolar
Dear all, I've thought the following three (dummy) programs would run some of their parts in parallel (on dual core) if compiled with option threaded (smp). The truth is that only the first one exploits multicore CPU. Why? Moreover, using RTS option -sstderr makes runtime not to evaluate

Re: [Haskell-cafe] True parallelism missing :-(

2008-03-25 Thread Dusan Kolar
I did use that option. :-) Dusan Bulat Ziganshin wrote: Hello Dusan, Tuesday, March 25, 2008, 3:47:50 PM, you wrote: (smp). The truth is that only the first one exploits multicore CPU. Why? +RTS -N2 ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] True parallelism missing :-(

2008-03-25 Thread Dusan Kolar
Yes, that's is. Thanks. My fault - missing wood seeing trees. ;-) Best regards, Dusan Roberto Zunino wrote: Dusan Kolar wrote: Dear all, I've thought the following three (dummy) programs would run some of their parts in parallel (on dual core) if compiled with option threaded (smp

[Haskell-cafe] Building HaXML 1.13.3 on Windows fails

2008-03-17 Thread Dusan Kolar
Hello all, I'm trying to build HaXML 1.13.3 on Windows using build.bat - I have modified it even on places referred as should work (SRCS and OBJS variables); now it works till the last command: ghc-pkg register pkg.conf The error is: Reading package info from pkg.conf ... ghc-pkg.exe: Line

Re: [Haskell-cafe] Evolutionary Computing

2008-01-25 Thread Dusan Kolar
Hello, I don't know about math, but a practical usage seems to be in the reconfigurable hardware (FPGA). See web-page of my colleague, where is list of his papers on the topic. http://www.fit.vutbr.cz/~sekanina/pubs.php Dusan PR Stanley wrote: Hi What does the list think of EC? Genetic

Re: [Haskell-cafe] [OT] GHC uninstall on Linux

2007-11-09 Thread Dusan Kolar
Hello all, Thank you for your replies and tips. The idea of having several versions of GHC in parallel is nice, but I don't long for it even if space is not a problem. To post some resolution: the stuff is (if installed using default settings) in the directories /usr/local/bin,

[Haskell-cafe] [OT] GHC uninstall on Linux

2007-11-07 Thread Dusan Kolar
Hello all, I use tar.bz2 binary distribution of GHC compiler as my distro does not use any supported packaging system. Everything is fine, but... I want to install the new version of the GHC compiler. Is there any (easy) way, how to get information about what was copied and where during

Re: [Haskell-cafe] Re: newbie optimization question

2007-10-29 Thread Dusan Kolar
sum = 0; for (int j = 1; j i; j++) if (i % j == 0) sum += j; if (sum == i) cout i ; } return 0; } % ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Dusan

Re: [Haskell-cafe] Binary constants in Haskell

2007-10-25 Thread Dusan Kolar
] 154 Prelude 0xD29A 53914 Prelude bin [1,1,0,1, 0,0,1,0, 1,0,0,1, 1,0,1,0] 53914 -k -- Dusan Kolartel: +420 54 114 1238 UIFS FIT VUT Brno fax: +420 54 114 1270 Bozetechova 2 e-mail: [EMAIL PROTECTED] Brno 612 66 Czech Republic

[Haskell-cafe] Bug in GHCi?

2007-08-08 Thread Dusan Kolar
Hello all, Maybe this is a wrong place to report, but I have repeatedly performed funny calculation in GHCi with strange time report. The version of GHCi is: ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___|

[Haskell-cafe] List minimum - performance question

2007-07-20 Thread Dusan Kolar
Hello all, Inspired by exercise on the minimal value of a given list I tried myself produce several versions of such a function: exercise: using just ($), head, filter, null, id, map, () without explicit recursion definition direct-forward: direct implementation using forward recursion,

[Haskell-cafe] GHC optimization changes evaluation strategy?

2007-03-13 Thread Dusan Kolar
... True TrueStop... *Behavior 2:* $ rm test Test.o Test.hi $ ghc -O2 Test.hs -o test $ ./test Start... .True .TrueStop... -- Dusan Kolartel: +420 54 114 1238

[Haskell-cafe] Parallelism on concurrent?

2007-03-13 Thread Dusan Kolar
Hello all, I'm googling around haskell.org to get some deeper knowledge about Control.Parallel.Strategies than it is presented on http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Parallel-Strategies.html BTW, could someone point me to some more deeper doc. about it?

Re: [Haskell-cafe] Parallelism on concurrent?

2007-03-13 Thread Dusan Kolar
user0m1.367s sys 0m0.030s Got a speedup of 100%, and didn't use threads at all. Yay! pepe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Dusan Kolartel: +420 54 114

[Haskell-cafe] seq - RTFM?

2006-07-21 Thread Dusan Kolar
Hello all, my question is probably dull. So answers to better investigate manual are welcome. Why is this correct? ___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.4.1, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/

[Haskell-cafe] Re: GHC 6.4.1 x86-64 does not compile

2006-05-09 Thread Dusan Kolar
make[3]: *** [boot] Error 2 make[2]: *** [boot] Error 1 make[1]: *** [boot] Error 1 make[1]: Leaving directory `/mnt/data/FLP/Downloads/ghc-6.4.2/ghc' make: *** [build] Error 1 Simon Marlow wrote: Dusan Kolar wrote: Hello all, I've install universal binary for x86_64 of GHC 6.4.1

[Haskell-cafe] GHC 6.4.1 x86-64 does not compile

2006-05-04 Thread Dusan Kolar
Hello all, I've install universal binary for x86_64 of GHC 6.4.1. The installation was done on AMD dual core machine. Uname for the machine gives: Linux machine name 2.6.16.5 #1 SMP Thu Apr 13 09:08:22 CEST 2006 x86_64 x86_64 x86_64 GNU/Linux While ghci was running some tests well, the

[Haskell-cafe] Uses forkOS all CPUS on-board?

2005-11-23 Thread Dusan Kolar
Hello haskellers, in past few days, a lot of stuff on concurrency went through the conference. I'm trying to use posted things and my own. They work, even in a context switching regime, but I can't exploit all the CPU's on my computer. Always is active just one thread and, thus, the computation

[Haskell-cafe] GHCi always optimizes?

2005-11-22 Thread Dusan Kolar
Hello all, My question is rather strange, maybe, even if simple: Does ghci always translates with -O option set on? I've done some measurements on an application using ghc and ghci. ghc compiled with no opmitization = program running real988m59.260s user989m1.325s sys 0m0.704s

[Haskell-cafe] GHC ignores RTS options

2005-11-15 Thread Dusan Kolar
Hello, I wonder whether anybody could advise me how to pass correctly RTS options to ghc? I've tried ghc +RTS -K4M --RTS -O program.hs -o aO.out ghc +RTS -K4M -RTS -O program.hs -o aO.out ghc -O program.hs -o aO.out +RTS -K4M ghc -O program.hs +RTS -K4M --RTS -o aO.out and many others,

[Haskell-cafe] Compiling hugs - stop on missing symbol

2005-11-03 Thread Dusan Kolar
configure has produced a wrong Makefile. Any suggestions how to make it work? Dusan -- Dusan Kolartel: +420 54 114 1238 UIFS FIT VUT Brno fax: +420 54 114 1270 Bozetechova 2 e-mail: [EMAIL PROTECTED] Brno 612 66 Czech Republic

[Haskell-cafe] Compiled hugs - on overload crashes

2005-11-03 Thread Dusan Kolar
if this is trivial or off topic. Regards, hoping for help, Dusan -- Dusan Kolartel: +420 54 114 1238 UIFS FIT VUT Brno fax: +420 54 114 1270 Bozetechova 2 e-mail: [EMAIL PROTECTED] Brno 612 66 Czech Republic

[Haskell-cafe] Compiled hugs - on overload crashes

2005-11-03 Thread Dusan Kolar
if this is trivial or off topic. Regards, hoping for help, Dusan -- Dusan Kolartel: +420 54 114 1238 UIFS FIT VUT Brno fax: +420 54 114 1270 Bozetechova 2 e-mail: [EMAIL PROTECTED] Brno 612 66 Czech Republic

Re: [Haskell-cafe] Hugs - evaluation statistics

2005-08-29 Thread Dusan Kolar
length2 _= 0 and compare number of reductions for: length [1..5000] length2 [1..5000] -- Dusan Kolartel: +420 54 114 1238 UIFS FIT VUT Brno fax: +420 54 114 1270 Bozetechova 2 e-mail: [EMAIL PROTECTED] Brno 612 66 Czech Republic

Re: [Haskell-cafe] Hugs - evaluation statistics

2005-08-28 Thread Dusan Kolar
collection - now I know that not  ( verified such a way, so that I changed the amount of allocated memory by hugs and run the same command = once with GC, the other time without :-) ). Sorry for distortion in the list. Dusan Daniel Fischer wrote: Am Mittwoch, 24. August 2005 16:55 schrieb Dusan Kolar

[Haskell-cafe] Hugs - evaluation statistics

2005-08-24 Thread Dusan Kolar
Hello, Even if I know number of reductions should not be used to anything important I'm quite confused with values I get. Is garbage collection somehow affecting the number of reductions? I have always thought not, but... ;-) Thx, Dusan ___

[Haskell-cafe] Forcing type conversion - probably FAQ(?)

2004-12-01 Thread Dusan Kolar
Hello, I'm trying to make work the following code (I'm using GHCi with flags -fglasgow-exts -fallow-undecidable-instances): infixl 6 :+, :- infixl 6 .+, .- data TMyExpr = TMyExpr :+ TMyExpr | TMyExpr :- TMyExpr | Val Int | Id String class MkExpr a b where (.+)

Naive instantiation

2003-10-07 Thread Dusan Kolar
Hello, I've got (maybe a bit naive) question, whether it is possible to have instance of class (already derived from another class) if it uses more concrete type than instances of predecesing classes. Let us assume the following example: class A a where... class (A a) = B a where... class (B

Library for concurrent threads running

2002-12-16 Thread Dusan Kolar
Hello, My question/wish is maybe naive, but anyway: Is there a library (not a language extension, like Concurrent Haskell, Glasgow Parallel Haskell, ...) enabling to run two functions in parallel, possibly in cascade? Something like: testAll (threadStart f1 (threadStart f2 f3)) where