News aggregator

cabal repl fails with GHC 7.8.2

haskell-cafe - Sat, 05/03/2014 - 3:13pm
I have a package for which "cabal repl" works fine with cabal version 1.20 and GHC 7.6.3. The package has a lot of FFI bindings and uses hsc2hs, so getting a REPL without "cabal repl" is a pain. The package also comes with the C sources that get linked in. But with GHC 7.8.2, "cabal repl" fails with: Loading object (static) dist/build/decnumber/src/decDouble.o ... /usr/bin/ld: dist/build/decnumber/src/decDouble.o: relocation R_X86_64_32S against `DPD2BIN' can not be used when making a shared object; recompile with -fPIC Any idea on how to fix this? "cabal build" and "cabal install" work fine and I can even build and execute a test binary against the library. It seems the problem is just with "cabal repl". Thanks. Omari
Categories: Offsite Discussion

Help faking DDTs

Haskell on Reddit - Sat, 05/03/2014 - 2:11pm

I am trying to build a data type to control a structure similar to a list, with the difference that we might add arrows to elements. Furthermore, I require that some functions operate only on lists where the number of Up arrows and Down arrows is exactly equal to 1.

Things went smoothly, until I try to convert a normal list to the richer list: Code here (the commented block at the end will not work!)

Any suggestions on how to fix things, or maybe simplifying it.

submitted by BanX
[link] [7 comments]
Categories: Incoming News

extensible records - Vinyl - alternatives?

haskell-cafe - Sat, 05/03/2014 - 11:16am
Dear All, I'm searching a handsome library for handling large amounts of configuration data in a flexible manner. So to speak I want to use some kind of inheritance of data fields. I think this is where the extensible records discussion is a proper description of my use case. I've found 2 libraries making this work, so far: HList Vinyl I currently prefer Vinyl due to the complex types in HList, lens compatibiliy, named labels. (I love the HList and OOHaskel papers, but for practical use, I currently prefer Vinyl). What do you think, what is the best way nowadays to use extensible records? Is Vinyl a good choice from your point of view? regards Peter _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

How far away are we from commercial functional-programming-based hardware?

Haskell on Reddit - Sat, 05/03/2014 - 9:29am

I know of the (Reduceron)[http://www.cs.york.ac.uk/fp/reduceron/], I'm wondering how long it will be until research like this is finished, chips are produced, and I can build a computer based on functional paradigms.

Are others interested in a computer like this? It must be clear there's a niche market here.

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

www.youtube.com

del.icio.us/haskell - Sat, 05/03/2014 - 6:36am
Categories: Offsite Blogs

twdkz.wordpress.com

del.icio.us/haskell - Sat, 05/03/2014 - 6:21am
Categories: Offsite Blogs

Experimenting a new plotting library

haskell-cafe - Fri, 05/02/2014 - 10:44pm
Hi cafe, I'm experimenting a new plotting library which makes use of the API of diagrams. I decided to start this work, because: 1. There is few plotting library written in pure Haskell 2. Haskell-chart, one of the most featured library, is hard to extend and there is no straightforward way to compose or modify the plots generated by this library. I had some ideas for the new library. You can get some feeling from here: https://github.com/kaizhang/haskell-plot I'm still relatively new to haskell and don't have much experience in making plots either. Hopefully I can get some suggestions from you guys and improve my programming skills through this process. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Categories: Offsite Discussion

Parsec lookAhead with choice (<|>) doesn't work asexpected?

haskell-cafe - Fri, 05/02/2014 - 10:32pm
Hi List, There is my first email on haskell-cafe, I must admit haskell is a amazing language even though I found it hard to program. I'm trying to use Parsec to parse a text file something like: format 1) HEADER BODY format 2) BODY BODY = many DATA_FIELDS I must distinguish the format is either 1) or 2), because I need process them differently. So I'm trying to use lookAhead & <|>, something like: format1Header = do HEADER_parser1 HEADER_parser2 return .. format2Header = do -- whatever return .. headerVersion = do version <- (lookAhead format1Header) <|> (lookAhead format2Header) return version Howerver if format1Header parser failed headerVersion just return failure without trying format2Header parser. Full source code is attached, you can load the source then just run ``main'' I searched seems similar issue had been reported: https://groups.google.com/forum/#!topic/fa.haskell/NGjQqR05-TA Is there anything I'm fundamentally wrong with lookAhead and <|> in Parsec? How can I get hea
Categories: Offsite Discussion

Simon Michael: Creating well-behaved Hakyll blog posts

Planet Haskell - Fri, 05/02/2014 - 9:24pm

Posts in a Hakyll-powered blog need to be created with care, if you want your feed to work well with clients and aggregators. There are many things to remember:

  • If you have clones of your site, decide which one to work in and make sure it’s up to date
  • Create the file in the right place
  • Name it consistently (I use YYYY-MM-DD-url-safe-title.md)
  • In my setup, prefix it with _ if it’s a draft (I render but don’t publish those)
  • Set title, tags, and author with a metadata block
  • Set published time with metadata to get a more precise timestamp than Hakyll can guess from the filename. Include a time zone. Use the right format.
  • When moving a post from draft to published:
    • Update the published time
    • Update the file name if the title or publish date has changed
  • If changing a post after it has been published: set updated time in the metadata
  • At some point, commit it to version control and sync it to other clones

I find this makes blogging feel tedious, especially after an absence when I’ve forgotten the details. Update: case in point, I managed to share an ugly template post with Planet Haskell readers while working on this one.

So I’m trying out this bash shell script, maybe it will help. Adjust to suit your setup.

# add to ~/.bashrc # "blog SOME TITLE" creates a new hakyll-compatible draft blog post. function blog() { ( DIR=~/src/joyful.com/blog AUTHOR="My Name" TITLE=${*:-TITLE} SLUG=${TITLE// /-} DATE=`date +"%Y-%m-%d"` TIME=`date +"%Y-%m-%d %H:%M:%S%Z"` FILE=_$DATE-$SLUG.md cd $DIR echo creating $FILE cat <<EOF >>$FILE && emacsclient -n $FILE --- title: $TITLE tags: TAG1, TAG2 author: $AUTHOR published: $TIME --- EOF ) }

An example:

$ blog Scripted Hakyll blog post creation creating _2014-05-03-Scripted-Hakyll-blog-post-creation.md (file opens in emacs, edit & save) $ make ./site build Initialising... Creating store... Creating provider... Running rules... Checking for out-of-date items Compiling updated blog/_2014-05-03-Scripted-Hakyll-blog-post-creation.md Success
Categories: Offsite Blogs

Simon Michael: Creating well-behaved Hakyll blog posts

Planet Haskell - Fri, 05/02/2014 - 9:24pm

Posts in a Hakyll-powered blog need to be created with care, if you want your feed to work well with clients and aggregators. There are many things to remember:

  • If you have clones of your site, decide which one to work in and make sure it’s up to date
  • Create the file in the right place
  • Name it consistently (I use YYYY-MM-DD-url-safe-title.md)
  • In my setup, prefix it with _ if it’s a draft (I render but don’t publish those)
  • Set title, tags, and author with a metadata block
  • Set published time with metadata to get a more precise timestamp than Hakyll can guess from the filename. Include a time zone. Use the right format.
  • When moving a post from draft to published:
    • Update the published time
    • Update the file name if the title or publish date has changed
  • If changing a post after it has been published: set updated time in the metadata
  • At some point, commit it to version control and sync it to other clones

I find this makes blogging feel tedious, especially after an absence when I’ve forgotten the details. Update: case in point, I managed to share an ugly template post with Planet Haskell readers while working on this one.

So I’m trying out this bash shell script, maybe it will help. Adjust to suit your setup.

# add to ~/.bashrc # "blog SOME TITLE" creates a new hakyll-compatible draft blog post. function blog() { ( DIR=~/src/joyful.com/blog AUTHOR="My Name" TITLE=${*:-TITLE} SLUG=${TITLE// /-} DATE=`date +"%Y-%m-%d"` TIME=`date +"%Y-%m-%d %H:%M:%S%Z"` FILE=_$DATE-$SLUG.md cd $DIR echo creating $FILE cat <<EOF >>$FILE && emacsclient -n $FILE --- title: $TITLE tags: TAG1, TAG2 author: $AUTHOR published: $TIME --- EOF ) }

An example:

$ blog Scripted Hakyll blog post creation creating _2014-05-03-Scripted-Hakyll-blog-post-creation.md (file opens in emacs, edit & save) $ make ./site build Initialising... Creating store... Creating provider... Running rules... Checking for out-of-date items Compiling updated blog/_2014-05-03-Scripted-Hakyll-blog-post-creation.md Success
Categories: Offsite Blogs

www.bfpg.org

del.icio.us/haskell - Fri, 05/02/2014 - 9:17pm
Categories: Offsite Blogs

www.bfpg.org

del.icio.us/haskell - Fri, 05/02/2014 - 9:17pm
Categories: Offsite Blogs

www.haskell.org

del.icio.us/haskell - Fri, 05/02/2014 - 9:16pm
Categories: Offsite Blogs

www.haskell.org

del.icio.us/haskell - Fri, 05/02/2014 - 9:16pm
Categories: Offsite Blogs

www.bfpg.org

del.icio.us/haskell - Fri, 05/02/2014 - 9:16pm
Categories: Offsite Blogs