[Haskell-cafe] JSON Querry examples

2011-07-10 Thread Dmitri O.Kondratiev
Hi, I am trying to search known-in-advance fields in JSON object with unknown structure. It looks like Data.JSON2.Query is most appropriate for this task. Yet, I can not figure out how to use filters this package provides to filter JSON arrays and objects. Are there any end-to-end examples of

[Haskell-cafe] Using Acid-State for IPC?

2011-07-08 Thread Dmitri O.Kondratiev
Hi, I am wondering if Acid-State (http://hackage.haskell.org/package/acid-state) can be used to share data between processes running in different address spaces? For example, one demon system process (not thread!) periodically collects data from Web and stores it in a list. On regular intervals

[Haskell-cafe] Web Framework to Show Experimental Data

2011-07-07 Thread Dmitri O.Kondratiev
Hi! I am looking for the Haskell libraries to quickly create some Web Framework to Show Experimental Data. Please share your experience and ideas. What tools would you chose for such a framework: == Architecture There are several unsynchronized processes: 1) Finder - demon that periodically

Re: [Haskell-cafe] Web Framework to Show Experimental Data

2011-07-07 Thread Dmitri O.Kondratiev
] [ subject ] [ author ] On Thu, 2011-07-07 at 13:21 +0400, Dmitri O.Kondratiev wrote: 1) What to use for the Archive? Though input data is in JSON format, data generated from it is binary vectors. Not sure that CouchDB is a good choice in this case. What simple (Haskell lib + DB) combination

Re: [Haskell-cafe] Web Framework to Show Experimental Data

2011-07-07 Thread Dmitri O.Kondratiev
+0400, Dmitri O.Kondratiev wrote: 1) What to use for the Archive? Though input data is in JSON format, data generated from it is binary vectors. Not sure that CouchDB is a good choice in this case. What simple (Haskell lib + DB) combination one may advise that support concurrent read / write

Re: [Haskell-cafe] NLP libraries and tools?

2011-07-06 Thread Dmitri O.Kondratiev
Hi, Continuing my search of Haskell NLP tools and libs, I wonder if the following Haskell libraries exist (googling them does not help): 1) End of Sentence (EOS) Detection. Break text into a collection of meaningful sentences. 2) Part-of-Speech (POS) Tagging. Assign part-of-speech information to

Re: [Haskell-cafe] NLP libraries and tools?

