News aggregator

Job opening: further Haskell Developers at Anchor

haskell-cafe - Tue, 07/08/2014 - 7:21am
Openings for additional Haskell developers... About Anchor ------------ Anchor Systems, based in Sydney Australia, has successfully been providing managed hosting and infrastructure to clients around the world for almost 15 years. The critical difference in the service we offer our customers often boils down to providing operations expertise and infrastructure configuration balancing the short term needs to get a new installation running with the long term imperatives of security, scalability, and flexibility. The engineering department is building the analytics capabilities, internal systems, cloud infrastructure, deployment tooling, and operations practices that will be needed to take the company to the next level. We have every intention of changing the hosting industry to make developing applications — and operating them at scale — easier for people facing massive growth. Haskell is the working language for all internal development, and we're exploring it for web facing code too. The benefits of
Categories: Offsite Discussion

Using OpenGL inside a GTK notebook tab?

Haskell on Reddit - Tue, 07/08/2014 - 5:50am

Hello. I've been struggling with displaying an OpenGL drawing area inside of a notebook tab in GTK. What I need to do is to have two type of tab contents in my application: One is a text editor, using gtksourceview, which is used to write the input to a calculation procedure. When invoked, this procedure should do the calculation and then open a new notebook tab, which contains an OpenGL drawing area, displaying the results.

So far I just tried to get GL running by adapting the hello world example from the wiki. The thing is that it works fine when I put the drawing area into the main window when creating the main window in the first place, but it does not work properly when putting it in a notebook tab while the application is already running.

This is the basic outline of how I create my main window:

mainWindow :: IO () mainWindow = initGUI >> GtkGL.initGL >> goWin >> mainGUI goWin :: IO () goWin = do gui <- buildGUI connectGUI gui widgetShowAll $ window gui

Where buildGUI creates all the widgets that I need (returning them inside of a record) and connectGUI assigns signal handling to the individual widgets. No GL drawing area has been created yet. When pressing "calculate" in the menu, the calculations are done and a new ResultView is built as follows, which is then displayed in a new tab in the notebook:

buildResultView :: Either Result FilePath -> IO ResultView buildResultView d = do hbox <- hBoxNew False 0 glconfig <- GtkGL.glConfigNew [ GtkGL.GLModeRGBA , GtkGL.GLModeDepth , GtkGL.GLModeDouble ] gl <- GtkGL.glDrawingAreaNew glconfig Gtk.onRealize gl $ GtkGL.withGLDrawingArea gl $ \_ -> do clearColor $= (Color4 0.0 0.0 0.0 0.0) matrixMode $= Projection loadIdentity ortho 0.0 1.0 0.0 1.0 (-1.0) 1.0 depthFunc $= Just Less drawBuffer $= BackBuffers -- Set the repaint handler Gtk.onExpose gl $ \_ -> do GtkGL.withGLDrawingArea gl $ \glwindow -> do GL.clear [GL.DepthBuffer, GL.ColorBuffer] display GtkGL.glDrawableSwapBuffers glwindow return True boxPackStart hbox gl PackGrow 0 return $ ResultView hbox display = do loadIdentity color (Color3 1 1 0 :: Color3 GLfloat) -- Instead of glBegin ... glEnd there is renderPrimitive. renderPrimitive Polygon $ do vertex (Vertex3 1 0 0.0 :: Vertex3 GLfloat) vertex (Vertex3 1 1 0.0 :: Vertex3 GLfloat) vertex (Vertex3 0 1 0.0 :: Vertex3 GLfloat) vertex (Vertex3 0 0 0.0 :: Vertex3 GLfloat)

This is called by the following code, which builds the actual notebook tab:

newResultTab :: GUI -> Either Result FilePath -> IO () newResultTab gui d = do -- define tab label let lbl = either (const "<result>") takeFileName d fp = either (const Nothing) Just d -- build a new tab and resultview r <- buildResultView d tab <- buildNotebookTab (Right r) fp (Just lbl) -- wire close button onToolButtonClicked (ntCloseButton tab) $ do index <- notebookPageNum (nbook gui) (resultBox r) index ?>= \i -> notebookRemovePage (nbook gui) i -- add page widgetShowAll (resultBox r) menuLabel <- labelNew $ Just lbl index <- notebookAppendPageMenu (nbook gui) (resultBox r) (ntBox tab) menuLabel notebookSetTabReorderable (nbook gui) (resultBox r) True -- set as current and register modifyIORef (tabs gui) ((index,tab):) writeIORef (current gui) $ Just (index,tab) return ()

So my question is: The OpenGL code does clearly draw a yellow box, and it does actually do this when putting the drawing area into the main window at startup instead of the notebook. However, when I run it like above, all I get is a black window, and nothing is displayed in it. Does anyone have an idea how to fix this?

EDIT: I've got a minimal example of the problem which I've uploaded here.

submitted by tsahyt
[link] [4 comments]
Categories: Incoming News

Haskell Platform release schedule?

haskell-cafe - Tue, 07/08/2014 - 5:21am
The Haskell Platform wiki page says the platform follows a 6-month release schedule, yet the last release occurred more than one year ago, and I couldn't find information about future plans. Are there plans to update the platform with ghc 7.8.2? Thanks, Dominick
Categories: Offsite Discussion

Cross compiling for Cortex A9

glasgow-user - Tue, 07/08/2014 - 5:10am
I am having problems building a GHC cross compiler for Linux (Yocto on a Wandboard) running on a Cortex A9, and need some advice on how to debug it. The cross compiler produces an executable that runs on the Target, but fails to print. So I need help coming up with a strategy to narrow down the root cause. Some details: The application: main = do putStrLn "Haskell start" The command line options work. The program runs, and I can step through assembly. Debug data is printed to the console. But putStrLn fails, and program enters an infinite loop. I compile my app as follows: arm-unknown-linux-gnueabi-ghc -debug -static Main.hs Using -threaded does not fix the problem. Let me compare debug data from a run on my HOST, with a run on my TARGET. First, a run from my HOST: created capset 0 of type 2 created capset 1 of type 3 cap 0: initialised assigned cap 0 to capset 0 assigned cap 0 to capset 1 cap 0: created thread 1 cap 0: running thread 1 (ThreadRunGHC) cap 0: thread 1 stopped (suspended while m
Categories: Offsite Discussion

Machine learning through 'reflective metaprogramming.'

Haskell on Reddit - Tue, 07/08/2014 - 3:31am

Let's assume for the sake of argument some future time where computer algorithms are 'smart' enough to write their own code within a native source language or framework, then refactor and optimize that code, and basically add to their own programming to meet established goals or targets, which can themselves be modified and/or evolve with metaprogramming.

If this mythical machine existed and wrote code to modify its own programming, without concern at all for human readability or comprehension but instead purely for its own efficient design and function, then what language would it likely use in the most optimal scenario born out of current present day technologies?

  1. machine language
  2. assembly language
  3. C
  4. Lisp
  5. Haskell or ML variant
  6. Erlang
  7. Dynamic scripting language (Python, etc)
  8. Low level alternatives to C (D, Rust, Nimrod, etc)
  9. Other
submitted by RaymondWies
[link] [7 comments]
Categories: Incoming News

how to get ghci to load compiled modules in 7.8?

haskell-cafe - Mon, 07/07/2014 - 10:25pm
I recently upgraded to 7.8.2 and I have a silly question. How do you get ghci to load compiled modules? When I try this: % cat >T.hs module T where x :: Int x = 42 % ghc -c -dynamic-too T.hs % s T.dyn_hi T.dyn_o T.hi T.hs T.o % ghci GHCi, version 7.8.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Prelude> :l T [1 of 1] Compiling T ( T.hs, interpreted ) Ok, modules loaded: T. *T> It still loads the file interpreted, even though there is a .dyn_o present. What am I doing wrong? This is on x86-64 OS X.
Categories: Offsite Discussion

Where is Haskell going in industry?

Haskell on Reddit - Mon, 07/07/2014 - 3:13pm

I know this question may seem somewhat confrontational, but it's actually a thoughtful open letter from someone who really enjoys Haskell programming but whose day job unfortunately has involved lots of C++, Java, and Fortran programming throughout my career ( I work in games industry currently ).

Why is there is so much work on building more perfect languages and abstractions when the industry adoption already lags 25-30 years behind what you fellows are already working with?

I don't want to appear like I'm against progress in languages. I'm all for higher level and better abstractions and heated debates about extensional versus intensional type theory. But Haskell ( and FP on a larger scale ) seems to be of the "obelisk" model of design, seeing how high and far we can go, instead of the "pyramid" style of building out abstractions that can cover a larger area of use-cases.

For instance, there's a lot of bad C++ out there that is a giant imperative mess but covers enough of the industry use-cases, that network-effects tend to negate the use of anything better. I don't see anything replacing C++ for games programming on the order of the next 25 years and that scares me.

At least to me it appears the gap between the average industry programmer and the working Haskell developer is not shrinking but becoming insurmountably large. Even reading through Learn You a Haskell doesn't come close to preparing someone to read through half the libraries on Hackage. There's hundreds of languages extensions, types, and advanced patterns that seem to be ubiquitous but are not explained anywhere for the layman.

So my question to you fine Haskellers is how do you see Haskell getting more industry adoption and what can be done by folks like myself to help get there?

submitted by gamedevmike
[link] [112 comments]
Categories: Incoming News

André Pang (ozone): Markup Plugin for RapidWeaver 5

Planet Haskell - Mon, 07/07/2014 - 12:26pm

For the RapidWeaver users out there, I’ve updated my antique Markup plugin to work with RapidWeaver 5 (slow clap). It also now lives on GitHub, like all the other cool open-source projects published after about 1970. (BitBucket is so 1969.)

As an aside, ohmigosh, there still isn’t anything out there that’s as good as RapidWeaver for building websites. I wanted to redo my site, and looked into a bunch of RapidWeaver alternatives, especially Web apps. Tumblr, Wordpress, Blogger and all that are great for just blogs, but useless for building anything more than a blog. Online site-builders like Squarespace, Weebly, and Virb are either way too dumbed down, too complex, have the most boring themes, or more likely, are all of the above. Despite RapidWeaver still being compiled for ppc and i386 only (it’s not a 64-bit app yet), and using the Objective-C 1.0 runtime (my Markup plugin uses +[NSObject poseAsClass:]!), it is still the best thing going for building sites. Amazing.

Anyway, Markup plugin, go get it.

Categories: Offsite Blogs

can we do better than cabal sandbox?

Haskell on Reddit - Mon, 07/07/2014 - 11:47am

I've heard the idea of installing shared libraries with cabal and ditching the dependencies. This to me sounds better than cabal sandboxes because it allows you to reuse libraries without needing to reinstall them, and hopefully without needing to redo your entire cabal when you go for an upgrade to your libs. Unfortunately this wouldn't (afaik) improve the amount of time it takes to install these libs.

However if it were possible to install the dependencies as well, compile these shared libraries with the installed dependencies (if the version matches) and then have a new independent library, than I think our package management infrastructure would be solved. If the installed dependency is a version mismatch, we could install this library with a temporary instance of the desired dependency, and then toss jt.

Is this possible ? Do you think this is a good idea/would help?

Also while I'm on the podium might I add that it feels like overkill for cabal to be managing packages, building and sand boxing all on it's own? I think it should at least be split into separate commands

submitted by fruitbooploops
[link] [33 comments]
Categories: Incoming News

strange behavior of GHC 7.8.2

haskell-cafe - Mon, 07/07/2014 - 4:18am
Hi cafe, I noticed that strange behavior of GHC 7.8.2. Consider the following example which requires the "ghc" package: ---- {-# LANGUAGE GeneralizedNewtypeDeriving #-} module A where import GHC import MonadUtils import Control.Monad.Trans.RWS.Lazy (RWST(..)) newtype M a = M (RWST () () () IO a) deriving (Functor,Applicative,Monad,MonadIO) ---- The "ghc" library depends on "transformers" 0.3.0.0. If "transformers" *0.4.1.0* is NOT installed, GHCi can handle the code above well: ---- % ghci -package ghc A.hs ... Loading package transformers-0.3.0.0 ... linking ... done. ... Ok, modules loaded: A. [*A] ---- However, if "transformers" *0.4.1.0* is installed, an error happens: ---- % cabal install transformers % ghci -package ghc A.hs ... Loading package transformers-0.3.0.0 ... linking ... done. ... [1 of 1] Compiling A ( A.hs, interpreted ) A.hs:10:49: No instance for (MonadIO (RWST () () () IO)) arising from the 'deriving' clause of a data type declaration
Categories: Offsite Discussion

How to have a managed window unfocusable?

haskell-cafe - Mon, 07/07/2014 - 3:23am
Hi, I'd like to have a transparent clock floating on my desktop. If I made it ignored (unmanaged), it would not be above and would be blocked by other windows. If I made it managed and float, when I floated up and down, it would be focused and I needed to press hotkey again to move focus to correct window. Anyway I could manage it, but not focusing on it?
Categories: Offsite Discussion

ML Family workshop: First Call for Participation

General haskell list - Mon, 07/07/2014 - 2:41am
Higher-order, Typed, Inferred, Strict: ACM SIGPLAN ML Family Workshop Thursday September 4, 2014, Gothenburg, Sweden Call For Participation http://okmij.org/ftp/ML/ML14.html Early registration deadline is August 3. Please register at https://regmaster4.com/2014conf/ICFP14/register.php This workshop specifically aims to recognize the entire extended ML family and to provide the forum to present and discuss common issues, both practical (compilation techniques, implementations of concurrency and parallelism, programming for the Web) and theoretical (fancy types, module systems, metaprogramming). We also encourage presentations from related languages (such as Scala, Rust, Nemerle, ATS, etc.), to exchange experience of further developing ML ideas. The workshop is conducted in close cooperation with the OCaml Users and Developers Workshop http://ocaml.org/meetings/ocaml/2014/ taking place on September 5. Program * Andreas Rossberg 1ML -- core and modules as one (Or: F-ing first-class modules)
Categories: Incoming News

Haskellers in Chile

Haskell on Reddit - Mon, 07/07/2014 - 1:42am

I am an avid Haskeller and will be in Santiago, Chile for around 6 months starting August. I was wondering if there are any Chilean Haskell groups or meetups that I can join.

submitted by haskman
[link] [4 comments]
Categories: Incoming News

Designing Dependently Typed Languages - OPLSS '14

Haskell on Reddit - Mon, 07/07/2014 - 12:09am

At this year's Oregon Programming Language Summer School Stephanie Weirich gave a a series of lectures walking through the development of a simple dependently typed language in Haskell.

The videos are available as .mp4 files at:

https://www.cs.uoregon.edu/research/summerschool/summer14/curriculum.html

and the github repo for the source code is available at:

https://github.com/sweirich/pi-forall/tree/2014

submitted by mn-haskell-guy
[link] [10 comments]
Categories: Incoming News