Re: [Haskell-cafe] pcre-light install fails with undefined reference to _impure_ptr

2010-01-07 Thread Joachim Breitner
Hi, Am Sonntag, den 27.12.2009, 09:50 + schrieb Stephen Tetley: I'll try next with MinGW to see if that works... Aye, it builds fine under MinGW. I built and installed PCRE (c c++ library) from the source (./configure, make, make install), though I think there is a package

Re: [Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-04 Thread Joachim Breitner
Hi, Am Freitag, den 04.12.2009, 01:00 +0100 schrieb Joachim Breitner: And just now, after writing half the code, I find out that $( fun [d|...|] ) runs the type checker on the declarations before passing them to fun, which of course kills my whole approach here, as only having

Re: [Haskell-cafe] GHC magic optimization ?

2009-12-04 Thread Joachim Breitner
Hi, Am Freitag, den 04.12.2009, 10:36 + schrieb Neil Brown: But let's say you have: g x y = f x y * f x y Now the compiler (i.e. at compile-time) can do some magic. It can spot the common expression and know the result of f x y must be the same both times, so it can convert to: g

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.12.2009, 01:16 +0100 schrieb Martijn van Steenbergen: So here's a totally wild idea Sjoerd and I came up with. What if newtypes were unwrapped implicitly? What advantages and disadvantages would it have? In what cases would this lead to ambiguous code? not sure

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
type `MyFoo' against inferred type `Foo' In the expression: foo In the definition of `myfoo': myfoo = foo Greetings, JOachim -- Joachim Breitner e-Mail: m...@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nome...@joachim-breitner.de

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
, but I’d also like to have this also capeable to derive single functions (giving them a new name), and not only class instances. Greetings, Joachim -- Joachim Breitner e-Mail: m...@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nome...@joachim

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.12.2009, 13:03 -0500 schrieb David Menendez: On Thu, Dec 3, 2009 at 6:28 AM, Joachim Breitner m...@joachim-breitner.de wrote: Am Donnerstag, den 03.12.2009, 11:13 + schrieb Matthew Pocock: Perhaps what you are looking for is a more powerful defining semantics

Re: [Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
it. Nice, and close. It seems it does not handle the datatype in arbitrary positions in the type (as in Foo - ( a - Either Foo ())) - (Foo, ())). But thanks for the pointer. Maybe I should give it a shot. Greetings, Joachim -- Joachim Breitner e-Mail: m...@joachim-breitner.de Homepage

Re: [Haskell-cafe] Re: Implicit newtype unwrapping

2009-12-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.12.2009, 22:39 +0100 schrieb Joachim Breitner: Nice, and close. It seems it does not handle the datatype in arbitrary positions in the type (as in Foo - ( a - Either Foo ())) - (Foo, ())). But thanks for the pointer. Maybe I should give it a shot. I started to write

Re: [Haskell-cafe] instance Binary UTCTime (Was: Oprhan instances)

2009-12-02 Thread Joachim Breitner
Hi, Am Montag, den 30.11.2009, 00:30 + schrieb Duncan Coutts: I should also note that distros will not look kindly on solutions that require N * M separate packages. with my Debian-Developer hat on I can very much support this statement. Which is why I’m so interested in a proper solution

[Haskell-cafe] Oprhan instances (Was: Some help needed to start Haskell with Yi)

2009-11-26 Thread Joachim Breitner
Hi, Am Donnerstag, den 19.11.2009, 03:29 +0100 schrieb Daniel Fischer: Perhaps the very best method is to contact the author/maintainer of packageY and say you need the instance. but this might not be desirable when the data type and the class definition are in separate packages, and the

[Haskell-cafe] instance Binary UTCTime (Was: Oprhan instances)

2009-11-26 Thread Joachim Breitner
Dear Ashley Yakeley, Am Donnerstag, den 26.11.2009, 20:32 +0100 schrieb Daniel Fischer: Am Donnerstag 26 November 2009 19:44:11 schrieb Joachim Breitner: Or how would you proceed if you need a Binary instance (from package binary) for UTCTime (from package date), as I do in arbtt? I need

[Haskell-cafe] ANNOUNCE: arbtt-0.1

2009-09-13 Thread Joachim Breitner
Hi, I just uploaded the Automatic Rule-Based Time Tracking tool on hackage. It is written in Haskell (duh :-)) and might be interesting for some of you to either use or hack on (or both). I have put an introduction on

[Haskell-cafe] haskelldb and Debian

2009-09-07 Thread Joachim Breitner
Hi Haskell-DB-interested people, we are still on our way to get the Haskell coverage on Debian back in a good shape. One of the open issues is haskelldb, haskelldb-dynamic and haskelldb-hsql-*. All of these are on 0.10 [1] and do not build with ghc-6.10. It seems that at least haskelldb itself

[Haskell-cafe] Request for Changelogs

2009-08-06 Thread Joachim Breitner
Hi, (this is mostly a rant, but hopefully a constructive one) the Haskell/cabal/hackage eco system is pretty great, as we all know. But there is one huge gaping omission there: Changelogs! I’m involved in packaging Haskell stuff for Debian. Now, the Debian tools we have for that tell me „Hlint

Re: [Haskell-cafe] Request for Changelogs

2009-08-06 Thread Joachim Breitner
Hi, Am Donnerstag, den 06.08.2009, 15:39 +0100 schrieb Neil Mitchell: So please, package authors, put Changes files in your packages and keep the current for now. The problem is that this is the kind of dull administration stuff that isn't coding in Haskell, so tends to get neglected. If

Re: [Haskell-cafe] Request for Changelogs

2009-08-06 Thread Joachim Breitner
Hi, Am Donnerstag, den 06.08.2009, 20:07 +0300 schrieb Max Desyatov: Did you see these tickets http://hackage.haskell.org/trac/hackage/ticket/299 http://hackage.haskell.org/trac/hackage/ticket/244 ? Probably the real proposal could be fixed in comments for that tickets, so anyone who wants

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

2009-07-08 Thread Joachim Breitner
Hi Erik, Am Mittwoch, den 08.07.2009, 17:15 +1000 schrieb Erik de Castro Lopo: The Ocaml programming language has exactly the same problem, but the Debian Ocaml maintainers have automated the process and last time to Ocaml compiler version was updated over 95% of all Ocaml libraries were

Re: [Haskell-cafe] Painting logs to get a coloured tree

2009-02-10 Thread Joachim Breitner
Hi, Am Montag, den 09.02.2009, 16:41 -0700 schrieb Luke Palmer: 2009/2/9 Joachim Breitner m...@joachim-breitner.de Now while this works, and while ST is still somewhat pure, I'm wondering if there is no better way of expressing This piece of information came

Re: [Haskell-cafe] Painting logs to get a coloured tree

2009-02-10 Thread Joachim Breitner
Hi, Am Dienstag, den 10.02.2009, 10:05 +0100 schrieb minh thu: I forgot to mention you can try to tie the knot too, using the result of the processing in the first mapping (and then you don't need the second one)... could you elaborate who to tie that particular knot? I unfortunately, I don’t

Re: [Haskell-cafe] Re: Painting logs to get a coloured tree

2009-02-10 Thread Joachim Breitner
quite a bit, and I assume it would be hard to preserve the structure. If you want to see code (not sure though if you really want to see that code :-)), it’s in http://git.nomeata.de/?p=L-seed.git;a=blob;f=src/Lseed/Geometry.hs Lines 74-142. Greetings, Joachim -- Joachim Breitner e-Mail: m

Re: [Haskell-cafe] Painting logs to get a coloured tree

2009-02-10 Thread Joachim Breitner
. But the knot-tying (and thus the single traversal of the tree) is a very neat idea. Greetings, Joachim -- Joachim Breitner e-Mail: m...@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nome...@joachim-breitner.de signature.asc Description: Dies

[Haskell-cafe] Painting logs to get a coloured tree

2009-02-09 Thread Joachim Breitner
Hi, I have a problem that, it seems, I can not solve cleanly without resorting to imperative programming (via ST): Assume you have a tree (and you can think of a real tree here), defined by something like this: data Tree a = Bud | Branch a Double Tree Tree -- | ` Lenght

Re: [Haskell-cafe] type metaphysics

2009-02-02 Thread Joachim Breitner
Hi, Am Montag, den 02.02.2009, 11:06 -0700 schrieb Luke Palmer: That question has kind of a crazy answer. In mathematics, Nat - Bool is uncountable, i.e. there is no function Nat - (Nat - Bool) which has every function in its range. But we know we are dealing with computable functions,

Re: [Haskell-cafe] type metaphysics

2009-02-02 Thread Joachim Breitner
Hi, Am Montag, den 02.02.2009, 15:30 -0700 schrieb Luke Palmer: That's what I meant. thanks for the clarification, I indeed were confused by the notation and saw Haskell functions where you meant mathematical functions. Greetings, Joachim -- Joachim nomeata Breitner mail:

Re: [Haskell-cafe] type metaphysics

2009-02-02 Thread Joachim Breitner
Hi, Am Montag, den 02.02.2009, 14:41 -0800 schrieb Dan Piponi: 2009/2/2 Luke Palmer lrpal...@gmail.com: But Nat ~ Bool is computably uncountable, meaning there is no injective (surjective?) function Nat ~ (Nat ~ Bool), by the diagonal argument above. Given that the Haskell functions

Re: [Haskell-cafe] mapM_ - Monoid.Monad.map

2009-01-23 Thread Joachim Breitner
Hi, Am Freitag, den 23.01.2009, 21:50 +0100 schrieb Henning Thielemann: However our recent Monoid discussion made me think about mapM_, sequence_, and friends. I think they could be useful for many monads if they would have the type: mapM_ :: (Monoid b) = (a - m b) - [a] - m b I

[Haskell-cafe] xhtml + bytestring

2009-01-19 Thread Joachim Breitner
, and the Oregon Graduate - Institute of Science and Technology, 1999-2001 -Maintainer: bj...@bringert.net -Author: Bjorn Bringert + Institute of Science and Technology, 1999-2001, Joachim Breitner, 2009 +Maintainer: m...@joachim-breitner.de +Author: Joachim Breitner License: BSD3

Re: [Haskell-cafe] advanced class constraints in Haskell 98?

2009-01-09 Thread Joachim Breitner
Hi, Am Donnerstag, den 08.01.2009, 22:22 +0100 schrieb Henning Thielemann: On 8 Jan 2009, at 23:59, Henning Thielemann wrote: From Report: A nice. I jumped into 4.3 and found § § R 32 © ¦ 6 © ¦ 32 ¢ R

Re: [Haskell-cafe] ANN: Control.Monad.IfElse

2008-12-24 Thread Joachim Breitner
Hi, Am Montag, den 22.12.2008, 09:24 -0500 schrieb Jeff Heard: Provides useful anaphoric and monadic versions of if-else and when, as well as infix operators for the actions to allow things like this: nice package. Especially awhen :: Monad m = Maybe a - (a - m ()) - m () is something I

Re: [Haskell-cafe] hackage, gtk2hs

2008-12-24 Thread Joachim Breitner
Hi, Am Dienstag, den 23.12.2008, 21:31 +0100 schrieb Cetin Sert: A package I want to upload only builds with the unreleased gtk2hs version from the darcs repository and not the latest released version 0.9.13 or any lesser. But the repository version seems to not have changed, so if I say in

Re: [Haskell-cafe] Origins of '$'

2008-12-08 Thread Joachim Breitner
Hi, Am Montag, den 08.12.2008, 15:59 -0600 schrieb Nathan Bloomfield: Slightly off topic, but the A^B notation for hom-sets also makes the natural isomorphism we call currying expressable as A^(BxC) = (A^B)^C. So A^(B+C) = A^B × A^C ? Oh, right, I guess that’s actually true: uncurry either

Re: [Haskell-cafe] efficient combination of foldl' and foldr - foldl'r

2008-12-05 Thread Joachim Breitner
Hi, Am Freitag, den 05.12.2008, 23:43 +0100 schrieb Henning Thielemann: ryani$ ghci foldlr.hs [...] Prelude FoldLR :set +s Prelude FoldLR test (100,'a') (0.39 secs, 70852332 bytes) Prelude FoldLR testNaive (100,'a') (0.42 secs, 105383824 bytes) There is still no clear

[Haskell-cafe] getRandom in HAppS-State (Was: ANNOUNCE: gitit 0.2 release)

2008-11-30 Thread Joachim Breitner
[Re-sending to the list, sorry for the doubled mail, John] Hi John, Am Samstag, den 08.11.2008, 12:32 -0800 schrieb John MacFarlane: I've uploaded an early version of gitit, a Haskell wiki program, to HackageDB. Gitit uses HAppS as a webserver, git for file storage, pandoc for rendering the

Re: [Haskell-cafe] Haskell Quick Reference (1-page PDF)

2008-11-06 Thread Joachim Breitner
Hi, the reference suggests the use of otherwise (instead of _) as the default pattern in a case expression. While it certainly works, isn’t it bad style, as it shadows Prelude.otherwise: $ cat otherwise.lhs ; runhaskell otherwise.lhs demo b arg = case b of True - do print

Re: [Haskell-cafe] ANNOUNCE: Data.TCache 0.5.1

2008-10-28 Thread Joachim Breitner
Hi, Am Dienstag, den 28.10.2008, 23:26 +0100 schrieb Alberto G. Corona : Data.Tcache is a transactional cache with configurable persistence. It tries to simulate Hibernate for Java or Rails for Ruby. The main difference is that transactions are done in memory trough STM. There are

Re: [Haskell-cafe] PRE-ANNOUNCE: cabal-debian (automatically debianize cabal packages)

2008-08-22 Thread Joachim Breitner
Hi, Am Freitag, den 22.08.2008, 10:13 +0100 schrieb Magnus Therning: On Fri, Aug 22, 2008 at 2:32 AM, David Bremner [EMAIL PROTECTED] wrote: At Thu, 21 Aug 2008 20:52:00 -0400 (EDT), Christopher Lane Hinson wrote: I'm not a DD, but I think uploading ~500 hackage packages to debian would

Re: [Haskell-cafe] Re: A Monad for on-demand file generation?

2008-07-03 Thread Joachim Breitner
the output file name based on some content of the some of the input files. I have some code that I’ll put somewhere soon. Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: [EMAIL PROTECTED] signature.asc

Re: [Haskell-cafe] Re: A Monad for on-demand file generation?

2008-07-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.07.2008, 15:55 +0200 schrieb Joachim Breitner: I have some code that I’ll put somewhere soon. http://darcs.nomeata.de/odio/ODIO.hs now contains a simple implementation of the idea, together with more explanation. To show what the effect is, I wrote a very small program

Re: [Haskell-cafe] Re: A Monad for on-demand file generation?

2008-07-03 Thread Joachim Breitner
Hi, Am Donnerstag, den 03.07.2008, 11:35 -0700 schrieb David Roundy: On Thu, Jul 03, 2008 at 07:09:58PM +0100, ChrisK wrote: Joachim Breitner wrote: You are violating the monad laws. (f k) and (f = \_ - k) should do the same thing. You might write a version of liftIO that has

Re: [Haskell-cafe] A Monad for on-demand file generation?

2008-07-01 Thread Joachim Breitner
Hi, thanks for your comments. Am Montag, den 30.06.2008, 16:54 -0700 schrieb Ryan Ingram: 1) unsafeInterleaveIO seems like a big hammer to use for this problem, and there are a lot of gotchas involved that you may not have fully thought out. But you do meet the main criteria (file being read

Re: [Haskell-cafe] A Monad for on-demand file generation?

2008-07-01 Thread Joachim Breitner
Hi, Am Dienstag, den 01.07.2008, 11:53 +0200 schrieb Ketil Malde: Joachim Breitner [EMAIL PROTECTED] writes: 1) unsafeInterleaveIO seems like a big hammer to use for this problem, and there are a lot of gotchas involved that you may not have fully thought out. But you do meet the main

Re: [Haskell-cafe] A Monad for on-demand file generation?

2008-07-01 Thread Joachim Breitner
Hi, thanks again for you input. Just one small remark: Am Dienstag, den 01.07.2008, 14:52 -0700 schrieb Ryan Ingram: On 7/1/08, Joachim Breitner [EMAIL PROTECTED] wrote: Am Montag, den 30.06.2008, 16:54 -0700 schrieb Ryan Ingram: 1) unsafeInterleaveIO seems like a big hammer to use

[Haskell-cafe] A Monad for on-demand file generation?

2008-06-30 Thread Joachim Breitner
Hi, for an application such as a image gallery generator, that works on a bunch of input files (that are assumed to be constant during one run of the program) and generates or updates a bunch of output files, I often had the problem of manually tracking what input files a certain output file

Re: [Haskell-cafe] A Monad for on-demand file generation?

2008-06-30 Thread Joachim Breitner
Hi, Am Montag, den 30.06.2008, 07:08 -0500 schrieb Derek Elkins: You may want to look at Magnus Carlsson's Monads for Incremental Computing http://citeseer.comp.nus.edu.sg/619122.html not exactly what I need, but very interesting read. Maybe I can use some of the ideas. Thanks, Joachim --

Re: [Haskell-cafe] File locking wishlist

2008-06-09 Thread Joachim Breitner
Hi again, Am Donnerstag, den 05.06.2008, 17:22 +0200 schrieb Joachim Breitner: Hi, for a program of mine (darcswatch[1]), a rather long running process is run at certain events (by cron, and by new emails). I want to achieve that: * Only one instance of the program runs at a time

[Haskell-cafe] File locking wishlist

2008-06-05 Thread Joachim Breitner
been in there, so no events were missed. If it does not succeed, then there were files. Read and delete them and return the list of arguments contained in them. Greetings, Joachim [1] http://darcswatch.nomeata.de/ -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim

Re: [Haskell-cafe] appending an element to a list

2008-05-29 Thread Joachim Breitner
Hi, Am Donnerstag, den 29.05.2008, 19:04 +0200 schrieb Adrian Neumann: I was wondering how expensive appending something to a list really is. Say I write I'd say longList ++ [5] stays unevaluated until I consumed the whole list and then appending should go in O(1). Similarly when

Re: [Haskell-cafe] An alternative break

2008-05-28 Thread Joachim Breitner
Hi, Am Mittwoch, den 28.05.2008, 23:53 +0200 schrieb Pieter Laeremans: Hello, I need a break function that splits the list one element further than the ordinary break. This is the simplest solution I could imagine: breakI :: (a - Bool) - [a] - ([a], [a]) breakI p s = case break p s of

[Haskell-cafe] My try for a CoroutineT monad tranformer

2008-04-25 Thread Joachim Breitner
so that it should be included somewhere, and where? Are there any problems with strictness or other tripping points that I have overlooked? Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: [EMAIL PROTECTED

Re: [Haskell-cafe] My try for a CoroutineT monad tranformer

2008-04-25 Thread Joachim Breitner
in my use case. And interesting how Ryan and me had the same thoughts on the same day. Maybe the April 24th should be considered Suspend You Monadic Action Day. Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID

[Haskell-cafe] Announcing DarcsWatch

2008-04-17 Thread Joachim Breitner
of marking patches as obsolete is not really solved yet, so if you have ideas about it, mail me or come to #darcs on freenode. Patches are always welcome, you can get the source from DarcsWatch’s repository, found at http://darcs.nomeata.de/darcswatch/ Enjoy, Joachim -- Joachim Breitner e-Mail

[Haskell-cafe] ANN: darcswatch, a way to track your contributions

2008-04-14 Thread Joachim Breitner
Hi Haskellers, today I scrached an itch that was icking for a while: When I submit patches to some project or person, I’m never sure that I won’t forget checking that the patch will actually be applied. But if I forget, and the maitainer forgets (or decides against), my patch would be lost.

Re: [Haskell-cafe] What's the difference?

2008-04-08 Thread Joachim Breitner
Hi, Am Dienstag, den 08.04.2008, 11:51 -0700 schrieb Dan Weston: Paul Johnson wrote: You can regard an instance declaration as an inference rule for the type checker, with = meaning implies (though I don't think its the answer to your other question about names). implies might be a bad

Re: [Haskell-cafe] Re: Shouldn't this loop indefinitely = take (last [0..]) [0..]

2008-04-07 Thread Joachim Breitner
)  instance Eq (Length a) where l1 == l2 = compare l1 l2 == EQ then you can do at least lazy lengths comparisons relatively nice by writing if Length list1 = Length list2 then print list1 else print list2 (just a quick idea) Greetings Joachim -- Joachim Breitner e-Mail: [EMAIL

[Haskell-cafe] Haskell-Support in Ohloh

2008-01-16 Thread Joachim Breitner
Hi, I’m only margianlly involved or up to date there, but still some might have missed this: Ohloh has begun to release their tools, starting with ohcount, their tool to measure code and comments lines: http://labs.ohloh.net/ohcount/ They explicitly write that they want haskell support, and

Re: [Haskell-cafe] Praise for xmonad :-)

2007-09-27 Thread Joachim Breitner
Hi, Am Donnerstag, den 27.09.2007, 21:53 +0100 schrieb Magnus Therning: Seems xmonad is feeling the love. The attached mail turned up on the debian-user mailing list. It's high time xmonad gets packaged for Debian! note that there is an Intend To Package filed:

[Haskell-cafe] Type-Marking finite/infinte lists?

2007-09-15 Thread Joachim Breitner
Hi, today while mowing the lawn, I thought how to statically prevent some problems with infinte lists. I was wondering if it is possible to somehow mark a list as one of finite/infinite/unknown and to mark list-processing functions as whether they can handle infinte lists. For example, it is

Re: [Haskell-cafe] ANNOUNCE: xmonad 0.3

2007-09-06 Thread Joachim Breitner
Hi, Am Donnerstag, den 06.09.2007, 08:24 +0400 schrieb Max Vasin: 2007/9/5, Peter Verswyvelen [EMAIL PROTECTED]: If so, would it be possible to integrate this into GTK2HS so it works as a docking manager inside an application? First of all, gtk is a cross platform toolkit and gtk2hs is just

[Haskell-cafe] gtk2hs in debian

2007-09-03 Thread Joachim Breitner
Hi, Am Freitag, den 31.08.2007, 16:43 +0100 schrieb Duncan Coutts: You may also like to pester some ubuntu maintainer person to get the ubuntu package up to at least the latest debian version. (I'm also hoping debian will get the Gtk2Hs 0.9.12 package that's been out for a little while now)

Re: [Haskell-cafe] Ideas

2007-08-28 Thread Joachim Breitner
Hi, Am Samstag, den 25.08.2007, 12:50 +0100 schrieb Andrew Coppin: How easy would it be to make / would anybody care / has somebody already made ... in Haskell? - A wiki program. (Ditto.) I wrote a wiki in haskell, but it focuses on full-sized LaTeX-Documents, so the “regular” wiki party

Re: [Haskell-cafe] Cartesian product of a Set

2007-08-01 Thread Joachim Breitner
s Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Producing MinimumValue

2007-07-18 Thread Joachim Breitner
, just yourself? minimumValue [a] = ... minimumValue (x:xs) = .. x .. minimumValue xs .. Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 ___ Haskell-Cafe mailing list Haskell

RE: [Haskell-cafe] Haskell shootout game

2007-07-16 Thread Joachim Breitner
Hi, a similar variation of the idea can be found on http://infon.dividuum.de A nice feature o this game is that you can upload the (lua) code while the game is running, so the rounds tend to be quite long (~1h maybe) and the people can adjust their AI constantly. It was very popular at the last

Re: [Haskell-cafe] Broadcast signals between threads

2007-05-27 Thread Joachim Breitner
Hi, Am Samstag, den 26.05.2007, 14:29 +0200 schrieb Tomasz Zielonka: On Fri, May 25, 2007 at 07:57:45PM +0200, Joachim Breitner wrote: I???m writing a TCP server app ATM. It has one thread per client. Some of the clients want to be notified if the internal state changes, while others

Re: [Haskell-cafe] Broadcast signals between threads

2007-05-27 Thread Joachim Breitner
because then I need to keep track of which threads are currently interested in the signal, to not accidentally throw an exception to a thread that does not expect it. Just seems too dangerous to me :-) Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim

[Haskell-cafe] Broadcast signals between threads

2007-05-25 Thread Joachim Breitner
take the value. Do you think this is a sensible way to do it? Any pitfalls that I have overlooked? Might this be useful enough to be included in some mainstream library? Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189

Re: [Haskell-cafe] Re: Church Encoding Function

2007-03-11 Thread Joachim Breitner
) = f g exp _ _ f (App e1 e2) = f e1 e2 Looks a bit stupid, but seems to work, especially as there is not much a function with type (Exp - Exp) - b can do, at least on it’s own. Is that a catamorphism? Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http

[Haskell-cafe] Church Encoding Function

2007-03-10 Thread Joachim Breitner
Hi, some more ideas following from the last post. I noticed how the function Data.Maybe.maybe converts a Haskell Maybe into a Church encoded Maybe. Also, the if construct, interpreted as a function, converts a Bool into a church encoded Bool. If lists are encoded as forall b. (a - b - b) - b -

Re: [Haskell-cafe] A different Maybe maybe

2007-03-08 Thread Joachim Breitner
Hi, Am Mittwoch, den 07.03.2007, 23:32 +0100 schrieb Joachim Breitner: [Also on http://www.joachim-breitner.de/blog/archives/229-A-different-Maybe-maybe.html] [Skipping Church encoding] Thanks for all the answers and links. I was expecting to have discovered something that already exists, so

[Haskell-cafe] A different Maybe maybe

2007-03-07 Thread Joachim Breitner
[Also on http://www.joachim-breitner.de/blog/archives/229-A-different-Maybe-maybe.html] Hi, For a while I have been thinking: Isn’t there a way to get rid of the intermediate Maybe construct in a common expression like “fromMaybe default . lookup”. It seems that a way to do that would be to

Re: [Haskell-cafe] haskell and releasing resources

2007-02-07 Thread Joachim Breitner
with -threaded ? Yes: Then it works. Strangely it also depends on which machine the same binary runs: On my desktop, it works even without threaded, but on the server it hangs. Are there any disadvantages of -threaded? Zombie processes are not too bad, after all. Greetings, Joachim -- Joachim Breitner

Re: [Haskell-cafe] haskell and releasing resources

2007-02-06 Thread Joachim Breitner
for me. According to strace, the spawned process is in a blocking write, the haskell process is in a blocking waitpid, and I am sure that the program would consume all output. Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ

Re: [Haskell-cafe] Re: IO in lists

2007-01-19 Thread Joachim Breitner
/libraries/base/System-IO-Unsafe.html#v%3AunsafeInterleaveIO -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Article review: Category Theory

2007-01-18 Thread Joachim Breitner
Hi, Am Donnerstag, den 18.01.2007, 16:45 + schrieb David House: On 18/01/07, Joachim Breitner [EMAIL PROTECTED] wrote: (.) :: (b - c) - (a - b) - a - c id :: a - a therefore b = a therefore _|_ :: a - c (This is mostly rough guesswork, I might be totally wrong) That much

Re: [Haskell-cafe] IO in lists

2007-01-16 Thread Joachim Breitner
Hi, you can also try with unsafeInterleaveIO, works like a charm, and you really feel the laziness: *Main main -- now entering “testq” tteessttq import System.IO.Unsafe sequence' :: [IO a] - IO [a] sequence' (x:xs) = do r - x; rs - unsafeInterleaveIO

Re: [Haskell-cafe] IO in lists

2007-01-16 Thread Joachim Breitner
Hi again, if sequence' should work with empty lists, then better write it like this: sequence' ms = foldr k (return []) ms where k m m' = do { x - m; xs - unsafeInterleaveIO m'; return (x:xs) } Joachim -- Joachim nomeata Breitner mail: [EMAIL PROTECTED] | ICQ#

Re: [Haskell-cafe] IO in lists

2007-01-16 Thread Joachim Breitner
was entered. Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] maybeToM

2006-12-18 Thread Joachim Breitner
Hi, dons mentions in his blog post that Data.Map’s lookup is generalized over the Monads, whereas Prelude.maybe isn’t. Are there good reasons not to do that to Prelude.maybe as well? Alternatively, how about adding this function to Data.Maybe, analogous to maybeToList maybeToM Nothing = fail

Re: [Haskell-cafe] maybeToM

2006-12-18 Thread Joachim Breitner
Hi, Am Montag, den 18.12.2006, 17:42 +0100 schrieb Tomasz Zielonka: On Mon, Dec 18, 2006 at 09:29:24AM +, Joachim Breitner wrote: dons mentions in his blog post that Data.Map???s lookup is generalized over the Monads, whereas Prelude.maybe isn???t. Are there good reasons not to do

Re: [Haskell-cafe] maybeToM

2006-12-18 Thread Joachim Breitner
Hi, Am Montag, den 18.12.2006, 18:12 +0100 schrieb Tomasz Zielonka: On Mon, Dec 18, 2006 at 04:59:45PM +, Joachim Breitner wrote: Well, that???s a possible implementation of a maybeToM. The question is: Is it useful enough for a name on it???s own? ...and for putting it in Prelude

Re: [Haskell-cafe] maybeToM

2006-12-18 Thread Joachim Breitner
Hi, Am Montag, den 18.12.2006, 09:22 -0800 schrieb Stefan O'Rear: module Data.Generics.Serialization.Standard ... -- |Convert a 'Maybe' object into any monad, using the imbedding defined by -- fail and return. fromMaybeM :: Monad m = String - Maybe a - m a fromMaybeM st = maybe (fail st)

Re: [Haskell-cafe] I'd like start with Haskell, but...

2006-12-16 Thread Joachim Breitner
Hi, Am Samstag, den 16.12.2006, 20:23 +0100 schrieb Duncan Coutts: I don't actually know of anyone using one of the GUI libs in combination with one of the DB libs. It's an obvious thing to do but you'll not find a lot of pre-existing examples or infrastructure to help you. Just for the

Re: [Haskell-cafe] Re: Aim Of Haskell

2006-12-14 Thread Joachim Breitner
, considering the increase of activity in the last two years or so. It’s just not a mainstream hype, but so far the hype target group has been very pleasant :-) Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189

Re: [Haskell-cafe] Refactoring recklessly

2006-12-12 Thread Joachim Breitner
that efficiency was the only thing affected. Are either of these possible in Haskell or any language? Yes, just create an instance (Eq a, Eq b) = Eq (a - b) then you can use == to compare your definitions. Sorry, could not resist, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED

Re: [Haskell-cafe] Cannot understand liftM2

2006-12-11 Thread Joachim Breitner
Hi Nicola, Am Montag, den 11.12.2006, 17:15 +0100 schrieb Nicola Paolucci: Using the cool lambdabot pointless utility I found out that: \x - snd(x) - fst(x) is the same as: liftM2 (-) snd fst I like the elegance of this but I cannot reconcile it with its type. I can't understand

[Haskell-cafe] Four Fours problem in Haskell

2006-12-04 Thread Joachim Breitner
Hi, This might be interesting for some of you (I hope): http://www.joachim-breitner.de/blog/archives/210-FourFours-in-Haskell.html Preview: An interesting programming puzzle appeard in the Blogosphere: To describe every integer from 1 to 100 as a calculation involving only and exactly four

Re: [Haskell-cafe] (a - [b]) - [a - b] ?

2006-12-04 Thread Joachim Breitner
On 12/4/06, Joachim Breitner [EMAIL PROTECTED] wrote: Hi, while pondering over the four fours problem, I wondered: Is there a function of type (a - [b]) - [a - b] It looks a bit like sequence when applied in the ((-) a) Monad: sequence :: [a - b] - a - [b] but I

Re: [Haskell-cafe] (a - [b]) - [a - b] ?

2006-12-04 Thread Joachim Breitner
Hi, Am Dienstag, den 05.12.2006, 05:59 +1000 schrieb Matthew Brecknell: Joachim Breitner: here I use that map (\n - l !!n ) [1..] == l. I hope that is valid map (\n - l !! n) [1..] is more like (tail l). Did you mean to use [0..]? Probably. I hardly use (!!), so I did not remember

Re: [Haskell-cafe] Starting your own Haskell project: part 2

2006-11-19 Thread Joachim Breitner
-killer $ ls ruby-on-rails-killer LICENSE Ruby-on-rails-killer.hs ruby-on-rails-killer.cabal READMESetup.hs Where can I find ruby-on-rails-killer? Joachim (SCNR) -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage

Re: [Haskell-cafe] Testing non-exported functions using ghci

2006-11-13 Thread Joachim Breitner
, it works. Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Guards with do notation?

2006-10-24 Thread Joachim Breitner
Hi, Am Dienstag, den 24.10.2006, 00:44 +0300 schrieb Misha Aizatulin: hello all, why is it not possible to use guards in do-expressions like do (a, b) | a == b - getPair return a and b are equal Probably because it is not well-defined for all Monad what a

Re: [Haskell-cafe] Re: Guards with do notation?

2006-10-24 Thread Joachim Breitner
/gmane.comp.lang.haskell.prime/1750/focus=1750) Then why is the “guard” function, which can be used in a way to implement what Misha wants, only available in MonadPlus, and not in Monad? Greetings, Joachim -- Joachim Breitner e-Mail: [EMAIL PROTECTED] Homepage: http://www.joachim-breitner.de ICQ#: 74513189

Re: [Haskell-cafe] smallest double eps

2006-09-29 Thread Joachim Breitner
Hi, Am Freitag, den 29.09.2006, 19:30 -0400 schrieb Tamas K Papp: the smallest positive floating point number x such that 1+x /= x? That would be the smallest positive number, woudn't it? Do you mean the smalles postive number x with 1+x /= 1? Greetings, Joachim -- Joachim Breitner e-Mail

Re: [Haskell-cafe] Writing forum software in Haskell

2006-09-25 Thread Joachim Breitner
Hi, Am Sonntag, den 24.09.2006, 13:02 +0100 schrieb David House: * What would be a compulsory feature list? Stating the obvious: Haskell Syntax Highlighting (I didn't see it mentioned before, but that might be because of malaria) Greetings, Joachim -- Joachim nomeata Breitner mail: [EMAIL

Re: [Haskell-cafe] Re: Problems interpreting

2006-09-18 Thread Joachim Breitner
Hi, Am Montag, den 18.09.2006, 16:00 +0100 schrieb Neil Mitchell: subst e l' = concat.map (\x-if x==e then l' else [x]) subst e l' = concatMap (\x-if x==e then l' else [x]) Let's save an extra character :) We are talking keystrokes here, so count the shift key! Greetings, Joachim -- Joachim

<    1   2   3