News aggregator

http-client: proxy environment variable support

haskell-cafe - Mon, 01/19/2015 - 3:53pm
Neil Mitchell opened an issue[1] for http_proxy and https_proxy environment variable support in http-client. I've written that support, and it's ready to go, but there's an open question: what should the default behavior be? In particular, should environment variables, by default, be checked to determine the proxy, or not? Arguments each way: In favor of using environment variables: * Matches behavior of many other tools and libraries * Allows application users control without requiring a code change from application writers Against using environment variables: * It's a change in behavior vs what http-client does today (though that could certainly be seen as just a missing feature) * Environment variables will implicitly change the behavior of code, which generally speaking can be problematic I'm leaning towards having the default behavior be: * If the user explicitly chooses a proxy setting on the manager, use that * If the user explicitly sets a proxy value on the Request, use that * If the environment
Categories: Offsite Discussion

GHC Weekly News - 2015/01/19

Haskell on Reddit - Mon, 01/19/2015 - 3:41pm
Categories: Incoming News

The GHC Team: GHC Weekly News - 2015/01/19

Planet Haskell - Mon, 01/19/2015 - 3:35pm

Hi *,

It's time for some more GHC news! The GHC 7.10 release is closing in, which has been the primary place we're focusing our attention. In particular, we're hoping RC2 will be Real Soon Now.

Some notes from the past GHC HQ meetings this week:

  • GHC 7.10 is still rolling along smoothly, and it's expected that RC2 will be cut this Friday, January 23rd. Austin sent out an email about this to ghc-devs, so we can hopefully get all the necessary fixes in.
  • Currently, GHC HQ isn't planning on focusing many cycles on any GHC 7.10 tickets that aren't highest priority. We're otherwise going to fix things as we see fit, at our leisure - but a highest priority bug is a showstopper for us. This means if you have something you consider a showstopper for the next release, you should bump the priority on the ticket and yell at us!
  • We otherwise think everything looks pretty smooth for 7.10.1 RC2 - our libraries are updated, and most of the currently queued patches (with a few minor exceptions) are done and merged.

Some notes from the mailing list include:

  • Austin has alerted everyone that soon, Phabricator will run all builds with ./validate --slow, which will increase the time taken for most builds, but will catch a wider array of bugs in commits and submitted patches - there are many cases the default ./validate script still doesn't catch. ​
  • Johan Tibell asked about some clarifications for the HsBang datatype inside GHC. In response, Simon came back with some clarifications, comments, and refactorings, which greatly helped Johan. ttps://
  • Richard Eisenberg had a question about the vectoriser: can we disable it? DPH seems to have stagnated a bit recently, bringing into question the necessity of keeping it on. There hasn't been anything done yet, but it looks like the build will get lighter, with a few more modules soon: ​
  • Jan Stolarek has a simple question: what English spelling do we aim for in GHC? It seems that while GHC supports an assortment of British and American english syntactic literals (e.g. SPECIALIZE and SPECIALISE), the compiler sports an assortment of British/American identifiers on its own! ​

Closed tickets the past few weeks include: #9966, #9904, #9969, #9972, #9934, #9967, #9875, #9900, #9973, #9890, #5821, #9984, #9997, #9998, #9971, #10000, #10002, #9243, #9889, #9384, #8624, #9922, #9878, #9999, #9957, #7298, and #9836.

Categories: Offsite Blogs

Project euler problem #3: comparing my solution to the official.

Haskell on Reddit - Mon, 01/19/2015 - 3:26pm

I'm just looking for some insight and feedback. I came up with this answer for problem 3; find the largest prime factor of 600851475143.

sqrtInt n = round $ sqrt $ fromIntegral n factors n = filter (\x -> n `rem` x == 0) [2..(sqrtInt n)] prime n = null $ factors n main = do let number = 600851475143 let primes = filter prime $ factors number print (last primes)

How does this stack up against the official answer given in the Haskell wiki? My answer makes a lot more sense to me coming from an imperative programming background and the magic in the official answer kind of scares me. I am curious, how does my answer compare in terms of efficiency and why?

primes = 2 : filter (null . tail . primeFactors) [3,5..] primeFactors n = factor n primes where factor n (p:ps) | p*p > n = [n] | n `mod` p == 0 = p : factor (n `div` p) (p:ps) | otherwise = factor n ps problem_3 = last (primeFactors 600851475143) submitted by Chronic8888
[link] [7 comments]
Categories: Incoming News

CFP Bx'15: 4th International Workshop on BidirectionalTransformations

General haskell list - Mon, 01/19/2015 - 2:13pm
CALL FOR PAPERS Fourth International Workshop on Bidirectional Transformations (Bx 2015) L'Aquila, Italy (co-located with STAF, July 20-24, 2015) Bidirectional transformations (Bx) are a mechanism for maintaining the consistency of at least two related sources of information. Such sources can be relational databases, software models and code, or any other document following standard or ad-hoc formats. Bx are an emerging topic in a wide range of research areas, with prominent presence at top conferences in several different fields (namely databases, programming languages, software engineering, and graph transformation), but with results in one field often getting limited exposure in the others. Bx 2015 is a dedicated venue for Bx in all relevant fields, and is part of a workshop series that was created in order to promote cross-disciplinary research and awareness in the area. As suc
Categories: Incoming News

garbage collection for a data structure

haskell-cafe - Mon, 01/19/2015 - 2:10pm
Hi, I was wondering if there was a way to check whether a particular data structure gets garbage collected in a program. A friendly person pointed me to System.Mem.Weak on the Haskell-Beginner list - however I've been unable to verify how it works, so I'm bumping it to this list. See the following toy program: I was trying to see whether the output would contain "garbage collected". I wondered if performGC is a nudge rather than an immediate "garbage collect now" instruction, and performGC is not actually performed? Or I've misunderstood finalizers in this context and they would not actually be executed when z gets garbage collected? import System.Mem.Weak import System.Mem (performGC) import Control.Concurrent (threadDelay) main :: IO () main = do let x = 5 y = "done" z = 3 a <- mkWeak z x (Just (putStrLn "garbage collected")) performGC threadDelay 20000000 print y Thank you, Elise
Categories: Offsite Discussion

GHC Trac hits ticket #10000

Haskell on Reddit - Mon, 01/19/2015 - 1:39pm
Categories: Incoming News

Book announcement: Robert Kowalski,LOGIC FOR PROBLEM SOLVING, REVISITED

General haskell list - Mon, 01/19/2015 - 12:13pm
New Book Robert Kowalski LOGIC FOR PROBLEM SOLVING, REVISITED ISBN 9783837036299 Also available as E-Book Algorithm = Logic + Control Robert Kowalski revisits his classic text on Computational Logic in the light of subsequent developments, extending it by a substantial commentary of fifty pages.
Categories: Incoming News

Programs for Cheap! (pdf)

Haskell on Reddit - Mon, 01/19/2015 - 8:55am
Categories: Incoming News

Announcing a solution to the records problem

libraries list - Mon, 01/19/2015 - 6:54am
This thing seems to be going viral on social networks already, nonetheless here's a link for those of you, who aren't yet informed: _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

Reading papers and other resources

Haskell on Reddit - Mon, 01/19/2015 - 4:52am

My background is in computer engineering and I have been doing some stuff in haskell the last year and really liking it. I have also looked at Idris and other languages and coming from a background with imperative languages, it's really exciting.

Since I have mostly used books and google to learn and find help and information, I would like to find some other sources for more information, since my knowledge hub is quite sparse at the moment, about these things anyways.

New, experimental topics being studied right now about languages, techniques, functional programming, the future of it and so forth. Anything exciting, really. A place where these things are published, discussed and exposed, is what I am looking for. The format I had in mind is papers, but I will also read articles and books gladly.

Where are haskell/functional programming/new language research being published to? Where do you guys find these papers and articles? I would like to know about any resource where I can be exposed to great material.

Feel free to recommend me older papers on the topics also. I haven't read any about this yet, so most anything should be knew to me.

Go at it, thanks!

submitted by sirhcreffot
[link] [16 comments]
Categories: Incoming News

Philip Wadler: My email is a monster

Planet Haskell - Mon, 01/19/2015 - 3:40am

My New Year's resolution is to look at my e-mail at most once a day. If you need a response in less than a day or two, please arrange it with me in advance or use a different medium. Cartoon courtesy of Oatmeal.
Categories: Offsite Blogs

This code produces an infinite output... why? it's abug in ghc?

haskell-cafe - Mon, 01/19/2015 - 2:45am
This code produces an infinite output... why? it's a bug in ghc? UTCTime (fromGregorian 2015 1 1) (timeOfDayToTime $ TimeOfDay 0 0 0)
Categories: Offsite Discussion

Tooling for equational reasoning in Haskell

haskell-cafe - Mon, 01/19/2015 - 1:46am
Hi I quite enjoy doing equational reasoning to prove that my functions satisfy some laws, I like to type out each substitution step until I get back what I started with. The only trouble is that it's rather manual and possibly error prone. Is there any tooling anywhere out there that can take in a Haskell expression and reduce it by one step? I only know of stepeval: But it's just a prototype and works on a teeny weeny subset of Haskell. As much as I like doing tooling, my bandwidth for this area is already full. It seems quite hard to implement such a tool with existing tooling. Real compilers and interpreters tend to be distinctly far away from a simple substitution model or retaining the original source code and being able to print valid source back out. If such a tool existed, though, it'd be super handy and you could probably include it as another check for your build process like your type checking, yo
Categories: Offsite Discussion

Haskell and Math, Math and Haskell...

Haskell on Reddit - Sun, 01/18/2015 - 11:08pm

I've heard it said over and over that Haskell is very mathematical, math-oriented, etc. I've been reading through this subreddit and reading lots of "should I learn haskell?" posts with a lot of people giving qualified yeses on the condition that the learner is interested in and good at math.

Well, I might be somewhat novel then: I've done a bit of programming in python, and I'm teaching myself C, but I'm curious about FP. Also, I'm not really terribly good at math. The last serious math class I passed was intermediate college algebra (the class you take before trigonometry).

Flash forward a few years, and I have a much different relationship to learning math: I'm curious about it, and I want to understand it more than just get correct answers. But I've still got a ways to go :)

Here's the question (aka, tl;dr): If knowing math can help you understand Haskell, does learning Haskell help you to better understand math? Will learning Haskell have benefits outside of, well, programming in Haskell?

submitted by tunabee
[link] [17 comments]
Categories: Incoming News