[Haskell-cafe] FreeSect -- generalised sections syntax extension

2012-02-29 Thread Ras Far
Hello,

I bit premature perhaps but I wanted to post it on a leap day...

http://fremissant.net/freesect

Thanks for eyebloom on #haskell for motivating me to finally implement
an old idea.  Thanks to the rest on #haskell for doing their best to
talk me out of it. ;)

I make no claims regarding the usefulness of the extension, but some
folks might find it interesting, or may just appreciate additional
examples of using HSE and SYB.  I regret that I am not a better
Haskell coder, but it is what it is!

Kind Reg'ds,
Andrew Seniuk (rasfar)

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


Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension

2012-03-01 Thread Ras Far
For anyone who tried building the implementation linked off the
fremissant page (see above email), there was a glitch or two and this
is fixed.  The problem being simply the target path -- I build to a
ramdisk because, as is often the case, GHC produces a rather large
binary and I don't like to thrash my HDD during development.  The
executable is now produced in the root directory of the distro.

Cheers,
Andrew

On Wed, Feb 29, 2012 at 9:27 PM, Ras Far ras...@gmail.com wrote:
 Hello,

 I bit premature perhaps but I wanted to post it on a leap day...

 http://fremissant.net/freesect

 Thanks for eyebloom on #haskell for motivating me to finally implement
 an old idea.  Thanks to the rest on #haskell for doing their best to
 talk me out of it. ;)

 I make no claims regarding the usefulness of the extension, but some
 folks might find it interesting, or may just appreciate additional
 examples of using HSE and SYB.  I regret that I am not a better
 Haskell coder, but it is what it is!

 Kind Reg'ds,
 Andrew Seniuk (rasfar)

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


Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension

2012-03-02 Thread Ras Far
Hi John,

Thanks for your feedback.  It would be preferable to use regular
parentheses to delimit the section, but it could only work in special
cases.  Consider this expression using free sections:

map  _[ f (g __ y) ]_  bs

If that were written map (f (g __ y)) bs and parentheses used to
delimit the freesect, that would give you the equivalent of

map  ( f _[ g __ y ]_ )  bs