2011-07-06 Thread Dmitri O.Kondratiev
On Wed, Jul 6, 2011 at 8:32 PM, wren ng thornton w...@freegeek.org wrote: On 7/6/11 9:27 AM, Dmitri O.Kondratiev wrote: Hi, Continuing my search of Haskell NLP tools and libs, I wonder if the following Haskell libraries exist (googling them does not help): 1) End of Sentence (EOS

[Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems

2011-07-04 Thread Dmitri O.Kondratiev
Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to

Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems

2011-07-04 Thread Dmitri O.Kondratiev
at 5:04 PM, Dmitri O.Kondratiev doko...@gmail.comwrote: Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could

Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems

2011-07-04 Thread Dmitri O.Kondratiev
. Now I got : GHCi, version 7.0.3 Great! Thanks! On Mon, Jul 4, 2011 at 9:12 AM, Dmitri O.Kondratiev doko...@gmail.comwrote: Adrien Haxaire adrien at adrienhaxaire.org wrote: I dropped the idea of installing Haskell Platform with synaptic. I installed it manually and I don't have any

[Haskell-cafe] NLP libraries and tools?

2011-07-01 Thread Dmitri O.Kondratiev
Hi, Please advise on NLP libraries similar to Natural Language Toolkit ( www.nltk.org) First of all I need: - tools to construct 'bag of words' ( http://en.wikipedia.org/wiki/Bag_of_words_model), which is a list of words in the article. - tools to prune common words, such as prepositions and

[Haskell-cafe] Twitter API?

2011-07-01 Thread Dmitri O.Kondratiev
Hi, Does anybody work with any Haskell Twitter API library? In particular supporting OAuth authentication? Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Twitter API?

2011-07-01 Thread Dmitri O.Kondratiev
On Fri, Jul 1, 2011 at 6:59 PM, Michael Snoyman mich...@snoyman.com wrote: On Fri, Jul 1, 2011 at 5:56 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: Hi, Does anybody work with any Haskell Twitter API library? In particular supporting OAuth authentication? Thanks! Hi, Horimi

Re: [Haskell-cafe] NLP libraries and tools?

2011-07-01 Thread Dmitri O.Kondratiev
On Fri, Jul 1, 2011 at 9:34 PM, Rogan Creswick cresw...@gmail.com wrote: On Fri, Jul 1, 2011 at 3:31 AM, Dmitri O.Kondratiev doko...@gmail.com wrote: First of all I need: ... - tools to construct 'bag of words' (http://en.wikipedia.org/wiki/Bag_of_words_model), which is a list of words

Re: [Haskell-cafe] NLP libraries and tools?

2011-07-01 Thread Dmitri O.Kondratiev
On Fri, Jul 1, 2011 at 11:58 PM, Rogan Creswick cresw...@gmail.com wrote: On Fri, Jul 1, 2011 at 12:38 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: On Fri, Jul 1, 2011 at 9:34 PM, Rogan Creswick cresw...@gmail.com wrote: On Fri, Jul 1, 2011 at 3:31 AM, Dmitri O.Kondratiev doko

[Haskell-cafe] Graph diagram tools?

2011-06-22 Thread Dmitri O.Kondratiev
Hi, I am looking for Haskell library to create graph diagrams in png or similar formats. Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Conditional IO ?

2011-06-20 Thread Dmitri O.Kondratiev
Hi, What is right way to do conditional IO? For example, I need to write to file errors only in case they exist, otherwise my function should do nothing: handleParseErrors errors | (not . null) errors = writeFile parse-errors.txt (show errors) | otherwise = ? What should be an 'otherwise'

Re: [Haskell-cafe] Conditional IO ?

2011-06-20 Thread Dmitri O.Kondratiev
that eliminates the else case for conditional IO: http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Monad.html#v:when On Mon, Jun 20, 2011 at 4:00 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: Hi, What is right way to do conditional IO? For example, I need to write to file

Re: [Haskell-cafe] Text.CSV questions

2011-06-20 Thread Dmitri O.Kondratiev
, this is better, then printing empty error list. 2011/6/17 Dmitri O.Kondratiev doko...@gmail.com On Fri, Jun 17, 2011 at 1:04 PM, Vincent Hanquez t...@snarc.org wrote: On 06/17/2011 10:00 AM, Dmitri O.Kondratiev wrote: Hi, I try to parse csv file with Text.CSV, like this: import Text.CSV

[Haskell-cafe] Text report tools?

2011-06-20 Thread Dmitri O.Kondratiev
Hi, I am looking for an easy way to generate text reports. For starters I need a very simple report that may contain: - Some headers - Lists of text strings where each string can include instances of basic Haskell types. Each string should be printed on a separate line (terminated with LF). Do I

Re: [Haskell-cafe] Simple CSV parser?

2011-06-17 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 2:37 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Thu, 16 Jun 2011, Felipe Almeida Lessa wrote: [1] http://hackage.haskell.org/**package/bytestring-csvhttp://hackage.haskell.org/package/bytestring-csv [2]

[Haskell-cafe] Text.CSV questions

2011-06-17 Thread Dmitri O.Kondratiev
Hi, I try to parse csv file with Text.CSV, like this: import Text.CSV import System main = do [inpFileName] - getArgs putStrLn (Parsing ++inpFileName++...) let result = parseCSVFromFile inpFileName print result === As a result I get: No instance for (Show

Re: [Haskell-cafe] Text.CSV questions

2011-06-17 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 1:04 PM, Vincent Hanquez t...@snarc.org wrote: On 06/17/2011 10:00 AM, Dmitri O.Kondratiev wrote: Hi, I try to parse csv file with Text.CSV, like this: import Text.CSV import System main = do [inpFileName] - getArgs putStrLn (Parsing ++inpFileName

[Haskell-cafe] Win32: cabal install --prefix=$HOME --user ?

2011-06-16 Thread Dmitri O.Kondratiev
On win32 cabal install --prefix=$HOME --user fails: cabal install --prefix=$HOME --user Resolving dependencies... Configuring split-0.1.4... cabal: expected an absolute directory name for --prefix: $HOME cabal: Error: some packages failed to install: split-0.1.4 failed during the configure step.

[Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Dmitri O.Kondratiev
Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values and values are keys of the first one. Something like: transMap:: (Ord k, Ord a) = Map k a - Map a k Does such function exist? Thanks!

Re: [Haskell-cafe] Data.Map: Values to keys and keys to values

2011-06-16 Thread Dmitri O.Kondratiev
On Thu, Jun 16, 2011 at 5:38 PM, Johan Tibell johan.tib...@gmail.comwrote: On Thu, Jun 16, 2011 at 3:01 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: Hi, Data.Map has many great functions, yet I could not find the one that allows from one map create another map where keys are values

Re: [Haskell-cafe] Win32: cabal install --prefix=$HOME --user ?

2011-06-16 Thread Dmitri O.Kondratiev
On Thu, Jun 16, 2011 at 6:18 PM, Ryan Yates fryguy...@gmail.com wrote: There is a nice table in the cabal docs that explains how prefix gets used: http://www.haskell.org/ghc/docs/7.0.4/html/Cabal/builders.html#simple-paths For Vista and above C:\Documents and settings\myusername\ is

[Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
Hi, This time I am looking for a simple CSV parser that supports commas and quotes. I have no time now to learn Parsec, so I hope to find something simple and easy to use. Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 1:27 AM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Thu, Jun 16, 2011 at 6:21 PM, Dmitri O.Kondratiev doko...@gmail.com wrote: This time I am looking for a simple CSV parser that supports commas and quotes. I have no time now to learn Parsec, so I hope

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 1:33 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: How could it miss my lovely package named spreadsheet? It provides a lazy parser. Installing spreadsheet: cabal install Resolving dependencies... cabal: cannot configure explicit-exception-0.1.6. It

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 2:05 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: How to make cabal install all the dependencies? I couldn't find this in the docs at: http://www.haskell.org/haskellwiki/Cabal-Install Usually, 'cabal

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 2:13 AM, Dmitri O.Kondratiev doko...@gmail.comwrote: On Fri, Jun 17, 2011 at 2:05 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: How to make cabal install all the dependencies? I couldn't find

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Dmitri O.Kondratiev
On Fri, Jun 17, 2011 at 2:27 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: I see. I had fixed the problem locally long time ago, but somehow missed upload to Hackage. Try the updated package, please. Ok great! Installed (with some warnings, see below), thank you! I'll try it

Re: [Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-15 Thread Dmitri O.Kondratiev
Hi, Yitz! Your example puts scattered around pieces in place, thanks a lot! On Wed, Jun 15, 2011 at 9:49 AM, Yitzchak Gale g...@sefer.org wrote: Dmitri O.Kondratiev wrote: It would also help to see a simple example of parsing 10/11/2009 7:04:28 PM to time and date objects. Let's assume

Re: [Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-15 Thread Dmitri O.Kondratiev
' function? 3) How to convert UTCTime to Data.Time.Calendar.Day and back to UTCTime? Thanks! On Wed, Jun 15, 2011 at 12:55 PM, Dmitri O.Kondratiev doko...@gmail.comwrote: Hi, Yitz! Your example puts scattered around pieces in place, thanks a lot! On Wed, Jun 15, 2011 at 9:49 AM, Yitzchak Gale g

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-15 Thread Dmitri O.Kondratiev
*Ketil Malde* ketil at malde.org haskell-cafe%40haskell.org?Subject=Re%3A%20%5BHaskell-cafe%5D%20Best%20platform%20for%20development%20with%20GHC%3FIn-Reply-To=%3C8739jb60hv.fsf%40malde.org%3E writes: I use Ubuntu. Most stuff is fairly up-to-date, but even with six-month releases, it's lagging

[Haskell-cafe] Simple string tokenizer?

2011-06-15 Thread Dmitri O.Kondratiev
Sorry if this question was asked billions of times already, but I can not find a simple string tokenizer. All I need is to split a line in chunks at specified delimiter such as (,), nothing more. Don't want to write it myself for two reasons: 1) have to write lots of other code in very short time

Re: [Haskell-cafe] Simple string tokenizer?

2011-06-15 Thread Dmitri O.Kondratiev
/archive/split/0.1.4/doc/html/Data-List-Split.html On Jun 15, 2011, at 12:21 PM, Dmitri O.Kondratiev wrote: Sorry if this question was asked billions of times already, but I can not find a simple string tokenizer. All I need is to split a line in chunks at specified delimiter such as (,), nothing

[Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-14 Thread Dmitri O.Kondratiev
It looks like GHC, 7.0.3 Haskell Hierarchical Libraries documentation generated for Win32, that goes with Haskell Platform installation package, does not have a section on Data.Time module. How can that be? I need to convert a string of the form ,10/11/2009 7:04:28 PM to Haskell type that can be

Re: [Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-14 Thread Dmitri O.Kondratiev
Sorry for typo - I need subtract dates (no 'abstracting') : On Tue, Jun 14, 2011 at 3:49 PM, Dmitri O.Kondratiev doko...@gmail.comwrote: It looks like GHC, 7.0.3 Haskell Hierarchical Libraries documentation generated for Win32, that goes with Haskell Platform installation package, does

Re: [Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-14 Thread Dmitri O.Kondratiev
at http://hackage.haskell.org/packages/archive/time/1.2.0.5/doc/html/Data-Time-Format.html ? Is it enough? 2011/6/14 Dmitri O.Kondratiev doko...@gmail.com Sorry for typo - I need subtract dates (no 'abstracting') : On Tue, Jun 14, 2011 at 3:49 PM, Dmitri O.Kondratiev doko...@gmail.comwrote

Re: [Haskell-cafe] GHC 7.0.3 / Win32: Data.Time library?

2011-06-14 Thread Dmitri O.Kondratiev
It would also help to see a simple example of parsing 10/11/2009 7:04:28 PM to time and date objects. On Tue, Jun 14, 2011 at 4:41 PM, Dmitri O.Kondratiev doko...@gmail.comwrote: Yes, thanks. I just wonder why documentation for this particular module (Data.Time) is missing from GHC, 7.0.3

[Haskell-cafe] Please help : Data.Time.Format parseTime

2011-06-14 Thread Dmitri O.Kondratiev
I am trying to convert data string to time: import Data.Time import Data.Time.Format import Locale ds = 10/11/2009 7:04:28 PM t = parseTime defaultTimeLocale %D %H:%M:%S %p ds :: Maybe UTCTime and get Nothing. What is wrong? Thanks ! Dmitri. ___

Re: [Haskell-cafe] Please help : Data.Time.Format parseTime

2011-06-14 Thread Dmitri O.Kondratiev
On Wed, 15 Jun 2011 00:33:56 +0400 Dmitri O.Kondratiev doko...@gmail.com wrote: I am trying to convert data string to time: import Data.Time import Data.Time.Format import Locale ds = 10/11/2009 7:04:28 PM t = parseTime defaultTimeLocale %D %H:%M:%S %p ds :: Maybe UTCTime

[Haskell-cafe] Best platform for development with GHC?

2011-06-14 Thread Dmitri O.Kondratiev
Which platform - Mac OS X, Linux or Win32 is best for development with GHC today? How are things with Ubuntu? It was quite a while already that I used Haskell on Linux. Today I have to code on Win32 and Mac OS X. Installing extra libraries caused most of the pains for me on Win32 - for example

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-14 Thread Dmitri O.Kondratiev
On Wed, Jun 15, 2011 at 2:34 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Wed, 15 Jun 2011, Dmitri O.Kondratiev wrote: Which platform - Mac OS X, Linux or Win32 is best for development with GHC today? How are things with Ubuntu? It was quite a while already that I used

Re: [Haskell-cafe] Data.List / Map: simple serialization?

2011-06-10 Thread Dmitri O.Kondratiev
On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke batterseapo...@hotmail.com wrote: If you want plain text serialization, writeFile output.txt . show and fmap read (readFile output.txt) should suffice... Max This code works: main = do let xss = [[1,2,3],[4,5,6],[7,8],[9]]

Re: [Haskell-cafe] Data.List / Map: simple serialization?

2011-06-10 Thread Dmitri O.Kondratiev
On Fri, Jun 10, 2011 at 4:13 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Friday 10 June 2011, 13:49:23, Dmitri O.Kondratiev wrote: On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke batterseapo...@hotmail.com wrote: If you want plain text serialization, writeFile

Re: [Haskell-cafe] Data.List / Map: simple serialization?

2011-06-10 Thread Dmitri O.Kondratiev
Thanks for the excellent explanation! : On Fri, Jun 10, 2011 at 4:49 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Friday 10 June 2011, 14:25:59, Dmitri O.Kondratiev wrote: Two questions: 1) Why to use 'fmap' at all if a complete file is read in a single line of text

[Haskell-cafe] Installing Gtk2Hs on Win32

2011-06-10 Thread Dmitri O.Kondratiev
Please help to find pre-compiled binary libraries of Gtk+ for Win32. Gtk2Hs insatll instructions at: http://code.haskell.org/gtk2hs/INSTALL tells us: [quote] Building on Windows Installation on Windows is nearly as easy as on Unix platforms. However, you need to download

[Haskell-cafe] Errors installing 'Haskell Charts'

2011-06-10 Thread Dmitri O.Kondratiev
I am trying to install HaskellCharts at: http://dockerz.net/twd/HaskellCharts Running: cabal update cabal install gtk2hs-buildtools cabal install gtk cabal install chart goes well untill 'cabal install chart' which results in: C:\wks\RCAcabal install chart Resolving

Re: [Haskell-cafe] Errors installing 'Haskell Charts'

2011-06-10 Thread Dmitri O.Kondratiev
Trying to install the same stuff on Mac OS X 10.6.7 I get problems both with gtk2hs-buildtools and pkg-config, (see below). Any ideas where to get pre-built glib and pkg-config both for Win32 and Mac OS X? == Problems on Mac OS X with gtk2hs-buildtools : cabal install gtk Resolving

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Dmitri O.Kondratiev
On Sat, Jun 4, 2011 at 1:56 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 4 June 2011 07:11, Dmitri O.Kondratiev doko...@gmail.com wrote: So, if I got this right, I should run: 'cabal install -fbuildExamples gnuplot' from gnuplot source root folder? You can either get

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Dmitri O.Kondratiev
On Sat, Jun 11, 2011 at 12:54 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Sat, 11 Jun 2011, Dmitri O.Kondratiev wrote: That's what I get (see below). What else should I do to install gnuplot? ~/wks/haskell-wks/gnuplot/gnuplot-0.4.2/srcghc -v Demo.hs Do you really

[Haskell-cafe] Generating simple histograms in png format?

2011-06-10 Thread Dmitri O.Kondratiev
I am looking for platform-independent library to generate simple histograms in png format. Does such thing exist? Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Data.List / Map: simple serialization?

2011-06-09 Thread Dmitri O.Kondratiev
Hello, Please advise on existing serialization libraries. I need a simple way to serialize Data.List and Data.Map to plain text files. Thanks, Dmitri ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Data.List / Map: simple serialization?

2011-06-09 Thread Dmitri O.Kondratiev
from it another list, save it to text file, etc. I wonder how Haskell will distribute memory between the buffer for sequential element access (list elements, map tree nodes) and memory for computation while reading in list, Data.Map from file? On 9 June 2011 08:23, Dmitri O.Kondratiev doko

Re: [Haskell-cafe] Data.List / Map: simple serialization?

2011-06-09 Thread Dmitri O.Kondratiev
On Thu, Jun 9, 2011 at 7:23 PM, Max Bolingbroke batterseapo...@hotmail.comwrote: Hi Dmitri, On 9 June 2011 09:13, Dmitri O.Kondratiev doko...@gmail.com wrote: I wonder how Haskell will distribute memory between the buffer for sequential element access (list elements, map tree nodes

[Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Dmitri O.Kondratiev
Hello, Please advise on Haskell 2D plotting libraries to generate plots, histograms, power spectra, bar charts, errorcharts, scatterplots, etc, similar to what Matplotlib does: http://matplotlib.sourceforge.net/ Thanks! Dmitri ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Dmitri O.Kondratiev
On Fri, Jun 3, 2011 at 3:44 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 3 June 2011 21:39, Dmitri O.Kondratiev doko...@gmail.com wrote: Hello, Please advise on Haskell 2D plotting libraries to generate plots, histograms, power spectra, bar charts, errorcharts

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Dmitri O.Kondratiev
On Sat, Jun 4, 2011 at 12:55 AM, Henning Thielemann schlepp...@henning-thielemann.de wrote: Malcolm Wallace schrieb: I tried gnuplot: Demo.hs:25:18: Could not find module `Paths_gnuplot': Use -v to see a list of the files searched for. Failed, modules loaded: none.

Re: [Haskell-cafe] Please help with double recursion

2011-05-30 Thread Dmitri O.Kondratiev
On Mon, May 30, 2011 at 11:26 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote: On 28/05/2011, at 11:47 PM, Dmitri O.Kondratiev wrote: Hello, I am trying to solve a simple task, but got stuck with double recursion - for some reason not all list elements get processed. Please advice

[Haskell-cafe] Detecting overlay-ed signal patterns

2011-05-30 Thread Dmitri O.Kondratiev
Hello, I am trying to detect signal patterns in a system with numerous signals overlaying each other in time. I am aware that there is a whole class of problem solving methods for this task, yet trying my own algorithm, that may be wrong of course :) Next I use a simple example to describe the

[Haskell-cafe] Please help with double recursion

2011-05-28 Thread Dmitri O.Kondratiev
Hello, I am trying to solve a simple task, but got stuck with double recursion - for some reason not all list elements get processed. Please advice on a simple solution, using plane old recursion :) *** Task: From a sequence of chars build all possible chains where each chain consists of chars

[Haskell-cafe] Fwd: Please help with double recursion

2011-05-28 Thread Dmitri O.Kondratiev
For some reason, my previous message got truncated, so I repeat it in hope that it will come complete this time: -- Forwarded message -- From: Dmitri O.Kondratiev doko...@gmail.com Date: Sat, May 28, 2011 at 3:47 PM Subject: Please help with double recursion To: haskell-cafe

Re: [Haskell-cafe] Please help with double recursion

2011-05-28 Thread Dmitri O.Kondratiev
On Sat, May 28, 2011 at 3:57 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Saturday 28 May 2011 13:47:10, Dmitri O.Kondratiev wrote: Hello, I am trying to solve a simple task, but got stuck with double recursion - for some reason not all list elements get processed

[Haskell-cafe] Haskell on-line judge for Programming Challenges / Contests ?

2011-04-14 Thread Dmitri O.Kondratiev
Hello, I am looking for a site providing on-line automatic judge for Programming Challenges that can be coded in Haskell. For example this site: http://www.programming-challenges.com provides lots of interesting programming provlems: http://www.programming-challenges.com/pg.php?page=index Yet,

[Haskell-cafe] Programming Chalenges: The 3n+1 problem

2011-04-14 Thread Dmitri O.Kondratiev
3n+1 is the first, warm-up problem at Programming Chalenges site: http://www.programming-challenges.com/pg.php?page=downloadproblemprobid=110101format=html (This problem illustrates Collatz conjecture: http://en.wikipedia.org/wiki/3n_%2B_1#Program_to_calculate_Collatz_sequences ) As long as the

[Haskell-cafe] Haskell on-line judge for Programming Challenges / Contests ?

2011-04-14 Thread Dmitri O.Kondratiev
Angel de Vicente wrote: On 14/04/11 10:29, Dmitri O.Kondratiev wrote: * I am looking for a site providing on-line automatic judge for ** Programming Challenges that can be coded in Haskell. ** For example this site: ** http://www.programming-challenges.com ** provides lots of interesting

Re: [Haskell-cafe] Programming Chalenges: The 3n+1 problem

2011-04-14 Thread Dmitri O.Kondratiev
Thanks, Felipe! Sure I will try to code solution myself. Doing it all by yourself is the main fun of everything, isn't it? I was just asking about the *idea* of implementing cache in Haskell, in general, not just in this case only. On Thu, Apr 14, 2011 at 3:11 PM, Felipe Almeida Lessa

Re: [Haskell-cafe] Programming Chalenges: The 3n+1 problem

2011-04-14 Thread Dmitri O.Kondratiev
Thanks, everybody! Your feedback is a great food for my mind (as Lewis Carroll once wrote :) When asking how to implement cache in Haskell I was hopping that there exists some solution without using Data.Array, more functional approach, if I may say so ... I must be wrong, though (need more time

[Haskell-cafe] Tools to make tidy HTML

2010-05-21 Thread Dmitri O.Kondratiev
Hello! Please advise haskell libraries similar to convert real-world HTML to well-formed XML. I need something similat to HTML Tidy library: http://tidy.sourceforge.net/ Thanks! Dmitri ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] How to define Show [MyType] ?

2008-12-06 Thread Dmitri O.Kondratiev
characters \ come from in this case? 2)How showList function 'removes' characters \ from the output? What magic goes behind the scenes here? --} Thanks! Dmitri On 12/6/08, Daniel Fischer [EMAIL PROTECTED] wrote: Am Samstag, 6. Dezember 2008 00:13 schrieb Dmitri O.Kondratiev: Thanks everybody for your

Re: [Haskell-cafe] How to define Show [MyType] ?

2008-12-05 Thread Dmitri O.Kondratiev
On Fri, Dec 5, 2008 at 1:29 AM, Martijn van Steenbergen [EMAIL PROTECTED] wrote: Dmitri O.Kondratiev wrote: -- How to define Show [MyType] ? Define instance Show MyType and implement not only show (for 1 value of MyType) but also showList, which Show provides as well. You can do all

[Haskell-cafe] How to define Show [MyType] ?

2008-12-04 Thread Dmitri O.Kondratiev
I am trying to define instance Show[MyType] so show (x:xs :: MyType) would return a single string where substrings corresponding to list elements will be separated by \n. This would allow pretty printing of MyType list in several lines instead of one, as default Show does for lists. For example:

[Haskell-cafe] SOEGraphics in GHC?

2008-11-24 Thread Dmitri O.Kondratiev
Please help, to locate in GHC distribution SOEGraphics library from Paul Hudak, book The Haskell School of Expression (http://www.haskell.org/soe/ ) Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] How to use Unicode strings?

2008-11-22 Thread Dmitri O.Kondratiev
Please advise how to write Unicode string, so this example would work: main = do putStrLn Les signes orthographiques inclus les accents (aigus, grâve, circonflexe), le tréma, l'apostrophe, la cédille, le trait d'union et la majuscule. I get the following error: hello.hs:4:68: lexical error

Re: [Haskell-cafe] Newbie: Replacing substring?

2008-07-23 Thread Dmitri O.Kondratiev
? then new ++ loop rest -- yes: replace it else head str : loop (tail str) -- no: keep looking n = length old On Tue, Jul 22, 2008 at 8:21 PM, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: Roberto thanks! Shame on me, to post code without enough testing :( Yet

[Haskell-cafe] Newbie: Replacing substring?

2008-07-22 Thread Dmitri O.Kondratiev
A few simple questions: What standard library function can be used to replace substring in a string (or sub-list in a list) ? I wrote my own version, please criticize: -- replace all occurances of 123 with 58 in a string: test = replStr abc123def123gh123ikl 123 58 {-- In a string replace all

Re: [Haskell-cafe] Newbie: Replacing substring?

2008-07-22 Thread Dmitri O.Kondratiev
PROTECTED] wrote: Dmitri O.Kondratiev wrote: I wrote my own version, please criticize: -- replace all occurances of 123 with 58 in a string: test = replStr abc123def123gh123ikl 123 58 This is a tricky problem: first of all, you fail your own test! ;-) *Main test abc58def58gh58ikl58

[Haskell-cafe] win32: haddock: internal Haddock or GHC error?

2008-07-16 Thread Dmitri O.Kondratiev
Using GHC 6.8.2 and haddock 2.0.0.0. in WinXP (SP3) I am trying to follow instructions from How to write a Haskell programhttp://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program#Build_some_haddock_documentation . Everything goes well, until I try to generate html documentation for the

Re: [Haskell-cafe] win32: haddock: internal Haddock or GHC error?

2008-07-16 Thread Dmitri O.Kondratiev
Neil, Thanks for the quick response! I got haddock from its site ( http://haskell.org/haddock/#Download )using the link that says: Windows: a binary distribution http://haskell.org/haddock/dist/haddock-2.0.0.0-Win32.zip is available, just unzip and go. My configuration: C:\wks\haqrunhaskell

Re: [Haskell-cafe] Newbie: Appending arrays?

2008-07-11 Thread Dmitri O.Kondratiev
. This is usually fairly efficient for most applications. By the way, depending on the type of the data you're putting into these arrays, Data.ByteString might be a good choice as well. On Thu, Jul 10, 2008 at 12:12 PM, Felipe Lessa [EMAIL PROTECTED] wrote: 2008/7/10 Dmitri O.Kondratiev [EMAIL

Re: [Haskell-cafe] Newbie: Appending arrays?

2008-07-11 Thread Dmitri O.Kondratiev
How does Data.Sequence http://www.haskell.org/ghc/docs/latest/html/libraries/containers/Data-Sequence.html compares with ArrayRef for appending and accessing arrays efficiently ? On Fri, Jul 11, 2008 at 4:58 PM, Chaddaï Fouché [EMAIL PROTECTED] wrote: 2008/7/11 Dmitri O.Kondratiev [EMAIL

Re: [Haskell-cafe] Newbie: Appending arrays?

2008-07-11 Thread Dmitri O.Kondratiev
later. That's why I need a collection both indexed and able to extend also. I think that Data.Sequence will do for the task, don't you think? On Fri, Jul 11, 2008 at 7:23 PM, Chaddaï Fouché [EMAIL PROTECTED] wrote: 2008/7/11 Dmitri O.Kondratiev [EMAIL PROTECTED]: How does Data.Sequence http

Re: [Haskell-cafe] Newbie: Appending arrays?

2008-07-11 Thread Dmitri O.Kondratiev
Thanks for your help, guys! I like simple solutions most of all :) On Fri, Jul 11, 2008 at 9:44 PM, Reid Barton [EMAIL PROTECTED] wrote: This doesn't require any fancy data structures. Instead store this as a list of pairs [([10,6,80,25,6,7], 5), ...] and it'll be easy to write a

[Haskell-cafe] Newbie: Appending arrays?

2008-07-10 Thread Dmitri O.Kondratiev
What is the best way to extend array? I would use a list instead of array as it is easy to append, but need to have random access to its elements later. So in fact I need to start with an integer array of size 1. Next I may need to add new elements to this array or modify values of the existing

[Haskell-cafe] Newbie Q: Overloading and type classes

2008-06-07 Thread Dmitri O.Kondratiev
{-- I try to define class Store that will group types implmenting different storage mechanisms . All types should support two functions: 1) put (key, value) pair into storage 2) get value from storage corresponding to the given key As an example I start with the following storage types: --} --

Re: [Haskell-cafe] Newbie Q: Overloading and type classes

2008-06-07 Thread Dmitri O.Kondratiev
{-- Thanks! Yes, you got it right - I want to make explicit the fact that the type s depends on k and v. So I followed your advice and used the most simple way to do what I need: --} class Store s where put :: Eq k = (k, v) - s k v - s k v get :: Eq k = k - s k v - Maybe v instance Store

Re: [Haskell-cafe] Newbie: State monad example questions

2008-05-21 Thread Dmitri O.Kondratiev
] wrote: 2008/5/19 Dmitri O.Kondratiev [EMAIL PROTECTED]: I am trying to understand State monad example15 at: http://www.haskell.org/all_about_monads/html/statemonad.html Hi Dmitri, I'm not sure you need to understand everything about Monad and do-notation to use the State Monad. So I

Re: [Haskell-cafe] Newbie: State monad example questions

2008-05-21 Thread Dmitri O.Kondratiev
: On Wed, May 21, 2008 at 8:42 AM, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: So let's start with fundamental and most intriguing (to me) things: getAny :: (Random a) = State StdGen a getAny = do g - get -- magically get the current StdGen First line above declares a data type: State

Re: [Haskell-cafe] Newbie: State monad example questions

2008-05-21 Thread Dmitri O.Kondratiev
Jules, Stupid question, please bear with me: x :: Int -- x declared, but not constructed x = 1 -- x constructed s1 :: State StdGen a -- s1 declared, yes, but why s1 is *also already constructed* ? On Wed, May 21, 2008 at 6:54 PM, Jules Bean [EMAIL PROTECTED] wrote: Dmitri O.Kondratiev wrote

Re: [Haskell-cafe] Newbie: State monad example questions

2008-05-21 Thread Dmitri O.Kondratiev
a random value. --} On Wed, May 21, 2008 at 10:31 PM, Olivier Boudry [EMAIL PROTECTED] wrote: On Wed, May 21, 2008 at 11:10 AM, Dmitri O.Kondratiev [EMAIL PROTECTED] wrote: But how will 'g1' actually get delivered from 'makeRandomValueST g1' to invocation of 'getAny' I don't yet understand

Re: [Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-25 Thread Dmitri O.Kondratiev
! Dima On 7/23/07, Duncan Coutts [EMAIL PROTECTED] wrote: On Fri, 2007-07-20 at 13:47 +0400, Dmitri O.Kondratiev wrote: Oliver, thanks! I tried that, yet have some problems. Questions: 1) Should I ignore autoreconf errors? I've never managed to get autoconf working on windows. I always

[Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-20 Thread Dmitri O.Kondratiev
Olivier Boudry [EMAIL PROTECTED] wrote: (Wed Jul 18 11:56:56 EDT 2007) Hi Dmitri, I built gtk2hs on Windows with GHC 6.6.1 and gtk2hs-0.9.11. Here's are the steps that worked for me: (not sure I didn't missed some) First you need to install a GTK+ development package for windows. I think mine

[Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-18 Thread Dmitri O.Kondratiev
*Andrea Rossato* wrote: haskell-cafe%40haskell.org?Subject=%5BHaskell-cafe%5D%20GHC%206.6.1%3A%20Where%20is%20Graphics.SOE%20%3FIn-Reply-To=53396d9e0707170752q6769729es68d214639b69a789%40mail.gmail.com Hi! as far as I know what you are looking for (Graphics.SOE) is part of HGL. Have a look

Re: [Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-18 Thread Dmitri O.Kondratiev
On 7/17/07, Malte Milatz [EMAIL PROTECTED] wrote: Dmitri O.Kondratiev: It looks like Graphics.SOE does not anymore exist in GHC 6.6.1. Where one can get it or what to use instead of it? You may try Gtk2Hs, which includes an implementation of SOE, called Graphics.SOE.Gtk. (It works

[Haskell-cafe] GHC 6.6.1: Where is Graphics.SOE ?

2007-07-17 Thread Dmitri O.Kondratiev
I am trying to use Graphics.SOE (that was present at least in GHC 6.4) to go through Simple Graphics examples as described in Pail Hudak book The Haskell School of Expression. Learning functional programming through multimedia. It looks like Graphics.SOE does not anymore exist in GHC 6.6.1.

[Haskell-cafe] Newbie Q: Monad 'fail' and 'error'

2007-06-06 Thread Dmitri O.Kondratiev
Monad class contains declaration *fail* :: String - m a and provides default implementation for 'fail' as: fail s = error s On the other hand Prelude defines: * error* :: String - a which stops execution and displays an error message. Questions: 1) What value and type 'error' actually

Re: [Haskell-cafe] Newbie Q: Monad 'fail' and 'error'

2007-06-06 Thread Dmitri O.Kondratiev
? On 6/6/07, Tillmann Rendel [EMAIL PROTECTED] wrote: Dmitri O.Kondratiev wrote: Monad class contains declaration *fail* :: String - m a and provides default implementation for 'fail' as: fail s = error s On the other hand Prelude defines: * error* :: String - a which stops execution

  1   2   >