is there anyway the modifyWith functions could work on uboxed types?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
aeyakovenko:
is there anyway the modifyWith functions could work on uboxed types?
If they're inlined, the modify functions on boxed types may well end up
unboxed.
What's the particular problem you're having?
-- Don
___
Haskell-Cafe mailing list
On Tue, 23 Sep 2008 10:34:25 +0200, Wolfgang Jeltsch
[EMAIL PROTECTED] wrote:
Okay, I was reading the wrong list (haskell instead of haskell-cafe) so the
announcement is there in my mail folder. But why doesn’t Mailman contain the
message properly in its archive?
According to
is there anyway the modifyWith functions could work on uboxed types?
If they're inlined, the modify functions on boxed types may well end up
unboxed.
What's the particular problem you're having?
well, after inspecting a little further its not so bad actually. i
was comparing
module Main
On Wed, 24 Sep 2008, Anatoly Yakovenko wrote:
is there anyway the modifyWith functions could work on uboxed types?
If they're inlined, the modify functions on boxed types may well end up
unboxed.
What's the particular problem you're having?
well, after inspecting a little further its not
Whenever `fail` comes up, there are usually remarks to the
effect that it doesn't really belong in the definition of
`Monad`. Where does `fail` belong? Could it go in `Arrow`?
--
_jsn
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I have a C function whose behaviour is customized by user-supplied
function (think of libc qsort). Typically these user-supplied functions
are written in C, but I'd like to use FFI to write them in Haskell.
Precisely, I'd like to write high-order function which will generate
these functions (e.g.
Am Mittwoch, 24. September 2008 11:36 schrieb Jason Dusek:
Whenever `fail` comes up, there are usually remarks to the
effect that it doesn't really belong in the definition of
`Monad`. Where does `fail` belong? Could it go in `Arrow`?
--
_jsn
In my opinion, fail s should be somehow
Hello Roman,
Wednesday, September 24, 2008, 2:04:38 PM, you wrote:
As I understand, there are two ways to do that. Either Haskell code is
called from C, or C code is called for Haskell. So my questions are:
1. Are they both possible?
yes. foreign export exports Haskell functions to C world,
On Wed, Sep 24, 2008 at 1:06 AM, Malcolm Wallace
[EMAIL PROTECTED] wrote:
The ICFP programming contest results presentation:
http://video.google.com/videoplay?docid=-4697764813432201693
Feel free to pass on this link to any other appropriate forum.
Yikes. Haskell did pretty terribly! Anyone
qsort [] = []
qsort (x:xs) = qsort (filter (x ) xs) ++ [x] ++ qsort (filter (x =) xs)
Note that you can help the reader by making the precedence a bit more
obvious:
qsort [] = []
qsort (x:xs) = qsort (filter (x ) xs)
++ [x]
++ qsort (filter (x =) xs)
I find
daveroundy:
On Wed, Sep 24, 2008 at 1:06 AM, Malcolm Wallace
[EMAIL PROTECTED] wrote:
The ICFP programming contest results presentation:
http://video.google.com/videoplay?docid=-4697764813432201693
Feel free to pass on this link to any other appropriate forum.
Yikes. Haskell did
I believe this was voiced as an SML issue more than an OCaml issue, though
honestly I don't know enough of the differences to distinguish them. Before
I mentioned that function/prefix application always binds tighter than
operator/infix application, he was using many redundant parentheses,
Is the report available yet?
Regards
On Wed, Sep 24, 2008 at 13:06, Don Stewart [EMAIL PROTECTED] wrote:
daveroundy:
On Wed, Sep 24, 2008 at 1:06 AM, Malcolm Wallace
[EMAIL PROTECTED] wrote:
The ICFP programming contest results presentation:
I've posted a summary of the results on my blog at
http://ryani.livejournal.com/18287.html
-- ryan
2008/9/24 Rafael Gustavo da Cunha Pereira Pinto [EMAIL PROTECTED]:
Is the report available yet?
Regards
On Wed, Sep 24, 2008 at 13:06, Don Stewart [EMAIL PROTECTED] wrote:
daveroundy:
On
Manlio Perillo wrote:
Don Stewart ha scritto:
[...]
Ok. So I'll just say: high level, efficient code is an overriding theme
of many individuals working on Haskell. Things are better and better
each year. We do not stand still.
Any roadmap for improve support in intensive IO multiplexing?
Or,
Hello Brandon,
Wednesday, September 24, 2008, 9:36:56 PM, you wrote:
Because he's convinced himself it's pointless because Haskell will
never be able to run faster than C
taking into account that C compilers are very close to maximum speed
possible, and this required many years of developemnt
Mads Lindstrøm [EMAIL PROTECTED] wrote:
qsort (x:xs) = ...
what would you propose to call the elements?
(car:cdar:cddar:cdddr)
no discussion.
--
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
donn cave [EMAIL PROTECTED] wrote:
Quoth Andrew Coppin [EMAIL PROTECTED]:
...
| As one experienced C++ programmer put it, there is no clear flow
from | left to right or right to left. Personally I found that a
little ironic | comming from the language that gave us
|
| while (*x++ = *y++)
On Sep 24, 2008, at 13:44 , Bulat Ziganshin wrote:
(note how he keeps trying to run
dons out of the discussion because he has proof to the contrary).
Don os free to present such examples. unfortunately all examples i've
seen was due to use of slow C code which easily can be made faster. in
On Wed, Sep 24, 2008 at 1:14 PM, Creighton Hogg [EMAIL PROTECTED] wrote:
Hi Haskellers,
So as another step in my education, I wanted to ask if the following
code at least feels 'morally' correct as a find/replace function,
replacing each occurrence of the sub-list before with after in the
Hello Brandon,
Wednesday, September 24, 2008, 11:13:14 PM, you wrote:
can come up with, including amorphous and vacuous ones (you can
almost always write something faster, but with how much effort?)
as i said, eddorts to optimize Haskell code is several times larger
while the result is
manlio_perillo:
However I'm looking for a good environment for implementing generic
internet servers, or web applications with special needs.
As an example one of my maybe future tasks is to write a simple
BitTorrent tracker + seeder.
You could look at conjure, the bitorrent client that
On Sep 24, 2008, at 15:20 , Bulat Ziganshin wrote:
Wednesday, September 24, 2008, 11:13:14 PM, you wrote:
can come up with, including amorphous and vacuous ones (you can
almost always write something faster, but with how much effort?)
as i said, eddorts to optimize Haskell code is several
Hi,
I have a function, that produces a random number between two given
numbers
rand :: Int - Int - IO Int
rand low high = getStdRandom (randomR (low,high))
(Naively) I'd like to write something like
take (rand 1 10 ) [1..10]
and see [1,2,3,4] ... or anything but nasty type-error
Iain Barnett wrote:
Hi,
I have a function, that produces a random number between two given numbers
rand :: Int - Int - IO Int
rand low high = getStdRandom (randomR (low,high))
(Naively) I'd like to write something like
take (rand 1 10 ) [1..10]
and see [1,2,3,4] ... or anything but nasty
forgot return, of course:
myTake :: IO [Int]
myTake = do
n - rand 1 10
return $ take n [1..10]
Lev Walkin wrote:
Iain Barnett wrote:
Hi,
I have a function, that produces a random number between two given
numbers
rand :: Int - Int - IO Int
rand low high = getStdRandom (randomR
On Wed, Sep 24, 2008 at 2:03 PM, Iain Barnett [EMAIL PROTECTED] wrote:
Hi,
I have a function, that produces a random number between two given numbers
rand :: Int - Int - IO Int
rand low high = getStdRandom (randomR (low,high))
(Naively) I'd like to write something like
take (rand 1 10 )
And the one liner:
(rand 1 10) = return . (\v - take v [1..10])
On Wed, Sep 24, 2008 at 5:10 PM, Lev Walkin [EMAIL PROTECTED] wrote:
forgot return, of course:
myTake :: IO [Int]
myTake = do
n - rand 1 10
return $ take n [1..10]
Lev Walkin wrote:
Iain Barnett wrote:
Hi,
Hi.
I need a simple, concurrent safe, database, written in Haskell.
A database with the interface of Data.Map would be great, since what I
need to to is atomically increment some integer values, and I would like
to avoid to use SQLite.
Thanks Manlio Perillo
Your forgetfulness boosted my ego for a few seconds - I wasn't the
only one! :)
Thanks very much, that's a big help.
Iain
On 24 Sep 2008, at 10:10 pm, Lev Walkin wrote:
forgot return, of course:
myTake :: IO [Int]
myTake = do
n - rand 1 10
return $ take n [1..10]
Lev Walkin
Hello Brandon,
Thursday, September 25, 2008, 12:43:55 AM, you wrote:
as i said, eddorts to optimize Haskell code is several times larger
while the result is several times slower
...and we're back to dons demonstrated otherwise, so you have to
please show me example that you mean and i
On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo [EMAIL PROTECTED]wrote:
I need a simple, concurrent safe, database, written in Haskell.
A database with the interface of Data.Map would be great, since what I need
to to is atomically increment some integer values, and I would like to avoid
to
On Wed, 24 Sep 2008, Iain Barnett wrote:
Hi,
I have a function, that produces a random number between two given numbers
rand :: Int - Int - IO Int
rand low high = getStdRandom (randomR (low,high))
If you only need arbitrary numbers, not really random ones, you should
stay away from IO:
Hello Brandon,
Thursday, September 25, 2008, 12:43:55 AM, you wrote:
as i said, eddorts to optimize Haskell code is several times larger
while the result is several times slower
...and we're back to dons demonstrated otherwise, so you have to
invent reasons to disqualify him. If all you
On Wed, Sep 24, 2008 at 11:20 PM, Bulat Ziganshin
[EMAIL PROTECTED] wrote:
please show me example that you mean and i will show exact reasons
why this Haskell code wasn't compared to the best C code
The shootout seems pretty popular, and there's still a lot of C
programmers around, so I wonder
you'll find this example really helpfull
-- Forwarded message --
From: Claude Heiland-Allen [EMAIL PROTECTED]
Date: 2008/6/5
Subject: Re: [Haskell-cafe] example of FFI FunPtr
To: Galchin, Vasili [EMAIL PROTECTED]
Cc: haskell haskell-cafe@haskell.org
Galchin, Vasili wrote:
On 24 Sep 2008, at 10:13 pm, Evan Laforge wrote:
For one approach, check
out 'replicate' to make copies of something, and then 'sequence' to
run them and return a list.
Thanks, I haven't found anything that explains 'sequence' well yet,
but I'll keep looking.
On 24 Sep 2008, at 10:13 pm,
Hello david48,
Thursday, September 25, 2008, 1:38:55 AM, you wrote:
please show me example that you mean and i will show exact reasons
why this Haskell code wasn't compared to the best C code
The shootout seems pretty popular, and there's still a lot of C
programmers around, so I wonder why
On Wed, 24 Sep 2008, Iain Barnett wrote:
On 24 Sep 2008, at 10:13 pm, Evan Laforge wrote:
For one approach, check
out 'replicate' to make copies of something, and then 'sequence' to
run them and return a list.
Thanks, I haven't found anything that explains 'sequence' well yet, but I'll
I'm going to have to agree with David... even if you ignore the
multi-threaded projects, why couldn't the C programs just implement very
specific version of the third party library inside their code? Is there
anything stopping them?
On Wed, Sep 24, 2008 at 5:50 PM, Bulat Ziganshin
[EMAIL
Hallo,
John Van Enk wrote:
I'm going to have to agree with David... even if you ignore the
multi-threaded projects, why couldn't the C programs just implement very
specific version of the third party library inside their code? Is there
anything stopping them?
Maybe they don't care
On Wed, Sep 24, 2008 at 11:17:01PM +0200, Manlio Perillo wrote:
Hi.
I need a simple, concurrent safe, database, written in Haskell.
A database with the interface of Data.Map would be great, since what I need
to to is atomically increment some integer values, and I would like to avoid
On Wed, 2008-09-24 at 22:44 +0100, Iain Barnett wrote:
On 24 Sep 2008, at 10:13 pm, Evan Laforge wrote:
For one approach, check
out 'replicate' to make copies of something, and then 'sequence' to
run them and return a list.
Thanks, I haven't found anything that explains 'sequence' well
As I understand, there are two ways to do that. Either Haskell code is
called from C, or C code is called for Haskell. So my questions are:
1. Are they both possible?
Yep.
2. If yes, which is better performance-wise? (C function is
performance-critical). If generated function is called
Creighton Hogg [EMAIL PROTECTED] wrote:
So as another step in my education, I wanted to ask if the following
code at least feels 'morally' correct as a find/replace function,
replacing each occurrence of the sub-list before with after in the
list.
Besides not using head, tail and
Achim Schneider [EMAIL PROTECTED] wrote:
Creighton Hogg [EMAIL PROTECTED] wrote:
So as another step in my education, I wanted to ask if the following
code at least feels 'morally' correct as a find/replace function,
replacing each occurrence of the sub-list before with after in the
On 2008 Sep 24, at 17:44, Iain Barnett wrote:
On 24 Sep 2008, at 10:13 pm, Evan Laforge wrote:
For one approach, check
out 'replicate' to make copies of something, and then 'sequence' to
run them and return a list.
Thanks, I haven't found anything that explains 'sequence' well yet,
but
Am Donnerstag, 25. September 2008 00:39 schrieb Achim Schneider:
Creighton Hogg [EMAIL PROTECTED] wrote:
So as another step in my education, I wanted to ask if the following
code at least feels 'morally' correct as a find/replace function,
replacing each occurrence of the sub-list before
I cannot compile Streams 0.1:
% darcs pull
Pulling from http://software.pupeno.com/Streams-0.1;...
No remote changes to pull in!
% make
runhaskell Setup.lhs configure
Setup.lhs:11:53:
Couldn't match expected type `Distribution.Verbosity.Verbosity'
against inferred type `IO
On 2008 Sep 24, at 20:14, Stephane Bortzmeyer wrote:
% ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2
You probably have 6.8.2's Cabal (in the 1.2 series), while the package
requires 1.4 (and 1.2 isn't smart enough to check versions).
--
brandon s. allbery
On Wed, Sep 24, 2008 at 08:24:09PM -0400,
Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote
a message of 13 lines which said:
You probably have 6.8.2's Cabal (in the 1.2 series), while the package
requires 1.4 (and 1.2 isn't smart enough to check versions).
How can you check that it
On 2008 Sep 24, at 20:30, Stephane Bortzmeyer wrote:
On Wed, Sep 24, 2008 at 08:24:09PM -0400,
Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote
a message of 13 lines which said:
You probably have 6.8.2's Cabal (in the 1.2 series), while the
package
requires 1.4 (and 1.2 isn't smart enough to
I wrote a command-line program recently for a friend in haskell. However,
he's far away and not particularly computer literate. I sent him the raw
binaries, but they came up with errors about not being able to find libgmp
stuff. So then I thought I should probably be able to somehow distribute
Hello,
I'm interested in doing a simple board game on haskell. For that I want
to be able to draw stuff like the possible player movements and I want
to be able to display very simple animations. I want to know what
graphical interface library you suggest to me.
I have almost no prior experience
check out http://www.haskell.org/soe/
On Wed, Sep 24, 2008 at 7:23 PM, Tim Docker [EMAIL PROTECTED] wrote:
I'm interested in doing a simple board game on haskell. For that I want
to be able to draw stuff like the possible player movements and I want
to be able to display very simple
I am having hard time making sense of the types in the following example
from the Applicative Programming paper:
http://www.cs.nott.ac.uk/~ctm/IdiomLite.pdf
ap :: Monad m ⇒ m (a → b ) → m a → m b
ap mf mx = do
f ← mf
x ← mx
return (f x )
Using this function we could rewrite sequence
On 2008 Sep 24, at 22:51, Daryoush Mehrtash wrote:
I am having hard time making sense of the types in the following
example from the Applicative Programming paper: http://www.cs.nott.ac.uk/~ctm/IdiomLite.pdf
ap :: Monad m ⇒ m (a → b ) → m a → m b
ap mf mx = do
f ← mf
x ← mx
return
Hey guys,
This is probably more of a question about functional programming than
it is about Haskell, but hopefully you can help me out. I'm new to
thinking about things in a functional way so I'm not sure what the
best way to do some things are.
I'm in a data structures course right now,
On Wed, Sep 24, 2008 at 12:31 PM, Don Stewart [EMAIL PROTECTED] wrote:
Twisted (a Python asynchronous framework) is a confortable environment,
but I feel concurrent Haskell is superior.
Should be a lot faster, given there's compiled native code, and no
global locks.
The concurrent Haskell
consider this partial program:
if n5 then
putStrLn big
else
putStrLn small
this works fine in hugs, but in ghc I must change it to:
if n5
then
putStrLn big
else
putStrLn small
--
View this message in context:
Try writing
data RBStack = RBS [RBSItem] [RBSItem]
where the first list are all the same colour and the start of the
second list is a different colour. The rest should follow naturally
and you will get amortised O(1) push and pop (you occasionally have to
juggle the lists).
By the way, for this
On 2008 Sep 25, at 0:47, leledumbo wrote:
consider this partial program:
if n5 then
putStrLn big
else
putStrLn small
this works fine in hugs, but in ghc I must change it to:
if n5
then
putStrLn big
else
putStrLn small
Actually, this also works:
if n 5 then
putStrLn big
I think you mean in a do. There is a proposal to fix this in Haskell'
cheers,
Fraser
On Sep 25, 2008, at 6:59, Brandon S. Allbery KF8NH [EMAIL PROTECTED]
wrote:
On 2008 Sep 25, at 0:47, leledumbo wrote:
consider this partial program:
if n5 then
putStrLn big
else
putStrLn small
this works
Hello,
Do there currently (or in the works) exist FFI bindings for Google's
Android API?
Kind regards, Vasili
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
65 matches
Mail list logo