2008/12/28 Bryan O'Sullivan b...@serpentine.com:
2008/12/27 John Van Enk vane...@gmail.com
Currently this only has:
htons
htonl
ntohs
ntohl
This is all subsumed by the binary package (Data.Binary), where it makes a
lot more sense in any instance.
That seems like an awfully heavy
Didn't reply to all. Sorry for the double Johan.
Johan asked:
will GHC be able to optimize away all
of the Data.Binary stuff so the functions, if defined in terms of
Data.Binary, are as efficient as a direct implementation?
Binary can be a bit slower than you might want. I'm guessing it
Hello,
http://cvs.haskell.org/Hugs/pages/libraries/base/Data-ByteString.html
but
vigalc...@ubuntu:~$ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude :m +Data.ByteString
Prelude Data.ByteString :t join
interactive:1:0:
It might be because you're looking at Hugs docs while using GHC.
Galchin, Vasili wrote:
Hello,
http://cvs.haskell.org/Hugs/pages/libraries/base/Data-ByteString.html
but
vigalc...@ubuntu:~$ ghci
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ...
no Martijn ... I am using ghci ... not Hugs
On Sun, Dec 28, 2008 at 4:02 AM, Martijn van Steenbergen
mart...@van.steenbergen.nl wrote:
It might be because you're looking at Hugs docs while using GHC.
Galchin, Vasili wrote:
Hello,
John Van Enk wrote:
I want to group them with Network functions because traditionally these
specific functions *are* in networking packages.
I agree. It is true that these functions are in the arpa/inet.h header on my
machine. The ntoh* and hton* are just data manipulation, just as
ooops ... .my bad ... so I guess Hoogle is the way to go??
On Sun, Dec 28, 2008 at 5:39 AM, Bulat Ziganshin
bulat.zigans...@gmail.comwrote:
Hello Vasili,
Sunday, December 28, 2008, 1:59:43 PM, you wrote:
http://cvs.haskell.org/Hugs/pages/libraries/base/Data-ByteString.html
look carefully
Hoogle is my friend?!
On Sun, Dec 28, 2008 at 5:49 AM, Galchin, Vasili vigalc...@gmail.comwrote:
ooops ... .my bad ... so I guess Hoogle is the way to go??
On Sun, Dec 28, 2008 at 5:39 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Vasili,
Sunday, December 28, 2008, 1:59:43
Well, IIUC, chroot operates at the process level. I don't think that
chrooting a lightweight haskell thread using FFI can ever make sense.
I see two cases here:
1) You actually want to chroot lightweight threads. In this case, write a
little ChRoot wrapper monad around IO that supports
On 2008 Dec 28, at 5:59, Galchin, Vasili wrote:
no Martijn ... I am using ghci ... not Hugs
On Sun, Dec 28, 2008 at 4:02 AM, Martijn van Steenbergen mart...@van.steenbergen.nl
wrote:
It might be because you're looking at Hugs docs while using GHC.
Galchin, Vasili wrote:
Ertugrul Soeylemez e...@ertes.de wrote:
In the last few weeks I have written a comprehensive tutorial about
Haskell monads [1], and I was hoping to get some constructive
feedback. I'd appreciate any well meant criticism.
[1] http://ertes.de/articles/monads.html
Thank you all for your
On Sat, 2008-12-27 at 11:54 -0600, Jake McArthur wrote:
Hans van Thiel wrote:
However, some functions in Haskell may have side effects, like printing
something on the screen, updating a database, or producing a random
number. These functions are called 'actions' in Haskell.
Not really
On Sun, 2008-12-28 at 03:54 -0600, Galchin, Vasili wrote:
Prelude :m +Data.ByteString
Prelude Data.ByteString :t join
interactive:1:0: Not in scope: `join'
Prelude Data.ByteString
Why no join function?
Because we removed it from the bytestring package in version 0.9. It had
been
On Sun, 2008-12-28 at 00:22 -0500, Jeremy Shaw wrote:
At Sat, 27 Dec 2008 22:41:58 -0600,
brian wrote:
On Sat, Dec 27, 2008 at 8:01 PM, Jeremy Shaw jer...@n-heptane.com wrote:
The problem with that function is that chroot affects the root of the
whole process.
Yeah. Maybe you
On Sun, Dec 28, 2008 at 1:38 AM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
getNthWord n bs@(PS ptr off len) =
inlinePerformIO $ withForeignPtr ptr $ \ptr' - do
let p = castPtr $ plusPtr ptr' off
peekElemOff p n
But even this low
On Sat, 2008-12-27 at 02:35 +0100, Ertugrul Soeylemez wrote:
Hello fellow Haskellers,
In the last few weeks I have written a comprehensive tutorial about
Haskell monads [1], and I was hoping to get some constructive feedback.
I'd appreciate any well meant criticism.
[1]
On Sun, 2008-12-28 at 08:47 -0800, Bryan O'Sullivan wrote:
On Sun, Dec 28, 2008 at 1:38 AM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
getNthWord n bs@(PS ptr off len) =
inlinePerformIO $ withForeignPtr ptr $ \ptr' -
do
Still nobody? Maybe I didn't write it clear. So one more time:
I have a list of numbers (say Int)
numberList = [1:Int,2,3,1,2,6,7,8]
and a number
sumOfNumberList = sum numberList
and here comes the question. Imagine the list numberLists is mutable (that's
why in topic is not Haskell question) so
See Adaptive Functional Programming by Acar et al.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.61.2257
Doesn't talk about OO specifically, but rather how to make updatable
computations in a mutable language.
There's a Haskell implementation, too.
Gwern Branwen wrote:
What advantages does Fram have over noweb? I've noodled around a
little on the Literate Programs wiki ( http://en.literateprograms.org/
) which uses noweb for providing the source files, and it seemed to
work as it should.
I've put together a small introduction to Haskell
Here is a direct link
http://far.no/fram/index.php?title=Introduction_to_Haskell
Haakon
http://far.no/fram
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi all,
What's the best way to implement the following Python code in Haskell?
It is purposefully written in a functional style (and as a result will
kill your recursion stack every other run).
# begin Python
from random import *
def genList ():
return [randint(0,9) for x in range(10)]
def
On Sun, Dec 28, 2008 at 2:39 PM, Nicholas O. Andrews nandr...@vt.eduwrote:
Hi all,
What's the best way to implement the following Python code in Haskell?
It is purposefully written in a functional style (and as a result will
kill your recursion stack every other run).
Here's my solution,
Thanks Ingram. It seems to be exactly what I was searching for:-) I knew I
can rely on Haskellers..
This is from abstract ( http://ttic.uchicago.edu/~umut/papers/toplas06.pdf):
We present techniques for incremental computing by introducing adaptive
functional programming.
As an adaptive program
I'll give it shot, but I'm also learning Haskell, so take this with a grain
of salt :)
randWhile :: ([Int]-Bool) - StdGen - [Int]
randWhile predicate = head . filter predicate . blocks 10 . randomRs (0,9)
where
blocks n xs = let (y,ys) = splitAt n xs in y : blocks n ys
main = newStdGen
Hans van Thiel hthiel.c...@zonnet.nl wrote:
On Sat, 2008-12-27 at 02:35 +0100, Ertugrul Soeylemez wrote:
In the last few weeks I have written a comprehensive tutorial about
Haskell monads [1], and I was hoping to get some constructive
feedback. I'd appreciate any well meant criticism.
On Sun, Dec 28, 2008 at 3:58 PM, Ertugrul Soeylemez e...@ertes.de wrote:
Hans van Thiel hthiel.c...@zonnet.nl wrote:
On Sat, 2008-12-27 at 02:35 +0100, Ertugrul Soeylemez wrote:
In the last few weeks I have written a comprehensive tutorial about
Haskell monads [1], and I was hoping to
Hi all,
I've googled for this but haven't really found an answer yet. Is
it possible to build (or better yet download) a GHC compiler that
runs on Linux and generates windows binaries?
I already use the MinGW C compiler to generate windows binaries
from C code and I run my test suite under WINE.
On Mon, 29 Dec 2008 00:21:02 +0100, Luke Palmer lrpal...@gmail.com wrote:
On Sun, Dec 28, 2008 at 3:58 PM, Ertugrul Soeylemez e...@ertes.de wrote:
Hans van Thiel hthiel.c...@zonnet.nl wrote:
On Sat, 2008-12-27 at 02:35 +0100, Ertugrul Soeylemez wrote:
In the last few weeks I have written
Hi,
I need a container data structure for storing anonymous objects - most
likely things that have not value such as STM (), but probably other things
as well. This will allow me to later on, iterate over the container and
process those objects. Additionally I have the requirement that I need
2008/12/28 John Ky newho...@gmail.com
Hi,
I need a container data structure for storing anonymous objects - most
likely things that have not value such as STM (), but probably other things
as well. This will allow me to later on, iterate over the container and
process those objects.
2008/12/28 Luke Palmer lrpal...@gmail.com:
The hard way is a heteroeneous container, with an interface like:
cons :: a - Container - IO (Key a)
unlink :: Key a - Container - IO ()
toList :: ???
If you want to change that to:
cons :: Typeable a = a - Container - IO (Key a)
unlink ::
On Mon, Dec 29, 2008 at 10:31 AM, Erik de Castro Lopo
mle...@mega-nerd.com wrote:
Hi all,
I've googled for this but haven't really found an answer yet. Is
it possible to build (or better yet download) a GHC compiler that
runs on Linux and generates windows binaries?
I already use the MinGW
Hi John
Sorry, I don't think I really grasp your problem?
I think you're mixing two things:
a) which data type to use to store whatever you like?
* http://haskell.org/haskellwiki/Existential_type
* Typable and Data.Dynamic
etc..
b) Which container to use to put in stuff, return an
I decided to try to implement a graph algorithm using STM. Each node in
the graph has a set of TVar-protected lists of the nodes it links to and
the nodes that link to it. Also, there is a global TVar-protected
Data.Map that contains all the nodes in the graph, indexed by name
(which is
Jeff Zaroyko wrote:
Hi Erik
See http://haskell.org/haskellwiki/GHC_under_Wine
Thanks Jeff, that works. Its not quite as convenient as a
cross-compiler but will definitely do for now.
Cheers,
Erik
--
-
Erik de Castro Lopo
Thank Duncan, Martijn, Bulat and Brandon!
Vasili
On Sun, Dec 28, 2008 at 10:47 AM, Duncan Coutts duncan.cou...@worc.ox.ac.uk
wrote:
On Sun, 2008-12-28 at 03:54 -0600, Galchin, Vasili wrote:
Prelude :m +Data.ByteString
Prelude Data.ByteString :t join
interactive:1:0: Not in scope:
Merry Christmas!
Hope everybody is enjoying the Christmas!
I am doing some readings and I found something seems to be interesting.
People sometime will try to represent a quantity-regard-only data structure
(such a order-regadless List) using functions instead of ta concrete data
structure
Both readTVar and writeTVar are worse than O(1); they have to look up
the TVar in the transaction log to see if you have made local changes
to it.
Right now it looks like that operation is O(n) where n is the number
of TVars accessed by a transaction, so your big transaction which is
just
2008/12/29 Raeck chiu ra...@msn.com:
People sometime will try to represent a quantity-regard-only data structure
(such a order-regadless List) using functions instead of ta concrete data
structure (like the haskell build-in []), any particular reason for this?
For example,
data Sex = Male |
Hello Erik,
Monday, December 29, 2008, 2:31:40 AM, you wrote:
ghc doesn't support cross-compilation
I've googled for this but haven't really found an answer yet. Is
it possible to build (or better yet download) a GHC compiler that
runs on Linux and generates windows binaries?
I already use
On 2008 Dec 28, at 17:22, frantisek kocun wrote:
We present techniques for incremental computing by introducing
adaptive functional programming.
As an adaptive program executes, the underlying system represents
the data and control
dependences in the execution in the form of a dynamic
2008/12/28 Brandon S. Allbery KF8NH allb...@ece.cmu.edu
On 2008 Dec 28, at 17:22, frantisek kocun wrote:
We present techniques for incremental computing by introducing adaptive
functional programming.
As an adaptive program executes, the underlying system represents the data
and control
On Mon, 2008-12-29 at 01:20 -0500, Brandon S. Allbery KF8NH wrote:
On 2008 Dec 28, at 17:22, frantisek kocun wrote:
We present techniques for incremental computing by introducing
adaptive functional programming.
As an adaptive program executes, the underlying system represents
the data
Thanks, that's good to know.
I tried incrementally loading the graph one node per transaction. It's
faster: about 38 seconds instead of 4 minutes, but I think I'll stick
with IORefs and one thread for the present.
-jim
Ryan Ingram wrote:
Both readTVar and writeTVar are worse than O(1);
On Mon, Dec 29, 2008 at 1:15 PM, Ryan Ingram ryani.s...@gmail.com wrote:
Both readTVar and writeTVar are worse than O(1); they have to look up
the TVar in the transaction log to see if you have made local changes
to it.
Right now it looks like that operation is O(n) where n is the number
of
46 matches
Mail list logo