> At this time what are the graphics possibilities with APL
> (the IBM version or Dyalog APL)? Thank you.
Depends what you mean by graphics...
Business-style charting is pretty well covered and easy.
I haven't seen much of what I'd call "engineering graphics" (3D displays of
stress values in aircraft components and the like). Possibly because I
live too sheltered a life. At a guess, this might be fairly
straightforward using interfaces to the likes of OpenGL.
On the other hand, if you want to write one of those shoot-all-the-aliens
video games, that might be harder to achieve. But maybe somebody has.
There was a plot workspace on APL2000.
Something else you might wish to try are the OPENGL workspaces
developed some time ago by Alexander Kornilovsky. He does not get
into any fancy shading, but shows how to do the OpenGL basics. These
are free downloads on the Dyalog web site.
For completeness, also have a look at J.
Workstation APL2 has three levels of graphics facilities:
AP 207 - A graphics process that lets you easily do things like draw circles
and lines.
GRAPHPAK - A workspace built on top of AP 207 which lets you do business
charts.
AP 145 custom controls - Which lets you work right down at the Windows API
level and do whatever you want. You can also use this interface to call
OpenGL routines and do 3d stuff. (AP 145 is only available on Windows.)
We have samples that demonstrate how to use al these facilities.
You can download a demonstration version from the Support page at our web
site:
http://www.ibm.com/software/awdtools/apl
David Liebtag
IBM APL Products and Services
Recent versions of Dyalog APL bundle Adrian Smith's excellent
"RainPro" graphics package plus the .NET version of this, known as
SharpPlot. SharpPlot is also marketed outside the APL community as a
charting tool for .NET applications, with some success... See
http://sharpplot.com/Samples.htm. If you get hold of an educational or
non-commercial copy of Dyalog APL, SharpPlot is included.
For other types of graphics, the Microsoft.Net framework gives access
to uncountable 2D and 3D graphics engines, including Windows
Presentation Foundation, which allows you to easily describe graphics
as XML text, in a format known as "XAML" (Extended Application Markup
Language). Google will show you hundreds of recipes for "XAML graphics
examples", for example:
http://www.longhorncorner.com/uploadfile/mahesh/xamldrawing04112005225101pm/xamldrawing.aspx
Any Microsoft.Net component can be used from Dyalog APL "as if it was
a function in your workspace".
I and a few others have experimented for several years with IBM's
Workstation APL2 and OpenGL. The first two links on the following web
page illustrate some of the things I've worked with:
http://home.roadrunner.com/~wniehoff/apl/index.html.
I've experimented with several mechanisms for calling OpenGL external
functions from APL2: (1) Using CALLAPI (from 2 GUITOOLS) to render
with OpenGL into a custom control owned by AP145; (2) Using Processor
11 to render with OpenGL into a custom control owned by AP145; and (3)
using Processor 11 to render with OpenGL into a window owned by SDL.
All three of these methods work quite nicely, except Method (2), which
has problems under Vista with Nvidia GPUs. (I believe the problem is
due to a bug in Nvidia's Vista driver. The method is known to work
with AMD GPUs and Vista and with all GPUs and XP.)
I have done a limited amount of work with OpenGL 3.0 and GLSL, where
there is great potential.
I have found APL and its array-handling capabilities to be nicely
suited to the kinds of applications illustrated on my web site -- that
is, once I learned enough OpenGL to be able to use its "vertex array"
capabilities. I would be glad to share our experiences and code.
From an engineering application perspective, I am using the three
graphics options provided by APL2. Further, I am also using the
interface between APL2 and opengl mentioned by Walt Niehoff above.
Together, I am able to render a variety of 2D and 3D graphics entirely
via APL2’s GUI. APL2 supports the generation of bitmap and metafiles
via their AP207. I’ve found this feature useful for generating a
summary (e.g., MS Word doc) with text and images rendered using
APL2. I am able to provide animations and represent stresses using
colors while remaining focused on my engineering application.
We're looking at projects to allow our users to (easily) build cross-
platform GUI, and to make our own development environment really
portable as well. GTK was a runner-up, but overall we currently think
that SilverLight under Windows and MoonLight "everywhere else" look
like a more attractive proposition. One advantage of SilverLight/
MoonLight is that you can build both desktop and browser (and
"hybrid") applications based on a single core technology (XAML), which
is both declarative (you can use XAML documents to describe UI) and
programmable (you can dynamically modify the UI at runtime using
objects which integrate smoothly with APL).
SilverLight is also a good partner technology for the "managed code"
native Microsoft.NET APL Interpreter that we are building. And you can
write web applications using traditional Dyalog APL on the server, and
APL# under SilverLight in the browser. In fact, it all looks VERY
exciting, especially because XAML comes with excellent, free, WYSWYG
designers which means that the burden of providing an undustrial-
strength GUI design tool as part of your APL system is gone.
Come to the BAA AGM in London on May 21st, and to APL2010 in Berlin to
see some preliminary results of this work ;-)
I am not sure if you can compare Silverlight and GTK.
They seem to me to be two different things.
Silverlight is an addon to browsers (primarily IE) but GTK is a
highly usable, feature rich toolkit for creating graphical user
interfaces which boasts cross platform compatibility and an easy to
use API
Problem with Silverlight is that it is not on Linux and Moonlight is
only planned and not available.
Another problem with Silverlight is lack of SVG.
So go ahead if you want with Silverlight but take another look at GTK
as well.
And I do want to come to Berlin in september.
> I am not sure if you can compare Silverlight and GTK.
> They seem to me to be two different things.
SilverLight is a very new technology, and it is still missing a few
features that are in Microsofts complete "Presentation Foundation".
But I have been playing with it a little recently, and I would also
classify it as a "high usable, feature rich toolkit for creating GUI".
My experience is limited, I could be wrong: Can you point to some
features that you need and are not supported in SL 4.0?
More at http://en.wikipedia.org/wiki/Microsoft_Silverlight
SilverLight is already "pretty complete" in terms of features (I
haven't found a feature that I missed yet, though I have to admit I
haven't tried to build anything really fancy). The message from
Microsoft is pretty clear: They intend to build SL up to be more or
less identical to WPF.
SilverLight is definitely not restricted to IE (you can also use it
"stand-alone" and on most popular web browsers). MoonLight is
definitely available under Linux and on the Max, it is lagging a
couple of releases behind SL but version 2.0 was released last autumn:
http://www.mono-project.com/Moonlight. The Mono team at Novell have
also issued strong statements that they intend not to lag too far
behind SL.
> Another problem with Silverlight is lack of SVG.
I'm not sure how big a problem this is... I think that tools which
generate SVG will most certainly also be able to generate XAML soon,
if they do not do so already. I think translation is also possible.
> So go ahead if you want with Silverlight but take another look at GTK as well.
I don't think we'll be revisiting that decision, the advantages of SL
seems to outweigh the drawbacks by a very significant margin, from our
point of view. GTK is possibly "more complete now", but it feels like
a technology which has peaked and won't be able to follow when we all
want to build cloud apps... I am convinced that SilverLight and
MoonLight are a better long term investment. The products that we are
thinking about building will probably only be "industrial strength" in
a year or two anyway, and by that time both SL and ML will have taken
further strides.
To summarize, the advantages of SL & ML (as I see it) are:
- The technologies support BOTH desktop, web and mobile applications -
on all the platforms that we think we need to be on for the next many
years
- XAML encourages a data-oriented view of UI, perfect for APL'ers :-)
- Availability of 3rd party designers for XAML
- Growing libraries of 3rd party controls built on .NET and Mono
technology
- A HUGE investment is being made on both Windows, Linux, Mac - and
the "new" mobile platforms
> Problem with Silverlight is that it is not on Linux andMoonlightis
> only planned and not available.
Miguel De Icaza would be very sad if you told him "Moonlight is only
planned and not available".
http://www.mono-project.com/Moonlight from which I quote: "Moonlight 2
was released December 17, 2009".
--
Stefano
Most of my moonlight information is based on following wiki
http://sv.wikipedia.org/wiki/Microsoft_Silverlight
Here it says it is planned
It also states that support will be available in the future for
Silverlight in Opera etc.
I am definitely not an expert on neither Silverlight nor Moonlight.
I am sure both are very good products.
Reading the page you refer to gives followig quote:
"Moonlight has several external dependencies, such as:
Gtk+ 2.0 development package
"
So yet again GTK is here behind the scenes so it can not be all bad.
> To summarize, the advantages of SL & ML (as I see it) are:
>
> - The technologies support BOTH desktop, web and mobile applications -
> on all the platforms that we think we need to be on for the next many
> years
> - XAML encourages a data-oriented view of UI, perfect for APL'ers :-)
> - Availability of 3rd party designers for XAML
> - Growing libraries of 3rd party controls built on .NET and Mono
> technology
> - A HUGE investment is being made on both Windows, Linux, Mac - and
> the "new" mobile platforms
Just wanted to endorse Morten's enthusiasm for the Microsoft
technologies.
I have been playing around with Windows Presentation Foundation (WPF),
which is the Windows-native GUI framework upon which Silverlight is
based. Both use XAML to allow the GUI to be designed by sophisticated
layout tools.
I think that WPF is a major opportunity for APLs like Dyalog and APLX
which support the .NET framework. WPF and XAML make it easy to write
programs which combine the best of both worlds - APL's power and
agility, and a professional-quality user interface.
Morten and I will both be talking on this subject at the BAA AGM in
London on May 21st, where I plan to show an APLX application which
uses some of the features of WPF : Vector graphics, animation, alpha-
blending, 3-D perspective drawing, etc.