Re: [Haskell-cafe] How to make a dock window for xmonad using gtk2hs?

2009-03-08 Thread Brandon S. Allbery KF8NH

On 2009 Mar 8, at 23:45, Magicloud Magiclouds wrote:

Here is my window, seems right... but cannot get a gap


Once again: where's the _NET_WM_STRUT?  I've looked through your  
properties, but none of them is _NET_WM_STRUT. Non-tiling window  
managers may dock the window in a default fashion because of  
_NET_WM_WINDOW_TYPE, but xmonad needs to know how much space to  
reserve for it.



WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
window id # of group leader: 0x181
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 25165829
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x184
WM_CLIENT_LEADER(WINDOW): window id # 0x181
_NET_WM_PID(CARDINAL) = 16671
WM_LOCALE_NAME(STRING) = "zh_CN.UTF-8"
WM_CLIENT_MACHINE(STRING) = "shidaw.desktop.amazon.com"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 162 by 54
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS,
_NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "sideBar.rb", "SideBar.rb"
WM_ICON_NAME(STRING) = "sideBar.rb"
_NET_WM_ICON_NAME(UTF8_STRING) = 0x73, 0x69, 0x64, 0x65, 0x42, 0x61,
0x72, 0x2e, 0x72, 0x62
WM_NAME(STRING) = "sideBar.rb"
_NET_WM_NAME(UTF8_STRING) = 0x73, 0x69, 0x64, 0x65, 0x42, 0x61, 0x72,
0x2e, 0x72, 0x62


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Logo Preferences

2009-03-08 Thread Benjamin L . Russell
On Sun, 08 Mar 2009 16:19:43 -0700, Ashley Yakeley
 wrote:

>[...]
>
>I'm currently liking
>
>30 (specifically, 30.7)
>58
>61 (specifically, the second image)
>62

It would be nice to be able to specify a specific member image of a
group of images; for example, the second image in group 61. Currently,
none of the member images in group 61 is individually numbered; will
we be able to choose a specific image from this kind of group?

Also, it might be nice to have some more variations for group 61,
specifically; for example, it may be nice to be able to select the
text for the second image, combined with the snowflake symbol for the
lower-right corner logo of the leftmost rectangle of images:  Although
the font for the two is identical, the spacing is subtly wider in the
former.

-- Benjamin L. Russell
-- 
Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile:  +011 81 80-3603-6725
"Furuike ya, kawazu tobikomu mizu no oto." 
-- Matsuo Basho^ 

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


Re: [Haskell-cafe] bytestring vs. uvector

2009-03-08 Thread Roman Leshchinskiy

On 09/03/2009, at 11:47, Claus Reinke wrote:


Btw, have any of the Haskell array optimization researchers
considered fixpoints yet?


This, for instance, is a very nice paper:

http://www.pllab.riec.tohoku.ac.jp/~ohori/research/OhoriSasanoPOPL07.pdf

However, in the context of high-performance array programming explicit  
recursion is bad because it is very hard if not impossible to  
parallelise automatically except in fairly trivial cases. And if your  
array program is not parallelisable then you don't really care about  
performance all that much :-)


Roman


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


Re: [Haskell-cafe] How to make a dock window for xmonad using gtk2hs?

2009-03-08 Thread Magicloud Magiclouds
Here is my window, seems right... but cannot get a gap

WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
window id # of group leader: 0x181
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 25165829
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x184
WM_CLIENT_LEADER(WINDOW): window id # 0x181
_NET_WM_PID(CARDINAL) = 16671
WM_LOCALE_NAME(STRING) = "zh_CN.UTF-8"
WM_CLIENT_MACHINE(STRING) = "shidaw.desktop.amazon.com"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 162 by 54
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS,
_NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "sideBar.rb", "SideBar.rb"
WM_ICON_NAME(STRING) = "sideBar.rb"
_NET_WM_ICON_NAME(UTF8_STRING) = 0x73, 0x69, 0x64, 0x65, 0x42, 0x61,
0x72, 0x2e, 0x72, 0x62
WM_NAME(STRING) = "sideBar.rb"
_NET_WM_NAME(UTF8_STRING) = 0x73, 0x69, 0x64, 0x65, 0x42, 0x61, 0x72,
0x2e, 0x72, 0x62

On Thu, Mar 5, 2009 at 7:42 PM, Khudyakov Alexey
 wrote:
> On Thursday 05 March 2009 09:45:51 Magicloud Magiclouds wrote:
>> I am confused. Code like this works in other WM, except xmonad.
>
> You code does not set _NET_WM_STRUT property. And because of that xmonad
> doesn't treat it specifically. You can inspect you window properties using
> `xprop' utility.
>
> ___
> 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] where does ghc specify ar options

2009-03-08 Thread Alexy Khrabrov
When bootstrapping cabal-install 0.6.2 on Mac OSX Leopard (Intel), I
get a problem when linking:

Linking dist/build/cabal/cabal ...
ld: in 
/private/var/folders/mw/mwJSf7ErEa4w8nWyKyyqDTY/-Tmp-/zlib-0.5.0.0/dist/build/libHSzlib-0.5.0.0.a,
archive has no table of contents

This had happened with other ar'chives on my Mac before where it
hadn't for some others.  In all cases the fix was to make sure ranlib
is run on the archive in question, or s is passed to ar during the
creation.  I have the latest XCode 312m gcc build 5490, and ghc 6.10.1
from MacPorts.

In order to ensure ar cr becomes ar crs, I need to find out where in
the ghc build process is it known how to create .a files?  Where can
an "ar cr" be changed to "ar crs" on a system-wide ghc build basis?

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


Re: [Haskell-cafe] Logo Preferences

2009-03-08 Thread Wirt Wolff
Excerpts from Ashley Yakeley's message of Sun Mar 08 17:19:43 -0600 2009:
> Eelco Lempsink wrote:
> 
> > The list with options can be found here (for now): 
> > http://community.haskell.org/~eelco/poll.html  Notice that some (very) 
> > similar logos are grouped as one option (thanks to Ian Lynagh) All 
> > submissions compete, so that still makes more than a 100 options!
> > 
> > The voting system we'll use is the Condorcet Internet Voting System 
> > (http://www.cs.cornell.edu/andru/civs.html).
> 
 
> I'm currently liking
> 
> 
> 61 (specifically, the second image)

Forgive my asking for even more options here, (plenty of paint to cover
the shed as it is), but regarding 61, a couple of those are in my top
few, while the rest rank considerably lower. Would it be possible to
distinguish them like the ones in 30? No worries if not, seems there
may need to be some refinement process after this round anyway.

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


Re: [Haskell-cafe] STG's? [was: I want to write a compiler]

2009-03-08 Thread wren ng thornton

Rick R wrote:

Where can I find more information on STGs? Google search doesn't bring up
anything too enlightening.

My curiosity was piqued by http://www.cs.chalmers.se/~gedell/ssc/index.html.
Of course it doesn't indicate how these should be built or the format.


Perhaps http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.18.5865

--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN : happs-tutorial 0.8

2009-03-08 Thread Creighton Hogg
Hello,

I'd like to announce the release of the happstack-0.2 compatible
release of happs-tutorial on hackage and available for perusing on
tutorial.happstack.com.

A number of changes occurred in this release:
* General cleanup of code for readability
* Migration to the new Happstack.Server.SimpleHTTP api
* Addition of a chapter on multimaster, the Spread Toolkit based
system for syncing your applications across multiple Happstack
instances.
* Revised chapters on introducing Happstack.Server and
Happstack.State, with an emphasis on simple, well-commented examples
showing the orthogonality of these separate libraries.
* Minor bug fixes

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


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread wren ng thornton

Manlio Perillo wrote:

Duncan Coutts ha scritto:
> On Sun, 2009-03-08 at 10:00 -0400, Gwern Branwen wrote:
> > http://hackage.haskell.org/trac/hackage/ticket/244
> > http://hackage.haskell.org/trac/hackage/ticket/299
>
> Thanks Gwern. Yes, we're looking for a volunteer to work on implementing
> this.
> One question is what the changelog format should be? Or should it just
> be uninterpreted text? One suggestion was for Hackage and the RSS feed
> to display the diff between the current and previous version of the
> changelog. Or perhaps we can do both, diff it and parse the result as
> haddock markup or something.

Personally, I find a format like:
http://divmod.org/trac/browser/trunk/Nevow/NEWS.txt
simple, compact and flexible.


Nice, simple, and to the point. It reminds me a lot of (a stripped down 
version of) YAML. If we invent a new format, using YAML as the syntax 
would make it easy to manipulate since there are already tools and 
libraries out there for that.



GNU Changelog format is probably an overkill, since nowadays we have 
good revision control systems.


However GNU Changelog format *may* be supported (perhaps the changelog 
format can be specified in a Cabal property).


Like YAML, GNU Changelog has enough history to have a large suite of 
tools for manipulating the format. It's a bit heavy-handed in this day 
and age, but many VCSes can generate it automatically.




As a developer, one of my criteria would be to keep it as lightweight as 
possible (though more formal than raw text). The more work changelogs 
take, the less likely they are to be maintained/accurate.


As a UI issue, I would amend the proposal in ticket #244. Because of the 
way Darcs works around tag boundaries, I've often been lax about tagging 
more frequently than major versions. It'd be nicer to open up the 
pending changelog amendment in $EDITOR so people can adjust it before 
publishing the sdist. (Perhaps with a flag to enable/disable this 
behavior for people who want more automated setups.)


Also helpful would be a command to inject things into the changelog from 
outside the VCS, at times other than when publishing. This is helpful 
for when you realize a version control message omitted details about 
changes, but you can't change the patch, and you don't want to forget 
the details between now and when publishing the new sdist to Hackage. 
Essentially this means the tools should have a pending file for the 
changelog which can be freely modified outside of the system (with some 
in-system tracking so that importing the VCS log and editing it does the 
right thing when trying to import the VCS log again later).


Actually, just having a tool to amend the pending file could be enough. 
Most VCSes have hooks for being able to run things before or after 
committing a patch. Thus, just have a tutorial on setting up the common 
VCSes to commit the same message to the changelog as to the version control.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Logo Preferences

2009-03-08 Thread mithrandi

2009/3/9 Joseph Fredette 


Another alternative, perhaps we rank the first n we care about, and regard the 
rest as ranked as low as possible?

Since Condorcet allows ties, it should work -- I don't know if it _technically_ 
allows for skipping ranks, though, but I imagine it would still work...


Only the relative ranking of the options in your ballot should matter; so there's really 
no such thing as "skipping" a rank. However, I am not familiar with the CIVS 
implementation specifically, so don't take my assertion as authoritative.
--
mithrandi, i Ainil en-Balandor, a faer Ambar

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


Re: [Haskell-cafe] Purely Functional Data Structures

2009-03-08 Thread Andrew Wagner
So...is there some reason this is in the hApps package?

On Sat, Mar 7, 2009 at 9:04 PM, Jeremy Shaw  wrote:

> At Sun, 08 Mar 2009 00:13:14 +0100,
> G?uenther Schmidt wrote:
> > In SQL I would have the data indexed by several
> > different columns, if I use maps I'd only have one key, so if I need to
> > lookup data in the map by a value that is not the key the lookups will
> > become quite expensive.
>
> happstack-ixset offers a data-type similar to Map except that you can
> have multiple keys. You can even have keys that are calculated from
> the data but don't actually appear in the data itself. For, example,
> if your ixset just contains Strings, one of the keys could be the
> length of the String.
>
> happstack-ixset (and its dependencies) also offers compact
> serialization/deserialization of the ixset to disk, data migration
> options, and a smattering of other features that may or may not be
> useful to you.
>
> While happstack-ixset is built to work with happstack, it is does not
> depend on the happstack http server or persistent store layer, so it
> should be useful even if you are not being an application server.
>
> - jeremy
> ___
> 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


Re: [Haskell-cafe] Purely Functional Data Structures

2009-03-08 Thread Richard O'Keefe


On 8 Mar 2009, at 12:13 pm, G?uenther Schmidt wrote:


Hi Don,

damn, that was quick!

And thx, I'll look into that. The reading it in wasn't much of a  
problem, I had been able to use MS-ODBC for that, there's a driver  
for ODBC files. The problem is more the type of data structure I'd  
be reading it into. In SQL I would have the data indexed by several  
different columns, if I use maps I'd only have one key, so if I need  
to lookup data in the map by a value that is not the key the lookups  
will become quite expensive.


Any suggestions, what do you do in these cases?


Who said you could only have one map?
You can have as many as you want:

primary :: Map Key1 (Maybe Whole_Record)
secondary :: Map Key2 [Whole_Record]
...

Adding the same record to both maps won't copy the record.

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


Re: [Haskell-cafe] Parsing floating point numbers

2009-03-08 Thread Daniel Peebles
If you're working with ByteStrings,
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/bytestring-lexing
might help.

Cheers,
Dan

On Sun, Mar 8, 2009 at 8:34 PM, Bjorn Buckwalter
 wrote:
> Hi all,
>
> What is your preferred method of parsing floating point numbers (from
> String to Float/Double)? Parsec it seems only does positive floats out
> of the box and PolyParse requires the float to be on scientific form
> (exponential). While I've worked around these shortcomings in the past
> I feel that I am reinventing the wheel as surely I am not the only to
> run into these limitations. How do you parse your floats? Can you
> recommend a parsing library that handles them solidly?
>
> (For my current needs the formats accepted by "read" are sufficient,
> but I want reasonable error handling (Maybe or Either) instead of an
> exception on bad inputs.)
>
> Thanks,
> Bjorn Buckwalter
> ___
> 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


Re: [Haskell-cafe] Looking for literature

2009-03-08 Thread Don Stewart
claus.reinke:
>> I'm trying to catch up with all the wonderful Haskell Types, classes,  
>> Abstract Data Types, Algebraic Data Types, Types that give peoples  
>> headaches and all the other, deeper stuff I have been happily putting 
>> off.
>
> Hmm, do we need more pragmas?-)
>
> {-# LANGUAGE TypesThatGivePeopleHeadaches #-}
> {-# LANGUAGE DeeperStuffIHaveBeenHappilyPuttingOff #-}
>
> Anyway, a good source of headaches are the research paper
> links collected at haskell.org:
>
> http://www.haskell.org/haskellwiki/Research_papers
>
> Given your interests, in particular:
>
> http://www.haskell.org/haskellwiki/Research_papers/Type_systems
> http://www.haskell.org/haskellwiki/Research_papers/Data_structures

Also, given the ICFP deadline was this week, I encourage authors to link
to their preprints in the appropriate categories, and help share the
knowledge.

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


Re: [Haskell-cafe] Looking for literature

2009-03-08 Thread Claus Reinke
I'm trying to catch up with all the wonderful Haskell Types, classes, 
Abstract Data Types, Algebraic Data Types, Types that give peoples 
headaches and all the other, deeper stuff I have been happily putting off.


Hmm, do we need more pragmas?-)

{-# LANGUAGE TypesThatGivePeopleHeadaches #-}
{-# LANGUAGE DeeperStuffIHaveBeenHappilyPuttingOff #-}

Anyway, a good source of headaches are the research paper
links collected at haskell.org:

http://www.haskell.org/haskellwiki/Research_papers

Given your interests, in particular:

http://www.haskell.org/haskellwiki/Research_papers/Type_systems
http://www.haskell.org/haskellwiki/Research_papers/Data_structures

Claus

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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Duncan Coutts
On Sun, 2009-03-08 at 15:33 -0700, Ahn, Ki Yung wrote:

> I am using Debian unstable.
> 
> The version of GHC debian package is 6.10.1+dfsg1-13,
> and installed Haskell libraries (debian packages) are:
> 
> kya...@kyavaio:~$ ghc-pkg list
> /usr/lib/ghc-6.10.1/./package.conf:

> packedstring-0.1.0.1, parallel-1.1.0.0, parsec-3.0.0,

> Bootstrap fails like this:
> 
> kya...@kyavaio:~/tmp/cabal-install-0.6.2$ sh bootstrap.sh
> Checking installed packages for ghc-6.10.1...
> 
> The Haskell package 'parsec' is required but it is not installed.
> If you are using a ghc package provided by your operating system
> then install the corresponding packages for 'parsec' and 'network'.
> If you built ghc from source with only the core libraries then you
> should install these extra packages. You can get them from hackage.
> 
> Error during cabal-install bootstrap:
> The Haskell package 'parsec' is required but it is not installed.

What it doesn't say is that it's looking for parsec version 2.

> P.S. Note, parsec and network are installed in the system using debian
> distribution packages.

For some reason the debian package maintainers decided to build
everything against parsec 3 rather than parsec 2 which everyone else is
using. Personally I think this was not a wise decision. Indeed it may be
a problem when it comes to supporting the Haskell platform because the
first version will use parsec 2. Any major parsec version transition in
the Haskell platform will be made by a community decision process.

What I've done is dropped the check for parsec in the bootstrap.sh. The
only reason we're looking for parsec is because it's needed by network
which we also need. So it's not strictly necessary that we check for it.

Duncan

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


Re: [Haskell-cafe] Parsing floating point numbers

2009-03-08 Thread Felipe Lessa
On Sun, Mar 8, 2009 at 9:34 PM, Bjorn Buckwalter
 wrote:
> (For my current needs the formats accepted by "read" are sufficient,
> but I want reasonable error handling (Maybe or Either) instead of an
> exception on bad inputs.)

Why not

readM :: (Monad m, Read a) => String -> m a
readM str = case [x | (x,"") <- readsPrec 0 str] of
 [x] -> return x
 _   -> fail "readM: failed"

Also, I remember seeing this function exported by some module, but I
don't remember where.

HTH,

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


Re: [Haskell-cafe] bytestring vs. uvector

2009-03-08 Thread Claus Reinke

uvector is, if my memory serves me correctly, a fork of the vector library.
It uses modern stream fusion, but is under active development and is a
little scary. I'm a little unclear on the exact difference between uvector
and vector. Both use arrays that are not pinned, so they can't be readily
used with foreign code. If you want to use either library, understand that
you're embarking on a bracing adventure.


vector and uvector are roughly based on the same technology; uvector
is - as far as I remember - a fork of some of the old DPH code which
uses stream fusion which Don cleaned up and worked on (and it's proven
pretty useful, and people are still hacking on it.)

vector however, has the notion of 'recycling arrays' when it does
array operations. The technique is in fact quite similar to stream
fusion. Roman L. built this from scratch I think, so it's quite a bit
more unused and less stable than even uvector is maybe, but I suppose
you could say it's kind of a superset of uvector. Hopefully though
it should mature a little, and the plans are to have the technology
from both of these folded into the Data Parallel Haskell project so we
get fast array operations+automatic parallelisation.

For info, see Roman's paper, 'Recycle your arrays!'

http://www.cse.unsw.edu.au/~rl/publications/recycling.html


Given the close relationship between uvector and vector, it would
be very helpful if both package descriptions on hackage could 
point to a common haskell wiki page, starting out with the text
and link above, plus a link to the stream fusion paper (I hadn't 
been aware that vector incorporates the recycling work, and 
had often wondered about the precise relationship between those

two packages). Apart from saving others from similar confusion,
that would also provide a place to record experience with those two 
alternatives.

Btw, have any of the Haskell array optimization researchers
considered fixpoints yet? Both fusion and recycling are based 
on rewrite rules of the kind "in . out --> id". Now, given a loop 
like this:


   loop a = if c a then loop (out (action (in a))) else a
   loop a

these rules don't apply. Unrolling the loop a fixed number of
times would enable some rule applications, but still some would
remain in the loop body. But with a little rewriting

   loop a = if c a then loop (out (action (in a))) else out (id (in a))
   loop a

   loop a = if c a then loop (out (action (in a))) else out (id (in a))
   (if c a then loop (out (action (in a))) else out (id (in a)))

we can now push the out into the next iteration of the loop or,
if there is no next iteration, into the loop epilogue

   loop a = if c (out a) then loop (action (in (out a))) else id (in (out a))
   out (if c a then loop (action (in a)) else a)

making the rewrite rule applicable

   loop a = if c (out a) then loop (action a) else id a
   out (if c a then loop (action (in a)) else a)

leading (modulo bugs, omissions, and oversights;-) to a fused/
recycled loop body, with potentially substantial benefit.

Claus

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


Re: [Haskell-cafe] Parsing floating point numbers

2009-03-08 Thread Jonathan Cast
On Sun, 2009-03-08 at 19:34 -0500, Bjorn Buckwalter wrote:
> Hi all,
> 
> What is your preferred method of parsing floating point numbers (from
> String to Float/Double)? Parsec it seems only does positive floats out
> of the box and PolyParse requires the float to be on scientific form
> (exponential). While I've worked around these shortcomings in the past
> I feel that I am reinventing the wheel as surely I am not the only to
> run into these limitations. How do you parse your floats? Can you
> recommend a parsing library that handles them solidly?
> 
> (For my current needs the formats accepted by "read" are sufficient,
> but I want reasonable error handling (Maybe or Either) instead of an
> exception on bad inputs.)

  fmap fst . listToMaybe . reads

jcc


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


[Haskell-cafe] Parsing floating point numbers

2009-03-08 Thread Bjorn Buckwalter
Hi all,

What is your preferred method of parsing floating point numbers (from
String to Float/Double)? Parsec it seems only does positive floats out
of the box and PolyParse requires the float to be on scientific form
(exponential). While I've worked around these shortcomings in the past
I feel that I am reinventing the wheel as surely I am not the only to
run into these limitations. How do you parse your floats? Can you
recommend a parsing library that handles them solidly?

(For my current needs the formats accepted by "read" are sufficient,
but I want reasonable error handling (Maybe or Either) instead of an
exception on bad inputs.)

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


Re: [Haskell-cafe] Looking for literature

2009-03-08 Thread G?uenther Schmidt

Hah!

I always knew it!

I'm not the only getting a headache from this.

Thanks Joseph

Joseph Fredette schrieb:
TaPL, iirc, is more about compilers and typesystems, and not 
specifically about haskell. RWH will give you a cover of the basic 
stuff and common data types. The Typeclassopedia will cover all the 
major typeclasses (google search ought to reveal it's super-secret 
location). Otherwise, the wikibook, the wiki, and the haskell docs are 
a good place to look to get a handle on the myriad library datatypes 
provided.


/Joe

Gü?nther Schmidt wrote:

Hi all,

I'm trying to catch up with all the wonderful Haskell Types, classes, 
Abstract Data Types, Algebraic Data Types, Types that give peoples 
headaches and all the other, deeper stuff I have been happily putting 
off.


Now to look smart I have a bookshelf full of books for smart people 
and TaPL is amoung them.


Should I try that or will RWH teach me enough to get by?

Günther

___
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


Re: [Haskell-cafe] Logo Preferences

2009-03-08 Thread Joseph Fredette
Another alternative, perhaps we rank the first n we care about, and 
regard the rest as ranked as low as possible?


Since Condorcet allows ties, it should work -- I don't know if it 
_technically_ allows for skipping ranks, though, but I imagine it would 
still work...


Ashley Yakeley wrote:

Eelco Lempsink wrote:

The list with options can be found here (for now): 
http://community.haskell.org/~eelco/poll.html  Notice that some 
(very) similar logos are grouped as one option (thanks to Ian Lynagh) 
All submissions compete, so that still makes more than a 100 options!


The voting system we'll use is the Condorcet Internet Voting System 
(http://www.cs.cornell.edu/andru/civs.html).


So ranking all 100+ items on the Condorcet ballot is a bit of a 
daunting task. However, if we get a rough idea of the favourites, we 
can each cut down a bit on the work.


For instance, suppose 82 and 93 are very popular. You might not like 
either of them, but it's worth ranking them on your ballot (after the 
ones you do like) if you have a preference between them. But there's 
less need to rank the ones no-one likes.


I'm currently liking

30 (specifically, 30.7)
58
61 (specifically, the second image)
62

begin:vcard
fn:Joseph Fredette
n:Fredette;Joseph
adr:Apartment #3;;6 Dean Street;Worcester;Massachusetts;01609;United States of America
email;internet:jfred...@gmail.com
tel;home:1-508-966-9889
tel;cell:1-508-254-9901
x-mozilla-html:FALSE
url:lowlymath.net, humbuggery.net
version:2.1
end:vcard

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


[Haskell-cafe] Logo Preferences

2009-03-08 Thread Ashley Yakeley

Eelco Lempsink wrote:

The list with options can be found here (for now): 
http://community.haskell.org/~eelco/poll.html  Notice that some (very) 
similar logos are grouped as one option (thanks to Ian Lynagh) All 
submissions compete, so that still makes more than a 100 options!


The voting system we'll use is the Condorcet Internet Voting System 
(http://www.cs.cornell.edu/andru/civs.html).


So ranking all 100+ items on the Condorcet ballot is a bit of a daunting 
task. However, if we get a rough idea of the favourites, we can each cut 
down a bit on the work.


For instance, suppose 82 and 93 are very popular. You might not like 
either of them, but it's worth ranking them on your ballot (after the 
ones you do like) if you have a preference between them. But there's 
less need to rank the ones no-one likes.


I'm currently liking

30 (specifically, 30.7)
58
61 (specifically, the second image)
62

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


[Haskell-cafe] STG's? [was: I want to write a compiler]

2009-03-08 Thread Rick R
Where can I find more information on STGs? Google search doesn't bring up
anything too enlightening.

My curiosity was piqued by http://www.cs.chalmers.se/~gedell/ssc/index.html.
Of course it doesn't indicate how these should be built or the format.


On Sun, Mar 8, 2009 at 6:41 PM, Loup Vaillant wrote:

> Thanks to the courage you all gave me, I found the strength to go on.
>
> Template instantiation seems to be the easiest path, so I decided to
> follow it. I think I solved the problem about primitives and FFI I
> though it had. Namely, how the hell do I compile primitive calls with
> an arbitrary number of arguments.
>
> Starting from the Tutorial of Peyton Jones and Lester, I added a new
> node type to help guide the order of evaluation. Basically, this "Seq"
> node takes the address of two other nodes. It pushes them both on the
> stack, like an application node would. (That is because I don't want a
> dump, but I could as well create a new stack and and push the previous
> one on the dump.)
>
> Note the nodes which are evaluated this way must not have a functional
> head normal form (primitive or supercombinator). That would leak past
> the beginning of the stack.
>
> When the node is finally evaluated (e.g. points to a HNF, like a boxed
> integer), the topmost and second topmost pointers on the stack are
> swapped. (or the topmost pointer of the stack and the topmost pointer
> of the topmost stack on the dump are swapped).
>
> With a suitable compilation scheme, that should guarantee that
> primitives have their arguments already evaluated. (And avoid infinite
> loops).
>
> Now, I just have to implement it. :-)
>
> Cheers,
> Loup.
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Looking for literature

2009-03-08 Thread Joseph Fredette
TaPL, iirc, is more about compilers and typesystems, and not 
specifically about haskell. RWH will give you a cover of the basic stuff 
and common data types. The Typeclassopedia will cover all the major 
typeclasses (google search ought to reveal it's super-secret location). 
Otherwise, the wikibook, the wiki, and the haskell docs are a good place 
to look to get a handle on the myriad library datatypes provided.


/Joe

Gü?nther Schmidt wrote:

Hi all,

I'm trying to catch up with all the wonderful Haskell Types, classes, 
Abstract Data Types, Algebraic Data Types, Types that give peoples 
headaches and all the other, deeper stuff I have been happily putting 
off.


Now to look smart I have a bookshelf full of books for smart people 
and TaPL is amoung them.


Should I try that or will RWH teach me enough to get by?

Günther

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

begin:vcard
fn:Joseph Fredette
n:Fredette;Joseph
adr:Apartment #3;;6 Dean Street;Worcester;Massachusetts;01609;United States of America
email;internet:jfred...@gmail.com
tel;home:1-508-966-9889
tel;cell:1-508-254-9901
x-mozilla-html:FALSE
url:lowlymath.net, humbuggery.net
version:2.1
end:vcard

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


Re: [Haskell-cafe] Looking for a co-founder for a startup using Haskell

2009-03-08 Thread Henning Thielemann


On Fri, 6 Mar 2009, Ed McCaffrey wrote:


Hello,

I'm turning a project involving music into a startup, and I will be using 
Haskell for most
and possibly all of it.  I had an angel investor interested until the market 
collapse forced
him to turn his focus away from new investments.  Other investors I have spoken 
with want me
to contact them again when it is further developed; basically, I think that I 
am optimistic
at the prospect of funding with the right team.


You may also want to contact:
  Haskell Art Mailing list ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: [Haskell] string type class

2009-03-08 Thread Henning Thielemann


On Sat, 7 Mar 2009, Duncan Coutts wrote:


On Fri, 2009-03-06 at 19:16 +, Chris Kuklewicz wrote:


Not likely.

I did define my own (private) class for regular expressions, to abstract over
String, the ByteStrings, and Seq Char.  But it is used in one place and is a
wart that should be removed.

The simple task of looping over the contents of a String (once, forward) is
quite different from a Strict ByteString (using an index and a lookup).

This means for decent efficiency I need two copies of my code, hand specialized
to each case.

"tail" or "(x:xs)" : very efficient for String (no allocation)
"tail" or "uncons" : not efficient for ByteString (allocation, might as well
convert to [Char]


head/tail/uncons on a strict or lazy ByteString is perfectly ok. I would
recommend it over using length+index. If you are using tail in a tail
recursion then ghc can almost always optimise it to unbox the various
ByteString components and so there is no allocation of fresh BS
constructors, just adjusting offsets and lengths held in registers.


Recently I also used 'ByteString.uncons' in a parser, because I thought 
that it is cheap. Actually the parsing became slower than with String. I 
then used wrappers to strict and lazy ByteStrings, which maintain the 
index of the current reader position. Although they duplicate the 'start' 
index of the internal ByteString records, these wrappers are faster, 
probably because no ByteString record must be allocated in each step.

  
http://code.haskell.org/~thielema/tagchup/src/Text/HTML/Tagchup/Parser/Stream.hs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Looking for literature

2009-03-08 Thread Gü?nther Schmidt

Hi all,

I'm trying to catch up with all the wonderful Haskell Types, classes, 
Abstract Data Types, Algebraic Data Types, Types that give peoples 
headaches and all the other, deeper stuff I have been happily putting off.


Now to look smart I have a bookshelf full of books for smart people and 
TaPL is amoung them.


Should I try that or will RWH teach me enough to get by?

Günther

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


Re: [Haskell-cafe] I want to write a compiler

2009-03-08 Thread Loup Vaillant
Thanks to the courage you all gave me, I found the strength to go on.

Template instantiation seems to be the easiest path, so I decided to
follow it. I think I solved the problem about primitives and FFI I
though it had. Namely, how the hell do I compile primitive calls with
an arbitrary number of arguments.

Starting from the Tutorial of Peyton Jones and Lester, I added a new
node type to help guide the order of evaluation. Basically, this "Seq"
node takes the address of two other nodes. It pushes them both on the
stack, like an application node would. (That is because I don't want a
dump, but I could as well create a new stack and and push the previous
one on the dump.)

Note the nodes which are evaluated this way must not have a functional
head normal form (primitive or supercombinator). That would leak past
the beginning of the stack.

When the node is finally evaluated (e.g. points to a HNF, like a boxed
integer), the topmost and second topmost pointers on the stack are
swapped. (or the topmost pointer of the stack and the topmost pointer
of the topmost stack on the dump are swapped).

With a suitable compilation scheme, that should guarantee that
primitives have their arguments already evaluated. (And avoid infinite
loops).

Now, I just have to implement it. :-)

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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Ahn, Ki Yung
Duncan Coutts 쓴 글:
> On Sat, 2009-03-07 at 17:51 -0800, Ahn, Ki Yung wrote:
>> Dear Haskellers and especially who are working on cabal-install
>> and debian packaging,
>>
>> I sometimes clean up .ghc and .cabal in my home directory to start from
>> scratch because of dependency loopholes (cabal-install does not have
>> remove option yet, so it's hard to fix when such loophole happens).
>>
>> Today, I had some time in the airport and decided to start from scratch
>> again because of the dependency loophole with process 1.0.1.1 and
>> haddock.  I downloaded the most recent version of cabal-install the
>> version 0.6.2, and found out that the ./bootstrap.sh does not work.
> 
> If you could provide any details on how it does not work that would be
> much appreciated. Eg a log of the output from running the bootstrap.
> 
> Duncan
> 

I am using Debian unstable.

The version of GHC debian package is 6.10.1+dfsg1-13,
and installed Haskell libraries (debian packages) are:

kya...@kyavaio:~$ ghc-pkg list
/usr/lib/ghc-6.10.1/./package.conf:
Cabal-1.6.0.1, Diff-0.1.2, HGL-3.2.0.0, HUnit-1.2.0.3,
QuickCheck-2.1.0.1, Stream-0.2.2, X11-1.4.5, array-0.2.0.0,
arrows-0.4.1, base-3.0.3.0, base-4.0.0.0, binary-0.5,
bytestring-0.9.1.4, cairo-0.10.0, cgi-3001.1.7.1,
containers-0.2.0.0, directory-1.0.0.2, editline-0.2.1.0,
fgl-5.4.2.2, filepath-1.1.0.1, gconf-0.10.0, (ghc-6.10.1),
ghc-prim-0.1.0.0, gio-0.10.0, glade-0.10.0, glib-0.10.0,
gnomevfs-0.10.0, gstreamer-0.10.0, gtk-0.10.0, gtkglext-0.10.0,
gtksourceview2-0.10.0, haskell98-1.0.1.0, hpc-0.5.0.2,
html-1.0.1.2, integer-0.1.0.0, irc-0.4.3, mtl-1.1.0.2,
network-2.2.0.1, old-locale-1.0.0.1, old-time-1.0.0.1,
packedstring-0.1.0.1, parallel-1.1.0.0, parsec-3.0.0,
pretty-1.0.1.0, process-1.0.1.0, random-1.0.0.1, rts-1.0,
stm-2.1.1.2, svgcairo-0.10.0, syb-0.1.0.0, syb-with-class-0.5.1,
tagsoup-0.6, template-haskell-2.3.0.0, time-1.1.2.3, unix-2.3.1.0,
utf8-string-0.3.4, xhtml-3000.2.0.1


Bootstrap fails like this:

kya...@kyavaio:~/tmp/cabal-install-0.6.2$ sh bootstrap.sh
Checking installed packages for ghc-6.10.1...

The Haskell package 'parsec' is required but it is not installed.
If you are using a ghc package provided by your operating system
then install the corresponding packages for 'parsec' and 'network'.
If you built ghc from source with only the core libraries then you
should install these extra packages. You can get them from hackage.

Error during cabal-install bootstrap:
The Haskell package 'parsec' is required but it is not installed.



P.S. Note, parsec and network are installed in the system using debian
distribution packages.

--
  Ahn, Ki Yung

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


Re: [Haskell-cafe] Re: a newbies confusion with repositories - darcs or git

2009-03-08 Thread Henning Thielemann


On Sun, 8 Mar 2009, Trent W. Buck wrote:


Eric Kow  writes:


One of the darcs team members, Thorkil Naur, felt that in my enthusiasm I
was not being sufficiently forthright about darcs's shortcomings.


As for me, I tend to start any review with a list of all the problems I
have with , on the basis that it's a lot harder to find
informed criticism of a technology than it is to find praise (informed
or otherwise).  So I would write an article "Why you shouldn't choose
Darcs", and let readers decide whether the arguments are inadequate.


In general, I also find it more difficult to retrieve well-founded 
criticism than to find praise. I like to cite Edsger Dijkstra on this 
topic:


http://www.cs.utexas.edu/users/EWD/transcriptions/EWD09xx/EWD956.html
  "Address to my students"

http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD498.html
  "How do we tell truths that might hurt?"
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-03-08 Thread Roman Cheplyaka
* Neal Alexander  [2009-03-08 10:49:52-0800]
> Anyway, it seems like theres quite a few people working on game/openGL  
> related stuff for Haskell now. Would be nice to get a group of people  
> working on something.

Please go ahead!

> Personally, I've been working on a 2d isometric game for the past several 
> months.

-- 
Roman I. Cheplyaka :: http://ro-che.info/
"Don't let school get in the way of your education." - Mark Twain
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Arch Linux: New package updates for Mar 8, 2008

2009-03-08 Thread Don Stewart
New Haskell packages for the week ending Mar 8.

http://archhaskell.wordpress.com/2009/03/08/arch-haskell-news-mar-8-2009/

Arch now has 962 Haskell packages in AUR. That’s 17 new packages this week, and
lots of updates as well.

Notable releases this week

* htar-0.3: Command-line tar archive utility
* haskell-llvm-0.6.5.0: Bindings to the LLVM compiler toolkit
* haskell-harpy-0.4.1: Runtime code generation for x86 machine code
* haskell-future-1.0.0: Supposed to mimics and enhance proposed C++ 
”future” features
* haskell-holumbus-mapreduce-0.0.1: a distributed MapReduce framework
* haskell-holumbus-storage-0.0.1: a distributed storage system
* haskell-holumbus-distribution-0.0.1: intra- and inter-program 
communication
* hevolisa-dph-0.0.1: Genetic Mona Lisa problem in Haskell - using Data 
Parallel Haskell
* doctest-0.0.0: Test interactive Haskell examples
* haskell-happstack-0.2.1: The haskell application server stack + code 
generation

See the full list of new Haskell packages this week on the blog, broken down by 
category,

http://archhaskell.wordpress.com/2009/03/08/arch-haskell-news-mar-8-2009/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: derive & Drift - some help please

2009-03-08 Thread Gü?nther Schmidt

Hi Alexander,

this does the trick!

Günther

Alexander Dunlap schrieb:

Well you can do


deriving instance Typeable LocalType


etc. if you enable the DeriveDataTypeable and StandaloneDeriving
extensions. You will get other error messages for missing instances;
just keep adding


deriving instance Typeable Day


etc. Eventually, you will need to implement an instance by hand for
Pico, because Pico's data constructors are not exported from
Data.Fixed. I'm not very familiar with Data and Typeable so I can't
help you there, but you can probably look at some existing instances
for help.

Hope that's useful for you.

Alex

On Sun, Mar 8, 2009 at 12:40 PM, Gü?nther Schmidt  wrote:

Hi Alexander,


well I have this:

newtype AdmissionDate = AdmDt LocalTime
   deriving (Data,Typeable ..)

at least that's where I wonna get.

I don't know how to create the proper instance declarations though for
LocalTime.

AdmissionDate is an element of a larger data structure, this data structure
for instance also has a

newtype DischargeDate = DchrgDt LocalTime
   deriving (Data,Typeable ...)

With my haskell work so far I was blessedly free of the need for deriving..
Until now ...

Günther


Alexander Dunlap schrieb:

What problems are you encountering?

Alex

On Sun, Mar 8, 2009 at 11:58 AM, G?uenther Schmidt 
wrote:

Hi Sterling,

sry, but I can't get it to work.

Günther

Sterling Clover schrieb:

You shouldn't need any extra tools for this. A combination of the
StandaloneDeriving and DeriveDataTypeable extensions in GHC should
suffice.

Cheers,
S.

On Sun, Mar 8, 2009 at 10:30 AM, Gü?nther Schmidt mailto:gue.schm...@web.de>> wrote:

  Hi,

  I need to derive Data, Typeable for Data.Time.LocalTime. I had hoped
  to use either derive or DrIFT to generate the instance declarations
  for it.

  I tried to understand the respective user manuals but it's still all
  Greek to me.

  Someone please help!

  Günther

  ___
  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 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] Re: derive & Drift - some help please

2009-03-08 Thread Alexander Dunlap
Well you can do

> deriving instance Typeable LocalType

etc. if you enable the DeriveDataTypeable and StandaloneDeriving
extensions. You will get other error messages for missing instances;
just keep adding

> deriving instance Typeable Day

etc. Eventually, you will need to implement an instance by hand for
Pico, because Pico's data constructors are not exported from
Data.Fixed. I'm not very familiar with Data and Typeable so I can't
help you there, but you can probably look at some existing instances
for help.

Hope that's useful for you.

Alex

On Sun, Mar 8, 2009 at 12:40 PM, Gü?nther Schmidt  wrote:
> Hi Alexander,
>
>
> well I have this:
>
> newtype AdmissionDate = AdmDt LocalTime
>        deriving (Data,Typeable ..)
>
> at least that's where I wonna get.
>
> I don't know how to create the proper instance declarations though for
> LocalTime.
>
> AdmissionDate is an element of a larger data structure, this data structure
> for instance also has a
>
> newtype DischargeDate = DchrgDt LocalTime
>        deriving (Data,Typeable ...)
>
> With my haskell work so far I was blessedly free of the need for deriving.
> Until now ...
>
> Günther
>
>
> Alexander Dunlap schrieb:
>>
>> What problems are you encountering?
>>
>> Alex
>>
>> On Sun, Mar 8, 2009 at 11:58 AM, G?uenther Schmidt 
>> wrote:
>>>
>>> Hi Sterling,
>>>
>>> sry, but I can't get it to work.
>>>
>>> Günther
>>>
>>> Sterling Clover schrieb:

 You shouldn't need any extra tools for this. A combination of the
 StandaloneDeriving and DeriveDataTypeable extensions in GHC should
 suffice.

 Cheers,
 S.

 On Sun, Mar 8, 2009 at 10:30 AM, Gü?nther Schmidt >>> > wrote:

   Hi,

   I need to derive Data, Typeable for Data.Time.LocalTime. I had hoped
   to use either derive or DrIFT to generate the instance declarations
   for it.

   I tried to understand the respective user manuals but it's still all
   Greek to me.

   Someone please help!

   Günther

   ___
   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 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] Re: derive & Drift - some help please

2009-03-08 Thread Gü?nther Schmidt

Hi Alexander,


well I have this:

newtype AdmissionDate = AdmDt LocalTime
deriving (Data,Typeable ..)

at least that's where I wonna get.

I don't know how to create the proper instance declarations though for 
LocalTime.


AdmissionDate is an element of a larger data structure, this data 
structure for instance also has a


newtype DischargeDate = DchrgDt LocalTime
deriving (Data,Typeable ...)

With my haskell work so far I was blessedly free of the need for 
deriving. Until now ...


Günther


Alexander Dunlap schrieb:

What problems are you encountering?

Alex

On Sun, Mar 8, 2009 at 11:58 AM, G?uenther Schmidt  wrote:

Hi Sterling,

sry, but I can't get it to work.

Günther

Sterling Clover schrieb:

You shouldn't need any extra tools for this. A combination of the
StandaloneDeriving and DeriveDataTypeable extensions in GHC should suffice.

Cheers,
S.

On Sun, Mar 8, 2009 at 10:30 AM, Gü?nther Schmidt mailto:gue.schm...@web.de>> wrote:

   Hi,

   I need to derive Data, Typeable for Data.Time.LocalTime. I had hoped
   to use either derive or DrIFT to generate the instance declarations
   for it.

   I tried to understand the respective user manuals but it's still all
   Greek to me.

   Someone please help!

   Günther

   ___
   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 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


Re: [Haskell-cafe] Re: derive & Drift - some help please

2009-03-08 Thread Alexander Dunlap
What problems are you encountering?

Alex

On Sun, Mar 8, 2009 at 11:58 AM, G?uenther Schmidt  wrote:
> Hi Sterling,
>
> sry, but I can't get it to work.
>
> Günther
>
> Sterling Clover schrieb:
>>
>> You shouldn't need any extra tools for this. A combination of the
>> StandaloneDeriving and DeriveDataTypeable extensions in GHC should suffice.
>>
>> Cheers,
>> S.
>>
>> On Sun, Mar 8, 2009 at 10:30 AM, Gü?nther Schmidt > > wrote:
>>
>>    Hi,
>>
>>    I need to derive Data, Typeable for Data.Time.LocalTime. I had hoped
>>    to use either derive or DrIFT to generate the instance declarations
>>    for it.
>>
>>    I tried to understand the respective user manuals but it's still all
>>    Greek to me.
>>
>>    Someone please help!
>>
>>    Günther
>>
>>    ___
>>    Haskell-Cafe mailing list
>>    haskell-c...@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 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] Re: derive & Drift - some help please

2009-03-08 Thread G?uenther Schmidt

Hi Sterling,

sry, but I can't get it to work.

Günther

Sterling Clover schrieb:
You shouldn't need any extra tools for this. A combination of the 
StandaloneDeriving and DeriveDataTypeable extensions in GHC should suffice.


Cheers,
S.

On Sun, Mar 8, 2009 at 10:30 AM, Gü?nther Schmidt > wrote:


Hi,

I need to derive Data, Typeable for Data.Time.LocalTime. I had hoped
to use either derive or DrIFT to generate the instance declarations
for it.

I tried to understand the respective user manuals but it's still all
Greek to me.

Someone please help!

Günther

___
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 mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Mystified by Cabal

2009-03-08 Thread Don Stewart
duncan.coutts:
> On Sat, 2009-03-07 at 17:30 +, Colin Paul Adams wrote:
> > > "Svein" == Svein Ove Aas  writes:
> > 
> > >> Preprocessing library game-tree-1.0.0.0...  Building
> > >> game-tree-1.0.0.0...
> > >> 
> > >> Data/Tree/Game/Negascout.hs:31:0: Unrecognised pragma [1 of 2]
> > >> Compiling Data.Tree.Game.Tree ( Data/Tree/Game/Tree.hs,
> > >> dist/build/Data/Tree/Game/Tree.o )
> > >> 
> > >> Data/Tree/Game/Tree.hs:1:0:Failed to load interface for
> > >> `Prelude':  it is a member of package base-3.0.3.0, which
> > >> is hidden
> > >> 
> > Svein> What does your .cabal file look like?
> 
> Don, mkcabal is generating .cabal files that are confusing people.
> 
> It should generate new-style .cabal files with library or executable
> sections. The ghc-options and build-depends etc need to be in the lib or
> exe section.
> 
> The files it generates are not actually broken but it leaves new users
> to do the conversion from old style to new and unsurprisingly many get
> that wrong. Cabal is also at fault here for not providing good
> diagnostics but it would help if mkcabal used the current recommended
> style.
> 
> Note also that the list of licenses mkcabal offers is wrong. You can get
> the list from the Cabal lib itself so there is no need to maintain the
> list manually.
> 
> I still think mkcabal should be integrated into cabal-install, like:
> $ cabal init
> or something. We could also more easily keep it up to date that way.


mkcabal is unmaintained.


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


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

2009-03-08 Thread Neal Alexander

Csaba Hruska wrote:
Of course I write everything in haskell! I mean about Ogre that i use 
only it's model and material formats and none of its code. Thats all.

Yes, later I'd like to write a collada importer. :)

2009/3/8 Peter Verswyvelen mailto:bugf...@gmail.com>>

Awesome! 


When you say you took Ogre as a base, do you mean your engine will
be able to load the meshes and material files, or are you also
wrapping the C++ code base? 


Did you also consider Collada?

2009/3/8 Csaba Hruska mailto:csaba.hru...@gmail.com>>

Hi!

This should be a bit offtopic, but now I'd like to announce that
I'm working on a 3D rendering rengine in Haskell.
I take ogre3d (www.ogre3d.org ) as a
base. My code can import import a subset of ogre model files
(currently xml version) and material scripts
(http://www.ogre3d.org/docs/manual/manual_14.html#SEC23).
You can easily import an existing 3d content or create new one
because there are ogre exporter plugins for every major modeler
programs.
Currently I have some working code. I hope I'll be ready to
release it in a month. It should act as graphical backend for
FRP libraries.
I use yampa in the example program but it's just an option, only
example program depends on it.

Cheers,
Csaba Hruska

___
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


Would be nice if the ogre resource loading stuff were a seperate library.

Anyway, it seems like theres quite a few people working on game/openGL 
related stuff for Haskell now. Would be nice to get a group of people 
working on something.


Personally, I've been working on a 2d isometric game for the past 
several months.


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


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Manlio Perillo

Duncan Coutts ha scritto:

On Sun, 2009-03-08 at 10:00 -0400, Gwern Branwen wrote:

On Sun, Mar 8, 2009 at 7:13 AM, Manlio Perillo  wrote:

Hi.

The Cabal package description includes a property `license-file`.
This property may be used by Hackage to provide a link to the license file.

However I would like to have a `changelog-file`, too.
So that from Hackage I can quickly check what's changed with the new version
of a package.


Is this feasible?


Thanks  Manlio Perillo

http://hackage.haskell.org/trac/hackage/ticket/244
http://hackage.haskell.org/trac/hackage/ticket/299


Thanks Gwern. Yes, we're looking for a volunteer to work on implementing
this. 


One question is what the changelog format should be? Or should it just
be uninterpreted text? One suggestion was for Hackage and the RSS feed
to display the diff between the current and previous version of the
changelog. Or perhaps we can do both, diff it and parse the result as
haddock markup or something.



Personally, I find a format like:
http://divmod.org/trac/browser/trunk/Nevow/NEWS.txt

simple, compact and flexible.


GNU Changelog format is probably an overkill, since nowadays we have 
good revision control systems.



However GNU Changelog format *may* be supported (perhaps the changelog 
format can be specified in a Cabal property).



So suggestions and volunteers welcome.

Duncan




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


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Duncan Coutts
On Sun, 2009-03-08 at 10:00 -0400, Gwern Branwen wrote:
> On Sun, Mar 8, 2009 at 7:13 AM, Manlio Perillo  
> wrote:
> > Hi.
> >
> > The Cabal package description includes a property `license-file`.
> > This property may be used by Hackage to provide a link to the license file.
> >
> > However I would like to have a `changelog-file`, too.
> > So that from Hackage I can quickly check what's changed with the new version
> > of a package.
> >
> >
> > Is this feasible?
> >
> >
> > Thanks  Manlio Perillo
> 
> http://hackage.haskell.org/trac/hackage/ticket/244
> http://hackage.haskell.org/trac/hackage/ticket/299

Thanks Gwern. Yes, we're looking for a volunteer to work on implementing
this. 

One question is what the changelog format should be? Or should it just
be uninterpreted text? One suggestion was for Hackage and the RSS feed
to display the diff between the current and previous version of the
changelog. Or perhaps we can do both, diff it and parse the result as
haddock markup or something.

So suggestions and volunteers welcome.

Duncan

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


Re: [Haskell-cafe] Mystified by Cabal

2009-03-08 Thread Duncan Coutts
On Sun, 2009-03-08 at 13:13 +0100, Svein Ove Aas wrote:
> On Sun, Mar 8, 2009 at 12:32 PM, Duncan Coutts
>  wrote:
> > Note also that the list of licenses mkcabal offers is wrong. You can get
> > the list from the Cabal lib itself so there is no need to maintain the
> > list manually.
> >
> It would also be nice to expand that list somewhat, to at least cover
> the most used licences - GPL2, GPL3, AGPL, etc.

Cabal HEAD adds MIT and versioned GPL and LGPL. We could not change it
much earlier because old Cabal versions (ie 1.2 and earlier) would have
barfed on parsing names it did not recognise.

Duncan

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


Re: [Haskell-cafe] Help with c2hs, structs and typedefs?

2009-03-08 Thread Antoine Latter
On Sun, Mar 8, 2009 at 12:47 PM, Magnus Jonsson  wrote:
> In C, if you don't typedef the struct, the name of the struct is
> "struct my_iovec_2", not "my_iovec_2". I don't know much about the
> haskell FFI, but maybe this is the problem?
>
> (by the way, why does "reply" default to replying to the sender, not
> the mailing list?)
>

Ah!

It seems that adding:

#c
typedef struct my_iovec_2 my_iovec_3;
#endc

gives me something I can work with.

Thanks.

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


Re: [Haskell-cafe] Help with c2hs, structs and typedefs?

2009-03-08 Thread Magnus Jonsson
In C, if you don't typedef the struct, the name of the struct is
"struct my_iovec_2", not "my_iovec_2". I don't know much about the
haskell FFI, but maybe this is the problem?

(by the way, why does "reply" default to replying to the sender, not
the mailing list?)

On Sun, Mar 8, 2009 at 1:25 PM, Antoine Latter  wrote:
> Hey folks, I was trying to create some FFI bindings using c2hs and I
> ran into trouble: I can't use the 'sizeof' and 'set' hooks for structs
> that aren't defined inside a typedef.
>
> I don't know a whole lot about C - is there any declaration I can make
> to make something like my second struct work in c2hs?  Because the
> second struct is what's provided in  :-)
>
> In the following code, if you change all of the directives in the
> haskell code from my_iovec_2 to my_iovec, the "unknown indentifier"
> errors go away.
>
> Thanks,
> Antoine
>
>>
>
> -- Works!
> #c
> typedef struct {
>  void * my_iov_base;
>  int    my_iov_len;
> } my_iovec;
>
> #endc
>
> -- Broken!  I get lots of "unknown identifier" errors for
> -- the #sizeof and #set hooks - but the #pointer hook seems to work.
> #c
> struct my_iovec_2 {
>  void * my_iov_base;
>  int    my_iov_len;
> };
> #endc
>
> {#pointer *my_iovec_2 as IOVec newtype#}
>
> withIOVec :: [(Ptr a, CSize)] -> (Ptr IOVec -> Int -> IO b) -> IO b
> withIOVec [] f = f nullPtr 0
> withIOVec bufers f
>    = let len = length buffers in
>      alocaBytes (length bufers * {#sizeof my_iovec_2#}) $ \ptr ->
>      vecAry <- castPtr ptr
>      foldM (go vecAry) 0 bufers
>      f vecAry len
>
>  where go vecAry off (ptr, size) = do
>         vec <- vecAry `plusPtr` off * {#sizeof my_iovec_2#}
>         {#set my_iovec_2->my_iov_base#} vec $ castPtr ptr
>         {#set my_iovec_2->my_iov_len#}  vec $ cIntConv size
>         return $ off + 1
> <
> ___
> 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


Re: [Haskell-cafe] derive & Drift - some help please

2009-03-08 Thread Sterling Clover
You shouldn't need any extra tools for this. A combination of the
StandaloneDeriving and DeriveDataTypeable extensions in GHC should suffice.
Cheers,
S.

On Sun, Mar 8, 2009 at 10:30 AM, Gü?nther Schmidt wrote:

> Hi,
>
> I need to derive Data, Typeable for Data.Time.LocalTime. I had hoped to use
> either derive or DrIFT to generate the instance declarations for it.
>
> I tried to understand the respective user manuals but it's still all Greek
> to me.
>
> Someone please help!
>
> Günther
>
> ___
> 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] Help with c2hs, structs and typedefs?

2009-03-08 Thread Antoine Latter
Hey folks, I was trying to create some FFI bindings using c2hs and I
ran into trouble: I can't use the 'sizeof' and 'set' hooks for structs
that aren't defined inside a typedef.

I don't know a whole lot about C - is there any declaration I can make
to make something like my second struct work in c2hs?  Because the
second struct is what's provided in  :-)

In the following code, if you change all of the directives in the
haskell code from my_iovec_2 to my_iovec, the "unknown indentifier"
errors go away.

Thanks,
Antoine

>

-- Works!
#c
typedef struct {
 void * my_iov_base;
 intmy_iov_len;
} my_iovec;

#endc

-- Broken!  I get lots of "unknown identifier" errors for
-- the #sizeof and #set hooks - but the #pointer hook seems to work.
#c
struct my_iovec_2 {
 void * my_iov_base;
 intmy_iov_len;
};
#endc

{#pointer *my_iovec_2 as IOVec newtype#}

withIOVec :: [(Ptr a, CSize)] -> (Ptr IOVec -> Int -> IO b) -> IO b
withIOVec [] f = f nullPtr 0
withIOVec bufers f
= let len = length buffers in
  alocaBytes (length bufers * {#sizeof my_iovec_2#}) $ \ptr ->
  vecAry <- castPtr ptr
  foldM (go vecAry) 0 bufers
  f vecAry len

 where go vecAry off (ptr, size) = do
 vec <- vecAry `plusPtr` off * {#sizeof my_iovec_2#}
 {#set my_iovec_2->my_iov_base#} vec $ castPtr ptr
 {#set my_iovec_2->my_iov_len#}  vec $ cIntConv size
 return $ off + 1
<
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] derive & Drift - some help please

2009-03-08 Thread Gü?nther Schmidt

Hi,

I need to derive Data, Typeable for Data.Time.LocalTime. I had hoped to 
use either derive or DrIFT to generate the instance declarations for it.


I tried to understand the respective user manuals but it's still all 
Greek to me.


Someone please help!

Günther

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


Re: [Haskell-cafe] ANNOUNCE: Holumbus-MapReduce 0.0.1

2009-03-08 Thread Bulat Ziganshin
Hello Stefan,

Sunday, March 8, 2009, 4:47:25 PM, you wrote:

> Wedel, Germany, I have developed a library for building distributed
> MapReduce systems in Haskell.

> Holumbus-Distribution consists of modules and tools for the
> implementation of distributed systems in general.

> Holumbus-Storage is designed to build a distributed storage system which

beautiful!!! i think these are sort of things where haskell will
really shine and which now is covered by Erlang, Java and other
languages hardly compared to Haskell


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

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


Re: [Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Gwern Branwen
On Sun, Mar 8, 2009 at 7:13 AM, Manlio Perillo  wrote:
> Hi.
>
> The Cabal package description includes a property `license-file`.
> This property may be used by Hackage to provide a link to the license file.
>
> However I would like to have a `changelog-file`, too.
> So that from Hackage I can quickly check what's changed with the new version
> of a package.
>
>
> Is this feasible?
>
>
> Thanks  Manlio Perillo

http://hackage.haskell.org/trac/hackage/ticket/244
http://hackage.haskell.org/trac/hackage/ticket/299

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


[Haskell-cafe] ANNOUNCE: Holumbus-MapReduce 0.0.1

2009-03-08 Thread Stefan Schmidt
The Holumbus framework is known for building specialized search-engines 
like the Hayoo! Haskell API search. Now, I'd like to announce the newest 
libraries of the Holumbus framework:


Holumbus-MapReduce0.0.1
Holumbus-Distribution 0.0.1
Holumbus-Storage  0.0.1

As part of my Master's Thesis at the University of Applied Sciences in 
Wedel, Germany, I have developed a library for building distributed 
MapReduce systems in Haskell. The existing Holumbus-Searchengine library 
already offers a MapReduce implementation, but it does not provide 
mechanisms for distributed computing. The newly developed 
Holumbus-MapReduce library contains of tools and modules for building 
individualized distributed MapReduce systems.


Holumbus-MapReduce is based on two libraries: Holumbus-Distributed and
Holumbus-Storage. Maybe they could be useful for building other 
distributed systems, not only a MapReduce system.


Holumbus-Distribution consists of modules and tools for the 
implementation of distributed systems in general. Besides common data 
types and small helper functions, this library provides a mailbox-based 
data transfer mechanism. It offers an easy-to-use interface for inter- 
and intra-process communication like in Erlang or Mozart/Oz.


Holumbus-Storage is designed to build a distributed storage system which 
can be linked into other programs. It is used by the MapReduce system 
for the data management.


All three libraries are still under heavy development and should not be
considered for creating applications in productive environments. But I 
think, it's time to give them to the community for suggestions on 
further development and features.


Please email comments, bugs, etc. to s...@holumbus.org

Stefan Schmidt



Holumbus on Hackage:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Holumbus-MapReduce
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Holumbus-Distribution
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Holumbus-Storage

link to my thesis:
http://www.holumbus.org/redmine/attachments/37/thesis-mapreduce.pdf

project homepage:
http://www.holumbus.org/redmine/wiki/holumbus

darcs repository (latest snapshots):
http://holumbus.fh-wedel.de/holumbus/src
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] I want to write a compiler

2009-03-08 Thread Loup Vaillant
OK, thank you all for your responses. I'm impressed how fast you were.

2009/3/8 Rick R :
> http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours

I have it. However, Scheme is strict, which is the reason I didn't
complete my reading. Maybe I am wrong.

> Or go for the Real Thing:
> http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-35.html#%_sec_5.5

I just opened the page. I'll see what I can take. Thank you.


2009/3/8 Jeremy Shaw :
> I can say from experience that the spineless-tagless-gmachine paper
> you referenced does contain all the information needed to implement an
> STG->C compiler. But, you should expect to spend a lot of time
> alternating between trying to implement the thing and rereading the
> paper.

So I just didn't tried hard enough. Time for a re-read, then!

> Also, you may find that it is easier to do STG->Assembly at first (via
> harpy or something). With assembly it is easier to express exactly
> what you want to happen. With C you have to try to figure out how to
> trick the C compiler into doing your bidding.

Scary. I know only C.

> Also, maybe it is more satisfying to output assembly, because then you
> really feel like you are writing a compiler ;)

Well, maybe later.

> I am sure others will say that LLVM is a better option than C or
> assembly. I know almost nothing about LLVM, so they may be right.

Neither do I. But I definitely try this. One day.

> -- jeremy


2009/3/8 Austin Seipp :
>
> Excerpts from Loup Vaillant's message of Sat Mar 07 17:32:48 -0600 2009:
>> Ideally, I would very much like to compile to C.
>> [...]
>> -> have some kind of FFI with C (I suppose it imply some support for
>> unboxed values).
>
> Unfortunately, after working on LHC, I can verifiably say (like all
> the researchers who wrote the papers which I *didn't* read
> beforehand,) that for a lot of purposes, C is an unsuitable fit for a
> compilers' target language. It works pretty well if you can make the
> source language execution model fit well enough, but if you can't,
> you've a price to pay (both in sanity and/or performance.)

Yep.

> However, since your goal is *not* efficiency, you will be happy to
> know that the issues with compiling to C (like garbage collection and
> exception handling) can be worked around viably.

I hope so.

> For garbage collection, please see.
>
> "Accurate Garbage Collection in an Uncooperative Environment" -
> http://citeseer.ist.psu.edu/538613.html
> [...]
> http://code.haskell.org/ddc/ddc-head/runtime/

Thank you, I'll look into that.

> You can find a lot of info on C-- here; I recommend the paper at the
> bottom to start off:
>
> http://research.microsoft.com/en-us/um/people/simonpj/papers/c--/

I'll look at that. But I am not sure it is the simplest path for me: I know C,
and I don't know C-- —yet.

> http://research.microsoft.com/en-us/um/people/simonpj/papers/slpj-book-1987/

I have it. Maybe I should study it a bit more.


> As for the FFI, I don't really have any papers on 'how to implement an
> FFI', but Matthias Blume's paper might be of interest:
>
> "No-Longer-Foreign: Teaching an ML compiler to speak c "natively""
> http://ttic.uchicago.edu/~blume/papers/nlffi-entcs.pdf
>
> libffi may also be worth investigating:
> http://sourceware.org/libffi/

I didn't know them, thank you.

>> I have chosen the STG machine because I thought i would be easier to
>> get an FFI and case exprs out of it. Maybe I am wrong, and template
>> instantiation is really easier. There is also the BRISK machine, and
>> GRIN. But the paper I read were less readable to me than the three
>> mentioned.
>
> How far into GRIN have you looked?

Not far enough, it seems.

> It is one of the intermediate
> languages for lhc/jhc, and for a low-level intermediate representation
> it works quite well I think; it is a strict, monadic intermediate
> language - being strict, we must still be able to model closures
> ('suspendeded applications' or thunks,) so we model closures/partial
> applications in a sort of 'defunctionalized' way (making grin a sort
> of 'defunctionalized intermediate language' really,) by turning them
> into something along the lines of an algebraic data type in GRIN. A
> good benefit of this is that you actually /don't/ have to write
> eval/apply yourself, because the compiler is supposed to generate it
> *for* you.

Here is my biggest problem with GRIN: it is not STG by far. I formatted
my brain one way, so I find difficult to reformat it another way

> In fact, this is a core part of GRIN - the generation of eval by the
> compiler is critical for many important optimizations to take
> place. It also makes the runtime a bit simpler.

If I find GRIN is overall simpler, I am happy.

> This comes at the price that GRIN is by design a whole-program
> intermediate form; in order to pull off any of these sophisticated
> transformations everything must be in memory at once. But as we have
> seen with LHC/JHC, it can make a *huge* difference (apps that are 10x

Re: [Haskell-cafe] Mystified by Cabal

2009-03-08 Thread Svein Ove Aas
On Sun, Mar 8, 2009 at 12:32 PM, Duncan Coutts
 wrote:
> Note also that the list of licenses mkcabal offers is wrong. You can get
> the list from the Cabal lib itself so there is no need to maintain the
> list manually.
>
It would also be nice to expand that list somewhat, to at least cover
the most used licences - GPL2, GPL3, AGPL, etc.

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


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

2009-03-08 Thread Csaba Hruska
2009/3/8 Peter Verswyvelen 

> Of course I write everything in haskell! I mean about Ogre that i use only
>> it's model and material formats and none of its code. Thats all.
>
>
> That's a big relief :-) Will it all be in the IO monad, or do you aim for a
> pure interface?
>
I prefer pure interface.

>
>> Yes, later I'd like to write a collada importer. :)
>
>
> Super. If I find the time I could help with both projects since I've done a
> lot of OGRE hacking and wrote a small collada importer, albeit in C#
>
Cooperation would be great!

>
>
>
>>
>>
>> 2009/3/8 Peter Verswyvelen 
>>
>> Awesome!
>>> When you say you took Ogre as a base, do you mean your engine will be
>>> able to load the meshes and material files, or are you also wrapping the C++
>>> code base?
>>>
>>> Did you also consider Collada?
>>>
>>> 2009/3/8 Csaba Hruska 
>>>
 Hi!

 This should be a bit offtopic, but now I'd like to announce that I'm
 working on a 3D rendering rengine in Haskell.
 I take ogre3d (www.ogre3d.org) as a base. My code can import import a
 subset of ogre model files (currently xml version) and material scripts
 (http://www.ogre3d.org/docs/manual/manual_14.html#SEC23).
 You can easily import an existing 3d content or create new one because
 there are ogre exporter plugins for every major modeler programs.
 Currently I have some working code. I hope I'll be ready to release it
 in a month. It should act as graphical backend for FRP libraries.
 I use yampa in the example program but it's just an option, only example
 program depends on it.

 Cheers,
 Csaba Hruska

 ___
 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] Re: cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Tomáš Janoušek
Hello,

On Sat, Mar 07, 2009 at 05:51:56PM -0800, Ahn, Ki Yung wrote:
> I sometimes clean up .ghc and .cabal in my home directory to start from
> scratch because of dependency loopholes (cabal-install does not have
> remove option yet, so it's hard to fix when such loophole happens).

You may use ghc-pkg hide or ghc-pkg unregister to solve these problems.

-- 
Tomáš Janoušek, a.k.a. Liskni_si, http://work.lisk.in/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-03-08 Thread Peter Verswyvelen
>
> Of course I write everything in haskell! I mean about Ogre that i use only
> it's model and material formats and none of its code. Thats all.


That's a big relief :-) Will it all be in the IO monad, or do you aim for a
pure interface?

>
> Yes, later I'd like to write a collada importer. :)


Super. If I find the time I could help with both projects since I've done a
lot of OGRE hacking and wrote a small collada importer, albeit in C#



>
>
> 2009/3/8 Peter Verswyvelen 
>
> Awesome!
>> When you say you took Ogre as a base, do you mean your engine will be able
>> to load the meshes and material files, or are you also wrapping the C++ code
>> base?
>>
>> Did you also consider Collada?
>>
>> 2009/3/8 Csaba Hruska 
>>
>>> Hi!
>>>
>>> This should be a bit offtopic, but now I'd like to announce that I'm
>>> working on a 3D rendering rengine in Haskell.
>>> I take ogre3d (www.ogre3d.org) as a base. My code can import import a
>>> subset of ogre model files (currently xml version) and material scripts
>>> (http://www.ogre3d.org/docs/manual/manual_14.html#SEC23).
>>> You can easily import an existing 3d content or create new one because
>>> there are ogre exporter plugins for every major modeler programs.
>>> Currently I have some working code. I hope I'll be ready to release it in
>>> a month. It should act as graphical backend for FRP libraries.
>>> I use yampa in the example program but it's just an option, only example
>>> program depends on it.
>>>
>>> Cheers,
>>> Csaba Hruska
>>>
>>> ___
>>> 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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Jochem Berndsen
Ahn, Ki Yung wrote:
> If anyone who are not using debian distribution ghc-6.10.1 (e.g.,
> general linux binary ghc-6.10.1 or source compiled one) can try
> bootstrapping cabal-install 0.6.2 from scratch also finds the same
> problem, I think someone should make a ticket for cabal-install.

I remember having to install zlib1g-dev using the package manager,

   aptitude install zlib1g-dev

should suffice. If this was not the problem, please post the exact error
message so we can figure out what's going wrong.

Regards,

-- 
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2009-03-08 Thread Csaba Hruska
Of course I write everything in haskell! I mean about Ogre that i use only
it's model and material formats and none of its code. Thats all.
Yes, later I'd like to write a collada importer. :)

2009/3/8 Peter Verswyvelen 

> Awesome!
> When you say you took Ogre as a base, do you mean your engine will be able
> to load the meshes and material files, or are you also wrapping the C++ code
> base?
>
> Did you also consider Collada?
>
> 2009/3/8 Csaba Hruska 
>
>> Hi!
>>
>> This should be a bit offtopic, but now I'd like to announce that I'm
>> working on a 3D rendering rengine in Haskell.
>> I take ogre3d (www.ogre3d.org) as a base. My code can import import a
>> subset of ogre model files (currently xml version) and material scripts
>> (http://www.ogre3d.org/docs/manual/manual_14.html#SEC23).
>> You can easily import an existing 3d content or create new one because
>> there are ogre exporter plugins for every major modeler programs.
>> Currently I have some working code. I hope I'll be ready to release it in
>> a month. It should act as graphical backend for FRP libraries.
>> I use yampa in the example program but it's just an option, only example
>> program depends on it.
>>
>> Cheers,
>> Csaba Hruska
>>
>> ___
>> 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


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

2009-03-08 Thread Peter Verswyvelen
Awesome!
When you say you took Ogre as a base, do you mean your engine will be able
to load the meshes and material files, or are you also wrapping the C++ code
base?

Did you also consider Collada?

2009/3/8 Csaba Hruska 

> Hi!
>
> This should be a bit offtopic, but now I'd like to announce that I'm
> working on a 3D rendering rengine in Haskell.
> I take ogre3d (www.ogre3d.org) as a base. My code can import import a
> subset of ogre model files (currently xml version) and material scripts
> (http://www.ogre3d.org/docs/manual/manual_14.html#SEC23).
> You can easily import an existing 3d content or create new one because
> there are ogre exporter plugins for every major modeler programs.
> Currently I have some working code. I hope I'll be ready to release it in a
> month. It should act as graphical backend for FRP libraries.
> I use yampa in the example program but it's just an option, only example
> program depends on it.
>
> Cheers,
> Csaba Hruska
>
> ___
> 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


Re: [Haskell-cafe] Mystified by Cabal

2009-03-08 Thread Duncan Coutts
On Sat, 2009-03-07 at 17:30 +, Colin Paul Adams wrote:
> > "Svein" == Svein Ove Aas  writes:
> 
> >> Preprocessing library game-tree-1.0.0.0...  Building
> >> game-tree-1.0.0.0...
> >> 
> >> Data/Tree/Game/Negascout.hs:31:0: Unrecognised pragma [1 of 2]
> >> Compiling Data.Tree.Game.Tree ( Data/Tree/Game/Tree.hs,
> >> dist/build/Data/Tree/Game/Tree.o )
> >> 
> >> Data/Tree/Game/Tree.hs:1:0:Failed to load interface for
> >> `Prelude':  it is a member of package base-3.0.3.0, which
> >> is hidden
> >> 
> Svein> What does your .cabal file look like?

Don, mkcabal is generating .cabal files that are confusing people.

It should generate new-style .cabal files with library or executable
sections. The ghc-options and build-depends etc need to be in the lib or
exe section.

The files it generates are not actually broken but it leaves new users
to do the conversion from old style to new and unsurprisingly many get
that wrong. Cabal is also at fault here for not providing good
diagnostics but it would help if mkcabal used the current recommended
style.

Note also that the list of licenses mkcabal offers is wrong. You can get
the list from the Cabal lib itself so there is no need to maintain the
list manually.

I still think mkcabal should be integrated into cabal-install, like:
$ cabal init
or something. We could also more easily keep it up to date that way.

Duncan

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


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

2009-03-08 Thread Csaba Hruska
Hi!

This should be a bit offtopic, but now I'd like to announce that I'm working
on a 3D rendering rengine in Haskell.
I take ogre3d (www.ogre3d.org) as a base. My code can import import a subset
of ogre model files (currently xml version) and material scripts
(http://www.ogre3d.org/docs/manual/manual_14.html#SEC23).
You can easily import an existing 3d content or create new one because there
are ogre exporter plugins for every major modeler programs.
Currently I have some working code. I hope I'll be ready to release it in a
month. It should act as graphical backend for FRP libraries.
I use yampa in the example program but it's just an option, only example
program depends on it.

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


Re: [Haskell-cafe] cabal-install 0.6.2 does not bootstrap with ghc-6.10.1 debian distribution

2009-03-08 Thread Duncan Coutts
On Sat, 2009-03-07 at 17:51 -0800, Ahn, Ki Yung wrote:
> Dear Haskellers and especially who are working on cabal-install
> and debian packaging,
> 
> I sometimes clean up .ghc and .cabal in my home directory to start from
> scratch because of dependency loopholes (cabal-install does not have
> remove option yet, so it's hard to fix when such loophole happens).
> 
> Today, I had some time in the airport and decided to start from scratch
> again because of the dependency loophole with process 1.0.1.1 and
> haddock.  I downloaded the most recent version of cabal-install the
> version 0.6.2, and found out that the ./bootstrap.sh does not work.

If you could provide any details on how it does not work that would be
much appreciated. Eg a log of the output from running the bootstrap.

Duncan

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


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

2009-03-08 Thread Roman Cheplyaka
* Peter Verswyvelen  [2009-03-08 12:00:23+0100]
> On Sat, Mar 7, 2009 at 6:49 PM, Roman Cheplyaka  wrote:
> 
> > * Peter Verswyvelen  [2009-03-07 18:34:10+0100]
> > > On Fri, Mar 6, 2009 at 10:39 PM, Roman Cheplyaka 
> > wrote:
> > >
> > > Is it a performance issue?
> >
> > Yes. As Roman Leshchinskiy explained it's because parallel arrays are
> > not fused properly yet.
> > But it's quite trivial to modify Hpysics to use ordinary lists or
> > arrays, and I think it'll give reasonable performance.
> >
> 
> Personally I would not mind too much about performance initially; I'm very
> confident that lots of optimizations can be done afterwards  - maybe even
> letting the GPU handle certain tasks.

I wouldn't mind too if it was just 'inefficient'; however, it's
practically unusable.

<>

http://physics-dph.blogspot.com/2008/08/status-report-week-11-12.html

-- 
Roman I. Cheplyaka :: http://ro-che.info/
"Don't let school get in the way of your education." - Mark Twain
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Cabal and package changelog

2009-03-08 Thread Manlio Perillo

Hi.

The Cabal package description includes a property `license-file`.
This property may be used by Hackage to provide a link to the license file.

However I would like to have a `changelog-file`, too.
So that from Hackage I can quickly check what's changed with the new 
version of a package.



Is this feasible?


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


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

2009-03-08 Thread Peter Verswyvelen
On Sat, Mar 7, 2009 at 6:49 PM, Roman Cheplyaka  wrote:

> * Peter Verswyvelen  [2009-03-07 18:34:10+0100]
> > On Fri, Mar 6, 2009 at 10:39 PM, Roman Cheplyaka 
> wrote:
> >
> > Is it a performance issue?
>
> Yes. As Roman Leshchinskiy explained it's because parallel arrays are
> not fused properly yet.
> But it's quite trivial to modify Hpysics to use ordinary lists or
> arrays, and I think it'll give reasonable performance.
>

Personally I would not mind too much about performance initially; I'm very
confident that lots of optimizations can be done afterwards  - maybe even
letting the GPU handle certain tasks.


>
> > > > Integrating hpysics with Grapefruit might be a good topic for the
> > > Hackaton,
> > > > trying to make a simple game (e.g. Pong or Breakout) without using
> > > recursive
> > > > signal functions, but with correct collision response and
> > > better-than-Euler
> > > > integration, all handled by the physics engine. Other FRP engines
> could
> > > be
> > > > tried, but Grapefruit hacking is already a topic on the Hackaton, so
> it
> > > > would combine efforts.
> > >
> > > Yes, I'm actively pondering Hpysics+Grapefruit (it's the primary reason
> > > of my interest in Grapefruit). But first of all we need to get graphics
> > > support into Grapefruit.
> > >
> > > Does your proposal re Hackathon indicate that you'd like to join?
> > >
> >
> > Yes, Thomas 'Bob' Davie and I already joined the Hackaton, but the wiki
> is
> > not yet updated.I see you've joined too, cool
>
> Great! I'll have more free time after March 15, and we can arrange an
> IRC meeting to discuss this.


Sounds like a good idea!



>
>
> --
> Roman I. Cheplyaka :: http://ro-che.info/
> "Don't let school get in the way of your education." - Mark Twain
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] I want to write a compiler

2009-03-08 Thread Ben Lippmeier


On 08/03/2009, at 12:45 PM, Austin Seipp wrote:


For garbage collection, please see.

"Accurate Garbage Collection in an Uncooperative Environment" -
http://citeseer.ist.psu.edu/538613.html

This strategy is currently used in Mercury as well as Ben L.'s DDC
language; on that note, I think if you spent some time looking through
the runtime/generated code of DDC, you can see exactly what the paper
is talking about, because it's actually a very simple strategy for
holding onto GC roots:

http://code.haskell.org/ddc/ddc-head/runtime/


That paper explains the basic idea, but neither DDC or Mercury quite  
follow it (I asked Zoltan). The system in the paper keeps the GC roots  
in structs on the C stack, and chains the structs together as a linked  
list. The problem is that if you take a pointer to data on the C stack  
then GCC freaks out and disables a host of optimisations. I imagine  
it's worried about pointers going bad after the stack frame is popped  
and the space for the struct gets lost.


DDC keeps a shadow stack of GC roots in malloced memory. It's only a  
small difference, but lets the C compiler produce better code.


Ben.



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


Re: [Haskell-cafe] Naturality condition for inits

2009-03-08 Thread J.N. Oliveira

R J wrote:


Here's another Bird problem that's stymied me:

The function "inits" computes the list of initial segments of a list; 
its type is inits :: [a] -> [[a]].  What is the appropriate naturality 
condition for "inits"?


Just use the free theorem associated to type [a] -> [[a]] in Janis 
Voigtlaender’s free theorem generator


   http://linux.tcs.inf.tu-dresden.de/~voigt/ft

and see the outcome when all permissible relation variables are 
functions (at the bottom of the screen).


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


Re: [Haskell-cafe] I want to write a compiler

2009-03-08 Thread Ryan Ingram
I really like this book:

http://research.microsoft.com/en-us/um/people/simonpj/papers/pj-lester-book/

It walks you through building a compiler to a reasonable intermediate
language, which you can then start with; it's is a much easier problem
to convert that intermediate langauge to assembly, C, or LLVM.

  -- ryan

On Sat, Mar 7, 2009 at 5:20 PM, Jeremy Shaw  wrote:
> Hello,
>
> This book is pretty good IMO:
>
> http://research.microsoft.com/en-us/um/people/simonpj/papers/slpj-book-1987/
>
> It does not cover STG, but it does cover a ton of useful stuff and is
> very well written.
>
> I can say from experience that the spineless-tagless-gmachine paper
> you referenced does contain all the information needed to implement an
> STG->C compiler. But, you should expect to spend a lot of time
> alternating between trying to implement the thing and rereading the
> paper.
>
> Also, you may find that it is easier to do STG->Assembly at first (via
> harpy or something). With assembly it is easier to express exactly
> what you want to happen. With C you have to try to figure out how to
> trick the C compiler into doing your bidding.
>
> Also, maybe it is more satisfying to output assembly, because then you
> really feel like you are writing a compiler ;)
>
> I am sure others will say that LLVM is a better option than C or
> assembly. I know almost nothing about LLVM, so they may be right.
>
> -- jeremy
>
> At Sun, 8 Mar 2009 01:32:48 +0200,
> Loup Vaillant wrote:
>>
>> This is a homework question. I am mainly looking for guidance or
>> pointers. Source code, even. (Not GHC's, though, it is too complicated
>> for me right now. The AST of STG is fine, but the rest kinda scares
>> me.)
>>
>> Ideally, I would very much like to compile to C.
>>
>> The requirements are easily stated. My language must
>> -> be lazy by default,
>> -> support algebraic data types and case expressions (unless I can get
>> away with encoding them as functions),
>> -> have some kind of FFI with C (I suppose it imply some support for
>> unboxed values).
>>
>> There is also the first class functions thing, but lambda lifting is okay.
>>
>> I don't care about any kind of execution efficiency. I just want my
>> compiler to be As Simple As Possible. Eventually, I intend to
>> bootstrap. Then, I will start dreaming about doing better than the
>> Mighty Simons. (I can dream, right?)
>>
>> I figured I would start by the back-end. I began to write 15 pathetic
>> lines of code to start an STG machine. Needles to say, I am stuck. I
>> don't know where to start.
>>
>> I am already familiar with some papers. In particular, [1] (on
>> template instantiation), [2] and [3]. I once wrote a simple graph
>> reducer using template instantiation (about 20 lines at most).
>>
>> I have chosen the STG machine because I thought i would be easier to
>> get an FFI and case exprs out of it. Maybe I am wrong, and template
>> instantiation is really easier. There is also the BRISK machine, and
>> GRIN. But the paper I read were less readable to me than the three
>> mentioned.
>>
>> So, If any of you can give me some pointer or guidance or advice about
>> where to start, I would be very grateful.
>>
>> Loup
>>
>>
>> [1] http://www.cs.otago.ac.nz/cosc459/books/pjlester.pdf
>> [2] 
>> http://research.microsoft.com/~simonpj/Papers/spineless-tagless-gmachine.ps.gz
>> [3] http://research.microsoft.com/~simonpj/Papers/eval-apply/index.htm
>> ___
>> 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 mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe