Hello Olivier,
Thursday, May 15, 2008, 11:06:19 PM, you wrote:
As I could not find a function to wait on a ThreadId I used a MVar to
synchronize both threads.
Is this normal or have I missed the `waitOnThreadId` function?
yes, it's common idiom
--
Best regards,
Bulat
Hello Andrew,
Thursday, May 15, 2008, 12:49:32 AM, you wrote:
touch. Now, let's see what this IDE actually looks li-- oh you have GOT
to be KIDDING me! It can't find the right GTK DLL?!?
gtk2hs includes *developer* gtk2 environment. while it should work
fine (as far as it's in your path), you
Hello Olivier,
Thursday, May 15, 2008, 1:26:28 AM, you wrote:
RFC_RC _stdcall RfcUTF8ToSAPUC(const RFC_BYTE *utf8, unsigned
utf8Length, SAP_UC *sapuc,
unsigned *sapucSize, unsigned *resultLength, RFC_ERROR_INFO *info)
foreign import ccall unsafe sapnwrfc.h RfcUTF8ToSAPUC
Hello Richard,
Tuesday, May 13, 2008, 7:56:36 PM, you wrote:
In July 2007 -O2 was documented in GHC as making no difference to
the speed of programs :
http://www.haskell.org/pipermail/haskell-cafe/2007-July/029118.html
it's because ghc is 15 years old and its documentation may be not
Hello Jules,
Tuesday, May 13, 2008, 9:39:12 PM, you wrote:
This is close, and works as far as it goes. It is a limited
reimplementation of Dynamic which uses show/read instead of
there are gread/gshow funcs. don't know how these works, though :)
--
Best regards,
Bulat
Hello Eric,
Tuesday, May 13, 2008, 10:16:48 PM, you wrote:
-fallow-overlapping-instances doesn't convince GHC. Is there a way
around this other than manually writing out all the instances I want?
afaik, no. typeclasses are not the same as OOP classes. i suggest you
to look into
Hello Antoine,
Wednesday, May 14, 2008, 8:43:47 AM, you wrote:
Is this expected? I don't really understand why adding an extra layer
of indirection should speed things up.
adding laziness may improve performance by avoiding calculation of
unnecessary stuff or moving into into later stage
Hello Luke,
Sunday, May 11, 2008, 1:24:04 PM, you wrote:
So.. what do you use unsafePerformIO together with?
when i call function that in general case depends on the execution
order (so it's type is ...-IO x), but in my specific case it doesn't
matter. typical example is hGetContents on config
Hello Eric,
Saturday, May 10, 2008, 8:26:27 PM, you wrote:
Thank you -- looking at Printf was very helpful. My syntax is much
happier as a result.
btw, i also recommend to look into HsLua[1] which uses type classes in
very smart and elegant way to automatically convert between Haskell
and
Hello Vasili,
Sunday, May 11, 2008, 12:47:52 AM, you wrote:
. When I call this function (mqReceive), I get message too long.
you can divide-and-conquer the problem by trying
1) write the C code that calls mq_receive with the same params
2) call your own function instead of mq_receive and
Hello Giorgio,
Friday, May 9, 2008, 10:40:47 AM, you wrote:
be the next one. Should I wait for Real world Haskell or do you think
that the books you listed offer something new/different/more advanced
than Programming in Haskell?
i recommend you to read papers from the
Hello Olivier,
Friday, May 9, 2008, 6:28:38 PM, you wrote:
Thanks for your help, CString will work great for Char arrays, but
what about the 16bit-Word arrays?
TString. they are used a lot for interfacing with Win32 API
--
Best regards,
Bulatmailto:[EMAIL
Hello PR,
Saturday, May 10, 2008, 1:07:48 AM, you wrote:
Okay, when it comes to 3.3:[1,2,3] (Num t) = [t] makes more sense.
Is that the only reason?
the reason is that 1 as any other numerical constant, may be directly
used as Int, Integer, Double or any other Num value. if 1 is Int, you
will
Hello PR,
Saturday, May 10, 2008, 3:10:59 AM, you wrote:
in C you'd fiddle with pointers and Bob's your uncle. Here I'm not
sure how to piece that tree back together again with the new element
after having expanded it recursively.
in Haskell, you just return new tree with element inserted.
Hello Wei,
Thursday, May 8, 2008, 11:10:08 PM, you wrote:
test :: a - Int - a
shift is defined as a - Int - a
not exactly ;) this type signature is given inside class Bits, where
'a' isn't a free variable (as in standalone signature declaration),
but means 'a' from type class header:
class
Hello Philip,
Friday, May 9, 2008, 2:17:41 AM, you wrote:
Is there a way to write some of the functions in Haskell and then use
them in my C code via some kind of interface?
http://haskell.org/haskellwiki/IO_inside#Interfacing_with_foreign_evil_.28under_development.29
and then entries 1,6,7
Hello Philip,
Friday, May 9, 2008, 3:09:33 AM, you wrote:
Thanks for all the answers. I'm testing this right now and simples cases
work as expected. However from what I've read it seems it'll get ugly
once I try to pass a C array to a Haskell function.
Hello David,
Wednesday, May 7, 2008, 7:46:11 PM, you wrote:
I don't see any reason to support text mode. It's easy to filter by hand
if you absolutely have to deal with ugly applications on ugly platforms.
you mean unix, of course? ;)
--
Best regards,
Bulat
Hello Mads,
Thursday, May 8, 2008, 1:24:05 AM, you wrote:
also because TH is difficult. At least TH was difficult for me. It might
just be because I have never worked with anything like TH before (have
no, TH is dificult by itself. if you have spare time - read about
metalua, which implements
Hello Sai,
Monday, May 5, 2008, 7:52:29 PM, you wrote:
class MyString m c where
it should be
class MyString m c | m-c where
so ghc will realize that same m means the same c. read about
functional dependencies in ghc user manual
--
Best regards,
Bulat
Hello Ben,
Saturday, May 3, 2008, 5:13:48 AM, you wrote:
have the issues with castIOUArray (and thus hGetArray, hPutArray) in
Data.Array.IO discussed below been resolved?
there is alternative arrays library [1], where bounds are recalculated
when casting
[1]
Hello Henning,
Tuesday, April 29, 2008, 2:01:39 PM, you wrote:
However, in the Core output 'doubleFunc' does not get the __inline_me tag
and thus will not be inlined, too. :-(
ghc is so smart that sometimes it fool itself :D i bet that in this case
generic and specific functions are
Hello Martin,
Monday, April 28, 2008, 3:51:11 PM, you wrote:
just a thought: is it just me, or is Haskell really really really the
coolest general-purpose programming language?
the only Haskell drawback is that it forces you to hate all other
programming languages (c) people :)
--
Best
Hello Verma,
Monday, April 28, 2008, 4:11:51 PM, you wrote:
newCString str
Now once I call this function from C code, I am freeing the allocated
memory using free function. I want to confirm that this is the right
thing to do.
yes, i've traced this function down to mallocArray -
Hello Stuart,
Saturday, April 26, 2008, 1:57:47 PM, you wrote:
Are you sure? I would be very interested in a switch that
automatically generates hs-boot files, but I've been unable to find
any mention of it.
no, i never used this function, so you should be informed better
--
Best regards,
Hello Jennifer,
Friday, April 25, 2008, 8:54:42 PM, you wrote:
So, I have a circular dependency in my modules that I don't know
how to resolve in Haskell.
1. haskell standard allows circular deps between modules
2. ghc supports this part of standard in a rather awkward way - you
need to
Hello Ben,
Friday, April 25, 2008, 1:14:17 AM, you wrote:
mapM2 :: Monad m = (a - m b) - [a] - m [b]
{-# INLINE mapM2 #-}
mapM2 fn lst = mapM2accum fn lst []
where mapM2accum _ [] accum = return accum
mapM2accum fn (x:xs) accum = do
r - fn x
mapM2accum
Hello Niklas,
Friday, April 25, 2008, 1:25:39 AM, you wrote:
Not that it should matter for performance any, but you really ought to
reverse the result list too, or compute the accumulator in the right
order. :-)
unfortunately, this affects performance too. reverse costs one more scan
through
Hello Evan,
Wednesday, April 23, 2008, 1:48:30 AM, you wrote:
The FFI doc doesn't really talk about the alignment method at all, so
I don't really understand how to write one or how it's used.
write: easy. just specify how much data shoulkd be aligned. for
primitive datatypes this usually
Hello Dougal,
Monday, April 21, 2008, 7:22:49 PM, you wrote:
Does anyone know of functional-style implementations of
chess/draughts/go/anything else that might give me ideas? I am writing
once we have seen 100-line chess published in this list
--
Best regards,
Bulat
Hello Don,
Saturday, April 19, 2008, 12:08:11 AM, you wrote:
Would someone like to summarise the current approaches
to combining Haskell C++ on the Haskell wiki, even if just in bullet
points?
started at
http://haskell.org/haskellwiki/IO_inside#Interfacing_with_foreign_evil
--
Best
Hello Andrew,
Sunday, April 20, 2008, 11:41:52 PM, you wrote:
yes, GC behavior has significant impact on any new language (i mean
java, c#, f# and so on)
1. Does running the GC force all threads to stop? I know some GC designs
do this, but I have no idea how the one GHC implements works.
yes
Hello Andrew,
Saturday, April 19, 2008, 6:56:10 PM, you wrote:
OK, so just for fun, I decided to try implementing a parallel merge sort
coincedence - now i'm writing a parallel compression algorithm, very
much like parallel bzip2, but using ghc, of course
Weird thing #1: The first time you
Hello Andrew,
Saturday, April 19, 2008, 7:50:30 PM, you wrote:
this looks like disk caching effects. if data are read from disj on
first run and from disk cache on the next runs, this only means that
your algorithm works faster than reading its data from disk
Negative. No data is ever
Hello Brandon,
Saturday, April 19, 2008, 8:24:03 PM, you wrote:
contention. (Note that resource locking will be done by the threaded
runtime even with only one thread, so you will see some slowdowns
especially in I/O-related code.)
yes, i forget about this. Simon wrote once that locking
Hello Duncan,
Friday, April 18, 2008, 1:43:24 PM, you wrote:
older Cabal versions). We can make it stricter again in the future when
Cabal-1.4+ is much more widely deployed.
the problem, imho, is that such tools as Cabal, GHC, Hackage should be
built with forward and backward compatibility in
Hello Ketil,
Friday, April 18, 2008, 10:44:53 AM, you wrote:
This probably becomes too complicated, but I thought it was
interesting that the Java people are making use of 32bit pointers on a
64bit system, and are seeing a good performance benefit from it.
afaik, C compilers support this
Hello Miguel,
Friday, April 18, 2008, 7:06:07 PM, you wrote:
you may look into my freearc.org project
overall, nothing complex as far as you got it :) i use
ghc -c c_file.cpp
ghc --make main.hs c_file.o
in order to call from C++ to Haskell or vice versa you should define
function in C++ as
Hello Isaac,
Friday, April 18, 2008, 7:27:56 PM, you wrote:
absolutely true! it's required if you use new/delete and other things
supported by c++ RTS
if you'd normally be linking using g++, you'll need (IIRC) -lstdc++
added to linking-ghc's command line
Alfonso Acosta wrote:
Although you
Hello Jim,
Saturday, April 19, 2008, 12:10:23 AM, you wrote:
The other problem I had with concurrency is that I was getting about a
50% speedup instead of the 99% or so that I'd expect on two cores. I
2 cores doesn't guarantee 2x speedup. some programs are limited by
memory access speed and
Hello Alexis,
Thursday, April 17, 2008, 9:21:16 AM, you wrote:
i'm having some trouble 'getting' functional dependencies in the Haskell
ghc 6.8 manual contains good introduction into FDs
--
Best regards,
Bulatmailto:[EMAIL PROTECTED]
Hello Abhay,
Wednesday, April 16, 2008, 9:30:34 AM, you wrote:
i think it will not work with current ghc GC - it scans entire
memory/nursery when garbage collected so anyway you will need to wait
until next GC event occurs
Your mail gives me an idea, though I am not an iota familiar with
minor GC will become as slow as
major ones
Generational garbage collection for Haskell
http://research.microsoft.com/~simonpj/Papers/gen-gc-for-haskell.ps.gz
Regards,
Abhay
On Wed, Apr 16, 2008 at 11:55 AM, Bulat Ziganshin
[EMAIL PROTECTED] wrote:
Hello Abhay,
Wednesday, April 16, 2008
Hello Martin,
Wednesday, April 16, 2008, 7:06:07 PM, you wrote:
i'm not 100% sure that you'll find there appropriate examples but i
suggest you too look into http://haskell.org/haskellwiki/Library/Streams
where i've used very sophisticated (for me) FDs
We're also looking for (practical)
Hello Vasili,
Wednesday, April 16, 2008, 2:53:32 AM, you wrote:
I have an Linux executable of my Haskell library and test
case. I see there are several debuggers, e.g. Buddha, Hat, etc.
Which debugger is currently preferred for monadic (imperative) code? Thanks.
i use print mainly :)
Hello Miguel,
Saturday, April 12, 2008, 5:54:45 PM, you wrote:
How come I haven't ever heard about such a thing?!
it's an overview of generic haskell programming systems:
http://dfa.imn.htwk-leipzig.de/~waldmann/draft/meta-haskell/second.pdf
ask here about final version of this paper
--
Best
Hello Bulat,
Saturday, April 12, 2008, 6:10:04 PM, you wrote:
it's an overview of generic haskell programming systems:
found longer paper myself:
Comparing Approaches to Generic Programming in Haskell
http://www.cs.uu.nl/~johanj/publications/ComparingGP.pdf
--
Best regards,
Bulat
Hello Vasili,
Thursday, April 10, 2008, 6:12:45 PM, you wrote:
Registering unix-2.2.0.0...
In what sense is it being registered? Can I query this registry information?
ghc-pkg
--
Best regards,
Bulatmailto:[EMAIL PROTECTED]
Hello Hans,
Tuesday, April 8, 2008, 12:17:38 PM, you wrote:
deriving which I think is not used elsewhere. It will break a lot
of code, but it is easy to change, and also easy to make a
compatibility mode.
it's also easy to replace all the books, update all code repositories
and reteach all
Hello David,
Monday, April 7, 2008, 9:22:25 PM, you wrote:
* I'm sure there are other new features, but this is all that comes to
mind at the moment.
there was some issues with efficiency of darcs 1.x. am i correctly
understood that these issues was not addressed by new release?
its hard
Hello Hans,
Tuesday, April 8, 2008, 2:28:53 AM, you wrote:
At least Hugs complains if one does not indent deriving ..., but I
do not know what the standard says. If is required, then it can be
changed.
deriving is a part of data clause and indentation just allows us to
continue clause from
Hello Ian,
Monday, April 7, 2008, 2:50:02 AM, you wrote:
We (Bjorn Bringert, Duncan Coutts and Ian Lynagh) are pleased to
announce that we have recently set up a Haskell consultancy company,
Well-Typed LLP (http://www.well-typed.com/).
my congrats! seems you are first in this business :)
Hello Chris,
Thursday, April 3, 2008, 6:07:53 PM, you wrote:
On the other hand, I have enough time already trying to explain Num,
Fractional, Floating, RealFrac, ... to new haskell programmes. I'm not
sure it's an advantage if someone must learn the meaning of an additive
commutative
Hello Galchin,
Friday, April 4, 2008, 2:50:42 AM, you wrote:
3) runhaskell Setup.hs install
I write a small test case that references one of the new
functions; however, when I build the test case, I get an Out of
scope message indicated that at ghc(i) compile time the new function
Hello Simon,
Tuesday, April 1, 2008, 2:18:25 PM, you wrote:
How can one answer the question--why choose Haskell over Scheme?
1. static typing with type inference - imho, must-be for production
code development. as many haskellers said, once compiler accept your
program, you may be 95% sure
Hello Bruno,
Monday, March 31, 2008, 7:51:43 PM, you wrote:
I've written the following program... Which does not end in a reasonable time
:(
My algorithm seems ok to me but I see that memory consumption is gigantic...
Is this a memory problem with Data.Map ? Or an infinite loop ? (Where ?)
Hello Simeon,
Monday, March 31, 2008, 12:45:54 AM, you wrote:
The latter specifies a lexicographic order: Constructors are ordered by the
order of their appearance the data declaration, and the arguments of a
constructor are compared from left to right.
Although I have tried to make sense
Hello Bulat,
Monday, March 31, 2008, 1:16:35 AM, you wrote:
if you can compare chars and 'a' 'b', then *lists* of chars compared
in lexicographic order will be
aaa aab
aab aba
baa abb
as it was mentioned by Niklas Broberg, the last sentence should be reversed:
abb baa
sorry for +1
Hello haskell-cafe,
it's probably a bit too late, but i recalled that there is one project
that will be very useful - it's porting ghc to mingw64 platform,
allowing it to generate 64-bit windows platforms. may be someone will
find it interesting
--
Best regards,
Bulat
Hello Andrew,
Thursday, March 27, 2008, 12:27:47 PM, you wrote:
plus a b = unsafePerformIO (modifyIORef counter (+1)) `seq` a+b
Erm... might it be better to use an MVar? (To avoid lost updates if
there are multiple render threads.)
you are right, IORef is appropriate only for single-threaded
Hello Ariel,
Friday, March 28, 2008, 1:02:39 AM, you wrote:
class (Monad m) = MonadMemory m r | m - r where
there are more than one way to define such class. look at
http://haskell.org/haskellwiki/Library/ArrayRef for examples
--
Best regards,
Bulatmailto:[EMAIL
Hello Paul,
Wednesday, March 26, 2008, 2:32:53 PM, you wrote:
I'm looking to parse a Fortran dialect using Parsec, and was
afair, some months ago BASIC parsing was discussed here.
the first solution one can imagine is to add preprocessing stage
replacing line ends with ';'-alike
--
Best
Hello Andrew,
Wednesday, March 26, 2008, 3:37:53 PM, you wrote:
type of your own, you just need to write your own instance. The thing
that makes me suspicious of this logic is the absense of an instance for
tuples.
Any insights here?
and even insiders :) i've rewrote arrays library to be
Hello Jed,
Wednesday, March 26, 2008, 7:02:28 PM, you wrote:
StorableArray. Unfortunately there is a performance hit to using Storable
versus the built in unboxed types.
are you sure? it was in ghc 6.4, now afair they should be the same.
look in
Hello Jim,
Thursday, March 27, 2008, 12:33:20 AM, you wrote:
-Multi-core parallelism is working, but not as well as I'd expect: I get
about a 25% reduction in runtime on two cores rather than 50%. I split
this may be an effect of limited memory bandwidth
-Memory consumption is atrocious:
Hello Dusan,
Tuesday, March 25, 2008, 3:47:50 PM, you wrote:
(smp). The truth is that only the first one exploits multicore CPU. Why?
+RTS -N2
--
Best regards,
Bulatmailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing
Hello Michal,
Monday, March 24, 2008, 11:38:07 PM, you wrote:
Python-Haskell bridge
seems interesting
Benefits for Haskell
you forget about ability to use Python as scripting language inside
Haskell programs. look at HsLua library as example of this
--
Best regards,
Bulat
Hello Dan,
Tuesday, March 25, 2008, 1:29:51 AM, you wrote:
you forget about ability to use Python as scripting language inside
Haskell programs. look at HsLua library as example of this
This is much less interesting for those (like me) who, once in Haskell,
don't feel the least inclined to
Hello Max,
Saturday, March 22, 2008, 1:23:37 AM, you wrote:
around with modifying GHC itself. Potential use cases are:
* And whatever clever ideas the community comes up with!
i'm interested in syntax macros feature like metalua
--
Best regards,
Bulat
Hello Justin,
Tuesday, March 18, 2008, 7:41:15 PM, you wrote:
is probably the wrong thing to do. Static typing makes it harder to
maintain software because it's harder to change it.
Two years ago I would have agreed with that statement. Now - no way.
f few weeks ago i made a post to main
Hello David,
Monday, March 17, 2008, 7:59:09 PM, you wrote:
foreign import ccall unsafe math.h log10
c_log10 :: CDouble - CDouble
log10 :: Double - Double
log10 x = realToFrac (c_log10 (realToFrac x))
It's a bit sloppier, but shouldn't cause any trouble. And I've no
Hello Sterling,
Friday, March 14, 2008, 7:06:24 AM, you wrote:
yes, it's another question. my own program also writes to logfile and
it got lock-free only when i've switched to using my own IO routines
This answer may be way off base, but if differences appear between
ghci and compiled
Hello Andrew,
Wednesday, March 12, 2008, 10:06:44 PM, you wrote:
When I write to a file using System.IO, the file is locked for exclusive
access. I gather this is as specified in the Haskell Report. Which is
nice, but... I'd actually prefer the file to *not* be locked. Anybody
know how to
Hello Adrian,
Monday, March 10, 2008, 2:00:18 PM, you wrote:
instance Ord Foo where
compare (Foo a _) (Foo b _) = compare a b
I would consider such an Ord instance to be hopelessly broken, and I
h. for example, imagine files in file manager sorted by size or date
--
Best regards,
Hello dainichi,
Monday, February 25, 2008, 2:46:20 AM, you wrote:
Jersey. (Sorry, this will probably make me unpopular here on
Haskell-cafe, but the ability to use references was just too tempting,
and I'm not too experienced with purely functional data structures).
we have references,
Hello Uwe,
Saturday, February 23, 2008, 11:35:35 PM, you wrote:
mysighandler =
Catch (do hPutStrLn stderr caught a signal!
fail Interrupt!)
scheme calculation doesn't get interrupted at all! I see in the
System.Posix.Signals documentation that the signal handler gets
invoked
Hello dainichi,
Friday, February 22, 2008, 6:55:54 PM, you wrote:
If nothing similar exists, I was thinking about creating such a
tool (i.e. an interpreter with additional graph-displaying features)
not exactly this, but now i'm reading introduction into Q language [1]
which says on p.11 The
Hello Wolfgang,
Thursday, February 21, 2008, 2:45:43 AM, you wrote:
I proudly announce a little toy that lists the frequency of modules
being imported by other modules. Do you know Control.Monad is the most
frequently imported module? I did not!
This doesn’t surprise me very much. What
Hello haskell-cafe,
is there any haskell implementation for Windows Mobile? does they are
support creation of GUI apps and internet networking features?
--
Best regards,
Bulat mailto:[EMAIL PROTECTED]
___
Haskell-Cafe
Hello Ryan,
Thursday, February 21, 2008, 5:02:52 AM, you wrote:
values, determine that x = y, and just return (), but it's too late,
the missiles have already been launched.
it seems that asymmetrical answer of mr.Putin is just to hire a bit
more Haskell Hackers :)
--
Best regards,
Bulat
Hello John,
Tuesday, February 12, 2008, 9:28:22 PM, you wrote:
I was recently looking at the STM library, and I have a question about
the function unsafeIOToSTM. Can anyone explain to me what is unsafe
about it, and what sort of use would be considered safe?
STM operations can be repeated if
Hello Alfonso,
Tuesday, February 12, 2008, 11:32:20 PM, you wrote:
Excuse me for the subject, but IMHO is absolutely true. Anyhow, the
of course, you are right, but for practical goals i may suggest just
to read module sources instead of reading [had]docs. seeing the
implementation is much
Hello Tom,
Friday, February 8, 2008, 9:33:35 AM, you wrote:
The process of converting an expression tree to a graph uses either Eq
or Ord (either derived or a custom instance) to search and build a set
of unique nodes to be ordered for execution.
in similar situation, i've added hash field
Hello Henning,
Thursday, February 7, 2008, 12:29:02 AM, you wrote:
it's impossible to check for *arbitrary* function call whether it will be
terminated. seems that you don't have formal CS education? :)
so one can develop set of functions that are guaranteed to be
terminated or guaranteed
Hello Jeff,
Thursday, February 7, 2008, 1:31:59 AM, you wrote:
I noticed that
GHC implements mutable arrays in the IO monad. This seems odd to
me. Arrays aren't related to IO.
IO monad isn't only about I/O but about imperative stuff in general.
there is also special monad limited to
Hello Dan,
Thursday, February 7, 2008, 4:04:03 AM, you wrote:
I.e., it's not necessary to restrict the class of functions you consider
if you're willing to give up on full automation. So I disagree with the
only if below.
ok, read this as computer can ensure..., because it was exactly the
Hello Jeff,
Thursday, February 7, 2008, 4:17:27 AM, you wrote:
logical place for mutable arrays. However, I don't understand the
motivation for implementing it in IO. Were mutable arrays added to
IO because it would be difficult to write code that does both IO and
manipulates arrays
Hello Uwe,
Wednesday, February 6, 2008, 7:44:27 AM, you wrote:
But after that, it sure seems to me as if I've taken data out of the
IO monad...
this means that you can't use results of IO actions in pure functions.
your code works in some transformed version of IO monad, so you don't
escaped
Hello Henning,
Wednesday, February 6, 2008, 5:09:56 PM, you wrote:
Is Haskell's type system including extensions strong enough for describing
a function, that does not always return a trivial value? E.g.
(filter (\x - x==1 x==2))
such things may be detected by (too) smart compiler,
Hello Henning,
Wednesday, February 6, 2008, 6:09:28 PM, you wrote:
it's another question: you can describe trivial values using type
system, but can't prohibit them using it - it's impossible because you
can't check for arbitrary algorithm whether it will be finally stopped
I could consider
Hello Matthew,
Monday, February 4, 2008, 11:45:51 PM, you wrote:
That would be nice. But its only beneficial if there are programs
which takes large amounts of stack at some point, but then shrink down
to very little stack and continue for a reasonable amount of time.
From the 'when I was a
Hello Neil,
Tuesday, February 5, 2008, 1:11:47 PM, you wrote:
insert x y = delete x
deleteR y
unsafeInsert x y
i use the following trick:
(.$) = flip ($)
insert x y it = it.$ delete x
.$ deleteR y
.$ unsafeInsert x y
--
Best
Hello Henning,
Tuesday, February 5, 2008, 6:01:27 PM, you wrote:
Is Haskell's type system including extensions strong enough for describing
a function, that does not always return a trivial value? E.g.
(filter (\x - x==1 x==2))
such things may be detected by (too) smart compiler, but in
Hello Jeff,
Tuesday, February 5, 2008, 7:36:27 PM, you wrote:
Changing the subject slightly, I once wrote code in Concurrent
Clean that filtered a file that was larger than the available memory
on my PC.
Is this possible with Monads in Haskell?
google for simple unix tools
--
Best
Hello Adrian,
Tuesday, February 5, 2008, 10:15:59 PM, you wrote:
i would be also happy if ghc will return unused *heap* memory back to
OS - it's immediately required for my GUI program where users may open
huge files and then close them. but i personally don't have the same
need for *stack*
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
Hello Henning,
Thursday, January 31, 2008, 5:49:23 PM, you wrote:
I remember that type-level arithmetic is already implemented somewhere,
certainly more than once, but certainly seldom in a nicely packaged form.
one more:
darcs get --partial --tag '0.1'
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 asteroid... But this
Hello Chaim,
Tuesday, January 29, 2008, 7:26:25 PM, you wrote:
your approach is completely wrong (OOP-inspired, but haskell isn't OOP
language). type class is common interface to different types. just for
example:
data BinState = On | Off
data BinChange = OnToOff | OffToOn
class MinValue a
Hello Paul,
Saturday, January 26, 2008, 11:03:30 PM, you wrote:
* Say computers are cheap but programmers are expensive whenever
explaining a correctness or productivity feature.
This is true only if talking to people in high-income nations.
Even in low-income nations, its only
801 - 900 of 1995 matches
Mail list logo