On Wed, Mar 16, 2011 at 12:10:59AM -0400, Dylan Alex Simon wrote:
Does anyone know the current maintenance status of the X11 package? I emailed
Spencer Janssen a number of months ago and never heard back. So, I'll put
this here in case any one else runs into it or can get it to the right
all of these be lumped together into one giant
sum-type for errors and one for events?
Take care,
Antoine
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
gobs of resources to compile -- my box actually ran out of memory attempting to
build it.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Once this is done and I have commented to the code, I will be happy to
put it onto the wiki as a teaching aid.
Thanks.
--
[EMAIL PROTECTED] -= H+ =- www.kierun.org
PGP: 009D 7287 C4A7 FD4F 1680 06E4 F751 7006 9DE2 6318
Cheers,
Spencer Janssen
. As far as I know, there is no access to strictness information in rule
pragmas.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
, the algorithm is
identical to what I'd write in C. Also, mean [1 .. 1e9] will actually work
in Haskell, while in C you'll just run out of memory.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
'
Any ideas why? Thanks,
Jim
The array package isn't needed for GHC 6.6, as Data.Array.* is included in the
base package.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
Regards, Vasili
For C's void *, I'd use Ptr ().
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Control.Parallel.par.
Mmm, OK. I'll try that. (I wasn't actually aware that STM is working
yet...)
STM has been available for quite awhile, as early as GHC 6.4 if memory serves.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
, it is The
Final Word on all these semantic and syntactic questions.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
can't figure out why.
No fancy specialization is needed. Since testBit is part of the Bits class,
simply 'testBit = fastTestBit' in the instance for Integer.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
On Tuesday 27 November 2007 18:46:00 Brad Clow wrote:
I was just watching top while executing this and noticed that it
really only used one core (I am using GHC 6.8.1 on a MacBook). Does
anyone know why?
Did you compile with -threaded, and run with +RTS -N2?
Cheers,
Spencer Janssen
is automatically generated for released packages on
hackage.haskell.org.
Have I missed anything?
/M
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
/ \/ \
EFE F
That is correct, binary doesn't attempt to share substructures. If you'd like
to do this, you'll need to do it by hand.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
Data.Array.Storable? It supports the MArray
interface, and has the additional operation:
withStorableArray :: StorableArray i e - (Ptr e - IO a) - IO a
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
the definition of filterM:
filterM :: (Monad m) = (a - m Bool) - [a] - m [a]
filterM _ [] = return []
filterM p (x:xs) = do
flg - p x
ys - filterM p xs
return (if flg then x:ys else ys)
Cheers,
Spencer Janssen
___
Haskell
to tell)
The program doesn't have much chance for parallelism as written. It uses the
imperative ST monad and destructive update extensively.
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
on NDP/parrallel arrays.
There's much discussion on schemes to efficiently pack data types into
unboxed arrays.
Cheers,
Spencer Janssen
(I somewhat suspect you'd have to bake this into the compiler itself it
you wanted *arbitrary* types. Otherwise you'd have to write some special
class
,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
not have any documentation on the page, but
each identifier is a link to GHC specific modules that give more
documentation. This is a bug in Haddock: it doesn't know how to
include documentation from another package.
Cheers,
Spencer Janssen
Documentation:
http://www.haskell.org/ghc/docs/latest
98% cpu 25.831 total
63a359e5c388f2004726d83d4337f56b -
% (time ./mlray) | md5sum
./mlray 25.63s user 0.04s system 98% cpu 25.981 total
63a359e5c388f2004726d83d4337f56b -
Cheers,
Spencer Janssen
ray_pragma.dpatch
Description: Binary data
___
Haskell
-- Haskell lets us
use lists not only as a data structure, but as control structures as
well.
Also, lists or Data.Map are often close enough. Who needs a bag when
Map a Int gets the job done? What good is a heap when Data.Map
supports findMin?
Cheers,
Spencer Janssen
Does writing software in Haskell
and community resources are
available from:
http://xmonad.org
Xmonad is available from hackage, and via darcs. Happy hacking!
The Xmonad Team:
Spencer Janssen
Don Stewart
Jason Creighton
Xmonad has also received patches from:
Alec Berryman
Chris Mears
Daniel Wagner
Although then you are relying on the Monad laws more than you possibly
should. You could also have:
monady :: Monad m = m a - m a
monady x = x
do x == monady x
How about:
do x == (x :: Monad m = m a)
Or even:
do x == (asTypeOf x (return ()))
Cheers,
Spencer Janssen
with
broken compiler installers.
Byebye
FC
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
from hackage, and via darcs. Happy hacking!
The Xmonad Team:
Spencer Janssen
Don Stewart
Jason Creigh
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
the
semantics of the program.
Of course the semantics of the program will change, the order in which
the actions are executed is unknown!
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
for each. You can then check that
the parses match the expected results.
\begin{code}
knownParses :: [(String, Style)]
knownParses = ???
prop_unitTest = all (uncurry parseEq) knownParses
\end{code}
Cheers,
Spencer Janssen
I thought of the following property (thanks sjanssen)
prop_parse p
It looks like you forgot to pass a compiler flag, namely -fglasgow-exts.
Cheers,
Spencer Janssen
On Tue, 13 Mar 2007 22:20:20 -0700 (PDT)
SevenThunders [EMAIL PROTECTED] wrote:
I have the pleasure of porting a good sized Haskell application to
linux. So far the Haskell code has compiled
Yet another higher order solution:
dropWhile' p0 xs = foldr f (const []) xs $ p0
where
f y ys p | p y = ys p
| otherwise = y : ys (const False)
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
that takes 8 seconds to complete, returns
(True,4600)
Remember that Haskell is lazy -- res won't be evaluated until it is
forced. See the evaluate function in Control.Exception to force a
value in the IO monad.
Spencer Janssen
___
Haskell-Cafe
, and is also available as a
standalone package. Data.ByteString represents strings as packed
arrays of bytes, so the overhead is about 1 byte per character. This
library exhibits fantastic performance, rivaling C's speed while
maintaining the elegance of Haskell.
Cheers,
Spencer Janssen
Take this obscure function:
\begin{code}
func :: (a - a - Maybe a) - a - [a] - [a]
func f s0 xs0 = foldr (\x xs s - maybe (xs s) ((x:) . xs) (f s x))
return xs0 s0
\end{code}
And mergeGroupToList becomes:
\begin{code}
mergeGroupToList g xs = func mergeGroups g xs
\end{code}
Cheers,
Spencer
The typical way to add profiling support to a Cabal lib is to add -p
at configure time (ie runhaskell Setup.hs configure -p). Have you
tried this?
Cheers,
Spencer Janssen
On Jan 8, 2007, at 4:13 PM, Chris Eidhof wrote:
Hey all,
I'm trying to profile my application, which makes use
need to know how to find the length of Hugs array
primitives too.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I believe you're talking about the `pl' plugin for lambdabot.
Lambdabot has an offline mode, visit the homepage for the source:
http://www.cse.unsw.edu.au/~dons/lambdabot.html
There is also a web interface to lambdabot, but I can't seem to find
the link.
Cheers,
Spencer Janssen
I recommend the Edison library, which has several heap implementations.
http://www.eecs.tufts.edu/~rdocki01/edison.html
Cheers,
Spencer Janssen
On Nov 26, 2006, at 3:58 PM, Ken Takusagawa wrote:
Is there a Haskell implementation of an efficient priority queue
(probably heap-based) out
around in the wild, hopefully someone will chime in
with a code snippet soon. Also, I seem to remember that Bulat's
Streams library supports some Unicode encodings, perhaps you can
check there?
Cheers,
Spencer Janssen
On Nov 5, 2006, at 12:17 PM, Pupeno wrote:
Hello,
I am trying to make
/= 0]
Spencer Janssen
On Nov 1, 2006, at 10:49 AM, alaiyeshi wrote:
Hi
I'm new to Haskell.
I found this site on the Haskell wiki https://www.spoj.pl. But I
got some trouble on trying to solve the problem titled Prime
Generator https://www.spoj.pl/problems/PRIME1.
The online-judge system
Here's an attempt with GADTs:
\begin{code}
{-# OPTIONS_GHC -fglasgow-exts #-}
data Succ a
data Zero
data Seq a b where
Cons :: a - Seq a b - Seq a (Succ b)
Nil :: Seq a Zero
\end{code}
Seems to work for me.
Spencer Janssen
On Oct 17, 2006, at 6:37 PM, Greg Buchholz wrote:
I'm
correctly with this data declaration?
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ys)
Cheers,
Spencer Janssen
On 8/3/06, Gabriel Sztorc [EMAIL PROTECTED] wrote:
| Hello,
|
| I want to filter a list with a predicate that returns a IO value,
| something that filterM is supposed to do. The problem is, filterM
| overflows the stack for really big lists and I couldn't come up
ghci keeps the value of your last computation in a special variable
called it. Therefore, the value of your last run can't be garbage
collected until the current run is finished. Try print run or type
in a dummy expression in between runs.
Cheers,
Spencer Janssen
On 7/27/06, Jeff Polakow
I've been writing a Stringable class for my SoC project. You can
check out the code at
http://darcs.haskell.org/SoC/fps-soc/Data/Stringable.hs.
Spencer Janssen
On 7/23/06, Bulat Ziganshin [EMAIL PROTECTED] wrote:
Hello Brian,
Sunday, July 23, 2006, 1:20:36 AM, you wrote:
instance IString
(note the underscore) function, it should be a big win here.
Cheers,
Spencer Janssen
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
. I've run into this restriction several times
myself, and I'm also curious whether this will change in Haskell'.
Spencer Janssen
On 7/10/06, David Roundy [EMAIL PROTECTED] wrote:
(This email is a literate haskell program that fails to compile
without -fglasgow-exts.)
I'm sure I'm missing
)
highestBitMask :: Word32 - Word32
highestBitMask x
= case (x .|. shiftR x 1) of
x - case (x .|. shiftR x 2) of
x - case (x .|. shiftR x 4) of
x - case (x .|. shiftR x 8) of
x - case (x .|. shiftR x 16) of
x - (x `xor` (shiftR x 1))
Cheers,
Spencer Janssen
On 6/15/06
approximately the same as yours. Note
the getLinesLazily function. I've only tested that it typechecks, I
haven't run it yet.
Spencer Janssen
-- Program begins here
import System.IO
import System.IO.Unsafe (unsafeInterleaveIO)
import qualified Data.ByteString.Char8 as B
import
evaluation.
Improvements and discussion are solicited.
Feel free to include this code in your website, if you'd like.
Spencer Janssen
On 3/22/06, Per Gustafsson [EMAIL PROTECTED] wrote:
Haskell gurus,
We have made a proposal to extend the Erlang `binary' data type from
being a sequence of bytes
is still at
http://cse.unl.edu/~sjanssen/huffman.hs. The old main is left for
reference, renamed to main'.
Run time (in seconds) for 10 iterations:
O'Caml: 35.9
Old Haskell: 25.6
New Haskell: 8.8
Spencer Janssen
___
Haskell-Cafe mailing list
51 matches
Mail list logo