Re: [Haskell] Discrete event simulation

2005-05-29 Thread Bulat Ziganshin
Hello Bruno, Monday, May 30, 2005, 3:13:08 AM, you wrote: BMA I'm wondering if there is work done about discrete event simulation in BMA functional languages, and more specifically, Haskell DSLs. Any pointers? FP language Erlang was created especially to program phone exchanges which is close

Re[2]: [Haskell] Dynamic binding

2005-06-23 Thread Bulat Ziganshin
Hello Andrew, Thursday, June 23, 2005, 5:38:03 AM, you wrote: AW To handle the problem of drawing all shapes, in c++, I would have a list AW of shape pointers: AW struct shape{ virtual void draw(...);}; AW struct circle : public shape {...}; AW struct square : public shape {...}; AW

Re[2]: [Haskell] line-based interactive program

2005-07-07 Thread Bulat Ziganshin
Hello Christian, Thursday, July 07, 2005, 6:55:13 PM, you wrote: CM Could you also insert a prompt that is shown before the lines are read? CM (The first prompt seems to be tricky assuming line buffering ) import System.IO main = do hSetBuffering stdin LineBuffering hSetBuffering stdout

Re[2]: [Haskell] line-based interactive program

2005-07-09 Thread Bulat Ziganshin
Hello Andrew, Friday, July 08, 2005, 8:43:02 PM, you wrote: AP It is one thing to embrace lazy evaluation order, and another to embrace AP lazy IO (implemented using unsafeInterleaveIO). As a relative newcomer AP to Haskell, I got the impression that the interact style was always a AP hack,

Re[2]: [Haskell] line-based interactive program

2005-07-09 Thread Bulat Ziganshin
Hello Wolfgang, Friday, July 08, 2005, 11:55:48 PM, you wrote: WJ As part of my diploma thesis, I'm working on a small collection of modules WJ which provides safe I/O interleaving. The key point is to split the state of WJ the world since I/O on different parts of the world can be

Re[2]: [Haskell] line-based interactive program

2005-07-09 Thread Bulat Ziganshin
Hello Wolfgang, Saturday, July 09, 2005, 7:01:06 PM, you wrote: As part of my diploma thesis, I'm working on a small collection of modules which provides safe I/O interleaving. The key point is to split the state of the world since I/O on different parts of the world can be interleaved

Re: [Haskell] offside rule question

2005-07-18 Thread Bulat Ziganshin
Hello Frederik, Thursday, July 14, 2005, 4:09:02 AM, you wrote: FE But I don't understand how what I've written could be ambiguous. If I FE am inside a parenthesized expression, then I can't possibly start FE another let-clause. f = let a = (let b=1 in b) in a FE The fact that the compiler

Re[2]: [Haskell] Re: ST/STRef vs. IO/IORef

2005-08-05 Thread Bulat Ziganshin
Hello Till, Friday, August 05, 2005, 10:04:53 AM, you wrote: TMMonadState IOArray IOArray ST TMwithwith with TMFiniteMap unsafePerformIO MutArr TM safe yesyes no

Re: [Haskell] do notation and type synonym

2005-08-08 Thread Bulat Ziganshin
Hello mt, Sunday, August 07, 2005, 10:26:07 PM, you wrote: m check5 = do { 5 - m ; return 0 } i think the actual translation is: m = (\var - case var of 5 - return 0 _ - fail) where fail = Nothing for Maybe monad m second one: m is it possible to write

[Haskell] proposal about declaring language version and language extensions used in specific module

2005-08-09 Thread Bulat Ziganshin
Hello all. i have a proposal about declaring language version and language extensions used in specific module PROBLEM: 1) Haskell 2.0 may be slightly incompatible with Haskell 98. at least, new records extension will, afaik, lead to that H'98 (old) programs can't be compiled with Haskell 2.0

Re[2]: [Haskell] proposal about declaring language version and language extensions used in specific module

