On Tue, Nov 10, 2009 at 07:41:54PM -0800, Philippos Apolinarius wrote:
I discovered a Haskell compiler that generates very small and fast
code. In fact, it beats Clean. It has the following properties:
Excellent. that was my goal ;)
1 --- One can cross-compile programs easily. For instance,
I still have problems and your code won't typecheck on my machine
printing the following error:
Test.hs:9:34:
No instance for (Control.Monad.CatchIO.MonadCatchIO
(InterpreterT IO))
arising from a use of `catch' at Test.hs:9:34-53
Possible fix:
add an
Tony Morris wrote:
I have two projects that I intend to put on hackage soon. One depends
on the other. I have cabaled both. I am wondering how others work
with this kind of set up where changes are made to both libraries as
they work.
You just update and re-upload the packages as necessary. It
Hello friends,
I have a question regarding one thing I can't get my head around: First
my problem is, that wanted to install 'bindings-common' here on my
Windows machine. Usually that is no problem with the help of the
glorious cabal.
Now, 'bindings-common' needs a higher version of gcc than the
I don't want to have to upload every time I make a minor change as I am
working. Surely there is an easier way.
Martijn van Steenbergen wrote:
Tony Morris wrote:
I have two projects that I intend to put on hackage soon. One depends
on the other. I have cabaled both. I am wondering how others
To install a package from local sources, just run 'cabal install' in the
directory with the package's .cabal file.
Tony Morris wrote:
I don't want to have to upload every time I make a minor change as I
am working. Surely there is an easier way.
Martijn van Steenbergen wrote:
Tony Morris
On Wed, Nov 11, 2009 at 10:26:32AM -, Sittampalam, Ganesh wrote:
To install a package from local sources, just run 'cabal install' in the
directory with the package's .cabal file.
You can even have some kind of script like
cd lib1
cabal install || exit 1
cd ../lib2
cabal install || exit 2
Hi,
I tried to use unboxed arrays for generating an antialiased texture. To
make it easier to understand, here is the stripped down code that
produces an error:
import Control.Monad.ST
import Data.Array.ST
import Data.Array.Unboxed
import Data.Word
type BitMask = UArray Int Word16 -- for
On Wed, Nov 11, 2009 at 12:58 PM, Tillmann Vogt
tillmann.v...@rwth-aachen.de wrote:
Hi,
I tried to use unboxed arrays for generating an antialiased texture. To make
it easier to understand, here is the stripped down code that produces an
error:
*snip*
What do you think?
It is generally
On Wed, Nov 11, 2009 at 5:28 PM, Tillmann Vogt tillmann.v...@rwth-aachen.de
wrote:
Hi,
I tried to use unboxed arrays for generating an antialiased texture. To
make it easier to understand, here is the stripped down code that produces
an error:
import Control.Monad.ST
import Data.Array.ST
Hi, John.
I am trying JHC in a small embedded system (Medical instruments). The software
is written in Clean, and I am translating to Haskell. You may want to take a
look at my page:
http://www.discenda.org/med/
I am writing because I found something in JHC that smells like a bug. The
program
You might also look at how Data Parallel Haskell implements its arrays.
IIRC, it implements an array of n-field records as n arrays. You can
easily do that with typeclasses and type families.
2009/11/11 Tillmann Vogt tillmann.v...@rwth-aachen.de:
Hi,
I tried to use unboxed arrays for
There's a couple of things going on here:
-If you use storablevector and storable-tuple, or uvector, you can
store tuples of things. So your stupidArrayElement could be mimicked
by (Int, Int).
-But what you want to do is store a variable-sized data type. How
would you do that in C? If you can
On Nov 11, 2009, at 5:39 AM, Martin Hofmann wrote:
I still have problems and your code won't typecheck on my machine
printing the following error:
[...]
I assume we are using different versions of some packages. Could you
please send me the output of your 'ghc-pkg list'.
Thanks,
Martin
On Wed, Nov 11, 2009 at 04:32:05AM -0800, Philippos Apolinarius wrote:
data Op = AND | OR | NOT deriving (Show, Read)
data Tree= L Int | T Op [Tree] deriving (Show, Read)
Hmm, you see,
phi...@desktop:~/jhctut$ ./jtree
Give me a tree:
T AND (L 1, L 2)
jtree_code.c:2670: case fell off
On Tue, Nov 10, 2009 at 5:04 AM, Philippos Apolinarius
phi50...@yahoo.ca wrote:
foreign import ccall rs232.h opencport opencport :: CInt - IO ()
foreign import ccall rs232.h closecport closecport :: CInt - CInt
[...]
Originally, I had the following line (that did not work properly):
Excerpts from jean-christophe mincke's message of Tue Nov 10 21:18:34 +0100
2009:
Hello,
Hello,
I would like to get some advice about state monad (or any other monad I
guess) and CPS.
Here is to remarks somewhat off topic:
[...]
walk Empty acc k = k acc
walk (Leaf _) acc k = k (acc+1)
On Tue, Nov 10, 2009 at 4:29 PM, Ketil Malde ke...@malde.org wrote:
MightyByte mightyb...@gmail.com writes:
After a bit of googling, I came to the conclusion that I needed to
compile it with ghc --make -static -optl-static Foo.hs. Using only
-static or -optl-static by themselves did not
Thanks,
using MonadCatchIO-mtl-0.2.0.0 and hint-0.3.2.0 did it.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Svein Ove Aas svein@aas.no writes:
Haskell-mode 2.6 has been released.
The first hit for haskell-mode is http://www.haskell.org/haskell-mode/
This still points to Stefan's home page as the place to find it, which
then points to http://projects.haskell.org/haskellmode-emacs/ , which is
the
Hong Yang schrieb:
The question is more about algorithm than Haskell. But I am going to code in
Haskell which I am still learning.
Suppose I have a large table, with hundreds of columns and thousands of
rows. But not every cell has a value (of String, or Int, or Double type).
I want to shuffle
As some of you may know, I've been writing commercial Haskell code for a
little bit here (about a year and a half) and I've just recently had to
write some code that was going to run have to run for a really long time
before being restarted, possibly months or years if all other parts of the
On Wednesday 11 November 2009 08:23:53 am Tony Morris wrote:
I have two projects that I intend to put on hackage soon. One depends
on the other. I have cabaled both. I am wondering how others work
with this kind of set up where changes are made to both libraries as
they work.
What i did in
On Wed, Nov 11, 2009 at 3:22 PM, MightyByte mightyb...@gmail.com wrote:
(.text+0x3068): warning: Using 'getaddrinfo' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
But glibc is pretty standard, so I don't think this will be
you declared 'T Op [Tree]' so you should give 'T AND [L 1, L 2]'
as the tree, right?
Hi, Felipe.
You are right. This means that I gave the correct input to the program. As you
can see, I typed 'T AND [L 1, L 2]'. Therefore, JHC was expected to parse and
print it. However, it failed to parse
According to the paste you gave for the JHC test run:
Here is what happens when I try to run it:
phi...@desktop:~/jhctut$ ./jtree
Give me a tree:
T AND (L 1, L 2)
jtree_code.c:2670: case fell off
Aborted
You gave it parens not square brackets.
-Ross
On Nov 11, 2009, at 11:45 AM, Philippos
Hong Yang hyang...@gmail.com wrote in article
f31db34d090452x7786572ay4482dffc4824a...@mail.gmail.com in
gmane.comp.lang.haskell.cafe:
I want to shuffle the rows to maximize the number of columns whose first 100
rows have at least one number
Sounds like the maximum coverage problem, which
David Leimbach leim...@gmail.com writes:
As some of you may know, I've been writing commercial Haskell code for a
little bit here (about a
year and a half) and I've just recently had to write some
code that was going to run have to run for a really long time before being
restarted,
On Wed, Nov 11, 2009 at 7:43 AM, David Leimbach leim...@gmail.com wrote:
I recently ran into some serious space leak difficulties that would
ultimately cause this program to crash some time after startup (my simulator
is also written in Haskell, and runs a LOT faster than the real application
Hi, Jason.
Thank you for your explanations. They were very useful. In the light of what
you said, I modified the programs as shown below (commented lines failed to
work). Forcing the C function to return a number, wrapping the returned number
in IO, and printing the number, I succeeded in
Is there a state monad that is strict on the state but lazy on the
computation? Of course, strictness in the state will force a portion of the
computation to be run, but there may be significant portions of it which are
not run. Would there be a way to write a state monad such that it is
entirely
FWIW, I just compiled JHC 0.7.2 with ghc 6.12 , doing a couple of
corrections to make it compile, which I don't think they are related to this
*bug*. Testing the given code, it aborts for every inputs I give it L 1,
T AND [L 1,L 2] included.
I couldn't make it compile using function reads
On Wed, Nov 11, 2009 at 1:09 PM, Matthew Pocock
matthew.poc...@ncl.ac.uk wrote:
Is there a state monad that is strict on the state but lazy on the
computation? Of course, strictness in the state will force a portion of the
computation to be run, but there may be significant portions of it which
Hello leimy, the only simple solution I have found to avoid a leaking
state of a server is doing a periodical rnf of it, this implying the NFData
constraint on its datatype.
The reader should leak only if you nest forever the local function.
paolino
2009/11/11 David Leimbach
John,
Do you use jhc when you develop jhc? I.e., does it compile itself.
For me, this is the litmus test of when a compiler has become usable.
I mean, if even the developers of a compiler don't use it themselves,
why should anyone else? :)
-- Lennart
On Wed, Nov 11, 2009 at 3:37 AM, John
Quoth Lennart Augustsson lenn...@augustsson.net,
Do you use jhc when you develop jhc? I.e., does it compile itself.
For me, this is the litmus test of when a compiler has become usable.
I mean, if even the developers of a compiler don't use it themselves,
why should anyone else? :)
Though
On Wed, Nov 11, 2009 at 8:20 AM, Andy Stewart lazycat.mana...@gmail.comwrote:
David Leimbach leim...@gmail.com writes:
As some of you may know, I've been writing commercial Haskell code for a
little bit here (about a
year and a half) and I've just recently had to write some
code that was
On Wed, Nov 11, 2009 at 9:51 AM, Bryan O'Sullivan b...@serpentine.comwrote:
On Wed, Nov 11, 2009 at 7:43 AM, David Leimbach leim...@gmail.com wrote:
I recently ran into some serious space leak difficulties that would
ultimately cause this program to crash some time after startup (my
On Wed, Nov 11, 2009 at 10:29 AM, David Menendez d...@zednenem.com wrote:
On Wed, Nov 11, 2009 at 1:09 PM, Matthew Pocock
matthew.poc...@ncl.ac.uk wrote:
Is there a state monad that is strict on the state but lazy on the
computation? Of course, strictness in the state will force a portion
leimy2k:
I figured I was better off just creating a dependency in the evaluation, near
the outermost portion of the program (the loop) that would cause a strict
evaluation, and so far I was right :-)
Program behaves very well now, and responds much better too.
Do you know if
On Wed, Nov 11, 2009 at 6:00 PM, Philippos Apolinarius
phi50...@yahoo.ca wrote:
closecport :: Int - IO Int
closecport n= return (fromIntegral (c_closecport (fromIntegral n)))
The return here doesn't do what you think it does - semantically, the
value of c_closecport is still considered pure
Following up on this rather old thread, if you want to see a module
which has lots of input/output example pairs, and properties, in the
documentation then look at filepath (hoogle for takeExtension as an
example). These properties are also automatically transformed in to
test cases, so filepath
If by minority platform you mean platforms that are resource starved,
like some embedded systems, then I would have to agree.
-- Lennart
On Wed, Nov 11, 2009 at 2:12 PM, Donn Cave d...@avvanta.com wrote:
Quoth Lennart Augustsson lenn...@augustsson.net,
Do you use jhc when you develop jhc?
On Wed, Nov 11, 2009 at 11:19 AM, Don Stewart d...@galois.com wrote:
leimy2k:
I figured I was better off just creating a dependency in the evaluation,
near
the outermost portion of the program (the loop) that would cause a strict
evaluation, and so far I was right :-)
Program behaves
Quoth Lennart Augustsson lenn...@augustsson.net,
If by minority platform you mean platforms that are resource starved,
like some embedded systems, then I would have to agree.
Like anything but the platform the compiler developer(s) use. If you
used a platform like that, you would certainly
Is there a name for the following concept? Can you point me to any
references on it?
Suppose I have the following two functions ...
swap1 :: (Int, Char) - (Char, Int)
swap2 :: (Char, Int) - (Int, Char)
... and, for some reason, I think I can unify these into a single function.
I think, hmm,
Is the name of the concept Most general unifier (MGU) ? (See:
Hindley-Milner type inference)
2009/11/11 Sean Leather leat...@cs.uu.nl:
Is there a name for the following concept? Can you point me to any
references on it?
Suppose I have the following two functions ...
swap1 :: (Int, Char)
Least Common Generalization.
Cheers,
Thu
2009/11/11 Eugene Kirpichov ekirpic...@gmail.com:
Is the name of the concept Most general unifier (MGU) ? (See:
Hindley-Milner type inference)
2009/11/11 Sean Leather leat...@cs.uu.nl:
Is there a name for the following concept? Can you point me
I used to be a victim of GFW, so I can feel your pain. You may try to
subscribe to http://leimy9.blogspot.com/feeds/posts/default in your
Google Reader. In case that fails too, I've pasted the blog post
below, with no images:
I've been using Haskell in a serious way for about 2 years. Been
using
For some reference, I found some definition for the lcg function in
papers from [1].
In fact, I began to implement the type inference algorithm of System
CT (the version of 1999, it has been revised since) and I have an
implementation of lcg in that setting. I plan to upload the code to
github; I
Excerpts from Sean Leather's message of Wed Nov 11 21:24:43 +0100 2009:
Is there a name for the following concept? Can you point me to any
references on it?
Suppose I have the following two functions ...
swap1 :: (Int, Char) - (Char, Int)
swap2 :: (Char, Int) - (Int, Char)
... and,
Hey everyone! Do you have any suggestions for how I might allocate an
aligned block of memory that I can pin while making foreign calls, but
leave unpinned the rest of the time to potentially improve allocation
and garbage collector performance? Or is this even a good idea?
Thanks,
Greg
gcross:
Hey everyone! Do you have any suggestions for how I might allocate an
aligned block of memory that I can pin while making foreign calls, but
leave unpinned the rest of the time to potentially improve allocation
and garbage collector performance? Or is this even a good idea?
Hi, Ross.
Ops, the paste is wrong, but the bug is real. I mean, if I try to run
the program with the right input, the program aborts in the same place,
with the same error message:
phi...@desktop:~/jhctut$ ./jtestarbo
Give me a tree:
T AND [L 1, L 2]
jtestarbo_code.c:2670: case fell off
Hello Gregory,
Thursday, November 12, 2009, 12:14:56 AM, you wrote:
Hey everyone! Do you have any suggestions for how I might allocate an
aligned block of memory that I can pin while making foreign calls, but
leave unpinned the rest of the time to potentially improve allocation
and garbage
Thanks, Don. What made me think that this might be possible was the
existence of Foreign.StablePtr, since that seems to take a Haskell
expression and pin it down. Could this mechanism be harness to pin
down arrays, or am I misunderstanding how it works? (Is StablePtr
really just making a
gcross:
Thanks, Don. What made me think that this might be possible was the
existence of Foreign.StablePtr, since that seems to take a Haskell
expression and pin it down. Could this mechanism be harness to pin down
arrays, or am I misunderstanding how it works? (Is StablePtr really just
Hi, John.
I
am sending you this second email because the first one has a worng paste.
However, if I use the right input, I gent the same error. In fact, it gives
exactly the same error for any input, right or wrong.
{- file: tree.hs -}
{- compile: jhc tree.hs -dc -o
jtree }
import System
Stephen Tetley schrieb:
Why speak nonsense when you can test it?
//
module nonsense
import StdEnv
nonsense = map ((^) 2)
Start = nonsense [1,2,3]
//
On Fri, 6 Nov 2009, Petr Pudlak wrote:
Hi all,
(This is a literate Haskell post.)
I've encountered a small problem when trying to define a specialized
monad instance. Maybe someone will able to help me or to tell me that
it's impossible :-).
To elaborate: I wanted to define a data type
Hi Henning
I spotted that (and also that Clean doesn't have sections) after my
blood pressure returned to normal.
Best wishes
Stephen
[2,4,8]
I think they wanted square numbers, not powers of two.
___
Haskell-Cafe mailing list
Thanks. I actually prototyped in Perl the SA method intuitively (though I do
not know its name). But it is way slow. So I want to improve the speed by
means of both algorithm and language.
Hong
On Wed, Nov 11, 2009 at 9:36 AM, Tillmann Vogt tillmann.v...@rwth-aachen.de
wrote:
Hong Yang
Like paolino, I did a couple tests and found:
data TreeX = Leaf Int | NotLeaf Int deriving (Show, Read)
[to...@mavlo Test]$ ./jtree
Give me a tree:
Leaf 5
jtree_code.c:2572: case fell off
Aborted
[to...@mavlo Test]$ ./jtree
Give me a tree:
NotLeaf
On Nov 12, 2009, at 9:24 AM, Sean Leather wrote:
Is there a name for the following concept?
[Generalising from
(Int, Char) - (Char, Int)
(Char, Int) - (Int, Char)
to (x,y ) - (y, x )]
It's the least specific generalisation, also known as anti-
unification.
So, as I understand it, you have a very large sparse table, thousands
of rows and hundreds of columns, of which each cell within a column of
type String, Int, or Double can contain one of those types or nothing.
Then you to want to shuffle the rows to maximize the number of columns
whose first
import Text.ParserCombinators.Parsec
data PermParser tok st a = Perm (Maybe a) [Branch tok st a]
data Branch tok st a = forall b. Branch (PermParser tok st (b - a))
(GenParser tok st b)
I have hoogled the `forall` but i cannot find any appropriate answer!
thanks!
-
fac n = foldr (*)
Forall means the same thing as it means in math, it means for any
type -- call it `b` -- then the type of the following it `Branch
(PermParser tok st (b - a)`
`tok`, `st` and `a` are all given by the declaration of the datatype
itself.
Hope that makes sense,
/Joe
On Nov 11, 2009, at
Hi all,
Further to earlier discussion on this topic, I've just released a
first version of this package to hackage:
http://hackage.haskell.org/package/simple-observer
It is a fairly simple implementation of subject/observer which I've
recently used to good effect in an GUI written using
First of all, I find it striking that you are using the
declaration:
foreign import ccall unsafe rs232.h closecport c_closecport ::
CInt - CInt
and that it actually works. I would think the only workable
declaration would be:
foreign import stdcall unsafe rs232.h closecport
On Wed, Nov 11, 2009 at 4:24 PM, zaxis z_a...@163.com wrote:
data Branch tok st a = forall b. Branch (PermParser tok st (b - a))
(GenParser tok st b)
I have hoogled the `forall` but i cannot find any appropriate answer!
That's an example of an existential type. What that line is saying is
Richard O'Keefe wrote:
On Nov 12, 2009, at 9:24 AM, Sean Leather wrote:
Is there a name for the following concept?
[Generalising from
(Int, Char) - (Char, Int)
(Char, Int) - (Int, Char)
to(x,y ) - (y, x )]
It's the least specific generalisation, also known as
Am Mittwoch 11 November 2009 23:50:21 schrieb Thomas DuBuisson:
Like paolino, I did a couple tests and found:
So the read for that does not work... but surprisingly...
data TreeX = Leaf Int | NotLeaf deriving (Show, Read)
Dropping the Int from the second constructor works (ignore the
Sorry, slightly off-topic.
I wanted to install LHC to compare that to GHC and JHC, but alas:
da...@linux-mkk1:~/Haskell/LHC/lhc-0.8 cabal install -fwith-libs -flhc-regress
Resolving dependencies...
Configuring libffi-0.1...
cabal: The pkg-config package libffi is required but it could not be
This is the second public release of my D-Bus implementation.
dbus-core is an implementation of the D-Bus protocol, and dbus-client
is a set of wrappers and utility computations to simplify writing
basic clients.
Interesting changes to dbus-core
* Performance
Hello Evan,
Thursday, November 12, 2009, 4:02:17 AM, you wrote:
Recently the go language was announced at golang.org. There's not a
lot in there to make a haskeller envious, except one real big one:
compilation speed. The go compiler is wonderfully speedy.
are you seen hugs, for example? i
Nicolas Pouillard wrote:
Excerpts from jean-christophe mincke's message of Tue Nov 10 21:18:34 +0100
2009:
do acc - get
put (acc+1)
...
Since this pattern occurs often 'modify' is a combination of get and put:
do modify (+1)
...
Though the caveat about laziness applies here as
On Thu, Nov 12, 2009 at 7:18 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Evan,
Thursday, November 12, 2009, 4:02:17 AM, you wrote:
Recently the go language was announced at golang.org. There's not a
lot in there to make a haskeller envious, except one real big one:
Hi,
Today, when I compiled gtk2hs, I got this:
cairo/Graphics/Rendering/Cairo.hs.pp:264:0:
Failed to load interface for `Data.Array.Base':
it is a member of the hidden package `array-0.2.0.0'
Use -v to see a list of the files searched for.
As usual, I searched for the
When I try cabal-install lambdabot (gentoo linux/amd64, ghc installed with
portage), it runs fine until compiler tries to link readline package (some
template haskell?). The problem caused by dirty trick, used in gentoo: the
/usr/lib64/libreadline is a fake with script, redirecting ld to /lib64 .
sterl wrote:
Richard O'Keefe wrote:
On Nov 12, 2009, at 9:24 AM, Sean Leather wrote:
Is there a name for the following concept?
[Generalising from
(Int, Char) - (Char, Int)
(Char, Int) - (Int, Char)
to(x,y ) - (y, x )]
It's the least specific generalisation, also known
Without `forall`, the ghci will complain: Not in scope: type variable `b'
It is clear now. thank you!
Dan Piponi-2 wrote:
On Wed, Nov 11, 2009 at 4:24 PM, zaxis z_a...@163.com wrote:
data Branch tok st a = forall b. Branch (PermParser tok st (b - a))
(GenParser tok st b)
I have
I did a little bit of Data.Text benchmarking the other day, and I was
shocked to find that decoding a UTF-8 stream proceeded at a sedate 3MB/sec.
On investigation, the culprit was that I'd marked both the outer function
and the inner (a loop) as INLINE. Because the inner loop was marked as
INLINE,
wren ng thornton wrote:
sterl wrote:
IANTT (I am not a type theorist) but...
If you're talking about supertypes and subtypes, then I think this can
be classified as a least upper bound.
It is a least upper bound, but only in a particular sense. The
particular sense is (of course)
On Wed, Nov 11, 2009 at 5:44 PM, Svein Ove Aas svein@aas.no wrote:
My recommendation would be to take glibc off the list of statically
linked libraries.
How do you do that ?
David.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
84 matches
Mail list logo