Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project

2013-04-27 Thread Alistair Bayley
How's about Creole? http://wikicreole.org/ Found it via this: http://www.wilfred.me.uk/blog/2012/07/30/why-markdown-is-not-my-favourite-language/ If you go with Markdown, I vote for one of the Pandoc implementations, probably Pandoc (strict): http://johnmacfarlane.net/babelmark2/ (at least then

Re: [Haskell-cafe] Split and substitution using regex-pcre

2013-02-28 Thread Alistair Bayley
You cannot bend the split package to your needs? http://hackage.haskell.org/packages/archive/split/0.2.1.2/doc/html/Data-List-Split.html Some combination of splitWhen and a pcre-based predicate? On 24 February 2013 22:44, Simon Marechal si...@banquise.net wrote: I could not find the

Re: [Haskell-cafe] ANNOUNCE: Sylvia, a lambda calculus visualizer

2012-10-01 Thread Alistair Bayley
On 2 October 2012 15:23, Conrad Parker con...@metadecks.org wrote: I'd love to see a game which incrementally teaches reduction and expansion steps in the way that DragonBox [http://dragonboxapp.com/] teaches algebra. That would be a learning mode like Angry Birds, where new combinator birds

Re: [Haskell-cafe] Does anyone maintain trac.haskell.org?

2011-12-08 Thread Alistair Bayley
On 9 December 2011 10:39, Justin Bailey jgbai...@gmail.com wrote: The community Trac hosting server isn't sending email, which Trac requires. I've submitted several tickets to supp...@community.haskell.org but gotten no response. Does anyone maintain that server anymore? Had the same

Re: [Haskell-cafe] blog software in Haskell?

2011-10-31 Thread Alistair Bayley
On 31 October 2011 22:14, Ketil Malde ke...@malde.org wrote: I just upgraded my server, and set up everything again.  Except wordpress, as 1) I'm not too fond of its user interface, and 2) it's a big pile of PHP, difficult to keep updated, and basically a disaster waiting to happen (and in

Re: [Haskell-cafe] Real CMS Application in Haskell

2011-09-04 Thread Alistair Bayley
On 4 September 2011 17:46, Haisheng Wu fre...@gmail.com wrote: Hello guys,   I googled for a real open source CMS application in Haskell but have no luck.   So I'm wondering if Haskell is used very little in Web development area. Thanks. -Simon There was this, quite some time ago:

Re: [Haskell-cafe] Network.CGI and SQL Queries

2011-07-20 Thread Alistair Bayley
There's an odd error every time I try to run this code: sqlReaderIO = do     handle - connectSqlite3 table2.db     scoresSql - quickQuery' handle SELECT * FROM pachinkoScores ORDER BY score, name []     let scores = map (map (\x - fromSql x :: String)) scoresSql     return (show scores)

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Alistair Bayley
12 July 2011 05:49, Michael Snoyman mich...@snoyman.com wrote: As for Bryan's resource-pool: currently I would strongly recommend *against* using it for any purpose. It is based on MonadCatchIO-transformers[2], which is a subtly broken package. In particular, when I tried using it for

Re: [Haskell-cafe] Oracle Sessions in Takusen

2011-06-02 Thread Alistair Bayley
On 3 June 2011 05:35, Kevin Quick qu...@sparq.org wrote: Dmitry, I'm not directly familiar with Takusen or its use with OracleDB, but I would hazard a guess that the withSession is doing FFI resource management and that resources obtained inside the withSession environment are no longer

Re: [Haskell-cafe] Encoding-aware System.Directory functions

2011-03-30 Thread Alistair Bayley
On 30 March 2011 20:53, Max Bolingbroke batterseapo...@hotmail.com wrote: On 30 March 2011 07:52, Michael Snoyman mich...@snoyman.com wrote: I could manually do something like (utf8Decode . S8.pack), but that presumes that the character encoding on the system in question is UTF8. So two

Re: [Haskell-cafe] [Haskell] Problems with (projects|community).haskell.org

2011-02-14 Thread Alistair Bayley
On 10 February 2011 22:03, Dominique Devriese dominique.devri...@cs.kuleuven.be wrote: Also, is there any news yet on a procedure for community members with accounts on projects.haskell.org to get access to them again? My ssh publickey login is no longer being accepted. I had an account mainly

Re: [Haskell-cafe] Anyone here from New Zealand?

2010-08-01 Thread Alistair Bayley
On 24 July 2010 09:58, Hamish Mackenzie hamish.k.macken...@googlemail.com wrote: On 24 Jul 2010, at 02:15, Tim Matthews wrote: Any of the haskellers here from NZ? I am in Wellington, Stephen is near Palmerston North. There are a few others elsewhere I think. I'm currently moving from the UK

Re: [Haskell-cafe] ANNOUNCE: Takusen 0.8.6

2010-08-01 Thread Alistair Bayley
At the risk of seeming a bit defensive, I'll respond to some of these points... Despite this, it seems to have a couple faults:  * Few tutorials, aside from the Haddocks in Database.Enumerator True. I put a bit of effort in to writing the docs in Database.Enumerator as a sort of tutorial, but

[Haskell-cafe] gtk2hs and ghc-6.10.4 on Windows (Vista)

2010-02-24 Thread Alistair Bayley
On 16 February 2010 17:57, Neil Mitchell ndmitch...@gmail.com wrote: Hi Serguey, A GHC 6.10.4 version of Gtk2hs: http://www.mail-archive.com/gtk2hs-de...@lists.sourceforge.net/msg00340.html I used to recommend Gtk2hs over wxHaskell for GUI development as there was always a version that

[Haskell-cafe] Haskell IDEs on Windows; gtk2hs

2010-02-12 Thread Alistair Bayley
I thought I'd try some of the Haskell IDEs: eclipsefp, leksah, and yi. So far, leksah requires gtk2hs (and apparently yi can use it too?), and the latest gtk2hs installer for Windows doesn't like the latest Haskell Platform, so I'm going to try building gtk2hs from source, unless anyone tells me

Re: [Haskell-cafe] programmatic DB interface?

2010-02-04 Thread Alistair Bayley
What is currently the recommended higher level data base interface for Haskell? I want to construct queries in a programmatic/algebraic way, Would takusen help? Where's its home page? this does not work: http://darcs.haskell.org/takusen/ Takusen still requires you to supply queries as

Re: [Haskell-cafe] Haskell Platform

2010-01-21 Thread Alistair Bayley
How are the efforts on Haskell Platform for GHC 6.12.1 going? I'm considering joining those brave heroes. Where can I apply? Joining the mailing list would be a good place to start: http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-platform Alistair

Re: [Haskell-cafe] Takusen - reading from one db inserting into another

2010-01-18 Thread Alistair Bayley
Hello Günther, I know how to use Takusen with a *single* connection, but I cannot figure out how to read from one database while inserting to another. At present it's not possible. The lats time you asked about it, Oleg and I tried a design where the DBM monad becomes a DBMT monad transformer.

[Haskell-cafe] ssh ports for monk and nun?

2010-01-12 Thread Alistair Bayley
Trying to get ssh working via putty from behind my company firewall. Had some success in the past with sourceforge because they had ssh daemons listening on ports 80 and 443, to aid prisoners like myself. Does anyone know if the monk (darcs.haskell.org) and nun (code.haskell.org) servers accept

Re: [Haskell-cafe] ssh ports for monk and nun?

2010-01-12 Thread Alistair Bayley
2010/1/12 Jason Dusek jason.du...@gmail.com:  Monk and nun? The haskell.org code/project/... servers: http://www.haskell.org/haskellwiki/Haskell.org_domain ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: ssh ports for monk and nun?

2010-01-12 Thread Alistair Bayley
Trying to get ssh working via putty from behind my company firewall. Had some success in the past with sourceforge because they had ssh daemons listening on ports 80 and 443, to aid prisoners like myself. Does anyone know if the monk (darcs.haskell.org) and nun (code.haskell.org) servers

Re: [Haskell-cafe] Relational Algebra

2009-10-15 Thread Alistair Bayley
has anybody already developed an EDSL for relational algebra? HaskellDB does that, but its current implementation only allows for generating SQL, are there other implementations? Hello Günther, Ganesh did something called squiggle a while ago: http://code.haskell.org/squiggle/unstable/ I've

Re: [Haskell-cafe] Takusen: *** Exception: readUTF8Char: illegal UTF-8 character 252

2009-09-08 Thread Alistair Bayley
Hello Günther, It looks like Access is not using UTF8 as its text encoding. I have Access at work, so I can look into this at some point. The ODBC code assumes the encoding is always UTF8. For some drivers (e.g. PostgreSQL) you must configure the ODBC driver correctly to provide UTF8. Does

Re: [Haskell-cafe] Takusen - is anyone currently using it on Win32 - ODBC?

2009-08-23 Thread Alistair Bayley
2009/8/23 Günther Schmidt gue.schm...@web.de: is anyone currently using takusen with odbc on Win32? In particular with MS Access? I'm asking because I noticed that when database libraries are declared to work with ODBC no one seems to mean Win32 ODBC, but rather Unix ODBC. Yes. The ODBC

[Haskell] ANN: Takusen 0.8.4

2009-05-01 Thread Alistair Bayley
ANN: Takusen 0.8.4 This is mainly a get it working with ghc-6.10 release. Changes since 0.8.3: - ODBC support: some bug fixes, and basic support for Out-parameters. There is at least one major outstanding bug with Out-parameters, where marshalling a String output bind-variable doesn't

[Haskell-cafe] ANN: Takusen 0.8.4

2009-05-01 Thread Alistair Bayley
ANN: Takusen 0.8.4 This is mainly a get it working with ghc-6.10 release. Changes since 0.8.3: - ODBC support: some bug fixes, and basic support for Out-parameters. There is at least one major outstanding bug with Out-parameters, where marshalling a String output bind-variable doesn't

Re: [Haskell-cafe] Takusen, postgres and boolean fields

2009-04-25 Thread Alistair Bayley
2009/4/25 Sasha Shipka xao...@gmail.com: When I did SELECT statement I handled boolean field as String, and convert it to Bool. However when I did update or insert, I must bind those values, then takusen calls foreign postgres library and function with ? and values of proper type. So I cannot

Re: [Haskell-cafe] strange performance issue with takusen 0.8.3

2009-04-07 Thread Alistair Bayley
2009/4/6 Marko Schütz markoschu...@web.de: I have an application where some simple data extracted from some source files is inserted into a PostgreSQL database. The application uses Takusen and is compiled with GHC 6.8.3. Some (59 in the test data) of the selects take on average 460ms each

Re: [Haskell-cafe] ANNOUNCE: vacuum-cairo: a cairo frontend to vacuumfor live Haskell data visualization

2009-04-01 Thread Alistair Bayley
2009/3/31 Peter Verswyvelen bugf...@gmail.com: Maybe GHCi has a bug when it comes to DLL lookup. I had an application that worked fine when compiled with GHC, but failed with GHCi (libglew.dll not found) I used procmon to monitor which files the GHC* processes searched, and it seemed that the

Re: [Haskell-cafe] Problem using #define in .hsc files

2009-03-30 Thread Alistair Bayley
2009/3/29 Johan Tibell johan.tib...@gmail.com: foreign import CALLCONV unsafe send    c_send :: CInt - Ptr a - CSize - CInt - IO CInt Compiling results in: parse error on input `CALLCONV' This is what we use in Takusen's Database.ODBC.OdbcFunctions.hsc: #ifdef mingw32_HOST_OS #let

Re: [Haskell-cafe] examples for error handling in takusen?

2009-03-16 Thread Alistair Bayley
2009/3/14 Gü?nther Schmidt gue.schm...@web.de: Hi, can someone please point me to error handling examples with takusen? I try to run a piece of code with takusen but just get the very sparse Database.InternalEnumerator.DBException Hello Günther, We use dynamic exceptions in Takusen, which

Re: [Haskell-cafe] Can this be done?

2009-02-11 Thread Alistair Bayley
2009/2/11 Cristiano Paris cristiano.pa...@gmail.com: I wonder whether this can be done in Haskell (see muleherd's comment): http://www.reddit.com/r/programming/comments/7wi7s/how_continuationbased_web_frameworks_work/ WASH did/does something similar. You can certainly write applications in a

Re: Pragma not recognised when wrapped in #ifdef

2009-02-10 Thread Alistair Bayley
{-# LANGUAGE CPP #-} #ifdef PRAGMA_DERIVE_TYPEABLE {-# LANGUAGE DeriveDataTypeable #-} #else {-# OPTIONS -fglasgow-exts #-} #endif -- This file is Test/Fail.hs. -- ghc --make -optP-DPRAGMA_DERIVE_TYPEABLE -XCPP Test.Fail module Test.Fail where import Data.Generics data Fail = Fail

Re: Pragma not recognised when wrapped in #ifdef

2009-02-10 Thread Alistair Bayley
2009/2/10 Simon Peyton-Jones simo...@microsoft.com: I'm guessing a bit here, but it looks as if you intend this: * GHC should read Foo.hs, and see {-# LANGUAGE CPP #-} * Then it should run cpp * Then it should look *again* in the result of running cpp, to see the now-revealed {-# LANGUAGE

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-07 Thread Alistair Bayley
2009/2/6 Duncan Coutts duncan.cou...@worc.ox.ac.uk: Yes, against my better judgement the code in Cabal for haddock-2.x does not run cpp or unliting like it does for haddock-0.x. Instead it assumes that haddock-2.x will do all the cpp and unliting itself. Obviously this mean the special

Pragma not recognised when wrapped in #ifdef

2009-02-06 Thread Alistair Bayley
I have this little test program: {-# LANGUAGE CPP #-} #ifdef PRAGMA_DERIVE_TYPEABLE {-# LANGUAGE DeriveDataTypeable #-} #else {-# OPTIONS -fglasgow-exts #-} #endif -- This file is Test/Fail.hs. -- ghc --make -optP-DPRAGMA_DERIVE_TYPEABLE -XCPP Test.Fail module Test.Fail where import

[Haskell-cafe] haddock-2.3.0 literate comments discarded from .lhs input

2009-02-06 Thread Alistair Bayley
I have this test case for Haddock (2.3.0): -- | Module : Test.Haddock Copyright : (c) 2009 Alistair Bayley License : BSD-style Maintainer : alist...@abayley.org Stability : stable Portability : portable Test case for Haddock

[Haskell-cafe] Re: haddock-2.3.0 literate comments discarded from .lhs input

2009-02-06 Thread Alistair Bayley
[1 of 1] Compiling Test.Fail( Test\Fail.hs, Test\Fail.o ) Test\Fail.hs:11:26: Can't make a derived instance of `Typeable Fail' (You need -XDeriveDataTypeable to derive an instance for this class) In the data type declaration for `Fail' Are you processing the above module

Re: [Haskell-cafe] Elegant powerful replacement for CSS

2009-02-03 Thread Alistair Bayley
2009/2/3 Peter Verswyvelen bugf...@gmail.com: Isn't CSS about giving a style to the views in the model-view-controller paradigm? So basically it is a way to change the look of a user interface, without having to change the user interface definition itself. In theory CSS separates content from

Re: [Haskell-cafe] Takusen 0.8.3 install problems

2009-02-01 Thread Alistair Bayley
You can probably just remove the Setup.lhs and build with defaults (we're doing that at galois, we use Takusen). -- Don I'm surprised this works, unless you also change the imports of Control.Exception to Control.OldException. The new exception module is part of the reason it's taking me

Re: [Haskell-cafe] Re: databases in Haskell type-safety

2009-01-30 Thread Alistair Bayley
2009/1/30 guenni68 red...@fedoms.com: Hi Alistair, yes, please, pretty please do! I really am desparate, I'm running into so much trouble because I have to export to MS-Access and I'm a little out of luck with HDBC. HDBC works like a charm unless you have to use MS-Access. Hmm... it's not

Re: [Haskell-cafe] haddock-2.3.0 error: file name does not match module name

2009-01-30 Thread Alistair Bayley
This has been reported before: http://trac.haskell.org/haddock/ticket/73#comment:4 Not sure what's going on yet. If anyone's got a minimal test-case, that'd be great. This is what fails for me (in Test/Fail.hs): {- # LANGUAGE CPP #-} module Test.Fail I've added this to the trac ticket.

[Haskell-cafe] haddock-2.3.0 error: file name does not match module name

2009-01-29 Thread Alistair Bayley
I'm getting an error when I run setup haddock-2.3.0 on the Takusen src: haddock.exe: File name does not match module name: Saw: `Main' Expected: `Database.Enumerator' I assume that it's procesing file Database.Enumerator.lhs when it emits this, but I'm puzzled because the module name in

Re: [Haskell-cafe] haddock-2.3.0 error: file name does not match module name

2009-01-29 Thread Alistair Bayley
2009/1/29 Matthijs Kooijman matth...@stdin.nl: I assume that it's procesing file Database.Enumerator.lhs when it emits this, but I'm puzzled because the module name in Database.Enumerator.lhs is certainly Database.Enumerator, and not Main. Any chance the module statement in the file is wrong?

Re: [Haskell-cafe] Re: databases in Haskell type-safety

2009-01-29 Thread Alistair Bayley
I recently got an email back from Alstair Bayley who is one of the Takusen authors, and they said they are preparing a GHC 6.10 release (I was *not* the only person to submit a patch for ghc 6.10 building) but it may take a little while. You might want to get in contact with Alstair and ask

[Haskell-cafe] ANN: Takusen 0.8.3

2008-07-11 Thread Alistair Bayley
Changes since 0.8.1 (I put 0.8.2 up on hackage with an error in Setup.hs, so it's been skipped): - ODBC support: datetime marshalling is improved. For bind parameters this uses the timestamp struct for most back-ends, but String for MS SQL Server because populating the timestamp struct

Re: [Haskell-cafe] The state of database libraries

2008-07-04 Thread Alistair Bayley
2008/7/4 Chris Eidhof [EMAIL PROTECTED]: I'm figuring out how to do databases in Haskell (on OS X). So far, I've tried the following approaches: 1. hdbc. I'd like to connect to MySQL, so I need the ODBC backend. I couldn't get this to work under OS X, while I installed myodbc, which seems

Re: Takusen build error

2008-07-01 Thread Alistair Bayley
I get a strange error building Takusen (more precisely: the module Foreign/C/UTF8.hs) with ghc-6.8.3. It says [1 of 9] Compiling Foreign.C.UTF8 ( Foreign/C/UTF8.hs, dist/build/Foreign/C/UTF8.o ) /tmp/ghc18936_0/ghc18936_0.s: Assembler messages: /tmp/ghc18936_0/ghc18936_0.s:1257:0:

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-30 Thread Alistair Bayley
Yes... I've had a quick look at the instant client packages. The SDK zip just puts the headers under instantclient_10_2/sdk/include (which is still not $ORACLE_HOME/rdbms/public, but c'est la vie). So it looks like the .rpm puts them somewhere completely different:

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-27 Thread Alistair Bayley
2008/6/26 Henning Thielemann [EMAIL PROTECTED]: Do you need to say -lclntsh when you use ghc to compile? Ah, I see, I must run both GHCi and GHC with -package Takusen and everything is fine. This still doesn't seem right. Both ghci and ghc --make should automatically link the package. The

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Alistair Bayley
Now I can start GHCi with the example program you gave me. However I have to start with -lclntsh, otherwise symbol OCIEnvCreate cannot by found. I thought I do not need this option, because the installed Takusen package contains the library name: $ grep clntsh dist/installed-pkg-config

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread Alistair Bayley
$ ll $ORACLE_HOME/lib ... I assume that libociei.so is the library I need. Actually it's libclntsh.so. You need to change the oracle section in Takusen.cabal to this: hand-slaps-forehead/ Another difference between Windows and Linux Oracle installations is that the client libs are in

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread Alistair Bayley
I'll have to change the way that Setup.hs tries to find $ORACLE_HOME. Using getEnv would be a much better idea. I don't recall why I didn't use it before; perhaps it's not always set on Windows installations. Try this version of configOracle in Setup.hs: configOracle verbose buildtools = do

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Alistair Bayley
2008/6/24 Henning Thielemann [EMAIL PROTECTED]: (I remain on the list in order to fill the archive with information, others may need, too.) As you wish. (Btw. Takusen should be split into several packages for all database backends because Cabal flags must not influence the package

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Alistair Bayley
2008/6/24 Henning Thielemann [EMAIL PROTECTED]: When you run configure, you should get output that says: Using Oracle: path What is path? I don't get these questions. Sorry. I was really asking (not very clearly): what is the output from runhaskell Setup.hs configure -foracle ? You've

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-20 Thread Alistair Bayley
2008/6/20 Alistair Bayley [EMAIL PROTECTED]: Is there a way of accessing a remote Oracle database by one of the common Haskell database interfaces (HaskellDB, Takusen, etc.) ? I tried to get unixODBC and Oracle's Instant Client running on a Linux machine, but I'm trapped in the notorious error

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-19 Thread Alistair Bayley
Is there a way of accessing a remote Oracle database by one of the common Haskell database interfaces (HaskellDB, Takusen, etc.) ? I tried to get unixODBC and Oracle's Instant Client running on a Linux machine, but I'm trapped in the notorious error: Takusen's Oracle backend uses the Oracle

Re: Haddock, .lhs, and GHC

2008-06-16 Thread Alistair Bayley
I never thought about that. I've been using Setup.hs with #!/usr/bin/env runhaskell and never had any problems. I guess the only thing that would be gained by using Setup.lhs is the ability to compile the setup program. Is that something that's commonly done? That's what I do. My normal

Re: [Haskell-cafe] What to do when GHC works, RUNGHC fails

2008-05-23 Thread Alistair Bayley
2008/5/23 Peter Verswyvelen [EMAIL PROTECTED]: So it seems the GHCi linker is not using the metadata in the library file correctly? The libpng.dll.a library file clearly contains a reference to libpng3.dll, and I guess since GHC is using the GCC linker, this works fine, but GHCi most likely

[Haskell-cafe] Std lib equivalent for liftM concat . sequence

2008-05-16 Thread Alistair Bayley
A couple of days ago I had need for: concatM :: Monad m = [m [a]] - m [a] concatM = liftM concat . sequence but found no such thing in the std libs, except perhaps for msum (I don't want to add instances for MonadPlus. Should I have to?). Have I missed something trivial? Alistair

[Haskell-cafe] ANN: Takusen 0.8.1

2008-03-21 Thread Alistair Bayley
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Takusen-0.8.1 This is a fairly minor bugfix release. although there are some API changes. Mainly, we've re-exported a lot of the types from Database.InternalEnumerator in Database.Enumerator. This will hopefully address a common complaint

Re: [Haskell-cafe] Need Cabal/library building help for windows

2008-03-18 Thread Alistair Bayley
On 17/03/2008, Felix Martini [EMAIL PROTECTED] wrote: Ryan Ingram wrote: For reference, I'm using GHC6.8.1 on WinXP. setup.hs: ld is required but it could not be found. I did have the same issue with GHC 6.8.1 on Windows. It is fixed in version 6.8.2.

Re: [Haskell-cafe] haddock as a markdown preprocessor

2008-02-21 Thread Alistair Bayley
On 21/02/2008, Duncan Coutts [EMAIL PROTECTED] wrote: To be honest I like the fact that haddock's markup is really simple and perhaps somewhat restrictive. A great improvement though would be to make it easy to extract the docs from haddock in a nice format so that the could be re-used in

Re: [Haskell-cafe] ANN: Leksah 0.1 - Haskell IDE written in Haskell

2008-02-14 Thread Alistair Bayley
Leksah is written by me and published under a GPL-2 license. Leksah can be optained via Hackage: http://hackage.haskell.org/ Darcs development repository: http://code.haskell.org/leksah I just downloaded this from hackage and went through the usual Cabal ritual. The build fails with [16 of

Re: [Haskell-cafe] ANN: Leksah 0.1 - Haskell IDE written in Haskell

2008-02-14 Thread Alistair Bayley
On 14/02/2008, Alistair Bayley [EMAIL PROTECTED] wrote: src/IDE/Utils/File.hs:161:33: Couldn't match expected type `Either String String' against inferred type `String' Never mind; I've just realised this is because I have the latest dev version of Cabal installed. Alistair

Re: code.haskell.org vs darcs.haskell.org (was [Haskell-cafe] Enterprise Haskell AMQP library)

2008-01-29 Thread Alistair Bayley
On 29/01/2008, Henning Thielemann [EMAIL PROTECTED] wrote: Thanks for the clarification! I added it to http://www.haskell.org/haskellwiki/Haskell.org_domain Can you insert the link to the web-submission system? I've done this. I also tried to request an account on code.haskell.org, but

[Haskell-cafe] Data.Generics: how do I get the type name of a value?

2007-12-14 Thread Alistair Bayley
I've been learning/playing with Data.Generics a bit, and have a how-to question... If I say dataTypeOf then I get DataType {tycon = Prelude.[], datarep = AlgRep [[],(:)]} No surprises there. But I'd really like to know that I have a String, or [Char]. How do I get the name of the concrete

Re: [Haskell-cafe] Data.Generics: how do I get the type name of a value?

2007-12-14 Thread Alistair Bayley
On 14/12/2007, Neil Mitchell [EMAIL PROTECTED] wrote: http://haskell.org/hoogle/?q=typeOf Another great thing is that this bit also works in Hugs, while the Data.Generics stuff is GHC only. Great, thanks. Didn't occur to me to look further up the class hierarchy :-) Alistair

Re: [Haskell-cafe] Why is this strict in its arguments?

2007-12-06 Thread Alistair Bayley
Use of isNothing and fromJust and a cascade of ifs is generally a poor sign, much better to use case: findAllPath pred (Branch lf r rt) | pred r = case (findAllPath pred lf,findAllPath pred rt) of (Nothing,Nothing) - Nothing (Nothing,Just

GHC's CPP and Cabal's unlit

2007-11-28 Thread Alistair Bayley
I'm doing some testing with GHC 6.6.1 and Cabal 1.3, and I'm trying to figure out what happens with CPP and Cabal's unlit. I start with file Test.lhs: {-# OPTIONS -fglasgow-exts #-} module Test where main = putStrLn hello CPP and run command: ghc -E -x hs -cpp Test.lhs -o Test2.lhs which

Re: GHC's CPP and Cabal's unlit

2007-11-28 Thread Alistair Bayley
More puzzling is that the files that Cabal runs through ghc's CPP don't get the # n lines, so we end up with something like this: (Answering my own message) Having done some more testing with ghc-6.8.1 and ghc-6.6.1 and cabal's 1.1.6.2 and 1.3, I've realised that the cpp optP-P option in

Re: [Haskell-cafe] Cabal and DB packages

2007-11-25 Thread Alistair Bayley
On 25/11/2007, Thomas Schilling [EMAIL PROTECTED] wrote: On Sun, 2007-11-25 at 18:49 +0100, manu wrote: Hello, I'm trying to do something that should be fairly simple, installing some DB package so I can use MySQL or SQLite. with Takusen : $ runhaskell Setup.hs configure

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

2007-10-08 Thread Alistair Bayley
On 05/10/2007, Andrew Coppin [EMAIL PROTECTED] wrote: So the question becomes: do you want to attract/seduce this kind of programmer? Let's assume the answer is yes :-) Um... that assumpion troubles me. ... I think if we want to get anywhere we need to look at targeting people whom

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

2007-10-08 Thread Alistair Bayley
On 08/10/2007, Henning Thielemann [EMAIL PROTECTED] wrote: You cannot turn any programmer into a disciplined programmer just by giving him a well designed language. I you try so, they will not like to use that language, will leave that language as soon as possible or they try to adapt the

Re: [Haskell-cafe] Re: Error building takusen with Cabal-1.1.6.2

2007-08-19 Thread Alistair Bayley
Setup.hs:13:7: Could not find module `Distribution.Compat.FilePath': it is hidden (in package Cabal-1.1.6.2) This is what I did to make takusen build with ghc-6.6.1: [EMAIL PROTECTED]: .../haskell/takusen_0 darcs whatsnew { hunk ./Setup.hs 13 -import

Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-07-22 Thread Alistair Bayley
the functions (and so to ensure ordered evaluation?) Alistair {-# OPTIONS_GHC -fglasgow-exts #-} -- | -- Module : Foreign.C.UTF8 -- Copyright : (c) 2004 John Meacham, Alistair Bayley -- License : BSD-style -- Maintainer : [EMAIL PROTECTED] -- Stability : experimental

Re: [Haskell-cafe] haskell - db, on Solaris

2007-07-11 Thread Alistair Bayley
http://www.haskell.org/haskellwiki/Applications_and_libraries/Database_interfaces If you want to talk to MySQL, you have a few choices. HDBC has an ODBC interface that lets you use any ODBC provider, so you'll be able to talk to both MySQL and Oracle with it. HaskellDB can bridge to

Re: [Haskell-cafe] sha1 implementation thats only 12 times slower then C

2007-07-03 Thread Alistair Bayley
On 03/07/07, Anatoly Yakovenko [EMAIL PROTECTED] wrote: inlining some of the functions definitely gave me a boost, so i am about 8.5 times slower then openssl sha1sum. I dont really understand the core output, but after inlining i got a completely different profile output, i am guessing its

Re: [Haskell-cafe] Building Yi (and wider Cabal stuff)

2007-06-17 Thread Alistair Bayley
I'm trying to build Yi (from the darcs repository) to take a look at it. The README that comes with it says it's a standard Cabal project so do what you normally do (paraphrased slightly). The problem is that I'm not a cabal user just yet and have no idea where to go from here. The

Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-06-15 Thread Alistair Bayley
Simon, Sorry for the delay on responding. I'm using 6.6, so I'll upgrade to 6.6.1 and retest. Preusmably you're only interested if this behaviour persists in 6.6.1. I'll check both cases and make a test cases for them if necessary. I've upgraded to 6.6.1 and am pleased to report that there

Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-06-08 Thread Alistair Bayley
Simon, You're right, both versions should give the same code. Which version of GHC are you using? Both with the HEAD and with 6.6.1 I get the nice unboxed code with the `seq` version too. My test program is below. I'm using 6.6, so I'll upgrade to 6.6.1 and retest. Preusmably you're only

Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-06-05 Thread Alistair Bayley
{- Arity: 4 Strictness: LSSL -} Right. Unboxed args are always given the annotation L. So that function is strict in that pointer arg, but GHC is choosing not to unbox it. I'm not sure why that's the case. I thought maybe it was because I hadn't said -funbox-strict-fields, but it didn't

Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-06-04 Thread Alistair Bayley
On 04/06/07, Duncan Coutts [EMAIL PROTECTED] wrote: On Mon, 2007-06-04 at 09:43 +0100, Alistair Bayley wrote: After some experiments with the simplifier, ... The portable unboxed version is within about 15% of the unboxed version in terms of time and allocation. Well done. Of course

Fwd: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-06-04 Thread Alistair Bayley
(this time include the list, too) -- Forwarded message -- From: Alistair Bayley [EMAIL PROTECTED] Date: 04-Jun-2007 16:13 Subject: Re: [Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen To: Duncan Coutts [EMAIL PROTECTED

[Haskell-cafe] How to read -ddump-hi output (and other phases) from GHC

2007-06-04 Thread Alistair Bayley
I'm collecting links to documents describing some of GHC's optimisation output flags, like -ddump-hi and -ddump-simpl. I'll add stuff to this wiki page: http://www.haskell.org/haskellwiki/Performance/GHC So far I've found little bits in the GHC manual, like: 4.16.3. How to read Core syntax

[Haskell-cafe] Optimising UTF8-CString - String marshaling, plus comments on withCStringLen/peekCStringLen

2007-05-23 Thread Alistair Bayley
anyone have any evidence or opinion as to which case is the most common: bytes, or encoding units? Alistair -- | -- Module : Foreign.C.UTF8 -- Copyright : (c) 2004 John Meacham, Alistair Bayley -- License : BSD-style -- Maintainer : [EMAIL PROTECTED] -- Stability : experimental

Re: [Haskell-cafe] flip fix and iterate (was: Lazy IO and closing of file handles)

2007-03-20 Thread Alistair Bayley
On 20/03/07, Bryan Burgers [EMAIL PROTECTED] wrote: On the topic of 'fix', is there any good tutorial for fix? I quite liked this one: http://dreamsongs.org/Files/WhyOfY.pdf Alistair ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

2007-03-09 Thread Alistair Bayley
Does anyone have hs-plugins working on WinXP with ghc-6.6? When I run the simple test below I get this error: Main: c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free' Main: user error (Dynamic loader returned: user error (resolvedObjs failed.)) Am I doing something obviously dumb? Alistair

[Haskell-cafe] Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

2007-03-09 Thread Alistair Bayley
Is this using the darcs repository version of hs-plugins? That's the only versions that works with 6.6 Just got, built, and installed the repo version, and it has the same problem. Alistair ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

2007-03-09 Thread Alistair Bayley
You managed to build the darcs version under ghc 6.6? For me runghc setup.hs configure fails with lots of strange error messages... (below) other packages build ok. Rene. C:\repos\hs-pluginsdarcs pull plink: unknown option -O Pulling from http://www.cse.unsw.edu.au/~dons/code/hs-plugins;... No

Debugging concurrent program - no threads apparently running, but RTS still doing something.

2007-02-22 Thread Alistair Bayley
Below is a test case for a threading problem I can't figure out. It models a socket server (here I've replaced the socket with an MVar, to keep it simple). The idea is to have a listener which accepts incoming requests on the socket. When one arrives, it forks a handler thread to deal with the

Re: Debugging concurrent program - no threads apparently running, but RTS still doing something.

2007-02-22 Thread Alistair Bayley
The problem is that when the main thread ends, the RTS doesn't stop for another 6 or so seconds. The only thread that runs this long is the handler (waitFor (secs 8.0)) but it has already been killed. So I'm scratching my head a bit. Short answer: use -threaded. The runtime is waiting for a

[Haskell-cafe] Re: Debugging concurrent program - no threads apparently running, but RTS still doing something.

2007-02-22 Thread Alistair Bayley
The problem is that when the main thread ends, the RTS doesn't stop for another 6 or so seconds. The only thread that runs this long is the handler (waitFor (secs 8.0)) but it has already been killed. So I'm scratching my head a bit. Short answer: use -threaded. The runtime is waiting for a

Re: [Haskell-cafe] FFI basics

2007-02-09 Thread Alistair Bayley
I would like to use FFI for the first time. Can someone give me a really, really simple complete example? Everything I found on the wiki seems way beyond that - maybe I missed it. I am using GHC. I am not using Windows. From the old wiki: http://www.haskell.org/hawiki/FfiCookbook

Re: [Haskell] ANNOUNCE: Data.CompactString 0.1 - my attempt at a Unicode ByteString

2007-02-05 Thread Alistair Bayley
On 05/02/07, Chris Kuklewicz [EMAIL PROTECTED] wrote: shelarcy wrote: Many Hasekll UTF-8 libraries doesn't support over 3 byte encodings. UTF-8 uses 1,2,3, or 4 bytes. Anything that does not support 4 bytes does not support UTF-8 Well, some of them are probably a bit dated; they likely

[Haskell] ANN: Takusen 0.6

2007-02-02 Thread Alistair Bayley
We are pleased to announce a new release of Takusen. There are a large number of changes and bug-fixes: - Oracle support for processing cursors returned from procedure calls - withContinuedSession supports connection reuse (e.g. for persistent connections and connection pooling) - new README file

[Haskell-cafe] ANN: Takusen 0.6

2007-02-02 Thread Alistair Bayley
We are pleased to announce a new release of Takusen. There are a large number of changes and bug-fixes: - Oracle support for processing cursors returned from procedure calls - withContinuedSession supports connection reuse (e.g. for persistent connections and connection pooling) - new README file

Re: [Haskell-cafe] Simple HTTP lib for Windows?

2007-01-18 Thread Alistair Bayley
I'd like to write a very simple Haskell script that when given a URL, looks up the page, and returns a string of HTML. I don't see an HTTP library in the standard libs, and the one in Hackage requires Windows machines have GHC and MinGW to be installed and in the PATH. Is there a simple way to

Re: [Haskell-cafe] importing Distribution.Compat.FilePath fails

2006-11-19 Thread Alistair Bayley
On 18/11/06, Magnus Therning [EMAIL PROTECTED] wrote: Could not find module `Distribution.Compat.FilePath': it is hidden (in package Cabal-1.1.6) I want to use 'joinFileName'. Try upgrading to 1.1.6.1. This explains why:

Re: Here-docs in Haskell source

2006-09-23 Thread Alistair Bayley
On 22 Sep 2006 23:54:42 -0400, Ian Zimmerman [EMAIL PROTECTED] wrote: Here's a quick test: put the cursor in front of a triple-quoted string, then hit Control-Alt-F (forward-sexp). It should move just after the whole string. Does it? Any tool which assumes strings are delimited by a single

  1   2   >