2005-08-10 Thread Bulat Ziganshin
Hello Ross, Wednesday, August 10, 2005, 4:24:53 AM, you wrote: RP On Tue, Aug 09, 2005 at 03:37:01PM -0700, John Meacham wrote: I thought there was talk of a standardized {-# LANGUAGE ... #-} pragma somewhere.. but I can't seem to find it. RP

Re[4]: [Haskell] proposal about declaring language version andlanguage extensions used in specific module

2005-08-10 Thread Bulat Ziganshin
Hello Simon, Wednesday, August 10, 2005, 6:27:45 PM, you wrote: SM The language declaration affects the grammar of the language, and even SM whether the source is preprocessed or not, so you can't put the SM declaration into the language itself. {-# LANGUAGE #-} is the right SM thing (and we

Re: [Haskell] pros and cons of static typing and side effects ?

2005-08-11 Thread Bulat Ziganshin
Hello mt, Thursday, August 11, 2005, 12:40:39 AM, you wrote: m [thnk 4 the previous answers !] m Good [morning, afternoon, night], m I try to better understand some things... maybe you can help me. m Id' like to know what are the pros and cons of (not) having static typing. m Same question for

Re: [Haskell] ANNOUNCE: fps -- fast packed strings

2005-08-25 Thread Bulat Ziganshin
Hello Donald, Thursday, August 25, 2005, 8:10:44 AM, you wrote: DBS I've cabalised the FastPackedString module from darcs, used in h4sh, as the DBS `fps' library. if you plan to support/improve this library, can you please: 1) add psniceq/pscmp to export list (with better names, smtg like

Re[2]: [Haskell] Realistic max size of GHC heap

2005-09-15 Thread Bulat Ziganshin
Hello Simon, Thursday, September 15, 2005, 2:42:44 PM, you wrote: of 16GB-32GB of real ram. I gather that GHC is close to being ported SM It'll be a good stress test for the GC, at least. There are no reasons SM in principle why you can't have a heap this big, but major collections SM are

Re[2]: [Haskell] Mixing monadic and non-monadic functions

2005-09-15 Thread Bulat Ziganshin
Hello Ben, Wednesday, September 14, 2005, 6:32:27 PM, you wrote: BRG do { ... ; ... borrow E ... ; ... } BRG is transformed into BRG do { ... ; x - E ; ... x ... ; ... } i strongly support this suggestion. actually, i suggest the same for dealing with references (IORef/MVar/...),

Re[2]: [Haskell] Mixing monadic and non-monadic functions

2005-09-15 Thread Bulat Ziganshin
Hello Lyle, Thursday, September 15, 2005, 10:50:30 PM, you wrote: z := *x + *y -- translated to { x' - readIORef x; y' - readIORef y; writeIORef z (x'+y') } LK Right, I realize my suggestion is the same as Ben's. I just prefer a LK more succinct notation, like special brackets instead

Re[2]: [Haskell] Mixing monadic and non-monadic functions

2005-09-16 Thread Bulat Ziganshin
Hello Sergey, Friday, September 16, 2005, 4:02:49 PM, you wrote: z := *x + *y -- translated to { x' - readIORef x; y' - readIORef y; writeIORef z (x'+y') } SZ I might be misunderstanding, but aren't we going to introduce evaluation SZ order for `+' in this case? of course. really, in

Re[2]: [Haskell] Mixing monadic and non-monadic functions

2005-09-16 Thread Bulat Ziganshin
Hello Wolfgang, Friday, September 16, 2005, 5:55:52 PM, you wrote: WJ strong argument against these proposals. One thing I like about Haskell is WJ that side-effects are strictly separated from evaluation so that there is no WJ such thing like an implicit evaluation order. like in assembler?

Re[4]: [Haskell] Mixing monadic and non-monadic functions

2005-09-16 Thread Bulat Ziganshin
Hello Udo, Friday, September 16, 2005, 7:19:49 PM, you wrote: do x - newIORef 0 y - newIORef 0 z - newIORef 0 z := *x + *y -- translated to { x' - readIORef x; y' - readIORef y; writeIORef z (x'+y') } US May I humbly suggest you explain what problem you are actually trying to

Re[2]: [Haskell] Haskell versus Lisp

2005-09-17 Thread Bulat Ziganshin
Hello Christopher, Saturday, September 17, 2005, 4:21:30 AM, you wrote: CD Scheme offers no way to provide an advance proof, but it still checks at CD execution time. ALL modern laguages check at least at execution time. but compile-time checking is much better, otherwise you need to check every

[Haskell] Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Bulat Ziganshin
Hello Stephane, Thursday, October 13, 2005, 11:24:30 AM, you wrote: SB As someone who is not an academic researcher and not a student in CS, SB I would like to express a personal opinion; we don't need a new SB standard. To me, Haskell needs more libraries, more users (which means SB more

[Haskell] Re[2]: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-14 Thread Bulat Ziganshin
Hello Sebastian, Thursday, October 13, 2005, 4:09:55 PM, you wrote: (I'm specifically interested in seeing SPJ's records proposal included, and a new module system). SS First of all I would like to urge the people who do end up working on SS this to seriously consider replacing H98's

Re: [Haskell] Writing large n-dim un-boxed array of Int32 quickly?

2005-10-31 Thread Bulat Ziganshin
Hello Rene, Monday, October 31, 2005, 11:13:30 AM, you wrote: RdV Hello, RdV I want to write a multi-dimensional unboxed arrary of Int32 to a file. (And RdV also read it back later). how about fileWriteBuf/fileReadBuf? -- Best regards, Bulatmailto:[EMAIL

Re[2]: [Haskell] Haskell users survey--please respond!

2005-11-10 Thread Bulat Ziganshin
Hello Tomasz, Wednesday, November 09, 2005, 3:09:46 PM, you wrote: Only 2% find fglasgow-exts useful??? TZ Only 2% consider it a tool or library. TZ I think that if John cares about getting reliable results, he should TZ take the results from this survey and prepare the next one already TZ

Re[2]: [Haskell] WASH-Problem was Re: Haskell users survey--please respond!

2005-11-10 Thread Bulat Ziganshin
Hello John, Wednesday, November 09, 2005, 1:40:13 PM, you wrote: BTW, is there a way to update my entry? I forgot to mention one of the best tools I use - Parsec :-( JH I'm afraid not, because there's no record of which is YOUR entry. I JH suppose I could have asked for an email address, but

Re[2]: [Haskell] Haskell users survey--please respond!

2005-11-10 Thread Bulat Ziganshin
Hello John, Wednesday, November 09, 2005, 5:18:12 PM, you wrote: JH I take your point, and I'll think about doing this--although I don't want to JH spam JH people with surveys! I'll also be very careful how I interpret the results. how about adding question about features people want in Haskell

Re[2]: [Haskell] Making Haskell more open

2005-11-11 Thread Bulat Ziganshin
Hello Simon, Friday, November 11, 2005, 5:51:55 PM, you wrote: * The GHC user manual [currently generated using DocBook] I think it should continue to be written in DocBook. (It should switch to DocBook XML if it's still using SGML DocBook.) XML documents are type-safe in contrast

Re[4]: [Haskell] Haskell users survey--please respond!

2005-11-12 Thread Bulat Ziganshin
Hello John, Saturday, November 12, 2005, 2:00:13 AM, you wrote: how about adding question about features people want in Haskell 1.6? JH I'll think about this. I really liked your idea of a permanent JH survey--when I get back from Argentina I'll think about setting that up. JH Clearly, lots

Re[2]: Records (was Re: [Haskell] Improvements to GHC)

2005-11-23 Thread Bulat Ziganshin
Hello David, Wednesday, November 23, 2005, 4:22:47 PM, you wrote: 7. Unordered records: yep (if I understand the problem correctly) DR I don't think you understood correctly. What I'd like (and this is another DR one of those David-specific issues--I've never heard anyone else complain DR

Re: [Haskell] Simple and Easy Persistence

2005-12-07 Thread Bulat Ziganshin
Hello Matthew, Wednesday, December 07, 2005, 5:28:42 AM, you wrote: MMMI have some program data that I'd like to persist. I could just there is 3 binary serialization packages for GHC: 1) GhcBinary, which is most widely used (including GHC compiler itself) and is close to be standard

[Haskell] ANNOUNCE: Process library (for dataflow-oriented programming?)

2005-12-07 Thread Bulat Ziganshin
Hello haskell, Joel's program (discussed in cafe), which now uses MVars instead of Channels to send data between threads, may be a good example of dataflow-driven program: it consists of many hundreds of threads and when one thread sends data to another through MVar, this thread in most cases

Re[2]: [Haskell] Simple and Easy Persistence

2005-12-08 Thread Bulat Ziganshin
Hello Krasimir, Thursday, December 08, 2005, 5:40:15 PM, you wrote: KA the stream. What I want is to have a single Binary library that is KA fast and that have all these features: KA - fast implementation KA - optional serialization of cyclic datastructures KA - optional support for bit level

Re: [Haskell] existential type synonyms

2005-12-13 Thread Bulat Ziganshin
Hello John, Tuesday, December 13, 2005, 6:27:53 AM, you wrote: areSame :: AnyType - AnyType - Bool JM which would expand to areSame :: forall a b . Type a - Type b - Bool it is not easier to just define areSame as areSame :: Type a - Type b - Bool without even declaring AnyType? --

Re[2]: [Haskell] Making Haskell more open

2005-12-21 Thread Bulat Ziganshin
Hello Simon, Tuesday, December 20, 2005, 12:30:56 PM, you wrote: SPJ * There were suggestions of newsgroups and web forums. i think that newcomers, especially yonger ones, will prefer to see web forum. it's like Mekka now - everyone know how to use it and those who are not Internet-gurus in

Re[2]: [Haskell] Making Haskell more open

2005-12-22 Thread Bulat Ziganshin
Hello Wolfgang, Wednesday, December 21, 2005, 8:04:13 PM, you wrote: SPJ http://hackage.haskell.org/trac/ghc why you are preffered to create new Wiki system instead of continue using old one (HaWiki)? may be it is better to just put on this page link to the hawiki's GHC page? WJ trac is

Re: [Haskell] Problem with constructing instances for a class Pair

2005-12-24 Thread Bulat Ziganshin
Hello Frank, Saturday, December 24, 2005, 12:02:28 AM, you wrote: F class P a where F outl :: a b c - b F outr :: a b c - c F make :: b - c - a b c reusing my answer to David Roundy :))) are you seen in Hugs manual chapter about multi-parameter type classes? they use the following

Re: [Haskell] Re: Boxing (Day) Question

2005-12-26 Thread Bulat Ziganshin
Hello Ashley, Monday, December 26, 2005, 2:41:38 PM, you wrote: On the whole it looks like you want type variables with kind #. There are very good implementation reasons for not allowing this. If you had type variables of kind # you could have polymorphic functions over unboxed values. But

Re: [Haskell] Re: Boxing (Day) Question

2005-12-28 Thread Bulat Ziganshin
Hello Ashley, Tuesday, December 27, 2005, 2:46:11 AM, you wrote: it's unserious :) overloading of unboxed types must be resolved at compile time, as in C++ templates. Why can't (-) that's been specialised to #4 - #4 - * just generate a AY function that takes an anonymous 4-byte quantity and

Re[2]: [Haskell] Making Haskell more open

2005-12-28 Thread Bulat Ziganshin
Hello Sven, Wednesday, December 28, 2005, 1:18:35 PM, you wrote: may be it will be better to use trac for all other things except for wiki? we already one wiki system, imho dividing wiki pages between two systems is not convenient SP I totally agree with Bulat here: The current state with 2

[Haskell] modern Arrays documented?

2005-12-31 Thread Bulat Ziganshin
Hello haskell, i'm ready to write my own guide to using modern Arrays library (i mean MArray/IArray machinery, unboxed arrays, diff. arrays and parallel arrays). but may be there is already some docs on this topic (i don't count contents of modules itself)? -- Best regards, Bulat

Re: [Haskell] Re: ANN: HDBC (Haskell Database Connectivity)

2006-01-05 Thread Bulat Ziganshin
Hello John, Wednesday, January 04, 2006, 10:13:00 PM, you wrote: I saw that you are using unsafe foreign imports everywhere in Database.HDBC.PostgreSQL. The trouble with them is that all Haskell threads will be suspended during the call. it is from Haskell-Cafe: On Wed, Dec 14, 2005 at

[Haskell] modern arrays library

2006-01-09 Thread Bulat Ziganshin
Hello i just published the following text at the http://haskell.org/haskellwiki/Arrays Haskell'98 supports just one array constructor type, namely Array (see http://haskell.org/onlinereport/array.html). It creates immutable boxed arrays. Immutable means that these arrays, like any other pure

Re: [Haskell] Haskell Weekly News: January 16, 2006

2006-01-17 Thread Bulat Ziganshin
Hello Donald, Monday, January 16, 2006, 3:37:33 AM, you wrote: DBS * Arrays. Bulat Ziganshin [7]wrote an interesting RFC on the various DBSHaskell array interfaces. DBS7. http://article.gmane.org/gmane.comp.lang.haskell.general/12992 imho, the following will be more

Re: [Haskell] Re: Modelling languages for FP (like UML for OO)

2006-01-22 Thread Bulat Ziganshin
Hello Srinivas, Sunday, January 22, 2006, 2:20:32 AM, you wrote: SN stateful, structurally rich applications in Haskell. If the next version of SN Haskell does support a more convenient and extensible datatype mechanism, i am inetersting - what you mean by more convenient and extensible

[Haskell] Re[2]: [Template-haskell] new TH tutorial (request for comments)

2006-01-23 Thread Bulat Ziganshin
Hello Johannes, Monday, January 23, 2006, 11:27:58 AM, you wrote: JW I'd like to read some overview and comparison on second-level JW programming in Haskell (and if there is none, I'm willing to contribute): citating my another letter: when i was interested in generic programmimg with Haskell,

Re: [Haskell] Scripting language: is Haskell a good choice?

2006-01-26 Thread Bulat Ziganshin
Hello Jules, Wednesday, January 25, 2006, 12:29:48 AM, you wrote: JJ I would like to create a scripting language, similar to Ruby, Perl and JJ Python. Pugs, written in Haskell, is a Perl6 implementation. Is Haskell a JJ good choice for me? yes, if you ready to learn many new things. Haskell is

Re: [Haskell] Visual Haskell: Could not find module `Control.Monad.Writer'

2006-01-30 Thread Bulat Ziganshin
Hello Bernd, Monday, January 30, 2006, 2:29:36 PM, you wrote: BH Could not find module `Control.Monad.Writer': use -v to see a list BH of the files searched for it's the GHC's way to say --make required here ;) -- Best regards, Bulatmailto:[EMAIL

Re: [Haskell] Type synonyms in the instance head

2006-02-03 Thread Bulat Ziganshin
Hello Mads, Thursday, February 02, 2006, 11:48:27 PM, you wrote: ML instance (Foo LongAndUgleName) = class something ... ML Here again LongAndUglyName cannot be replaced by ShortAndTellingName. ML This can be annoying if you have a lot of these instance declarations. are you enabled

[Haskell] unsafeInterleaveST

