Re: [Haskell-cafe] Haskell at University in Munich
On Monday 05 December 2011 20:37:43 Janis Voigtländer wrote: Am 05.12.2011 12:00, schrieb bar...@sudety.it: Hello Haskell Cafe, I would be grateful for any information regarding Haskell (or at least Functional Programming) lectures at Universities near to Munich, Germany (Master or Bachelor). Unconfirmed information I've got regarding LMU and TUM are not promising. If Munich and 200 km circle do not provide with any offer, perhaps Less than 200 km from Munich: http://db.inf.uni-tuebingen.de/teaching/ws1112/afp Also, Germany extends farther than 200 km beyond Munich. :-) True, just I've got terrible Bavarian viewpoint. ;) Say, Bonn: http://www.iai.uni-bonn.de/~jv/teaching/dp11/ http://www.iai.uni-bonn.de/~jv/teaching/ffp/ Thank you for these links. Best regards, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell at University in Munich
On Monday 05 December 2011 10:00:08 Sean Leather wrote: On Mon, Dec 5, 2011 at 00:18, Bartosz Wójcik wrote: If Munich and 200 km circle do not provide with any offer, perhaps you may know what is available in Europe, limiting language of study to [German, English, Polish]? I believe the following recent thread will help answer this question: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/93650 Yes, this is very helpful, thanks a lot! Best regards, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell at University in Munich
Hello Haskell Cafe, I would be grateful for any information regarding Haskell (or at least Functional Programming) lectures at Universities near to Munich, Germany (Master or Bachelor). Unconfirmed information I've got regarding LMU and TUM are not promising. If Munich and 200 km circle do not provide with any offer, perhaps you may know what is available in Europe, limiting language of study to [German, English, Polish]? Best regards, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Fast code question
Packed Decimal downloaded on pc is just a stream of bytes without any comma. I was supposed to reformat data. If I undersdand bytestring-csv library, it parses csv format data. Thanks for the hint. I'll investigate next time when I have to deal with huge files. Bartek On Thursday 04 June 2009 23:21:21 you wrote: Can you use the bytestring csv parser (or convert it into a pretty printer?) bartek: Hi Folks, I had to transform Packed Decimal file into csv format (does anybody here know what this Mainframe format is?). Because of the file size I could not do this on mainframe directly. So I've created simply program using ByteString. Generally I'm happy with my solution: pgm processes arroud 2MB/s on my pc, so my 3GB file was transformed in reasonable 30 min time. My question is: how to do this faster? {code} module Main where import qualified Data.ByteString.Lazy as B main = B.getContents = myPrint . myConcat . B.unpack ^ That looks bad. --- ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Fast code question
Integer was on purpose. One of the fields was 14 digits number. Usually I parse EBCDIC directly on mainframe. This time it was exception. Bartek On Thursday 04 June 2009 22:38:53 Michael Snoyman wrote: I *do* know what Packed Decimal is; at my previous job, I actually had a whole Haskell library for parsing them. The only immediate suggestion that pops to mind is to use Int instead of Integer (Int uses regular 32- or 64-bit integers, Integer uses arbitrary precision integers). If you send me a sample Packed Decimal file, I can test out your code and get a better feel for it that way. Good luck with those mainframes, they can be beasts sometimes. Have you had to parse EBCDIC yet? *That* was fun, manually copying all those character codes from some IBM web page... ;) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Fast code question
Hi Folks, I had to transform Packed Decimal file into csv format (does anybody here know what this Mainframe format is?). Because of the file size I could not do this on mainframe directly. So I've created simply program using ByteString. Generally I'm happy with my solution: pgm processes arroud 2MB/s on my pc, so my 3GB file was transformed in reasonable 30 min time. My question is: how to do this faster? {code} module Main where import qualified Data.ByteString.Lazy as B main = B.getContents = myPrint . myConcat . B.unpack myConcat = myConcat' 0 myConcat' :: (Integral a) = Integer - [a] - [Integer] myConcat' _ [] = [] myConcat' acc (x:xs) = case x `mod` 16 of 12 - (10*acc + (restOf . fromIntegral) x) : myConcat' 0 xs 13 - ((-10)*acc + (restOf . fromIntegral) x) : myConcat' 0 xs 15 - (10*acc + (restOf . fromIntegral) x) : myConcat' 0 xs 10 - fail $ show acc 11 - fail $ show acc 14 - fail $ show acc v - myConcat' (100*acc + (numberOf . fromIntegral) x) xs where restOf n = (n - 12) `div` 16 numberOf n = n - 6 * (n `div` 16) myPrint [] = return () myPrint xs = mapM_ myShow (take 14 xs) putStrLn myPrint (drop 14 xs) myShow x = (putStr . show) x putStr ; {code} I knew that csv output had to be 14 fields per line. Best, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Parsec float
On Saturday 30 May 2009 03:10:11 Bryan O'Sullivan wrote: On Fri, May 29, 2009 at 5:04 PM, Bartosz Wójcik bar...@sudety.it wrote: I don't undersdand what is being missed. Brevity. liftM f m1 = do { x1 - m1; return (f x1) } so liftM fromIntegral integer will result the same. Yes, and there's less code to read if you use liftM or $, hence fewer moving parts to understand. OK, thats clear. BTW: reading RWH I could not memorize what those liftM funtions meant. Best, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Parsec float
On Friday 29 May 2009 08:34:36 you wrote: myfloat = try (do{ symbol -; n - float; return (negate n) }) | try float | do { i-integer; return(fromIntegral i) } Thank you, this is an easy and nice solution. I've made it a bit prettier optically: myFloat = try (symbol - float = return . negate) | try float | (integer = return . fromIntegral) Best regards, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Parsec float
On Friday 29 May 2009 22:10:51 Bryan O'Sullivan wrote: myFloat = try (symbol - float = return . negate) | try float | (integer = return . fromIntegral) Any time you see = return ., something is being missed. Use liftM or $ instead, i.e. fromIntegral $ integer instead of integer = return . fromIntegral. I don't undersdand what is being missed. liftM f m1 = do { x1 - m1; return (f x1) } so liftM fromIntegral integer will result the same. Is it then not just a convenience? Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Parsec float
Hi Everybody (especially Parsec Creator), is there any reason why float parses only positive numbers? I find following defition: float = lexeme floating ? float floating= do{ n - decimal ; fractExponent n } If floating was defined like floating= do{ n - integer ... or floating= do{ n - int ... instead then it would parse negative ones as well. Best regards, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] installing Sqlite3 driver for windows
I've installed recently hsdc-sqlit3 on my Windows. I remember it was enough to copy dll to system32, header .h to somewhere and key in path to both to cabal file. Then usual stuff with setup. It worked and I managed to access DB. best, Bartek On Thursday 23 April 2009 03:13:38 Michael P Mossey wrote: I'm working from Real World Haskell, trying to install HDBC and the Sqlite3 driver on Windows XP. It was easy enough to use Cabal to install HDBC. However, for the Sqlite3 driver things get fuzzy. I downloaded hdbc-sqlite3_2.1.0.0.zip, but don't know what I'm supposed to do with it. Also, it wasn't clear what to do with the sqlite3.dll file. On this page http://software.complete.org/software/wiki/hdbc/FrequentlyAskedQuestions it seems to imply you need to put it in 'gch --print-libdir'\include and %windir%\system32 but that page is really about building the driver from source. Maybe it only needs to go in the system32 directory. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Employment
On Monday 19 January 2009 23:26:09 Sittampalam, Ganesh wrote: We (Credit Suisse) have Haskell developers in both London and NY, although the page only listed NY (I've now corrected it). If CS had Haskell positions in Wroclaw, Poland I'd apply for it! Best, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Windows vs. Linux x64
On Wednesday 26 November 2008 02:16:26 John Meacham wrote: On Tue, Nov 25, 2008 at 09:39:35PM +0100, Ketil Malde wrote: This corresponds to my experiences - 64 bits is slower, something I've ascribed to the cost of increased pointer size. ghc unfortunatly also uses 64 bit integers when in 64 bit mode, so the cost paid is increased due to that as well, Also since each math instruction needs an extra byte telling it to work on 64 bit data so the code is less dense. I've done little exeriment to confirm this. Created simple pgm and ran it with +RTS -s option on couple different harwareOS configurations. main = (putStrLn . show . head . drop 50) prim divides d n = rem n d == 0 ldf' :: (Integral a) = [a] - a - a ldf' (k:ks) n | divides k n = k | k^2 n = n | otherwise = ldf' ks n prim = filter (\x - ldf' (2:prim) x == x) [3..] Results of experiment: Win32 Core2Duo 1.8GHz 1GB RAM 17 Mb total memory in use MUT time 56.97s ( 57.02s elapsed) %GC time 0.5% Win32 Core2Duo 2.2GHz 2GB RAM 17 Mb total memory in use MUT time 57.44s ( 57.53s elapsed) %GC time 0.7% (0.8% elapsed) Win32 P4 2.8GHz 1GB RAM 17 Mb total memory in use MUT time 171.64s (175.78s elapsed) %GC time 1.7% (1.5% elapsed) Linux64 Core2Duo 2.2GHz 2GB RAM 41 MB total memory in use (1 MB lost due to fragmentation) MUT time 68.26s ( 68.92s elapsed) %GC time 0.9% (1.1% elapsed) Linux32 Core2Duo 2.3GHz 4GB RAM 17 Mb total memory in use MUT time 51.77s ( 51.83s elapsed) %GC time 0.5% (0.6% elapsed) Experiment confirms your explanations. Also interesting how slow P4 is in comparison to C2D. Best and thanks. Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Windows vs. Linux x64
On Monday 24 November 2008 23:59:02 Don Stewart wrote: bartek: Hi Everybody, while working on my resent project I've noticed that my code seems to be faster under Windows than under Linux x64. Is Windows running in 32 bit? What gcc versions are you using on each system? Windows is 32 bit with GHC-6.8.3. Linux is 64 bit with GHC-6.10.1. Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Windows vs. Linux x64
Hi Everybody, while working on my resent project I've noticed that my code seems to be faster under Windows than under Linux x64. More exactly this was an AI game evaluator that ran on given parameters. There was no IO performed. I've run 3 lots of test on both systems and stored some figures. It was physicaly the same PC. 1st lot WinXP total time = 27.18 secs (1359 ticks @ 20 ms) total alloc = 5,788,242,604 bytes (excludes profiling overheads) Linux total time = 34.44 secs (1722 ticks @ 20 ms) total alloc = 11,897,757,176 bytes (excludes profiling overheads) 2nd lot WinXP total time = 63.96 secs (3198 ticks @ 20 ms) total alloc = 13,205,507,148 bytes (excludes profiling overheads) Linux total time = 80.76 secs (4038 ticks @ 20 ms) total alloc = 27,258,694,888 bytes (excludes profiling overheads) 3rd lot WinXP total time = 207.10 secs (10355 ticks @ 20 ms) total alloc = 44,982,716,780 bytes (excludes profiling overheads) Linux total time = 267.58 secs (13379 ticks @ 20 ms) total alloc = 92,307,482,416 bytes (excludes profiling overheads) I've used the same compile and runtime options for both. I've tried to run with -H option, but this didn't improve anything. Is this common behaviour? Does anybody know what can be the reason? regards, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Problem with directory-1.0.0.0
Hi Folks, I'm facing problem after I've reinstalled directory-1.0.0.0 (setup configure/build/install). Since then I cannot complie anything that needs this library. It fails with following messages: Preprocessing library haddock-2.4.0... Preprocessing executables for haddock-2.4.0... Building haddock-2.4.0... /usr/bin/ar: creating dist/build/libHShaddock-2.4.0.a Linking dist/build/haddock/haddock ... /usr/local/lib/ghc-6.8.2/libHSghc.a(Coverage.o): In function `scXR_info': (.text+0x17b7c): undefined reference to `directoryzm1zi0zi0zi0_SystemziDirectory_lvl29_closure' /usr/local/lib/ghc-6.8.2/libHSghc.a(Coverage.o): In function `s8xU_info': (.text+0x1792c): undefined reference to `directoryzm1zi0zi0zi0_SystemziDirectory_a43_info' /usr/local/lib/ghc-6.8.2/libHSghc.a(Coverage.o): In function `r7aC_closure': (.data+0xd18): undefined reference to `directoryzm1zi0zi0zi0_SystemziDirectory_a43_closure' collect2: ld returned 1 exit status Situation is following: Old directory-1.0.0.0 resides in /usr/local/lib/ghc-6.8.2/lib/directory-1.0.0.0. New one in /usr/local/lib/directory-1.0.0.0. Why new one doesn't work? How to force linker to use old one? Best, Bartek ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Problem with directory-1.0.0.0
OK, I've found package.conf file and updated there libraries manually. Why new one doesn't work I don't know though. If anyone can have an idea, it'd be helpful. best, Bartek On Thursday 13 November 2008 22:08:19 Bartosz Wójcik wrote: I'm facing problem after I've reinstalled directory-1.0.0.0 (setup configure/build/install). Since then I cannot complie anything that needs this library. It fails with following messages: Preprocessing library haddock-2.4.0... Preprocessing executables for haddock-2.4.0... Building haddock-2.4.0... /usr/bin/ar: creating dist/build/libHShaddock-2.4.0.a Situation is following: Old directory-1.0.0.0 resides in /usr/local/lib/ghc-6.8.2/lib/directory-1.0.0.0. New one in /usr/local/lib/directory-1.0.0.0. Why new one doesn't work? How to force linker to use old one? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell in Artificial Intelligence
Hi CC, you can find a word about possible usage of functional programming in AI in following paper: http://www.cs.chalmers.se/~rjmh/Papers/whyfp.html . Besides in HackageDB you can find separate category AI. I had pleasure also to write an AI of simple game (http://en.wikipedia.org/wiki/Paper_Soccer): http://hackage.haskell.org/cgi-bin/hackage-scripts/package/foo . Currently I'm working on AI of another game: http://www.educationallearninggames.com/how-to-play-pylos-game-rules.asp . It's not much though. rgds, Bartek On Friday 10 October 2008 20:45:43 Christos Chryssochoidis wrote: Greetings, I'm interested in doing a survey about the use of Haskell in the field of Artificial Intelligence. I searched in Google, and found in the HaskellWiki, at www.haskell.org/haskellwiki/Haskell_in_industry, two organizations that use Haskell and do work related to AI. Besides that, I haven't found much else. Could somebody from the Haskell community give me some pointer to a project or system related to AI that uses Haskell? Thank you very much in advance. - CC ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe