only have lower
bounds (>= v) and I've never had any problems with dependency issues
between my packages.
If you get to this point and you still have a misbehaving package, simply
download the tarball from hackage and drop it in your lib folder, remove
upper bounds, and voila, it will work m
I don't think Template Haskell will be essential for this - you will probably
need a parser (probably written with Parsec), an eval function, and a state
monad to represent imperative changes made by the language you're evaluating.
Template Haskell is more for the elimination of boilerplate cod
Have you looked at creating Template Haskell splices to generate this for you?
On Friday Aug 20, 2010, at 2:21 PM, Andrew Coppin wrote:
> All I'm actually using it to do is generate a set of fixed-size containers
> (each of which has a bazillion class instances). I've got a variable-sized
> con
On Sunday, August 15, 2010, Tillmann Rendel
wrote:
> Bulat Ziganshin wrote:
>
> But in a world passing interpretation of IO, print is supposed to be a
> pure Haskell function. So the value world2 can only depend on the values
> of print and world1, but not on the actions of some concurrent thread.
No, not really. Linked lists are very easy to deal with recursively and
Strings automatically work with any already-defined list functions.
On Sun, Aug 15, 2010 at 11:17 AM, Brandon S Allbery KF8NH <
allb...@ece.cmu.edu> wrote:
> More to the point, there's nothing elegant about [Char] --- its so
eract $ unlines . concatMap (map trim . wrapLine) . lines
On Saturday Aug 14, 2010, at 9:41 AM, michael rice wrote:
> Hi Filipe, Bill
>
> Your corrected version works, while the original didn't, but it still
> produces incorrect
> output:
>
> However mean your life is
Oof, that's what I get for making "just one little change" without testing.
You're right.
On Saturday Aug 14, 2010, at 9:17 AM, Felipe Lessa wrote:
> On Sat, Aug 14, 2010 at 9:59 AM, Bill Atkins wrote:
>> | otherwise= l
On Saturday Aug 14, 2010, at 12:50 AM, Conal Elliott wrote:
> And the IO monad is what Jerzy asked about. I'm pointing out that the state
> monad does not capture concurrency, and the "EDSL model" does not capture
> FFI. (Really, it depends which "EDSL model". I haven't seen one that can
> c
splitAt maxLineLength line in
line :
wrapLine rest
main :: IO ()
main = interact $ unlines . concatMap wrapLine . lines
On Saturday Aug 14, 2010, at 12:38 AM, michael rice wrote:
> Hi Bill,
>
> Each quote of the input is
em easier to test and understand and
your code simpler.
In your example, the EOF probably happens on the call to getLine after input
has run out. By using Prelude.interact, we can ignore details like that and
rely on already-written functions.
HTH,
Bill
On Friday Aug 13, 2010, at 9:38 PM, micha
The let's aren't really statements, they're just named expressions and are
still subject to lazy evaluation.
In:
let x = putStrLn "Name" >> getLine
putStrLn "Welcome"
x
The program will print:
Welcome
Name?
and then prompt for input, even though the let comes first.
And if you never ran
Seconded.
On Monday Jul 26, 2010, at 6:24 PM, Edward Z. Yang wrote:
> IMO, if you really want a wildcard, just write a lambda...
>
>\x -> foo 1 x 3
>
> Cheers,
> Edward
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.hask
The answer is still applicative. :)
On Monday Jul 26, 2010, at 10:06 AM, Kevin Jardine wrote:
> On Jul 26, 3:49 pm, Kevin Jardine wrote:
>> I find
>> myself wishing that f (m [a]) just automatically returned m f([a])
>> without me needing to do anything but I expect that there are reasons
>> wh
Can you post an example of your code? mapM and map are actually for pretty
distinct purposes.
If you find yourself wanting to map over a pure list in monadic code, you
should really look at applicative style, e.g.:
import Control.Applicative
data Struct = deriving (Read)
readStruc
you might have forgotten the "map fst $" part.
>
> Best,
>
>
> On 8 June 2010 14:51, Bill Atkins wrote:
>
> f :: [a] -> [a]
> f = filter snd $ zip a (cycle [True, False])
>
> On Monday, June 7, 2010, Ozgur Akgun wrote:
>> or, since you don't ne
f :: [a] -> [a]
f = filter snd $ zip a (cycle [True, False])
On Monday, June 7, 2010, Ozgur Akgun wrote:
> or, since you don't need to give a name to the second element of the list:
>
> f :: [a] -> [a]
> f (x:_:xs) = x : f xsf x = x
>
>
>
>
> On 7 June 2010 20:11, Ozgur Akgun wrote:
>
> i think
BTW, "\n -> show n" is equivalent to "show" .
On Monday Jun 7, 2010, at 8:37 PM, zaxis wrote:
>> Yes, and i can use appendFile too.
>>
>> appendFile "ssqHitNum.txt" $ unwords $ [no] ++ map (\n -> show n) hitNum
>> ++ ["\n"]
>
___
Haskell-Cafe mailing
alts :: [a] -> [a]
alts xs = map fst . filter snd $ zip xs (cycle [False, True])
Prelude> alts [0, 1..5]
[1,3, 5]
On Sunday Jun 6, 2010, at 10:46 AM, R J wrote:
> What's the cleanest definition for a function f :: [a] -> [a] that takes a
> list and returns the same list, with alternate items re
readFile reads the file lazily so it isn't closed until the entire contents
have been consumed.
Try System.IO.Strict.readFile, which will read the entire file at once.
zaxis writes:
> hitSSQ :: String -> [Int] -> IO ()
> hitSSQ no hitNum = do
>let newNum = unwords $ [no] ++ map (\n -> show
When I run "cabal update" on my Mac (Snow Leopard, Intel), I get:
% cabal update
Downloading the latest package list from hackage.haskell.org
cabal: Codec.Compression.Zlib: incompatible zlib version
Anyone else seeing this? Reinstalling the Haskell Platform hasn't helped.
Thanks!
__
Yep, you and Ben are both correct. Mea culpa and sorry for the bad answer.
Just curious: why does getModificationTime take an IO FileStatus rather than
a FileStatus?
On Thu, May 6, 2010 at 7:00 AM, Neil Brown wrote:
> Bill Atkins wrote:
>
> Almost - "liftM modificationTime&qu
Almost - "liftM modificationTime" has type Status -> IO EpochTime. Like
other IO functions (getLine, putStrLn), it returns an IO action but accepts
a pure value (the modification time)
Also, I like this style:
import Control.Applicative ((<$>))
blah = do
times <- mapM (PF.modificationTime <$>
so not in the wxHaskell source.
Does anyone know where I can find it?
Thanks,
Bill
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
erministic logic program is very similar to a functional program.
--
Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
iminated all
the non-determinism from a logic program what you have left is a
functional program. The work I was involved with, trying to get
quasi-real-time performance from Prolog, bore this out.
--
Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@has
On Wed, 2008-10-01 at 16:46 -0400, John Van Enk wrote:
. . .
> I fully realize how un-clever this is. Some one please give me
> something more worth of the original list. :)
You shoot the gun but nothing happens (Haskell is pure, after all).
___
Hask
and now people are
> arguing about Dedekind cuts... da HELL?! o_O
>
> An interesting dichotomy of perspectives, don't you think?
Maybe the dichotomy is in the distribution of free-wheeling imagination.
I'm reminded of the (apocryphal?) story about Hilbert's
On Thu, 2008-09-04 at 20:46 +0200, Pierre-Evariste Dagand wrote:
> > what could be a "categorical language"?
>
> Something we would call Charity, for example :-)
>
> http://en.wikipedia.org/wiki/Charity_(programming_language)
> http://pll.cpsc.ucalgary.ca/charity1/www/home.html
>
> Also, there h
hought, beneath my chair,
And angrily I cried "Perdition!
Up from out of in under there!"
Correctness is my vade mecum
And straggling phrases I abhor.
Still, I wonder, what should he come
Up from out of in under for?
- Morris Bisho
On Fri, 2007-12-28 at 20:23 -0700, Luke Palmer wrote:
. . .
> OO is orthogonal to functional. Erlang is pure functional, Lisp is a
> bastard child...
Give it its historical due, please -- bastard grandsire at least.
-- Bill Wood
___
Haskel
eveloping a DSL, one
reason being it's macro system. However, it has also long been realized
that DSLs implemented with macros can be extremely difficult to debug
because by the time bugs manifest the (macro) source is long gone and
its connection to the expansion text is difficult to determ
a
> heap has "Fibonacci" the name in its name.
>
> Just a nit, but I thought it worth mentioning. =]
That's fair, and Cormen et. al. said pretty much the same thing in Chap.
20. I think the argument is that the Fibonacci sequence is important to
*understanding* th
rd Stein, Introduction to Algorithms, second edition, The MIT
Press (2001).
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
as it's not purely imaginary...
This is becoming surreal.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
passes the advantages of strong typing, so this is most
> likely a dumb idea...
You might find Forth interesting/entertaining. After implementing
versions of Dijkstra's guarded if and do constructs using the same
mechanisms that were used to implement the "native" control struct
was up to the challenge; the response was a candid "probably not".
I still sometimes think it might have worked, but the risks would have
been horrendous.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ly quick, too -- 50 sudokus in ca. 0.1 sec. (I did a Project
Euler problem that required solving 50 sudokus with ECLiPSe).
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Mon, 2007-09-03 at 07:43 +0800, Hugh Perkins wrote:
> On 9/3/07, Derek Elkins <[EMAIL PROTECTED]> wrote:
> > Because no one has said it quite this way:
> > The modern equivalent of Prolog is Prolog.
I was just about to say the same thing :-); thanks, Derek.
. . .
> (btw, just thought, when
ten my own Sudoku solver on
OCaml a year or so ago.
To Jerzy's point -- I strongly believe that learning a language like
Prolog is a good idea for two reasons -- first, it adds another tool to
the programmer's toolkit, and second, it enlarges the programmer's view
"a tensor is something that transforms like a tensor does!".
>
> Grrr...must...hold...my...tongue...
Dan, as a former student of a clone of that physics teacher, I am really
interested in what you will say when you fail to hold your tongue.
-- Bill Wood
___
we gotta have a theory, I'll go with this one!
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
onditionalQ but not P e
As you can see from the table, Tautology and Inconsistency are rarely if
ever used as connectives.
I checked these in Carol Horn Greenstein, _Dictionary of Logical Terms
and Symbols_, Van Nostrand Reinhold Company, 1978.
-- Bill Wood
rule is enabled, it's actions
> may be selected to execute atomically. In contrast to Verilog
> "always" blocks, multiple rules can write to the same state element.
Just curious, how does this relate to Guryevitch's Evo
while there are more suds.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ral
knowledge. A common view was that the two sorts of knowledge
complemented each other, and corresponded in a natural way to intuitions
(and some epistemological theory) about human reasoning.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
character sequences?
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 10/11/06, Tamas K Papp <[EMAIL PROTECTED]> wrote:
On Wed, Oct 11, 2006 at 09:16:57PM -0400, Bill Mill wrote:
> I've been working through the "Yet Anther Haskell Tutorial" at
> http://www.cs.utah.edu/~hal/docs/daume02yaht.pdf , and I've gotten up
> to Excerc
YAHT ===
I've got a brute-force answer, but I'm sure that there's a
better way, and I can't find it. The code I've currently got is at
http://paste.lisp.org/display/27806 .
Anybody want to point me in the right direction?
Thanks
Bill Mill
bill.mill at gmail.com
__
oving non-determinism it moves towards a
functional program. Any real (non-textbook example) Prolog program has
to expose algorithmic details simply because the programmer must a) make
decisions and b) express them. I think you're right that Haskell should
be in the
void writing IO in
Peripheral Processor code.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
spammers. Maybe
the experts know better engines, better ways to set up a forum, or
better ways to administer them after they're up, but it is a concern.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
mentation, a quasi-standard mechanism for
introducing extension libraries into Scheme) provides a "Notation for
Specializing Parameters without Currying" as a syntactic sugar for
nested lambdas.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
take this to mean that at least a primitive form of
closure was provided. Moreover, a language that provides SET/SETQ,
RPLACA/RPLACD and the PROG feature (including labels and a goto) surely
qualifies as imperative?
-- Bill Wood
___
Haskell-Cafe
.
This may be difficult to guarantee. Consider:
1. If it does nothing atomically then it does nothing atomically.
2. But if it does nothing atomically then it is false that it does
nothing atomically.
3. Ergo it is false that it does nothing atomically, from (1) and (2)
by Reductio ad Absur
On Tue, 2006-06-27 at 13:35 -0700, Jeremy Shaw wrote:
. . .
> How about heir? Also, until recently, herb and humble?
I grew up in the southern US, and I was taught 'herb' with silent 'h'
but 'humble' with aspirated 'h'. With the 'h' silen
as LUB = 1, but 1 is not an element of the subset. It would seem
that while the infinite list is the LUB of the chain of finite lists, it
is not itself a member of the chain of finite lists. So, what am I
missing?
-- Bill Wood
___
Haskell-Cafe mailing li
so explain why those who *do* believe in some of those maths
resist the move to totally strict Haskell :-).
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
gative integers has "one more element" than the set
of all positive integers, however they have the same cardinality,
aleph-null. This phenomenon is the hallmark of infinite sets.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haske
does seem that the whole controversy boils down to how the writer
thinks of the chain -- as a sequence of actions or as the evolution of a
value. Neither one is "the One True View"; they're just different.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
quot;;" in front of the new statement (and one
reason Pascal syntax included the "null" statement was so that "s1;"
would parse as "s1; null", making ";" a de facto delimiter).
Editing ease matters more than a little.
-- Bill Wood
On Sat, 2006-02-04 at 23:34 +, Chris Kuklewicz wrote:
. . .
> But this implies [a,b,c,[]..] is the same as [a,b,c] and [a,b,c,[d,e,f]..] is
> the same as [a,b,c,d,e,f] and [a,b,c,[d,e,f..]..] is [a,b,c,d,e,f..]
Hmmm, does this get us to difference lists ala Prolog?
-- Bil
t to
|forall x, forall y. x <> y only-if phi(x,y)|? I use |P only-if Q| for
|P materially implies Q|.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
n team at ETH Zurich, the first Pascal compiler for the CDC
6x00 family of computers was written in 1970-1971, and a second was
developed from scratch for the same computers but compiling the revised
language, was written in 1972-1974. I think both of these compilers
were one-pass.
-- Bill Wood
tutorial information has expanded and been
improved since last I looked. So I think I shall now go do some deep
browsing; thanks for the links.
-- Bill Wood
PS: While looking over my post it occurred to me that the issue is at
least as much methodological as it is linguistic. So I ask: Does
d since I last looked. I applaud this discussion for
making Haskell more accessible for the newbie.
(Now, if someone would just explain how to get reliable performance
information while jumping through only a bounded number of hoops ... :-)
-- Bill Wood
___
tly what yours does, and
> not what the one in the example does.
It helped me to read "factors m n" as "there is an integer between m and
n-1 inclusive that divides n". Then the recursion made sense.
Thielemann's "factors n" would read "there is an integer b
ke a compiler do that, why bother the programmer? But
you're not talking about analyzing a function into a
parallel/concurrent/distributed implementation; rather, you're
interested in synthesizing a temporal process out of interacting
computations.
The
t
function of XAUI. I made some progress, but I never found a
satisfactory solution. On the other hand, I did work out a fairly nice
dataflow algorithm for CRC32.
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
und the spine (standard for this
series edited by C.A.R. Hoare), black banner with "100th title" in red.
The lack of any edition information leads me to surmise it's a first
edition.
Do you (or anyone) know if the "diagrammatic notation" ha
d form and using
a reversed composition operator, I was able to provide a programmatic
interface which could be laid out one instruction per line with the
composition operators way off to the right in the comment column, just
like assembler code! The inventors thought this was just wonderfu
by some
algebraists, but I can't put my hands on a source right now.
I guess it's not even entirely clear what constitutes "mathematical
notation". :-)
-- Bill Wood
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
integrated into Lisp.
All of these made non-trivial extensions to Lisp, and all were of
arguably great utility.
-- Bill Wood
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
s in 0 as a memory location. The suggested solution is to give each
And the Scheme community chose "#f" and "#t" for boolean values so you
had to be a little more explicit about what you were doing.
I mostly agree with the "tightening
ead make higher-order functions difficult (I
never saw any serious attempts at HOFs).
I suspect it's a levels-of-abstraction thing; after all, the Forth
environment could be viewed as the ideal stack machine upon which to
implement FLs and block-structured languages.
-- Bill Wood
[EMAI
th op codes and parameters
running down the page, just like real assembler (I tabbed over to place
the ">>" so they kinda hung out in the comment area so as not to spoil
the illusion). It was a quick 'n dirty hack that turned out to be
pretty slick.
-- Bill Wood
[EMAIL PRO
Hello,
Here is the book plus many other llongo papers: http://www.di.ens.fr/users/llongo/download.html
Regards. Vasili
>From: Daniel Yokomiso <[EMAIL PROTECTED]>
>To: Graham Klyne <[EMAIL PROTECTED]>,Haskell Cafe <[EMAIL PROTECTED]>
>Subject: Re: Thanks: (was Question about categories)
f transforming (logical) specifications through
functions into imperative programs.
-- Bill Wood
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
minor glitch: the earlier version gave
B_0 = 0 instead of 1.
I think I got the right results for B_3000: My print-out had the same
denominator along with a 6762-digit numerator with the same initial
seven and final two digits. I don't get 6744 digits in the middle,
however.
I'm impres
eg's blow the heap at an
*odd* value -- I thought he skipped those.
-- Bill Wood
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Number Theory for
Computing_, p. 75
This has gotten a little long, sorry. If you want I can post my Haskell
code or send privately.
-- Bill Wood
[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
going "out on
a limb" to use FPLs. I know that Sun wrote at least one tool in
Scheme (albeit it doesn't have ref. transparency).
Regards,
Bill Halchin
>From: "Dejan Jelovic" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]&g
ant to also see hyperlinks to XML docs in Literate
Haskell comments or maybe even to Haskell code!
Regards,
Bill Halchin
>From: "Erik Meijer" <[EMAIL PROTECTED]>
>To: "Patrik Jansson" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]&g
ed to download
but I found I would have to have Win2000 installed. I want
to run on Linux.
Regards,
Bill Halchin
_
Get your FREE download of MSN Explorer at http://explorer.ms
Hello,
I looked on www.haskell.org for the Simon Marlow's Web Server,
but couldn't find. Did I overlook it?
Regards,
Bill Halchin
_
Get your FREE download of MSN Explorer at http://explor
84 matches
Mail list logo