Bulat Ziganshin wrote:
Hello haskell-cafe,
pure functional denotation for crisis:
(_|_)
Buy ⊥, sell ⊤!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ketil Malde wrote:
Christopher Lane Hinson <[EMAIL PROTECTED]> writes:
Having a debianized cabal-install would be the biggest win in my book. If
there were an unofficial debianized mirror of hackage, I probably wouldn't
use it anyway.
I might.
I would. (I run Ubuntu at home, Debian on my
PR Stanley wrote:
Blimey! Talk about rearranging the deckchairs :-)
Today's xkcd seems apropos: http://xkcd.com/438/
It seems to me that if a PHP developer sees the Haskell community as a
resource for advice on programming language implementation, we should
take this as a compliment to the H
Ian Lynagh wrote:
Fellow Haskellers,
We (Björn Bringert, Duncan Coutts and Ian Lynagh) are pleased to
announce that we have recently set up a Haskell consultancy company,
Well-Typed LLP (http://www.well-typed.com/).
Congratulations!
Do you have a plan to market your services to people who mig
Daniel Fischer wrote:
Am Sonntag, 6. Januar 2008 15:54 schrieb Achim Schneider:
That's an interesting task: Design a non-touring complete,
restricted language in which every expression is decidable, without
making the language unusable for usual programming problems.
I'm not a logician, but di
Jon Harrop wrote:
When functional languages achieve these goals I believe the total number of
users will increase dramatically as scientists and engineers adopt them
alongside their standard tools. Bioinformaticians are among the first to
adopt functional programming languages but I believe m
Peter Verswyvelen wrote:
Each year I give Linux a try. And usually I kick it off my harddrive
after a month, and stick to Windows. However, it does get better each
year, so…
So which kind Linux works best for running GHC (6.8.1) and related
tools? (I want to give Yi a go, I can’t get it to
Aha! Instead of the lambda surrounded by mathematical stuff as the
haskell.org logo, we need a picture of a medicine bottle.
"Haskell. Fewer headaches. No side effects."
Alternatively, a picture of a red pill with an embossed lambda...
___
Haske
"Nervous? Anxious? You found an irreproducable bug in your program and
have to fix it until tomorrow? You feel that your code needs essential
cleanup, but you postponed it for long in order to not introduce new
bugs? You can hardly maintain the code as it grows and grows?
Pause a minute!
Ma
Henning Thielemann wrote:
In my experience only the other way round works: Let people use C, Perl
and Python until they find their programs unmaintainable. Then they will
become interested in style and discipline and programming languages
which _support_ good style.
Perhaps this could be the
Are Benjamin C. Pierce's _Types and Programming Languages_ and/or _Basic
Category Theory for Computer Scientists_ suitable for self-study?
(Do they have problem sets that can be checked by either looking up
answers in The Back of the Book, or by trying to compile/run some code
that the student
Vimal wrote:
Hi all,
I was surprised to find out that the following piece of code:
length [1..] > 10
isnt lazily evaluated! I wouldnt expect this to be a bug, but
in this case, shouldnt the computation end when the length function
evaluation goes something like:
10 + length [11..]
I susp
I'm spending my Copious Free Time going through the
Graham/Knuth/Patashnik _Concrete Mathematics_ textbook. This is the
textbook used at one of Stanford's "on-beyond-calculus math for CS
majors" classes.
If nothing else, the discipline of doing the homework problems at the
end of each chapte
Dougal Stanton wrote:
On 12/09/2007, Seth Gordon <[EMAIL PROTECTED]> wrote:
I � Unicode.
Was it intentional that the central character appears as a little '?',
even though the aleph on the line above worked?
It was intentional. If I ♡ed Unicode, I wo
Andrea Rossato wrote:
What puzzles me is the behavior of putStrLn.
putStrLn is sending the following bytes to standard output:
97, 98, 195, 168, 195, 168, 195, 168, 10
Since the code that renders characters in your terminal emulator is
expecting UTF-8[*], each (195, 168) pair of bytes is ren
Andrea Rossato wrote:
Hi,
supposed that, in a Linux system, in an utf-8 locale, you create a file
with non ascii characters. For instance:
touch abèèè
Now, I would expect that the output of a shell command such as
"ls ab*"
would be a string/list of 5 chars. Instead I find it to be a list of 8
Sebastian Sylvan wrote:
On 14/08/07, Dan Piponi <[EMAIL PROTECTED]> wrote:
If I was one of your students and you said that monads are recipes I
would immediately ask you where the monads are in my factorial program
regardless of whether you had introduced one or two different
analogies for recip
Kim-Ee Yeoh wrote:
Seth Gordon wrote:
Functors are a generalization from lists to "things that can be mapped
over" in general, and then monads are a generalization of functors.
Way to go! That way lies true co/monadic enlightenment.
I feel like I still don't understand com
Alex Jacobson wrote:
> Ok, so for low throughput applications, you actually need a disk
> strategy. Got it.
>
> Ok, is there a standard interface to BerkleyDB or some other disk based
> store?
I would absolutely kvell if there were some way to use a disk-based
store to back Haskell objects witho
My own perspective on monads is this:
In procedural and OO languages, when dealing with compound data
structures, we think in terms of getters (*taking data out* of the
structure) and setters (*putting data in* to the structure).
Languages with some impure functional features (Lisp, Scheme, Perl,
Donald Bruce Stewart wrote:
>
> P.S. Some obvious user group candidates, in my opinion, would be a
> Portland group, a Bay Area group and something at Chalmers... ;-)
Are there any other Haskellers in the Boston area?
___
Haskell-Cafe mailing list
Has
Paul Johnson wrote:
>> You cannot win over the entrepreneur with promises of "easier and more
>> robust". This translates to "anyone can do it" and the valuable "trade
>> secret" of arcane wizardry is now devalued.
>
> I suggest reading extracts from "Beating the Averages" by Paul Graham.
> Then
Thomas Hartman wrote:
> Thanks. I incorporated these changes, and it cranks longer now before
> failing. But still fails, now with a seg fault.
> *
> gcc: Internal error: Segmentation fault (program cc1)
> Please submit a full bug report.
> See http://gcc.gnu.org/bugs.html> for instruct
P. R. Stanley wrote:
> I'm referring to math symbols which do not get successfully
> translated into an intelligible symbol in the screen reader browse buffer.
Is there a way to make the symbols both look right on a screen and sound
right from a screen reader? E.g.,
Σ
_
> I assume that there is no way to change the date for *this* conference;
> it would require renegotiating agreements and rejuggling schedules with
> too many actors (hotels, restaurants, important speakers, etc.).
>
> But I would like everyone involved in planning *future* conferences to
> keep t
Murray Gross wrote:
> First, I suspect that the date is now cast in stone and cannot be
> changed, and it is fair to suspect that holiday observance is going to
> reduce attendance (at the very least, in the later afternoon).
I assume that there is no way to change the date for *this* conference;
TFP 2007 wrote:
>
> Dear Colleagues,
>
> You may now resgister for TFP 2007! TFP 2007 will be held April 2-4,
> 2007 in New York City, USA.
Aaargh!
April 2 is the first night of Passover. This is not one of those
obscure holidays whose names are Hebrew for "alternate-side parking
suspended"[*]
Jefferson Heard wrote:
>
> Argh, bitten by the scheme bug! Right -- NO tail recursion... So that leaves
> me with some rather non-intuitive strategies for achieving execution time
> efficiency. Anyone care to point me in the direction of a document on
> efficiency in Haskell?
I found this pa
Martin DeMello wrote:
> Code here: http://zem.novylen.net/anagrid.html
>
> I've got an instance of IO appearing unexpectedly and I can't figure
> out where from. It throws up the following error:
>
> $ ghc --make test.hs
> Chasing modules from: test.hs
> Compiling Main ( test.hs, test
Aaron McDaid wrote:
> Could seq be changed so that it will not give an error if it finds
> undefined? Am I right in thinking that seq is supposed to
> theoretically do nothing, but simply give a hint to the compiler so to
> speak? If that is true, it should merely attempt to evaluate it, but
> igno
Ketil Malde wrote:
> Using a lazy fold may not be the best choice. Although it may
> sound enticing to delay washing until a clean dish is actually required
> (and having the dirty dishes removed by the garbage collector, hopefully
> before they start naturally decomposing), you will quickly run o
John Meacham wrote:
> On Mon, Jan 22, 2007 at 09:37:21PM -0500, Bryan Donlan wrote:
>
>>Or you can get the best of both worlds by using Data.ByteString.Lazy :)
>>Even with laziness, all the indirections that String causes hurts
>>performance.
>
>
> actually, strictness analysis is really good a
Brandon S. Allbery KF8NH wrote:
> Can someone explain to me, given that (a) I'm not particularly expert
> at maths, (b) I'm not particularly expert at Haskell, and (c) I'm a bit
> fuzzybrained of late:
Me too...
> Given that _|_ represents in some sense any computation not
> representable in a
Andrew Wagner wrote:
> Hi all,
>
> An interesting question came up in #haskell the other day, and I took
> the resulting discussion and wrapped it up into a simple tutorial for
> the wiki. Since I'm quite a newbie to haskell myself, I'd appreciate
> any double-checking of my logic and, of course,
I have a data type "Group", representing a group of geographic
information that is all referring to the same location, and a function
"mergeGroups" that tries to merge two groups:
mergeGroups :: Group -> Group -> Maybe Group
Then I have a function "mergeGroupToList" that tries to merge its fi
Yitzchak Gale wrote:
> tphyahoo wrote:
>
>> I think people want something like CPAN. This implies a centralized
>> "official" repository
>
>
> I agree.
>
> I think we also need a notion of a canonical
> standard package for each popular category.
For some categories, it might be better to have
David House wrote:
>
>> So I can't just tell someone who's just starting to learn Haskell that
>> "f $ g y" is equivalent to "f (g y)"; I have to say "those two are
>> *almost always* equivalent, but if you use $ and the compiler complains
>> about not being able to match the expected and the infe
Simon Peyton-Jones wrote:
> Conor and others are right; it's all to do with type inference. There is
> nothing wrong with the program you are writing, but it's hard to design a
> type inference algorithm that can figure out what you are doing.
>
> The culprit is that you want to instantiate a p
Joachim Durchholz wrote:
>> Trying to fully evaluate an infinite data structure will result in
>> looping or memory exhaustion, and you have that possibilities in almost
>> all languages.
>
> Yes, but I suspect that Haskell makes it easier to make that kind of bug.
> Worse, it's easy to introduce
Paul Moore wrote:
> db.hs:10:64:
>Couldn't match expected type `forall mark. DBM mark Session a'
> against inferred type `a1 b'
>In the second argument of `($)', namely
>`do r <- doQuery
> (sql "select username from all_users") query1Iteratee []
>
Paul Hudak wrote:
> Hi Sebastian. As a writer of one of those "academic" Haskell textbooks,
> I've been following this thread with some interest.
BTW, I found your textbook very helpful. The first time I tried to
learn Haskell, I got the Bird and Wadler textbook, and got bogged down
about halfwa
Brian Hurt wrote:
>
> Greetings, all. I'm an experienced Ocaml programmer, looking to broaden
> my horizons yet further and pick up Haskell, and I'm wondering if
> there's a good introduction to Haskell for me.
Okasaki's _Purely Functional Data Structures_ discusses (among other
things) the pros
Taral wrote:
> On 12/11/06, Paul Moore <[EMAIL PROTECTED]> wrote:
>
>> F:\cabal-1.1.6.1>runhaskell Setup.lhs install
>> Installing: C:\Program Files\Haskell\Cabal-1.1.6.1\ghc-6.6 &
>> C:\Program Files\Haskell\bin Cabal-1.1.6.1...
>> Setup.lhs: Error: Could not find module: Distribution.Compiler wi
Donald Bruce Stewart wrote:
>
> Who wants to join the Lisp is not functional programming movement with me?
Oh, lordy. As if the "Scheme is not Lisp" flames on comp.lang.lisp
weren't enough...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http:
Taral wrote:
Ah, the dreaded $ with existential types problem. $ is not quite
equivalent to application -- the type checker does something funny
with forall types. Just take out the $ and you'll be fine.
Is this a ghc bug, or some subtlety of the type system that I don't
understand?
I have a simple test program for takusen and PostgreSQL:
import Database.Enumerator
import Database.PostgreSQL.Enumerator
import Control.Monad.Trans
gazdbSession dbname = connect [CAdbname dbname]
resultCollector :: (Monad m) => String -> IterAct m [String]
resultCollector str accum = result'
As Lily Tomlin would say, neVERmind.
Simon P-J asked me, in email, whether the deforestation was the thing
that actually made the program faster or whether it was just the thing
that made me think about how to solve the problem. I realized that my
fast program had *another* difference from the ea
Henning Thielemann wrote:
> On Tue, 14 Nov 2006, Seth Gordon wrote:
>
>
>>It took me a week to figure out the right algorithm for combining these
>>two procedures and write some almost-working code that implemented it.
>>It took a co-worker of mine another few day
One of Alan Perlis's "Epigrams in Programming" is "A language that
doesn't affect the way you think about programming, is not worth
knowing". I recently had an experience that demonstrated this principle.
I had to write some code that took a polygon (encoded in WKT, a standard
format for geograph
Víctor A. Rodríguez wrote:
> Hi all,
>
> I'm really newbie to Haskell, and working on a program I'm trying to make
> some testing.
> I make some test on certain know values ( e.g. adding 10 to 15 must return
> 25) and some test on random values (eg. adding rnd1 to rnd2 must return
> rnd1+rnd2).
>
> I installed HDBC, but when I tried running a simple program that used
> it, I get the error message
>
> ghc-6.6:
> /usr/local/lib/HDBC-postgresql-1.0.1.0/ghc-6.6/HSHDBC-postgresql-1.0.1.0.o:
> unknown symbol `PQserverVersion'
Ah, I figured it out. The PQserverVersion function is documented in
I'm looking for an alternative to HSQL for database connectivity -- the
lack of prepared statements in HSQL is particularly worrisome.
I installed HDBC, but when I tried running a simple program that used
it, I get the error message
ghc-6.6:
/usr/local/lib/HDBC-postgresql-1.0.1.0/ghc-6.6/HSHDBC-
[EMAIL PROTECTED] wrote:
> For logarithmic access times, you should use a binary search tree like
> Data.Map or similar. The problem in your case could be that matchKeys is
> only approximate and your keys cannot be ordered in suitable fasion.
That is precisely the problem that I was dealing with.
In my first posting, I mentioned that I was going to try to translate
some of our code to Haskell and see how it worked. Well, I don't have a
stunning demonstration of the power of pure functional programming, but
I do have an interesting problem.
I chose to port a program that we use in our buil
I have a program using HSQL that I'm trying to profile. When I do
ghc program.hs -package hsql -o program
it compiles fine, but when I do
ghc -prof -auto-all program.hs -package hsql -o program
I get error messages saying "failed to load interface for
`Database.HSQL'" and so forth, the same wa
David Roundy wrote:
Try
module Secret (Secret, classify, declassify)
where
data Secret a = Secret String a
classify :: String -> a -> Secret a
classify pw x = Secret pw x
declassify :: Secret a -> String -> Maybe a
declassify (Secret pw x) pw' | pw' == pw = Just x
declassify (Secret _ _) _ =
> data Secret a = Secret {password :: String, value :: a}
>
> classify :: String -> a -> Secret a
> classify = Secret
>
> declassify :: String -> Secret a -> Maybe a
> declassify guess (Secret pw v) | guess == pw = Just v
> | otherwise = Nothing
>
> Pu
Cale Gibbard wrote:
> Why not just:
>
> secret :: a -> Classification String a
> secret = Classification "xyzzy"
>
> The password string isn't part of the type, it doesn't even
> necessarily exist at compile time. You might have just got confused
> between type and data constructors for a moment.
I finally (think I) understand monads well enough to make one up:
module Secret (Secret, classify, declassify)
where
data Secret a = Secret a
classify :: a -> Secret a
classify x = Secret x
declassify :: Secret a -> String -> Maybe a
declassify (Secret x) "xyzzy" = Just x
declassify (Secret x
Paul Johnson wrote:
I've done some stuff with maybe 50k rows at a time. A few bits and pieces:
1: I've used HSQL
(http://sourceforge.net/project/showfiles.php?group_id=65248) to talk to
ODBC databases. Works fine, but possibly a bit slowly. I'm not sure
where the delay is: it might just be
jeff p wrote:
Hello,
So before I embark on day 1 of the project, I thought I should check and
see if anyone on this list has used Haskell to munge a ten-million-row
database table, and if there are any particular gotchas I should watch
out for.
One immediate thing to be careful about is how y
I've finally gotten enough round tuits to learn Haskell, and now that
I've done some of the exercises from _The Haskell School of Expression_
and I finally (think I) understand what a monad is, the language is
making a lot more sense to me (although my code is not always making so
much sense to the
62 matches
Mail list logo