Re: [Haskell-cafe] Are there major inefficiencies in Haskell compared to OCaml?

2009-12-04 Thread Rick R
On Fri, Dec 4, 2009 at 4:25 PM, Casey Hawthorne cas...@istar.ca wrote:

 Are there major inefficiencies in Haskell compared to OCaml?
 If so, can something be done about them?



There are definitely some gotchas when it comes to performance, mostly in
the realm of inadvertent space leaks and such.
But that's just it, they are gotchas. A new haskeller will no doubt
encounter them, but they are generally simple to fix.

When Haskell and Ocaml are coded by their respective experts, I would, in
general, trust Haskell to be faster.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Parsec for C or C++

2009-07-16 Thread Rick R
There is language.c

http://www.sivity.net/projects/language.c/
http://hackage.haskell.org/package/language-c


From a parsing standpoint, C++ is a massive departure from C. Good luck
though.


On Thu, Jul 16, 2009 at 12:25 PM, Roy Lowrance roy.lowra...@gmail.comwrote:

 I am working on a research language that is a variant of C. I'd like
 to use Parsec as the parser.

 Is there an existing Parsec parser for C or C++ (or Java) that could
 serve as a starting point?

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




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

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


Re: [Haskell-cafe] Parsec for C or C++

2009-07-16 Thread Rick R
I too have a looming spectre of a C++ analysis project, one of the goals of
the project is to be able to efficiently process huge volumes (read GBs) of
code.  Given the current benchmarks of language.c compared to the g++ front
end. I was thinking of using an existing C++ parser written in C++, probably
Elsa[1]. Then use haskell to analyze the resulting AST.

[1]
http://74.125.95.132/search?q=cache:7z7wl7oiy70J:www.eecs.berkeley.edu/~smcpeak/elkhound/sources/elsa/+elsa+c%2B%2Bcd=1hl=enct=clnkgl=usclient=firefox-a
The link seems to be dead at the moment.

On Thu, Jul 16, 2009 at 12:29 PM, Rick R rick.richard...@gmail.com wrote:

 There is language.c

 http://www.sivity.net/projects/language.c/
 http://hackage.haskell.org/package/language-c


 From a parsing standpoint, C++ is a massive departure from C. Good luck
 though.


 On Thu, Jul 16, 2009 at 12:25 PM, Roy Lowrance roy.lowra...@gmail.comwrote:

 I am working on a research language that is a variant of C. I'd like
 to use Parsec as the parser.

 Is there an existing Parsec parser for C or C++ (or Java) that could
 serve as a starting point?

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




 --
 The greatest obstacle to discovering the shape of the earth, the
 continents, and the oceans was not ignorance but the illusion of knowledge.

 - Daniel J. Boorstin




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

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


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Rick R
I think it would be best if the page were  targeted towards newcomers, and
not as a jump point for resources.
Such a jump page is useful, but not as a homepage. Perhaps
haskell.org/linkswould be a better place for such a thing.

As an aside, in the current homepage, the Haskell description is outweighed
by the link menu on the left. IMO the reader's eyes should move from the
title, to the description, then either down or left.  Currently my attention
is split evenly between the link menu and the title/description, which
results in confusion.



On Thu, Jul 9, 2009 at 12:33 PM, Don Stewart d...@galois.com wrote:

 ttencate:
  Are there any kind of hard statistics and analytics that we can base
  this discussion upon? There is always room for improvement, but
  stumbling around in the dark making blind guesses may not be the best
  way to go. Although I personally feel that Lenny's proposed page is an
  improvement, statistics could tell us what actual people actually use
  the site for.

 FWIW, the current layout is actually based on previous analysis of Popular
 Pages a few years ago, so that we have O(1) access to key resources.

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




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

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


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Rick R
IMO, causing a segfault in the interpreter is more than just a DOS
vulnerability :)

On Thu, Jul 9, 2009 at 6:11 PM, Derek Elkins derek.a.elk...@gmail.comwrote:

 On Thu, Jul 9, 2009 at 12:31 PM, Jason Dagitda...@codersbase.com wrote:
 
 
  On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc...@gmail.com
 wrote:
 
  By the way, the most valuable pixels, right at the top of the page,
  are wasted on wiki stuff. Compare
  http://www.haskell.org/
  with, for example,
  http://www.ruby-lang.org/
  http://python.org/
 
  The thing I like the most from the ruby page is the top box of content
 where
  it starts describing ruby with a Read more... link adjacent to a code
  snippet.  Because I doubt anyone will agree on *the one* best code
 snippet
  to show people, I think there should/could be a pool of fun snippets and
  loading the page picks one at random.  I have no idea if the wiki engine
  supports this.  I also like the strip of links at the top with things
 like,
  Download, Community, and so on.  Something I think the Haskell page
 does
  much better than the other two, is the listing of events and hackage
  updates.  Both of those sections feel inviting to me.  It makes me
 curious
  and I want to explore.
 
  The python page looks at least as cluttered as the haskell page.  Neither
  the haskell page or the python page have the same look and feel of the
 ruby
  page.  I think the shaded/gradient backgrounds actually add a lot to the
  visual experience.  I also like that the boxes have a different bg color
 for
  the box title and the box contents.  I also like the use of icons on the
  ruby page.  The Download Ruby link/box with the download icon is very
  inviting.  I just want to download it, even if I'm not going to use ruby!
 
  Perhaps we could have a contest similar to the logo contest but for
 homepage
  asthetics redesign.  I think the content on the haskell page is great,
 but
  the visual style of the presentation could be improved considerably.
 
 
  If, like the consensus seems to be, the page should be made more
  friendly to beginners (who are unlikely to want to contribute to the
  wiki right away), then this should be moved elsewhere, or at the very
  least made smaller and less obtrusive.
 
  Optimizing for newcomers seems wise.
  Jason

 This is what I see when visiting the Ruby page:
 DoS vulnerability in BigDecimal
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

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


