News aggregator

STM interfacing with GLFW

haskell-cafe - Sat, 12/07/2013 - 11:35pm
Hi, I'm new to STM and to Haskell in general. I've been writing a small library to try some graphics algorithms in Haskell, but using GLFW's callbacks seems to be causing me problems. I have a (relatively heavyweight?) object wrapped in a TVar (Data.Set) that I'm sharing across all threads. Unfortunately, once I run the program, it becomes unresponsive although the main loop is still running. I'm not sure exactly what the semantics are for getting STM right, but ideally I'm trying to modify the TVar in GLFW event callbacks and then finally read out the value of the TVar at the end (or beginning) of my rendering loop. I've been able to get a small program working that reproduces my problem: Any help would be great! Thanks! - Pavel _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

Pull request for inclusion in `unix' module of fsync(2), fdatasync(2), posix_fadvise(2) and posix_fallocate(2)

libraries list - Sat, 12/07/2013 - 9:20pm
Hi, Please review this pull request: If you find interesting this patch, then: git pull file-utils /Ricardo
Categories: Offsite Discussion

converting between a Ptr a and an Integer

haskell-cafe - Sat, 12/07/2013 - 7:58pm
Hi, is there any way to convert between a Ptr a and an Integer? (I would like to attach to shared memory and dereference pointers to certain memory addresses, as you would do in C.) If there is no way at all, I think I could still get along by defining c_shmat as c_shmat :: CInt -> CInt -> CInt -> IO (Ptr a) and perform calculations using plusPtr, but then how do I check if I got back the correct address, and not (void *) -1, which is what shmat returns on error? Any help very much appreciated! Thanks Sigrid
Categories: Offsite Discussion

cabal: question on compiling build prerequisites

libraries list - Sat, 12/07/2013 - 5:31am
This may be a silly question, but I can't seem to find the answer in the documentation. I would like to create a Cabal package where some of the source files use a custom pre-processor. The pre-processor is itself a Haskell program, let's say MyPreProc.hs in the package's root directory. I figured out how to activate the preprocessor, for example, cabal build --ghc-options="-F -pgmF ./MyPreProc" I also figured out how to achieve the same effect using hooks. However, there is one problem: how can I tell cabal to actually compile MyPreProc.hs before any of the commands using the preprocessor are run? The package's Setup.hs file is automatically compiled during "cabal configure". I would like MyPreProc.hs to be compiled at the same time as well - or at least some time before the proprocessor needs to be used. The .cabal file contains all kinds of related variables, such as "build-depends" (but only packages can be listed here, not programs to be compiled), "other-modules" (but these modules would already
Categories: Offsite Discussion

BX 2014: Paper deadline extended

General haskell list - Thu, 12/05/2013 - 4:39pm
Third International Workshop on Bidirectional Transformations (BX 2014) *Deadline extended due to many requests. Original deadline became abstract deadline.* Friday March 28th, 2014 Athens, Greece co-located with EDBT/ICDT 2014 Web site: Submission site: Paper length: 3-8 pages, ACM format. In-progress work is highly encouraged, if limited to 4 pages. Bidirectional transformations (bx) are a mechanism for maintaining the consistency of at least two related sources of information. Such sources can be relational data, software models, documents, graphs, trees, and so on. BX are an emerging topic in a wide range of research areas with prominent presence at top conferences in different fields. However, much of the research in bx tends to get limited exposure outside of a single field of study. The purpose of this workshop series is not only to further research into bx, but to promote cross-disciplinary resea
Categories: Incoming News

Post for Haskellers Mail List

General haskell list - Thu, 12/05/2013 - 11:10am
Good morning, I would like to post the below to the Haskell Mail List: HASKELLERS REQUIRED!! Career Opportunities in Cambridge (UK) I am currently hiring for Senior Software Engineers, Principal Software Engineers and Software Architects with proficiency in Haskell programming. This is a fantastic opportunity to join a global, world-leading technology business working on cutting-edge product development in the field of HPC and Big Data. Packages are highly flexible to attract the best talent. For more information - get in touch with Katy Ovens on 02392 322 308 or send a message to kovens< at > Katy Ovens , CertRP Lead Account Manager - Engineering 023 9232 2308 07511 011 918 kovens< at > 1 Quay Point, Northarbour Road, Portsmouth, PO6 3TD, UK - Join our social networks:!/STR_Group All detailed pricing models wi
Categories: Incoming News

Proposal: Add a strict version of <$> for monads

libraries list - Fri, 11/29/2013 - 2:07pm
Hi all, I propose we add a strict version of <$> to base: -- | A strict version of 'Data.Functor.<$>' for monads. (<$!>) :: Monad m => (a -> b) -> m a -> m b f <$!> m = do a <- m return $! f a {-# INLINE (<$!>) #-} infixl 4 <$!> It works on Monads instead of Functors as required by us inspecting the argument. This version is highly convenient if you want to work with functors/applicatives in e.g. parser and avoid spurious thunks at the same time. I realized that it was needed while fixing large space usage (but not space-leak) issues in cassava. I believe Edward Kmett discovered the need for it independently as well. Deadline: 3 weeks Cheers, Johan _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

role signatures in libraries

libraries list - Wed, 11/27/2013 - 8:05pm
Hi libraries, It seems that the syntax and semantics of role annotations has settled, and so it's time to add role annotations to various libraries. Here are the key ideas: tl;dr: Add nominal role annotations for abstract datatypes whose data has an invariant based on a class instance. Set and Map are top candidates. - We have three notions of equality: nominal, representational, and phantom. - Type equality as we know it is called *nominal*. - A newtype is considered *representationally* equal to its representation type. * Thus, if we have `newtype Age = MkAge Int`, `Age` and `Int` are representationally equal. - Any two types are "phantomly" equal. * See below for an illustrative example of why this notion is useful. - Every type parameter of every datatype and class is assigned a role. A parameter's role says what notion of equality must hold to show that two instantiations of the datatype are representationally equal. * Say we have `Bar a` where a's role is nominal. That means that `Bar A
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