News aggregator

Paid internship at Energy startup Moixa Technology

haskell-cafe - Tue, 04/28/2015 - 9:36am
Hi We are looking for a bright sparky developer to join our team in London as a paid intern, with the potential to turn into a full time job. We are based in central London, & The intern's objective will be creating web interfaces for users of our innovative renewable electricity systems. This opportunity is exciting in many ways. Moixa has won a number of prizes for its innovative products. The enterprise is a cool innovative startup that welcomes open thinking and encourages personal development. London has unarguably the largest UK Haskell community, and developers of most Haskell web frameworks can be met around here. Here is what the intern would have: - good CS background - decent Haskell knowledge: no professional experience, but able to write non-trivial applications - familiarity with web development: knows HTML/CSS and worked with some web frameworks --language mostly unimportant, but hopefully not PHP :) - knowledge of browser-side JavaScrip
Categories: Offsite Discussion

Manage non-reentrant blocking code

Haskell on Reddit - Tue, 04/28/2015 - 3:36am

Today I came across a discussion that mentioned the following problem - imagine an online shopping service, roughly like this:

  • user shops for some items, stores them in cart
  • user goes to checkout
  • cart items' price is calculated, sent to payment processor <- BLOCKS
  • items are deleted from cart and are shipped

Now, if a checkout request is currently blocking and the same request comes in twice, following the outline above the user would be charged twice, and depending on the shipping logic, also receive every item twice.

The obvious solution would be to lock on cart id, or convert the request to non-blocking, although that would only make the problematic time window smaller.

That made me thing how this type of scenario of non-reentrant requests can be solved with types. It bears some resemblance to STM, but only superficially. I could synthesize some points:

  • IO must be possible
  • reading IO is ok
  • writing IO with the same arguments is a problem
    • is it enough to compare values, or must origin of values be traced?

So, a non-reentrant block must not allow writing IO with the same arguments or coming from the same source (i.e. the same DB request).

Has any work in this direction been done?

submitted by _pka
[link] [3 comments]
Categories: Incoming News

MPC 2015 - Call For Participation

General haskell list - Tue, 04/28/2015 - 12:16am
CALL FOR PARTICIPATION 12th International Conference on Mathematics of Program Construction (MPC 2015) Königswinter, Germany, 29 June - 1 July 2015 Early registration deadline: *** 29 May 2015 *** Hotel rooms reserved until: *** 29 May 2015 *** BACKGROUND The MPC conferences aim to promote the development of mathematical principles and techniques that are demonstrably practical and effective in the process of constructing computer programs, broadly interpreted. VENUE The conference will take place in Königswinter, Maritim Hotel, where accommodation has been reserved. Königswinter is situated on the right bank of the river Rhine, opposite Germany's former capital Bonn, at the foot of the Siebengebirge. REGISTRATION To register for the conference send an email to mpc2015< at > stating your name and affiliation. We will then provide further details, including hotel booking. You can also use the email address for any queries you might have. The earl
Categories: Incoming News

Announcing: stackage-upload

Haskell on Reddit - Mon, 04/27/2015 - 11:08pm
Categories: Incoming News

FP Complete: Announcing: stackage-upload

Planet Haskell - Mon, 04/27/2015 - 10:30pm

I'm happy to announce the first version of stackage-upload. Copied below is the content of the README file; if you see errors please send a pull request to update the content. This tool is pretty simple right now, but can be easily extended. If others are interested in collaborating on this project, please be in touch.

stackage-upload provides a more secure version of the cabal upload command by using HTTPS. When uploading a package to Hackage, cabal upload will perform the upload in plain-text via unencrypted HTTP, using basic authentication, which is vulnerable to both man in the middle (MITM) and eavesdropping attacks (anyone sniffing your packets can get your username and password). This package instead uses secure HTTPS to upload to avoid both of these attacks.

To install, simply run cabal update && cabal install stackage-upload. Usage is quite similar to cabal upload: just call stackage-upload and pass in a list of tarballs to upload. (If you have stackage-cli installed, you can call stk upload instead.) stackage-upload --help will provide full options.

Why not fix cabal?

I'd be happy to add TLS support to cabal-install directly (using Vincent's tls package), but the two last times this topic came up, I have been unable to find a proposal that is acceptable to the Cabal project (mostly around Haskell Platform requirements). I made an open offer to send the pull request myself to move cabal-install over to http-client to get TLS support (either via http-client-tls or http-client-openssl).

Why Stackage?

See the same question and its answer on stackage-update.

Future enhancements
  • Store passwords securely via GPG encryption
  • Upload documentation to Hackage (work around the sometimes-broken doc builder)
  • Perform pre-upload checks, such as running the test suite from the tarball to check for missing files

This tool was something that I (Michael Snoyman) wrote for myself a while back, and decided to rebrand as stackage-upload when the severity of the insecure upload situation became apparent to me, and it became obvious that there was no path forward for getting cabal-install fixed.

I actually consider this situation to be so dangerous that I would like to ask the Hackage Server team to consider turning off insecure uploads to Hackage. The current possibility for corrupted uploads to infect all users of a package is alarmingly high.

Categories: Offsite Blogs

[ Google Summer of Code] 18 Projects Accepted

General haskell list - Mon, 04/27/2015 - 10:17pm
I'd like to thank everyone for helping us to get the largest Google Summer of Code we've ever had for off the ground! We have 18 accepted projects this year, spanning the entire ecosystem. You can find the official list on: The most notable change this year is that in addition to the usual stable full of cabal tweaks (3 projects this year), and other infrastructure and library changes and the odd darcs project here and there (1 project), we also took it upon ourselves to act as an umbrella organization for purescript (2 projects). * I'd like to thank Johan Tibell for helping us get our ideas organized, and the /r/haskell moderators for leaving the brainstorming page "stickied" for the duration. It rather dramatically improved both the quantity and the quality of proposals we received. After I put out a call for additional mentoring help, we had 44 mentors step up to offer to help this time around, showing that we still have capa
Categories: Incoming News

[Job] Intel is hiring: FP/FV oriented folks mostwelcome..

haskell-cafe - Mon, 04/27/2015 - 9:26pm
The group I work for at Intel has an opening for a recent graduate (BS/MS/PhD) of a US institution. We work within the product team responsible for the Xeon Phi many-core processor which is used to build supercomputers. See: Our team focuses mainly on the floating-point arithmetic verification using an internal STE based model checking tool called Forte, which is based on the reFLect language, which itself is a descendant of ML. (With lazy-evaluation default, and a baked-in BDD based equivalence checking engine, which makes it supercool! Imagine Haskell with a built-in symbolic simulation engine.) We also use Haskell for internal purposes as needed. Our group has extensive freedom in the choice of tools we use. We also work on a variety of non-arithmetic verification problems, including cache coherence, ECC (error-detection/correction) algorithms, instruction length decoders, to name a few. As part of our coherence work we developed an open source explicit state di
Categories: Offsite Discussion

ANN: New Committee Members

haskell-cafe - Mon, 04/27/2015 - 6:20pm
Following the self-nomination period and discussion, the committee has selected new members: * Edward Kmett (reappointment) * Ryan Trinkle * John Wiegley As per the rules of the committee, this discussion was held among the current members of the committee, and the outgoing members of the committee who were not seeking reappointment. Thank you to all candidates who submitted a self-nomination. All of the nominations we received were very strong, and we would encourage all those who nominated themselves to consider self-nominating again in the future. We would also like to thank our two outgoing members, Jason Dagit and Brent Yorgey, for their service. Cheers, Gershom _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

How to express the type of functions that return a specific type.

Haskell on Reddit - Mon, 04/27/2015 - 4:13pm

I can't write (a->) as a section, but I can write ((->) a) to refer to functions that take an a, with the return type unparametrised, e.g. for writing an instance Functor ((->) r). But how can I write the opposite - a function that returns an a with the domain unparametrised? e.g. a Contrafunctor instance: Contrafunctor (->a).

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

Question: How to use haskell expressions in quasi quoter?

Haskell on Reddit - Mon, 04/27/2015 - 3:45pm

Posit the backslash-key on my keyboard is broken, but I'd like to keep using haskell. I now would like to build a quasi-quoter that translates, say, [|quoter| LAMDA(x,y,z): x + y + z + c |] to \x y z -> x + y + z + c. The right-hand-side should be any valid haskell expression.

How would I build quoter? I don't want hygiene, e.g. I'd like to capture the variable c from an outer scope. I see two possible solutions to implementing quoter.

1) Doing a purely syntactic translation, basically search-and-replacing LAMBDA(...): to \... -> and splicing this back as text into my program, like a c-preprocessor would.

2) Using a quoter for haskell expressions. Basically if I had the functionality of [|...|], but as a unhygienic function quoteExp :: String -> ExpQ that was fine with free variables occurring in the expression. I could then generate something like [|\x y z -> $(quoteExp expAsString)|].

I've been unable to figure out how to implement either approach. I'd prefer something along the lines of 2) if possible, but I'd prefer not writing a String -> ExpQ parser myself. I assume there are also some problems involving e.g. fixity/precedence of custom operators.


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

WebSocket on Haskell?

haskell-cafe - Mon, 04/27/2015 - 1:43pm
Dear cafe, Would you tell me reference sources for WebSocket(or on Haskell? Once I wrote a toy program with WebSocket[1]: Node.js(backend) + JavaScript(frontend) + WebSocket(communication) I want to port it to Haskell backend for my exercise: Haskell(backend) + JavaScript(frontend) + WebSocket(communication) I'm glad if there are such references: * broadcast to multi-client by WebSocket(or * serve a simple top HTML page * deploy to Heroku or public server [1] Thank you :-), Takenobu _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion


Haskell on Reddit - Mon, 04/27/2015 - 1:11pm
Categories: Incoming News

Prime ``sieve'' and Haskell demo

haskell-cafe - Mon, 04/27/2015 - 1:06pm
Ertugrul So:ylemez wrote: Is it really so difficult to reproduce in a strict language? Here is that Haskell example in OCaml let primes = let rec trialDiv (Cons (p,xs)) = Cons (p, lazy (trialDiv < at >< at > filter (fun x -> x mod p <> 0) < at >< at > Lazy.force xs)) in trialDiv < at >< at > iota 2 roughly the same number of lines, and mainly, exactly the same method. Some people prefer to write it as let primes = let rec trialDiv (Cons (p,xs)) = Cons (p, lazy (Lazy.force xs |> filter (fun x -> x mod p <> 0) |> trialDiv)) in iota 2 |> trialDiv The algorithm is the same, it is just as clearly stated. Now it becomes clearer when what is evaluated. OCaml has its own streams (and even a special syntax for them, via a syntactic extension), but it is not difficult to introduce them from scratch type 'a stream = Cons of 'a * 'a stream Lazy.t let rec iota n = Cons (n,lazy (iota (n+1))) let rec filter pred (Cons (p,xs)) = if pred p then Cons (p,lazy (filter pred (Lazy.force xs))) else filter pred (Lazy.force xs) le
Categories: Offsite Discussion