News aggregator

[ANN] codex 0.2.0.0

haskell-cafe - Mon, 09/22/2014 - 9:59am
Hi Cafe, I released a new version of my tool `codex`[1] (a ctags file generator for cabal project dependencies). This new version include: - By default, the current project is now included in the generated `codex.tags` file - Resolve dependencies in the "benchmarks" of your cabal project - Fix tags file header to respect specification (to make them work in Sublime) - Cache eviction mechanism (no need of using `--force` in default use cases) - Add default configuration for Sublime Thanks to everyone for bug fixes and feature requests! Cheers [1] https://github.com/aloiscochard/codex
Categories: Offsite Discussion

Tom Schrijvers: Postdoctoral Position in Programming Languages at KU Leuven

Planet Haskell - Mon, 09/22/2014 - 9:25am

The Declarative Languages and Artificial Intelligence (DTAI) group of KU Leuven
(Belgium) invites applicants for a postdoctoral position in the area of
programming languages. This position has been created at the occasion of the
new appointment of prof. Tom Schrijvers as research professor at KU Leuven. The
position's aim is to reinforce the research activities in functional
programming, logic programming and/or programming language theory.

To apply you must hold a recent PhD (or be about to graduate) in one of the
above areas of programming languages. Candidates are expected to have
high-quality publications in peer-reviewed conferences and journals.

The postdoc will work closely with prof. Schrijvers and his PhD students,
participate in ongoing research activities and enjoy the freedom to develop new
lines of research.

The position is for 2 x 1 year and can be further extended. The salary is
competitive and the starting date negotiable.  Moreover, KU Leuven's policy of
equal opportunities and diversity applies to this position.

Please send your application to prof. Tom Schrijvers (tom dot schrijvers at cs
dot kuleuven dot be) by October 15, 2014. Your application should contain:

 - A cover letter explaining your interest in the position.

 - Your curriculum vitae.

 - A short research statement (max. 3 pages).

 - The names and contact details of three people who can, if asked, write
   letters of reference.

Categories: Offsite Blogs

how to use hs_init_ghc and pass runtime params to adll

haskell-cafe - Mon, 09/22/2014 - 9:16am
Can someone provide a (pointer to a) working basic example of C code that uses a Windows dll created by ghc that calls hs_init_ghc? Can someone confirm that hs_init_ghc uses stdcall in a windows dll. Is ghc -no-hs-main -shared -threaded -O2 -o TBGlas.dll TBGlasDll.hs a correct way to create the dll? Do I have to use the ghc parameter -dynamic? if I use this parameter, the ghc tells me to install the 'dyn' libraries for package base. Sounds aweful. I'am using ghc version 7.8.3. and the 32 bits Haskell Platform on 64 bits Windows 7. Background: I create a dll with ghc. The program that uses the dll starts with a lookup for all functions I want to use from the dll. The result is a bunch of function pointers. I use a function pointer to call the real function. Then I call the defaultRtsConfig function from the dll. I get a pointer to a struct with a byte for the enumarable RTSOptEnabled followed by a pointer to a string. In the returned struct this pointer is nil. Then I set the pointer in the struct t
Categories: Offsite Discussion

Breaking the Complexity Barrier of Pure Functional Programs with Impure Data Structures

Lambda the Ultimate - Mon, 09/22/2014 - 8:10am

Breaking the Complexity Barrier of Pure Functional Programs with Impure Data Structures by Pieter Wuille and Tom Schrijvers:

Pure functional programming language offer many advantages over impure languages. Unfortunately, the absence of destructive update, imposes a complexity barrier. In imperative languages, there are algorithms and data structures with better complexity. We present our project for combining existing program transformation techniques to transform inefficient pure data structures into impure ones with better complexity. As a consequence, the programmer is not exposed to the impurity and retains the advantages of purity.

This paper is along the same lines a question I asked a couple of years ago. The idea here is to allow programming using immutable interfaces, and then automatically transform it into a more efficient mutable equivalent.

Categories: Offsite Discussion

Haskell job opportunity in Santiago, Chile

haskell-cafe - Mon, 09/22/2014 - 6:37am
Hi all, We are looking to hire an experienced Haskell developer for our startup in Santiago, Chile. This will be a 6-8 week project involving web development using Yesod and you will be building a key component of our product. Part time is OK. We would prefer someone who can work out of our office, however, working remote is also a possibility. If remote, being in India would be a plus. Good english communication ability is essential. Please email me directly if interested. Thanks, Anupam Jain _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

which language extension to enable this behavior?

Haskell on Reddit - Sun, 09/21/2014 - 10:14pm

A beginner was asking me a question about this program:

module Test where data Tree a = EmptyTree | Node a (Tree a) (Tree a) deriving Show test = show (EmptyTree)

Compiling with ghc -c shows the following error:

test.hs:3:8: No instance for (Show a0) arising from a use of ‘show’ The type variable ‘a0’ is ambiguous ....

But if I type directly into a GHCi prompt, there is no more error:

Prelude> data Tree a = EmptyTree | Node a (Tree a) (Tree a) deriving Show Prelude> let test = show (EmptyTree) Prelude> test "EmptyTree" Prelude> show (EmptyTree) "EmptyTree"

To get this behavior in GHCi, which language extension should I use?

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

Leksah 0.14.1 includes a Web Inspector

Haskell on Reddit - Sun, 09/21/2014 - 7:46pm

To make it easier to debug code compiled with GHCJS, the latest version of leksah includes a WebKitGtk based Web Inspect pane. Just right click in the Out pane and select Inspect Element to activate it.

Here is what it looks like in action.

You can also add one of these to your natively compiled ghcjs-dom applications by adding enableInspector to the code (for example ghcjs-dom-hello). Right click menu will include an Inspect Element menu item.

submitted by hamishmack
[link] [6 comments]
Categories: Incoming News

ghc-prof-options and libraries on Hackage

haskell-cafe - Sun, 09/21/2014 - 7:13pm
Hi all, I'd like to start a conversation around the ghc-prof-options option that can be used in Cabal-ized libraries. As you may know, this option specifies extra GHC options that are used when --enable-library-profiling is enabled. This is very convenient for local development, but I argue that it can be counter-productive for releases onto Hackage. To provide an example, I'm currently working on a little game engine that uses JuicyPixels to load images. I have a problem in my code that needs optimizing, but the current state of things results in profiles that are very difficult to work with. JuicyPixels specifies -auto-all in its cabal file, which means I have no alternative but to profile JuicyPixels code. In this scenario, the bottleneck is actually within my FRP game loop and nothing to do with image loading! As a result, the profiles are fairly useless to me. Roman Cheplyaka also points out that by doing this, profiles are skewed - -auto-all is not free, so we actually pay in runtime performance ev
Categories: Offsite Discussion

Pre-Proposal: Add Validation somewhere easily accessible

libraries list - Sun, 09/21/2014 - 6:05pm
The “purely applicative Either” is Either with a new Applicative interface which can no longer take a corresponding Monad interface. I have personally reinvented it over and over although it is perhaps commonly known as Validation:     data Validation e a = Invalid e | Valid a deriving ( Show, Functor, … )     instance Monoid e => Applicative (Validation e) where       pure = Valid       Invalid e1 <*> Invalid e2 = Invalid (e1 <> e2)       Invalid e1 <*> _          = Invalid e1                  <*> Invalid e2 = Invalid e2       Valid   f  <*> Valid   a  = Valid (f a)     -- No corresponding Monad It could be perhaps better implemented as a newtype wrapper over Either to facilitate rapid conversion to the more common type. Validation appears in its own package developed by Tony Morris and Nick Partridge. It also exists in Jonathan Sterling’s Vinyl package under the name Data.Vinyl.Idiom.Validation.Result. Gabriel Gonzalez has also told me that he’d be ha
Categories: Offsite Discussion

ANN: vimus - An MPD client with vim-like key bindings

haskell-cafe - Sun, 09/21/2014 - 3:44pm
Hi, I just uploaded vimus [1] to Hackage. vimus is an MPD client with vim-like key bindings. I've been using it as my exclusive music player since early 2010. It comes with it's own quick & dirty ncurses bindings, which is one of the reasons why I was reluctant to push it to Hackage so far. Check the README for installation and usage: https://github.com/vimus/vimus#readme vimus is not a masterpiece of coding beauty** , but it's incredibly useful to me and a couple of other people over at #vimus on Freenode. Patches are welcome as long as they - reduce code bloat and improve hackability - do not conflict with my use cases (in case of doubt we make things configurable) - do not require lots of work from my side (vimus already works incredibly well for me and I can not spend too many cycles on it) vimus would not be what it is today without the help of others. In particular I'm grateful to - Niklas Haas for being the second user of vimus and contributing many useful features - Joa
Categories: Offsite Discussion

Joachim Breitner: Using my Kobo eBook reader as an external eInk monitor

Planet Haskell - Sun, 09/21/2014 - 2:11pm

I have an office with a nice large window, but more often than not I have to close the shades to be able to see something on my screen. Even worse: There were so many nice and sunny days where I would have loved to take my laptop outside and work there, but it (a Thinkpad T430s) is simply not usable in bright sun. I have seen those nice eInk based eBook readers, who are clearer the brighter they are. That’s what I want for my laptop, and I am willing to sacrifice color and a bit of usability due to latency for being able to work in the bright daylight!

So while I was in Portland for DebConf14 (where I guess I felt a bit more like tinkering than otherwise) I bought a Kobo Aura HD. I chose this device because it has a resolution similar to my laptop (1440×1080) and I have seen reports from people running their own software on it, including completely separate systems such as Debian or Android.

This week, I was able to play around with it. It was indeed simple to tinker with: You can simply copy a tarball to it which is then extracted over the root file system. There are plenty of instructions online, but I found it easier to take them as inspiration and do it my way – with basic Linux knowledge that’s possible. This way, I extended the system boot script with a hook to a file on the internal SD card, and this file then runs the telnetd daemon that comes with the device’s busybox installation. Then I just have to make the device go online and telnet onto it. From there it is a pretty normal Linux system, albeit without an X server, using the framebuffer directly.

I even found an existing project providing a VNC client implementation for this and other devices, and pretty soon I could see my laptop screen on the Kobo. Black and white worked fine, but colors and greyscales, including all anti-aliased fonts, were quite broken. After some analysis I concluded that it was confusing the bit pattern of the pixels. Luckily kvncclient shares that code with koreader, which worked fine on my device, so I could copy some files and settings from there et voilá: I now have an eInk monitor for my laptop. As a matter of fact, I am writing this text with my Kobo sitting on top of the folded-back laptop screen!

I did some minor adjustments to my laptop:

  • I changed the screen size to match the Kobo’s resolution. Using xrandr’s --panning option this is possible even though my real screen is only 900 pixels high.
  • I disabled the cursor-blink where possible. In general, screen updates should be avoided, so I hide my taffybar (which has a CPU usage monitor) and text is best written at the very end of the line (and not before a, say, </p>).
  • My terminal windows are now black-on-white.
  • I had to increase my font-size a bit (the kobo has quite a high DPI), and color is not helpful (so :set syntax=off in vim).

All this is still very manual (going online with the kobo, finding its IP address, logging in via telnet, killing the Kobo's normal main program, starting x11vnc, finding my ip address, starting the vnc client, doing the adjustments mentioned above), so I need to automate it a bit. Unfortunately, there is no canonical way to extend the Kobo by your own application: The Kobo developers made their device quite open, but stopped short from actually encouraging extensions, so people have created many weird ways to start programs on the Kobo – dedicated start menus, background programs observing when the regular Kobo app opens a specific file, complete replacements for the system. I am considering to simply run an SSH server on the device and drive the whole process from the laptop. I’ll keep you up-to-date.

A dream for the future would be to turn the kobo into a USB monitor and simply connect it to any computer, where it then shows up as a new external monitor. I wonder if there is a standard for USB monitors, and if it is simple enough (but I doubt it).

A word about the kobo development scene: It seems to be quite active and healthy, and a number of interesting applications are provided for it. But unfortunately it all happens on a web forum, and they use it not only for discussion, but also as a wiki, a release page, a bug tracker, a feature request list and as a support line – often on one single thread with dozens of posts. This makes it quite hard to find relevant information and decide whether it is still up-to-date. Unfortunately, you cannot really do without it. The PDF viewer that comes with the kobo is barely okish (e.g. no crop functionality), so installing, say, koreader is a must if you read more PDFs than actual ebooks. And then you have to deal with the how-to-start-it problem.

That reminds me: I need to find a decent RSS reader for the kobo, or possibly a good RSS-to-epub converter that I can run automatically. Any suggestions?

PS and related to this project: Thanks to Kathey!

Categories: Offsite Blogs

About learning Haskell!

Haskell on Reddit - Sun, 09/21/2014 - 3:33am
  1. This is better than almost all the monads tutorial out there: https://www.youtube.com/watch?v=ZhuHCtR3xq8

  2. Take any 5th grader that is taught in school about functions, injection, surjection, bijection, associativity, commutativity, neutral element, simetric element and groups, rings etc. and functional programming just gets intuitive and easy once you hit the wall of "tutorials" and "books".

The reason why math is not coming back to computer programming is all the people that write "tutorials"/"books". The end.

submitted by tetru
[link] [10 comments]
Categories: Incoming News

Inside the Wolfram Language

Lambda the Ultimate - Sat, 09/20/2014 - 8:20pm

Video of Stephen Wolfram showing off the Wolfram Language and sharing his perspective on the design of the language at Strange Loop conference.

Categories: Offsite Discussion

Linking/uploading a PDF file in HaskellWiki

haskell-cafe - Sat, 09/20/2014 - 7:30pm
L.S., I am trying to link a PDF file, that is to be uploaded to the HaskellWiki environment, but I encounter several problems: - The link [[File:wxhaskell.pdf | wxHaskell - A Portable and Concise GUI Library for Haskell]] is displayed as File:wxhaskell.pdf instead of wxHaskell - A Portable and Concise GUI Library for Haskell If I leave out the vertical bar, the entire string between the brackets is displayed and used as filename - If I click the link, I am asked to upload the file; the resulting file should be http://www.haskell.org/haskellwiki/File:Wxhaskell.pdf but this URL results in a blank page - The list of uploaded files should be at http://www.haskell.org/haskellwiki/Special:ListFiles but this URL results in a blank page as well Am I doing something wrong, or are these Wiki bugs? Regards, Henk-Jan van Tuyl
Categories: Offsite Discussion