News aggregator

"Cogito, ergo sum"

Haskell on Reddit - Thu, 04/23/2015 - 1:48am

I am not a number: I am a free variable. -- Conor McBride

I am not a free variable, I am a free monad! -- Edward Kmett

Wikipedia states:

Informally, a free object over a set A can be thought as being a "generic" algebraic structure over A: the only equations that hold between elements of the free object are those that follow from the defining axioms of the algebraic structure.

Let (C,F) be a concrete category (i.e. F: C → Set is a faithful functor), let X be a set (called basis), A ∈ C an object, and i: X → F(A) a map between sets (called canonical injection). We say that A is the free object on X (with respect to i) if and only if they satisfy this universal property:

for any object B and any map between sets f: X → F(B), there exists a unique morphism g: A → B such that f = F(g) o i.

In this way the free functor that builds the free object A from the set X becomes left adjoint to the forgetful functor.

There are several ideas running interleaved through my head at the moment (in no particular order):

  • Vectors, lists, trees, complex numbers, "7 trees in one"
  • Combinatorial species, calculi, "programming" languages
  • Conor's answer about cursors and comonads [1] (and his thesis...)
  • Monads joining, duplicating, returning, (aka "binding"), extracting (aka "cojoining"), Clowns and Jokers, Leibniz (and "Triples" :P)
  • Adjoints, adjucnctions, holes, continuations, representations, Yoneda, Kan extensions, machines, and homotopy
  • "All concepts are Kan extensions"
  • Points, lines, circles, Euclid and Cartesian-ness
  • Completeness, incompleteness, and causality
  • Logic, type theory, syntax, semantics, Truth, and communication
  • Peter Hancock's "AMEN" paper, logarithms, Church Numeral / Turing Machine duality, specifically "And so, lambda-calculus and Turing machine are duals: In a (universal) TM, an integer encodes an operation. In lambda-calculus, an operation encodes an integer." Numerals and lists in lambda-calculus: P-numerals
  • Church vs. Curry typing and other paradigmatic "dualities"
  • Lawvere's fixed point theorem, Yanofsky's exposition, and "heterological"
  • Lenses, prisms, isos, traversals, and telescopes.
  • What the Tortoise said to Achilles.
  • Terminology is a minefield
  • How, where, when, why, to what, to who any of these things matter (theoretically, pedagogically, and practically) and their "connections"?
  • Whether this is all just a bunch of abstract nonsense and should forget about it?
  • Much else
  • Last, but certainly not least, bad puns :)

Just thinking out loud... Other than that, just thought I would stop by and say hello. I'll be updating with other references if anyone else is interested. Anyhow, back to the trenches.

[1]: Writing cojoin or cobind for n-dimensional grid type "Jagger/Richards: you can't always get what you want, but if you try sometime you just might find that you get what you need."

submitted by ShadowyOrdeal
[link] [1 comment]
Categories: Incoming News

Python anti-patterns are mostly all solved by Haskell

Haskell on Reddit - Thu, 04/23/2015 - 12:27am

I ran across this in /r/python today:

http://www.reddit.com/r/Python/comments/33h964/the_little_book_of_python_antipatterns/

I thought it was a very good collection of anti-patterns. But I also realized that the vast majority of those anti-patterns, the bits of code you should not write, are impossible to write in Haskell, and this made me feel a bit smug.

This is not really news, because static typing solves so many problems that duck-typed languages create. But some of the items that stood out to me were:

You can educate your developers to avoid these anti-patterns, or you could use just use a statically typed language and have the type checker enforce these rules for you.

It blows my mind that anyone would even consider using Python for large software projects, or anything apart from simple ad-hoc scripting to automate simple day-to-day tasks.

submitted by Ramin_HAL9001
[link] [14 comments]
Categories: Incoming News

Do you consider functions violating "x==y implies f(x)==f(y)" a bug?

Haskell on Reddit - Thu, 04/23/2015 - 12:25am

For example, Data.HashSet's toList can return different orders of values for sets s1 and s2 where s1==s2 is true, if set elements with identical hash values are inserted into s1 in a different order than they are inserted into s2. See the section "Example 3" for a sample session (after the corresponding one for Clojure).

In chatting with a few Haskell developers, some consider this a bug. At least for Data.HashSet's toList, it seems to me the easiest 'bug fix' would be to eliminate toList completely, unless a total order is given for the set elements.

Chris Okasaki's Edison library takes the approach of including functions violating this property, but documents them as ambiguous ("Notes on ambiguous functions" section here).

I am curious to hear reasons for considering this kind of behavior a bug to be eliminated, versus the approach of documenting it.

submitted by jafingerhut
[link] [96 comments]
Categories: Incoming News

What databases are most Haskellers using?

Haskell on Reddit - Wed, 04/22/2015 - 10:50pm

Are there any that stand out as the most well supported and actively used? My recent dive into Haskell has caused me to wonder if the community has a tendency to use a certain database / subset of databases.

Update

It seems like PostgreSQL is definitely a top pick. What about NoSQL?

submitted by broma0
[link] [39 comments]
Categories: Incoming News

Timeout on pure code

haskell-cafe - Wed, 04/22/2015 - 5:14pm
Hi! Our company's main commercial product is a Snap-based web app which we compile with GHC 7.8.4. It works on four app-servers currently load-balanced behind Haproxy. I recently implemented a new piece of functionality, which led to weird behavior which I have no idea how to debug, so I'm asking here for help and ideas! The new functionality is this: on specific url-handler, we need to query n external services concurrently with a timeout, gather and render results. Easy (in Haskell)! The implementation looks, as you might imagine, something like this (sorry for almost-real-haskell, I'm sure I forgot tons of imports and other things, but I hope everything is clear as-is, if not -- I'll be glad to update gist to make things more specific): https://gist.github.com/k-bx/0cf7035aaf1ad6306e76 Now, this works wonderful for some time, and in logs I can see both, successful fetches of external-content, and also lots of timeouts from our external providers. Life is good. But! After several days of work (somet
Categories: Offsite Discussion

Is there any radical rewrite of the Prelude?

Haskell on Reddit - Wed, 04/22/2015 - 2:41pm

I've checked Classy-Prelude but seems like it favors backwards compatibility instead of robustness, declaring typeclasses for namespacing purposes instead of "fixing" them by defining properly polymorphic functions.

I'm interested in a more radical, fully-generic rewrite of the Prelude, in which functions are as generic as they can be.

Does such a thing exist?

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

Associate Professorship in Data Science at Oxford(Continuing Education)

General haskell list - Wed, 04/22/2015 - 1:50pm
ASSOCIATE PROFESSORSHIP IN DATA SCIENCE DEPARTMENT OF CONTINUING EDUCATION UNIVERSITY OF OXFORD Grade 36S: £44,620 - £59,914 p.a. (pro rata) The University is seeking to appoint an Associate Professor in Data Science, to commence in October 2015 or as soon as possible thereafter. The post will be held in the Department for Continuing Education, University of Oxford. The postholder will benefit from a fellowship at Linacre College. The successful candidate must have a doctorate in data science or a cognate field, with a proven high standard of expertise in data science and appropriate knowledge of computer science, demonstrable experience of teaching and organising data science or similar programmes at university level, a proven record of research and publication, including evidence of research grant activity, academic leadership ability in the field of data science, and experience of public engagement. The postholder will have the opportunity to contribute to a wide range of provision, as appropriate to
Categories: Incoming News

Haskell merchandising?

Haskell on Reddit - Wed, 04/22/2015 - 8:47am

I really would like to buy a TShirt with the amazing Thompson-Wheeler logo, I have seen several possibilities, but I would like to make sure my money is going to people actually working on the language, is there any way to do so?

Otherwise, I might start making Haskell-related TShirts on my own, what would be the best way to give back to the Haskell community with the money I might raise?

submitted by Vetii
[link] [12 comments]
Categories: Incoming News

[Second call for participation] Spring School about Proofs of Programs using Coq

General haskell list - Wed, 04/22/2015 - 6:17am
*** Call for participation, please distribute. *** EPIT'2015 (http://www.epit2015.website) Spring School in Theoretical Computer Science Mechanizing Proofs of Programs in Coq May 25 to May 29, 2015, Frejus, France * Presentation The french spring school in theoretical computer science (EPIT) is a recurrent school which was created 40 years ago by Maurice Nivat. This year, the school is about the mechanization of proofs of programs using the proof assistant Coq. As no prerequisite is needed, the school targets any computer scientist that is curious about what a proof assistant is and how it can be integrated in its daily research work. * Program The school will take place between May 24 and May 29 and it will be divided into eight sessions. A session will consist in a (rather short) lecture (given in english) followed by practical exercises on computer. The five first sessions will be dedicated to a presentation of the main concepts and techniques
Categories: Incoming News

Philip Wadler: Prime Minister of Singapore plans to learn Haskell

Planet Haskell - Wed, 04/22/2015 - 5:06am

The Prime Minister of Singapore, Lee Hsien Loong, plans to learn Haskell.
My children are in IT, two of them – both graduated from MIT. One of them browsed a book and said, “Here, read this”. It said “Haskell – learn you a Haskell for great good”, and one day that will be my retirement reading.Spotted by Jeremy Yallop.
Categories: Offsite Blogs

APLAS 2015: Call for Papers

General haskell list - Wed, 04/22/2015 - 4:33am
********************************************************************* APLAS 2015, Call for Papers 13th Asian Symposium on Programming Languages and Systems Pohang, Korea, November 30 - December 2, 2015 < http://pl.postech.ac.kr/aplas2015/> ********************************************************************* *IMPORTANT DATES* Submission deadline: June 5, 2015 Author notification: August 17, 2015 Final version: September 7, 2015 Conference: November 30 - December 2, 2015 *INVITED SPEAKERS* Peter O'Hearn, Facebook Sukyoung Ryu, KAIST Eran Yahav, Technion Hongseok Yang, University of Oxford *ABOUT* 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 wi
Categories: Incoming News

Exceptions with Context Re: Proposal: Add exception info

libraries list - Wed, 04/22/2015 - 3:23am
hrm, i like this proposal more, and it seems like with some fleshing out it can be strictly more extensible yet backwards compatible than michael's I'll need to mull it a bit more before I cast my vote, but this seems to sketch out a design that provides the same information, but in a more extensible/backwards compatible fashion (at least in a first cut of thinking about it) (i'm splitting this into a new thread so the discussions dont get mixed up) On Tue, Apr 21, 2015 at 9:40 PM, davean <davean< at >xkcd.com> wrote: _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Categories: Offsite Discussion

Proposal: add alterLookupWithKey to Data.Map.Lazy (containers)

libraries list - Tue, 04/21/2015 - 10:23pm
Github issue: https://github.com/haskell/containers/issues/151 Summary: add alterLookupWithKey :: Ord k => (k -> Maybe a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a) function to Data.Map.Lazy. Details: implement alterLookupWithKey function which takes an update function, key and map, allowing to insert, delete or update a value in a Map and return updated map with a new value. Motivations: For insert/update/delete: same as for alter :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k a - it allows to perform insert/update/delete within single lookup. For returning updated value: same as for *LookupWithKey functions - in case of update we mind be interested in the updated value. For a "key" parameter: hornestly, don't know. *LookupWithKey functions are having (k -> .. ) -> k -> <a> -> Map k a -> (Maybe a, Map k a) signatures, but I don't see any reason to pass the key to the update function, because we always can capture the key in a closure if we whant to. The only reason is to respect exist
Categories: Offsite Discussion

Beautiful Code, Compelling Evidence: OpenGL, Cairo tutorial - still up-to-date?

Haskell on Reddit - Tue, 04/21/2015 - 8:43pm

I came across this beautiful tutorial - http://www.renci.org/wp-content/pub/tutorials/BeautifulCode.pdf

I noticed though it's about 7 years old now and things have moved pretty fast as far as opengl standards, opengl tooling in haskell, haskell practices, and data science since then.

Is there an updated equivalent of this tutorial? Is anything there obviously out of date now?

submitted by klaxion
[link] [2 comments]
Categories: Incoming News

Extended Deadline - SBLP 2015

General haskell list - Tue, 04/21/2015 - 7:42pm
CALL FOR PAPERS SBLP 2015 *** EXTENDED DEADLINE *** 19th Brazilian Symposium on Programming Languages 24-25 September 2015 Belo Horizonte, Brazil http://cbsoft.org/sblp2015 +++++++++++++++++++++++++++++++++++++++++++++++++++ IMPORTANT DATES Abstract submission (extended): 27 April, 2015 Paper submission (extended): 4 May, 2015 Author notification: 18 June, 2015 Camera ready deadline: 2 July 2015 INTRODUCTION The Brazilian Symposium on Programming Languages is a well-established symposium which provides a venue for researchers and practitioners interested in the fundamental principles and innovations in the design and implementation of programming languages and systems. SBLP 2015 is part of 6th Brazilian Conference on Software: Theory and Practice, CBSoft 2015, that will be held in Belo Horizonte, Minas Gerais, Brazil, from September 21st to September 26th, 2015. SBLP dates are Thursday 24th and Friday 25th of September. Authors are invited to submit original research on any relevant topic which c
Categories: Incoming News