FranTK installation - user-interface

I am trying to work with FranTK in order to make some examples to work for class. But cant go further the installation process (cabal install may be to mainstream).
I've gotten it from http://src.gnu-darwin.org/ports/x11-toolkits/hs-frantk/work/
in the readme a directory above it says i need to compile TclHaskellSrc, then FranSrc, then FranTkSrc. but i dont know how.
It also says it works with ghc-5, will it work with ghc-7?
has someone already use it successfully?

FRAN is outdated, bitrotted, and will almost certainly not compile under GHC 7. (See Conal Elliott's page for confirmation of this.) It was supposed to have been followed up with successors Reactive and FieldTrip, but, if I remember correctly, these projects hit a snag over OpenGL implementation issues.
If you're looking for good demos of FRP animation, then you'll be better off with one of the following:
elerea - it's simple, and has several good examples
sodium - also simple, and also has several good examples
reactive-banana - More complex than the other two, and more intended for GUI programming than for animation. Still worth a look, as it is well-documented and actively maintained.
The state of the art for FRP used to be Yampa, but I'd recommend against using either it or its recent fork Animas, not because they're bad in any way, but rather because they use Arrows, which tend to overcomplicate an already-difficult subject.
Hope this helps.

Old thread, I know, but Elm (elm-lang.org) has come along in the meantime. It compiles down the JavaScript, supports animations easily, and is under active development.

Related

GUI tools that are actively developed and well documented for Haskell

I've spent the better part of my morning and afternoon playing around with GUI frameworks in Haskell, as I need some visualization and interaction capabilities and I'm not in love with writing my core functionality in Haskell then piping out to a front end written in another GUI; I'd prefer to do it all from one language. The better part of that better part has been spent compiling and patching source code, or Googling obscure compilation errors.
I've spent plenty of time reading SO questions, plenty of time on haskell.org, and plenty of time reading documentation. What I've encountered is a very large swath of outdated or poorly documented information. I can boil it down to these three things:
A glut of options built on top of Gtk+ bindings. I don't care for Gtk+ very much, mostly because I find it to be quite unpleasant to look at, especially on OS X. Griping about the UI looking out of place and/or just plain ugly might seem silly, but that's important to me. Especially if I want other people to utilize any of the programs that I create.
wxHaskell, which is stable and incredibly easy to install but many of the existing tutorials seem to be for wx-0.1x and the conventions for bridging the wxWidgets 2.9.x docs to wx-0.90.x are very very spotty and hard to grok, when they even exist.
qtHaskell, which seems to be mostly abandoned (correct me if I'm wrong), only compiles with newer versions of GHC after applying a year-old patch, and spits out a massive amount of warnings that indicate they will soon become compile errors in newer versions of GHC.
In effect, I'm looking for Haskell's answer to Java's Swing; a library that is robust, maintained, well documented, easy to get started with, makes an attempt to be native in look and feel, can keep up with GHC's development pace, and not at high risk for abandonment. This seems to be exactly zero GUI frameworks, but then it seems that most of the "official" resources/wikis/pages/docs related to GUI frameworks are woefully unmaintained so I decided to turn to the community to see if there was something I just wasn't finding. I'm not terribly worried about the framework being cross platform, just so long as it works on modern versions of OS X.
To reiterate, I'm not really looking for someone to send me a link to haskell.org or the WikiBook. I've been there, and I didn't like what I saw. Most of the information there is just so out of date that it only creates more work, not less.
I realize that my "demands" are a little extreme, especially for a language with a smaller community like Haskell, but I was hoping that someone out there could be of assistance to me. In the mean time, I intend to simply try and ride out wxHaskell or qtHaskell until I succeed or die.
I hope I'm not coming across as gruff or frazzled.
wxHaskell is good, yes, and my go-to GUI middle level library. I admit there's been a focus on updating the code before the docs in the new version.
For modern, functional-reactive-programming fun stuff on top of it I gor for reactive banana, which is actively maintained, and has the added benefit that Heinrich Apfelmus himself may well turn up here to answer your questions.
Threepenny-gui is the most recent contender in the space of Haskell GUI libraries.
Its main selling point is that it is very easy to install, because it uses the web browser as a display. It's also easy to get started with.
On the other hand, it doesn't even attempt to have a native look and feel – the UI is built solely on HTML. (This may change in the future, as we have the option of using XUL). Also, the API is still very much in flux, so be prepared that new major versions of the library are likely to break backwards compatibility. (On the other hand, this means that it's actively developed. :-))
(Disclosure: I'm the author / maintainer of the threepenny-gui package.)
I feel your pain; this answer is an attempt to provide some alternatives that may be good enough and perhaps help you with your search.
First, there is a language called Concurrent Clean. It is supposed to be similar to Haskell, has GUI support and is meant for writing real-world applications. It differs in some respects; for instance, its I/O is based on unique types rather than Monads, which as far as I'm concerned, is a good thing :). Here is a link:
http://wiki.clean.cs.ru.nl/Clean
Next, I dug around for a Haskell compiled to the JVM, in the hopes that it would piggy-back on the Java libraries, ala Clojure. No dice. What I did find was a SO thread discussing the lack and the challenges thereof:
Haskell on JVM?
From that thread however, two other options were brought up. One is Frege:
http://code.google.com/p/frege/
The other is CAL:
https://github.com/levans/Open-Quark
There's also work on functional reactive programming in Haskell. It's supposed to enable things like GUIs, although whether or not you'll actually get a GUI out of it is another matter:
http://www.haskell.org/haskellwiki/Functional_Reactive_Programming
It's sad. Here we have the JVM and .NET and yet zilch for Haskell. It's worse than that; .NET has shown an alarming tendency to ditch promising implementations. Whatever happened to IronScheme, IronLisp and IronHaskell? All dead as far as I can tell.
Not good :(

Firefox plugin update

I have the source code from a plugin for second life to play in a browser but the problem is it's been created for Firefox 3.5, so what I'm trying to do is to bring it up to speed and upgrade it to the current Firefox.
Unfortunately I'm not sure how to go about this as I am literally just looking into this now, any help is greatly appreciated
What's your main aim here? Are you interested in simply making the extension work somehow in the latest firefox or are you more interested in optimizing performance?
Optimization of an application is a very general topic. You can look into the upgrades Gecko has gone through in the recent versions. If there seems to be any specific module for which Gecko is now offering a better interface/compatibility, you might try adapting the same. Again, this is really the programmer's judgment and skill which lets him draw the boundary between feasible and non-feasible development. For a module which is extensively linked with many other modules, it might be a good idea to leave it as it is to avoid sleepless nights (of course that's just my opinion. For some, that is the real kick :D).
If you are interested in creating high-performance plugins, you might like to give Google Web Toolkit a try. It is a Java library which compiles java into optimized javascript introducing various performance oriented quirks. I understand that it is not possible to switch an entire application to GWT easily and wouldn't help you just now, but I think it is worth mentioning for future use.
On the other hand, if you are just interested in making the extension work, you may look into Nightly Tester Tools, which is an extension used to override add on compatibility.

Is MonoRail ready for productive usage?

Right now I'm not sure...
I'd say yes. I'm using it. I know for a fact that Universal are using it on some of their (thousands of) sites. I will add some caveats, however:
There are serious problems with setting it up, especially if you want to debug into the libraries.
The helper functions favour prototype, as opposed to the more modern jQuery. This is changing rapidly, however.
The documentation is a bit chaotic, again the Castle Team are working on that.
I'm not guaranteeing every last "out-there" feature works, but the point of the system is actually to keep it simple.
Compared to vanilla ASP.NET, it's an absolute joy. I assure you that you won't miss viewstate.
We have been building a fairly large application with it for the past year and a half. Its been nice not to have to deal with the old ASP/Page based model and use the better Model/View/Controller design pattern.
To get the new stuff you really need to work off the trunk of development because they don't do releases very often. We have a lot of tests that get the framework involved so when an update in the framework breaks something we depend on we know about it immediately.
If you have to work in .NET this beats the heck out of the alternatives.
There is an overview on the monorail forum: http://forum.castleproject.org/viewforum.php?f=6
I'm using it for an application and haven't had any big issues with it.
The biggest problem is indeed find good documentation and examples.
I've had no problems setting it up. Julian, I don't think it is constructive to say things like "serious problems" without any further clarification or example.
Debugging into the libraries is trivial. Because it's open source, you can debug into the whole thing.
I've been using MonoRail for production for ages on many projects, as an employee, as an indie contractor, and for non-work related sites.
I know I'm biased on that, however I can whole heartedly promise that my positive usage experience is what lured me into contributing to the project, not the other way around.

What real-world projects would you suggest as code examples to study?

What real-world projects would you suggest looking through the sources?
As I'm learning Java Swing, mucommander seems to be a decent example. The code is excessively commented though.
EDIT: No shameless plugs plz :).
I learned a lot from looking at the source code to GoGrinder. It's well thought out, uses MVC correctly, and the comments are helpful (and no, I didn't write it). It's also a fun program to use if you want to learn how to play Go.
For Gui design, Patterns and general good advice I highly reccomend Jeremey Miller's series of articles on building a better CAB. For C#, but equally applicable to Java. Also using
the MVC style which Stackoverflow follows, and Apple uses for Interface Builder.
Build your own CAB
Jeremy's articles/ideas are followed in his own project, which you can download and inspect at http://storyteller.tigris.org/
Take a look at the Windows version of truecrypt. It is one of the best organized open source projects I've ever seen. You can almost tell how the whole thing works just from the directory and file layout.
What I've done to learn some new technologies over the years is to look to open source projects that both match the criteria you're looking for and also interest you.
I'm not a Swing guy, but I'd suggest finding a project that uses Java Swing, does not appear too complicated, and then start digging through the source. The nice thing is you can then see the app before you start poking through it, and then you can see what happens as you change stuff.
The idea behind picking something that interests you is that it will keep you engaged. I am intrigued by content management systems, so I might download a CMS that I can then see how stuff works, and I'm engaged because the problem domain of the project fits in with an interest.
I've done this once or twice when I had to get up to speed on C# and I think it works will. YMMV....
Some of the most well thought out source code ( c++ ) I have seen in an open source project is the Ogre3D graphics engine, I've learned a lot about OOA&D just by looking at the structure and reading the comments. It is also well maintained and the community is very active.. http://ogre3d.org

Project in Ruby

I've been coding alot of web-stuff all my life, rails lately. And i can always find a website to code, but i'm kind of bored with it. Been taking alot of courses of Java and C lately so i've become a bit interested in desktop application programming.
Problem: I can't for the life of me think of a thing to code for desktop. I just can't think of anything i can code that isn't already out there for download. So what do i do?
I need some project suggestions that i can set as a goal.
I would say you should roam through github or some other open source site and find an existing young or old project that you can contribute to. Maybe there is something that is barely off the ground, or maybe there is a mature project that could use some improvement.
I find to complete a project, it needs to be something I am passionate about. I feel you need to find your own project I'm afraid.
There is always the Netflix Prize though!
I would write a ray tracer.
Oops, sorry... you're looking for an original idea. :) Ray tracers are still cool, though, and easy to get started on. Maybe you'll get an idea for a game while you're working on it.
Visit shoooes.net for a UI toolkit that's easy and fun, and then the-shoebox.org to see the kinds of things people are doing with it.
If you could make a Ruby ANSI (and xbin, and idf, and adf...) Editor, I would love you. Because that means you would have written ANSI parsing routines that I can hope you release to the open source community.
... but that is a selfish answer. Oh, and a cross-platform editor would be nice as well (although TundraDraw somewhat takes care of that).

Resources