Re: [Haskell-cafe] ORM for haskell?

2009-06-30 Thread Rick R
It has to do with treating groups of records from a table like an object.
You have the object Employee, which consists of rows from the Person table,
the Account table and the Building table.
When you instantiate the object. if you don't ask to view the Employee's
building information, it doesn't bother to retrieve it.

In the case you mention, the data hasn't yet been loaded, and even if it
were, it can be loaded with traditional transactional semantics (read only,
read with possible write, write, etc)


On Tue, Jun 30, 2009 at 2:29 PM, Daniel Peebles pumpkin...@gmail.comwrote:

 I don't have a good answer to your question, but I'm curious of how
 lazy loading of SQL-based records would work. It seems like having
 another user of the database modify your record before you've loaded
 it all could lead to an inconsistent record (assuming you've already
 loaded and memoized some fields and not others).

 On Tue, Jun 30, 2009 at 1:52 PM, Marc Webermarco-owe...@gmx.de wrote:
  Some time ago I stumbled upon SQLAlchemy which is a great ORM wrapper
  library for python. It has a nice syntax I'd like to see in a haskell
  library as well.
 
  SQLAlchemy already provides some lazy features such as loading subitems
  on access etc.
 
  All haskell SQL libraries I know only let you run SQL statements but not
  much more. To start real business you no longer want to write many SQL
  commands.
 
  Example why it matters:
  schools - 1:n - teachers - 1:n - pupils
 
  If you want to list all schools which have a pupil with age  3 you'd
  write an sql query like this:
 
   SELECT dictinct * FROM schools as s JOIN teachers t ON (t.school_id =
 s.id) JOIN pupils as p ON (p.teacher_id = t.id) WHERE p.age  3
 
   in SQLAlchemy it looks like this:
 
  
 session.query(School).join(School.teachers).join(Teacher.pupils).filter(Pupil.age
  3).all()
 
   difference? Because SQLAlchemy knows about the relations you don't have
   to remember alias names. So there is no chance to get that wrong.
 
 
  Another example: Updating the age of a pupil:
 
   row = SELECT * FROM pupils where age = 13;
   UPDATE pupils SET age = 14 WHERE id = the id you got above
 
   p = session.query(Pupil).filter(Pupil.age==13).one().age=14
   session.commit()
 
   difference?
   You don't have to care about ids. you just assign a new value and tell
   the engine that it should commit.
   So again less chances to get something wrong.
 
 
  What about trees (eg web site navigation)
 
   id   |  title| parent_id
   1   |  top  | null
   2   |  submenu  | 1
   3   |  submenu2 | 1
 
  should result in
 
  top
   - submenu
   - submenu2
 
  using SQLAlchemy you can just do
 
  parent = session.query('nodes').filter(Node.id = 1)
 
  def print(node):
   print node.title
   print node.subnodes # this will run a subquery automatically for you
 returning submenu{,2}
 
  Again no sql. No chance to get something wrong?
 
  You can skim the manual to get a better idea how SQLAlchemy works
  http://www.sqlalchemy.org/docs/05/sqlalchemy_0_5_5.pdf
 
  I have to admit that I haven't used SQLAlchemy in a real project yet.
  However I can imagine doing so. Comparing this to what we have on
  hackage I'd say some work has to be done to get close to SQLAlchemy.
 
  The backend doesn't have to be a relational database. However I'd like
  to use this kind of abstraction in haskell.
 
  Is there anyone interested in helping building a library which
  a) let's you define kind of model of you data
  b) let's you store you model in any backend (maybe a relational
 database)
  c) does static checking of your queries at compilation time?
 
  Right now I'd say the best way to go is define the model in the
  application and not get the scheme from an existing database because
  there is not way to store all scheme details within a relational model.
  I think SQLAlchemy does it right by providing a way to define the model
  in python.
 
  Of course haskell doesn't have objects to store. But GADTs could be
  stored (data Foo = ...)
 
  So are there any volunteers who are interested in helping writing this
  kind of storage solution for haskell which could be used in real world
  business apps?
 
  Maybe this does already exist and I've missed it?
 
  Marc Weber
  ___
  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




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

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


Re: [Haskell-cafe] Haskell on the iPhone

