Hello,
I have a job search agent/bot filtering for Haskell in particular ...
it is interesting that a number are in the financial realm ... Check out
ORIXnot to mention Jane Street ...
Kind regards, Vasya
___
Haskell-Cafe mailing list
On Wed, 28 Nov 2007, Chris Smith wrote:
data AD a = AD a a deriving Eq
instance Show a = Show (AD a) where
show (AD x e) = show x ++ + ++ show e ++ eps
instance Num a = Num (AD a) where
(AD x e) + (AD y f) = AD (x + y) (e + f)
(AD x e) - (AD y f)
On Thu, 29 Nov 2007, Henning Thielemann wrote:
On Wed, 28 Nov 2007, Chris Smith wrote:
diffNum:: Num b= (forall a. Num a= a - a) - b
- b
diffFractional :: Fractional b = (forall a. Fractional a = a - a) - b
- b
diffFloating :: Floating b = (forall
Laurent Deniau wrote:
apfelmus wrote:
Back then, I was given the task to calculate some sequence
of numbers which I did in one page of C code.
import Data.Set
xs = let f x m = x: let y = x `div` 2
in f (if member y m then 3*x else y) (insert x m)
in f 1 (singleton 0)
I thought operations like foldl' and drop must be very fast on arrays
(especially UArray) with appropriate pointer tricks, I mean pointer
incrementing instead of indexing for foldl' and a pointer into the array
for drop. Is it planned to add such functions? Ok, if foldl f x .
elems and listArray
Don Stewart [EMAIL PROTECTED] writes:
And it reminds me to release the galois sqlite3 bindings, which do
happily work with 6.8. Surely one of the other 15 haskell db bindings
would also work.
I think this is the problem, not the solution. There is a lot of DB
libraries, just like there are a
On Nov 29, 2007, at 10:49 AM, Ketil Malde wrote:
I think this is the problem, not the solution. There is a lot of DB
libraries, just like there are a multitude of XML libraries, several
collections, etc. Too many libraries are written as research projects
or by grad students, and left to rot
Bulat Ziganshin wrote:
Hello Andrew,
Thursday, November 29, 2007, 1:11:38 AM, you wrote:
IMHO, someone should make a full proposal by implementing an alternative
System.IO library that deals with all these encoding issues and
implements H98 IO in terms of that.
We need two
The following code is the direct translation of your Haskell code
void f(int x, intset s) {
printf(%d, , x);
f (intset_elem(s, x/2) ? 3*x : x/2, intset_put(s, x));
}
No, not that easy. The Haskell code works with arbitrary precision
Integer, the C code with a fixed size int. On a 32
Henning Thielemann wrote:
I thought operations like foldl' and drop must be very fast on arrays
(especially UArray) with appropriate pointer tricks, I mean pointer
incrementing instead of indexing for foldl' and a pointer into the array
for drop. Is it planned to add such functions? Ok, if foldl
Simon Marlow writes:
Perhaps
Type Inference: deduces types automatically, so you don't have to clutter
up your code with type declarations. You can still write type
declarations for documentation purposes, and these will be automatically
checked by the compiler.
Perhaps it won't harm
On Wed, 2007-11-28 at 21:00 +0100, Thomas Schilling wrote:
On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote:
[EMAIL PROTECTED]: .../software/haskell cd cabal
[EMAIL PROTECTED]: .../haskell/cabal runhaskell Setup.lhs configure
Distribution/Simple/NHC.hs:77:1: lexical error at
On Wed, 2007-11-28 at 17:38 -0200, Maurício wrote:
(...) When it's phrased as truncates to 8
bits it sounds so simple, surely all we need
to do is not truncate to 8 bits right?
The problem is, what encoding should it pick?
UTF8, 16, 32, EBDIC? (...)
One sensible suggestion
Duncan Coutts wrote:
On Wed, 2007-11-28 at 17:38 -0200, Maurício wrote:
(...) When it's phrased as truncates to 8
bits it sounds so simple, surely all we need
to do is not truncate to 8 bits right?
The problem is, what encoding should it pick?
UTF8, 16, 32, EBDIC? (...)
One
Mirko Rahn wrote:
The following code is the direct translation of your Haskell code
void f(int x, intset s) {
printf(%d, , x);
f (intset_elem(s, x/2) ? 3*x : x/2, intset_put(s, x));
}
No, not that easy. The Haskell code works with arbitrary precision
Integer, the C code with a fixed
On Thu, 2007-11-29 at 13:05 +, Jules Bean wrote:
Language of messages is quite different from language of a file you read.
Suppose I am English, and I have a russian friend, Vlad.
My default locale is, say, latin-1, and his is something cyrillic.
I might well open files including my
On Thu, 2007-11-29 at 00:21 -0600, Galchin Vasili wrote:
The message I actually receive is:
runhaskell Setup.lhs build
.
./Haq.hs:6:7:
Could not find module `System.Environment':
it is a member of a package base, which is hidden
BTW I haven't actually
Brandon S. Allbery KF8NH wrote:
On Nov 19, 2007, at 16:06 , Arthur van Leeuwen wrote:
here is a puzzle for you: try converting a
System.Posix.Types.EpochTime into either a
System.Time.CalendarTime or a Data.Time.Clock.UTCTime without going
through
read . show or a similar detour through
On Thu, 2007-11-29 at 13:51 +1100, Tim Docker wrote:
Well I'd say none of the packages I've tried, build out of the box...
I'm not a windows developer, but
Is it actually reasonable to expect any cabal packages that depend on
external c libraries and headers to build out of the box on
On Wed, 2007-11-28 at 19:11 +0100, manu wrote:
Hello
I've spent a few days trying to install all the packages required to
use HaskellDB with either MySQL or SQlite3
(the only 2 DB the host I was thinking about is supporting)
Well, I am giving up ! I seriously regret replacing ghc-6.6
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Duncan Coutts
On Thu, 2007-11-29 at 13:51 +1100, Tim Docker wrote:
Is it actually reasonable to expect any cabal packages that
depend on
external c libraries and headers to build out of the box on
windows? How
can
Obviously heaps better than what I initially proposed.
However, I would argue to go boldly with unsafePerformIO, which is the
same thing Debug.Trace uses
http://darcs.haskell.org/ghc-6.6/packages/base/Debug/Trace.hs
since we are after debug.trace -like behavior.
In particular, you wouldn't be
A translation of
http://www.ahinea.com/en/tech/perl-unicode-struggle.html
from perl to haskell would be a very useful piece of documentation, I
think.
That explanation really helped me get to grips with the encoding stuff, in
a perl context.
thomas.
Duncan Coutts [EMAIL PROTECTED]
Sent
Hello Jules,
Thursday, November 29, 2007, 2:29:08 PM, you wrote:
I thought operations like foldl' and drop must be very fast on arrays
(especially UArray) with appropriate pointer tricks, I mean pointer
As far as I'm aware, our arrays don't support any kind of zero-copy
slicing, which is
Thomas Hartman wrote:
A translation of
http://www.ahinea.com/en/tech/perl-unicode-struggle.html
from perl to haskell would be a very useful piece of documentation, I
think.
Perl encodes both Unicode and binary data as the same (dynamic) data
type. Haskell - at least in theory - has two
Hello Reinier,
Thursday, November 29, 2007, 1:13:24 PM, you wrote:
IMHO, someone should make a full proposal by implementing an alternative
System.IO library that deals with all these encoding issues and
implements H98 IO in terms of that.
http://haskell.org/haskellwiki/Library/Streams already
On 29-nov-2007, at 14:44, Simon Marlow wrote:
Brandon S. Allbery KF8NH wrote:
On Nov 19, 2007, at 16:06 , Arthur van Leeuwen wrote:
here is a puzzle for you: try converting a
System.Posix.Types.EpochTime into either a
System.Time.CalendarTime or a Data.Time.Clock.UTCTime without
going
However, when I actually tried this out, I couldn't get it to compile.
So I wound up back with trace. This does compile, and I think it does
pretty much what we want in a noninvasive way, using unsafePerformIO via
trace.
import Debug.Trace
t = foldr (+) 0 ( monitorprogress f [1..1] )
thank you everybody. my bad... a misspelling on my part ;^)
Vasya
On Nov 29, 2007 7:45 AM, Duncan Coutts [EMAIL PROTECTED] wrote:
On Thu, 2007-11-29 at 00:21 -0600, Galchin Vasili wrote:
The message I actually receive is:
runhaskell Setup.lhs build
.
./Haq.hs:6:7:
On Thu, Nov 29, 2007 at 12:40:00PM +, Simon Marlow wrote:
What I'd *really* like to see is a bunch of links on the front page leading
to pages that describe the main differences between Haskell and some other
language (C, Python, Java, C#, F#, ...). The easiest way to grasp what
On Nov 29, 2007, at 12:12 , Arthur van Leeuwen wrote:
Going through Rational is the right solution, though. My hackish
detour was to use fromIntegral . toInteger . fromEnum
?? fromEnum produces an Int, which is an Integral such as
fromIntegral requires; why is toInteger needed?
Yes, that
Lazy evaluation can sometimes be helpful here. I once wrote a
raytracer that computed the resulting image using a pure function that
returned a list of the RGB colors of the pixels: [(Word8, Word8,
Word8)]
When plotting the pixels to the screen in the IO monad, the value of
each pixel would be
Henning Thielemann wrote:
I thought operations like foldl' and drop must be very fast on arrays
(especially UArray) with appropriate pointer tricks,
These kinds of functions are only much use on one-dimensional arrays,
which look sufficiently list-like that the ideas translate fairly
Let's ignore System.Time since it's obsoleted by Data.Time.
While you're updating the Data.Time docs, could you mention the above
in System.Time? I recently looked at both and used System.Time
because Data.Time looked too complicated.
___
Haskell-Cafe
Daniel Fischer wrote:
One thing: since You check the array bounds, the system needn't check them
again, use unsafeWrite and unsafeRead. And use Int for the index, that would
be MUCH faster.
I can't find the functions you're talking about. I have however changed
the index type. (Make
Bryan O'Sullivan wrote:
But wait, there's more! If you're using the threaded RTS, you often
need to know how many threads you can run concurrently, for example to
explicitly split up a compute-bound task. This value is exposed at
runtime by the numCapabilities variable in the GHC.Conc
On Nov 29, 2007, at 13:38 , Andrew Coppin wrote:
Bryan O'Sullivan wrote:
But wait, there's more! If you're using the threaded RTS, you
often need to know how many threads you can run concurrently, for
example to explicitly split up a compute-bound task. This value
is exposed at runtime
Dan Weston wrote:
[...] and facilitates borrow-from-the-future techniques where
useful with infinite data structures or recursive algorithms.
And this, gentlemen, is just one of the reasons why Haskell gets
labelled as scary.
It's very hard to explain what this enigmatic riddle-like
On Nov 29, 2007 6:43 PM, Andrew Coppin [EMAIL PROTECTED] wrote:
Daniel Fischer wrote:
One thing: since You check the array bounds, the system needn't check them
again, use unsafeWrite and unsafeRead. And use Int for the index, that would
be MUCH faster.
I can't find the functions you're
Andrew Coppin writes:
Dan Weston wrote:
[...] and facilitates borrow-from-the-future techniques where useful
with infinite data structures or recursive algorithms.
And this, gentlemen, is just one of the reasons why Haskell gets labelled
as scary.
It's very hard to explain what this
Hello,
I have suceeded in doing a build on top of cygwin. However, after
editing some of the cygwin bashrc files, teh darcs path and haddock path
still don't show up when I do a echo $PATH. I am now reading
http://cygwin.com/cygwin-ug-net/setup-env.html.
The PATH environment variable is
On Nov 28, 2007 9:20 PM, Chris Smith [EMAIL PROTECTED] wrote:
I intend to naively treat each function as being from the reals to the
reals, and then take advantage of the fact (which is proven by the type
system in the code I posted) that when the derivative is evaluated at
integer inputs for
On Thu, 29 Nov 2007, Simon Marlow wrote:
What I'd *really* like to see is a bunch of links on the front page leading
to pages that describe the main differences between Haskell and some other
language (C, Python, Java, C#, F#, ...). The easiest way to grasp what
Haskell is all about is by
Henning Thielemann writes:
Python page could start with: You like 'map', 'filter', 'for x in ...'
and lambda's in Python? Then you will like to learn where Python has
Henning, Python *may not* start in such a way. Those functionals are
being obsoletised by Guido Van Rossum. for remains,
Dan Piponi wrote:
I must be missing the point of something. What's wrong with
diff f x = let AD y dy = f (AD x 1) in dy
?
In ghci we get
*Main :t diff (\x - 2*x) (2::Int)
diff (\x - 2*x) (2::Int) :: Int
*Main :t diff (\x - 2*x) (2::Float)
diff (\x - 2*x) (2::Float) :: Float
Ketil Malde wrote:
I think this is the problem, not the solution. There is a lot of DB
libraries, just like there are a multitude of XML libraries, several
collections, etc. Too many libraries are written as research projects
or by grad students, and left to rot after release. The
On Thu, 29 Nov 2007, Bryan O'Sullivan wrote:
Henning Thielemann wrote:
I thought operations like foldl' and drop must be very fast on arrays
(especially UArray) with appropriate pointer tricks,
These kinds of functions are only much use on one-dimensional arrays,
which look sufficiently
Jules Bean wrote:
As far as I'm aware, our arrays don't support any kind of zero-copy
slicing, which is what your 'drop' trick amounts to.
Zero-copy slicing would seem like an obviously nice thing to have for
IArrays, though, I agree. For various different kinds of slices
including
Henning Thielemann wrote:
When I want to judge a programming language I like to see a gallery, a
collection of beautiful programs. This shows me
1. what are the problems, the language developers want to tackle
(does general purpose for the developers mean web, XML and data base
processing or
lemming wrote:
Python page could start with: You like 'map', 'filter', 'for x in ...'
and lambda's in Python? Then you will like to learn where Python has
What about iterators - lazy lists - and generators - lazy
function definitions. And list comprehensions, both lazy
and strict. And zip. And
andrewcoppin:
Ketil Malde wrote:
I think this is the problem, not the solution. There is a lot of DB
libraries, just like there are a multitude of XML libraries, several
collections, etc. Too many libraries are written as research projects
or by grad students, and left to rot after release.
Sebastian Sylvan wrote:
On Nov 29, 2007 6:43 PM, Andrew Coppin [EMAIL PROTECTED] wrote:
I don't understand the ST monad.
There's not a whole lot to understand if you just want to use it
(though it's all very cool from a theoretical standpoint too).
From what I can tell, it's not
Am Donnerstag, 29. November 2007 19:43 schrieb Andrew Coppin:
Daniel Fischer wrote:
One thing: since You check the array bounds, the system needn't check
them again, use unsafeWrite and unsafeRead. And use Int for the index,
that would be MUCH faster.
I can't find the functions you're
Duncan Coutts wrote:
Probably the best eventual solution for Windows is to build
infrastructure to make binary packages for Windows. People are working
on that.
Do you mean the problem has been noticed or do you actually mean code
is being written and tested?
Bit Connor wrote:
I was new to haskell when I made this program and when I ran the
program for this first time I was expecting to experience a long pause
and then a display of the final image. I was very surprised to see
progressive rendering!
Neat, isn't it? :-)
On the other hand, if you
Hi
We have the start on a solution for how to pick the good ones.
We'll consider which binary IO library is most popular, from:
The search engine returns the results:
* binary, is used by 12 other packages:
This only works with libraries that are lower-level, like binary,
which other
[EMAIL PROTECTED] wrote:
Andrew Coppin writes:
Dan Weston wrote:
[...] and facilitates borrow-from-the-future techniques where
useful with infinite data structures or recursive algorithms.
And this, gentlemen, is just one of the reasons why Haskell gets
labelled as scary.
It's very hard
Yitzchak Gale writes:
Python's iterators are not the same as iterators in C
and other older languages. They are lazy lists. The reason
they named them iterators is not to scare people.
Haskell was not the first to have lazy lists, but Haskell
was an important part of the inspiration for
Bit Connor wrote:
computation is. And since it's all calls to map and filter et al., it's
...it's not immediately clear how to provide any feedback
on how much longer there is to wait.
Andrew Coppin wrote:
It seems unsafePerformIO is the way to go here.
...unsafeInterleaveIO
I disagree. The
but there's no risk using trace is there?
t.
The unsafe... functions are called that
for a reason, and their use should be highly discouraged,
except in cases where there is absolutely no other
reasonable way.
Yitzchak Gale [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
11/29/2007 05:01 PM
Don Stewart wrote:
We have the start on a solution for how to pick the good ones.
* Go to Hackage
* Click on the 'experimental search interface'
http://hackage.haskell.org/packages/search.html
* Click on 'advanced search':
Chris,
So I want the parameter to be more restricted. No one is going to write
a function that *only* works on AD types.
But exporting AD doesn't force people to write functions that work on
AD types, people can write whatever functions they like. They're only
constrained if they want to pass
Hi
1. For certain tasks, there are multiple possible packages, and it's not
really clear which one to go for. Having more than one choice is good.
(E.g., there's Gtk2hs and there's wxHaskell, and you pick the one you
want based on personal preference.) Having *dozens* of different
packages
Hello fellow Haskellers,
Does anyone know if/where I can find a specification for the .hi files
generated by GHC? I ask because I want to write an omni-completion
plugin for Vim to make Haskell hacking a bit nicer.
Thanks,
Rob Hoelz
___
Haskell-Cafe
Duncan Coutts wrote:
On Wed, 2007-11-28 at 21:00 +0100, Thomas Schilling wrote:
On Wed, 2007-11-28 at 20:46 +0100, Ben Franksen wrote:
[EMAIL PROTECTED]: .../software/haskell cd cabal
[EMAIL PROTECTED]: .../haskell/cabal runhaskell Setup.lhs configure
Hi Dan, thanks for answering.
Dan Piponi wrote:
When you specify that a function has type a - b, you're entering into
a bargain. You're saying that whatever object of type a you pass in,
you'll get a type b object back. a - b is a statement of that
contract.
Sure, that much makes perfect
Rob Hoelz wrote:
Does anyone know if/where I can find a specification for the .hi files
generated by GHC? I ask because I want to write an omni-completion
plugin for Vim to make Haskell hacking a bit nicer.
I think it's pretty much considered unspecified; but there's code to
read and write
On Thu, Nov 29, 2007 at 09:10:16PM +, Andrew Coppin wrote:
Sebastian Sylvan wrote:
On Nov 29, 2007 6:43 PM, Andrew Coppin [EMAIL PROTECTED]
wrote:
I don't understand the ST monad.
There's not a whole lot to understand if you just want to use it
(though it's all very cool
On Thu, Nov 29, 2007 at 09:48:22AM +0100, apfelmus wrote:
Well, I only remember that it took _me_ a page of C code :D Basically due
to a hand-coded intset and user interaction (no REPL for C, after all).
In my C programming, I've taken to using gdb as a REPL:
[EMAIL PROTECTED]:/tmp$ vi foo.c
On Thu, Nov 29, 2007 at 12:40:00PM +, Simon Marlow wrote:
What I'd *really* like to see is a bunch of links on the front page leading
to pages that describe the main differences between Haskell and some other
language (C, Python, Java, C#, F#, ...). The easiest way to grasp what
On Nov 29, 2007, at 6:19 PM, Stefan O'Rear wrote:
On Thu, Nov 29, 2007 at 09:10:16PM +, Andrew Coppin wrote:
Sebastian Sylvan wrote:
On Nov 29, 2007 6:43 PM, Andrew Coppin [EMAIL PROTECTED]
wrote:
I don't understand the ST monad.
...[and ST uses language extensions Andrew doesn't
On Nov 29, 2007, at 16:57 , [EMAIL PROTECTED] wrote:
Yitzchak Gale writes:
Guido was forced to do something - someone had written
a new Python interpreter, called Stackless Python,
in which every Python function was a Scheme-like continuation.
People found this very, very scary. So Guido
frees the programmer from writing superfluous type signatures is a
weak (and dubious) advantage. I very often write superfluous type
signatures first (to be sure I know what I'm asking my program to do)
and only then let Haskell check it. Then I leave it in as good
documentation.
I
I posted awhile back asking for help improving my cellular automata
program. I am competing with a C program which evolves CAs using a
fairly simple genetic algorithm. The algorithm involves evaluating 100
rules on 100 CAs, 100 times. In C this takes about 1 second. In my
Haskell version, it takes
I must be missing something, because to me the contract seems to be much
simpler to express (than the Functor + Isomorphism route you seem to me
to be heading towards):
diff :: (Eq x,
Dense x,
Subtractible x,
Subtractible y,
Divisible y x yOverX) = (x - y) -
Thomas Davie wrote:
There's no such check list of good stuff with the Haskell slogan,
instead, we've got a list of buzzwords, as bad as company webpages
preaching that they offer synergised solutions, but not actually
telling anyone what they do.
I couldn't disagree more.
The words used in
Speaking of Stackless Python, its homepage (http://www.stackless.com/)
has a rather nice layout... maybe slightly less emphasis on the About
section, but there you've got the links, the info and the news all on
the one page.
___
Haskell-Cafe mailing list
On Nov 29, 2007 10:31 PM, Justin Bailey [EMAIL PROTECTED] wrote:
I represent the automata as an array of integers, where each bit
represents a cell.
Why don't you use an UArray of Bools? They're implemented as bit
arrays internally, AFAIK (e.g. see
Yitzchak Gale writes:
Haskell was not the first to have lazy lists, but Haskell
was an important part of the inspiration for introducing
them into Python.
Jerzy Karczmarczuk wrote:
Actually, I would *sincerely* like to see some reference proving that.
The Python Library Reference,
Duncan Coutts wrote:
Tim Docker wrote:
Is it actually reasonable to expect any cabal packages that depend
on
external c libraries and headers to build out of the box on windows?
How can cabal find out where those files are, without requiring a
config file to be edited?
It's usually
On Nov 29, 2007, at 17:13 , Thomas Hartman wrote:
but there's no risk using trace is there?
If you're doing any other I/O, you may be surprised by where the
trace output shows up relative to it.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system
Chris,
I could change my implementation; I could use Jerzy's
implementation...launch Mathematica...
But all of these could be implemented by introducing a different type
constructor called AD for each one. You could switch the
implementation of AD on the user and they wouldn't have to change a
Claus Reinke [EMAIL PROTECTED] wrote:
Does anyone know if/where I can find a specification for the .hi
files generated by GHC? I ask because I want to write an
omni-completion plugin for Vim to make Haskell hacking a bit nicer.
you might find it easier to use GHCi's :browse command
Hi
Does anyone know if/where I can find a specification for the .hi files
generated by GHC? I ask because I want to write an omni-completion
plugin for Vim to make Haskell hacking a bit nicer.
you might find it easier to use GHCi's :browse command
Or you might want to try haddock with
Hello Andrew,
Friday, November 30, 2007, 12:10:16 AM, you wrote:
I don't understand the ST monad.
From what I can tell, it's not definable without using strange language
extensions. (I don't really like using things where it's unclear why it
works.)
this extension used only to guarantee
Hello Andrew,
Thursday, November 29, 2007, 11:51:32 PM, you wrote:
This is one of the more frustrating aspects of Haskell. It's not that
nobody has written DB bindings - they most certainly have. It's not that
nobody has written compression or cryptography bindings - they have.
It's that
Hello Andrew,
Thursday, November 29, 2007, 9:43:48 PM, you wrote:
Fifth thing: better use an STUArray, don't drag IO in if it's not necessary.
I don't understand the ST monad.
it's just a subset of IO monad, with renamed operations
the subset is selected in the way that guarantees
Bryan O'Sullivan [EMAIL PROTECTED] writes:
For higher dimensions, there are enough options in terms of
traversal direction and what exactly e.g. a fold should fold over
(single elements? lower-dimensional slices?) that a sensible API
doesn't exactly leap out.
How about a 'reduce' instead of
Andrew Coppin [EMAIL PROTECTED] writes:
(BTW, what's the difference between unsafePerformIO and unsafeInterleaveIO?)
Prelude :m + System.IO.Unsafe
Prelude System.IO.Unsafe :t unsafePerformIO
unsafePerformIO :: IO a - a
Prelude System.IO.Unsafe :t unsafeInterleaveIO
unsafeInterleaveIO :: IO
89 matches
Mail list logo