News aggregator

GHC 7.8.3 thread hang

glasgow-user - Tue, 11/11/2014 - 9:11am
I am trying to debug a lockup problem (and need help with debugging technique), where hang means a thread stops at a known place during evaluation, and other threads continue. The code near the problem is like: ec <- return $ encode command l <- return $ BSL.length ec ss <- return $ BSC.unpack ec It does not matter if I use let or return, or if the length is taken after unpack. I used return so I could use this code for tracing, with strictness to try to find the exact statement that is the problem: traceEventIO "sendCommand" ec <- return $ encode command traceEventIO $ "sendCommand: encoded" l <- ec `seq` return $ BSL.length ec traceEventIO $ "sendCommand: size " ++ (show l) ss <- ec `seq` return $ BSC.unpack ec When this runs, the program executes this many times, but always hangs under a certain condition. For good evaluations: 7f04173ff700: cap 0: sendCommand 7f04173ff700: cap 0: sendCommand: encoded 7f04173ff700: cap 0: sendCommand: s
Categories: Offsite Discussion

2048 - A Simple Haskell Game Server Implementation

Haskell on Reddit - Tue, 11/11/2014 - 9:01am

I built a 2048 game server in Haskell and wrote a blog about it, hope you like!

submitted by MarkMc2412
[link] [10 comments]
Categories: Incoming News

IO monads, stream handles, and type inference

haskell-cafe - Tue, 11/11/2014 - 5:09am
In the thread "Precise timing <!topic/haskell-cafe/sf8W4KBTYqQ>", in response to something ugly I was doing, Rohan Drape provided the following code: import Control.Concurrent import Control.Monad import System.IO import Sound.OSC main = withMax $ mapM_ note (cycle [1,1,2]) withMax = withTransport (openUDP "" 9000) sin0 param val = sendMessage (Message "sin0" [string param,float val]) pause = liftIO . pauseThread . (* 0.1) note n = do sin0 "frq" 300 sin0 "amp" 1 pause n sin0 "amp" 0 pause n For days I have monkeyed with it, and studied the libraries it imports, and I remain sorely confused. *How can the "a" in "IO a" be a handle?* Here are two type signatures: openUDP :: String -> Int -> IO UDP withTransport :: Transport t => IO t -> Connection t a -> IO a Rohan's code makes clear that openUDP creates a handle representing the UDP connection. openUDP's type signature indicates that its output is an "IO UDP". How can I reconcile those two facts? When I read about
Categories: Offsite Discussion

RDP 2015 Last Call for Workshops

General haskell list - Mon, 11/10/2014 - 11:53pm
[apologies for cross posting] ----------------------------------------------------------------------- RDP 2015 Last Call for Workshops (Rewriting, Deduction, and Programming, June-July 2015, Warsaw, Poland) ----------------------------------------------------------------------- RDP 2015 is the eighth edition of the International Conference on Rewriting, Deduction, and Programming, consisting of two main conferences * RTA (Rewriting Techniques and Applications) * TLCA (Typed Lambda Calculi and Applications) Previous RDPs were held in 2003 in Valencia (Spain), 2004 in Aachen (Germany), 2005 in Nara (Japan), 2007 in Paris (France), 2009 in Brasilia (Brasil), 2011 in Novi Sad (Serbia), 2013 in Eindhoven (The Netherlands). We solicit proposals for satellite workshops of RDP 2015 that are related in topics to one or both of the RDP conferences. We plan the workshops to proceed for up to 2 days (possibilities of longer workshops should be discussed with the organisers). It is tradition at RDP that attendance
Categories: Incoming News

Annotations: status and documentation

glasgow-user - Wed, 11/05/2014 - 10:21pm
I would like to be able to retrieve user-supplied annotations in Template Haskell. The 7.8 user manual doesn't mention this ability. However, I see this Trac page: Where it appears that this feature may exist in 7.8. I will gladly tinker with annotations and update the user manual if someone will help me understand what the situation is. On a related note, it looks like this patch pointed to from the Wiki page for annotations got ignored. Should i submit it to phabricator? Thanks, Greg Weber _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users< at >
Categories: Offsite Discussion

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!


Categories: Incoming News