2009-06-23 Thread Rick R
There seems to be quite a bit more interest now in supporting platforms
other than win/*nix on x86 these days*.
Maybe now there will be sufficient motivation to make the fundamental
changes required. Caveat: I have absolutely no idea of the scope or
complexity of said changes.  I will look through the LambdaVM code (and iPwn
when available)  to get an idea.

Perhaps we can devote a section of Haskell Wiki to generalizing Haskell for
multiple targets?

The industry has been clamoring for a unified solution to all of the mobile
platforms out there. If Haskell can provide that, it would be a huge win for
its popularity.

*  Thanks primarily to the iPhone and Android systems. I think currently
iPhone is swaying the most votes but Android is due to be on a dozen phones
and possibly even a netbook.  (I have heard two announcements and one
cancellation with regards to the netbooks).


On Tue, Jun 23, 2009 at 8:34 AM, John A. De Goes j...@n-brain.net wrote:


 I have strong interest in Haskell on the JVM. Not for Android, however.

 Seems like every time this topic comes up, the consensus is that it's not
 easy to support new targets with GHC, but that work is underway to make
 such developments easier.

 Regards,

 John A. De Goes
 N-Brain, Inc.
 The Evolution of Collaboration

 http://www.n-brain.net|877-376-2724 x 101

 On Jun 22, 2009, at 11:23 PM, Ryan Trinkle wrote:

 Rick,

 I know some work has been done on JVM - iirc, Don Stewart did some work
 back in the day, 
 www.cse.unsw.edu.au/~pls/thesis/dons-thesis.ps.gzhttp://www.cse.unsw.edu.au/%7Epls/thesis/dons-thesis.ps.gz,
 but I'm not sure how comprehensive it is.

 Is anyone else interested in JVM-based Haskell targets?


 Ryan

 On Mon, Jun 22, 2009 at 20:42, Rick R rick.richard...@gmail.com wrote:

 This is definitely good news!

 So...  who's doing the Android/JVM target?  ;)



 On Mon, Jun 22, 2009 at 7:37 PM, Daniel Peebles pumpkin...@gmail.comwrote:

 How exciting! I fully support the creation of a new mailing list about
 iphone+haskell :)

 On Mon, Jun 22, 2009 at 6:30 PM, Ryan Trinkleryant5...@gmail.com
 wrote:
  Dear Haskellers,
 
  Recently, there's been a groundswell of activity in the Haskell
 community
  regarding the Haskell's use in developing iPhone games.  The iPhone is
 a
  powerful, innovative platform (with a great monetization scheme, to
 boot),
  and it's not surprising that many of us would want to develop apps for
 it in
  our favorite language.
 
  I am proud to announce today that my company, iPwn Studios Inc., is
  currently preparing to release an open source patch to GHC that allows
 it to
  output binaries for iPhone OS.  The patch will be released under a BSD
  license as soon as possible and hopefully integrated into the GHC
 main-line
  in the near future.  As the first (to my knowledge) Haskell-based game
  studio, iPwn Studios is committed to giving back to the Haskell
 community
  through open source - contributing to a rising tide that lifts us all.
 
  I would like to take this opportunity to propose the creation of a
  haskell-iphone mailing list, so that all Haskellers working with the
 iPhone
  - whether for profit or for pleasure - can come together to make
 Haskell a
  force to be reckoned with in the burgeoning iPhone App marketplace.
 
 
  Best wishes,
  Ryan Trinkle
  President, iPwn Studios Inc.
 
  P.S.: If you wish to be involved in the preparation of the GHC patch or
 in
  the creation of iPwn Studios' first game, don't hesitate to contact me
 by
  email (ryant5...@gmail.com), AIM (RyanT5000), or IRC (RyanT5000 on
  irc.freenode.net).
 
 
  ___
  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




 --
 The greatest obstacle to discovering the shape of the earth, the
 continents, and the oceans was not ignorance but the illusion of knowledge.

 - Daniel J. Boorstin


 ___
 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 mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

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


Re: [Haskell-cafe] Facebook puzzles allow for GHC solutions

2009-05-27 Thread Rick R
They are the creators of Thrift which they created for internal use and then
published/open-sourced.. It is a multi-language RPC API/Service. When it
went public, one of the languages interfaces they provided was Haskell. So
yes. They use Haskell somewhere inside Facebook.


On Wed, May 27, 2009 at 11:20 AM, David Leimbach leim...@gmail.com wrote:

 Interesting:
 http://www.facebook.com/careers/puzzles.php

 So they use Haskell at Facebook?

 Dave

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




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

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


Re: Re[2]: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Rick R
You may wish to look at Timber. It is a Haskell descendant designed for
embedded systems.
Its current default output is C which is then compiled. It is a very young
language, but given the current list of use cases, I am sure that it will
never abandon it's C output model, because most people in embedded
disciplines seem to prefer it. It does, like Haskell, include a runtime, but
it is small, and light. Since it is targetted towards embedded systems the
garbage collector is one that can be interacted with to guarantee response
times on the microsecond level.

http://timber-lang.org/

I too write software for time critical applications and multiple platforms
(such as the iPhone). I surveyed over a dozen compilers in multiple
languages, and my search ended with Timber. As I mentioned, it is very
young, it has very little standard library to speak of, but it has strong
possibilities.


On Fri, Apr 24, 2009 at 1:34 PM, Bulat Ziganshin
bulat.zigans...@gmail.comwrote:

 Hello Sam,

 Friday, April 24, 2009, 9:09:43 PM, you wrote:

 well, GHC generates .o files. so you may solve some of your questions.
 if you can absolutely ignore performance, you can use so-called
 non-registerized compilation what generates ansi-compatible C code

 most Haskell libs are written for ghc, so for other compilers you will
 need to write almost self-contained code

  I need a list of .c and .h files as an end result of the Haskell
  compilation stage. I expect these c files will need to include Haskell
  runtime C code to operate, and therefore have some dependencies in order
  to compile and link.

  Afaict, GHC as it stands does not allow me to do this, even though it
  presumably generates C in the process of compiling binary objects.

  Actually having C source as an end result is critical as I need control
  over exactly how the source is compiled and linked. For example:
  - I need to compile to different targets: either a static C lib, exe,
  dll or C++ lib.
  - I need to support multiple compilers.
  - I might want to produce a custom runtime.

  In short, I'd like to use Haskell as a code-generator.

  I can't see that this would be unachievable, particularly given it's
  generating C already. Have I missed something?

  Cheers,
  Sam

  -Original Message-
  From: Bulat Ziganshin [mailto:bulat.zigans...@gmail.com]
  Sent: 24 April 2009 17:53
  To: Sam Martin
  Cc: haskell-cafe@haskell.org
  Subject: Re: [Haskell-cafe] compilation to C, not via-C

  Hello Sam,

  Friday, April 24, 2009, 8:36:50 PM, you wrote:

  I work in Games middleware, and am very interested in looking at how
  Haskell could help us. We basically sell C++ libraries. I would like
  to
  be able to write some areas of our libraries in Haskell, compile the
  Haskell to C and incorporate that code into a C++ library.

  well, you can intercept these files. once i wrote simple 4-line
  haskell utility (it may be 20 lines of C++ or so) and compiled it down
  to C. results was 300 lines or so which it's impossible to understand

  so, if you just need haskell-C++ interaction, you may look into using
  FFI [1,2]. if you believe that you can compile some
  java/ruby/haskellwhatever code down to C++ and incorporate it into
  your function - sorry, they all have too different computing model

  btw, my own program [3] goes this way - i combine fast C++ and complex
  Haskell code via FFI/dll to produce fast, feature-rich application


  [1] http://www.haskell.org/haskellwiki/GHC/Using_the_FFI
  [2] http://www.haskell.org/haskellwiki/FFI_cook_book
  [3] http://freearc.org





 --
 Best regards,
  Bulatmailto:bulat.zigans...@gmail.com

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[4]: [Haskell-cafe] compilation to C, not via-C

2009-04-24 Thread Rick R
I really like the idea of the region based mem management (and other GC
options) in JHC. It could potentially remove the need for any runtime at
all, which is nice.

Two fundamental differences of Timber is that it is purely strict, and not
pure functional.
This makes the implementation and use of IO intensive systems slightly more
straightforward IMO.

Also, when I tested JHC, I couldn't get it to compile my test case. Note
that I am not qualified to speak on the quality of the compiler since my
Haskell skills are mediocre at best.

One big advantage of JHC once it matures is that it will be able to leverage
the cornucopia of haskell libs in hackage, wheras Timber will have to start
pretty much from scratch.



On Fri, Apr 24, 2009 at 2:19 PM, Bulat Ziganshin
bulat.zigans...@gmail.comwrote:

 Hello Rick,

 Friday, April 24, 2009, 10:12:42 PM, you wrote:

 what you think about JHC? it seems that Timber is close to it

  You may wish to look at Timber. It is a Haskell descendant designed for
 embedded systems.
  Its current default output is C which is then compiled. It is a
  very young language, but given the current list of use cases, I am
  sure that it will never abandon it's C output model, because most
  people in embedded disciplines seem to prefer it. It does, like
  Haskell, include a runtime, but it is small, and light. Since it is
  targetted towards embedded systems the garbage collector is one that
  can be interacted with to guarantee response times on the microsecond
 level.
 
  http://timber-lang.org/

  I too write software for time critical applications and multiple
  platforms (such as the iPhone). I surveyed over a dozen compilers in
  multiple languages, and my search ended with Timber. As I mentioned,
  it is very young, it has very little standard library to speak of, but it
 has strong possibilities.
 

  On Fri, Apr 24, 2009 at 1:34 PM, Bulat Ziganshin
  bulat.zigans...@gmail.com wrote:
   Hello Sam,
 
   Friday, April 24, 2009, 9:09:43 PM, you wrote:
 
   well, GHC generates .o files. so you may solve some of your questions.
   if you can absolutely ignore performance, you can use so-called
   non-registerized compilation what generates ansi-compatible C code
 
   most Haskell libs are written for ghc, so for other compilers you will
   need to write almost self-contained code
 

   I need a list of .c and .h files as an end result of the Haskell
   compilation stage. I expect these c files will need to include Haskell
   runtime C code to operate, and therefore have some dependencies in
 order
   to compile and link.
 
   Afaict, GHC as it stands does not allow me to do this, even though it
   presumably generates C in the process of compiling binary objects.
 
   Actually having C source as an end result is critical as I need control
   over exactly how the source is compiled and linked. For example:
   - I need to compile to different targets: either a static C lib, exe,
   dll or C++ lib.
   - I need to support multiple compilers.
   - I might want to produce a custom runtime.
 
   In short, I'd like to use Haskell as a code-generator.
 
   I can't see that this would be unachievable, particularly given it's
   generating C already. Have I missed something?
 
   Cheers,
   Sam
 
   -Original Message-
   From: Bulat Ziganshin [mailto:bulat.zigans...@gmail.com]
   Sent: 24 April 2009 17:53
   To: Sam Martin
   Cc: haskell-cafe@haskell.org
   Subject: Re: [Haskell-cafe] compilation to C, not via-C
 
   Hello Sam,
 
   Friday, April 24, 2009, 8:36:50 PM, you wrote:
 
   I work in Games middleware, and am very interested in looking at how
   Haskell could help us. We basically sell C++ libraries. I would like
   to
   be able to write some areas of our libraries in Haskell, compile the
   Haskell to C and incorporate that code into a C++ library.
 
   well, you can intercept these files. once i wrote simple 4-line
   haskell utility (it may be 20 lines of C++ or so) and compiled it down
   to C. results was 300 lines or so which it's impossible to understand
 
   so, if you just need haskell-C++ interaction, you may look into using
   FFI [1,2]. if you believe that you can compile some
   java/ruby/haskellwhatever code down to C++ and incorporate it into
   your function - sorry, they all have too different computing model
 
   btw, my own program [3] goes this way - i combine fast C++ and complex
   Haskell code via FFI/dll to produce fast, feature-rich application
 
 
   [1] http://www.haskell.org/haskellwiki/GHC/Using_the_FFI
   [2] http://www.haskell.org/haskellwiki/FFI_cook_book
   [3] http://freearc.org
 
 
 
 
 
   --
   Best regards,
Bulatmailto:bulat.zigans...@gmail.com
 
   ___
   Haskell-Cafe mailing list
   Haskell-Cafe@haskell.org
   http://www.haskell.org/mailman/listinfo/haskell-cafe
 







 --
 Best regards,
  Bulatmailto:bulat.zigans...@gmail.com





Re: [Haskell-cafe] Lazy vs correct IO [Was: A round of golf]

2009-04-05 Thread Rick R
It depends on the underlying file control used by ghc. if it's the FILE
stream pointer, some implementations suffer from a 255 file limit. If it's a
standard file descriptor (open instead of fopen), then it's limited by
ulimit.

On Sun, Apr 5, 2009 at 10:35 AM, Jason Dusek jason.du...@gmail.com wrote:

  Oh, curses. I didn't run it with the right option.

  :; ulimit -a
 core file size  (blocks, -c) 0
 data seg size   (kbytes, -d) 6144
 file size   (blocks, -f) unlimited
 max locked memory   (kbytes, -l) unlimited
 max memory size (kbytes, -m) unlimited
 open files  (-n) 256
 pipe size(512 bytes, -p) 1
 stack size  (kbytes, -s) 8192
 cpu time   (seconds, -t) unlimited
 max user processes  (-u) 266
 virtual memory  (kbytes, -v) unlimited

  So now I'm not sure why it worked on my Mac.

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Program using 500MB RAM to process 5MB file

2009-04-02 Thread Rick R
You could profile your app for memory usage. Then you could figure out just
what function is blowing up the mem usage and figure out how to optimize it.


http://book.realworldhaskell.org/read/profiling-and-optimization.html


2009/4/2 lu...@die.net.au

 I'm relatively new to haskell so as one does, I am rewriting an
 existing program in haskell to help learn the language.

 However, it eats up all my RAM whenever I run the program.

 http://hpaste.org/fastcgi/hpaste.fcgi/view?id=3175#a3175

 Obviously I'm doing something wrong, but without my magical FP pants I
 don't know what that might be.

 --
 Lucas Hazel lu...@die.net.au

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Hugs on iPhone

2009-03-24 Thread Rick R
Correct. My point was only in the case that it would need to statically link
to a GPL'd lib (which I'm not sure if such a case exists)
If the gcc license suddenly decided to claim compiled items as derivative
works, the IT world as we know it would end.

On Tue, Mar 24, 2009 at 11:06 AM, John Meacham j...@repetae.net wrote:

 On Mon, Mar 23, 2009 at 07:00:26PM -0400, Rick R wrote:
  The agreement doesn't specifically prohibit the use of interpreters (just
  those than run external code). It also doesn't say anything about machine
  generated code. The only thing one would have to ensure is that the
  dependencies of JHC are all compiled in, or statically linked. Shared
 libs
  are disallowed in any app. If it has a runtime dependency on gcc (is
 there
  such a thing?) Then you would have to statically link it and therefore
  couldn't sell your application. (gotta love GPL)

 No problem here, the gcc licence explicity states things compiled with it
 are not
 considered derivative works. And after all, Mac OS X is compiled with
 gcc, apple X-Code uses gcc as its compiler and I think gcc may even be
 the only objective C compiler out there.

John


 --
 John Meacham - ⑆repetae.net⑆john⑈
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hugs on iPhone

2009-03-23 Thread Rick R
Unfortunately the developers agreement expressly forbids the use of
interpreters that load and run external programs. This is probably for the
simple reason that it would be almost impossible to secure, or even
guarantee that it wont exceed its space and mem usage bounds required by
AppStore apps.

Short answer: Jailbreak and install away :)


2009/3/23 Kirk Martinez kirk.marti...@gmail.com

 I saw Miguel Mitrofanov (
 http://www.nabble.com/Hugs-on-the-iphone-td19478992.html) successfully
 ported Hugs to the iPhone.  I'm now wondering if anyone has tried to get
 Apple's blessing to put this in the App Store?  It would be really great to
 be able to try out little Haskell ideas as the mood strikes.  Of course,
 it's kind of essential to have an editor of some kind for more significant
 programs...

 Thanks,
 Kirk

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Hugs on iPhone

2009-03-23 Thread Rick R
This is solely the reason for my interest in JHC.

The agreement doesn't specifically prohibit the use of interpreters (just
those than run external code). It also doesn't say anything about machine
generated code. The only thing one would have to ensure is that the
dependencies of JHC are all compiled in, or statically linked. Shared libs
are disallowed in any app. If it has a runtime dependency on gcc (is there
such a thing?) Then you would have to statically link it and therefore
couldn't sell your application. (gotta love GPL)

JHC also helps with another issue:
There is some concern about garbage collection schemes, Apple removed their
own garbage collector in the iPhone SDK and the docs mention that GC isn't
allowed. But there is nothing about that in the Developer Agreement. JHC's
region based memory management very closely reflects Apples own convention
for using memory pools for all allocation. I speculate that this would less
likely to be  rejected. .

There is also some discussion on both the GHC and JHC mailing list WRT this
a month or two ago.
I will attempt exactly this scheme later next month, will let you know how
it goes. :)

On Mon, Mar 23, 2009 at 5:45 PM, John Meacham j...@repetae.net wrote:

 On Mon, Mar 23, 2009 at 04:41:04PM -0400, Braden Shepherdson wrote:
  The good news is that jhc's portable C code works perfectly well -- but
  of course that is simply running precompiled Haskell apps and not a
  compiler or interpreter running on the device. Since jhc is not
  self-hosting (yet?) but instead is built with GHC, that's the best we
  can do with that approach for now.

 I wondered what would happen if I submitted some jhc generated C for
 approval, it _almost_ looks like it could have been hand written by
 someone with an unusual penchant for gotos and their own inscrutable
 hungarian notation.

John

 --
 John Meacham - ⑆repetae.net⑆john⑈
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Learning Haskell

2009-03-23 Thread Rick R
I've been messing with Haskell since the Middle of January on evenings and
weekends. Just now I'm getting to the point where I can construct nontrivial
programs with little help from #haskell.

 It is by no means my most proficient language, I've been coding C++ and
other languages for over 10 years. It is by far my favorite, however, and if
I could do it full time I would.

On Mon, Mar 23, 2009 at 11:08 PM, Tom.Amundsen tomamund...@gmail.comwrote:


 How long did it take you to become proficient in Haskell? By that, I mean -
 how long until you were just as comfortable with Haskell as you were with
 your strongest language at that time?
 --
 View this message in context:
 http://www.nabble.com/Learning-Haskell-tp22673552p22673552.html
 Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Haskell Logo write-in candidate

2009-03-21 Thread Rick R
but the rest of it looks like a fat lady bending over.

2009/3/21 Henning Thielemann lemm...@henning-thielemann.de


 On Fri, 20 Mar 2009, Jon Fairbairn wrote:

  ::Haskell


 See the lamp in logo 33 at
  http://www.haskell.org/logos/poll.html

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Logo write-in candidate

2009-03-19 Thread Rick R
Actually, yea.  This is pretty nice.  If either #9, #49 or #50 make it to
the top of the list, can we ensure that this will be selectable as a
variant?

(If not, we can at least put it on cafe press and I'd buy the t-shirt :) )

2009/3/19 Edward Kmett ekm...@gmail.com

 Ooh, shiny!

 2009/3/19 Warren Harris warrensomeb...@gmail.com

 After spending a bit of time trying to decide how to vote, I ended up
 deciding that my favorite would be a hybrid of several of the designs (#9 
 #49 FalconNL, and #50 George Pollard). It's probably too late to include
 this in the voting, but here it is nonetheless:






 (My primary criterion is would I wear this t-shirt?) :-)

 Warren
 ___
 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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Haskell Logo Voting has started!

2009-03-17 Thread Rick R
And we thought butterfly ballots were bad.

I just went through the logo page and wrote down my favorite 20 logos in one
column, and gave them a rank in the other. Then translated that into the
voting list using the combo boxes (not the buttons).  The total process took
20 minutes.

I am on FF3 on windows and didn't notice any reordering aside the
(un?)expected reordering by rank.


On Tue, Mar 17, 2009 at 12:12 AM, Robin Green gree...@greenrd.org wrote:

 On Tue, 17 Mar 2009 16:11:54 +0100
 Thomas Davie tom.da...@gmail.com wrote:

  I have to agree that the UI for voting is not the best I've ever
  seen.  On the other hand, it's pretty easy to select the few logos
  that you like, and push them all to the top, select the ones you'd
  accept, and push them up just below, and finally select the ones you
  absolutely don't like and push them all the way down.
 
  That at least is what I did.

 Did you check that code bugs hadn't reordered your votes? I am worried
 about this destroying the validity of the election.
 --
 Robin
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Haskell Logo Voting has started!

2009-03-17 Thread Rick R
QED

2009/3/17 Daniel Schüssler anotheraddr...@gmx.de

 (correction of the example)

 (105:  ) (106: A) (107: X,B) (108: C,D) (109: E  ) (110:  )

 moving down X will result in either

 (105: A) (106: B) (107: X  ) (108: C,D) (109: E  ) (110:  )

 or equivalently

 (105:  ) (106: A) (107: B  ) (108: X  ) (109: C,D) (110: E)
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Binary Parsing

2009-03-11 Thread Rick R
I have basic beginning to a parser for the BSON spec:
http://www.mongodb.org/display/DOCS/BSON
It is basically a binary compressed form of JSON.
The usage model should be general, but I intend to read this data over TCP.

Currently my system is quite inefficient, I convert leading bytes to Int
then switch based on that type that that Int represtents.

I was wondering if there is a tool set that exists for this purpose. For
instance, should I use Data.Binary and make my Binary instance of get and
put use the BSON protocol? Or is that not correct?
I also looked at Parsec.ByteString, but that seems to only have a file input
mechanism, and tcp buffers may be out of its scope. Are there any other
tools that I should look at?

I'm sure similar things have been done before. Can anyone point me to some
open, successful implementations that I could mimick?


-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] STG's? [was: I want to write a compiler]

2009-03-08 Thread Rick R
Where can I find more information on STGs? Google search doesn't bring up
anything too enlightening.

My curiosity was piqued by http://www.cs.chalmers.se/~gedell/ssc/index.html.
Of course it doesn't indicate how these should be built or the format.


On Sun, Mar 8, 2009 at 6:41 PM, Loup Vaillant loup.vaill...@gmail.comwrote:

 Thanks to the courage you all gave me, I found the strength to go on.

 Template instantiation seems to be the easiest path, so I decided to
 follow it. I think I solved the problem about primitives and FFI I
 though it had. Namely, how the hell do I compile primitive calls with
 an arbitrary number of arguments.

 Starting from the Tutorial of Peyton Jones and Lester, I added a new
 node type to help guide the order of evaluation. Basically, this Seq
 node takes the address of two other nodes. It pushes them both on the
 stack, like an application node would. (That is because I don't want a
 dump, but I could as well create a new stack and and push the previous
 one on the dump.)

 Note the nodes which are evaluated this way must not have a functional
 head normal form (primitive or supercombinator). That would leak past
 the beginning of the stack.

 When the node is finally evaluated (e.g. points to a HNF, like a boxed
 integer), the topmost and second topmost pointers on the stack are
 swapped. (or the topmost pointer of the stack and the topmost pointer
 of the topmost stack on the dump are swapped).

 With a suitable compilation scheme, that should guarantee that
 primitives have their arguments already evaluated. (And avoid infinite
 loops).

 Now, I just have to implement it. :-)

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] I want to write a compiler

2009-03-07 Thread Rick R
http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours

Not sure if this is exactly what you want, but you could certainly fufill
all of your requirements using this as a baseline. Instead of evaluating the
actual statements in your eval function, you could simply render them to C.

As far as FFI, if you are statically compiling to C, you can leave your
variables unboxed. This would allow you to call C functions directly.

Hope that helps.


On Sat, Mar 7, 2009 at 6:32 PM, Loup Vaillant loup.vaill...@gmail.comwrote:

 This is a homework question. I am mainly looking for guidance or
 pointers. Source code, even. (Not GHC's, though, it is too complicated
 for me right now. The AST of STG is fine, but the rest kinda scares
 me.)

 Ideally, I would very much like to compile to C.

 The requirements are easily stated. My language must
 - be lazy by default,
 - support algebraic data types and case expressions (unless I can get
 away with encoding them as functions),
 - have some kind of FFI with C (I suppose it imply some support for
 unboxed values).

 There is also the first class functions thing, but lambda lifting is okay.

 I don't care about any kind of execution efficiency. I just want my
 compiler to be As Simple As Possible. Eventually, I intend to
 bootstrap. Then, I will start dreaming about doing better than the
 Mighty Simons. (I can dream, right?)

 I figured I would start by the back-end. I began to write 15 pathetic
 lines of code to start an STG machine. Needles to say, I am stuck. I
 don't know where to start.

 I am already familiar with some papers. In particular, [1] (on
 template instantiation), [2] and [3]. I once wrote a simple graph
 reducer using template instantiation (about 20 lines at most).

 I have chosen the STG machine because I thought i would be easier to
 get an FFI and case exprs out of it. Maybe I am wrong, and template
 instantiation is really easier. There is also the BRISK machine, and
 GRIN. But the paper I read were less readable to me than the three
 mentioned.

 So, If any of you can give me some pointer or guidance or advice about
 where to start, I would be very grateful.

 Loup


 [1] http://www.cs.otago.ac.nz/cosc459/books/pjlester.pdf
 [2]
 http://research.microsoft.com/~simonpj/Papers/spineless-tagless-gmachine.ps.gzhttp://research.microsoft.com/%7Esimonpj/Papers/spineless-tagless-gmachine.ps.gz
 [3] 
 http://research.microsoft.com/~simonpj/Papers/eval-apply/index.htmhttp://research.microsoft.com/%7Esimonpj/Papers/eval-apply/index.htm
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] MapReduce reverse engineered

2009-02-25 Thread Rick R
I agree. A distributed database could be made as usable as a standard
RDBMS by offering an interface by which you supply a map/reduce pair
of functions and a list (range?) of keys.

This could be easily implemented with a database such as Scalaris, in
which the Chord algorithm is responsible for placing and finding the
data among nodes.

The user would interface with any node in the distributed database,
supplying a map and reduce function. It would distribute the map
function to nodes of its choosing (weighted by some metrics such as
idle cpu), retrieve the intermediate sets and run reduce if supplied.


2009/2/25 Alberto G. Corona agocor...@gmail.com:
 Galchin,

 Maybe you are asking not only about remote execution, but also mobility of
 code. This is a problem that is previous to mapReduce, since mapReduce
 assumes that all the code (and the data) is in place in the respective
 nodes. In fact, the distribution of resources in order to efficiently use
 mapReduce is a design problem that the google people has done by hand.
 But  my intuition says that there are a general algorithm  for distribution
 of  code, data, bandwidth and resources in general that  moves around at
 execution time to achieve better and better performance for a given grid of
 nodes and for any task, for example, a mapReduce task. I would be very
 interesting to read something about this.
 I know that some efforts have been carried out the past , for example mobile
 haskell
 http://homepages.inf.ed.ac.uk/stg/workshops/TFP/book/DuBois/duboismhaskell/cameraready.pdf
 which is a first step for this goal but I this has been discontinued and the
 source code is not available.

 2009/2/25 Galchin, Vasili vigalc...@gmail.com

 Hello,

  Here is an interesting paper of Google's MapReduce reverse engineered
 into Haskell. I apologize if already posted .
 http://www.cs.vu.nl/~ralf/MapReduce/

 Kind regards, Vasili

 ___
 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





-- 
We can't solve problems by using the same kind of thinking we used
when we created them.
- A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to create an online poll

2009-02-19 Thread Rick R
I think the capabilities community including E and Coyotos/BitC have
extensively addressed this topic. Coyotos is taking the correct approach for
trusted voting platform. Since, even if your software is trustworthy, it
can't be trusted if the OS on which it runs is suspect. However, we might
have a few more rigged elections before we see any deliverables from
Coyotos.


On Thu, Feb 19, 2009 at 2:45 AM, Ketil Malde ke...@malde.org wrote:

 Rick R rick.richard...@gmail.com writes:

  I'm sure Premier Election Solutions (formerly Diebold) can provide us
 with
  an online voting solution.

 You know, while the recent voting scandals have been milked for all
 they're worth by the open source community, FP has been very quiet
 about it.  Isn't this an application where correctness matters?  How
 about a proof that the software never loses (or injects) votes, for
 instance?

 -k
 --
 If I haven't seen further, it is by standing in the footprints of giants




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Rick R
I'm sure Premier Election Solutions (formerly Diebold) can provide us with
an online voting solution.
Their value-add services allows us to set the outcome beforehand, so, in
effect, the the voting process will be determinate. Which is certainly of
interest to Haskell coders.


On Wed, Feb 18, 2009 at 4:05 PM, Max Rabkin max.rab...@gmail.com wrote:

 On Wed, Feb 18, 2009 at 10:40 PM, Anton van Straaten
 an...@appsolutions.com wrote:
  There's also the Condorcet Internet Voting Service:
 
   http://www.cs.cornell.edu/andru/civs.html

 This looks like exactly what we need! Any objections?

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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to create an online poll

2009-02-18 Thread Rick R
I can't comment on any quantitative side effects, but the some intangible
side effects include Distrustful Populace and MaliciousDissenters. However,
if ghc is run with the -XUnscrupulousPolitics  flag, those can be
suppressed.

On Wed, Feb 18, 2009 at 4:33 PM, gregg reynolds d...@mobileink.com wrote:

 I.e. war, plague.famine. etc.

 gregg reynolds d...@mobileink.com wrote:

 But what about the side effects?
 
 Rick R rick.richard...@gmail.com wrote:
 
 I'm sure Premier Election Solutions (formerly Diebold) can provide us
 with
 an online voting solution.
 Their value-add services allows us to set the outcome beforehand, so, in
 effect, the the voting process will be determinate. Which is certainly of
 interest to Haskell coders.
 
 
 On Wed, Feb 18, 2009 at 4:05 PM, Max Rabkin max.rab...@gmail.com
 wrote:
 
  On Wed, Feb 18, 2009 at 10:40 PM, Anton van Straaten
  an...@appsolutions.com wrote:
   There's also the Condorcet Internet Voting Service:
  
http://www.cs.cornell.edu/andru/civs.html
 
  This looks like exactly what we need! Any objections?
 
  --Max
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 
 
 
 --
 We can't solve problems by using the same kind of thinking we used when
 we
 created them.
- A. Einstein
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Amazing

2009-02-14 Thread Rick R
I have been learning Haskell for the last two weeks and was relaying that
exact benefit to my friend in attempts to convert him. I spend 3 hours
getting a few functions to compile, but when they do, they just work. Every
time.

2009/2/14 Peter Verswyvelen bugf...@gmail.com

 One of the things I liked a lot when working with C# was that as soon as my
 code compiled, it usually worked after an iteration of two.At least if we
 forget about the nasty imperative debugging that is needed after a while
 because of unanticipated and unchecked runtime side effects.
 After heaving read about Haskell and having written some small programs for
 the last year or so, I'm now finally writing a bigger program with it. It is
 not so easy yet since learning a language and trying to reach a deadline at
 the same time is hard :)

 However, it is just amazing that whenever my Haskell program compiles
 (which to be fair can take a while for an average Haskeller like me ;-), it
 just... works! I have heard rumors that this was the case, but I can really
 confirm it.

 A bit hurray for strong typing! (and if you don't like it, you can still
 use Dynamic and Typeable ;-)


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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Why binding to existing widget toolkits doesn't make any sense

2009-01-30 Thread Rick R
I haven't really thought about GUIs much in the last decade, but if one were
to embark on such an endeavor, I think an appropriate starting point would
be SDL with OpenGL.

There would be no very little API structure to hinder the pure functional
approach, and it would be portable to a wide variety of platforms. SDL
includes support Linux/Win/OSX and now the iPhone. Also you'd have
unofficial support for another few platforms.

The 1st step would be to build a vector graphics lib for Haskell on OpenGL,
but after that, perhaps much of Fruit could be fitted in. (Just a WAG, never
heard of the API before now)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Why binding to existing widget toolkits doesn't make any sense

2009-01-30 Thread Rick R
Cairo is now the graphics back end for Firefox, yes? I thought moving to
Cairo resulted in a considerable rendering speedup for FF.

On Fri, Jan 30, 2009 at 6:31 PM, Peter Verswyvelen bugf...@gmail.comwrote:

 I found Cairo rather slow, even on the fastest hardware.

 Maybe OpenVG will take off one day:
 http://www.khronos.org/openvg


 2009/1/30 Bryan O'Sullivan b...@serpentine.com:
  Hi, Antony -
 
  It's good to see you active on here.
 
 
  It's not clear to me if the Cairo API in its current form supports
  vector-level clipping or constructive area geometry, [...]
 
  The Cairo clipping API is very PostScripty; you set up a path and then
 turn
  it into a clip region instead of filling it. You don't end up with a
  first-class value, but a manipulation of the implicit global rendering
  state. For CAG-style operations, http://lib2geom.sourceforge.net/ would
 be a
  better bet, but FFIing to a library written in C wouldn't necessarily be
 a
  real improvement over just writing a CAG library natively. I think it
 would
  be true to say that you can't quite get everything you would want in one
  easy-to-use place, then.
 
 
  ___
  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




-- 
We can't solve problems by using the same kind of thinking we used when we
created them.
   - A. Einstein
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Web Framework

2009-01-27 Thread Rick R
On Tue, Jan 27, 2009 at 3:05 PM, Michaeljohn Clement m...@mjclement.comwrote:

 John A. De Goes wrote:

...
 There is very little wrong with ECMAScript if people would only
 learn it properly and play to its strengths instead of trying to
 turn it into things it is not.

 Treating ECMAScript as a compiler target language will be a win
 eventually, I expect, but not by compiling from Haskell.  Haskell
 could certainly play a role, e.g. as an implementation language
 for ES-to-ES or DSL-to-ES compiler writers.

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



Javascript itself is such a versatile language I don't think it needs to be
hidden by a DSL, but, as you mentioned an ES-to-ES wrapper, with the
exception that the framework could auto generate a few helper functions on
the client side.

I think the optimal approach is to create a sort of generator of client
applications.
These applications will use XHTML for graphical structure and Javascript for
logic.

The haskell framework would streamline the creation of dynamic HTML and
offer a fast and simple means of specifying an RPC interface from the client
to the server. It would also make sense to leverage an existing set of
libraries for this purpose. JQuery RPC is fantastic (as is the rest of
JQuery) and, IMO, it provides enough abstraction to make Javascript
tolerable for any type of programmer.

Using the Client/Server paradigm, one could gain additional performance
benefits from templates.  Since all of their dynamic state is set an runtime
via javascript, they can all be precompiled into XHTML and JS. To avoid the
initial request for values after the page load, an appendix could be sent
from the server with the XHTML file that automatically sets all of the
dynamic values.

I have been slowly building a proof of concept of these ideas using HAML as
the template engine and JQuery.RPC as the communication mechanism. It's not
intended to be a full framework, but a client generator that could make JSON
RPC requests to any RESTful interface (sorry for the buzzwords)
I'll yell when I have something to show.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe