bwsanders:
Hello,
I just uploaded fallingblocks to Hackage. It is another Tetris clone, but it
uses SDL, and I thought there could be more SDL examples.
Any and all comments and suggestions will be extremely appreciated!
There is a darcs repo at
2009/3/27 Achim Schneider bars...@web.de:
wren ng thornton w...@freegeek.org wrote:
Colin Adams wrote:
2009/3/25 wren ng thornton w...@freegeek.org:
when I look up the Haddock-generated documentation for a function, I
DON'T appreciate it if that is in the form of a hyperlink to a
Well, this approach has the problem that the running sum of key k blocks
until a new value for that k arrives in the input stream.
If you wanted to know the sum of the values of each key after you got
nelements in the input stream, we could change the valuesWithKey
inner function into:
Thanks a lot for the answer!
On Thu, Mar 26, 2009 at 4:36 PM, John Lato jwl...@gmail.com wrote:
Languages with checked exceptions usually use them for two purposes:
1. Exceptional conditions - disk full, CPU on fire, etc.
2. Error handling - invalid arguments to a function, attempt to
Hello
What do you think of this? There is perhaps a recursive call that should be
made tail recursive but it seems to work.
The 'group' function takes the list of pairs as input and outputs a list of
maps from key to sums.
The nth element of the list of maps corresponds to the grouping applied
On Thu, 26 Mar 2009, wren ng thornton wrote:
Functions like uncons and viewL are nicer (because they're safe), but they
can have overhead because they're unnecessarily complete (e.g. the Maybe
wrapper can be avoided if we know a-priori that Just will be the constructor
used).
If you know,
wren ng thornton wrote:
The type of head should not be [a] - a + Error, it should be (a:[a]) -
a. With the latter type the compiler can ensure the precondition will be
proved before calling head, thus eliminating erroneous calls.
Yes, but you know and I know that's not haskell.
I'm talking
Jonathan Cast wrote:
Sure. Which also points out that the original safeDiv wasn't actually
safe, since there's no guarantee of what evaluate will do with x and y.
(Actually, there's not much guarantee of what evaluate does anyway ---
just that any errors in e's definition get turned into
Sterling,
the toSElem function of ToSElem does not take a parameter that allows
specification of e.g. the locale that shall be used for rendering a specific
attribute. If one wants to change this, one also has to change setAttribute and
the like. Do you have any plans to extend
Colin Adams colinpaulad...@googlemail.com wrote:
2009/3/27 Achim Schneider bars...@web.de:
wren ng thornton w...@freegeek.org wrote:
Colin Adams wrote:
A reference to a research paper is fine to show where the ideas
came from, but that is not where the library documentation
should
On Fri, Mar 27, 2009 at 10:01 AM, Gregory Petrosyan
gregory.petrosyan+hask...@gmail.com wrote:
Thanks a lot for the answer!
On Thu, Mar 26, 2009 at 4:36 PM, John Lato jwl...@gmail.com wrote:
Languages with checked exceptions usually use them for two purposes:
1. Exceptional conditions -
On Fri, 2009-03-27 at 12:24 +, Chris Kuklewicz wrote:
Jonathan Cast wrote:
Sure. Which also points out that the original safeDiv wasn't actually
safe, since there's no guarantee of what evaluate will do with x and y.
(Actually, there's not much guarantee of what evaluate does anyway
Hi Lennart,
This is not a real solution, but maybe helpful. The hint package
(wrapping the ghc API) has its typeOf:
cabal install hint
import Language.Haskell.Interpreter
runInterpreter (typeOf \\x - x)
Right t - t
Best,
Roland
On Wed, Mar 25, 2009 at 7:33 PM, Lennart Augustsson
Guys,
I appreciate the contribution but I'm now more confused than ever :)
On the Co-Induction-whatever thingy: Thanks, that's certainly something
interesting and I'll try to find out more about it.
But it looks like none of all the proposals offers a true solution, at
least none from start
On Thu, 26 Mar 2009 20:41:57 +0100, Henk-Jan van Tuyl hjgt...@chello.nl
wrote:
Your space ship enters an asteroid belt, try to avoid
collisions!
wxAsteroids is a game demonstrating the wxHaskell GUI.
More about this at:
http://www.haskell.org/haskellwiki/wxAsteroids
Maybe I should add
How do you plan to consume the running sums of these data? How many
different keys do you have?
If all pure stuff fails, you can always revert to imperative techniques,
using a mutable
arrayhttp://www.haskell.org/ghc/docs/6.6.1/html/libraries/base/Data-Array-ST.htmlor
something :)
On Fri, Mar
I am writing some code for citation support in gitit, and all the
#ifdefs I'm using to do conditional compilation are a bit tiresome.
Suppose you have the requirement that a certain feature of your
software be disable-able at compile time, to avoid having to pull in
certain dependencies (which
Oleg,
You rock! And you're a star!
So you must be a rock star. :)
Thanks!
-- Lennart
On Thu, Mar 26, 2009 at 5:33 AM, o...@okmij.org wrote:
Does anyone know of a trick to accomplish `typeOf id'?
Using something else than TypeRep as the representation, of course.
Yes. The analysis of
Hi Robin,
On Fri, Mar 27, 2009 at 16:13, Robin Green wrote:
Suppose you have the requirement that a certain feature of your
software be disable-able at compile time, to avoid having to pull in
certain dependencies (which may not be available on all platforms).
Disabling a feature may entail
A small milestone in the packaging business:
http://archhaskell.wordpress.com/2009/03/27/arch-haskell-news-mar-14-2009-1000-haskell-packages/
More than 1000 Haskell packages packaged up for Arch Linux.
Hackage now has 1163 (+41) Haskell packages, of which 1007 (+33) have
been natively packaged
Quoth John Lato jwl...@gmail.com,
An exception is caused by some sort of interaction with the run-time
system (frequently a hardware issue). The programmer typically can't
check for these in advance, but can only attempt to recover after
they've happened.
An error is some sort of bug that
With Cabal we have this nice dependency system: when you install a package,
it installs missing but requires packages.
How do you solve this with Darcs? I hate it that I must manually figure out
the dependencies, and then do a darcs get on them individually.
Continuing our adventures into stylistic and semantic differences:-)
Can you write this analysis on the wiki?
Hmm, we tried that in the past, and I haven't seen any indication
that people search for those things, let alone find them (one particular
example I recalled I still haven't been able
On Fri, 2009-03-27 at 09:31 -0700, Donn Cave wrote:
Quoth John Lato jwl...@gmail.com,
An exception is caused by some sort of interaction with the run-time
system (frequently a hardware issue). The programmer typically can't
check for these in advance, but can only attempt to recover
On Fri, Mar 27, 2009 at 7:31 PM, Donn Cave d...@avvanta.com wrote:
Quoth John Lato jwl...@gmail.com,
An exception is caused by some sort of interaction with the run-time
system (frequently a hardware issue). The programmer typically can't
check for these in advance, but can only attempt to
On Fri, 2009-03-27 at 20:38 +0300, Gregory Petrosyan wrote:
On Fri, Mar 27, 2009 at 7:31 PM, Donn Cave d...@avvanta.com wrote:
Quoth John Lato jwl...@gmail.com,
An exception is caused by some sort of interaction with the run-time
system (frequently a hardware issue). The programmer
Hello,
I've just installed wxHaskell as follow:
- Download wxHaskell from the following page:
http://haskell.org/haskellwiki/WxHaskell/Download and downloaded the binairy
version for Windows XP.
- Registered using the batch file provided.
Now I have this small program from my education page
Quoth Jonathan Cast jonathancc...@fastmail.fm,
An `error' is any condition where the correct response is for the
programmer to change the source code :)
That's a broad category, that overlaps with conditions where there
are one or more correct responses for the original program as well.
If I
I'm happy to announce my very second Hackage upload!*
HackMail is a Procmail-alike, though it doesn't (yet) support promail
syntax. It dynamically loads a haskell source file (literate or vanilla,
eithers okay) and then sits as a daemon watching a directory for new
emails. The source file
On Fri, 27 Mar 2009 19:35:05 +0100, Tsunkiet Man temp.t...@gmail.com
wrote:
Hello,
I've just installed wxHaskell as follow:
- Download wxHaskell from the following page:
http://haskell.org/haskellwiki/WxHaskell/Download and downloaded the
binairy
version for Windows XP.
- Registered
Hi,
um, well, I'm not even sure if I have correctly understood this.
Some of the memoizing functions, they actually remember stuff
*between* calls?
Günther
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hello Gü?nther,
Friday, March 27, 2009, 11:30:41 PM, you wrote:
Some of the memoizing functions, they actually remember stuff
*between* calls?
what i've seen in haskell - functions relying on lazy datastructures
that ensure computation on first usage so this looks exactly like as
memoizing:
Hello,
I am running Ubuntu Linux. I have forgotten what is the preferred
means of upgrading. Download the source and compile it using my current
compiler .. 6.8.2?
Regards, Vasili
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi Bulat,
that is so cool!
Günther
Bulat Ziganshin schrieb:
Hello Gü?nther,
Friday, March 27, 2009, 11:30:41 PM, you wrote:
Some of the memoizing functions, they actually remember stuff
*between* calls?
what i've seen in haskell - functions relying on lazy datastructures
that ensure
Vasili I. Galchin wrote:
I am running Ubuntu Linux. I have forgotten what is the preferred
means of upgrading. Download the source and compile it using my current
compiler .. 6.8.2?
I would recommend to download the binary distribution for your
architecture, unpack it and install it.
It seems there is a very close correspondence between data structures and
functions in Haskell. Your powersOfTwo function, since it gets memoized
automatically (is this the case for all functions of zero arguments?), seems
exactly like a data structure. This harks back to my Scheme days when we
From: Jules Bean ju...@jellybean.co.uk
wren ng thornton wrote:
The type of head should not be [a] - a + Error, it should be (a:[a]) -
a. With the latter type the compiler can ensure the precondition will be
proved before calling head, thus eliminating erroneous calls.
Yes, but you know and
On Fri, 2009-03-27 at 14:26 -0700, Kirk Martinez wrote:
Your powersOfTwo function, since it gets memoized automatically (is
this the case for all functions of zero arguments?),
It is the case for all functions which have zero arguments *at the time
they are presented to the code generator*.
2009/03/27 John Lato jwl...@gmail.com:
From: Jules Bean ju...@jellybean.co.uk
wren ng thornton wrote:
The type of head should not be [a] - a + Error, it should
be (a:[a]) - a. With the latter type the compiler can
ensure the precondition will be proved before calling
head, thus
Oh yes, it works. I'm sorry for not noticing how this application works.
Now I really wonder how I can implement that into winHugs and other GUI's =)
Thank you for your response.
2009/3/27 Henk-Jan van Tuyl hjgt...@chello.nl
On Fri, 27 Mar 2009 19:35:05 +0100, Tsunkiet Man
On Fri, Mar 27, 2009 at 9:51 PM, Jason Dusek jason.du...@gmail.com wrote:
2009/03/27 John Lato jwl...@gmail.com:
From: Jules Bean ju...@jellybean.co.uk
wren ng thornton wrote:
The type of head should not be [a] - a + Error, it should
be (a:[a]) - a. With the latter type the compiler can
2009/3/27 Kirk Martinez kirk.marti...@gmail.com:
It seems there is a very close correspondence between data structures and
functions in Haskell. Your powersOfTwo function, since it gets memoized
automatically (is this the case for all functions of zero arguments?), seems
exactly like a data
In my blog http://progandprog.blogspot.com/2009/03/i18n-and-haskell.html,
I've described
process of internationalization Haskell programms using GNU GetText. I
wrote hgettext tool and
Text.I18N.GetText library to help with internationalization (latest sources on
2009/3/27 Kirk Martinez kirk.marti...@gmail.com:
I wonder: does the converse exist? Haskell data constructors which are
really functions? How and for what might one use those?
You might enjoy reading about the use of tries for memoisation. Conal
Elliott explains nicely how you can an
Hello,
I've seen it done explicitly as is shown in the code below. 'f' in
'longest' is the function which is being memoized by the 'dp'. It's
pretty slick, IMO.
(not sure where this code came from. Also I may have broken it, but
you get the idea):
module Diff where
import Data.Array
-- *
If you have a type that requires a format string, the proper place to
pass that string in is not the toSElem method. Rather, one should
construct a ToSElem instance that wraps the item in an (STSH .
STShow) constructor. The item itself then should be made an instance
of
Hi Dan,
yep, I've come across that one too and wouldn't you know it, the by now
infamous Luke Palmer has left an interesting insight on that blog too :).
So I reckon here the cycle closes.
Günther
Dan Piponi schrieb:
2009/3/27 Kirk Martinez kirk.marti...@gmail.com:
I wonder: does the
Kirk Martinez wrote:
It seems there is a very close correspondence between data structures
and functions in Haskell. Your powersOfTwo function, since it gets
memoized automatically (is this the case for all functions of zero
arguments?), seems exactly like a data structure. This harks back
On Sat, 28 Mar 2009, Vasyl Pasternak wrote:
In my blog http://progandprog.blogspot.com/2009/03/i18n-and-haskell.html,
I've described
process of internationalization Haskell programms using GNU GetText. I
wrote hgettext tool and
Text.I18N.GetText library to help with internationalization
2009/3/28 Henning Thielemann lemm...@henning-thielemann.de:
On Sat, 28 Mar 2009, Vasyl Pasternak wrote:
In my blog http://progandprog.blogspot.com/2009/03/i18n-and-haskell.html,
I've described
process of internationalization Haskell programms using GNU GetText. I
wrote hgettext tool and
From a previous email in the beginners list I more or less understood that
the monomorphism restriction will not exist anymore in Haskell Prime.
Is this correct?
On Fri, Mar 27, 2009 at 10:32 PM, Jonathan Cast
jonathancc...@fastmail.fmwrote:
On Fri, 2009-03-27 at 14:26 -0700, Kirk Martinez
I kind a mention this because it might be easy for a polymorphic CAF to do
memoization so its value gets computed maximum once per type, e.g (quick and
dirty code follows)
import Data.Typeable
import Data.IORef
import qualified Data.IntMap as M
import System.IO.Unsafe
On Sat, Mar 28, 2009 at 12:20:04AM +0200, Vasyl Pasternak wrote:
In my blog http://progandprog.blogspot.com/2009/03/i18n-and-haskell.html,
I've described
process of internationalization Haskell programms using GNU GetText. I
wrote hgettext tool and
Text.I18N.GetText library to help with
Jonathan Cast schrieb:
i.e., that application's
file decoding result should be an Either type that anticipates that
the file encoding may be invalid.
This is pretty standard, I thought. Do people write Haskell file input
methods that are undefined (`throw exceptions') on invalid inputs
On Thu, 26 Mar 2009, John Lato wrote:
Henning T., FYI your constant advocacy has gotten at least one person
around to this view.
I'm glad that it is not (only) perceived as annoyance. :-)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Fri, 2009-03-27 at 12:26 +0100, Henning Thielemann wrote:
On Thu, 26 Mar 2009, wren ng thornton wrote:
Functions like uncons and viewL are nicer (because they're safe), but they
can have overhead because they're unnecessarily complete (e.g. the Maybe
wrapper can be avoided if we know
On Fri, 27 Mar 2009, Donn Cave wrote:
Quoth Jonathan Cast jonathancc...@fastmail.fm,
An `error' is any condition where the correct response is for the
programmer to change the source code :)
That's a broad category, that overlaps with conditions where there
are one or more correct
On Fri, 27 Mar 2009, Robin Green wrote:
I am writing some code for citation support in gitit, and all the
#ifdefs I'm using to do conditional compilation are a bit tiresome.
I live well without CPP in Haskell. When I need conditional compilation I
create two directories with modules of the
is there any reason why Language.C.Syntax.AST.CTranslUnit doesn't
derive show? I would like to look at the data structure it generates.
It's a lot easier to experiment it when i can write a template C
file, print out the AST and then modify that data structure directly,
instead of trying to grok
On Fri, 27 Mar 2009, Jason Dusek wrote:
2009/03/27 John Lato jwl...@gmail.com:
I could follow the rest of this, but I don't understand why
'head' is necessary. Couldn't you always replace it with a
case statement, with undefined on [] if necessary?
How would that be any different from
On Thu, 26 Mar 2009, wren ng thornton wrote:
Thomas Hartman wrote:
Luke, does your explanation to Guenther have anything to do with
coinduction? -- the property that a producer gives a little bit of
output at each step of recursion, which a consumer can than crunch in
a lazy way?
It has
ah, i am guessing its because you can use Data.Generics.gshow to do
the same thing. Seems like that library will come in handy when
manipulating the AST, pretty cool stuff.
On Fri, Mar 27, 2009 at 5:53 PM, Anatoly Yakovenko
aeyakove...@gmail.com wrote:
is there any reason why
On Fri, Mar 27, 2009 at 7:03 PM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
On Thu, 26 Mar 2009, wren ng thornton wrote:
Thomas Hartman wrote:
Luke, does your explanation to Guenther have anything to do with
coinduction? -- the property that a producer gives a little bit of
Most breakage caused by new HTTP package is due to the renaming from
Response to Response_String and Request to Request_String. I think it was
not a good idea to do that. There could have well be two types named
Response from different modules, one with a type parameter and the other
one
From: Donn Cave d...@avvanta.com
Quoth John Lato jwl...@gmail.com,
An exception is caused by some sort of interaction with the run-time
system (frequently a hardware issue). The programmer typically can't
check for these in advance, but can only attempt to recover after
they've happened.
Henning Thielemann lemm...@henning-thielemann.de wrote:
The usual example against clear separation of exceptions and errors is the
web server which catches 'error's in order to keep running.
However, the web server starts its parts as threads, and whenever one thread
runs into an 'error',
Okay, I've written a draft Haddock-GSOC application: would any of you like to
review it / suggest how it could be improved? (or should I just submit it to
Google?) I'm particularly wondering whether my proposed time-line seems
realistic. -Isaac
* What is the goal of the project you
Mark Spezzano wrote:
Just looking at the definitions for foldr and foldl I see that foldl is
(apparently) tail recursive while foldr is not.
Why?
Is it because foldl defers calling itself until last whereas foldr
evaluates itself as it runs?
What, strictly speaking, is the definition
I assume cabal install darcs isn't what you're looking for.. can you
give a real-world example ?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On February 1, I sent a message to this list asking for advice on how
to write a parallel term reduction system. I now have a semi-explicit
parallelised version of a term reduction system that makes effective
use of multiple CPUs. The enclosed code describes the solution, even
though its
Quoth Henning Thielemann lemm...@henning-thielemann.de,
On Fri, 27 Mar 2009, Donn Cave wrote:
Quoth Jonathan Cast jonathancc...@fastmail.fm,
An `error' is any condition where the correct response is for the
programmer to change the source code :)
That's a broad category, that overlaps with
71 matches
Mail list logo