Hello Jason,
Wednesday, June 24, 2009, 10:15:14 PM, you wrote:
particular, in windows 32-bit program cannot alloc memory
block larger than 2gb
But on everything but Windows...
well, people never thought about such things until they really get
into using 4gb RAM with 32-bit systems :)
--
Hello Linker,
Wednesday, June 24, 2009, 11:03:19 PM, you wrote:
Construct a list:
[0,0.1..1]
floats are newspeak: 2*2 may be more than 4 or less than 4 :)
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
___
Hello wren,
Thursday, June 25, 2009, 6:35:36 AM, you wrote:
Rank2Types, RankNTypes, ExistentialQuantification, ScopedTypeVariables,
and GADTs are fairly benign ---though this is where you start loosing
compatibility with non-GHC compilers.
afair, except for GADTs these are supported by
Hello Kamil,
Tuesday, June 23, 2009, 11:17:43 AM, you wrote:
One easy way to fix the GC time is to increase the default heap size.
./a.out +RTS -A200M
It does make the GC only 1.4% of run time but it increases it overall
by 14s.
not surprising - you lose L2 cache locality. try to use -A
Hello Duncan,
Tuesday, June 23, 2009, 6:34:17 PM, you wrote:
import System.Posix.Files (getFileStatus, isDirectory)
Yeah, if we could make a standard portable variant of this, that'd be
great.
isdir - withFileStatus isdir? filename isDirectory
module System.Directory
withFileStatus ::
Hello Colin,
Monday, June 22, 2009, 10:12:57 AM, you wrote:
I've been hoogling like bad to try to determine if a function like
this exists.
getDirectoryContents returns sub-directories as well as file names. I
want only the latter, so I'm looking for a suitable filter.
isdir -
Hello Scott,
Monday, June 22, 2009, 10:23:42 PM, you wrote:
wombat :: forall e ix s. (IArray UArray e, Ix ix, MArray (STUArray s)
e (ST s)) = e - ix - UArray ix e - UArray ix e
http://haskell.org/haskellwiki/Library/ArrayRef#Reimplemented_Arrays_library
Unboxed arrays now can be used in
Hello Kamil,
Tuesday, June 23, 2009, 12:54:49 AM, you wrote:
I went back to using Strings instead of ByteStrings and with that
hashtable the program finishes in 31.5s! w00t!
and GC times are? also, try ByteString+HT, it should be pretty easy to
write hashByteString
--
Best regards,
Bulat
Hello Don,
Tuesday, June 23, 2009, 1:22:46 AM, you wrote:
One easy way to fix the GC time is to increase the default heap size.
./a.out +RTS -A200M
to be exact, -A isn't a heap size - it's frequency of generation-1
collections. by default, collection perfromed every 512kbytes, tied to
L2
Hello Marcin,
Tuesday, June 23, 2009, 2:31:13 AM, you wrote:
Now this took an odd turn, because the simulation started crashing
with
out-of-memory errors _after_ completing (during bz2 compression). I'm fairly
certain this is a GC/FFI bug, because increasing the max heap didn't
Hello Andrew,
Sunday, June 21, 2009, 1:52:22 PM, you wrote:
d1x - doesDirectoryExist d1
if d1x
then do
f1x - doesFileExist (d1 / f1)
if f1x
then do
d2x - doesDirectoryExist d2
if d2x
then do
f2x - doesFileExist
Hello Kamil,
Monday, June 22, 2009, 12:01:40 AM, you wrote:
Right... Python uses hashtables while here I have a tree with log n
you can try this pure hashtable approach:
import Prelude hiding (lookup)
import qualified Data.HashTable
import Data.Array
import qualified Data.List as List
data
Hello minh,
Thursday, June 18, 2009, 11:17:07 AM, you wrote:
Why don't we have a picture of a cool dinosaur instead?
Something cool because the last heat of life went out of it
65 million years ago?
made with secret dinosaur technology
made with dinosaur technology :)))
--
Best
Hello Simon,
Thursday, June 18, 2009, 1:22:30 PM, you wrote:
myGetArgs = do
Presumably we'd also have to remove the +RTS ... -RTS in Haskell if we
did this, correct?
yes, it's long-standing in my own to-do list :)
--
Best regards,
Bulat
Hello Simon,
Wednesday, June 17, 2009, 11:55:15 AM, you wrote:
Right, so getArgs is already fine.
it's what i've found in Jun15 sources:
#ifdef __GLASGOW_HASKELL__
getArgs :: IO [String]
getArgs =
alloca $ \ p_argc -
alloca $ \ p_argv - do
getProgArgv p_argc p_argv
p-
Hello Simon,
Wednesday, June 17, 2009, 12:01:11 PM, you wrote:
foreign import stdcall unsafe GetFullPathNameW
c_GetFullPathName :: LPCTSTR - DWORD - LPTSTR - Ptr LPTSTR - IO DWORD
you are right, i was troubled by unused GetFullPathNameA import in
System.Directory:
#if
Hello Simon,
Wednesday, June 17, 2009, 12:46:49 PM, you wrote:
I see, so you were previously quoting code from some other source.
from my program
Where did the GetCommandLineW version come from? Do you know of any
issues that would prevent us using it in GHC?
it should be as fine as any
Hello Henk-Jan,
Wednesday, June 17, 2009, 3:07:41 PM, you wrote:
I have done some research on functions in the base libraries, whether they
can handle large lists
long time ago i had problems with filterM, may be it's still fails
--
Best regards,
Bulat
Hello Gu?nther,
Thursday, June 18, 2009, 12:46:40 AM, you wrote:
there is one other alternative to gtk2hs and wxhaskell: .NET Forms
It is accessable through Sigbjorn Finne's hs-dotnet package.
I am right now *starting* to use it myself, so just consider it an option.
can you please provide
Hello Simon,
Tuesday, June 16, 2009, 3:30:31 PM, you wrote:
Care to submit a patch to put this in System.Directory, or better still
put the relevant functionality in System.Win32 and use it in
System.Directory?
Simon, it will somewhat broke openFile. let's see. there are 3 types
of
Hello Simon,
Tuesday, June 16, 2009, 4:34:29 PM, you wrote:
Thanks for reminding me that openFile is also broken. It's easily
fixed, so I'll look into that.
i fear that it will leave GHC libs in inconsistent state that can
drive users mad. now at least there are some rules of brokeness. when
Hello Simon,
Tuesday, June 16, 2009, 5:02:43 PM, you wrote:
Also currently broken:
* calling removeFile on a FilePath you get from getDirectoryContents,
amongst other System.Directory operations
Fixing getDirectoryContents will fix these.
no. removeFile like anything else also uses
Hello Simon,
Tuesday, June 16, 2009, 7:30:55 PM, you wrote:
Actually we use a mixture of CRT functions and native Windows API,
gradually moving in the direction of the latter.
so file-related APIs are already unpredictable, and will remain in
this state for unknown amount of ghc versions
--
Hello Simon,
Tuesday, June 16, 2009, 7:54:02 PM, you wrote:
In fact there's not a lot left to convert in System.Directory, as you'll
see if you look at the code. Feel like helping?
these functions used there are ACP-only:
c_stat c_chmod System.Win32.getFullPathName c_SearchPath
Hello Simon,
Tuesday, June 16, 2009, 5:02:43 PM, you wrote:
I don't know how getArgs fits in here - should we be decoding argv using
the ACP?
myGetArgs = do
alloca $ \p_argc - do
p_argv_w - commandLineToArgvW getCommandLineW p_argc
argc - peek p_argc
argv_w - peekArray (i
Hello Shu-yu,
Sunday, June 14, 2009, 7:41:46 AM, you wrote:
It seems like getDirectoryContents applies codepage conversion based
it's not a bug, but old-fashioned architecture of entire file apis
you may find my Win32Files.hs module useful - it adopts UTF-16
versions of file operations
Hello jerzy,
Tuesday, June 9, 2009, 8:23:04 PM, you wrote:
Please, tell him first about random streams, which he can handle without
IO. Or, about ergodic functions (hashing contraptions which transform ANY
parameter into something unrecognizable). When he says : I know all that,
THEN hurt
Hello ptrash,
Sunday, June 7, 2009, 9:41:56 PM, you wrote:
Hi, how can I change the value of a variable.
there are no variables in haskell :)))
x, like any other identifier, is a value. when you translate to Haskell
some algo that needs to update variable contents, you may either
1) use
Hello ptrash,
Sunday, June 7, 2009, 11:03:55 PM, you wrote:
Hi, thanks for the answers.
I want to make something like a counter. I have written a recursive method
which for example runs x times and counts how many times it runs, and also
count some other thinks. Add the end I want a
Hello ptrash,
Sunday, June 7, 2009, 11:44:18 PM, you wrote:
I have a list of pupils (type Pupil = (Name, Grade)) where I store the name
of the pupil and which grade he has. No I want to get the number (and
average number) of each grade. Something like 10 Pupils have a A (23%), 2
Pupils have
Hello Eric,
Friday, June 5, 2009, 12:17:42 AM, you wrote:
I'm using ghc 6.10.2 on Win XP. Are there any known solutions for this
problem?
Your question has inspired me to add a System.Environment.UTF8 module
to utf8-string 0.3.5
This module behaves like the System.IO.UTF8 wrapper.
it is
Hello Gu?nther,
Tuesday, June 2, 2009, 4:47:55 PM, you wrote:
is it possible to make ghc embedd an application icon in the .exe during
the compilation process?
i've found that answer may be googled as gcc icon:
1) create icon.rc containing one line:
100 ICON freearc.ico
2) compile it using
Hello Gu?nther,
Wednesday, June 3, 2009, 12:11:15 AM, you wrote:
Hi all,
is it possible to make ghc embedd a particular manifest in the .exe
during the compilation process?
add to .rc file:
1 24 app.manifest
and put manifect into app.manifest
--
Best regards,
Bulat
Hello Gwern,
Monday, June 1, 2009, 4:35:25 AM, you wrote:
GHC mangles UTF by default. You probably want to use one of the utf8
packages; eg.
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string
or
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-light
Hello Dmitry,
Monday, June 1, 2009, 4:24:36 PM, you wrote:
All network operations are run in separate thread, but sometimes input
from user is needed. Afaik, gtk2hs is not thread safe, so I came up with
look for postGUISync and postGUIASync
--
Best regards,
Bulat
Hello Lennart,
Thursday, May 28, 2009, 11:57:09 AM, you wrote:
-- | Generalization of the 'Bool' type. Used by the generalized 'Eq' and
'Ord'.
class Boolean bool where
() :: bool - bool - bool -- ^Logical conjunction.
(||) :: bool - bool - bool -- ^Logical disjunction.
i
Hello David,
Wednesday, May 27, 2009, 7:20:33 PM, you wrote:
Interesting:
http://www.facebook.com/careers/puzzles.php
So they use Haskell at Facebook?
actually, of 5 compiled languages there, 3 are FP, and only 2
remaining are the most popular languages on planet - C++ and Java
so this
Hello Simon,
Wednesday, May 27, 2009, 11:42:22 PM, you wrote:
while we are here - i always had problems understanding what is
inferred and what is expected type. may be problem is just that i'm
not native speaker
are other, especially beginners, had the same problem?
Claus made a suggestion
Hello 张旭,
Wednesday, May 27, 2009, 11:51:34 PM, you wrote:
Hi, I am really new to haskell. I am reading A gentle instruction
to haskell now. And I just cannot understand the chapter below. Is
there anybody who can gives me some hints about why the pattern
matching for client is so early?
Hello Max,
Thursday, May 28, 2009, 12:14:50 AM, you wrote:
As to whether it's confusing, I sometimes have to read these messages
a few times (sometimes it's unclear which expression is being referred
to, or why GHC thinks that the expression has a certain type), but the
words themselves are
Hello Max,
Thursday, May 28, 2009, 12:49:20 AM, you wrote:
I don't remember having any trouble, but that was a few years ago, and
type errors are confusing generally. I think that the main difficulty
with type errors is not the error *messages*, but I'm sure there is
room for improvement.
Hello Max,
Thursday, May 28, 2009, 1:30:28 AM, you wrote:
I prefer this wording:
The inferred type of `True' is `Bool',
while the type of the first argument of `f' should be `Int'.
In the expression: f True
yes, it's also self-explanatory
I prefer all three to Hugs's
ERROR - Type
Hello Achim,
Thursday, May 28, 2009, 1:34:55 AM, you wrote:
Error: type of x is Integer
while type of read argument should be String
The problem with this is that the compiler can't know whether or not
the type of arguments to read should be a String, as someone could
have messed up
Hello Henning,
Thursday, May 28, 2009, 2:06:36 AM, you wrote:
Prelude let a = 'a'; b = b in a==b
interactive:1:27:
Couldn't match expected type `Char' against inferred type `[Char]'
Is the type of 'a' wrong or that of 'b'?
it is not important, well, at least we can live
Hello Jeff,
Thursday, May 28, 2009, 2:03:30 AM, you wrote:
I absolutely agree about expected/inferred. I always forget which is
which, because I can figure both could apply to each.
thank you, it's what i meant! compiler infers types of both caller and
its argument and then expect to see
Hello Max,
Thursday, May 28, 2009, 2:14:19 AM, you wrote:
I absolutely agree about expected/inferred. I always forget which is
which, because I can figure both could apply to each.
That's actually true for me too. When you say it like that, I remember
times when I've had the same confusion.
Hello Henning,
Thursday, May 28, 2009, 2:30:18 AM, you wrote:
Bulat Ziganshin schrieb:
actually, i don't have much problems with errrmsgs now, but trying to
grok how i interpret them i've found that i mainly use *position*
part of message, it's enough for me most times :)
I have heard
Hello Belka,
Saturday, May 16, 2009, 9:22:54 PM, you wrote:
I'm trying to learn Haskell typeclasses, - about how to use them, - but
am i correctly understood that you've started learning type classes
with multi-parameter ones? this may be a bit too brave, especially for
a woman :D
i suggest
Hello Daryoush,
Wednesday, May 13, 2009, 6:11:10 AM, you wrote:
runST :: (forall s. ST s a) - a
evalStateT :: Monad m = StateT s m a - s - m a
these are quite opposite things. later means that you should pass some
value of Monad class (well, in this case it's StateT value whose type
is
Hello Duncan,
Wednesday, May 13, 2009, 3:33:13 PM, you wrote:
I think it should remain deprecated and we should work on the
replacement so that TH can switch its dependency.
TH isn't high-performance package and i think that it should just
switch to use of String
--
Best regards,
Bulat
Hello Robin,
Wednesday, May 13, 2009, 3:45:57 PM, you wrote:
TH isn't high-performance package and i think that it should just
switch to use of String
I don't agree. TH can sometimes slow down a build considerably. I don't
want to see it getting even slower.
i think GHC compile times is
Hello Peter,
Monday, May 11, 2009, 5:40:20 PM, you wrote:
GHC 6.10.1 is now supported.
6.10.2/6.10.3?
Yes, those versions are supported as well. GHC 6.10.1 changed the way
finalizers are handled, and as a result, Gtk2HS programs were
crashing. I don't think anything that affects Gtk2HS
Hello Peter,
Sunday, May 10, 2009, 7:43:38 PM, you wrote:
I'd like to announce the release of Gtk2HS 0.10.1! This release
includes mostly bug fixes and other small improvements. Most notably,
GHC 6.10.1 is now supported.
6.10.2/6.10.3?
--
Best regards,
Bulat
Hello Jason,
Thursday, May 7, 2009, 9:06:33 PM, you wrote:
you are right again. so, that remains: you shouldn't suppose that
user have read 90's GC paper. give a short excerpt of it: how
generational GC works and how memory usage converts to memory
footprint. then descriptions of RTS options
Hello Ketil,
Friday, May 8, 2009, 10:49:23 AM, you wrote:
FWIW, the JVM also fails to release memory resources back to the
OS. Given all the problems I've seen that one cause for long-running
processes, I'm definitely in support of correcting any behavior like
this in the GHC RTS.
I'm
Hello applebiz89,
Thursday, May 7, 2009, 1:46:34 PM, you wrote:
main :: IO()
you may find http://haskell.org/haskellwiki/IO_inside interesting
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
___
Haskell-Cafe
Hello Simon,
Thursday, May 7, 2009, 2:04:05 PM, you wrote:
I've heard it's hard to contain a long-running Haskell application in
a finite amount of memory
not exactly. you may alloc fixed pool of memory to application (say, 1gb)
if you know that it never need more memory. but as far as you
Hello Simon,
Thursday, May 7, 2009, 5:45:53 PM, you wrote:
out of date and say 256k, I've just fixed that). The old generation is
allowed to grow to 2x its previous size by default before being
collected.
you are right. i just checked old logs - seems that previously i just
misinterpreted
Hello Simon,
Thursday, May 7, 2009, 6:58:02 PM, you wrote:
and completely separate topic - +RTS -s report description also
doesn't exist
Scroll down in that section I linked to before:
http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-options-gc
you are
Hello Itsme,
Thursday, May 7, 2009, 9:18:47 PM, you wrote:
I could not find any contact info for Brian O'Sullivan, Don Stewart, or John
Goerzen on their book site. Any pointers to how I might locate any of them
much appreciated.
they are highly secret Haskell agents sent from 21xx. we are
Hello FFT,
Wednesday, May 6, 2009, 11:59:53 PM, you wrote:
I've heard it's hard to contain a long-running Haskell application in
a finite amount of memory
not exactly. you may alloc fixed pool of memory to application (say, 1gb)
if you know that it never need more memory. but as far as you
Hello z_axis,
Tuesday, May 5, 2009, 1:27:16 PM, you wrote:
floatLocation :: Window - X (ScreenId, W.RationalRect)
rr - snd `fmap` floatLocation w
class Functor f where fmap :: (a - b) - f a - f b
looks ok. X===f, fmap executes
floatLocation w :: X (ScreenId, W.RationalRect) === f a
and
Hello applebiz89,
Tuesday, May 5, 2009, 7:20:35 PM, you wrote:
filmsInGivenYear :: Int - [Film] - [String]
filmsInGivenYear filmYear ?= [ title | year - (Film title director year
fans) , year == filmYear] (this code wont compile - error given '?Syntax
error in expression (unexpected `;',
Hello Wolfgang,
Tuesday, May 5, 2009, 8:27:17 PM, you wrote:
i know two problems in Haskell/GHC that require OO-loke features -
extensible exceptions and GUI widget types hierarchy
Note that you don’t need different types for different kinds of GUI widgets if
you use Functional Reactive
Hello Paolo,
Monday, May 4, 2009, 2:05:44 PM, you wrote:
Martin Odersky advocates the OO features of the scala language
proposing an interesting problem where the OO approach seams
valuable.
i know two problems in Haskell/GHC that require OO-loke features -
extensible exceptions and GUI
Hello Mads,
Monday, May 4, 2009, 7:01:16 PM, you wrote:
i know two problems in Haskell/GHC that require OO-loke features -
extensible exceptions and GUI widget types hierarchy
Yes, type hierarchies require OO.
But, do we really need to represent different widget-types in a
hierarchy?
An
Hello Nicolas,
Saturday, May 2, 2009, 9:17:55 PM, you wrote:
But now I don't know how to dynamically add new spells (new spells can be
created in my gameplay). Since I can't assign a new value to the `spells'
variable (Data.Map.insert returns a new map), I just don't know where to
go.
well,
Hello Daniel,
Sunday, May 3, 2009, 10:24:52 PM, you wrote:
32-bit sing core [1]: Lisp, Fortran
:) this test measures speed of some programs, not languages.
results are depends mainly on bundled libraries and RTS. by no means
it demonstrates speed of compiler-generated code of
Hello Krzysztof,
Sunday, May 3, 2009, 10:06:30 PM, you wrote:
This roughly characterizes C++ vector class. I'm ready to implement
http://haskell.org/haskellwiki/Library/ArrayRef#Using_dynamic_.28resizable.29_arrays
although this (mine) package is probably incompatible with current ghc
Hello Gwern,
Sunday, May 3, 2009, 10:29:37 PM, you wrote:
32-bit quad-core [2]: Haskell, C# Mono, Lisp, Clean, Fortran.
I can't really read Clean, but it certainly looks as if it's making no
use of concurrency at all, while the Haskell one most certainly is.
probably other languages goes
Hello Daniel,
Sunday, May 3, 2009, 10:42:06 PM, you wrote:
I'm not sure about the second comment. I haven't seen the Haskell site
mention the shootout
just search cafe archives ;)
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
Hello Sven,
Saturday, May 2, 2009, 9:14:13 PM, you wrote:
must, but the actual packaging is not nice. So the obvious idea is to
introduce 3 new packages which lift out functionality from the OpenGL package:
another possible variant: OpenGL-DataTypes package that joins these 3
--
Best
Hello Maurício,
Wednesday, April 29, 2009, 11:09:04 PM, you wrote:
My goal is to have a place where one can find reliable and
comprehensive low-level bindings to foreign libraries, so that
writing higher level bindings becomes an easier task.
it looks impractical. better will be to provide
Hello Sam,
Saturday, April 25, 2009, 11:40:05 PM, you wrote:
btw, are you seen MetaLua? it's pretty piece of software that makes
Lua very FPish
Hi Ryan,
Nice to hear from another games industry coder on the Haskell lists :)
Thanks, this is exactly the kind of detail I was
Hello Sam,
Friday, April 24, 2009, 8:36:50 PM, you wrote:
I work in Games middleware, and am very interested in looking at how
Haskell could help us. We basically sell C++ libraries. I would like to
be able to write some areas of our libraries in Haskell, compile the
Haskell to C and
Hello Alex,
Friday, April 24, 2009, 8:57:40 PM, you wrote:
so, if you just need haskell-C++ interaction, you may look into using
FFI [1,2]. if you believe that you can compile some
java/ruby/haskellwhatever code down to C++ and incorporate it into
your function - sorry, they all have too
generating C already. Have I missed something?
Cheers,
Sam
-Original Message-
From: Bulat Ziganshin [mailto:bulat.zigans...@gmail.com]
Sent: 24 April 2009 17:53
To: Sam Martin
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] compilation to C, not via-C
Hello Sam,
Friday
search ended with Timber. As I mentioned,
it is very young, it has very little standard library to speak of, but it has
strong possibilities.
On Fri, Apr 24, 2009 at 1:34 PM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Sam,
Friday, April 24, 2009, 9:09:43 PM, you wrote
Hello Magnus,
Thursday, April 23, 2009, 8:47:23 PM, you wrote:
base is built-in into ghc/hugs/...
it never can be on hackage
I'm not sure why building of my recently uploaded version of dataenc
fails to build on Hackage[1]. Where can I find out what version of base
is available on Hackage?
Hello Jason,
Wednesday, April 22, 2009, 1:14:49 PM, you wrote:
there is no any need in unsafePerformIO for array computations - ST
monad is exactly what one need here
If you want to do raw IO and repackage it as pure, you can
use `unsafePerformIO` and friends. It is important to use the
Hello Jon,
Wednesday, April 22, 2009, 1:54:58 PM, you wrote:
Does anyone have any comments on the following criticism of some difficulties
with FFI, including IO, in Haskell:
http://groups.google.com/group/comp.lang.functional/msg/6d650c086b2c8a49?hl=en
In particular, is it not always
Hello S.,
Tuesday, April 21, 2009, 5:42:15 PM, you wrote:
If we had been interested in raising fierce discussions about n+k
patterns or how and where cabal installs things, we could have easily
achieved the same effect with much less effort.
you mean that we should shoot up? :)
--
Best
Hello Jon,
Monday, April 20, 2009, 1:59:07 PM, you wrote:
It's not an implementor's place to make such decisions --
they can legitimately say this feature sucks and tell the
next Haskell committee so. If they care enough about it,
they can lobby or get on that next committee, but the
Hello michael,
Monday, April 20, 2009, 6:32:47 PM, you wrote:
something like
0*_ = 0
x*y = x *# y
or vice versa
_*0 = 0
x*y = x *# y
where *# is original (*) definition. current ghc definiton just
performs cpu-level operation w/o checking for 0 since this is rarely
useful and need some time
Hello R.A.,
Sunday, April 19, 2009, 11:46:53 PM, you wrote:
Does anybody know if there are any plans to incorporate some of
these extensions into GHC - specifically the existential typing ?
it is already here, but you should use forall keyword instead odf
exists
--
Best regards,
Bulat
Hello michael,
Saturday, April 18, 2009, 6:56:20 PM, you wrote:
Is there a general function to count list elements. I'm trying this
you should add Eq restriction to type declaration since == operation
belomngs to Eq class and your function may work only with types
supporting comparision:
Hello michael,
Saturday, April 18, 2009, 8:27:45 PM, you wrote:
so you can use Scheme to derive theorem proofs. useful for exams! :)
I know functions can be compared in Scheme
Welcome to DrScheme, version 4.1 [3m].
Language: Swindle; memory limit: 128 megabytes.
(equal? equal? equal?)
#t
Hello michael,
Friday, April 17, 2009, 6:26:33 PM, you wrote:
http://haskell.org/cabal/
You're right. Since I'm not familiar with Cabal, I didn't use it. Is there a
good tutorial? Docs?
Also, I'm running a 32-bit Linux OS. Does one get a significant speed
increase by
switching to a
Hello Jason,
Saturday, April 18, 2009, 1:41:18 AM, you wrote:
The algorithm should return the same result as:
sortProduct a b = sort [ x * y | x - a, y - b ]
i think it's well-known problem. you should write a function merging
infinite list of sorted lists. in assumption that lists are
Hello Peter,
Thursday, April 16, 2009, 12:29:41 PM, you wrote:
Lennart (and Patai) said about unsafePerformIO, you - about NOINLINE
Well, the documentation says:
Use {-# NOINLINE foo #-} as a pragma on any function foo that calls
unsafePerformIO. If the call is inlined, the I/O may be
Hello John,
Wednesday, April 15, 2009, 5:35:00 PM, you wrote:
I agree. Is there any chance of 6.10.3 reverting the change?
both 6.6 and 6.8 had last releases at spring, so i don't expect new
6.10.* at all
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
Hello Alexandr,
Tuesday, April 14, 2009, 6:37:38 AM, you wrote:
Hi I would like to follow the crowd and find out what text editor everyone
uses for haskell on windows.
* HippoEdit (http://www.hippoedit.com/)
i've tried HippoEdit and don't recommend it. it's work in progress so
i
Hello rodrigo.bonifacio,
Tuesday, April 14, 2009, 6:54:07 PM, you wrote:
I guess this is a very simple question. How can I convert IO
[XmlTree] to just a list of XmlTree?
IO [XmlTree] is an action returning [XmlTree]. so to convert it to
[XmlTree] you just need to execute it in IO monad:
Hello Peter,
Wednesday, April 8, 2009, 2:42:24 PM, you wrote:
if you need win64 ghc version - add yourself to CC list of
http://hackage.haskell.org/trac/ghc/ticket/1884
Well, make that 2! :-)
On Wed, Apr 8, 2009 at 11:47 AM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello Peter
Hello Cristiano,
Tuesday, April 14, 2009, 7:24:40 PM, you wrote:
unsafePerformIO is not evil by itself, it's there for a purpose and,
as for anything else in the language, it's better to understand when
to use it
we just think that author of original question don't yet have good
knowledge of
Hello John,
Tuesday, April 14, 2009, 8:44:12 PM, you wrote:
I understand the goal of removing stuff from GHC, but the practical
implications can be rather annoying.
i think that Haskell Platform will eventually replace what GHC was for
a years, i.e. out-of-box solution for practical haskell
Hello Neil,
Tuesday, April 7, 2009, 2:25:12 PM, you wrote:
The problem I'm trying to solve is running system commands in
parallel.
system commands means execution of external commands or just system
calls inside Haskell?
Running a benchmark of issuing 1 million trivial tasks (create,
Hello Neil,
Tuesday, April 7, 2009, 6:13:29 PM, you wrote:
Calls to System.Cmd.system, i.e. running external console processes.
It's a make system I'm writing, so virtually all the time is spent in
calls to ghc etc.
To Bulat: I should have been clearer with the spec. The idea is that
Hello Bulat,
Tuesday, April 7, 2009, 6:50:14 PM, you wrote:
tid - forkIO (executing commands from chan...)
waitQSem sem
killThread tid
instead of killThread we really should send pseudo-job (like my
Nothing value) that will led to self-killing of job that gets this
signal
this
Hello Neil,
Tuesday, April 7, 2009, 6:13:29 PM, you wrote:
Consider a thread pool with 2 threads and the call parallel_ [parallel_
[b,c],a]
You get the sequence:
enqueue (parallel_ [b,c])
a
wait on parallel_ [b,c]
While you are executing a, a thread pool starts:
enqueue b
c
wait for
301 - 400 of 1995 matches
Mail list logo