News aggregator

InterState: A Language and Environment for Expressing Interface Behavior

Lambda the Ultimate - Tue, 07/22/2014 - 10:14pm

An interesting paper by Oney, Myers, and Brandt in this year's UIST. Abstract:

InterState is a new programming language and environment that addresses the challenges of writing and reusing user interface code. InterState represents interactive behaviors clearly and concisely using a combination of novel forms of state machines and constraints. It also introduces new language features that allow programmers to easily modularize and reuse behaviors. InterState uses a new visual notation that allows programmers to better understand and navigate their code. InterState also includes a live editor that immediately updates the running application in response to changes in the editor and vice versa to help programmers understand the state of their program. Finally, InterState can interface with code and widgets written in other languages, for example to create a user interface in InterState that communicates with a database. We evaluated the understandability of InterState’s programming primitives in a comparative laboratory study. We found that participants were twice as fast at understanding and modifying GUI components when they were implemented with InterState than when they were implemented in a conventional textual event-callback style. We evaluated InterState’s scalability with a series of benchmarks and example applications and found that it can scale to implement complex behaviors involving thousands of objects and constraints.

Categories: Offsite Discussion

Please help me out of STRING HELL!

Haskell on Reddit - Tue, 07/22/2014 - 1:46pm

Help! I am stuck in string hell!

I'm trying to implement a simple app using Happstack & HSP. I followed the crash course to get a simple version up and running with acid-state & Blaze. Now I'm going back and implementing HSP to see if I prefer that.

After about an hour and a half trying to convert HSP templates to Happstack responses, now I'm stuck on a string conversion problem (I think). I'm using OverloadedStrings (I get the feeling that's a pretty common practice in the community) and import Data.Text. When I try to pass a title as a bare string to happstack-hsp's defaultTemplate, I get an error. I've gisted the entire code file https://gist.github.com/df6813cdf6ac560c1ede. That gist also shows the error message. I've search for examples on Github, but most of them are too old or just not of any help. Can someone please point me in the right direction?

EDIT:

I've realized since opening this that the problem is not actually "string hell" as I originally thought. It's an issue with understanding the value wrapping that's going on between HSP & Happstack. Still working towards an answer but the responses so far have been very helpful. Thank you everyone.

submitted by joefiorini
[link] [22 comments]
Categories: Incoming News

Call for participation: Haskell tutorial at CUFP on4 Sep 2014

haskell-cafe - Tue, 07/22/2014 - 1:40pm
Dear Haskellers, I'll be giving an advanced Haskell tutorial as part of the CUFP 2014 workshop. * Date/time: 4 Sep 2014, 9:00 AM - 12:30 PM * Place: Gothenburg, Sweden (affiliated with ICFP 2014) * Early registration deadline: 3 Aug 2014! The tutorial teaches important techniques for writing correct, robust, scalable, and fast Haskell programs. The topics covered are: network programming, serialization, persistence, logging, performance, scalability, testing, and concurrency. The tutorial aims at programmers with some Haskell experience. It is not necessary to be an Haskell expert, but you should know how to write functions and data types. For more details, see http://cufp.org/2014/t2-stefan-wehr-haskell-in-the-real-world.html Registration page: https://regmaster4.com/2014conf/ICFP14/register.php Please distribute this call for participation. See you in Gothenburg! Stefan
Categories: Offsite Discussion

Call for participation: Haskell tutorial at CUFP on 4 Sep2014

General haskell list - Tue, 07/22/2014 - 1:39pm
Dear Haskellers, I'll be giving an advanced Haskell tutorial as part of the CUFP 2014 workshop. * Date/time: 4 Sep 2014, 9:00 AM - 12:30 PM * Place: Gothenburg, Sweden (affiliated with ICFP 2014) * Early registration deadline: 3 Aug 2014! The tutorial teaches important techniques for writing correct, robust, scalable, and fast Haskell programs. The topics covered are: network programming, serialization, persistence, logging, performance, scalability, testing, and concurrency. The tutorial aims at programmers with some Haskell experience. It is not necessary to be an Haskell expert, but you should know how to write functions and data types. For more details, see http://cufp.org/2014/t2-stefan-wehr-haskell-in-the-real-world.html Registration page: https://regmaster4.com/2014conf/ICFP14/register.php Please distribute this call for participation. See you in Gothenburg! Stefan
Categories: Incoming News

Reader monad understanding

Haskell on Reddit - Tue, 07/22/2014 - 1:26pm
Categories: Incoming News

JP Moresmau: EclipseFP 2.6.1 released!

Planet Haskell - Tue, 07/22/2014 - 10:40am
I've just released EclipseFP 2.6.1. EclipseFP is a set of Eclipse plugins for Haskell development. This is a bug fixing release, mainly for GHC 7.8 support.

Release notes can be found here.

As usual, download from http://eclipsefp.sf.net/updates.

Happy Haskell Hacking!

Categories: Offsite Blogs

Elementary algorithms - (Haskell language is used)

haskell-cafe - Tue, 07/22/2014 - 4:01am
Hi, I spent 6 years to write the book ‘Elementary Algorithms’. I finally completed it yesterday. This book is open and free, the PDF version can be downloaded from: https://github.com/liuxinyu95/AlgoXY/blob/algoxy/preview/elementary-algorithms.pdf?raw=true Why There are plenty of books about algorithms, such as ‘Introduction to algorithms’, ‘The art of computer programming’, ‘structure and interpretation of computer programs’… why another book? Is it reinvention of wheel? This book can’t compare with the above classic bibles at all. It has some features like: 1. All algorithms are described in math formulas and pseudo codes. I hope it bring some taste of elegant by using algebraic symbols. 2. All algorithms are realized in both purely functional and imperative approaches. 3. The examples are provided in multiple programming languages, including C, Haskell, Python, C++, Scheme/Lisp. Haskell is the main language for all functional implementations. Content The following content a
Categories: Offsite Discussion

Let's make takeWhile fuse!

libraries list - Tue, 07/22/2014 - 3:29am
`takeWhile` doesn't do the stream fusion thing. This definition seems to fix that, at least to a great extent. I don't know how to write the necessary rules to make this definition be used in the right places. takeWhile :: forall a . (a -> Bool) -> [a] -> [a] takeWhile p xs = build tw' where tw' :: forall b . (a -> b -> b) -> b -> b tw' kons knil = foldr go knil xs where go x rest | p x = x `kons` rest | otherwise = knil Tests (performed on 7.8.3, but the definition hasn't changed in HEAD): In the trivial main = print $ length $ takeWhile (< 10000000) [(1::Int) .. 20000000] it fused completely, allocating virtually nothing, whereas using Prelude.takeWhile (on 7.8.3) required a whopping 1,360,049,352 In the more complex main = print $ length $ filter (\x -> x `rem` 3 == 0) $ takeWhile (< 10000000) $ filter even [(1::Int) .. 20000000] it fused partially, allocating 266,716,048 bytes. The current GHC definition allocates 746,716,000 bytes in this case (
Categories: Offsite Discussion

Functional Jobs: CTO / Tech Co-Founder at Capital Match (Full-time)

Planet Haskell - Tue, 07/22/2014 - 12:27am

TL;DR: start and build the technology for a financial services marketplace in Asia. Compensation is salary plus double digit percent equity. There will be a short trial period to make sure both sides want to work with each other. Relocation to Singapore mandatory (trial could be remote and part-time).

Company

Capital Match is bringing peer-to-peer lending (basically, a marketplace for retail/institutional lenders and corporate borrowers that bypasses the banking system) to Southeast Asia, where for various reasons the US incumbents have not entered. The founders are well connected and are bringing the right contacts and background to make it happen. The company started as a traditional financier for SMEs to better understand the market as well as legal and credit aspects of the business before it would embark on the P2P model.

If you would like to learn more about the business model, here is a link explaining it from the point of view of current very successful US incumbents: http://www.foundationcapital.com/downloads/FoundationCap_MarketplaceLendingWhitepaper.pdf

Job description and compensation

The CTO will first build the marketplace, then grow the team as it gains traction. We provide the legal, financial and admin functions as well as the market research backing a high level functional spec; you just need to worry about building the product. The division of labour will be very clear: you are the final call on anything technical, and nobody will come micromanage your work.

Compensation will be a lowish middle class salary by Singapore standards and double digit percent equity, subject to a trial period. Note this is not a strictly technical business, and the marketplace problem is a relatively straightforward and well known one, with the value in the contacts and understanding of the market that goes into the functional spec. Though technology could bring a distinct value and advantage over time.

Additionally, we have eschewed raising much funding for now and most of the capital comes from the founders' personal savings (which we think is a positive signal - our interests are aligned) so don't expect Silicon Valley perks for a while. We don't have hog roasts and whisky tasting Fridays, but you get a real, founder-level stake in the company. Relocation to Singapore is primordial for the CTO, although the rest of the team you'll build can be remote. During a trial period you can work remotely and part-time.

Tech stack

Thanks to one founder's very positive experiences with the Haskell experiment at Zalora, we are very keen to use functional programming languages, especially Haskell. We are however technology agnostic ("best stack for the problem"). We have a bias towards those who prefer the relational model over NoSQL and towards open source.

Desired experience

The CV matters less than your ability to build things, so please send us any major open source project you have authored, both a link to the repo and a "basic" description targeted at the non-technical founders. We would prefer to see some financial services experience, especially on the security side, and some experience building similar products would be even better.

We want to utilize ample local government funding for high-tech start-ups so scientific / high-tech background and a post-grad degree would be preferred.

You can attempt to apply without an open source repo to your name, in that case build us a demonstration of your skills that you think reflects your ability.

Please send your application to pawel [at] capital-match [dot] com

Get information on how to apply for this position.

Categories: Offsite Blogs

Maintenance release of haskell-cgi?

libraries list - Tue, 07/22/2014 - 12:04am
Hackage trustees, haskell-cgi [1] doesn't build with ghc 7.8.3. Two pull requests exist on github [2,3] and the maintainer (cc'd) is unresponsive. Can someone do a proxy release of haskell-cgi? Thanks. [1] https://github.com/andersk/haskell-cgi [2] https://github.com/andersk/haskell-cgi/pull/7 [3] https://github.com/andersk/haskell-cgi/pull/6
Categories: Offsite Discussion

Robert Harper: Summer of Programming Languages

Planet Haskell - Mon, 07/21/2014 - 11:22pm

Having just returned from the annual Oregon Programming Languages Summer School, at which I teach every year, I am once again very impressed with the impressive growth in the technical sophistication of the field and with its ability to attract brilliant young students whose enthusiasm and idealism are inspiring.  Eugene was, as ever, an ideal setting for the summer school, providing a gorgeous setting for work and relaxation.  I was particularly glad for the numerous chances to talk with students outside of the classroom, usually over beer, and I enjoyed, as usual, the superb cycling conditions in Eugene and the surrounding countryside.  Many students commented to me that the atmosphere at the summer school is wonderful, filled with people who are passionate about programming languages research, and suffused with a spirit of cooperation and sharing of ideas.

Started by Zena Ariola a dozen years ago, this year’s instance was organized by Greg Morrisett and Amal Ahmed in consultation with Zena.  As usual, the success of the school depended critically on the dedication of Jim Allen, who has been the de facto chief operating officer since it’s inception.  Without Jim, OPLSS could not exist.  His attention to detail, and his engagement with the students are legendary.   Support from the National Science Foundation CISE Division, ACM SIGPLANMicrosoft Research, Jane Street Capital, and BAE Systems was essential for providing an excellent venue,  for supporting a roster of first-rate lecturers, and for supporting the participation of students who might otherwise not have been able to attend.  And, of course, an outstanding roster of lecturers donated their time to come to Eugene for a week to share their ideas with the students and their fellow lecturers.

The schedule of lectures is posted on the web site, all of which were taped, and are made available on the web.  In addition many speakers provided course notes, software, and other backing materials that are also available online.  So even if you were not able to attend, you can still benefit from the summer school, and perhaps feel more motivated to come next summer.  Greg and I will be organizing, in consultation with Zena.  Applying the principle “don’t fix what isn’t broken”, we do not anticipate major changes, but there is always room for improvement and the need to freshen up the content every year.  For me the central idea of the summer school is the applicability of deep theory to everyday practice.  Long a dream held by researchers such as me, these connections become more “real” every year as the theoretical abstractions of yesterday become the concrete practices of today.  It’s breathtaking to see how far we’ve come from the days when I was a student just beginning to grasp the opportunities afforded by ideas from proof theory, type theory, and category theory (the Holy Trinity) to building beautiful software systems.  No longer the abstruse fantasies of mad (computer) scientists, these ideas are the very air we breathe in PL research.  Gone are the days of ad hoc language designs done in innocence of the foundations on which they rest.  Nowadays serious industrial-strength languages are emerging that are grounded in theory and informed by practice.

Two examples have arisen just this summer, Rust (from Mozila) and Swift (from Apple), that exemplify the trend.  Although I have not had time to study them carefully, much less write serious code using them, it is evident from even a brief review of their web sites that these are serious languages that take account of the academic developments of the last couple of decades in formulating new language designs to address new classes of problems that have arisen in programming practice.  These languages are type safe, a basic criterion of sensibility, and feature sophisticated type systems that include ideas such as sum types, which have long been missing from commercial languages, or provided only in comically obtuse ways (such as objects).  The infamous null pointer mistakes have been eradicated, and the importance of pattern matching (in the sense of the ML family of languages) is finally being appreciated as the cure for Boolean blindness.  For once I can look at new industrial languages without an overwhelming sense of disappointment, but instead with optimism and enthusiasm that important ideas are finally, at long last, being recognized and adopted.  As has often been observed, it takes 25 years for an academic language idea to make it into industrial practice.  With Java it was simply the 1970’s idea of automatic storage management; with languages such as Rust and Swift we are seeing ideas from the 80’s and 90’s make their way into industrial practice.  It’s cause for celebration, and encouragement for those entering the field: the right ideas do win out in the end, one just has to have the courage to be irrelevant.

I hope to find the time to comment more meaningfully on the recent developments in practical programming languages, including Rust and Swift, but also languages such as Go and OCaml that are also making inroads into programming practice.  (I’ve had quite enough to say about Haskell for the time being, so I’ll give that one a rest, but with a tip of the hat to its enormous popularity and influence, despite my criticisms.)  But for now, let me say that the golden age of programming language research is here and now, and promises to continue indefinitely as we develop a grand unified theory of programming and mathematics.


Filed under: Programming, Research, Teaching Tagged: OPLSS14, programming languages, Rust, Swift
Categories: Offsite Blogs

OverlappingInstances-extension-like for type families

haskell-cafe - Mon, 07/21/2014 - 10:29pm
Hello haskell-café, I just started working with type families, and come with some difficulties. Now I have a class: class (...) ⇒ Complexable s where type ComplexSignalType s ... Is there a possibility to have this two instances (in any way)? instance (RealFloat e) ⇒ Complexable [e] where type ComplexSignalType [e] = [ℂ e] instance (RealFloat e) ⇒ Complexable [ℂ e] where type ComplexSignalType [ℂ e] = [ℂ e] Thanks. -- Leza Morais Lutonda, Lemol-C http://lemol.github.io 50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964 http://cujae.edu.cu _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Proposal: end lazy IO results with errors/exceptions

libraries list - Mon, 07/21/2014 - 9:16pm
Currently, withFile "foo" hGetContents >>= putStrLn prints out an empty line, the better to confuse newbies. I propose modifying the lazyRead function in GHC.IO.Handle.Text that currently reads lazyRead :: Handle -> IO String lazyRead handle = unsafeInterleaveIO $ withHandle "hGetContents" handle $ \ handle_ -> do case haType handle_ of ClosedHandle -> return (handle_, "") SemiClosedHandle -> lazyReadBuffered handle handle_ _ -> ioException (IOError (Just handle) IllegalOperation "hGetContents" "illegal handle type" Nothing Nothing) to something like lazyRead :: Handle -> IO String lazyRead handle = unsafeInterleaveIO $ withHandle "hGetContents" handle $ \ handle_ -> do case haType handle_ of ClosedHandle -> return (handle_, error "Forcing the result of a lazy read led to an attempt to read from a closed handle.") SemiClosedHandle -> lazyReadBuffered handle handle_
Categories: Offsite Discussion

TASE 2014:CALL FOR PARTICIPATION

General haskell list - Mon, 07/21/2014 - 8:45pm
****************************************************************** CALL FOR PARTICIPATION TASE 2014: 8th Theoretical Aspects of Software Engineering Symposium 1-3 September 2014, Changsha, China http://www.nudt.edu.cn/tase2014/ ****************************************************************** ---------------- OVERVIEW ---------------- Modern society is increasingly dependent on software systems that are becoming larger and more complex. This poses new challenges to the various aspects of software engineering, for instance, software dependability in trusted computing, interaction with physical components in cyber physical systems, distribution in cloud computing applications, etc. Hence, new concepts and methodologies are required to enhance the development of software engineering from theoretical aspects. TASE 2014 aims to provide a forum for people from academia and industry to communicate their latest results on theoretical advances in software engineering. TASE 2014 is the 8th in the TA
Categories: Incoming News

GHCI on ARM (Nvidia Jetson TK1)

haskell-cafe - Mon, 07/21/2014 - 8:01pm
Hi There, I would like to ask you what is the situation with ghci on arm. I bought Jetson TK1 and I am really sad that ghci does not works there. I have found mentioned somewhere that this should be fixed in 7.4.2 but still it is not. Can somebody clarify what is the situation at the moment and what are further plans? Best regards, T.
Categories: Offsite Discussion

Type family stopped compiling on upgrade from GHC 7.6.3 to 7.8.3

glasgow-user - Mon, 07/21/2014 - 6:51pm
Hi, I was experimenting a bit with type families recently and ran into a bit of an issue. Given that I don't know type families that well yet, I was wondering if I made an error somewhere. One thing is that I can't find any relevant changes in the GHC release notes for 7.8.1, .2 or .3. Maybe this code contains an error which 7.6.3 simply wasn't able to find? Thanks. --------
Categories: Offsite Discussion