Re: Re[Haskell-cafe] mote invocations in Haskell?

2010-03-23 Thread Roman Cheplyaka
* Yves Parès limestr...@gmail.com [2010-03-23 13:46:25-0700] Is there a way to perform some kind of remote method invocation in haskell? (Or, remote object, but I prefer not to use this term, as there are no objects strictly speaking in Haskell) I would like to use a higher level API than

Re: [Haskell-cafe] Getting a string from url-converted UTF8 input

2010-05-16 Thread Roman Cheplyaka
* Eugene Dzhurinsky b...@redwerk.com [2010-05-16 18:42:08+0300] Hello all! Can somebody please explain wha am I doing in wrong way? [snip] I am getting the output: === 1) 345 =K=G5 4= 1...@0bl :=86:8 2 2845 FB2? 2) :0:9

Re: [Haskell-cafe] Process priority

2010-06-03 Thread Roman Cheplyaka
* Andrew Coppin andrewcop...@btinternet.com [2010-06-03 08:27:21+0100] I've had a hunt around in System.Process, but I can't discover any way to adjust the priority of the process you just spawned. Am I missing something, or has this just not been implemented yet? (I must confess, I don't know

Re: [Haskell-cafe] Issue with connectTo function in network package

2010-06-04 Thread Roman Cheplyaka
* aditya siram aditya.si...@gmail.com [2010-06-03 22:30:33-0500] Hi all, I had an issue where using the connectTo [1] function would fail to connect to localhost if my wireless card was turned off. The moment I turned on my wireless connection it worked. But if I use connectTo with 127.0.0.1

Re: [Haskell-cafe] Issue with connectTo function in network package

2010-06-07 Thread Roman Cheplyaka
Another way round -- it (the server) was only listening on IPv4 and the (Haskell) client only tried to connect via IPv6. The bug is described here (with a patch): http://trac.haskell.org/network/ticket/30 * Jeremy Shaw jer...@n-heptane.com [2010-06-04 16:57:38-0500] Perhaps it was only

Re: [Haskell-cafe] Haskell logo

2010-06-10 Thread Roman Cheplyaka
* Andrew Coppin andrewcop...@btinternet.com [2010-06-10 18:47:23+0100] I just visited haskell.org and noticed that the old logo is back. Anybody know when/why this happened? Result of restoring from backups? -- Roman I. Cheplyaka :: http://ro-che.info/ Don't let school get in the way of your

[Haskell-cafe] threadDelay correctness

2010-06-11 Thread Roman Cheplyaka
* David Powell da...@drp.id.au [2010-06-11 16:09:55+1000] This is a slightly different issue, but isn't there a potential problem with threadDelay? I noticed that internally threadDelay uses gettimeofday() as the absolute time source (on linux at least). Isn't there potential problem with

Re: [Haskell-cafe] Using the ContT monads for early exits of IO ?

2010-06-11 Thread Roman Cheplyaka
* Günther Schmidt gue.schm...@web.de [2010-06-11 01:22:27+0200] there is nothing wrong with ifs as such except the won't actually exit a long piece of code, the computation will continue, just in a useless way. Can you clarify? -- Roman I. Cheplyaka :: http://ro-che.info/ Don't let school

Re: [Haskell-cafe] Graph type

2010-06-13 Thread Roman Cheplyaka
* C K Kashyap ckkash...@gmail.com [2010-06-13 22:45:44+0530] Hi, I am trying to write a routine that would generate a graph - where each vertex would be a string. type Graph v = [(v,[v])] -- list of tuples of vertices and adjacent vertices list addEdgeToGraph :: Graph - String - String

[Haskell-cafe] parsec: how to get end location

2010-06-13 Thread Roman Cheplyaka
Suppose I have some parser 'p'. I want to parse it as well as get its span in the text. So I could write \begin{code] pWithLocation = do loc_start - getPosition pval - p loc_end - getPosition return (pval,loc_start,loc_end) \end{code} except that loc_end gives me the location _after_

Re: [Haskell-cafe] parsec: how to get end location

2010-06-13 Thread Roman Cheplyaka
* Antoine Latter aslat...@gmail.com [2010-06-13 16:47:28-0500] On Sun, Jun 13, 2010 at 4:17 PM, Roman Cheplyaka r...@ro-che.info wrote: Suppose I have some parser 'p'. I want to parse it as well as get its span in the text. So I could write \begin{code] pWithLocation = do  loc_start

Re: [Haskell-cafe] Terminology

2010-06-15 Thread Roman Cheplyaka
* Emmanuel Castro emmanuel.cas...@laposte.net [2010-06-15 00:10:09+0200] I am looking for the name of the property linking two functions f and g when : [f(a),f(b),f(c)] = g([a,b,c]) Is there a standard name? In practice, g is an optimised version of f when working on large amount of

Re: [Haskell-cafe] What is Haskell unsuitable for?

2010-06-15 Thread Roman Cheplyaka
* aditya siram aditya.si...@gmail.com [2010-06-15 19:47:37-0400] Hi all, Haskell is a great language and in a lot of ways it still hasn't found a niche, but that's part of what is great about it. But I wanted to ask people are more experienced with Haskell - what kinds of problems is it

[Haskell-cafe] Understanding GHC allocations

2010-06-17 Thread Roman Cheplyaka
I'm trying to optimize the following program: http://github.com/feuerbach/particles/blob/303c8a17c9b732e22457b5409bdce4b7520be94a/run.hs Of course general suggestions are welcome (BTW I'm going to give a try to vector), but currently I'm concerned with two questions: 1. Heavy allocations in

Re: [Haskell-cafe] Understanding GHC allocations

2010-06-17 Thread Roman Cheplyaka
* Roman Cheplyaka r...@ro-che.info [2010-06-17 12:40:59+0300] I'm trying to optimize the following program: http://github.com/feuerbach/particles/blob/303c8a17c9b732e22457b5409bdce4b7520be94a/run.hs Of course general suggestions are welcome (BTW I'm going to give a try to vector

Re: [Haskell-cafe] Understanding GHC allocations

2010-06-17 Thread Roman Cheplyaka
* Daniel Fischer daniel.is.fisc...@web.de [2010-06-17 16:27:01+0200] On Thursday 17 June 2010 11:43:09, Roman Cheplyaka wrote: * Roman Cheplyaka r...@ro-che.info [2010-06-17 12:40:59+0300] I'm trying to optimize the following program: http://github.com/feuerbach/particles/blob

[Haskell-cafe] Core packages and locale support

2010-06-19 Thread Roman Cheplyaka
While ghc 6.12 finally has proper locale support, core packages (such as unix) still use withCString and therefore work incorrectly when argument (e.g. file path) is not ASCII. Is someone already working on this? If it's just a matter of time and manpower I can help but I need some guidance from

Re: [Haskell-cafe] Core packages and locale support

2010-06-25 Thread Roman Cheplyaka
* Jason Dagit da...@codersbase.com [2010-06-24 20:52:03-0700] On Sat, Jun 19, 2010 at 1:06 AM, Roman Cheplyaka r...@ro-che.info wrote: While ghc 6.12 finally has proper locale support, core packages (such as unix) still use withCString and therefore work incorrectly when argument (e.g

Re: [Haskell-cafe] Core packages and locale support

2010-06-25 Thread Roman Cheplyaka
* Jason Dagit da...@codersbase.com [2010-06-25 10:09:21-0700] On Thu, Jun 24, 2010 at 11:42 PM, Roman Cheplyaka r...@ro-che.info wrote: * Jason Dagit da...@codersbase.com [2010-06-24 20:52:03-0700] On Sat, Jun 19, 2010 at 1:06 AM, Roman Cheplyaka r...@ro-che.info wrote: While ghc

Re: [Haskell-cafe] Core packages and locale support

2010-06-25 Thread Roman Cheplyaka
* Brandon S Allbery KF8NH allb...@ece.cmu.edu [2010-06-25 05:00:08-0400] On 6/25/10 02:42 , Roman Cheplyaka wrote: * Jason Dagit da...@codersbase.com [2010-06-24 20:52:03-0700] On Sat, Jun 19, 2010 at 1:06 AM, Roman Cheplyaka r...@ro-che.info wrote: While ghc 6.12 finally has proper locale

[Haskell-cafe] Error monads (was: Call for comments: neither package)

2010-06-29 Thread Roman Cheplyaka
* Stephen Tetley stephen.tet...@gmail.com [2010-06-29 12:02:45+0100] The Applicative Programming with Effects Paper has the monodial accumulating applicative instance on a sum type Conor McBride and Ross Paterson call Except: data Except err a = OK a | Failed err The names are nice and to

Re: [Haskell-cafe] Error monads (was: Call for comments: neither package)

2010-06-29 Thread Roman Cheplyaka
* Vo Minh Thu not...@gmail.com [2010-06-29 16:26:06+0200] 2010/6/29 Roman Cheplyaka r...@ro-che.info: * Stephen Tetley stephen.tet...@gmail.com [2010-06-29 12:02:45+0100] The Applicative Programming with Effects Paper has the monodial accumulating applicative instance on a sum type Conor

Re: [Haskell-cafe] a very pedestrian question about maillists

2010-07-03 Thread Roman Cheplyaka
* Vasili I. Galchin vigalc...@gmail.com [2010-07-02 23:51:09-0500] Hello, Suppose I have the following fragment of a posting: Message: 3 Date: Fri, 2 Jul 2010 12:32:43 -0500 From: aditya siram aditya.si...@gmail.com Subject: Re: [Haskell-cafe] How easy is it to hire Haskell

[Haskell-cafe] Monad transformers (was: Is my code too complicated?)

2010-07-03 Thread Roman Cheplyaka
* Andrew Coppin andrewcop...@btinternet.com [2010-07-03 14:20:14+0100] In my experience, using more than one monad transformer at once makes code utterly incomprehensible. See X monad (xmonad) for an counterexample. -- | The X monad, 'ReaderT' and 'StateT' transformers over 'IO' --

Re: [Haskell-cafe] Monad transformers

2010-07-03 Thread Roman Cheplyaka
* Andrew Coppin andrewcop...@btinternet.com [2010-07-03 15:07:17+0100] Roman Cheplyaka wrote: * Andrew Coppin andrewcop...@btinternet.com [2010-07-03 14:20:14+0100] In my experience, using more than one monad transformer at once makes code utterly incomprehensible. See X monad (xmonad

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Haskell 2010 Report (final)

2010-07-06 Thread Roman Cheplyaka
* Simon Marlow marlo...@gmail.com [2010-07-06 13:00:36+0100] The Haskell 2010 report is done! I've uploaded it to www.haskell.org, and linked it from the main Haskell wiki: http://www.haskell.org/haskellwiki/Language_and_library_specification online HTML version:

Re: [Haskell-cafe] libmpd-haskell RFC

2008-01-17 Thread Roman Cheplyaka
* Ben Sinclair [EMAIL PROTECTED] [2008-01-16 22:02:40+1100] If anybody has already used libmpd-haskell (the darcs repo version) or would like to look over it I would appreciate their comments. Thanks, Ben http://turing.une.edu.au/~bsinclai/code/libmpd-haskell/ I'd like to use it in

Re: [Haskell-cafe] libmpd-haskell RFC

2008-01-17 Thread Roman Cheplyaka
* Don Stewart [EMAIL PROTECTED] [2008-01-17 08:56:14-0800] roma: * Ben Sinclair [EMAIL PROTECTED] [2008-01-16 22:02:40+1100] If anybody has already used libmpd-haskell (the darcs repo version) or would like to look over it I would appreciate their comments. Thanks, Ben

[Haskell-cafe] placeholders in hsql

2008-02-24 Thread Roman Cheplyaka
Is there an ability to use placeholders in SQL statement using hsql? (Actually I'm interested in SQLite.) E.g. INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) and then supply values that will be escaped and inserted in place of each '?'. -- Roman I. Cheplyaka ::

Re: [Haskell-cafe] coerce (safe!)

2008-03-02 Thread Roman Cheplyaka
* Krzysztof Skrzętnicki [EMAIL PROTECTED] [2008-03-02 01:21:42+0100] Well, it is simply coerce :: a - b coerce _ = undefined so coerce is simply empty function. But still, it is possible to write a function of type (a-b). Well, possibly I didn't write anything particularly new, but

[Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-10 Thread Roman Cheplyaka
I'm looking for interesting project to work on during Google Summer of Code. So I found [1]A data parallel physics engine ticket and got excited about it. I'd like to know interested mentors and community opinion about the complexity of such project. I have not very deep knowledge about both NDP

Re: [Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-13 Thread Roman Cheplyaka
* Manuel M T Chakravarty [EMAIL PROTECTED] [2008-03-13 12:30:40+1100] Indeed, a matrix library would be really nice. Before getting serious about this, please take a very close look at how PETSc (http://www-unix.mcs.anl.gov/petsc/) handles matrices. The abstraction is very important

Re: [Haskell-cafe] Error handling in calculations

2008-03-19 Thread Roman Cheplyaka
* [EMAIL PROTECTED] [EMAIL PROTECTED] [2008-03-19 21:47:52+0100] L.S., When playing with exceptions, I noticed the following strangeness: *Main 1 / 0 Infinity *Main 1 `div` 0 *** Exception: divide by zero This is in GHCi 6.8.2; WinHugs Sep 2006 gives: Main 1 / 0 1.#INF

Re: [Haskell-cafe] doctest for haskell -- a good project?

2008-03-22 Thread Roman Cheplyaka
* Shaun Cutts [EMAIL PROTECTED] [2008-03-22 02:20:38-0400] Hello, I am an experienced programmer, currently learning Haskell. Currently I write many things in python. I use both the doctest and unittest modules extensively. As I write code, I simultaneously write doctest code in the doc

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Roman Cheplyaka
* Andrew Coppin [EMAIL PROTECTED] [2008-03-26 12:37:53+] Somebody asked me, so now I'm asking you... In Haskell, you can make unboxed arrays of certain value types. These are typically more efficient in space, and probably time too, and also make the array strict in its values.

Re: [Haskell-cafe] Unboxed arrays

2008-03-26 Thread Roman Cheplyaka
* Henning Thielemann [EMAIL PROTECTED] [2008-03-26 14:22:20+0100] On Wed, 26 Mar 2008, Roman Cheplyaka wrote: * Andrew Coppin [EMAIL PROTECTED] [2008-03-26 12:37:53+] Somebody asked me, so now I'm asking you... In Haskell, you can make unboxed arrays of certain value types

[Haskell-cafe] [GSoC] X Haskell bindings

2008-03-31 Thread Roman Cheplyaka
Hi! I've written a draft proposal for GSoC on XCB Haskell Bindings[1]. I'd appreciate any feedback. Especially I need help with Milestones section. I'm not quite sure how it should look like for such project. 1. http://ro-che.info/docs/xhsb.txt -- Roman I. Cheplyaka :: http://ro-che.info/

Re: [Haskell-cafe] [GSoC] X Haskell bindings

2008-03-31 Thread Roman Cheplyaka
* Adam Langley [EMAIL PROTECTED] [2008-03-31 11:29:57-0700] 2008/3/31 Roman Cheplyaka [EMAIL PROTECTED]: Especially I need help with Milestones section. I'm not quite sure how it should look like for such project. This would seem to be a commendable SoC project. I'm not sure

[Haskell-cafe] QuickCheck: outdated manual

2008-07-09 Thread Roman Cheplyaka
Online QC manual[1] says[2] that 'vector' takes number of elements and generator, while in QuickCheck-1.1.0.0 it takes only number and generates vector of arbitrary's. Please fix that. By the way, I find the old version as useful as the new one. Although both are trivially implemented, I don't

Re: [Haskell-cafe] Monotype error

2009-10-14 Thread Roman Cheplyaka
* Martijn van Steenbergen mart...@van.steenbergen.nl [2009-10-14 20:35:06+0200] Dear café, {-# LANGUAGE Rank2Types #-} {-# LANGUAGE ImpredicativeTypes #-} type Void = forall a. a newtype Mono a = Mono { runMono :: [Void] } beep :: Mono a - Mono a beep (Mono vs) = Mono (map undefined

Re: [Haskell-cafe] Announcing the GHC Bug Sweep

2009-11-16 Thread Roman Cheplyaka
Cool, I'm in! (Also inspired by [1]this post by Erik de Castro Lopo) It would be nice to keep track of participants somewhere, so that each of us knows he's not alone :) 1. http://www.mega-nerd.com/erikd/Blog/CodeHacking/DDC/hacking_ddc.html * Simon Marlow marlo...@gmail.com [2009-11-16

Re: [Haskell-cafe] Great Programs to Read?

2009-11-30 Thread Roman Cheplyaka
* Don Stewart d...@galois.com [2009-11-30 13:01:11-0800] mlesniak: Hello, In terms of to become a great programmer, you need to read great programs[1] what are great programs written in Haskell (for your personal definition of great), which source code is freely available on

[Haskell-cafe] Memory-aware Haskell?

2009-12-24 Thread Roman Cheplyaka
Imagine some system with hard memory bound (e.g. 64M of physical memory, no swap). I don't want some accidental laziness (maybe even not in my code, but in some used package) to crash my program. So, let's think what we can do at runtime. Suppose RTS takes the parameter -- upper limit of consumed

Re: [Haskell-cafe] GHC RTS question

2010-02-22 Thread Roman Cheplyaka
* Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500] On Sun, Feb 21, 2010 at 1:58 PM, Artyom Kazak artyom.ka...@gmail.com wrote: So, if I type ./prog +RTS --RTS +RTS, the output will be +RTS. But I want the output to be equal to the input IN ALL CASES, without any quotes,

[Haskell-cafe] [offtopic] UNIX Shell (was: GHC RTS question)

2010-02-23 Thread Roman Cheplyaka
* Brandon S. Allbery KF8NH allb...@ece.cmu.edu [2010-02-24 00:02:12-0500] On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote: * Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500] #! /usr/bin/env bash ./prog --RTS $* ./prog --RTS $@ Otherwise it will work wrong if arguments

Re: [Haskell-cafe] GHC RTS question

2010-02-24 Thread Roman Cheplyaka
* Artyom Kazak artyom.ka...@gmail.com [2010-02-24 10:23:07+0200] 2010/2/24 Brandon S. Allbery KF8NH allb...@ece.cmu.edu: On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote: * Anthony Cowley acow...@seas.upenn.edu [2010-02-21 14:15:00-0500] #! /usr/bin/env bash ./prog --RTS

Re: [Haskell-cafe] [offtopic] UNIX Shell (was: GHC RTS question)

2010-02-24 Thread Roman Cheplyaka
* Magnus Therning mag...@therning.org [2010-02-24 09:11:54+] On Wed, Feb 24, 2010 at 07:18, Roman Cheplyaka r...@ro-che.info wrote: * Brandon S. Allbery KF8NH allb...@ece.cmu.edu [2010-02-24 00:02:12-0500] On Feb 22, 2010, at 03:36 , Roman Cheplyaka wrote: * Anthony Cowley acow

[Haskell-cafe] ParsecT bug [was: ANNOUNCE: Parsec 3.1.0]

2010-03-04 Thread Roman Cheplyaka
By coincidence, today I found a bug in the parsec 3.0.[01]. Probably due to changes introduced the bug is absent in parsec 3.1.0. I think it is worth to release 3.0.2 with this bug fixed. The bug itself is demonstrated in the following code. It gives Right (False,True) with parsec-3.0.x while

Re: [Haskell-cafe] Unified Haskell login

2010-09-19 Thread Roman Cheplyaka
* Michael Snoyman mich...@snoyman.com [2010-09-17 08:47:02+0200] * OpenID. Fixes the extra password problem, but doesn't give us any extra information about the user (email address, etc). This is a popular misconception. As was noted on this thread, many OpenID provideers may provide you an

Re: [Haskell-cafe] Haskellers.com recent changes (and I need some volunteers)

2010-10-11 Thread Roman Cheplyaka
On Mon, 11 Oct 2010 11:54:12 +0100, Magnus Therning mag...@therning.org wrote: On Mon, Oct 11, 2010 at 08:37, Michael Snoyman mich...@snoyman.com wrote: [...] Also, now 10 random profiles will be displayed on the homepage. Only verified users will be displayed here. I'm also considering adding

Re: [Haskell-cafe] Haskellers.com recent changes (and I need some volunteers)

2010-10-11 Thread Roman Cheplyaka
On Mon, 11 Oct 2010 13:09:00 +0200, Vo Minh Thu not...@gmail.com wrote: 2010/10/11 Roman Cheplyaka r...@ro-che.info: On Mon, 11 Oct 2010 11:54:12 +0100, Magnus Therning mag...@therning.org wrote: On Mon, Oct 11, 2010 at 08:37, Michael Snoyman mich...@snoyman.com wrote: [...] Also, now 10

Re: [Haskell-cafe] Haskellers.com recent changes (and I need some volunteers)

2010-10-11 Thread Roman Cheplyaka
On Mon, 11 Oct 2010 13:14:21 +0100, John Lato jwl...@gmail.com wrote: From: Michael Snoyman mich...@snoyman.com Also, now 10 random profiles will be displayed on the homepage. Only verified users will be displayed here. I'm also considering adding a new status as well: real picture, so that

[Haskell-cafe] Parsec in Haskell platform

2010-10-24 Thread Roman Cheplyaka
Since Parsec 2 and Parsec 3 are usually considered to be different packages, it's ambiguous to say that 'parsec' is included in Haskell Platform [1]. Could someone please: 1. Clarify which version(s) are included? 2. Fix the page [1] It would be convenient to have a page which would list

Re: [Haskell-cafe] Monads and Functions sequence and sequence_

2010-10-30 Thread Roman Cheplyaka
* Mark Spezzano mark.spezz...@chariot.net.au [2010-10-30 15:37:30+1030] Can somebody please explain exactly how the monad functions sequence and sequence_ are meant to work? The others in this thread have already explained how these functions work, so I'll just give an example how they are

Re: [Haskell-cafe] Who's in charge of the new Haskell.org server?

2010-12-01 Thread Roman Cheplyaka
* Thomas Schilling nomin...@googlemail.com [2010-12-01 20:29:48+] On 1 December 2010 18:55, Christopher Done chrisd...@googlemail.com wrote: I think adding new extensions would be possible if they are considered useful enough. I find it useful, especially for (potential) newcomers who

Re: [Haskell-cafe] $ do?

2010-12-14 Thread Roman Cheplyaka
* Jonathan Geddes geddes.jonat...@gmail.com [2010-12-14 19:59:14-0700] Quick question: Why do I need the $ in the following bits of code? main = withSocketsDo $ do --do something with sockets foo = fromMaybe 0 $ do --do something in the maybe monad I don't see (after

Re: [Haskell-cafe] DFAs and self-referential data

2010-12-26 Thread Roman Cheplyaka
* Maxime Henrion mhenr...@gmail.com [2010-12-26 12:01:31+0100] Anyone knows what I'm doing wrong here? I suspect my attempt at having self-referential data is somehow buggy; do I need to treat transitions to the same state differently? The problem is that when you call 'self', you record

Re: [Haskell-cafe] ghc -O2 and HUnit weirdness

2011-01-06 Thread Roman Cheplyaka
* Jürgen Doser jurgen.do...@gmail.com [2011-01-07 00:18:09+0100] El jue, 06-01-2011 a las 16:41 -0400, Joey Hess escribió: So, the problem seems to be that ghc -O2 somehow optimises the static assertBool _ True away, in what seems to be a bad way. Remove the -O2 and the test fails as

Re: [Haskell-cafe] ghc -O2 and HUnit weirdness

2011-01-06 Thread Roman Cheplyaka
* Roman Cheplyaka r...@ro-che.info [2011-01-07 01:42:24+0200] * Jürgen Doser jurgen.do...@gmail.com [2011-01-07 00:18:09+0100] El jue, 06-01-2011 a las 16:41 -0400, Joey Hess escribió: So, the problem seems to be that ghc -O2 somehow optimises the static assertBool _ True away, in what

Re: [Haskell-cafe] Generalizing catMaybes

2011-01-08 Thread Roman Cheplyaka
* Tony Morris tonymor...@gmail.com [2011-01-08 12:56:28+1000] I am wondering if it possible to generalise catMaybes: (Something f, SomethingElse t) = t (f a) - t a I have being doing some gymnastics with Traversable and Foldable and a couple of other things from category-extras to no

Re: [Haskell-cafe] Generalizing catMaybes

2011-01-08 Thread Roman Cheplyaka
* Henning Thielemann lemm...@henning-thielemann.de [2011-01-08 12:06:33+0100] On Sat, 8 Jan 2011, Roman Cheplyaka wrote: I think catMaybes deserves its own typeclass, which would represent truncatable structures: class Truncatable struct where catMaybes :: struct (Maybe

Re: [Haskell-cafe] [] == []

2009-05-29 Thread Roman Cheplyaka
* Paul Keir pk...@dcs.gla.ac.uk [2009-05-29 10:47:26+0100] Hi all, GHC is not happy with this: f = [] == [] nor this: f' = ([]::(Eq a) = [a]) == ([]::(Eq a) = [a]) Here, there's no guarantee that the answer will be the same independent of what 'a' you choose. Potentially, you could

Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Roman Cheplyaka
* Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 17:30:33+0800] Hi, I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by cabal, but my program needs it, and I want my program cabalized. So how to do this? Thanks. gtk2hs consists of several cabal packages,

Re: [Haskell-cafe] curious about sum

2009-06-14 Thread Roman Cheplyaka
* Deniz Dogan deniz.a.m.do...@gmail.com [2009-06-13 16:17:57+0200] I remember needing a non-strict sum at least once, but I do not remember the exact application. We may agree that lazy sum is sometimes (rarely) needed, but then it can be always written as fold. However, in most cases user

Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Roman Cheplyaka
* Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-14 18:48:26+0800] My gtk2hs is install manually, `configure make make install`. So It's okay. when I add gtk to build-dependency, it tells me Setup.hs: At least the following dependencies are missing: gtk -any Installation of

Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-15 Thread Roman Cheplyaka
I'm CC:ing Duncan, probably he can help. * Magicloud Magiclouds magicloud.magiclo...@gmail.com [2009-06-15 10:01:03+0800] # ghc-pkg list gtk /var/lib/ghc-6.10.3/./package.conf: /home/shidaw/.ghc/i386-linux-6.10.3/package.conf: gtk-0.10.1 Well, still, I have the problem On Sun,

Re: [Haskell-cafe] Type families and polymorphism

2009-07-11 Thread Roman Cheplyaka
* Brandon S. Allbery KF8NH allb...@ece.cmu.edu [2009-07-11 17:01:35-0400] On Jul 11, 2009, at 14:31 , Jeremy Yallop wrote: Why does compiling the following program give an error? {-# LANGUAGE TypeFamilies, RankNTypes #-} type family TF a identity :: (forall a. TF a) - (forall a. TF a)

Re: [Haskell-cafe] ANN: tkhs-0.1.* Presentation Utility

2009-07-31 Thread Roman Cheplyaka
* Yusaku Hashimoto nonow...@gmail.com [2009-07-31 22:56:57+0900] Hi, I'm pleased to announce the release of tkhs-0.1.*, Simple presentation utility. If you are thinking PowerPoint is overkill for your presentation, Tkhs may fit the purpose. For real presentations one would probably use

Re: [Haskell-cafe] Would you mind explain such a code ?

2009-09-10 Thread Roman Cheplyaka
* zaxis z_a...@163.com [2009-09-10 00:51:21-0700] thanks for your quick answer! As I understand foldr (\x g - g . (`f`x)) id xs will return a function such as (`f` 3).(`f` 2).(`f` 1) . You have already made it clear ! However, why does the step function below has three parameters ? I

Re: [Haskell-cafe] Would you mind explain such a code ?

2009-09-10 Thread Roman Cheplyaka
* Peter Verswyvelen bugf...@gmail.com [2009-09-10 14:43:10+0200] On Thu, Sep 10, 2009 at 11:47 AM, Roman Cheplyaka r...@ro-che.info wrote:  step x g a = g (f a x) is, thanks to currying, another way to write  step x g = \a - g (f a x) I thought currying just meant curry f x y = f

Re: [Haskell-cafe] adding state in GUIs (qtHaskell)

2009-09-11 Thread Roman Cheplyaka
* Duncan Coutts duncan.cou...@worc.ox.ac.uk [2009-09-10 20:43:54+] A personal favourite of mine is having the GUI event handler post data over a channel to a thread. That thread reads from the channel and deals with the events. The state of the GUI app is then held as local parameters in

Re: [Haskell-cafe] ANN: interval and polynomial enclosure arithmetics

2008-08-09 Thread Roman Cheplyaka
* Michal Konecny [EMAIL PROTECTED] [2008-08-08 13:38:56+0100] and members of the KEG research group at Aston University have used it for reliably solving differential equations and numerical constraint satisfaction problems. This's very interesting. Do you have any published papers (or

Re: [Haskell-cafe] ANN: gsl-random 0.1 and monte-carlo-0.1

2008-08-28 Thread Roman Cheplyaka
* Patrick Perry [EMAIL PROTECTED] [2008-08-28 04:24:21-0700] Hi everyone, I've started on bindings for the random number generators and random distributions provided by the gsl. The package is available here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/gsl-random I've also

Re: [Haskell-cafe] Named field syntax

2008-08-29 Thread Roman Cheplyaka
* Johannes Waldmann [EMAIL PROTECTED] [2008-08-29 15:39:15+0200] data Test = Test Integer {b::String} positional (= unnamed) record notation is a language design error :-) and its use should be discouraged. - J.W. Polluting namespace with unneeded functions should not be encouraged either.

Re: [Haskell-cafe] OpenSPARC project applicant chosen

2008-09-20 Thread Roman Cheplyaka
* Duncan Coutts [EMAIL PROTECTED] [2008-09-20 16:37:08+0100] If you want to follow the progress we will be using the existing ghc development mailing list: http://www.haskell.org/mailman/listinfo/cvs-ghc and a corner of the ghc development wiki:

[Haskell-cafe] Injecting Haskell into C

2008-09-24 Thread Roman Cheplyaka
I have a C function whose behaviour is customized by user-supplied function (think of libc qsort). Typically these user-supplied functions are written in C, but I'd like to use FFI to write them in Haskell. Precisely, I'd like to write high-order function which will generate these functions (e.g.

Re: [Haskell-cafe] Physics engines purely in Haskell?

2008-11-09 Thread Roman Cheplyaka
* Mark Wassell [EMAIL PROTECTED] [2008-11-09 10:51:55+1100] Has anyone thought about or embarked on the task of developing a 2D or 3D physics engine purely in Haskell? There is Hipmunk but I'm wondering about a purely Haskell implementation; possibly a port of Chipmunk to Haskell. As Don

Re: [Haskell-cafe] Haskell haikus

2008-12-05 Thread Roman Cheplyaka
* Gwern Branwen [EMAIL PROTECTED] [2008-12-05 18:18:48-0500] Hi everyone. So today I finally got around to something long on my todo list - a compilation of all the Haskell haikus I've seen around! It is at http://haskell.org/haskellwiki/Haiku But I'm afraid I only have 5, and Google

[Haskell-cafe] Pragmas (was: ANNOUNCE: haskell-src-exts 0.4.4)

2008-12-08 Thread Roman Cheplyaka
* Neil Mitchell [EMAIL PROTECTED] [2008-12-08 08:29:03+] Apart from this, HSE now also parses any unrecognized pragma in option (e.g. LANGUAGE), declaration (e.g. RULES) or expression (e.g. SCC) position, allowing user-customized pragmas. Unrecognized pragmas in other positions will

Re: [Haskell-cafe] Function composition

2008-12-27 Thread Roman Cheplyaka
* Oscar Picasso oscarpica...@gmail.com [2008-12-26 22:37:26-0500] Hi, I can write: *Main let yes = not . not *Main :t yes yes :: Bool - Bool But not: *Main let isNotEqual = not . (==) interactive:1:23: Couldn't match expected type `Bool' against inferred type `a -

Re: [Haskell-cafe] Function composition

2008-12-27 Thread Roman Cheplyaka
* Roman Cheplyaka r...@ro-che.info [2008-12-27 11:33:22+0200] * Oscar Picasso oscarpica...@gmail.com [2008-12-26 22:37:26-0500] Hi, I can write: *Main let yes = not . not *Main :t yes yes :: Bool - Bool But not: *Main let isNotEqual = not . (==) interactive:1:23

[Haskell-cafe] bug in HPDF?

2009-01-06 Thread Roman Cheplyaka
Here is a program which illustrates an unexpected behaviour: import Graphics.PDF main = runPdf bug.pdf standardDocInfo (PDFRect 0 0 100 100) pdf where pdf = do p - addPage Nothing drawWithPage p $ drawText $ sequence $ replicate 10 $

Re: [Haskell-cafe] Re: [Haskell] ANN: ghci-haskeline 0.1

2009-01-12 Thread Roman Cheplyaka
* Andrew Hunter ahun...@cs.hmc.edu [2009-01-12 13:41:03-0800] On Mon, Jan 12, 2009 at 12:57:57PM -0800, Judah Jacobson wrote: I'm pleased to announce the first release of ghci-haskeline. This package uses the GHC API to reimplement ghci with the Haskeline library as a backend. Haskeline

Re: [Haskell-cafe] Haskell WikiProject

2009-01-19 Thread Roman Cheplyaka
* Robin Green gree...@greenrd.org [2009-01-19 18:46:43+] Here's a good example to start with. The article on Eager evaluation could do with some improvement - and possibly should be merged into the Lazy evaluation article, I'm not sure: http://en.wikipedia.org/wiki/Eager_evaluation I

Re: [Haskell-cafe] How to define an operation in terms of itself (but of different type)?

2009-01-24 Thread Roman Cheplyaka
* Olex P hoknam...@gmail.com [2009-01-24 15:35:22+] But you know it doesn't make too much sense because I also have to define addition Scalar + Vector (that means construct vector from scalar and add a vector), Vector + Scalar and so on. And as we are not able to overload operations in C++

Re: [Haskell-cafe] Define variable types

2009-02-05 Thread Roman Cheplyaka
* Tsunkiet Man temp.t...@gmail.com [2009-02-05 12:37:22+0100] Hello, I'm new to Haskell and it seems like a very nice language to learn. However I'm not really familiar with the errormessages it produces. I am using a Helium interpreter. I've created the following module (however it is just

Re: [Haskell-cafe] evaluation semantics of bind

2009-02-05 Thread Roman Cheplyaka
* Gregg Reynolds d...@mobileink.com [2009-02-05 09:20:06-0600] I think I've just about got monads figured out, but there's one detail that still escapes me. As I understand it, a monad is a kind of programming trick the uses data dependency to force evaluation order. x = f means apply f to

Re: [Haskell-cafe] Switching from Mercurial to Darcs

2009-02-05 Thread Roman Cheplyaka
* Peter Verswyvelen bugf...@gmail.com [2009-02-05 16:35:34+0100] On Thu, Feb 5, 2009 at 4:32 PM, Ketil Malde ke...@malde.org wrote: Peter Verswyvelen bugf...@gmail.com writes: 1) hg st darcs cha -s That seems to list all changes in the history. hg st lists local changes

Re: [Haskell-cafe] How to properly design a Haskell TK

2009-02-06 Thread Roman Cheplyaka
* Luke Palmer lrpal...@gmail.com [2009-02-06 01:09:45-0700] On Fri, Feb 6, 2009 at 1:02 AM, Achim Schneider bars...@web.de wrote: I've been thinking a bit, and come to the conclusion that we should just do it as others did it before: Start off with application-specific tk's, figure out

Re: [Haskell-cafe] Changing version numbering schemes for HackageDB packages?

2009-02-10 Thread Roman Cheplyaka
* Corey O'Connor coreyocon...@gmail.com [2009-02-10 10:21:54-0800] I released a new version of data-spacepart that resolved some of the issues with the previous release. One issue I had was the previous release used the version numbering scheme I use at work: [date].[release] Which does not

Re: [Haskell-cafe] IO semantics and evaluation - summary

2009-02-13 Thread Roman Cheplyaka
* Daryoush Mehrtash dmehrt...@gmail.com [2009-02-13 11:31:06-0800] Isn't the lambda expression a representation of something (potentially with recursion) that yields a value and not the value itself? The same terms may refer to different notions. If you think of values as mathematical

Re: [Haskell-cafe] ANNOUNCE: first Grapefruit release

2009-02-14 Thread Roman Cheplyaka
* Wolfgang Jeltsch g9ks1...@acme.softbase.org [2009-02-14 17:19:09+0100] Dear friends of Haskell and Functional Reactive Programming, its my pleasure to announce the first official release of Grapefruit, a library for Functional Reactive Programming (FRP) with a focus on user interfaces.

Re: [Haskell-cafe] ANN: The Typeclassopedia, and request for feedback

2009-02-17 Thread Roman Cheplyaka
* Wolfgang Jeltsch g9ks1...@acme.softbase.org [2009-02-17 13:30:22+0100] Am Dienstag, 17. Februar 2009 00:32 schrieb George Pollard: On Mon, 2009-02-16 at 15:30 +0100, Fraser Wilson wrote: Super! Also, best definition of bottom I've yet seen -- ignoring _| _, which is a party pooper.

[Haskell-cafe] equational reasoning

2009-02-19 Thread Roman Cheplyaka
* Wouter Swierstra w...@cs.nott.ac.uk [2009-02-19 11:58:38+0100] There are several problems with this approach. For example, I can show: const 0 (head []) = 0 But if I pretend that I don't know that Haskell is lazy: const 0 (head []) = const 0 (error ) = error ... Where does the last

Re: [Haskell-cafe] equational reasoning

2009-02-19 Thread Roman Cheplyaka
* Tillmann Rendel ren...@cs.au.dk [2009-02-19 22:43:24+0100] Roman Cheplyaka schrieb: Evaluation order matters for operational semantics, not for axiomatic. And even in operational semantics Church–Rosser theorem should prevent getting different results (e.g. 0 and error) for different

Re: [Haskell-cafe] FRP + physics / status of hpysics

2009-03-06 Thread Roman Cheplyaka
* Peter Verswyvelen bugf...@gmail.com [2009-03-06 11:17:50+0100] Regarding hpysics, did anybody did some experiments with this? Nothing I'm aware of. The blog seems to be inactive since december 2008; has development ceased? Sort of. One reason is that DPH does not seem to be ready for

Re: [Haskell-cafe] FRP + physics / status of hpysics

2009-03-07 Thread Roman Cheplyaka
* Peter Verswyvelen bugf...@gmail.com [2009-03-07 18:34:10+0100] On Fri, Mar 6, 2009 at 10:39 PM, Roman Cheplyaka r...@ro-che.info wrote: The blog seems to be inactive since december 2008; has development ceased? Sort of. One reason is that DPH does not seem to be ready for hpysics

Re: [Haskell-cafe] FRP + physics / status of hpysics

2009-03-08 Thread Roman Cheplyaka
* Peter Verswyvelen bugf...@gmail.com [2009-03-08 12:00:23+0100] On Sat, Mar 7, 2009 at 6:49 PM, Roman Cheplyaka r...@ro-che.info wrote: * Peter Verswyvelen bugf...@gmail.com [2009-03-07 18:34:10+0100] On Fri, Mar 6, 2009 at 10:39 PM, Roman Cheplyaka r...@ro-che.info wrote

Re: [Haskell-cafe] Re: 3D Rendering Engine in Haskell (Re: FRP + physics / status of hpysics)

2009-03-08 Thread Roman Cheplyaka
* Neal Alexander relapse@gmx.com [2009-03-08 10:49:52-0800] Anyway, it seems like theres quite a few people working on game/openGL related stuff for Haskell now. Would be nice to get a group of people working on something. Please go ahead! Personally, I've been working on a 2d

Re: [Haskell-cafe] Natural Numbers: Best implementation?

2009-03-13 Thread Roman Cheplyaka
* Alexander Dunlap alexander.dun...@gmail.com [2009-03-12 20:01:57-0700] Also, a lot of functions just take Integers so it would be more of a pain to use. AFAIK there are very few fuctions that take Integers. Many functions take instances of Integral, but it's not a problem to make your own

  1   2   3   4   5   >