2006-02-06 Thread Bulat Ziganshin
Hello haskell, is it possible to implement unsafeInterleaveST? why i want it: i have the following definitions: class (MonadHelper m) = Stream m h where vGetContents :: h - m String -- default definition vGetContents h = mUnsafeInterleaveIO $ do eof -

[Haskell] Streams: the extensible I/O library

2006-02-06 Thread Bulat Ziganshin
Hello I have developed a new I/O library that IMHO is so sharp that it can eventually replace the current I/O facilities based on using Handles. The main advantage of the new library is its strong modular design using typeclasses. The library consists of small independent modules, each

Re[2]: [Haskell] unsafeInterleaveST

2006-02-06 Thread Bulat Ziganshin
Hello Tomasz, Monday, February 06, 2006, 8:29:32 PM, you wrote: is it possible to implement unsafeInterleaveST? TZ I hope not. You surely shouldn't be able to implement this function TZ without unsafe* functions, because that would break ST's guarantees. of course. i asked from

[Haskell] RFC: Streams: CharEncoding transformer

2006-02-08 Thread Bulat Ziganshin
Hello Streams library includes CharEncoding transformer that allows to read/write files in UTF-8 and any other encodings. according to the Einar's requirement, i made CharEncoding transformer dynamic - apllied encoding can be changed at any time. now i thinks that this design may limit speed of

Re[2]: [Haskell] Streams: the extensible I/O library

2006-02-10 Thread Bulat Ziganshin
Hello Andrew, Wednesday, February 08, 2006, 8:24:59 PM, you wrote: AP Bulat, it wouldn't hurt to include a motivation section at the top. As AP I understand, it's ultimately all about speed, right? Otherwise, we AP would all be happy with lists (and unsafeInterleave*). So maybe a AP

Re: [Haskell] lazy file reader

2006-02-19 Thread Bulat Ziganshin
Hello Atila, Thursday, February 16, 2006, 8:03:29 PM, you wrote: AR Is there any way to tell the compiller to be 'more lazy' so if appears AR content!!10 it skips a lot of data? AR Im not concearned with concurrency here. FastPackedStrings library with its mmap support will help you --

[Haskell] Fast unboxed references for the IO and ST monads

2006-02-21 Thread Bulat Ziganshin
Hello oleg, Wednesday, February 08, 2006, 8:37:55 AM, you wrote: I suggest you follow the same scheme as the unboxed array types, and have IOURef/STURef types, parameterised over the element type. Of course, we should have instances for all of the primitive numeric types plus Ptr,

Re: [Haskell] Re: Compilation of big, static tables

2006-02-23 Thread Bulat Ziganshin
Hello Simon, Thursday, February 23, 2006, 3:35:51 PM, you wrote: What I would really like is a syntax to statically construct an array, without having to compute it from a list. I'm not sure that even Template Haskell can help here, since there is no normal form for it to translate to. SM

Re: [Haskell] Re: Implicit Parameters

2006-02-28 Thread Bulat Ziganshin
Hello Simon, Tuesday, February 28, 2006, 5:40:35 PM, you wrote: SM Simon I have discussed doing some form of thread-local state, which this means new RTS primitives, like that used in IORef implementation? -- Best regards, Bulatmailto:[EMAIL PROTECTED]

Re: [Haskell] Re: Implicit Parameters

2006-03-02 Thread Bulat Ziganshin
Hello Lauri, Thursday, March 2, 2006, 3:25:31 PM, you wrote: LA Now, I wonder whether we really really really need to track implicit LA parameters in the type system. After all, exceptions, too, introduce a there is also another way - allow partial function signatures -- Best regards, Bulat

Re: [Haskell] Re: Trying On Learn Haskell Web Server

2006-03-11 Thread Bulat Ziganshin
Hello Shae, Friday, March 10, 2006, 5:19:19 PM, you wrote: - Easy mapping from Haskell data structures to underlying SQL - what would be called an Object-Relational Mapper (ORM) in OO languages SME For this, what about SerTH[1] on top of HaskellDB? my Streams library contains even better

Re: [Haskell] debuggers

2006-03-11 Thread Bulat Ziganshin
Hello Ernesto, Saturday, March 11, 2006, 7:36:21 PM, you wrote: EDS Some body know another debugger? printf :) -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell mailing list Haskell@haskell.org

[Haskell] dynamic arrays

2006-03-17 Thread Bulat Ziganshin
Hello Jared, Thursday, March 16, 2006, 11:35:24 PM, you wrote: JU General question to the list: JU (Q) Are there any data structures in Haskell similar to C++/STL JU vectors or C# generic Lists (i.e. strongly typed ArrayLists, e.g. JU Listint)? These data structures grow automatically as you

[Haskell] Re: haskell.org libraries and tools page needs some fixing

2006-03-22 Thread Bulat Ziganshin
Hello Björn, Wednesday, March 22, 2006, 1:35:42 PM, you wrote: BB I recently wanted to add some libraries to BB http://www.haskell.org/haskellwiki/Libraries_and_tools and noticed a BB number of problems. there is also HCAR report. my thoughts is what we should create some central repository

Re: [Haskell] haskell@ archives, 1990-2000

2006-04-04 Thread Bulat Ziganshin
Hello Donald, Tuesday, April 4, 2006, 9:12:12 AM, you wrote: Enjoy reading about the problems of n+k and why Haskell needs a binary IO class, way back in 1990 :) it seems that i should participate in the discussion. can you please add posting facilities? :-E -- Best regards, Bulat

Re: [Haskell] reading binary files

2006-04-06 Thread Bulat Ziganshin
Hello minh, Wednesday, April 5, 2006, 10:41:02 PM, you wrote: but in 1/, i have to choose between different kind of array representation (and i dont know which one is better) and it seems to me that the resulting code (compiled) would have to be the same. no, the code will be slightly

Re[2]: [Haskell] reading binary files

2006-04-06 Thread Bulat Ziganshin
Hello minh, Thursday, April 6, 2006, 12:41:32 PM, you wrote: the code you give in the mail is +/- what i thought about ... is-it the fastest way ? if you will say about your task and speed requirements, i will say how you can do it. the fastest way is to use asm :) thank you also for your

[Haskell] speed of Binary serialization libraries

2006-04-26 Thread Bulat Ziganshin
Hello haskell, i have performed a small test of serialization libraries speed, more to compare GHC's solution with my own. Tests was runned on 1GHz Duron. Each test reads or writes 100 mb of data splitted to 10 kb chunks - arrays or lists. Results are: GHC Binary (memory): Writing UArray: 21.652

[Haskell] Optimizing locking with MVars

2006-05-02 Thread Bulat Ziganshin
Hello haskell, Main reason of slowness of existing Handle-based I/O in GHC is locking around each operation. it is especially bad for simple char-at-a-time I/O where 99% of time spent on locking and unlocking. To be exact, on my CPU, hPutChar for 100mb file requires 150 seconds, while hGetChar

Re[2]: [Haskell] Optimizing locking with MVars

2006-05-03 Thread Bulat Ziganshin
Hello John, Wednesday, May 3, 2006, 2:37:03 AM, you wrote: This reminds me, I wonder if we should have an MVar varient that is _just_ for locking, it would have no separate take and put primitives, just a withLock, enforcing the restriction that the thread that took the lock is the same one

Re: [Haskell] how to 'accumulate' values efficiently (time and space) ?

2006-05-09 Thread Bulat Ziganshin
Hello minh, Monday, May 8, 2006, 12:28:35 PM, you wrote: acc1 ints = foldr (+) 0 ints foldl? -- acc2 ints = execState (mapM add2 ints) 0 add2 :: Int - State Int () add2 i = do acc - get put (acc + i) put $!

Re[2]: [Haskell] timing/timeout (how to express that in Haskell)

2006-05-12 Thread Bulat Ziganshin
Hello Mirko, Friday, May 12, 2006, 4:42:02 PM, you wrote: PS: I am still curious: does threadDelay use the wall clock or the per-process clock (CPU time)? I think it uses wall clock time. Proof: And regardless of the answer - how could one obtain the opposite behaviour? (I don't find this

Re: [Haskell] installing streams library

2006-05-20 Thread Bulat Ziganshin
Hello Chad, Friday, May 19, 2006, 10:40:56 PM, you wrote: It sounds like Bulat has gotten some impressive I/O speedups with his Streams library. I'd like to try this out, but I'm having some trouble installing it. I'm using GHC on Linux. yes, and current (still unpublished) version is even

Re[2]: [Haskell] Re: installing streams library

2006-05-25 Thread Bulat Ziganshin
Hello Ross, Wednesday, May 24, 2006, 4:50:39 PM, you wrote: Now you could make purely functional code raise I/O exceptions, but that gives rise to a few problems: imprecise exceptions are difficult to program with (need deepSeq etc.), and they aren't widely implemented (Hugs doesn't have

Re: [Haskell] My summer of code project: HsJudy

2006-05-30 Thread Bulat Ziganshin
Hello Caio, Tuesday, May 30, 2006, 5:29:46 AM, you wrote: I'm Caio Marcelo and my project for this Summer of Code is Fast Mutable Collection Types for Haskell, I'll be implementing a lot of APIs for data collections (like Map and Arrays) using Judy library as backend. my comments to your

[Haskell] Announce of Arrays References library version 0.1

2006-06-01 Thread Bulat Ziganshin
Good day, Haskellers! i glad to present my new library that is compatible with Hugs 03, Hugs 05 and GHC. the library features: - Unboxed references in IO and ST monads, namely IOURef and STURef. It is a direct replacement for widely used fast unboxed variables modules, with interface modelled

[Haskell] Streams 0.1e released

2006-06-08 Thread Bulat Ziganshin
Hello I released Streams library version 0.1e. Changes are: - Fixed bug: openFD name WriteMode don't truncated files on unixes * Full library now released under BSD3 license, thanks to John Goerzen + Now cabalized, thanks to Jeremy Shaw Download: http://freearc.narod.ru/Streams.tar.gz Docs:

Re: [Haskell] Re: Streams 0.1e released

2006-06-08 Thread Bulat Ziganshin
Hello Aaron, Thursday, June 8, 2006, 7:58:46 PM, you wrote: I released Streams library version 0.1e. Changes are: - Fixed bug: openFD name WriteMode don't truncated files on unixes How's about adding an AppendMode that doesn't truncate, but leaving WriteMode as truncating? library

Re: [Haskell] ANNOUNCE: Haskell Communities Activities Report (10th ed., June 2006)

2006-06-15 Thread Bulat Ziganshin
Hello Andres, Monday, June 12, 2006, 8:19:54 PM, you wrote: Haskell Communities and Activities Report (10th edition, June 2006) thank you for this huge work, Andres! can you please add to the list of competitors information about

Re[2]: [Haskell] ANNOUNCE: Haskell Communities Activities Report (10thed., June 2006)

2006-06-15 Thread Bulat Ziganshin
Hello Lemmih, Thursday, June 15, 2006, 12:11:50 PM, you wrote: Paolo Martini will most likely continue the development of HackageDB as part of his SoC project. are you have plans to implement all things i mentioned? can we now import HCAR database into HackageDB? can HackageDB work with

Re[4]: [Haskell] ANNOUNCE: Haskell Communities Activities Report (10thed., June 2006)

2006-06-15 Thread Bulat Ziganshin
Hello Lemmih, Thursday, June 15, 2006, 1:25:27 PM, you wrote: HackageDB is only for keeping track of Cabal packages and that's how it's gonna stay (with the possible exception of hosting documentation and darcs repositories, etc). A separate user-editable community report could then refer to

[Haskell] OS-dependent cabal file selection

2006-06-16 Thread Bulat Ziganshin
Hello Simon, Friday, June 9, 2006, 7:23:15 PM, you wrote: btw, my cabal file contain line: Build-Depends: base, Win32, template-haskell if i correctly understand, this will not work on unix systems, while without Win32 package program can't be compiled on my windows box. what i can

[Haskell] Re: OS-dependent cabal file selection

2006-06-16 Thread Bulat Ziganshin
Hello Bulat, Friday, June 16, 2006, 11:19:08 AM, you wrote: btw, my cabal file contain line: Build-Depends: base, Win32, template-haskell if i correctly understand, this will not work on unix systems, while without Win32 package program can't be compiled on my windows box. sorry if

Re[2]: [Haskell] A road for Haskell into the kernel of a full-fledged OS

2006-06-16 Thread Bulat Ziganshin
Hello Jaap, Friday, June 16, 2006, 7:27:32 PM, you wrote: I like Haskell a lot, but I chose to use OCaml for this work because the practicalities of porting the compiler were a little easier to manage. GHC would be rather harsh on the fairly primitive MINIX memory management system, although

[Haskell] Streams and ArrayRef librraies

2006-06-18 Thread Bulat Ziganshin
Hello haskell, thanks to John Peterson, i finally relocated my libs to the haskell.org. Installation procedure was also simplified. Streams 0.1e library: Documentation: http://haskell.org/haskellwiki/Library/Streams Download: http://www.haskell.org/library/Streams.tar.gz Installation: run make

[Haskell] Google SoC: Software Transactional Memory for Parrot

2006-06-26 Thread Bulat Ziganshin
Hello haskell, browsing Google SoC site, i found one accepted project that you may be interesting to hear about: Software Transactional Memory for Parrot by Charles Albert Reiss, mentored by Leopold Toetsch (mentioned on http://code.google.com/soc/tpf/about.html ) it seems that Haskell

Re: [Haskell] Comments from Brent Fulgham on Haskell and the shootout

2006-06-27 Thread Bulat Ziganshin
Hello Simon, Tuesday, June 27, 2006, 1:44:45 PM, you wrote: I wanted to write to inform you how shocked I was to see the great advances in performance in the Glorious Haskell Compiler over the last year or so. Of course, we have also benefited from some great contributions by the folks

[Haskell] Automatic installation of cabalized librraies

2006-06-28 Thread Bulat Ziganshin
Hello Jun, Wednesday, June 28, 2006, 9:58:11 AM, you wrote: These bindings are already cabalized, you have to type only as follows to install them: % runghc ./Setup.hs configure % runghc ./Setup.hs build # runghc ./Setup.hs install i propose to use the Makefile attached in all cabalized

[Haskell] Haskell I/O inside: down the rabbit's hole

2006-07-04 Thread Bulat Ziganshin
Hello haskell, Haskell I/O has always been a source of confusion and surprises for new Haskellers. While simple I/O code in Haskell looks very similar to its equivalents in imperative languages, attempts to write somewhat more complex code often end with a total mess. This is because Haskell I/O

Re[2]: [Haskell] Haskell I/O inside: down the rabbit's hole

2006-07-04 Thread Bulat Ziganshin
Hello Joel, Tuesday, July 4, 2006, 11:41:04 AM, you wrote: Bulat, I couldn't find a way to reach your tutorial from the Wiki homepage. There's http://www.haskell.org/haskellwiki/Introduction_to_IO under Idioms but there's no tutorials section that I can see. This page already contains

Re[2]: [Haskell] Haskell I/O inside: down the rabbit's hole

2006-07-04 Thread Bulat Ziganshin
Hello Joel, Tuesday, July 4, 2006, 11:41:04 AM, you wrote: I couldn't find a way to reach your tutorial from the Wiki homepage. There's http://www.haskell.org/haskellwiki/Introduction_to_IO under Idioms but there's no tutorials section that I can see. at the second attempt i've understood

Re[2]: [Haskell] Re: ANNOUNCE: Haskell XML Toolbox Version 6.0

2006-07-05 Thread Bulat Ziganshin
Hello Uwe, Wednesday, July 5, 2006, 5:00:17 PM, you wrote: I've started writing a (somewhat) Gentle Introduction to HXT, but this document is currently not in a state to even release an alpha version. As soon as there is something useful, I'll anounce it on this list. A few simple examples

[Haskell] Re: ANN: TextRegexLazy 0.44

2006-07-13 Thread Bulat Ziganshin
Hello Chris, Thursday, July 13, 2006, 1:03:19 AM, you wrote: This was my first time packaging with cabal, and I am hoping it works for you. are you included Makefile? this makes building installation somewhat simpler for a user Question 2: Is there interest in getting this into an official

Re: [Haskell] Type-Level Naturals Like Prolog?

2006-07-14 Thread Bulat Ziganshin
Hello Jared, Thursday, July 13, 2006, 9:25:39 AM, you wrote: Why can't Haskell (with extensions) do type-level Peano naturals in the same fashion? The code would be something like: btw, my beloved article on type-level programming is http://www.cs.nott.ac.uk/~ctm/faking.ps.gz i myself

[Haskell] Re[2]: ANN: TextRegexLazy 0.44

2006-07-14 Thread Bulat Ziganshin
Hello Chris, Thursday, July 13, 2006, 12:17:30 PM, you wrote: are you included Makefile? this makes building installation somewhat simpler for a user Yes, but the makefile is used just to compile Setup.hs to ./setup and tell the user to run that instead. i've attached my Makefile. it

Re: [Haskell] What would Haskell middleware look like?

2006-07-15 Thread Bulat Ziganshin
Hello Paul, Saturday, July 15, 2006, 3:33:14 AM, you wrote: I've noticed that many other languages have a middleware to handle distribution and concurrency issues. Haskell has STM for shared-memory there is Distributed Haskell library, although rather old:

[Haskell] deriving DeepSeq and deep strict fields proposals (Re[2]: [Haskell-cafe] How can we detect and fix memory leak due to lazyness?)

2006-08-08 Thread Bulat Ziganshin
Hello Ki, Tuesday, August 8, 2006, 6:34:51 AM, you wrote: Unfortunately seq and the strict data declaration is not helpful in general. They are only helpful on base values such as Int or Bool. What they do is just making sure that it is not a thunk. That is if it was a list it would just

[Haskell] class [] proposal Re: [Haskell-cafe] One thought: Num to 0 as ? to list?

2006-08-14 Thread Bulat Ziganshin
Hello Marc, Sunday, August 13, 2006, 10:36:39 PM, you wrote: In other words: why not overload (:) ? i have such proposal, more or less complete: 1) define [] as type class and [] and ':' as operations of this class: class [] c where [] :: c a -- creates empty container

Great tutorial on monads Re: [Haskell] Haskell Weekly News - August 14, 2006

2006-08-14 Thread Bulat Ziganshin
Hello Donald, Monday, August 14, 2006, 11:09:44 AM, you wrote: Quotes of the Week * Dan Piponi : Writing introductions to monads seems to have developed into an industry i felt myself catched ;) and tried to found source of this quote. for my wonder, it was a quote from just

Re[2]: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread Bulat Ziganshin
Hello L., Sunday, August 27, 2006, 12:43:24 PM, you wrote: length s `seq` writeFile f (hello++s) length mates_str `seq` return () it's the same. i recommend you to use: return $! tail mates_str $! defined as f$!x = x `seq` f x 'tail' should be slightly faster than 'len' -- Best

Re[4]: [Haskell] [Haskell - I/O] Problem with 'readFile'

2006-08-27 Thread Bulat Ziganshin
Hello John, Sunday, August 27, 2006, 5:45:21 PM, you wrote: return $! tail mates_str But you need to evaluate the result of readFile all the way to the end--you need to use a function that traverses the entire file contents. Otherwise the file will be left open to read the bit you haven't

  1   2   3   4   5   6   7   8   9   10   >