News aggregator

ANNOUNCE: BOB Conference 2015 Berlin

haskell-cafe - Fri, 08/15/2014 - 2:58pm
BOB Conference 2015 Berlin 23.1.2015 http://bobkonf.de/2015/ CALL FOR CONTRIBUTIONS English: http://bobkonf.de/2015/cfp.html German: http://bobkonf.de/2015/cfp.html Deadline: September 30, 2014 You drive advanced software engineering methods, implement ambitious architectures and are open to cutting-edge innovation? Attend this conference, meet people that share your goals, and get to know the best software tools and technologies available today. We strive to offer you a day full of new experiences and impressions that you can use to immediately improve your daily life as a software developer. If you share our vision and want to contribute, submit a proposal for a talk or tutorial! We are looking for talks about best-of-breed software technology, e.g.: - functional programming - reactive programming - micro-service architec
Categories: Offsite Discussion

Functional Programming Job Opportunities

haskell-cafe - Fri, 08/15/2014 - 2:38pm
The Risk & Analytics team at Barclays currently has opportunities for functional programmers with experience of investment banking technology and quantitative analytics. If you're interested, please contact me (stephen dot t dot west at barclays dot com). Regards, Stephen. _______________________________________________ This message is for information purposes only, it is not a recommendation, advice, offer or solicitation to buy or sell a product or service nor an official confirmation of any transaction. It is directed at persons who are professionals and is not intended for retail customer use. Intended for recipient only. This message is subject to the terms at: www.barclays.com/emaildisclaimer. For important disclosures, please see: www.barclays.com/salesandtradingdisclaimer regarding market commentary from Barclays Sales and/or Trading, who are active market participants; and in respect of Barclays Research, including disclosures relating to specific issuers, please see http://publicresear
Categories: Offsite Discussion

Using `jack` on Windows, sounds realistic?

haskell-cafe - Fri, 08/15/2014 - 12:56pm
Hi all, I've been recently used the great `jack` library from Henning Thielemann (cc'ed) on my linux computer. It work like a charm, but I was wondering about Windows support? As I see Jack run on windows, I'm hoping I might be able to build my haskell application that use `jack` on windows as well, is that realistic? anyone have tried already? Thanks in advance Note: I plan to have an other backend using 'portaudio', which would allow me to be cross-platform anyway... but using Jack bring ASIO support, which is really need for my use case (real time synthesizer).
Categories: Offsite Discussion

Ken T Takusagawa: [leuzkdqp] Units

Planet Haskell - Fri, 08/15/2014 - 12:39pm

Some notes on dimensional quantities and type systems:

Addition, subtraction, assignment, and comparison should fail if the units are incompatible.

Multiplication, division, and exponentiation by a rational dimensionless power always work.  These operations assume commutativity.

Distinguishing addition from multiplication vaguely reminds me of the difference between floating point and fixed point.

Unit conversion: a quantity can be read in one set of units then shown in another set.  Abstractly it does not exist as a real number in either.

Converting between different families of units requires exact linear algebra on rational numbers.

In some functions, units pass through just fine.  Others, e.g., trigonometric, require dimensionless numbers.

Not all dimensionless numbers are the same unit: adding an angle to the fine structure constant seems as meaningless as adding a foot to a volt.  But multiplying them could be reasonable.

One can take any compound type with a dimensionless internal type and turn it into a new compound type with that internal type having units.  But should this be considered a "new" type?  Of course, this is useless unless the internal type defined arithmetic operations: "True" miles per hour seems meaningless.

Creating such compound types is analogous to the "function" idea above by viewing a compound type as a data constructor function of a base type.  Constructors do not do operations which can fail, like addition, so the function always succeeds.

Creating a list populated by successive time derivatives of position seems like a useful thing to be able do.  But every element of the list will have different dimensions, which violates the naive idea of a list being items all of the same type.

We would like to catch all dimensionality errors at compile time, but this may not be possible.  The extreme example would be implementing the "units" program.  Is that an anomaly?

It is OK to add a vector to a coordinate (which has an origin) but not a coordinate to a coordinate.  There seems to be a concept of units and "delta" units.

It is OK to subtract coordinates to get a delta.

Maybe multiplying coordinates is also illegal.

Coordinates versus vectors, units versus delta units, seems like an orthogonal problem to "regular" units.  Separate them in software so one can use either concept independently, for example, distinguishing dimensionless from delta dimensionless.

Go further than just "delta" to distinguish first, second, etc., differences.

An X component and Y component of a vector might have the same units, say, length, but one wants to avoid adding them, as this is typically a typo.  But sometimes, for rotations, one does add them.

A Haskell Wiki page: http://www.haskell.org/haskellwiki/Physical_units. The units package seems promising.

Categories: Offsite Blogs

[PROPOSAL] Add `FiniteBits(count{Leading,Trailing}Zeros)`

libraries list - Fri, 08/15/2014 - 9:22am
Hello *, As GHC 7.10.1 will have support for new assembler-optimized CLZ & CTZ[1] primops[2], it'd be useful to provide also a convenient high-level interface to avoid having to work with -XMagicHash and unboxed values. To this end, I hereby propose to add two new methods to the 'FiniteBits' class, specifically class Bits b => FiniteBits b where {- ... -} countLeadingZeros :: b -> Int countLeadingZeros x = (w-1) - go (w-1) where go i | i < 0 = i -- no bit set | testBit x i = i | otherwise = go (i-1) w = finiteBitSize x countTrailingZeros :: b -> Int countTrailingZeros x = go 0 where go i | i >= w = i | testBit x i = i | otherwise = go (i+1) w = finiteBitSize x The full patch (including Haddock doc-strings) is available for code review at https://phabricator.haskell.org/D158 I suggest to try to keep the discussion/voting/bikeshedding about the proposal proper here
Categories: Offsite Discussion

APLAS 2014: Call for Posters and Demo

General haskell list - Fri, 08/15/2014 - 6:24am
?(Apologies for multiple copies.) Call for Posters and Demos: APLAS 2014 12th Asian Symposium on Programming Languages and Systems November 17-19, 2014 Singapore http://www.math.nagoya-u.ac.jp/~garrigue/APLAS2014/ Submission due: 15 September 2014 (Monday), 23:59 GMT Notification: 22 September 2014 (Monday) ========== BACKGROUND ========== APLAS aims to stimulate programming language research by providing a forum for the presentation of latest results and the exchange of ideas in programming languages and systems. APLAS is based in Asia, but is an international forum that serves the worldwide programming language community. APLAS is sponsored by the Asian Association for Foundation of Software (AAFS) founded by Asian researchers in cooperation with many researchers from Europe and the USA. Past APLAS symposiums were successfully held in Melbourne ('13), Kyoto ('12), Kenting ('11), Shanghai ('10), Seoul ('09), Bangalore (
Categories: Incoming News

Asking for help on MVC, pure Models and IO. Partially related to the mvc library.

Haskell on Reddit - Fri, 08/15/2014 - 4:00am

Hello,

I'm currently writing a small program based upon the MVC pattern. I noticed that many of my design choices in terms of Controller => Model => View resemble the mvc library. However, I have a problem which I don't know how to solve. I tried to get some hints from the mvc library, but from what I understand I would face the same problem there, too. The problem goes as follows.

This should be window management system. The Model is a representation of all windows as clients. A Client contains the window id and additional information like coordinates, size and maybe title, etc. Controllers produce events and Views draw or render the Model.

A Controller produces an event, notifying that a window was created. This event includes x and y coordinates as well as width and height. Now I can wrap this window into a client and add it to the model purely. However, for deciding if I should add the window I need to do an impure query. In addition, for client information like the title I also need impure methods.

I came up with some solutions but in my opinion they are all unsatisfactory:

  • Allow IO for modifying the Model
  • Use the Interpreter pattern to purify the Model and still get IO
  • Work around the issue by having the Views decide which Client should be drawed and which additional information needs to be gathered (defies the idea of using the Model to cache information instead of querying it every time)
  • Give up on the Model entirely and abstract the Controller using the Interpreter pattern. The Interpreter would then become the View.
    Downside: Every Controller would have to keep a Model on its own if necessary possibly duplicating some code.

I'm a bit at a loss here. Having a pure Model is nice and makes sense, there are practical needs for impure IO. How could I improve this?

submitted by jrk-
[link] [5 comments]
Categories: Incoming News

HaskellWiki page about SDL

haskell-cafe - Thu, 08/14/2014 - 11:43pm
L.S., Does the problem with SDL on OS X, as mentioned on the HaskellWiki page about SDL[0], still exist? This text is quite old and I would like to remove it. Regards, Henk-Jan van Tuyl [0] https://www.haskell.org/haskellwiki/SDL#Haskell-SDL_with_Mac_OS_X
Categories: Offsite Discussion

maintainer needed: extensible-effects

haskell-cafe - Thu, 08/14/2014 - 7:33pm
Hey cafe, is there anybody interested in taking over maintainership of the extensible-effects package? I'm rather busy and not keeping a good eye on it. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Cannot install the Haskell Platform on GNU/Linux (possible Cabal issue)

