[Haskell] [ANN] HyperHaskell -- the strongly hyped Haskell interpreter

2016-10-17 Thread Heinrich Apfelmus

Dear all,

it is my pleasure to announce the first release of

   HyperHaskell
  the strongly hyped Haskell interpreter

version 0.1.0.0 ! It is open source and available on Github, where you 
can also find screenshots and further information about installation:


  https://github.com/HeinrichApfelmus/hyper-haskell

HyperHaskell is a graphical Haskell interpreter (REPL), not unlike GHCi, 
but hopefully more awesome. You use worksheets to enter expressions and 
evaluate them. Results are displayed using HTML.


HyperHaskell is cross-platform and should run on Linux, Mac and Windows. 
That said, the binary distribution is currently only built for Mac. Help 
is appreciated!


This is a very first release. Basic features are working, but there is 
plenty of room to grow. Please send me any feedback, suggestions, bug 
reports, contributions ... that you might have!




The long term goal of HyperHaskell is to break the boundaries between 
textual programming ("verbal language") and visual input ("nonverbal 
language"). This includes graphical output, but also editing code while 
it's running ("live coding", planned) and interactive output (e.g. 
"tangible values", planned). This territory is still largely uncharted 
from a purely functional perspective, probably due to a lack of easily 
installed graphical facilities. It is my hope that HyperHaskell may 
provide a common ground for exploration and experimentation in this 
direction.



Related projects that I know of:

* IHaskell- https://github.com/gibiansky/IHaskell
* Haskell for Mac - http://haskellformac.com/

Unfortunately, the first has a reputation for being difficult to 
install, and the second is partially proprietary and Mac only. Hence 
this new effort.



Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com

___
Haskell mailing list
Haskell@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell


Re: [Haskell] I've just published an introductory book on Haskell Data Analysis

2014-06-30 Thread Heinrich Apfelmus

Nick Shukla wrote:

Dear Haskell hackers,

I've just published an introductory book on *Haskell Data Analysis*
<http://haskelldata.com>.

This book is not only a *learning tool* for the Haskell programing
language, but also an introduction to simple *data analysis practices*. Use
it as a Swiss Army Knife of *algorithms* and *code-snippets*. Try a recipe
a day, like a kata for your mind. Breeze through the book for creative
inspiration from catalytic *examples*. And most importantly, dive deep into
the province of data analysis and machine learning in Haskell.

Join the discussion on Reddit
<http://www.reddit.com/r/haskell/comments/296l80/today_i_published_an_introductory_book_on_haskell/>
 and HackerNews <https://news.ycombinator.com/item?id=7951446>.


I cannot comment on the quality of this particular book, but I would
like to remark that in general, the publisher, Packt, has a reputation
for favoring quantity over quality.

In 2012, Packt has contacted me several times, asking whether I would be
willing to write a book "Haskell Financial Data Modeling and Predictive
Analytics" (an offer later taken up by Pavel Ryzhov). Quote:

  We have a new Mini book about 90-100 pages on Haskell financial data
  modelling and predictive analysis, and we are looking for authors with
  the right expertise. I came across your blog* , and I thought it would
  be great to have you as an author for this book. Your expertise in the
  subject is impressive and having you as our author would be a
  pleasure.

The word "blog" was hyperlinked to a blog post of mine [1] which has
absolutely nothing to do with finance or data analysis. I don't know
how, on the basis of this evidence, Packt came to the conclusion that I
would have any expertise in "Haskell financial data modelling and
predictive analysis". I'm not even sure what the title means, because I
have trouble type checking the grammar.

  [1]: http://apfelmus.nfshost.com/blog/2012/10/31-frp-ji.html

Further discussion on the general quality of Packt publications:

  [2]: https://news.ycombinator.com/item?id=6933716

Again, this may not apply to the particular book advertised here.


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com



















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


Re: [Haskell] Haskell stars in experimental film

2012-11-29 Thread Heinrich Apfelmus

Simon Peyton-Jones wrote:

Friends

You may enjoy this weird 2-minute video: 
http://www.youtube.com/watch?v=WtfvoiqLZrs&feature=youtu.be


It stars our cat (who is called Haskell at my children's insistence)
in an "experimental concrete music video", created by a Cambridge
undergrad music student.  Enjoy!  (What is concrete music, btw?)


Ah, so *this* is the famous Glasgow Haskell Cat. I had always wondered 
what the abbreviation GHC stands for.



Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


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


Re: [Haskell] Compositional Compiler Construction, Oberon0 examples available

2012-08-21 Thread Heinrich Apfelmus

Doaitse Swierstra wrote:

Heinrich Apfelmus wrote:


I have a small question: Last I remember, you've mainly been using
your UUAGC preprocessor to write attribute grammars in Haskell,
especially for UHC. Now that you have first-class attribute
grammars in Haskell ("achievement unlocked"), what do you intend to
do with the preprocessor? How do these two approaches compare at
the moment and where would you like to take them?


On the page http://www.cs.uu.nl/wiki/bin/view/Center/CoCoCo there is
a link (http://www.fing.edu.uy/~mviera/papers/VSM12.pdf) to a paper
we presented at LDTA (one of the ETAPS events) this spring. It
explains how UUAGC can be used to generate first class compiler
modules.

We have also a facility for grouping attributes, so one can trade
flexibility for speed. The first class approach stores list of
attributes as nested cartesian products, access to which a clever
compiler might be able to optimize. This however would correspond  a
form of specialisation, so you can hardly say that we have really
independent modules; as always global optimisation is never
compositional). From the point of view of the first class approach
such grouped non-termionals are seen as a single composite
non-terminal.


Ah, I see. So the custom syntax offered by UUAGC is still appreciated, 
but you now intend to compile it to first-class attribute grammars 
instead of "bare metal Haskell". Makes sense. Thanks!



Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


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


Re: [Haskell] [Announce] Compositional Compiler Construction, Oberon0 examples available

2012-08-19 Thread Heinrich Apfelmus

Doaitse Swierstra wrote:

Over the years we have been constructing a collection of Embedded
Domain Specific Languages for describing compilers which are
assembled from fragments which can be compiled individually. In this
way one can gradually ``grow a language'' in a large number of small
steps. The technique replaces things like macro extensions or
Template Haskell; it has become feasible to just extend the language
at hand by providing  extra modules. The nice thing is that existing
code does not have to be adapted, nor has to be available nor has to
be recompiled.

Recently we have been using (and adapting) the frameworks such that
we could create an entry in the ldta11 (http://ldta.info/tool.html)
tool challenge, where one has to show how one's tools can be used to
create a compiler for the Oberon0 language, which is used a a running
example in Wirth's compiler construction book.

We have uploaded our implementation to hackage at:
http://hackage.haskell.org/package/oberon0.

More information can be found at the wiki:
http://www.cs.uu.nl/wiki/bin/view/Center/CoCoCo

You may take a look at the various Gram modules to see how syntax is
being defined, and at the various Sem modules to see how we use our
first class attribute grammars to implement the static semantics
associated with the various tasks of the challenge.

We hope you like it, and comments are welcome,


Awesome!

I have a small question: Last I remember, you've mainly been using your 
UUAGC preprocessor to write attribute grammars in Haskell, especially 
for UHC. Now that you have first-class attribute grammars in Haskell 
("achievement unlocked"), what do you intend to do with the 
preprocessor? How do these two approaches compare at the moment and 
where would you like to take them?



Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


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


Re: [Haskell] Call for GUI examples - Functional Reactive Programming

2011-07-09 Thread Heinrich Apfelmus

David Barbour wrote:

Heinrich Apfelmus wrote:


Can GUI programming be liberated from the IO monad?


I believe it can be. But is FRP the right way to achieve this? Most of the
GUI problems I've ever encountered involve open systems: configuration
files, plugins, command and control, database crud, networking. Most of the
FRP GUI examples I've encountered involve closed systems: calculators,
tangible values, single-player games.

I am often left with the feeling that we're bridging the wrong gaps with
FRP. Consequently, I've been developing a paradigm that adapts what I
consider the best features of FRP for composition of open systems [1].

Anyhow, I'm guessing your query is because you'd like some sample problems
upon which to whet your FRP model. Rather than a bunch of toy UI elements, I
would suggest choosing examples with open elements, such as:
* a personal wiki (cf. TiddlyWiki) with a file or SQLite database for
persistence
* a database browser/editor that reads the schema from the database and
adapts the display appropriately
* a Dr. Mario clone with support for online 2-player mode
* an RSS display widget, configured with a bookmark file
* a stock-ticker or weather-report widget with a simple configuration file
* maps and KML

[..]

I'm sure you can think of something more interesting to yourself, of course.
The world needs proofs that open, dynamically configured systems are handled
effectively in FRP. Or, if you struggle and the resulting code is inelegant
without compromising the purity of FRP, well, that's useful information,
too.


Nice examples. The real-time data display (stock ticker, weather) has 
been mentioned a lot, I will probably try that one.


I don't see any difficulties with open systems, though. Sure, you need 
some driver code to communicate, but it's all Events and Behaviors from 
then on. The function


fromPoll :: IO a -> NetworkDescription (Behavior a)

is particularly nice, it allows you to interpret any data source as a 
time-varying value. For instance, here the completely random function 
that returns a random value at each point in time:


   brandom <- fromPoll (randomRIO (0,1) :: IO Double)


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


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


Re: [Haskell] ANN: syntactic-0.1

2011-05-10 Thread Heinrich Apfelmus

Emil Axelsson wrote:

Hello Heinrich! Thanks for your interest!

In principle, this is exactly the kind of thing you can do with 
syntactic -- if you can make your data type fit into the framework, that 
is. A compilation phase would then look something like this:


  phase :: AST (C1 :+: TheRest) -> AST (C2 :+: C3 :+: TheRest)

This phase destroys the constructor C1 and introduces C2 and C3.

Now, the question is whether your data type can be made to fit into the 
framework. The only problem I can see (but there may be more!) is that 
you'd have to treat EventD and BehaviorD as parts of the same data 
structure. I've pasted an example of how to do that here:


  http://hpaste.org/46525/

Here, the difference between Event and Behavior is denoted by the type 
constructors E and B respectively:


  type Event a = ASTF (Never :+: B2E :+: Pure :+: E2B) (E a)

  type Behavior a = ASTF (Never :+: B2E :+: Pure :+: E2B) (B a)

You decide if this seems like an acceptable solution...


Ah, interesting trick. I think it's ok because none of the data types 
contains superfluous constructors.



I'm also unhappy about some of the boilerplate. For instance, have a
look at the function  goE  in  compileAccumB  (line 210), it's just a
generic applicative traversal through the data type.


Most likely, this boilerplate could be simplified using syntactic.


Hm, does the boilerplate get removed or only simplified? I was hoping 
that one could use a completely generic traversal; but is that actually 
the case?



Would your library make me happier? Note that I have an additional
complication: I need to observe sharing and I need to support 
recursive AST.


I plan to add observable sharing soon. Once that's is in place, it 
should -- I think/hope -- be easy to support cycles. This is not 
something we need in Feldspar, so it might take a while before I get 
around to supporting cycles, though.


I'd be happy to give more assistance should you choose to try out 
syntactic for your library!


Thanks for your offer!

On closer inspection, I'm discovering another issue, namely the need for 
the  Typeable  class. This is quite unfortunate, because it would mean 
that I won't be able to make an API built on type classes like Functor 
or Applicative. Some discussion on that can be found at the end of


http://apfelmus.nfshost.com/blog/2011/04/24-frp-push-driven-sharing.html


So, it looks like I can't make use of  syntactic  at the moment. Then 
again, my library is probably one of the strongest tests of expressivity 
for  endeavors like  syntactic , so that's fine. Another example of 
similar difficulty would be D. Swierstra's recent parser/grammar 
combinators that can handle left-recursive grammars. Once  syntactic 
can deal with those, you're the king! :)



Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com


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


[Haskell] Re: Announce: revamped free theorems generator

2010-06-23 Thread Heinrich Apfelmus

Sebastian Fischer wrote:
I am interested in the mentioned laws because I want to show the monad 
laws for the definition


instance Monad FreeMonoid where
  return x = FreeMonoid ($x)
  a >>= f  = a >>- f

This definition of `>>=` is *not* the usual one for continuation monads, 
but if the mentioned properties hold, I think it also satisfies the 
monad laws.


Yes, it does satisfy the monad laws because  FreeMonoid  is the "free 
algebra functor"  T  for monoids as a T-algebra. In other words, a type 
 A  is a monoid exactly when there is a map  T A -> A . I've learned 
this idea from Dan Piponi:


http://blog.sigfpe.com/2007/02/monads-for-vector-spaces-probability.html
http://blog.sigfpe.com/2007/06/monads-from-algebra-and-the-gray-code.html


Regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com

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


[Haskell] ANN: operational-0.2.0.0

2010-04-26 Thread Heinrich Apfelmus
Dear Haskellers,

I'm pleased to announce the *release* of  operational-0.2.0.0 , a tiny
library for implementing monads by specifying their operational semantics.

This library is based on "The Operational Monad Tutorial", first
published in Issue 15 on The Monad.Reader.

  http://themonadreader.wordpress.com/2010/01/26/issue-15/

The *main abstraction* is a type  Program  corresponding to a list of
primitive instructions which are then interpreted with operational
semantics given by the user; the monad laws hold automatically. Monad
transformers can also be implemented and will automatically satisfy the
lifting laws.

The library comes with *excessive documentation*, including a proof of
the monad laws. Elaborate example code demonstrates previously difficult
to implement monads, like a CGI monad that models a web session but does
not require the CGI script to run in a persistent process. The newest
addition is a program for playing tic-tac-toe that demonstrates a monad
for implementing different players, like humans or AI.

*Get it* from hackage

  http://hackage.haskell.org/package/operational

or browse the project website and documentation

  http://projects.haskell.org/operational/


Changes
---
version 0.1.0.0 -> version 0.2.0.0

* changed name of view type to `ProgramView`
* added instances for  mtl  classes
* new function `liftProgram` to embed `Program` in `ProgramT`

* new example  TicTacToe.hs
* various documentation updates



Regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com

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


[Haskell] Re: HaskellWiki Update

2009-01-19 Thread Heinrich Apfelmus
Ashley Yakeley wrote:
> There has been a lot of spam on HaskellWiki. Since anonymous edits have
> been switched off, a spammer tactic has been to create hundreds of
> accounts to evade individual account blocks.
> 
> To combat this, I have
> 
> 1. deleted all user accounts that have made no edits;
> 2. switched off account creation;
> 3. blocked at least some of the remaining spam accounts.
> 
> This is obviously not ideal, as there is now no way for new users to
> edit the wiki. I will investigate appropriate ways to allow account
> creation.

Maybe it could help to restrict the account creation rate per IP? For
example, every IP may only create one account per 12 hours.


Regards,
apfelmus

-- 
http://apfelmus.nfshost.com

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