On Fri, 1 Feb 2008, Cale Gibbard wrote:
Hello,
Today on #haskell, resiak was asking about a clean way to write the
function which allocates an array of CStrings using withCString and
withArray0 to produce a new with* style function. I came up with the
following:
nest :: [(r - a) - a] -
Greg Fitzgerald wrote:
Is it possible to automatically derive instances of Pretty
http://haskell.org/ghc/docs/latest/html/libraries/haskell-src/Language-Haskell-Pretty.html?
If no, what do most do when it comes to pretty-printing large data types?
We do it manually. Usually you have to
Here in Japan, it's pronounced in four syllables with
no accent, as follows:
Hah (as in Hah, I see.)
Sue (as in the name)
Ke (as in the first syllable of ketchup)
Ru (as in the first syllable of Lucas, since there
is no difference between l and r sounds in
Japanese)
Put together, it sounds as
Hello all,
After much distraction and laziness on my part (my apologies), I have finally
gotten around to putting together a new release of the delimited
continuations library CC-delcont. It is now available on hackage.
Relevant changes include:
* Now builds in GHC-6.8.x
* Builds with
Stephan Friedrichs wrote:
apfelmus wrote:
[...]
Feedback: I think the HeapPolicy thing is too non-standard. The
canonical way would be to use a MinHeap and let the Ord instance
handle everything. A MaxHeap can then be obtained via a different
Ord instance
newtype Ord a = Reverse a =
Rene de Visser [EMAIL PROTECTED] wrote:
Even if you replace parsec, HXT is itself not
incremental. (It stores the whole XML document in memory as a tree,
and the tree is not memory effecient.
If the usage pattern of the tree is search-and-discard, then only enough
of the tree to satisfy the
According to the Gogen Yurai Jiten (Etymology
Derivation Dictionary)
(http://gogen-allguide.com/a/arigatou.html), the
etymology of arigato (arigatou when entered into a
Japanese input method editor, such as Kotoeri) is as
follows (at the risk of moji-bake (garbled text), I
have included the
Is it possible to get Cabal to use 'cl' (Microsoft's C/C++ compiler
shipped with Visual Studio Express)?
I've found the Wiki page on using Visual Studio to create a DLL, then
convert it to a .a file so that GHC can consume it. I'd rather skip
using Visual Studio to build things and just ship a
On Jan 31, 2008 11:35 PM, Wolfgang Jeltsch [EMAIL PROTECTED] wrote:
Am Donnerstag, 31. Januar 2008 18:30 schrieb Dominic Steinitz:
Look at
http://sneezy.cs.nott.ac.uk/fun/feb-07/jeremy-slides.pdf
This is essentially what I had in mind. While Oleg's implementation needs
a thrusted core,
What about FixedVector for the vector library and DecTypArith (maybe
too long) or DecTypes for the type-level decimal arithmetic library?
Actually it would maybe be better to create common high-level
interface that could include unary, binary and decimal arithmetic so
that the library could be
Jonathan Cast wrote:
On 31 Jan 2008, at 1:23 AM, Reinier Lamers wrote:
Bayley, Alistair wrote:
More than one person has posted previously about the flaws and traps
of lazy IO. A common position seems to be don't do lazy IO.
Still, when I was browsing the Haskell' wiki a few days ago, I
Bulat Ziganshin wrote:
Hello Peter,
Thursday, January 31, 2008, 8:01:36 PM, you wrote:
files with different content generating the same hash)... My
intuition told me that the odds of two cryptographic hashes (on
meaningful content) colliding was much less than the earth being
destroyed by an
I have read quite a lot of Haskell papers, lately, and noticed that
the number 42 appeared quite often, in informal tutorials as well as
in very serious research papers. No wonder Haskell is the Answer to
The Great Question of Life, The Universe, and Everything, but I would
like to know who
Denis Bueno wrote:
On Fri, Feb 1, 2008 at 9:03 AM, Loup Vaillant [EMAIL PROTECTED] wrote:
I have read quite a lot of Haskell papers, lately, and noticed that
the number 42 appeared quite often, in informal tutorials as well as
in very serious research papers. No wonder Haskell is the Answer to
You'd probably be interested to read
http://www.cs.chalmers.se/~koen/pubs/entry-asian99-lava.html
On Jan 31, 2008 9:56 PM, Jan-Willem Maessen [EMAIL PROTECTED] wrote:
On Jan 31, 2008, at 5:39 AM, Henning Thielemann wrote:
It seems that algorithms on graphs can be implemented particularly
Hi --- The arbitrary constant was made popular by Douglas Adams in
the mid-1970s radio series ``A Hitchhikers Guide to the Galaxy'' (a
trilogy in 4 parts) --- however it does have a basis in the standard
model of physics --- a paper in Phys.Rev. of the early 1970s
described the unification
On Feb 1, 2008 9:27 AM, Loup Vaillant [EMAIL PROTECTED] wrote:
I suspected this. Just that I didn't noticed 42 but in Haskell papers.
Maybe this is just a bias due to my recent interests. I should check
some C/C++/Lisp/Ocaml papers.
About the library search, Maybe it is possible to try a
On Fri, Feb 1, 2008 at 9:03 AM, Loup Vaillant [EMAIL PROTECTED] wrote:
I have read quite a lot of Haskell papers, lately, and noticed that
the number 42 appeared quite often, in informal tutorials as well as
in very serious research papers. No wonder Haskell is the Answer to
The Great
On Fri, Feb 1, 2008 at 9:19 AM, Janis Voigtlaender
[EMAIL PROTECTED] wrote:
I think Loup is aware of the hitchhiker books (see the reference to the
Great Question of ... Everything).
Ah, I didn't read that correctly. I assumed that something he read
something that had described Haskell as
2008/2/1, Christopher L Conway [EMAIL PROTECTED]:
Loup,
This is not unique to the Haskell community. I suspect the arbitrary
constant 42 has been appearing unexplained in research papers for as
long as there have been computer scientists who were sci-fi geeks
(absolutely no offense intended
Loup,
This is not unique to the Haskell community. I suspect the arbitrary
constant 42 has been appearing unexplained in research papers for as
long as there have been computer scientists who were sci-fi geeks
(absolutely no offense intended to geeks ;-). It would be very
difficult indeed to
The bit of a mess that comes from avoiding monads is (my version):
import Foreign.Marshal.Array(withArray0)
import Foreign.Ptr(nullPtr,Ptr)
import Foreign.C.String(withCString,CString)
This uses withCString in order of the supplied strings, and a difference list
([CString]-[CString])
To pre-empt the next couple of questions, the numbers 17 and 23 are
from _The Illuminatus! Trilogy_ by Robert Shea and Robert Anton
Wilson, and the number 37 is from the Jersey Trilogy of movies by
Kevin Smith.
Cheers,
Tim
--
Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in
Phil == Phil Molyneux [EMAIL PROTECTED] writes:
Phil Adams was interested in computing --- I think his reaction
Phil to being told about functional programming was to wonder
Phil what non-functional programming might be.
Curiously, that was my reaction too when i first heard of the
On Feb 1, 2008, at 9:41 AM, Alfonso Acosta wrote:
You'd probably be interested to read
http://www.cs.chalmers.se/~koen/pubs/entry-asian99-lava.html
It is indeed an interesting paper (that I've read and referred to
several times over the years). But it's tricky to get right in
practice!
On 2008-02-01, Bjorn Buckwalter [EMAIL PROTECTED] wrote:
If Naturals had been sufficient for me I wouldn't have done my own
implementation (I'm unaware of any other implementation of Integers).
And there is certainly a lot of value to the clearer error messages
from a decimal representation.
2008/2/1 Galchin Vasili [EMAIL PROTECTED]:
I wrote a simple program to read the contents of a cdrom:
(Note that this is a terribly inefficient way of reading large amounts
of binary data. Of course, if this is just meant as an example, that's
fine. Otherwise, see the struff about
Hello,
I wrote a simple program to read the contents of a cdrom:
module Main where
import Text.Printf
import System.IO
import System.Posix.Types
import System.Posix.IO
main = do
fd - openFd /dev/cdrom ReadOnly Nothing defaultFileFlags
readCdRom fd 4096
closeFd fd
On Fri, 2008-02-01 at 00:09 -0500, Cale Gibbard wrote:
Hello,
Today on #haskell, resiak was asking about a clean way to write the
function which allocates an array of CStrings using withCString and
withArray0 to produce a new with* style function. I came up with the
following:
nest ::
Am Freitag, 1. Februar 2008 05:11 schrieben Sie:
Wolfgang Jeltsch wrote:
Well, the representation (D1,D2,D9) might be considered more readable.
It has the disadvantage of a fixed maximum size for the numbers. Which
takes me to a point I had already considered some time ago: Wouldn’t it
Am Freitag, 1. Februar 2008 13:09 schrieben Sie:
What about FixedVector for the vector library and DecTypArith (maybe
too long) or DecTypes for the type-level decimal arithmetic library?
Actually it would maybe be better to create common high-level
interface that could include unary, binary
Thank you Adam and Bradley. My program is my getting a feel of how to open a
Linux and do block reads. Just conceptual
Vasili
On 2/1/08, Adam Langley [EMAIL PROTECTED] wrote:
On Feb 1, 2008 1:42 PM, Bryan O'Sullivan [EMAIL PROTECTED] wrote:
No, it's the Haskell runtime turning a -1 return
Am Freitag, 1. Februar 2008 13:00 schrieb Alfonso Acosta:
On Jan 31, 2008 11:35 PM, Wolfgang Jeltsch [EMAIL PROTECTED]
wrote:
Am Donnerstag, 31. Januar 2008 18:30 schrieb Dominic Steinitz:
Look at
http://sneezy.cs.nott.ac.uk/fun/feb-07/jeremy-slides.pdf
This is essentially what I
Adam Langley wrote:
The error you are seeing comes from the operating system.
No, it's the Haskell runtime turning a -1 return from read into an
exception. You need to call hIsEOF to check whether you've hit EOF,
then break out of the loop.
b
Not to start a flame war or religious debate, but I don't think that
eta-expansions should be considered bad style. I realize that
composition-style is good for certain types of reasoning, but fully
eta-expanded code has an important legibility advantage: you can tell
the shape of its type just
On Feb 1, 2008 1:42 PM, Bryan O'Sullivan [EMAIL PROTECTED] wrote:
No, it's the Haskell runtime turning a -1 return from read into an
exception. You need to call hIsEOF to check whether you've hit EOF,
then break out of the loop.
(assuming you meant 0, not -1)
My bad, I thought that the
It's a matter of taste. I prefer the function composition in this case.
It reads nicely as a pipeline.
-- Lennart
On Fri, Feb 1, 2008 at 9:48 PM, Dan Licata [EMAIL PROTECTED] wrote:
Not to start a flame war or religious debate, but I don't think that
eta-expansions should be considered bad
On Fri, 2008-02-01 at 16:48 -0500, Dan Licata wrote:
Not to start a flame war or religious debate, but I don't think that
eta-expansions should be considered bad style. I realize that
composition-style is good for certain types of reasoning, but fully
eta-expanded code has an important
Folks
On 1 Feb 2008, at 22:19, Lennart Augustsson wrote:
It's a matter of taste. I prefer the function composition in this
case.
It reads nicely as a pipeline.
-- Lennart
Dan L :
On Fri, Feb 1, 2008 at 9:48 PM, Dan Licata [EMAIL PROTECTED] wrote:
Not to start a flame war or
Hi
Phil Molyneux [EMAIL PROTECTED] writes:
Hi --- The arbitrary constant was made popular by Douglas Adams in the
mid-1970s radio series ``A Hitchhikers Guide to the Galaxy'' (a trilogy in 4
parts) --- however it does have a basis in the standard model of physics ---
a paper in Phys.Rev. of
There seems to be an issue with the hsql-sqlite3. Anyone have a fix. Should
I use what is from darcs?
Index of /packages/archive/hsql-sqlite3/1.7/logs/failure
The Glorious Glasgow Haskell Compilation System, version 6.8.1
$ runhaskell Setup.lhs configure
Setup.lhs:7:33:
Module
Martin Lüthi:
In the Japanese culture the number 42 has a very special meaning. I
realized that while discussing cultural differences with a Japanese.
Pronouncing 42 sounds like death or to die. No hotel in Japan has a
room 42.
After knowing that it is hard to think that Doug Adams was not
derek.a.elkins:
On Fri, 2008-02-01 at 16:48 -0500, Dan Licata wrote:
Not to start a flame war or religious debate, but I don't think that
eta-expansions should be considered bad style. I realize that
composition-style is good for certain types of reasoning, but fully
eta-expanded code
| Yes, using lots of stack is clearly bad with ghc, but this is a ghc
| bug. In fact the only reason these programs do use lots of stack
| (vs. heap) is just a peculiarity of ghc rts implementation, so it
| really should be ghc that fixes the problem, or at least admits
| responsibility :-)
I
Wolfgang Jeltsch wrote:
Am Freitag, 1. Februar 2008 05:11 schrieben Sie:
Wolfgang Jeltsch wrote:
Well, the representation (D1,D2,D9) might be considered more readable.
It has the disadvantage of a fixed maximum size for the numbers. Which
takes me to a point I had already considered some
I'm currently getting Paolo Martini's Google Summer of Code project, an
updated version of Parsec, into a releasable state, and I will be
maintaining it for at least a while.
Paolo's major additions are:
* The Parser monad has been generalized into a Parser monad
transformer
I forgot to mention that the Text.Parsec modules should be preferred to
the Text.ParserCombinators.Parsec modules as the Haddock documentation
reveals.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
[Now with 100% more correct darcs get URLs.]
I'm currently getting Paolo Martini's Google Summer of Code project, an
updated version of Parsec, into a releasable state, and I will be
maintaining it for at least a while.
Paolo's major additions are:
* The Parser monad has been generalized
I have a list. Each component is a list with 2 whole numbers. I want
to multiply the second number by the log of the first
eg
tail ([519432,525806]) * log (head [519432,525806]).
I get the ffg error message:
No instance for (Floating [t])
arising from a use of `log' at
On 1 Feb 2008, at 10:30 PM, Logesh Pillay wrote:
I have a list. Each component is a list with 2 whole numbers.
First off, why? In Haskell (unlike dynamically typed languages like
Python or Perl), if you know you always have two elements, you want a
pair (519432,525806), not a list
Look at the type of tail:
tail :: [a] - [a]
That is, tail is the list of all elements *except* the head. You want last.
(Barring style considerations. Usually in a situation like this you
would use a list of tuples rather than a list of lists, since then you
know at compile time that you have
Hello Conor,
Saturday, February 2, 2008, 1:29:02 AM, you wrote:
nest = ala Cont traverse id
Third-order: it's a whole other order.
oh! i remember faces of my friends when i showed them something like
sortOn snd . zip [0..]. probably i have the same face now :)))
--
Best regards,
Bulat
52 matches
Mail list logo