[Haskell-cafe] more haskeem: it's just scheme in haskell now, no more "almost"

2008-02-03 Thread Uwe Hollerbach
Hello, haskellers, my mud pies are getting bigger: I have added an
exception-handling mechanism to haskeem (ie, for handling exceptions
at the scheme level, not the haskell level; that was already working),
and also hooked up the REPL to gnu readline: the example code for the
readline command was practically tailor-made for me! :-)

Also, I must apologize: I screwed up the URL earlier: I had said
http://www.korgwal.com/software/haskeem/ and then promptly went and
stuck it into http://www.korgwal.com/haskeem/ ... you may attribute
that to rapidly-advancing senility, if you like, I won't contradict
you. Anyway, I've fixed it by simply putting copies into both places.

regards,
Uwe Hollerbach
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-03 Thread Magnus Therning
Duncan Coutts wrote:
> On Sat, 2008-02-02 at 22:33 +, Magnus Therning wrote:
>> Duncan Coutts wrote:
>> [..]
>>> Just so I'm sure I understand...
>> Sure thing.
>>
>>> Or are you just trying to link some C code statically into a haskell
>>> program, but it just so happens that this C code relies on being built
>>> with MS's C compiler rather than gcc.
>> Yes, this is exactly it.  I mean, I could probably hack the incomplete
>> mingw header files to add the functions I need, but I thought it'd be
>> much easier to just use Microsoft's development environment.
>>
>>> Perhaps you could clarify what it is you're trying to do (the end goal,
>>> just just the minutia) so we can see what feature it is that Cabal is
>>> missing that would help your situation. When we figure that out we can
>>> file a feature request so it is not forgotten.
>> The end goal is to sneak Haskell into the work place ;-)
>>
>> What I'd really like to see is the ability to “drive” development
>> completely from Haskell.  With that I mean to, just as on Linux, have a
>> single cabal file that compiles the C code containing the wrappers while
>> still having access to a complete development environment.  On Windows
>> that means compiling C/C++ with MS's tool set.
>>
>> I hope that clarifies what goes on in my muddy mind a bit...
> 
> Ok, so you could create a separate component to produce the .dll / .a
> from the C code but you'd prefer the convenience of being able to just:
> c-sources: blah.c
> and have them included in the project, but built using the MS C
> compiler.
> 
> So I think we should file a feature request about building C sources
> using gcc/ms-c directly rather than going via ghc as that would give us
> the flexibility to use alternative C compilers.
> 
> Perhaps you'd like to file it, otherwise I can.
> http://hackage.haskell.org/trac/hackage/

I raised ticket 229 for this issue.

/M

-- 
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus.therning@gmail.com
http://therning.org/magnus

What if I don't want to obey the laws? Do they throw me in jail with
the other bad monads?
 -- Daveman



signature.asc
Description: OpenPGP digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-03 Thread Bulat Ziganshin
Hello Duncan,

Sunday, February 3, 2008, 5:24:22 AM, you wrote:

> Ok, so you could create a separate component to produce the .dll / .a
> from the C code but you'd prefer the convenience of being able to just:
> c-sources: blah.c
> and have them included in the project, but built using the MS C
> compiler.

> So I think we should file a feature request about building C sources
> using gcc/ms-c directly rather than going via ghc as that would give us
> the flexibility to use alternative C compilers.

sorry, i think it's not whole story. gcc and msvc are probably
incompatible in the meaning that you can't link together code
produced by two compilers. exactly dll should be generated which allow
to avoids this incompatibility


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] SPJ on the radio (at .NET Rocks :)

2008-02-03 Thread Daniil Elovkov

It's great to see that Haskell and FP gains more and more visibility.

One very little comment, continuing on the topic of mathematical schools 
and traditions:
Shönfinkel was not a German mathematician, but a Soviet one (he was 
Jewish, of course).


Taking into account the fact that he already worked before 1917, he can 
also be called Russian mathematician, probably.


And also Ukrainian, since he seems to have been born in Ukraine.

Don Stewart wrote:

Simon talks about laziness, purity and other FP concepts
to some .NET guys. Simon starts 7minutes 20seconds in.

http://www.dotnetrocks.com/default.aspx?ShowNum=310

Good work Simon!

-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Yi, or Gtk2hs or fedora rpm problem?

2008-02-03 Thread Jon Fairbairn
This was mentioned on the yi-devel list

but didn't cause much excitement as it's not clear whose
problem it is, so I'll ask here as well:

I recently downloaded yi-0.3 and tried to build it, but get 

Loading package base ... linking ... done.
Loading package array-0.1.0.0 ... linking ... done.
Loading package bytestring-0.9.0.1 ... linking ... done.
Loading package regex-base-0.72.0.1 ... linking ... done.
Loading package regex-posix-0.72.0.2 ... linking ... done.
Loading package regex-compat-0.71.0.1 ... linking ... done.
Loading package fingertree-0.0 ... linking ... done.
Loading package mtl-1.1.0.0 ... linking ... done.
Loading package glib-0.9.12.1 ... linking ... done.
Loading package cairo-0.9.12.1 ... linking ... done.
yi: /usr/lib/ghc/6.8.2/gtk2hs/HSgtk.o: unknown symbol 
`containerszm0zi1zi0zi1_DataziSequence_length_info'
Loading package gtk-0.9.12.1 ... linking ... yi: exception :: GhcException

for any attempted invocation of yi.  I don't know whether
this problem is specific to yi, to gtk2hs or to the fedora 8
rpm of gtk2hs or something else (ghc 6.8.2). I tried to rpm
--rebuild the gtk2hs source rpm, but the build failed,
complaining of missing documentation files (the spec file
can't be right, or I'd have seen an unsatisfied
build-dependency message instead). What's the next step?


-- 
Jón Fairbairn [EMAIL PROTECTED]


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] hdbc, Oracle, and Solaris

2008-02-03 Thread Daniil Elovkov

Hello folks.

I don't understand whether hdbc has a specific Oracle backend or not 
(not via odbc). It is listed in the description of hdbc, but not really 
found elsewhere, it seems.


I'd like to have a non-odbc support because it is very desirable to have 
it working on Solaris, and I'm not sure if it will be easy to set it up 
with odbc there.


So, the question might go: has somebody had success with native Oracle 
support on Solaris with hdbc? Well, or hsql?



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] more haskeem: it's just scheme in haskell now, no more "almost"

2008-02-03 Thread Don Stewart
uhollerbach:
> Hello, haskellers, my mud pies are getting bigger: I have added an
> exception-handling mechanism to haskeem (ie, for handling exceptions
> at the scheme level, not the haskell level; that was already working),
> and also hooked up the REPL to gnu readline: the example code for the
> readline command was practically tailor-made for me! :-)
> 
> Also, I must apologize: I screwed up the URL earlier: I had said
> http://www.korgwal.com/software/haskeem/ and then promptly went and
> stuck it into http://www.korgwal.com/haskeem/ ... you may attribute
> that to rapidly-advancing senility, if you like, I won't contradict
> you. Anyway, I've fixed it by simply putting copies into both places.
> 
> regards,
> Uwe Hollerbach

Lovely work. And excellent advice on your page for new Haskell
programmers wanting to get their hands dirty.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] RE: highlighting-kate - syntax highlighting library

2008-02-03 Thread mgsloan
Awesome!  It looks quite nice, though it takes ages to compile.

Would this be suitable for a text editor? One issue with text editors
is you don't want to reprocess the entire file for each highlight.
This, combined with multi-line syntactic elements, such as multiline
strings or comments, makes for a rather awkward combination.  It
becomes a bit harder to predict the scope, highlighting wise, of
editing actions.  It may not really be necessary to do this very well.
 I for one find it annoying when you introduce an opening/closing
symbol, it freezes for an instant, and the highlighting of the rest of
the document alternates...  So perhaps it could check if you're
introducting a multiline element at the end when navigating off,
re-evaluate highlighting of the rest of the document.

Regardless of if the library can handle the requirements of
text-editing in its current state, it looks like it wouldn't be too
hard to add.  Most of the work has been done :)

Thanks!
-Michael Sloan
http://mgsloan.nfshost.com

> Hello all,
>
> I've been working on a source code syntax highlighting library. It is
> now somewhat usable, and help would be welcome in testing it further, so
> I'm making it publicly available:
>
> darcs get http://johnmacfarlane.net/repos/highlighting-kate
>
> Currently, the following languages are supported:
>
> AdaAsp  AwkBash Bibtex
> C  CmakeColdfusion Commonlisp   Cpp
> CssDDiff   Djangotemplate   Doxygen
> DtdErlang   FortranHaskell  Html
> Java   Javadoc  Javascript Json Latex
> LexLiterateHaskell  LuaMakefile Matlab
> Mediawiki  Nasm Objectivec Objectivecpp Ocaml
> Pascal Perl PhpPostscript   Prolog
> Python Ruby Scala  Scheme   Sgml
> SqlSqlMysql SqlPostgresql  Tcl  Texinfo
> XmlXslt Yacc
>
> The parsers for individual languages are automatically generated
> from Kate syntax definitions.  The xml files have been included
> in the repository, together with the program that converts them to
> Haskell modules.  There's also a standalone program, Highlight, that
> you can use to test the highlighting. (See README for instructions.)
>
> Bug reports and patches are welcome.  Note that I don't want to make
> any manual modifications to the generated modules in
> Text/Highlighting/Kate/Syntax. Changes should be made either in the
> source xml files or in the program ParseSyntaxFiles.hs that generates
> these modules.
>
> John
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] parsec3 pre-release [attempt 2]

2008-02-03 Thread Antoine Latter
Another picky nit:

The monad transformer type is defined as such:

> data ParsecT s u m a
> = ParsecT { runParsecT :: State s u -> m (Consumed (m (Reply s u a))) }

with the Consumed and reply types as:

> data Consumed a  = Consumed a
>  | Empty !a

> data Reply s u a = Ok !a !(State s u) ParseError
>  | Error ParseError

What's the advantage of having a double-wrapping of the base monad `m'
over the simpler type:

data ParsecT s u m a
= ParsecT { runParsecT :: State s u -> m (Consumed (Reply s u a)) }

-Antoine
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] RE: highlighting-kate - syntax highlighting library

2008-02-03 Thread Colin Paul Adams
> "Michael" == mgsloan  <[EMAIL PROTECTED]> writes:

Michael> Awesome!

>> I've been working on a source code syntax highlighting
>> library. It is now somewhat usable, and help would be welcome
>> in testing it further, so I'm making it publicly available:
>> 
>> darcs get http://johnmacfarlane.net/repos/highlighting-kate
>> 
>> Currently, the following languages are supported:
>> 
>> Ada Asp Awk Bash Bibtex C Cmake Coldfusion Commonlisp Cpp Css D
>> Diff Djangotemplate Doxygen Dtd Erlang Fortran Haskell Html
>> Java Javadoc Javascript Json Latex Lex LiterateHaskell Lua
>> Makefile Matlab Mediawiki Nasm Objectivec Objectivecpp Ocaml
>> Pascal Perl Php Postscript Prolog Python Ruby Scala Scheme Sgml
>> Sql SqlMysql SqlPostgresql Tcl Texinfo Xml Xslt Yacc

Not to me. Where is Eiffel?
-- 
Colin Adams
Preston Lancashire
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] RE: highlighting-kate - syntax highlighting library

2008-02-03 Thread Felipe Lessa
On Feb 3, 2008 6:42 PM, mgsloan <[EMAIL PROTECTED]> wrote:
> Would this be suitable for a text editor?

Note that we already have a binding to GtkSourceView, see
http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-SourceView.html
.

Cheers,

-- 
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] IRC Statistics

2008-02-03 Thread Vlad Dogaru

Hello,

as part of an effort to learn Haskell, me and a few friends want to 
write an IRC statistcs generator. It would analyse logs and output HTML, 
text, or whatever other format. However, I have a few questions; we're 
all pretty new to this and it would be a shame to start off terribly 
wrong and get bored before we get to the fun parts.


1. Is there a similar effort in Haskell? I've seen a truly awesome 
IRCStats, but written in C (not that that's a bad thing).


2. I was thinking of the following structure:
  * a uniform Event format: joins, parts, actions, normal lines, and 
everything about them: the user, date and time, etc.
  * functions that parse logs to a list of events. Exotic log format? 
Just write a different function! (whatever `exotic' may mean)
  * functions that do various statistics on a list of events. The 
output will not be uniform. Examples are: who spoke most, what time 
people speak most, etc.
  * some way to make these into a common output form, maybe every above 
module having two functions, one for `internal' format, and one for 
converting that to proper output.


Now, there will probably be a lot of opportunities to ask for feedback 
on possible statistics and log formats. My (main) question is whether 
you see anything conceptually wrong in this approach.


With a bit of luck, we will be announcing hirst-0.1 in a few weeks or 
months (we're doing this while having schoool and other engagements).


Thank you for your time,

Vlad

PS: This is my first post here, please point out any inadequacy.
--
There is nothing more dangerous than an
idea when it is the only one you have.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: strictify 0.1

2008-02-03 Thread Sterling Clover

Dear Friend,
  Have you ever stared at a maze of Haskell code and thought "Gosh,  
I'm just feeling lazy today. Everything works, and I mainly  
understand the strictness characteristics of my program. But I just  
can't decide where to put those last few bangs. Maybe I don't need to  
micro-optimize anyway." Sure you have. It's ok. You can let it out.  
You're among friends here. Why, I bet you've even gone and sprinkled  
some bangs randomly, hoping for the best. We've all been there.
  Maybe you even got those pesky strictness annotations right, but a  
new version of GHC with its ever improving strictness analyzer came  
along and rendered some obsolete. And yet there they still lie,  
consuming whole tens of picoseconds worth of your hard-earned  
processor cycles and troubling your dreams.
  Well, friend, your dreams need be troubled no more. The time has  
come for a new era! The era of strictifiericization version 0.1. An  
era where you can kiss those micro-optimization troubles over silly  
shootout entries goodbye! Instead of brute-forcing your way through  
permutations of strictness entries let your computer do the work for  
you. That's why we invented them after all!
  Rather than putting "!" in just the right places, put "{- ! -}" in  
every place you _might_ want a strictness annotation. Then sit back,  
pop open a cool refreshing brew, and wait (and wait and wait) as  
strictify does the rest!*


Available now now now at hackage: http://hackage.haskell.org/cgi-bin/ 
hackage-scripts/package/strictify-0.1

Darcs repository at: http://code.haskell.org/~sclv/strictify/

*To prevent exponential running time, strictify only produces a local  
rather than global optimum of strictness patterns, which should be  
sufficient in 99% of all cases. Strictify only works on POSIX- 
compliant systems. Strictify is currently only suitable for  
"shootout"-style executables which are contained in a single main  
file, accepting input from argv, stdin, or both. Strictify will not  
fully execute until it recieves an EOF in stdin. If you cannot  
produce an EOF through ctrl-D and are not streaming an input file in,  
you may be forced to run "echo "" | strictify". No guarantee is made,  
express or implied, as to strictify improving the speed of your  
program or your mental acuity regarding strictness. Offer void where  
prohibited. As strictify contains small parts, it is not suitable for  
children under the age of five. Do not ingest strictify more than  
seventy five times in a one hour period. If symptoms persist, consult  
your physician.


--S
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: highlighting-kate - syntax highlighting library

2008-02-03 Thread John MacFarlane
> Not to me. Where is Eiffel?

I've just added it.  The library is so big already that I left out a
bunch of languages for which there are Kate syntax definitions.  But I'm
happy to add them on request.

John
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Poor libraries documentation

2008-02-03 Thread Ben Franksen
Neil Mitchell wrote:
> I went looking for the the function in Haskell to calculate cos^{-1},
> inverse cosine. Unfortunately, the poor documentation in the libraries
> hampered my attempts. The documentation for the trig functions in
> Haskell is completely non-existent:

Similar for mtl library. Some of the modules are documented, but many aren't
at all. This has been a problem for me with the new Control.Monad.XYZ.Lazy
vs. ...Strict stuff. I honestly don't have a clue what exactly is lazy or
strict here. (I know there has been some discussion about this but I didn't
understand most of it.) Another problem are the more obscure features of
Control.Monad.Writer.Class, such as listen and pass methods. (For these I
finally found an explanation in 'All About Monads'.)

Cheers
Ben

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Who started 42, and when?

2008-02-03 Thread Benjamin L. Russell
That depends partly on how 42 it is pronounced. 
Normally, it is pronounced "yon-juu-ni," which has no
relevance to "death."  However, it is also possible to
pronounce it "shi-ni," which also means "to die." 
Incidentally, it is the 4 part of 42 that is
pronounced "shi," which alternatively means "death,"
and I have heard that there is also no hotel room in
Japan with the number 4.  (However, there are hotel
rooms here with the number 13.)  (Also, items in
department stores are never sold (at least to my
knowledge) in sets of 4.)

In addition, the age 42 is considered a major
climacteric age for men in Japan as well (for those
who can read Japanese, see the Japanese Wikipedia
entry for "yaku-doshi" (climacteric year))
(http://ja.wikipedia.org/wiki/%E5%8E%84%E5%B9%B4). 
(In general, the ages of 25, 42, and 61 are considered
climacteric ages for men, and the ages of 19, 33, and
37 are considered climacteric for women, with 33 being
the major climacteric age for women.  Incidentally, 33
is pronounced "san-zan," which means "disastrous.")

Does anybody else know of any culture where the number
42 holds special meaning; if so, what special meaning?

Benjamin L. Russell

--- Martin Lüthi <[EMAIL PROTECTED]> wrote:

> [snip]
> 
> In the Japanese culture the number 42 has a very
> special meaning. I
> realized that while discussing cultural differences
> with a Japanese.
> Pronouncing 42 sounds like "death" or "to die". No
> hotel in Japan has a
> room 42. 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: bimap 0.1 - a bidirectional map

2008-02-03 Thread Stuart Cook
Data.Bimap is a data structure that represents a bidirectional mapping
between two key types. A bimap has two type parameters; each value in
the bimap is associated with exactly one value of the opposite type.
In other words, it's a bijection between (subsets of) its argument
types.

The API is loosely based on Data.Map; feedback and suggestions are most welcome.

So far I've only tested it on GHC 6.6 on Linux/x86, with Cabal
1.2.3.0. Let me know if it works or breaks on other configurations.


Hackage:
  http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bimap-0.1

Haddocks:
  http://code.haskell.org/~scook0/haddock/bimap/

Darcs:
  darcs get http://code.haskell.org/bimap


Stuart Cook
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Who started 42, and when?

2008-02-03 Thread Anthony Clayden
The earliest use of 42 in English humour I know of is Lewis
Carroll's "Hunting of the Snark", written 1874 when the
author was aged 42. Wikipedia says it all, and refers to
Martin Gardner's "The Annotated Snark" (which is excellent).

Lewis Carroll is the pen name of Charles Dodgson - a
mathematician/logician. Gardner is of course a
mathematician/science writer with an interest in puzzles and
paradoxes. So although both rather pre-date functional
programming, I think we might say there's a similar streak
of humour.

Sadly, Douglas Adams never revealed what language 'Deep
Thought' was programmed in, but perhaps the machine it was
'unworthy to design' was to run Haskell natively?

Anthony

> The arbitrary constant was made popular by Douglas Adams
in  
> the mid-1970s radio series ``A Hitchhikers Guide to the
Galaxy'' (a  
> trilogy in 4 parts) --- however it does have a basis in
the standard  
> model of physics --- a paper in Phys.Rev. of the early
1970s  
> described the unification of the Electro-Weak and Strong
nuclear  
> forces --- the arbitrary constant (of nearly) 42 appears
in the  
> calculations. I forget the original paper but if you get
hold of  
> Frank Close ``The Cosmic Onion'' a graph reproduces the
result. I met  
> Douglas Adams once at a book signing and asked him how he
got hold of  
> the Phys.Rev. paper so early. Technically he should have
written that  
> ``42 is the answer to life, the universe and everything
except for  
> gravity and a few other arbitrary constants''
>
> Adams was interested in computing --- I think his reaction
to being  
> told about functional programming was to wonder what
non-functional  
> programming might be.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] RE: highlighting-kate - syntax highlighting library

2008-02-03 Thread mgsloan
Hmm, yeah, I may switch to that.  Probably more practical than writing
a raw editor ontop cairo.  Won't be able to do a few things I was
intending to, but if I want to replace it with custom stuff later I
suppose I can.

That pretty much takes care of 95% of a text editor.

-Michael Sloan
http://mgsloan.nfhost.com

On Feb 3, 2008 1:38 PM, Felipe Lessa <[EMAIL PROTECTED]> wrote:
> On Feb 3, 2008 6:42 PM, mgsloan <[EMAIL PROTECTED]> wrote:
> > Would this be suitable for a text editor?
>
> Note that we already have a binding to GtkSourceView, see
> http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-SourceView.html
> .
>
> Cheers,
>
> --
> Felipe.
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe