Re: [Haskell-cafe] implementing a text editor swap file

2012-01-17 Thread Martin DeMello
On Tue, Jan 17, 2012 at 6:24 PM, Erik de Castro Lopo wrote: > Martin DeMello wrote: > >> Further question - my internal data representation is a vector of >> strings (it's a line-based editor). > > String or ByteString or Text? > > If its either of the first

Re: [Haskell-cafe] implementing a text editor swap file

2012-01-17 Thread Martin DeMello
On Tue, Jan 17, 2012 at 5:49 PM, Erik de Castro Lopo wrote: > Matthew Farkas-Dyck wrote: > >> http://hackage.haskell.org/package/bytestring-mmap > > Since he's editing text, its a pity there isn't a text-mmap > package :-). Further question - my internal data representation is a vector of strings

Re: [Haskell-cafe] implementing a text editor swap file

2012-01-17 Thread Martin DeMello
Says posix only. But googling for it brought up System.IO.MMap, which does seem to be cross-platform. martin On Tue, Jan 17, 2012 at 5:46 PM, Matthew Farkas-Dyck wrote: > http://hackage.haskell.org/package/bytestring-mmap > > > On 17/01/2012, Martin DeMello wrote: >> I'm

[Haskell-cafe] implementing a text editor swap file

2012-01-17 Thread Martin DeMello
I'm writing a gtk2hs-based text editor, and would like to implement continuous (swap-file based) autosave the way vim and emacs do it. Any suggestions for how to implement this in a cross-platform manner? Also, is there a library that returns standard config file locations on a per-platform basis?

[Haskell-cafe] typeclass and functional dependency problem

2012-01-10 Thread Martin DeMello
I'm writing a Gtk2hs app, and I have several custom widgets that are composite objects represented by records, one field of which is a container widget. I am trying to write a replacement for gtk2hs's boxPackStart boxPackStart :: (BoxClass self, WidgetClass child) => self -> child -> Packing -> In

Re: [Haskell-cafe] How hard is it to start a web startup using Haskell?

2011-12-27 Thread Martin DeMello
A good compromise might be opa (not used it myself, but I've been reading up on it as a possible candidate for any personal web projects I might want to do). It is not haskell, but it is ML-derived, and specifically for webapps. It has some example apps available, though nothing near the volume of

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-20 Thread Martin DeMello
On Tue, Dec 20, 2011 at 3:10 PM, Chris Wong wrote: > > Why not expand it even further? > > class Monoid m where >    (•) :: m -> m -> m >    (∅) :: m > > (∈) :: (Foldable t, Eq a) => a -> t a -> Bool > > (∘) :: (b -> c) -> (a -> b) -> (a -> c) > > (∧) :: Bool -> Bool -> Bool > > etc. > > We can wr

Re: [Haskell-cafe] indentation blues

2011-12-13 Thread Martin DeMello
On Tue, Dec 13, 2011 at 2:34 AM, Adrien Haxaire wrote: > >> Regarding, your question whether this is worth switching from vim to >> emacs. I've been using both editors for some years and I very much >> doubt, that "you wouldn't spend much time learning emacs". If you are >> comfortable with vim, s

[Haskell-cafe] indentation blues

2011-12-12 Thread Martin DeMello
The vim autoindent for haskell is really bad :( Is there a better indent.hs file floating around somewhere? Alternatively, is the emacs haskell mode better enough that it's worth my time learning my way around emacs and evil? martin ___ Haskell-Cafe mai

Re: [Haskell-cafe] minor refactoring problem

2011-11-29 Thread Martin DeMello
On Tue, Nov 29, 2011 at 2:54 AM, Martin DeMello wrote: > On Tue, Nov 29, 2011 at 2:29 AM, Holger Siegel > wrote: >> >> fromRawFile, fromSavedFile :: String -> IO [PairBox] >> fromRawFile = mapM (\x -> makePair (x, "")) . lines >> fromSavedFi

Re: [Haskell-cafe] minor refactoring problem

2011-11-29 Thread Martin DeMello
On Tue, Nov 29, 2011 at 12:55 AM, Stefan Holdermans wrote: > Martin, > >> (The trick with `flip` is tempting, but again at the >> cost of having to peer rather too closely at the implementation of >> processFile when reading the code). > > That "trick" is of course completely orthogonal. One could

Re: [Haskell-cafe] minor refactoring problem

2011-11-29 Thread Martin DeMello
On Tue, Nov 29, 2011 at 12:35 AM, Stefan Holdermans wrote: > Have you considered abstracting over the bits in which importFile and > loadFile differ? For example: > >  processFile :: (String -> IO [PairBox]) -> Editor -> String -> IO () >  processFile f ed path = do >    s <- readFile path >    

[Haskell-cafe] minor refactoring problem

2011-11-29 Thread Martin DeMello
I have the following functions: makePair :: (String, String) -> IO PairBox parseFile :: String -> [(String, String)] importFile :: Editor -> String -> IO () importFile ed path = do s <- readFile path ps <- mapM (\x -> makePair (x, "")) (lines s) es <- return $ V.fromList ps writeIORef ed

Re: [Haskell-cafe] Unix emulation

2010-08-22 Thread Martin DeMello
On Sun, Aug 22, 2010 at 5:04 PM, Stephen Tetley wrote: > Andrew, I was going to chastise you for being the only Windows > developer who has problems with MinGW / MSYS and spreading that > unpleasant internet commodity "FUD". However, I've just gone back to > mingw.org and its gone from "somewhat c

[Haskell-cafe] Anything like Mythryx in Haskell?

2010-08-18 Thread Martin DeMello
Mythryl [http://mythryl.org/] is an ML dialect that mostly puts an Algolish syntax and some good posix interoperability atop SML/NJ. More than the language (which doesn't seem to be as tastefully designed as Haskell, particularly in terms of syntax - what do people have against MLish syntax anyway?

Re: [Haskell-cafe] Haskell Bangalore

2010-06-24 Thread Martin DeMello
Sure, sounds like fun :) I keep trying to learn Haskell and getting nowhere, but the thing is I keep trying! martin On Mon, Jun 21, 2010 at 10:00 AM, C K Kashyap wrote: > Hi, > I was wondering if it would be a good idea for the folks interested in > Haskell in Bangalore to get together. Especial

Re: [Haskell-cafe] Haskell at Indian Universities?

2010-03-30 Thread Martin DeMello
On Tue, Mar 30, 2010 at 2:07 AM, Joachim Breitner wrote: > I’m a computer science student in Germany and I’d like to spend one > semester as an exchange student in India. I have no specific plans yet > where I want to go, and I’m wondering if there are universities in India > where Haskell is basi

Re: [Haskell-cafe] Idea for a very simple GUI llibrary

2009-11-23 Thread Martin DeMello
Has there been "real world" adoption of any of these, in the shape of a moderately complex end-user application that is not just a library demo? martin On Mon, Nov 23, 2009 at 8:48 AM, Keith Holman wrote: > You should also check out Fudgets and "Tangible Functional > Programming." Fudgets is a r

Re: [Haskell-cafe] Graph drawing library for Haskell

2009-11-22 Thread Martin DeMello
On Fri, Nov 20, 2009 at 9:36 PM, Victor Mateus Oliveira wrote: > I'm looking for something more integrated with a gui library. The > jgraph integrates with swing, so you can move, create, delete, have > popup menus, select nodes, and so on. > > I haven't found yet.. If there isn't, I thinking in c

Re: [Haskell-cafe] What's the deal with Clean?

2009-11-04 Thread Martin DeMello
On Wed, Nov 4, 2009 at 10:34 AM, Richard O'Keefe wrote: > (4) It comes with its own IDE.  I don't think it can do anything much that >    Haskell tools can't do, but if you don't like looking for things, it's >    a help. And a well-integrated GUI toolkit. If it weren't for the Windows bias I'd h

[Haskell-cafe] looking for a 2d graphics package

2009-02-23 Thread Martin DeMello
What 2d graphics library would be the best fit for this sort of thing? http://www.superliminal.com/geometry/tyler/gallery/circular/tiles060.html I took a look at diagrams but it seemed more geared towards things that fit on a rectangular layout. martin ___

[Haskell-cafe] clean's gui toolkit

2009-01-29 Thread Martin DeMello
I've been wondering - Clean ships with a fairly capable looking GUI toolkit [http://clean.cs.ru.nl/About_Clean/Standard_I_O_Lib/standard_i_o_lib.html] - has anyone used it? How does it compare to the available Haskell options? martin ___ Haskell-Cafe ma

Re: [Haskell-cafe] Arch Haskell News: Jan 11 2009

2009-01-15 Thread Martin DeMello
On Mon, Jan 12, 2009 at 4:00 AM, Don Stewart wrote: > Arch Haskell News: Jan 11 2009 > > Hey all, welcome to the first Arch Haskell News of 2009. (News about > Haskell on the Arch Linux platform). > >Arch now has 827 Haskell packages in AUR. FWIW I just replaced gentoo[1] on my desktop with a

Re: [Haskell-cafe] Time for a new logo?

2008-12-15 Thread Martin DeMello
Something incorporating λ∀ perhaps martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Efficient parallel regular expressions

2008-11-04 Thread Martin DeMello
On Tue, Nov 4, 2008 at 9:05 AM, Martijn van Steenbergen <[EMAIL PROTECTED]> wrote: > > For my mud client Yogurt (see hackage) I'm currently working on > improving the efficiency of the hooks. Right now several hooks, each > consisting of a regex and an action can be active at the same time. > Every

Re: [Haskell-cafe] Interesting new user perspective

2008-10-10 Thread Martin DeMello
On Fri, Oct 10, 2008 at 2:31 PM, Jonathan Cast <[EMAIL PROTECTED]> wrote: > On Fri, 2008-10-10 at 17:13 -0400, Steve Schafer wrote: >> On Fri, 10 Oct 2008 11:05:43 -0700, Jonathan Cast wrote: >> >> >No reason not to expose newcomers to Haskell to the thing it does best. >> >> This is precisely why

Re: [Haskell-cafe] Model-driven development (was: Haskell participting in big science like CERN Hadrian...)

2008-10-06 Thread Martin DeMello
2008/10/4 Jason Dagit <[EMAIL PROTECTED]>: > 3) Write a python generating EDSL in Haskell > strong arguements against it. The main problem with #3, is that if I share > code with other devs they have to learn Haskell and my EDSL since they won't > be able to just hack the generated python, simila

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 3:39 PM, Bill <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-01 at 16:46 -0400, John Van Enk wrote: > . . . >> I fully realize how un-clever this is. Some one please give me >> something more worth of the original list. :) > > You shoot the gun but nothing happens (Haskell is

Re: [Haskell-cafe] Shooting your self in the foot with Haskell

2008-10-01 Thread Martin DeMello
2008/10/1 Joachim Breitner <[EMAIL PROTECTED]>: > > You shoot the gun, but nobody notices because no-one evaluates the > target. Who'd've thunk it! m. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 1:06 PM, Gwern Branwen <[EMAIL PROTECTED]> wrote: > Yi fails on Alex because Cabal doesn't track executables, nor executables > needed for installation. You want 'cabal install alex yi'; Yay, that finally worked :) Had to add ~/.cabal/bin to my path first, which wasn't har

Re: [Haskell-cafe] csv one-liner

2008-10-01 Thread Martin DeMello
2008/10/1 wman <[EMAIL PROTECTED]>: > > PS: Sorry, Andrew, that I first posted the reply directly to you, still > getting used to the fact that gmail kindly replies to the user on whose > behalf the message was sent, not to the list. I think that's a list setting, not a gmail one. martin

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Wed, Oct 1, 2008 at 1:04 PM, Svein Ove Aas <[EMAIL PROTECTED]> wrote: > On Wed, Oct 1, 2008 at 9:52 PM, Martin DeMello <[EMAIL PROTECTED]> wrote: >> >> $ cabal install yi >> Resolving dependencies... >> 'yi-0.4.6.2' is cached. >> Configurin

Re: [Haskell-cafe] cabal upgrade

2008-10-01 Thread Martin DeMello
On Tue, Sep 30, 2008 at 9:01 PM, Duncan Coutts <[EMAIL PROTECTED]> wrote: > On Wed, 2008-10-01 at 01:59 +0200, Cetin Sert wrote: >> A reminder: >> >> When I wanted to upgrade to yi 0.4.6.2, I needed to download the new >> package list >> >> cabal update #download list of new packages >> c

Re: [Haskell-cafe] Re: (A little humour)

2008-09-26 Thread Martin DeMello
On Fri, Sep 26, 2008 at 1:03 PM, Achim Schneider <[EMAIL PROTECTED]> wrote: > Miguel Mitrofanov <[EMAIL PROTECTED]> wrote: > >> I think you might be interested in >> http://www.research.att.com/~bs/whitespace98.pdf >> > "Instead, it was decided to by default limit identifiers to a single > characte

[Haskell-cafe] cabal on ubuntu

2008-08-14 Thread Martin DeMello
I'm running Ubuntu 8 (Hardy Heron), and while trying to install cabal ran into this bug: https://bugs.launchpad.net/ubuntu/+source/haskell-cabal/+bug/231099 I finally had to install cabal manually, but it took me a lot of googling to be sure that was the right thing to do. Could someone who knows

Re: [Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Martin DeMello
On Wed, Jul 2, 2008 at 2:16 PM, Neil Mitchell <[EMAIL PROTECTED]> wrote: > Hi Martin, > >> I can't figure out how to convert an Int to a CInt to construct the WMHints > > Ask Hoogle: > > http://haskell.org/hoogle/?q=Int+-%3E+CInt Nice > And Hoogle says: > > toEnum, fromIntegral thanks a lot

[Haskell-cafe] calling setWMHints (expects a CInt, I have an Int)

2008-07-02 Thread Martin DeMello
Could someone give me an example of calling setWMHints from Graphics.X11.Xlib.Extras? The signature is setWMHints :: Display -> Window -> WMHints -> IO Status and WMHints is defined as data WMHints = WMHints { wmh_flags :: CLong wmh_input :: Bool wmh_initial_state :: CInt wmh_icon_pixmap :: Pixm

Re: [Haskell-cafe] what's up with hackage.haskell.org?

2008-06-27 Thread Martin DeMello
On Fri, Jun 27, 2008 at 9:25 AM, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: > | Subject: [Haskell-cafe] what's up with hackage.haskell.org? > | > | haven't been able to get to it in a couple of days (at least) > > It's offline for 24 hrs while Galois move office. Ah, okay :) Just noticed it whe

[Haskell-cafe] what's up with hackage.haskell.org?

2008-06-27 Thread Martin DeMello
haven't been able to get to it in a couple of days (at least) martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] haskell and dockapps

2008-06-26 Thread Martin DeMello
On Thu, Jun 26, 2008 at 10:31 AM, Don Stewart <[EMAIL PROTECTED]> wrote: > martindemello: >> Anyone written a windowmaker dockapp in Haskell? I thought it'd be a >> fun project, but I don't quite know where to start. >> > > Might be fun to take hsclock, the gtk/cairo based clock, > >http://hask

[Haskell-cafe] haskell and dockapps

2008-06-26 Thread Martin DeMello
Anyone written a windowmaker dockapp in Haskell? I thought it'd be a fun project, but I don't quite know where to start. martin ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] getting set up in ubuntu

2008-06-05 Thread Martin DeMello
On Thu, Jun 5, 2008 at 12:47 AM, Ketil Malde <[EMAIL PROTECTED]> wrote: > "Martin DeMello" <[EMAIL PROTECTED]> writes: >> I'm especially looking for guidelines on what to install via apt-get >> and what to install independently. > > I'd

[Haskell-cafe] getting set up in ubuntu

2008-06-04 Thread Martin DeMello
I finally ditched sabayon for ubuntu (one wireless problem too many), and now I'm slowly getting stuff set up on it. Any Ubuntu people care to share their experiences? I'm especially looking for guidelines on what to install via apt-get and what to install independently. Also, while I'm making Maj

Re: [Haskell-cafe] FW: Haskell

2008-04-02 Thread Martin DeMello
On Tue, Apr 1, 2008 at 3:41 PM, Dan Weston <[EMAIL PROTECTED]> wrote: > Nor did I use to take > perfectly working code and refactor it until it cried for mercy, and then > stay awake wondering if there was some abstraction out there I was missing > that would really make it sing. I find myself doi

Re: [Haskell-cafe] Re: Best Linux for Haskell?

2007-11-06 Thread Martin DeMello
On 11/6/07, Maurí­cio <[EMAIL PROTECTED]> wrote: > > Maybe (and only maybe), before choosing a > distribution, you should choose a package system, > since that's what you are going to use to install > software. Look for RPM and APT, and see what you > think. With my package system (I don't wanna gi

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-06 Thread Martin DeMello
On 10/5/07, Don Stewart <[EMAIL PROTECTED]> wrote: > > It has been suggested we could just sit DrScheme in front of ghc/ghci. > Anyone with experience who'd like to step up for this? Note that there's a DrOCaml, which might be a good starting point. martin

Re: [Haskell-cafe] renderString problems

2007-08-26 Thread Martin DeMello
On 8/26/07, Sven Panne <[EMAIL PROTECTED]> wrote: > > This is actually not a bug, but a feature. :-) From the Haddock docs for > renderString: > > > Render the string in the named font, without using any display lists. > Rende

Re: [Haskell-cafe] gui libs? no thanks, i'm just browsing.. ;-)

2007-07-19 Thread Martin DeMello
On 7/19/07, Claus Reinke <[EMAIL PROTECTED]> wrote: the idea is well known: build your app as a server, and put an ajax-based gui in front of it, even if server and browser run on the same machine. A more desktopy alternative: http://www.gtk-server.org/ martin

Re: [Haskell-cafe] A "real" Haskell Cookbook

2007-02-26 Thread Martin DeMello
On 2/26/07, Chris Eidhof <[EMAIL PROTECTED]> wrote: Hey everyone, we added some examples to this page. There are some topics that don't have any examples, notably: # 11 Network Programming # 12 XML * 12.1 Parsing XML # 13 Databases * 13.1 MySQL * 13.2 PostgreSQL * 13.3 SQLite

Re: [Haskell-cafe] Re: Map list of functions over a single argument

2007-02-23 Thread Martin DeMello
On 2/22/07, Gene A <[EMAIL PROTECTED]> wrote: The functions as I originally defined them are probably easier for someone new to Haskell to understand what was going on than the rather stark ($ a) in the final factoring of the function... Though the final resulting function is far the cleaner for

[Haskell-cafe] still wrestling with io

2007-02-08 Thread Martin DeMello
Code here: http://zem.novylen.net/anagrid.html I've got an instance of IO appearing unexpectedly and I can't figure out where from. It throws up the following error: $ ghc --make test.hs Chasing modules from: test.hs Compiling Main ( test.hs, test.o ) test.hs:38:15: Couldn't matc

Re: [Haskell-cafe] Newbie: generating a truth table

2007-02-06 Thread Martin DeMello
On 2/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello, how would you convert Boolean triples to strings, in the IO function? printStrings :: (Bool,Bool,Bool) -> IO () Take a look at 'show': Prelude> show True "True" martin ___ Haskell-Cafe

Re: [Haskell-cafe] mixing wxhaskell state and file io

2007-02-05 Thread Martin DeMello
On 2/5/07, Martin DeMello <[EMAIL PROTECTED]> wrote: On 2/5/07, Matthew Brecknell <[EMAIL PROTECTED]> wrote: > > This is probably what you wanted (untested): > > w <- readWords "words" > words <- varCreate w That didn't work, because (as someone

Re: Re[2]: [Haskell-cafe] nested maybes

2007-02-05 Thread Martin DeMello
On 2/5/07, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: Hello J., Sunday, February 4, 2007, 11:46:57 PM, you wrote: > exists s wmap = isJust $ find (==s) . snd =<< Map.lookup (sort s) wmap exists s wmap = Map.lookup (sort s) wmap >>== snd >>== find (==s)

Re: [Haskell-cafe] mixing wxhaskell state and file io

2007-02-04 Thread Martin DeMello
On 2/5/07, Matthew Brecknell <[EMAIL PROTECTED]> wrote: I'm not familiar with wxHaskell, but I don't think wxHaskell is your problem here. It looks like you are confusing yourself with overuse of "do" notation, and perhaps a lack of understanding of the monad laws. Whenever you see this: v <- e

[Haskell-cafe] mixing wxhaskell state and file io

2007-02-04 Thread Martin DeMello
I'm having a lot of trouble mixing file io and wxhaskell's varCreate/Get/Set functions. I have functions readWords :: String -> IO WordMap wordGrid :: WordMap -> Layout And within my GUI code, the following compiles (ignores the variable, basically): words <- varCreate (do {w <- readWords "wor

[Haskell-cafe] nested maybes

2007-02-04 Thread Martin DeMello
I have a Data.Map.Map String -> (Layout, [String]) as follows: type Anagrams = [String] type Cell = (Layout, Anagrams) type WordMap = Map.Map String Cell exists str wmap = let a = Map.lookup (sort str) wmap in case a of Nothing -> False Just x -> case (find (== str) (sn

Re: [Haskell-cafe] Suggestions for a hReadUntilStr implementation

2007-02-03 Thread Martin DeMello
On 2/3/07, Matt Revelle <[EMAIL PROTECTED]> wrote: hReadUntilStr :: (Num a) => Handle -> String -> a -> IO (String, Bool) Is this the wrong way to think about the problem? If so, how should it be handled? If not, any ideas on the implementation? Sounds like this would grow into a full-fledg

Re: [Haskell-cafe] Let's welcome the Ruby hackers!

2007-02-01 Thread Martin DeMello
On 2/1/07, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: So a big hello to any Ruby/Rails hackers lurking out there! Free lambdas for all if you drop by #haskell... I came to Haskell from Ruby the first time around, but didn't have anything real to write in it so I lost steam somewhat. This