haskell-cafe - Thu, 08/14/2014 - 7:00pm
Hello guys, I cannot install the Haskell Platform 2014.2.0.0 on my GNU/Linux system: $ ./platform.sh \ > --prefix=/opt/haskell-platform/haskell-platform-2014.2.0.0 \ > ../ghc-7.8.3/ghc-7.8.3-i386-unknown-linux.tar.bz2 Warning: The following packages are likely to be broken by the reinstalls: haskell-platform-2013.2.0.0 Use --force-reinstalls if you want to install anyway. === pre-requisite packages for hptool are not installed run the following: cd hptool ; cabal install --only-dependencies However, the dependencies for *hptool* are already installed: $ cd hptool ; cabal install --only-dependencies Resolving dependencies... All the requested packages are already installed: Use --reinstall if you want to reinstall anyway. The existing Haskell system: - GHC 7.6.3 - Haskell Platform 2013.2.0.0 - cabal-install 1.16.0.2 (using Cabal library 1.16.0) Any help? Thank you.
Categories: Offsite Discussion

haskell (and beyond) in education

haskell-cafe - Thu, 08/14/2014 - 6:29pm
I am collecting some data on FP used to introduce programming ie as a first course: http://blog.languager.org/2014/08/universities-starting-functional.html Naturally the haskell link is the first: http://www.haskell.org/haskellwiki/Haskell_in_education I was just wondering if there are more extremal cases of this: eg Are there any univs using Idris/Agda to *introduce* programming/math/proofs etc _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

'import ccall unsafe' and parallelism

glasgow-user - Thu, 08/14/2014 - 4:54pm
Greetings everybody, I happen to be a bit confused with regards to unsafe foreign imports and parallelism. Assume the following C function: foreign import ccall unsafe "cfun" cfun :: CInt -> IO () Now, cfun does some work: go xs = unsafePerformIO $ do forM_ xs $ cfun return $ somethingUnhealthy And I'd like to parallelize this: parMap rdeepseq go [costly,costly] However, due to the way ghc handles unsafe imports, namely block everything else whenever 'cfun' is called, I happen to have only one active 'go'. Lets assume 'cfun' is cheap and would suffer from 'ccall safe' more than I'd be willing to pay. Is there any fix possible? Viele Gruesse, Christian PS: The real problem happens to use a bunch of different judy arrays, each of which lives in its on thread; 300 judy arrays, 300 threads, each up to 20 million inserts. But I think the basic problem can be reduced to "how to parallelize 'ccall unsafe's. _______________________________________________ Glasgow-haskell-users mailing list Glasgow-h
Categories: Offsite Discussion

Haskell Freecell Library

Haskell on Reddit - Thu, 08/14/2014 - 3:22pm

I created a library for playing freecell in Haskell. It includes a rudimentary solver that works (some of the time!). Improvements are welcome. You can also, of course, use it just to play text-based freecell (more fun than you think).

Be gentle, please, I'm new.

https://github.com/tdees40/Freecell

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

Haskell SDL2 FRP games working on Android

haskell-cafe - Thu, 08/14/2014 - 1:45pm
Hi Café Answering recent questions posted on this list regarding FRP, I would like to announce that we have a working Android game written in Haskell, using SDL2 and Yampa. A short article describing the implications that this could have, together the libraries and backend we used, is here: http://keera.co.uk/blog/2014/08/13/most-inspiring-green-screen-you-will-ever-see/ Changes made to existing libraries will be published as we move towards releasing the game on Google Play, and so will examples of Android programs written in Haskell. All the best Ivan
Categories: Offsite Discussion

Understanding ((->) r) as a functor.

Haskell on Reddit - Thu, 08/14/2014 - 1:29pm

I'm reading "learn you a haskell" and after the chapter on applicative functors I had some confusion:

In haskell the Functor instance of ( (->) r) is defined as:

instance Functor ((->) r) where fmap f g = (\x -> f (g x))

A category is a set of objects K along together with a set of morphisms M (K,M). As far as I understand it a Functor is a categorical homomorphism. So The set of all functions along together with functional composition should be a homomorphism between a category.

I'm assuming in this category, kinds of type * are the objects and the morphisms are normal Haskell functions.

As far as I can gather (->) is considered to be the morphism between objects (since a->b still has kind *) and functional composition is the morphism between functions. However this doesn't make much since to me. Since in this case the set ( ((->) r), <$> ) would be the Functor, not the set of functions. ((->) r) is something completely different and separate from functions? It's obviously a Funtor, but why the claim "Functions ARE functors" makes sense is still beyond me. To me, Functions are morphisms of a category who's Functor is the type class associated with functions. You don't call (Just 5) a functor, you call Maybe a functor.

What am I missing? If someone could explain this to me like I was 5, no 3, I would be extremely happy.

submitted by yyttr3
[link] [4 comments]
Categories: Incoming News