News aggregator

Programming programs that program programs to simplify programming.

Haskell on Reddit - Wed, 05/07/2014 - 9:49pm

Hello, I've been recently interested in programs that can program programs for you. That is, you give it a map of input/output pairs and it gives you the source code of a program that is valid for that map. If we had something like that that worked for arbitrary programs, programming would become so much ridiculously easier that the whole field would change. In order to investigate, I made a small program that finds the definition of the (λx -> x+tan(x*x)) function from 20 input/output pairs. I was actually surprised by how fast it could find the result, but, obviously, anything much more complex than that results in a combinatory explosion.

But thinking about it, most of the functions we write in Haskell are really small. Even complex stuff that take hours to get right, such as an interpreter for the lambda calculus, could be written in as few as 3 lines. So this makes me suspect that kind of thing, with some added heuristics (genetic programming?) could actually be useful to practical jobs. So this makes me wonder, why I never heard of it? Has anyone ever tried to use and incorporate this kind of thing in their daily Haskell work? How successful (or not) was it?

submitted by SrPeixinho
[link] [8 comments]
Categories: Incoming News

OCL 2014: First Call for Papers

General haskell list - Wed, 05/07/2014 - 9:37pm
(Apologies for duplicates) CALL FOR PAPERS 14th International Workshop on OCL and Textual Modeling Applications and Case Studies (OCL 2014) Co-located with ACM/IEEE 17th International Conference on Model Driven Engineering Languages and Systems (MODELS 2014) September 28-30 (tbc), 2014, VALENCIA, SPAIN http://www.software.imdea.org/OCL2014/ Modeling started out with UML and its precursors as a graphical notation. Such visual representations enable direct intuitive capturing of reality, but some of their features are difficult to formalize and lack the level of precision required to create complete and unambiguous specifications. Limitations of the graphical notations encouraged the development of text-based modeling languages that either integrate with or replace graphical notations for modeling. Typical examples of such languages are OCL, textual MOF, Epsilon, and Alloy. Textual modeling languages have the
Categories: Incoming News

OCL 2014: First Call for Papers

haskell-cafe - Wed, 05/07/2014 - 9:37pm
(Apologies for duplicates) CALL FOR PAPERS 14th International Workshop on OCL and Textual Modeling Applications and Case Studies (OCL 2014) Co-located with ACM/IEEE 17th International Conference on Model Driven Engineering Languages and Systems (MODELS 2014) September 28-30 (tbc), 2014, VALENCIA, SPAIN http://www.software.imdea.org/OCL2014/ Modeling started out with UML and its precursors as a graphical notation. Such visual representations enable direct intuitive capturing of reality, but some of their features are difficult to formalize and lack the level of precision required to create complete and unambiguous specifications. Limitations of the graphical notations encouraged the development of text-based modeling languages that either integrate with or replace graphical notations for modeling. Typical examples of such languages are OCL, textual MOF, Epsilon, and Alloy. Textual modeling languages have the
Categories: Offsite Discussion

Edward Z. Yang: Elimination with a Motive (in Coq)

Planet Haskell - Wed, 05/07/2014 - 9:13pm

Elimination rules play an important role in computations over datatypes in proof assistants like Coq. In his paper "Elimination with a Motive", Conor McBride argued that "we should exploit a hypothesis not in terms of its immediate consequences, but in terms of the leverage it exerts on an arbitrary goal: we should give elimination a motive." In other words, proofs in a refinement setting (backwards reasoning) should use their goals to guide elimination.

I recently had the opportunity to reread this historical paper, and in the process, I thought it would be nice to port the examples to Coq. Here is the result:

http://web.mit.edu/~ezyang/Public/motive/motive.html

It's basically a short tutorial motivating John Major equality (also known as heterogenous equality.) The linked text is essentially an annotated version of the first part of the paper—I reused most of the text, adding comments here and there as necessary. The source is also available at:

http://web.mit.edu/~ezyang/Public/motive/motive.v

Categories: Offsite Blogs

Need pointer to explain CPU usage

haskell-cafe - Wed, 05/07/2014 - 8:43pm
Hello List, I have a tiny scotty-based application, which when compiled and started in profiling mode, consumes 10x CPU it does in normal mode. Interestingly, if I fire a request on the app, CPU usage drops to minimal after finishing the request for a while. But after a few minutes it starts consuming 10x CPU again. First I would have suspected scotty, however collecting time profiling info with -p, -P or -Pa doesn't reveal much. That still not rules scotty out however. To make matters worse, I inspect strange time profiling tick count I can't explain - the .prof file says "2 ticks < at > 1000 us", while the application was clearly running idle for a good few seconds. Any ideas what am I missing? Thanks, Robin
Categories: Offsite Discussion

Please, don't take it as an offence, but Cabal is terrible as a package manager, it is a serious problem about Haskell and it is about time the community does something to solve this.

Haskell on Reddit - Wed, 05/07/2014 - 2:41pm

I've been trying for months to install GHCJS to no success. Haste, Fay, many other things I try to install end up in a plain failure with terrible error messages that give you no hope to get it right. Getting anything to work with Haskell is a pain and I spent much more time installing and cleaning installs than ever coding on the language. This is completely unacceptable. Coming from Node.js, where npm install lib actually works makes me feel like I'm back to the 90's. You keep asking what is stopping Haskell from getting main adoption, and there it is. This. This is what is stopping it.

I think it is about time we unite ourselves as a community and try to solve the problem by creating an actual package manager for Haskell. And humbling ourselves to learn a lot from Node.js.

submitted by SrPeixinho
[link] [27 comments]
Categories: Incoming News

Could someone provide a shell script that will clean any existing Haskell installation and install GHC 7.8 and GHCJS in OSX Mavericks?

Haskell on Reddit - Wed, 05/07/2014 - 2:30pm

As some might even know, I've tried installing GHCJS 7.8 on OSX several times already. I've even asked this a few times here to no luck. So now what I am asking is, could someone write a sh script that will do all I need - cleaning any existing Haskell and setting GHC 7.8 with working GHCJS up on OSX? That would be really great. :(

submitted by SrPeixinho
[link] [5 comments]
Categories: Incoming News

'temporary' package

libraries list - Wed, 05/07/2014 - 8:50am
Hi Max, are you still maintaining the 'temporary' package? There's a breakage waiting to be fixed (with a patch): https://github.com/batterseapower/temporary/pull/12 If I don't hear from you in two days, I'll request maintainership and/or fork the package. Roman _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://www.haskell.org/mailman/listinfo/libraries
Categories: Offsite Discussion

I would like to add haskell-russian< at > mailing list to "User groups" wiki page

haskell-cafe - Wed, 05/07/2014 - 8:48am
Hello. Could someone add https://groups.google.com/forum/#!aboutgroup/haskell-russian ... to this wiki page http://www.haskell.org/haskellwiki/User_groups#Russia ... please? Or I could do it by myself if someone would create me an account at Haskell Wiki. Username I would like to have - eax (like < at > Hackege).
Categories: Offsite Discussion

Generalization of optional/some/many

Haskell on Reddit - Wed, 05/07/2014 - 7:44am

I was experimenting with a "sort of" generalization of optional like the following

class Constructable t where construct :: Alternative f => f a -> f (t a) instance Constructable Maybe where construct f = Just <$> f <|> pure Nothing -- with caveats below

Has anyone used this before? Does it exist elsewhere in Hackage? Hoogle didn't turn anything up.

It feels a lot like some kind of dualization of Traversable. I originally used it for generically enumerating data types:

import Data.Traversable (Traversable, sequenceA) import Data.Functor.Foldable import Data.Function (fix) import Control.Monad.Omega (runOmega) every :: (Monad f, Alternative f , Traversable (Base t) , Constructable (Base t) , Fold t ) => f t every = fix (construct . pure >=> fmap embed . sequenceA) everyInterleaved :: (Traversable (Base t), Constructable (Base t), Fold t) => [t] everyInterleaved = runOmega every

Although, if this is the way Constructable is to be used then the construct instance for Maybe does not align with what it would need to be as the base functor for Nat: using it this way produces nats too strictly

type instance Base Int = Maybe instance Unfoldable Int where embed Nothing = 0 embed (Just x) = succ x > runOmega every :: [Int] *** Exception: <<loop>>

To fix this we just have to reverse the ordering of the cases in construct

instance Constructablr Maybe where construct f = pure Nothing <|> Just <$> f

indicating that Constructable is a bit like Series in that it needs to enumerate the cases smallest first.

submitted by tel
[link] [8 comments]
Categories: Incoming News

An example of a Real World Haskell Application Architecture

Haskell on Reddit - Wed, 05/07/2014 - 7:22am

Hi there,

As there were some questions recently about how to architect a real world Haskell application, here is an example of one: Architecture of a Real World Haskell Application. Questions and Feedback welcome.

submitted by empowerg
[link] [36 comments]
Categories: Incoming News

APLAS 2014: Last CFP

General haskell list - Wed, 05/07/2014 - 4:10am
=============================================================== APLAS 2014 12th Asian Symposium on Programming Languages and Systems http://www.math.nagoya-u.ac.jp/~garrigue/APLAS2014/ 17-19 November 2014, Singapore CALL FOR PAPERS Abstracts due May 26 (full paper by June 2) =============================================================== ================ INVITED SPEAKERS ================ Zhenjiang Hu (NII, Japan) Dexter Kozen (Cornell University, USA) Julien Verlaguet (Facebook, USA) ========== 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 symposium
Categories: Incoming News

SMTP Mail server

Haskell on Reddit - Wed, 05/07/2014 - 3:32am

Is there an existing library for an SMTP mail server? I would create an SMTP server using the library to process mail messages in a custom format. But I can't use an existing mail server program like postfix because every incoming mail needs to be processed by a seperate thread and based on the format of the received mail I need to do certain things. I searched all over but couldn't find a lightweight SMTP server library although I found a few SMTP server programs similar to postfix which is not what I need.

submitted by desijays
[link] [9 comments]
Categories: Incoming News

Splicious is now accepting applications for alphauser trials

haskell-cafe - Wed, 05/07/2014 - 1:19am
Dear Haskellians and CurriedOnes, Splicious is now accepting applications for alpha user trials<http://www.splicious.net/> . To learn more about splicious, apart from that it is written in a higher-kinded functional language and makes extremely cool use of delimited continuations, please check out these links. - splicious and distributed identity<https://www.youtube.com/watch?v=Tz2pmVGgrG4> - splicious, BitCoin, content creation, curation, and sharing<https://www.youtube.com/watch?v=f700b6IHZcc> - Vlad Patryshev's review of splicious<https://www.youtube.com/watch?v=nRmu9-AL2OM> - The specialK white paper<https://docs.google.com/document/d/1aM5OIJWOyW89rHdUg6d9-YVbItdtxxiosP_fXZQaRdg/edit#> - A link to our crowd funding site<http://www.rockethub.com/projects/42500-splicious> Love to all, --greg
Categories: Offsite Discussion

A Haskell Reading List

del.icio.us/haskell - Tue, 05/06/2014 - 10:03pm
Categories: Offsite Blogs

How do you find the definition a function when all you have is a huge set of input/output pairs?

Haskell on Reddit - Tue, 05/06/2014 - 8:39pm

Suppose that you were given a list of input/ouput pairs:

f 0 = 0 f 1 = 2 f 2 = 1 f 3 = -1 f 4 = 0 f 5 = 0 f 6 = -76 f 7 = -3 f 8 = 3 f 9 = -1 f 10 = -1 f 11 = -6 f 12 = -1 f 13 = -1 f 14 = 4 f 15 = -2 f 16 = -10 f 17 = 0 f 18 = 0 f 19 = -1 f 20 = 2 f 21 = 3 f 22 = 0 f 23 = 4 f 24 = 2 f 25 = -1 f 26 = 0 f 27 = 0 f 28 = -4 f 29 = -2 f 30 = -14

Now suppose you were asked to find the definition of f. How would you do it? Spoil.

submitted by SrPeixinho
[link] [18 comments]
Categories: Incoming News