Re: [Haskell-cafe] Importing more modules by default

2013-08-09 Thread aditya bhargava
Cool, BasicPrelude solves my problem perfectly!



On Thu, Aug 8, 2013 at 7:04 AM, David McBride  wrote:

> I've started using BasicPrelude with -XNoImplicitPrelude in all of my
> code.  It imports all of those and some other stuff as well (text related
> functions).  Cuts down on my imports by a little over half.  Kind of wish
> it could be made the default.
>
>
> On Wed, Aug 7, 2013 at 10:23 PM, aditya bhargava  > wrote:
>
>> Hi there,
>> It seems like every Haskell program I write imports the following modules:
>>
>> Control.Monad
>> Control.Applicative
>> Data.Maybe
>> Data.List
>>
>> Is there a good reason why these modules aren't imported by default? When
>> I write a simple script usually a 1/4th of the script is just imports, and
>> my code just looks uglier.
>>
>> Adit
>>
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
>


-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Importing more modules by default

2013-08-07 Thread aditya bhargava
Hi there,
It seems like every Haskell program I write imports the following modules:

Control.Monad
Control.Applicative
Data.Maybe
Data.List

Is there a good reason why these modules aren't imported by default? When I
write a simple script usually a 1/4th of the script is just imports, and my
code just looks uglier.

Adit
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: som-4.0 (for data analysis and visualisation)

2013-06-16 Thread aditya bhargava
This sounds really cool! I'm going to have to read up on SOMs.


On Fri, Jun 7, 2013 at 9:30 AM, Amy de Buitléir  wrote:

> Do you have some data that you'd like to understand better? I'm happy to
> announce a new release of a package called som that may help:
>
> http://hackage.haskell.org/package/som
> https://github.com/mhwombat/som/wiki (wiki)
>
> A Kohonen Self-organising Map (SOM) maps input patterns onto a regular grid
> (usually two-dimensional) where each node in the grid is a model of the
> input
> data, and does so using a method which ensures that any topological
> relationships within the input data are also represented in the grid. This
> implementation supports the use of non-numeric patterns.
>
> In layman's terms, a SOM can be useful when you want to discover the
> underlying structure of some data. I have a brief tutorial in the wiki,
> which I hope to expand over the next few weeks.
>
> WHAT'S NEW
> - It is now easier to for non-math types to create a SOM (see defaultSOM)
> - Added another example to the wiki
>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Platform 2013.2.0.0 64bit.pkg

2013-06-15 Thread aditya bhargava
As a side note, I have stopped having cabal issues since I started using
hsenv. It sandboxes packages for you. So if you have install problems you
just need to delete a local .hsenv directory instead of reinstalling
everything.
On Jun 12, 2013 11:15 PM, "Richard A. O'Keefe"  wrote:

> My original problem was that I wanted to load a particular set of
> packages using 'cabal install'.  It didn't work (cabal install issues)
> and while the maintainer reacted promptly and helpfully, cabal
> kept on trying to install the wrong version.
>
> Part of the problem was that blasting away ~/.cabal and ~/Library/Haskell
> wasn't enough:  it's necessary to blast away ~/.ghc as well (which I had
> forgotten existed and of course never saw).
>
> * It would be handy if 'uninstall-hs' had an option, say
> * uninstall-hs --user
> * so that a user could in one step make it as if they had never
> * used the Haskell Platform.
>
> (Sigh.  Changes to the GHC command line interface since 7.0 have
> broken one of the packages I used to have installed, and the
> maintainer's e-mail address doesn't work any more.  And sometimes
> it seems as if every time I install anything with cabal something
> else breaks.)
>
> PS. Earlier today cabal gave me some confusing messages which
> turned out to mean 'GSL isn't installed'.  Non-Haskell dependencies
> could be explained a little more clearly.
>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ghc-7.4 on CentOS-5.8 ?

2012-06-27 Thread aditya bhargava
Johannes,
This worked for me: http://justhub.org/download


Adit


On Wed, Jun 27, 2012 at 4:05 PM, Tim Docker  wrote:

> Here's the steps I had to go go to get ghc7.0 working on RHEL 5.6:
>
>
> http://twdkz.wordpress.com/2011/12/21/installing-ghc-7-0-3-and-the-haskell-platform-on-rhel-5-6/
>
> I expect that the same steps will work for ghc 7.4.  I need to use a more
> recent version of gcc that than supplied with RHEL5.6.
>
> Tim
>
>
> On 27/06/2012, at 5:33 PM, Johannes Waldmann wrote:
>
> > Dear all,
> >
> > I need a recent ghc on a not-so-recent (?) CentOS.
> >
> > The ghc binary package (7.2 or 7.4) does not work
> > because of a mismatch in the libc version.
> >
> > ghc-7.0 is working but when I use it to compile 7.4,
> > it breaks with some linker error (relocation R_X86_64_PC32 ...)
> > it also suggests "recompile with -fPIC" but I don't see how.
> >
> > (In this particular case, I absolutely cannot change/update the OS.)
> >
> > Thanks, J.W.
> >
> >
> > ___
> > Haskell-Cafe mailing list
> > Haskell-Cafe@haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Scribd's AI challenge has Haskell support

2012-06-27 Thread aditya bhargava
Hey all,
I work at scribd.com. A few weeks ago we had released an AI game. It
allowed you to use Javascript to program a bot. I've been wanting to add
Haskell as a supported language for some time, and it's finally done! I'm
pretty excited since I think we are the first big company to do something
like this. Supporting Haskell was trivial thanks to GHC 7.4's Safe Haskell
extension. I hope more companies support Haskell in the future!

Here's the game: *http://www.scribd.com/jobs/botrace*
Here's the tutorial I wrote for Haskell: *
http://egonschiele.github.com/robot-fruit-hunt/*
Here's the Haskell API: *
https://github.com/egonSchiele/robot-fruit-hunt/blob/master/haskell/HaskellAPI.markdown
*
Here's a sandbox that allows you to test bots locally: *
https://github.com/egonSchiele/robot-fruit-hunt*

Comments and feedback welcome!


Adit

-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Introducing FP Complete

2012-06-05 Thread aditya bhargava
Sounds exciting!

On Tue, Jun 5, 2012 at 6:22 PM, Bartosz Milewski wrote:

> You might have seen a few post by me mentioning FP Complete and asked
> yourself the question: Who is this guy and what is FP Complete?
>
> I haven't been active in the Haskell community, as I'm a relative newcomer
> to Haskell. I am better known in the C++ community where I've been
> promoting functional-style programming and the use of Haskell for modelling
> difficult aspects of template metaprogramming. I've been involved in
> discussing the support for concurrency and parallelism in C++; which, by
> the way, is ages behind what Haskell has to offer.
>
> It was therefore natural for me to join a newly founded company, FP
> Complete, whose goal is to commercialize Haskell. I believe that now is the
> right time for Haskell to become a strong software industry player,
> especially that functional programming is being widely recognized as the
> answer to the recent multicore and GPU explosion.
>
> I can't be much more specific about what the role of FP Complete will be
> in making Haskell an industrial success because our plans are still
> evolving. We should be ready to makes some announcement shortly.
>
> I should mention that the support from the part of the Haskell community
> that we have so far contacted has been overwhelmingly positive. We have
> Simon P-J's blessing, we are in close collaboration with Well Typed, we
> have friends at Galois, Parallel Scientific, Amgen, and many other Haskell
> shops. Hopefully you will hear from and about us more often in the future.
>
> --
> [:Bartosz Milewski:]
>
>
> __**_
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe
>



-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: HandsomeSoup-0.3: CSS selectors for HXT

2012-04-30 Thread aditya bhargava
Because I had the methods written for network and http already (this is
just old code of mine I'm open-sourcing), and I didn't want to bother with
reading the source for hxt-curl or hxt-http (since neither has
documentation and I'm not convinced that they can do exactly what I want).

If you feel strongly about hxt-curl or hxt-http I would love to hear why!
I'm not opposed to using those instead.


Adit




On Fri, Apr 27, 2012 at 1:30 AM, Yves Parès  wrote:

> Why do you make your own overlay to download files via HTTP?
> HXT has backends (hxt-http or hxt-curl) to do that.
>
> Le 27 avril 2012 04:16, aditya bhargava  a
> écrit :
>
>> *Homepage:* http://egonschiele.github.com/HandsomeSoup
>> *On Hackage:* http://hackage.haskell.org/package/HandsomeSoup
>>
>> *Blurb:*
>>
>> HandsomeSoup is the library I wish I had when I started parsing HTML in
>> Haskell.
>> It is built on top of HXT and adds a few functions that make is easier to
>> work with HTML.
>> Most importantly, it adds CSS selectors to HXT. The goal of HandsomeSoup
>> is to be a complete CSS2 parser for HXT (it is very close to this right
>> now).
>>
>>
>>
>> --
>> adit.io
>>
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
>


-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: HandsomeSoup-0.3: CSS selectors for HXT

2012-04-26 Thread aditya bhargava
*Homepage:* http://egonschiele.github.com/HandsomeSoup
*On Hackage:* http://hackage.haskell.org/package/HandsomeSoup

*Blurb:*

HandsomeSoup is the library I wish I had when I started parsing HTML in
Haskell.
It is built on top of HXT and adds a few functions that make is easier to
work with HTML.
Most importantly, it adds CSS selectors to HXT. The goal of HandsomeSoup is
to be a complete CSS2 parser for HXT (it is very close to this right now).



-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Generalizing (++) for monoids instead of using (<>)

2012-04-01 Thread aditya bhargava
After asking this question:
http://stackoverflow.com/questions/9963050/standard-way-of-joining-two-data-texts-without-mappend

I found out that the new infix operator for `mappend` is (<>). I'm
wondering why ghc 7.4 didn't generalize (++) to work on monoids instead. To
me, (++) is much more clear. (<>) means "not equal to" for me. Can anyone
shed light on this decision?


Adit

-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] good lightweight web-framework like sinatra?

2012-03-26 Thread aditya bhargava
Here's another Miku / Sinatra-like framework that looks interesting:

https://github.com/xich/scotty

>From the README:


My issue with miku is that it uses the Hack2 interface
instead of WAI (they are analogous, but the latter seems to have more traction),
and that it is written using a custom prelude called Air



Adit


On Mon, Mar 26, 2012 at 8:09 AM, dag.odenh...@gmail.com <
dag.odenh...@gmail.com> wrote:

> On 21 March 2012 03:45, serialhex  wrote:
>
>> i'm looking for something lightweight, that dosnt need it's own
>> server, can easily run on cgi on an apache with minimal work, and
>> dosn't have many dependancies. i was looking at yesod, but it is
>> bigger than i need for my site (at this point) and would take too much
>> work to get running on my webhost.  though i am looking forward to
>> learning it and using it in the future, i just need something that
>> will play nicely with apache & cgi...
>>
>
> You could use WAI without warp/yesod? There's a CGI handler in wai-extra.
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: Latest package versions on Hackage as JSON/JSONP

2012-03-26 Thread aditya bhargava
Looks cool! One suggestion: make it a webservice I can use like:

typeful.net/~tbot/hackage/[package name]

example:
typeful.net/~tbot/hackage/aeson

So that I don't have to download an 83k file for every request.

Adit


On Mon, Mar 26, 2012 at 4:12 AM, Simon Hengel  wrote:

> Hi,
> I provide a relation between /package name/ and /latest version/ on
> Hackage as both JSON and JSONP.
>
>http://www.typeful.net/~tbot/hackage/
>
> This are static files, and they are regenerated whenever new packages
> are uploaded (with a delay of about one minute).
>
> Two simple usage examples are given in the README[1].
>
> Feel free to access this information for whatever purpose!
>
> Cheers,
> Simon
>
> [1] https://github.com/sol/hackage-jsonp#readme
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Using HaXml

2012-03-25 Thread aditya bhargava
I don't know much about HaXml, but HXT is based on it and comes with a
tutorial:

http://www.haskell.org/haskellwiki/HXT

I also show some basic functionality of HXT in this blog post:

http://adit.io/posts/2012-03-10-building_a_concurrent_web_scraper_with_haskell.html

I'm curious to hear how HaXml compares to HXT / HXML / TagSoup.


Adit



On Sun, Mar 25, 2012 at 1:34 AM, Yves Parès  wrote:

> Hello café,
>
> Provided what I read, HaXml seems to be the recommended library for
> parsing XML files (I'm trying to browse and alter spreadsheets (ODS) and
> possibly release a package when I'm done), is there somewhere tutorials on
> how to use it?
> I used 'xml' package by the past, but HaXml is more substantial.
>
> Thanks.
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>


-- 
adit.io
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe