[Haskell-cafe] New Functional Programming Job Opportunities

2013-09-08 Thread Functional Jobs
Here are some functional programming job opportunities that were posted
recently:

Haskell Programmer at Zalora Southeast Asia
http://functionaljobs.com/jobs/8645-haskell-programmer-at-zalora-southeast-asia

Cheers,
Sean Murphy
FunctionalJobs.com


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] FLTK GUI Binding in progress. Call for participation.

2013-09-08 Thread John Lask

On 9/09/2013 7:09 AM, aditya siram wrote:

Hi all,
I'm working on a FLTK [1] GUI binding [2]. The attraction of FLTK is that


there is an existing binding on hackage:

"hs-fltk library: Binding to GUI library FLTK"


which I understand is quite serviceable. Perhaps effort could be 
directed on making improvements (should they be required) to this rather 
than duplicating existing functionality.




___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: unix-bytestring 0.3.7

2013-09-08 Thread wren ng thornton

-- unix-bytestring 0.3.7


The unix-bytestring package offers a full selection of Unix/Posix-specific
functions for reading and writing ByteStrings to Fds.



-- Changes (since 0.3.4)


Most of the changes are for portability with newer versions of GHC, though
the 0.3.7 release corrects a major bug on certain systems. I'd like to
thank John Lato, Kazu Yamamoto, and Gergely Risko for their help with
these patches.

0.3.5 (2011-06-29):
- System.Posix.IO.ByteString: added fdSeek, tryFdSeek.
- Foreign.C.Error.Safe: added.

0.3.5.3 (2012-02-21):
- Foreign.C.Error.Safe: changed (Num a) to (Eq a, Num a) for
  GHC 7.4

0.3.5.4 (2012-08-23):
- System.Posix.IO.ByteString: adjusted some imports for GHC 7.6
- Removed the custom Setup.hs, for compatibility with GHC 7.6

0.3.6 (2013-05-29):
- System.Posix.Types.Iovec: adjusted unsafeForeignPtrToPtr for
  GHC 7.8

0.3.7 (2013-08-08):
- System.Posix.IO.ByteString: corrected a bug in fdSeek and tryFdSeek
where the return value was always 0 on largefile i686 systems due to
the underlying C function being (undocumentedly) implemented as a
macrocall. This had been fixed in unix-2.6.0.1, and I've just
backported their fix, cf:

*

*




-- Links


Homepage:
http://code.haskell.org/~wren/

Hackage:
http://hackage.haskell.org/package/unix-bytestring

Darcs:
http://community.haskell.org/~wren/unix-bytestring

Haddock (Darcs version):

http://community.haskell.org/~wren/unix-bytestring/dist/doc/html/unix-bytestring/

-- 
Live well,
~wren


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Impredicative types and Lens?

2013-09-08 Thread Edward Kmett
You can't write that lens by hand, so it isn't surprising that the template
haskell can't generate it either. =)

ImpredicativeTypes don't work all that well.

-Edward


On Sun, Sep 8, 2013 at 9:49 AM, Artyom Kazak  wrote:

> Here’s a small example, which, when compiled, gives an error. Why?
>
> {-# LANGUAGE FlexibleInstances, ImpredicativeTypes,
>  TemplateHaskell #-}
>
> import Control.Lens
>
> class Item a where
>   name :: a -> String
>
> instance Item (String, Int) where
>   name = fst
>
> type ItemFilter = Item a => a -> Bool
>
> data ItemBox = ItemBox { _itemFilter :: ItemFilter }
> makeLenses ''ItemBox
>
> The error is
>
> Couldn't match type `a0 -> Bool'
>   with `forall a. Item a => a -> Bool'
> Expected type: ItemFilter
>   Actual type: a0 -> Bool
> In the expression: b_aaZE
> In the first argument of `iso', namely
>   `\ (ItemBox b_aaZE) -> b_aaZE'
> In the expression: iso (\ (ItemBox b_aaZE) -> b_aaZE) ItemBox
>
> I’m using GHC 7.6.2, if it’s important.
>
> __**_
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] FLTK GUI Binding in progress. Call for participation.

2013-09-08 Thread aditya siram
Hi all,
I'm working on a FLTK [1] GUI binding [2]. The attraction of FLTK is that
it is portable across many platforms, meaning it is easy to:
1. provide a binary for your application that works without installing
anything else. eg. no need to install X on Mac. Just double-click!
2. develop on other platforms because both the library and the bindings
have few dependencies and compile from scratch without a fuss.
3. provide native solutions that don't require the browser.

To my knowledge no current bindings have all those advantages.

Most of the work of wrapping the C++ in C is done and a number of the
examples that ship with FLTK have been ported to C and seem to be
compatible.

I have only just started the Haskell bindings.

This is a great time to:
1. help with the low-level porting. Most of it is just busy work.
2. significantly influence what the Haskelly abstraction layer will look
like.
3. tell me if I'm doing something wrong in the C/C++ code. I'm a newbie to
both languages. I've learned what I needed to know to get this far.

Thanks for your attention.
-deech

[1] http://www.fltk.org/index.php
[2] http://github.com/deech/fltkhs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: set-cover solves Sudoku, Soma cube, 8 Queens etc.

2013-09-08 Thread Johannes Waldmann
Henning Thielemann  henning-thielemann.de> writes:

> .. package set-cover for solving exact set cover problems.
> http://hackage.haskell.org/package/set-cover

It's hard to evaluate whether one could use the library
because there's essentially no visible documentation.

E.g., what does Math.SetCover.Exact.search do?
Its type refers to "State" which seems implementation-dependent,
and hides the connection to the specification of the set cover problem.

Putting some text and examples into the haddocks might help.
But of course putting the specification there would be even better.

Also, care to explain what algorithm  your solver uses,
and give some performance data (e.g., N-queens for N=10,20,40,..)?

- J.W.



signature.asc
Description: OpenPGP digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Impredicative types and Lens?

2013-09-08 Thread Artyom Kazak

Here’s a small example, which, when compiled, gives an error. Why?

{-# LANGUAGE FlexibleInstances, ImpredicativeTypes,
 TemplateHaskell #-}

import Control.Lens

class Item a where
  name :: a -> String

instance Item (String, Int) where
  name = fst

type ItemFilter = Item a => a -> Bool

data ItemBox = ItemBox { _itemFilter :: ItemFilter }
makeLenses ''ItemBox

The error is

Couldn't match type `a0 -> Bool'
  with `forall a. Item a => a -> Bool'
Expected type: ItemFilter
  Actual type: a0 -> Bool
In the expression: b_aaZE
In the first argument of `iso', namely
  `\ (ItemBox b_aaZE) -> b_aaZE'
In the expression: iso (\ (ItemBox b_aaZE) -> b_aaZE) ItemBox

I’m using GHC 7.6.2, if it’s important.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe