Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-06-01 Thread Doug McIlroy
  I love Haskell. It is my absolute favorite language.
  But I have a very hard time finding places where I can actually use it!
 
 have you considered your head as such a place that should be easy to find.

An excellent reason.  Haskell shines unusually brightly on
applications that have an algebraic structure. Laziness
relieves a plethora of sequencing concerns.  I particularly
treasure one experience:

I asked a guru about the complexity of converting regular
expressions to finite-state automata without epsilon transitions
(state transitions that don't produce output).  The best he
knew was O(n^3), which is the cost of removing epsilon transitions
from arbitrary automata.  Then I wrote about a dozen lines of Haskell
to do the job--and running time turned out to be O(n^2). Once
I'd written the code, it became clear how to do it in other
languages, but I never would have found the theorem without
the help of Haskell.  (This without even bringing in the heavy
artillery of higher-order functions and monads.)

Doug McIlroy

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


Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-06-01 Thread Yves Parès
 Then I wrote about a dozen lines of Haskell to do the job--and running
time turned out to be O(n^2).

Do you still have the code?

2012/6/1 Doug McIlroy d...@cs.dartmouth.edu

   I love Haskell. It is my absolute favorite language.
   But I have a very hard time finding places where I can actually use it!
 
  have you considered your head as such a place that should be easy to
 find.

 An excellent reason.  Haskell shines unusually brightly on
 applications that have an algebraic structure. Laziness
 relieves a plethora of sequencing concerns.  I particularly
 treasure one experience:

 I asked a guru about the complexity of converting regular
 expressions to finite-state automata without epsilon transitions
 (state transitions that don't produce output).  The best he
 knew was O(n^3), which is the cost of removing epsilon transitions
 from arbitrary automata.  Then I wrote about a dozen lines of Haskell
 to do the job--and running time turned out to be O(n^2). Once
 I'd written the code, it became clear how to do it in other
 languages, but I never would have found the theorem without
 the help of Haskell.  (This without even bringing in the heavy
 artillery of higher-order functions and monads.)

 Doug McIlroy

 ___
 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] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-06-01 Thread Doug McIlroy
  I love Haskell. It is my absolute favorite language.
  But I have a very hard time finding places where I can actually use it!
 
 have you considered your head as such a place that should be easy to find.

Excellent advice.  Haskell shines unusually brightly on
applications that have an algebraic structure. And laziness
relieves a plethora of sequencing concerns.  I particularly
treasure one experience:

I asked a guru about the complexity of converting regular
expressions to finite-state automata without epsilon transitions
(state transitions that don't produce output).  The best he
knew was O(n^3), which is the cost of removing epsilon transitions
from arbitrary automata.  Then I wrote about a dozen lines of Haskell
to do the job--and running time turned out to be O(n^2). Once
I'd written the code, it became clear how to do it in other
languages, but I never would have found the theorem without
the help of Haskell.  (This without even bringing in the heavy
artillery of higher-order functions and monads.)

Doug McIlroy

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


Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-06-01 Thread Michael Oswald
 So anyway I'd like to request feedback: where can I use Haskell besides
 simple CLI utilities, dull server code, or project Euler problems? Even
 if it's just to contribute to getting Haskell in the environments
 mentioned above, any feedback is welcome!

Well I have used it for some not-so-typical Haskell tasks:

- An installer (command line) for some other software in C++ (unpacking,
installing COTS libraries, installing and setting up MySQL on different
machines including replication, setting up and installing the software
and also apply updates to it)
- A satellite simulator for testing mission control systems. It's very
basic but it can handle telecommands and arbitrary telemetry (definable
with a DSL which is loaded and interpreted at runtime), as well as basic
ground station routing messages, on-board queue simulation, on-board
software upload/download simulation and also some statistics about sent
telecommands. I actually used it for some telecommand performance
measurements for a real mission control system for an existing satellite
(which it simulated) as well as on debugging actions on the MCS. For me
the main point was to see if I could implement this functionality in
Haskell (there are other test-sims in C++ but with less functionality
and still a lot bigger in LOC). Due to the imperative nature and my
(ahem) limited abilities in Haskell the code is in parts very ugly, but
it grows and is refactored if I need new features. Currently if I have
time I am working on a GUI for it (otherwise it's just command line).
- Various test programs to stimulate servers with input. Especially
encoding/decoding of various (binary) protocols is far much easier and
faster to write in Haskell.
- Various conversion tools. E.g. currently I have a tool in the pipe
(just in the beginning stage) to convert something like CSV output into
a OpenOffice Calc spreadsheet for further processing/graphing/whatever.
Also I'd like to have a kind of OpenDocument library to be able to
generate reports, so this is the next step then. Due to my very limited
time in the moment this is currently stalled.


For me it would also be quite interesting to have a working CORBA
implementation with Haskell (as we have some applications at work which
use it), but I seem to be the only one.


lg,
Michael


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


Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-31 Thread Johannes Waldmann
Jonathan Geddes geddes.jonathan at gmail.com writes:

 I love Haskell. It is my absolute favorite language. 
 But I have a very hard time finding places where I can actually use it!

have you considered your head as such a place that should be easy to find.

even just for specifying things, Haskell is tremendously useful.
even if you don't write programs, but just their types.
you can express your software design that way,
and have it formally verified (by the compiler's type checker).

best regards, J. W.



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


Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-31 Thread Ivan Perez
On 31 May 2012 01:30, Jonathan Geddes geddes.jonat...@gmail.com wrote:
 I love Haskell. It is my absolute favorite language. But I have a very hard
 time finding places where I can actually use it!
This has been bugging me for years and, like you, I think we ought to
lean towards web-pages and mobile devices.

Yesod has been a tremendous push forward in this direction but, as you
already stated, the browser and android devices remain mostly
unexplored in Haskell. Here's my bit:

- There's a port of ghc for iphone.
- There's frege (http://code.google.com/p/frege/), a non-strict, pure,
functional programming language in the spirit of Haskell.
- I've been working as a freelance developer for some time now. I
focus on desktop apps in Haskell. I can't say I'm overwhelmed by the
amount of offers (speaking of which, if anyone needs a freelance
haskell developer,... ahem), but this area will not be clinically
dead as long as we cannot use web applications knowing (99% sure)
that the owner of the website cannot use our personal information for
any purpose other than giving us our service. There's only two kinds
of clients here, though: those that explicitly want Haskell, and those
than don't care about the programming language. Otherwise, you'll have
to sell Haskell and, personally, I'm not that good a salesman (10%
success, tops).
- I've also ported Haskell designs to other programming languages
(with small adaptations). I only found this cost-effective because the
code in Haskell was not going to be thrown away.

Good luck. Please, let us know what you find.

Cheers,
Ivan.

 I had hoped that compiling Haskell to C with -fvia-C (or would it be just
 -C?) would allow Haskell to run in new, uncharted territory such as Android
 (with NDK), IOS, Google's NaCl, etc. But today I learned that GHC's C
 backend has been deprecated!  Is it more difficult than I am imagining to
 get Haskell to work in these environments? Is it simply a matter of low
 interest in this kind of work? Or something more fundamental? Am I missing
 something?

 I'm hoping that the Haskell-JavaScript efforts will mature enough to make
 Haskell viable for client-side web apps. (I think the first sign of this
 will be a self-hosting Haskell-JavaScript compiler.)

 I use Haskell for Server-Side code with various web frameworks, but over the
 years more and more of the app logic is moved into client-side JavaScript,
 leaving the server-side code as little more than a simple validation and
 security layer over the database and other services. Haskell doesn't have
 any trouble with this, of course, but it's not exactly a role where it can
 shine. (Of course this is not true of ALL server-side code, just the kind of
 apps I have been writing.)

 So anyway I'd like to request feedback: where can I use Haskell besides
 simple CLI utilities, dull server code, or project Euler problems? Even if
 it's just to contribute to getting Haskell in the environments mentioned
 above, any feedback is welcome!

 Thanks for reading,

 --J Arthur

 ___
 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] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-31 Thread Jonathan Geddes
Thanks for the responses, everyone.

J. W. wrote:
have you considered your head as such a place that should be easy to
find.
 even just for specifying things, Haskell is tremendously useful.
even if you don't write programs, but just their types.
you can express your software design that way,
 and have it formally verified (by the compiler's type checker).

Yes! And in fact this is exactly how I use Haskell now (aside from little
scripts and such). It has had a HUGE effect on the way I write software.
There have been a number of times that a colleague has asked what a strange
comment was in my Java[Script] code. When I tell them that the funny
looking one-liner is the Haskell equivalent of the following 30+
Java[Script] lines, they are incredulous, to say the least. But taking that
beautiful Haskell one-liner and manually transcribing it into an imperative
language feels like being a human compiler. My favorite example of this was
the use of the power set in JavaScript:

//powerSet = filterM (const [True, False])

and then a few dozen JavaScript lines it compiled down to via the human
compiler.

--J Arthur


On Thu, May 31, 2012 at 8:41 AM, Ivan Perez ivanperezdoming...@gmail.comwrote:

 On 31 May 2012 01:30, Jonathan Geddes geddes.jonat...@gmail.com wrote:
  I love Haskell. It is my absolute favorite language. But I have a very
 hard
  time finding places where I can actually use it!
 This has been bugging me for years and, like you, I think we ought to
 lean towards web-pages and mobile devices.

 Yesod has been a tremendous push forward in this direction but, as you
 already stated, the browser and android devices remain mostly
 unexplored in Haskell. Here's my bit:

 - There's a port of ghc for iphone.
 - There's frege (http://code.google.com/p/frege/), a non-strict, pure,
 functional programming language in the spirit of Haskell.
 - I've been working as a freelance developer for some time now. I
 focus on desktop apps in Haskell. I can't say I'm overwhelmed by the
 amount of offers (speaking of which, if anyone needs a freelance
 haskell developer,... ahem), but this area will not be clinically
 dead as long as we cannot use web applications knowing (99% sure)
 that the owner of the website cannot use our personal information for
 any purpose other than giving us our service. There's only two kinds
 of clients here, though: those that explicitly want Haskell, and those
 than don't care about the programming language. Otherwise, you'll have
 to sell Haskell and, personally, I'm not that good a salesman (10%
 success, tops).
 - I've also ported Haskell designs to other programming languages
 (with small adaptations). I only found this cost-effective because the
 code in Haskell was not going to be thrown away.

 Good luck. Please, let us know what you find.

 Cheers,
 Ivan.

  I had hoped that compiling Haskell to C with -fvia-C (or would it be just
  -C?) would allow Haskell to run in new, uncharted territory such as
 Android
  (with NDK), IOS, Google's NaCl, etc. But today I learned that GHC's C
  backend has been deprecated!  Is it more difficult than I am imagining to
  get Haskell to work in these environments? Is it simply a matter of low
  interest in this kind of work? Or something more fundamental? Am I
 missing
  something?
 
  I'm hoping that the Haskell-JavaScript efforts will mature enough to
 make
  Haskell viable for client-side web apps. (I think the first sign of this
  will be a self-hosting Haskell-JavaScript compiler.)
 
  I use Haskell for Server-Side code with various web frameworks, but over
 the
  years more and more of the app logic is moved into client-side
 JavaScript,
  leaving the server-side code as little more than a simple validation and
  security layer over the database and other services. Haskell doesn't have
  any trouble with this, of course, but it's not exactly a role where it
 can
  shine. (Of course this is not true of ALL server-side code, just the
 kind of
  apps I have been writing.)
 
  So anyway I'd like to request feedback: where can I use Haskell besides
  simple CLI utilities, dull server code, or project Euler problems? Even
 if
  it's just to contribute to getting Haskell in the environments mentioned
  above, any feedback is welcome!
 
  Thanks for reading,
 
  --J Arthur
 
  ___
  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] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-31 Thread Vagif Verdi
Besides our web app and batch pdf generation procedures, i use haskell for 
internal one-off tasks.
Often i am being asked to import various data to database from text/excel 
files. Haskell is an excellent tool for this.


On Wednesday, May 30, 2012 5:30:28 PM UTC-7, Jonathan Geddes wrote:

 I love Haskell. It is my absolute favorite language. But I have a very 
 hard time finding places where I can actually use it!

 I had hoped that compiling Haskell to C with -fvia-C (or would it be just 
 -C?) would allow Haskell to run in new, uncharted territory such as Android 
 (with NDK), IOS, Google's NaCl, etc. But today I learned that GHC's C 
 backend has been deprecated!  Is it more difficult than I am imagining to 
 get Haskell to work in these environments? Is it simply a matter of low 
 interest in this kind of work? Or something more fundamental? Am I missing 
 something?

 I'm hoping that the Haskell-JavaScript efforts will mature enough to make 
 Haskell viable for client-side web apps. (I think the first sign of this 
 will be a self-hosting Haskell-JavaScript compiler.)

 I use Haskell for Server-Side code with various web frameworks, but over 
 the years more and more of the app logic is moved into client-side 
 JavaScript, leaving the server-side code as little more than a simple 
 validation and security layer over the database and other services. Haskell 
 doesn't have any trouble with this, of course, but it's not exactly a role 
 where it can shine. (Of course this is not true of ALL server-side code, 
 just the kind of apps I have been writing.)

 So anyway I'd like to request feedback: where can I use Haskell besides 
 simple CLI utilities, dull server code, or project Euler problems? Even if 
 it's just to contribute to getting Haskell in the environments mentioned 
 above, any feedback is welcome!

 Thanks for reading,

 --J Arthur

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


Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-31 Thread Richard O'Keefe
It's difficult to imagine any kind of program that doesn't need
testing; surely there is a role for Haskell in writing test data
generators?



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


[Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-30 Thread Jonathan Geddes
I love Haskell. It is my absolute favorite language. But I have a very hard
time finding places where I can actually use it!

I had hoped that compiling Haskell to C with -fvia-C (or would it be just
-C?) would allow Haskell to run in new, uncharted territory such as Android
(with NDK), IOS, Google's NaCl, etc. But today I learned that GHC's C
backend has been deprecated!  Is it more difficult than I am imagining to
get Haskell to work in these environments? Is it simply a matter of low
interest in this kind of work? Or something more fundamental? Am I missing
something?

I'm hoping that the Haskell-JavaScript efforts will mature enough to make
Haskell viable for client-side web apps. (I think the first sign of this
will be a self-hosting Haskell-JavaScript compiler.)

I use Haskell for Server-Side code with various web frameworks, but over
the years more and more of the app logic is moved into client-side
JavaScript, leaving the server-side code as little more than a simple
validation and security layer over the database and other services. Haskell
doesn't have any trouble with this, of course, but it's not exactly a role
where it can shine. (Of course this is not true of ALL server-side code,
just the kind of apps I have been writing.)

So anyway I'd like to request feedback: where can I use Haskell besides
simple CLI utilities, dull server code, or project Euler problems? Even if
it's just to contribute to getting Haskell in the environments mentioned
above, any feedback is welcome!

Thanks for reading,

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


Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-30 Thread Brandon Allbery
On Wed, May 30, 2012 at 8:30 PM, Jonathan Geddes
geddes.jonat...@gmail.comwrote:

 I had hoped that compiling Haskell to C with -fvia-C (or would it be just
 -C?) would allow Haskell to run in new, uncharted territory such as Android
 (with NDK), IOS, Google's NaCl, etc. But today I learned that GHC's C
 backend has been deprecated!  Is it more difficult than I am imagining to
 get Haskell to work in these environments? Is it simply a matter of low
 interest in this kind of work? Or something more fundamental? Am I missing
 something?


The C backend was never suitable for that; it couldn't cross-compile and it
used some crufty Perl to apply dubious optimizations to the generated code
(and never did anything interesting on x86 anyway due to lack of
registers).  The portable ANSI C backend, which is used to port GHC to a
new platform in the absence of cross-compilation, still works — but
produces rather slow code.  The native and LLVM backends are much better,
and there is at least some potential for cross-compilation.

I believe there is work proceeding on an ARM native code generator that can
be used to target Android.

-- 
brandon s allbery  allber...@gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe