Joost Behrends wrote:
@Daniel: no, this doesn't solve the stack problem. These are the primefactors of
2^120+1: [97,257,673,394783681,4278255361,46908728641].
oddFactors k n | otherwise = oddFactors (k+2) n
could eventually push 394783681-673 function calls onto the stack before finding
the f
On 2007.12.19 10:57:33 -0500, David Roundy <[EMAIL PROTECTED]> scribbled 0.3K
characters:
> No, I don't have time. And I'm not sure why one would want no borders
> on floating windows...
>
> David
Perhaps I don't fully understand the issues, but wouldn't such a thing be nice
for things like MPl
On Wed, 2007-12-19 at 19:07 -0800, Don Stewart wrote:
> There are three approaches, depending on the size of your project.
>
> Write your ow FFI decls manually.
>
> - Good when you have a small job
> - and the C types are simple
> - example:
> strlen
>
>
stevelihn:
> On Dec 11, 2007 11:16 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> > >2. It offers strong support for integration with other languages and
> > > tools
> > >(FFI? Is the support strong?)
> >
> >2. The FFI in Haskell is perhaps the most powerful out there.
> > You can
On Dec 11, 2007 11:16 PM, Don Stewart <[EMAIL PROTECTED]> wrote:
> >2. It offers strong support for integration with other languages and
> > tools
> >(FFI? Is the support strong?)
>
>2. The FFI in Haskell is perhaps the most powerful out there.
> You can import C or export Haskel
Hallo,
On Dec 19, 2007 9:25 PM, John Meacham <[EMAIL PROTECTED]> wrote:
>
> Actually, it is a pretty fundamental feature of the lisp-derived
> languages that they can self modify their own source, and hence keep
> their own source representation all the way through runtime.
>
This is not act
On Dec 20, 2007 1:23 AM, Jake McArthur <[EMAIL PROTECTED]> wrote:
> On Dec 19, 2007, at 6:25 PM, John Meacham wrote:
>
> > On Tue, Dec 18, 2007 at 01:58:00PM +0300, Miguel Mitrofanov wrote:
> > I just want the sistem to be able to print one of these
> > expressions !
> > Its this too mu
On Dec 19, 2007, at 6:25 PM, John Meacham wrote:
On Tue, Dec 18, 2007 at 01:58:00PM +0300, Miguel Mitrofanov wrote:
I just want the sistem to be able to print one of these
expressions !
Its this too much to ask ?
Yes, 'cause it means you want to embed almost all source code
into the
compil
On Tue, Dec 18, 2007 at 01:58:00PM +0300, Miguel Mitrofanov wrote:
> > >> I just want the sistem to be able to print one of these expressions !
> > >> Its this too much to ask ?
> > > Yes, 'cause it means you want to embed almost all source code into the
> > > compiled program.
> > So ?
> So, I d
g_sauthoff:
> Hi,
>
> I try to debug some existing Haskell-Code. Out of the blue I get a
> 'progname: Prelude.read: no parse'
> error message from GHC.
>
> Great.
>
> Well, the code includes
>
> # grep '\' *| wc -l
> 23 (sic!)
>
> calls to the read fn.
>
> Well, how do I compile a Haskell pro
The main observation I've made it when playing with the values of knowing the
self and perfect communication, nothing else becomes undefined if just
perfect communication is true, it is still depended on knowing the self if
you can have knowledge. Makes sense.
jlw501 wrote:
>
> Just to clarify
Just to clarify, this is a little gag almost. It just demonstrates the
problem of understanding knowledge as discussed by philosophers. perfectcomm
is undefined as it is unknown if you can perfectly pass on your intention to
another person. Likewise, it is unknown if you can express your subconsci
Hi
> > contains :: Eq a => [a]->a->Bool
> > contains [] e = False
> > contains (x:xs) e = if x==e then True else contains xs e
>
> contains = flip elem
And even if not using the elem function, the expression:
if x==e then True else contains xs e
can be written as:
x==e || contains xs e
Thanks
On Dec 19, 2007 7:26 PM, jlw501 <[EMAIL PROTECTED]> wrote:
>
> I'm new to functional programming and Haskell and I love its expressive
> ability! I've been trying to formalize the following function for time.
> Given people and a piece of information, can all people know the same thing?
> Anyway, t
On Dec 19, 2007 9:13 PM, Neil Mitchell <[EMAIL PROTECTED]> wrote:
> > OK, If you managed to read until this point, you might have noticed
> > that, due to the monomorphism restriction implied by Data.Typeable, it
> > is impossible to build polymorphic processes.
>
> Tom Shackell had similar issues
Hello,
You can also just use reads which returns a list of (partial) parses.
-Jeff
[EMAIL PROTECTED] wrote on 12/19/2007 03:17:39 PM:
> Hi
>
> > > Well, how do I compile a Haskell program in such a way, that I
> > > get a useful error message from read? I mean, like the
> > > filename/linen
SearchPath v0.9 does recursive module chasing accross the internet using
a combination of mapfiles you provide and the default map file, caching
the downloaded modules in a local directory. Searchpath can handle
modules in module hierarchies based at a URLs, in tgz archives
accessible via URL, a
Hi
> > Well, how do I compile a Haskell program in such a way, that I
> > get a useful error message from read? I mean, like the
> > filename/linenumber of the calling expression for starters.
I use the Safe library to do this sort of stuff:
http://www-users.cs.york.ac.uk/~ndm/safe/
You can cal
On Wed, 2007-12-19 at 13:03 -0500, Steve Lihn wrote:
. . .
> In the Disadvantage section (near the end), there is an item -- hard
> or impossible to debug. Can anybody explain why or what it means? And
> how does it apply to Haskell?
Lisp has long been touted as a good language for developing a
Hi
> OK, If you managed to read until this point, you might have noticed
> that, due to the monomorphism restriction implied by Data.Typeable, it
> is impossible to build polymorphic processes.
Tom Shackell had similar issues with passing code around at runtime.
As a result Yhc contains the Yhc.D
Georg Sauthoff <[EMAIL PROTECTED]> writes:
> Well, how do I compile a Haskell program in such a way, that I
> get a useful error message from read? I mean, like the
> filename/linenumber of the calling expression for starters.
It's dirty, it's mean, but you can use CPP. (On one line, and with
gh
I'm new to functional programming and Haskell and I love its expressive
ability! I've been trying to formalize the following function for time.
Given people and a piece of information, can all people know the same thing?
Anyway, this is just a bit of fun... but can anyone help me reduce it or
talk
On Dec 19, 2007, at 11:53 , Georg Sauthoff wrote:
I try to debug some existing Haskell-Code. Out of the blue I get a
'progname: Prelude.read: no parse'
error message from GHC.
If you can install GHC 6.8.x, you can use ghci's interactive
debugger. See http://cgi.cse.unsw.edu.au/~dons/blog/2
On Dec 19, 2007, at 13:03 , Steve Lihn wrote:
In the Disadvantage section (near the end), there is an item -- hard
or impossible to debug. Can anybody explain why or what it means? And
how does it apply to Haskell?
In the general case, you would need to design into your DSL both
ability to
Hi,
I try to debug some existing Haskell-Code. Out of the blue I get a
'progname: Prelude.read: no parse'
error message from GHC.
Great.
Well, the code includes
# grep '\' *| wc -l
23 (sic!)
calls to the read fn.
Well, how do I compile a Haskell program in such a way, that I
get a useful erro
On Wed, 2007-12-19 at 17:54 -0600, Tommy McGuire wrote:
> (Note: I haven't gotten to it in the revisions following the comments I
> received here and there are many things that need work. The notes are
> incoherent, it's more Pascallish than Haskell, and there are no
> guarantees that it won't
On Wed, 2007-12-19 at 13:03 -0500, Steve Lihn wrote:
[snip]
> I do come aross a question while reading the DSL page on Wikipedia.
>
> http://en.wikipedia.org/wiki/Domain-specific_programming_language
>
> In the Disadvantage section (near the end), there is an item -- hard
> or impossible to debug
Thanks for the explanation on DSL. It helped me understand how Haskell
works compared to other popular languages out there. It is a
programming methodology change. Or what is called paradigm change on
how to design a software with Haskell.
Haskell has its general-purpose features. Yet its strength
Andre Nathan wrote:
I think my code is a bit too long and that probably makes it hard for
someone to help... Does anyone know of good example code using StateT
for keeping a global state other than the one at the "Simple StateT use"
page on the wiki?
The one I have used is All About Monads:
h
Hmmm, with 'readString ... " "' everything works fine,
but with 'readString ... " "' it doesn't.
Seems to be a bug in HXT.
But if I try the same with my XML file, my empty nodes are
"folded". I suppose this comes from the "Ctrl-M" at the end of the
lines.
See the attached file and you ma
On Tue, 2007-12-18 at 23:04 -0800, Don Stewart wrote:
> jules:
> > Brad Larsen wrote:
> > >Hi there list,
> > >
> > >How would one go about creating a new type for a subset of the integers,
> > >for (contrived) example just the even integers? I was thinking of
> > >making a new type
> > >
> > >n
Miguel Mitrofanov a écrit :
Seems rather strange for me, I've just installed HXT and got this:
Prelude Text.XML.HXT.Arrow> runX $ readString [(a_validate,"0")] " "
>>> writeDocumentToString []
["\n "]
Everything works fine except for the fact that all the nodes
(that is, a space (an XM
Seems rather strange for me, I've just installed HXT and got this:
Prelude Text.XML.HXT.Arrow> runX $ readString [(a_validate,"0")] "
" >>> writeDocumentToString []
["\n "]
> Everything works fine except for the fact that all the nodes
>
> (that is, a space (an XML text node whose contents
On Dec 19, 2007 11:28 AM, Andre Nathan <[EMAIL PROTECTED]> wrote:
> I guess I could do away with StateT and just pass the PsMap around as a
> parameter, but I guess that wouldn't be the haskell way...
I wouldn't say that. Manual state-passing is a perfectly legitimate
technique, and can be clearer
On Wed, 2007-12-19 at 02:45 +0100, Daniel Fischer wrote:
> I believe instead of return $ foldr... you should use
> evalStateT $ foldM (flip buildTree) Map.empty entries
This seems to have done it:
evalStateT $ (foldM (flip buildTree) Map.empty entries)) Map.empty
(the second argument to
Hi,
I'm using HXT (7.4) with GHC to make some XML transformations (BTW,
congratulations to the maintainers of that package for their impressive
work).
Everything works fine except for the fact that all the nodes «
»
(that is, a space (an XML text node whose contents are a single space
char
Hi all,
As some of you might remember I'm working on a EDSL which models
process networks (A process can simply be viewed as a box which has a
number of input and output signals and makes computations over them).
A simple example of the processes implemented is MapSY, which is
similar to Haskell'
37 matches
Mail list logo