which is incorrect (doesn't type).

Also, one may want more than a single free section in a RHS, which
would not be possible without distinct grouping syntax.

I looked into some sort of default context inference (like, the
tighest grouping which passes the type check), but that gets fairly
complicated and might still result in ambiguity, in case more than one
possible grouping types correctly.

I also set out originally to overload the single-underscore for
wildcard, but was unsuccessful (reduce/reduce conflicts in the HSE
parser), so I settled on double-underscore which I've come to think
preferable.

As I said on the linked web page, I'm still exploring default context
inference (for interest's sake), and if anyone can suggest a nice way
to use SYB to compute the join (in the semilattice sense) of all terms
in a constructed tree which have type T, I'd really like to see
that...

-Andrew


On Thu, Mar 1, 2012 at 10:01 PM, John Lask jvl...@hotmail.com wrote:


 On Wed, Feb 29, 2012 at 9:27 PM, Ras Farras...@gmail.com  wrote:

 Hello,

 I bit premature perhaps but I wanted to post it on a leap day...

 http://fremissant.net/freesect

 Thanks for eyebloom on #haskell for motivating me to finally implement
 an old idea.  Thanks to the rest on #haskell for doing their best to
 talk me out of it. ;)

 I make no claims regarding the usefulness of the extension, but some
 folks might find it interesting, or may just appreciate additional
 examples of using HSE and SYB.  I regret that I am not a better
 Haskell coder, but it is what it is!

 Kind Reg'ds,
 Andrew Seniuk (rasfar)




 why couldn't you use standard brackets ( to delimit the extent ? I suppose
 that would have added complexity to the syntax analysis, however I think it
 would have been (in my mind) neater.


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


Re: [Haskell-cafe] FreeSect -- generalised sections syntax extension

2012-03-03 Thread Ras Far
So we can have ... chiastic freesects?  This sounds like too much fun!

I find chiasmus is a term from linguistics?  From [1]: The elements
of simple chiasmus are often labelled in the form ABBA, where the
letters correspond to grammar, words, or meaning.  So we've got love,
too (Aramaic word “Abba” = love of God or so...)  Also coincidental,
since a lot of the literary instances are apparently found in sacred
texts (although Coleridge comes up a lot too, cough).

So many coincidences around this.  I'd written up the idea for the
Haskell extension in 2003 (calling them arbitrary sections), but
only decided to implement them about a week ago.  Had just gotten
started about an hour earlier, when eyebloom on #haskell asks about
the same thing, right down to the _ syntax.  (I offered him
collaboration but he didn't get back to me, hope you're not sore
eyebloom, anyhow I don't mind you were maybe too busy.)

Then I get hacking Language.Haskell.Exts and -- the most recent
extension already added is TupleSections!  And there's no other
extension so related to this idea.

Now the serendipity with Wren's linguistic research.  And even the
freegeek domain.  Fantastic.  Wren, your slides look great, thanks for
the link, I think I'll read them tonight.  Do you have a paper version
of the slides at all?  Slides can be a bit terse on their own.

Yours Chiastically,
Andrew

[1] http://en.wikipedia.org/wiki/Chiastic_structure

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


Re: [Haskell-cafe] Haskell-platform and ghc 7.4

2012-03-11 Thread Ras Far
Hi.  What has worked for me is to install a binary package for 7.4.1:

http://www.haskell.org/ghc/download_ghc_7_4_1#binaries

You can install it someplace special by giving
--prefix=/someplace/special to the configure script.  Then, adjust
your path to hit /someplace/special/bin before it hits the location of
your GHC 7.2.

Maybe there's a preferred way, but this works for me (juggling 6.12.3,
7.0.4 and 7.4.1).

-Andrew

On Sun, Mar 11, 2012 at 4:58 PM, G gra...@fatlazycat.com wrote:
 Am new to haskell, but one thing I wanted to try out was the performance of
 an app in haskel. Having issues getting it to compile under ghc 7.0.4. The
 owner recommend trying to upgrade to 7.2/7.4

 I see a warning that the haskell-platform isn't compatible with with 7.4.1,
 or so my homebrew install says.

 Can it be made to compile ?? Can I remove the haskell-platform and then
 install the dev tools from the haskell-platform via cabal etc once I have
 moved to 7.4.x etc ?

 Thanks


 ___
 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


[Haskell-cafe] ANNOUNCE: freesect-0.0.5

2012-03-11 Thread Ras Far
Hi,

I'm pleased to announce my first package, freesect, which is a Haskell
syntax extension to generalise sections.

Please visit the homepage http://www.fremissant.net/freesect for more
information.  The package is also available on Hackage.
Some previous discussion occurred on the haskell-cafe thread
http://www.mail-archive.com/haskell-cafe@haskell.org/msg97643.html

It's been an exhilarating experience!

Kind Regards,
Andrew Seniuk (rasfar on #haskell)

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


Re: [Haskell-cafe] ANNOUNCE: graphviz-2999.13.0.0

2012-04-19 Thread Ras Far
Hello Ivan,

Thanks for bringing Graphviz to Haskell, and for your continuing
dedication to making it more complete!

I just tried Graphvis for the first time a few days ago.  I regretted
the absence of example code, especially as the API has been evolving,
so that examples on the Web do not generally work without change.

I see that the inclusion of QuickStart-style documentation is on your
short-term list of milestones.  I suppose an example program is not
quite that, but it might help.  Do you have something along these
lines?  Or, if not, if I managed to put something together which
exercises a good cross-section of the features, do you think you could
include it with the next release?  I suppose there's a trade-off
between ease of maintaining the code through releases, and feature
coverage of the example(s)...

I'm CC-ing haskell-cafe in case anyone reading already has some
example code like this, which they'd be willing to donate?  If
possible, it ought to be small yet illustrate a lot of features.

Kind Regards,
Andrew

On Thu, Apr 19, 2012 at 10:10 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
 I should have pointed out that for most people, there should be
 minimal to no API change with this release; the only change I needed
 to make in my own code was that a type-class I had defined in
 Graphalyze was removed as it provided the impetus for the ToGraphID
 class mentioned below.

 On 19 April 2012 22:52, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com 
 wrote:
 I'm hoping the second part of the version number isn't ominous, but
 I've just uploaded the latest release in my bindings for the Graphviz
 suite of graph visualisation tools.

 The changes in this release are:

 * Added support for the `osage` and `patchwork` visualisation tools,
  available as of Graphviz-2.28.0.

 * Updated attributes as of Graphviz-2.28.0:

    - `SVG` colors are now supported, and the support for different
      colors has been revamped.

    - `overlap=false` is now equivalent to `overlap=prism` and the
      `RemoveOverlaps` option has been removed.

    - `LabelScheme` and `Rotation` are new attributes for use with
      `sfdp`.

    - `Scale` is a new attribute for use with `twopi`.

    - Add new italics, bold, underline, superscript and subscript
      options for HTML-like labels.

    - `LHeight` and `LWidth` for getting the height and width of the
      root graph and clusters.

 * Updated attributes from the current development branch of Graphviz
  (i.e. 2.29.*).  Please note that these will probably not work yet,
  but are implemented now for future-proofing.

    - A new style for edges: `Tapered`.

    - `XLabel` allows you to specify labels external to a node or
      edge.  `ForceLabels` allow you to specify that these should be
      drawn even when they will cause overlaps.

    - `ImagePath` allows you to specify where to search for images.

    - HTML-like labels now support `ID` values as well as horizontal
      and vertical rules.

    - `BgColor` and `FillColor` now take a list of colors: this allows
      gradient fills for graphs, clusters and nodes.  The `Radial`
      style and `GradientAngle` are also used for this purpose.

    - `FillColor` is now used by edges to set the color of any arrows.

    - [WebP](http://en.wikipedia.org/wiki/WebP) output support added.

 * Other attribute changes:

    - Use a specified data type for the `Ordering` attribute rather
      than an arbitrary `Text` value, and provide a documented wrapper
      in `Data.GraphViz.Attributes`.

    - `Bb` has been renamed `BoundingBox`.

    - `ID` now only takes `EscString` (a type alias for `Text`) values
      rather than arbitrary `Label`s.

    - The `Data.GraphViz.Attributes.HTML` module has had all values
      re-named and is now meant to be imported qualified.  It is also
      no longer re-exported from `Data.GraphViz.Attributes.Complete`.

 * The `ToGraphID` class provides a common wrapper to help create
  cluster identifiers, etc.

 * Cabal's `Test-Suite` functionality is now used.  As part of this,
  the `Data.GraphViz.Testing` module and sub-modules are no longer
  exported by the library.

 * The new `Benchmark` support in Cabal-1.14 is now used for the
  benchmark script.

 * Dropped support for base-3.

 * The `Data.GraphViz.State` module is no longer exposed, as there's no
  need for users to use it.

 * Bugfixes:

    - Some corner cases in canonicalisation prevented it from being
      idempotent.

    - The `TestParsing` script will no longer crash and refuse to
      continue if an IO-based error (e.g. unable to successfully call
      `dot`) occurs.

    - A typo was spotted by **Gabor Greif**.

 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 http://IvanMiljenovic.wordpress.com



 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 http://IvanMiljenovic.wordpress.com

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org