Home > Archive > APL > August 2004 > Quote Quad is out
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Brian McGuinness 2004-07-14, 3:56 pm |
| It was a pleasant surprise to receive a new APL Quote Quad. As I
recall,
I did not see SIGAPL listed on the ACM renewal form, so I was afraid
that
the SIG had become defunct. It is nice to know that this is not the
case.
I have not done any groundbreaking work in APL to write an article
about,
but there are a few things that I am wondering about. For example:
* From reading APL interpreter documentation that is available online
for
free it appears that most interpreters are written in C. I wonder
if
C++ would be more useful for this. For example, if you define an
APL
integer type as
typedef long Integer;
then it seems that vector<Integer> would be a convenient way to
store
the shape of an array. And various array types could be derived
from
an abstract base array type, inheriting common methods such as
reshape().
* Some implementations use the period as a separator in namespace
pathnames.
This would appear to conflict with the use of usr-defined functions
in
inner products (FN1.FN2). Would jot be a better delimiter?
* Would it be more convenient if system functions such as #NL or #CR
returned
vectors of character vectors rather than character matrices?
Perhaps an
optional left argument could be added to #CR to allow this. I
believe that
one APL implementation uses such an argument in place of the
APL*PLUS #VR.
* If most APL interpreters are written in C, then since the standard C
library
provides a number of useful mathematical functions such as Bessel
functions
that are not already provided by APL it should be easy to add these
to APL,
perhaps through new left argument values to the circle function.
Would this
be useful?
* It might be nice to have a regular expression system function, say
#RE, e.g.
'[a-z]*xyzzy' #RE chavect similar to epsilon underbar, but using
regular expressions
'([0-9])*:' '\1.' #RE charvect find and replace
* An extension to #TF, )IN, and )OUT allowing APL arrays and
workspaces to be
converted to and from an XML representation with APL characters in
the form
of Unicode character entities might be useful for porting
applications
between APL interpreters, storing workspaces in host system files or
databases, and so on.
* Can namespaces be read and written directly to APL component files?
It would be nice to have a good, second generation, open source APL
interpreter, not because there is anything wrong with SAX or APLX,
which are
quite nice, but because that would make it easy to experiment with
extensions
to the language.
--- Brian
| |
| Curtis A. Jones 2004-07-14, 3:56 pm |
| Brian,
I'm glad to hear another QQ must be on its way to the US west coast.
My ACM "renewal invoice" is right here.
"
Sevices Not Up For Renewal
032 SIGAPL Membership
"
I asked Bob Brown, chairman of SIGAPL, about this. His response:
"I have made SIGAPL dues unessesary for 1 year."
So SIGAPL is still alive. Curtis
| |
| Stefano Lanzavecchia 2004-07-15, 3:56 am |
| > * Some implementations use the period as a separator in namespace
> pathnames.
> This would appear to conflict with the use of usr-defined functions
> in
> inner products (FN1.FN2). Would jot be a better delimiter?
In Dyalog APL the jot between to function names (or between an array and a
function name) is used for function composition. For instance
{rho}{jot}{rho}
is "rank" and
2 {jot} {times}
is the function that multiples its argument by 2.
In Dyalog APL, I think that the interpreter can only disambiguate the use of
the dot between two names at runtime, since FN1 or FN2 could be either, even
both or none, namespaces or even array of namespaces.
> * Would it be more convenient if system functions such as #NL or #CR
> returned
> vectors of character vectors rather than character matrices?
In Dyalog APL there's a system function called "#NR" that returns a vector
of character vectors.
> * It might be nice to have a regular expression system function, say
> #RE, e.g.
> '[a-z]*xyzzy' #RE chavect similar to epsilon underbar, but using
> regular expressions
>
> '([0-9])*:' '\1.' #RE charvect find and replace
This would probably get my vote.
> * Can namespaces be read and written directly to APL component files?
Dyalog APL namespaces can indeed be written into component files. I don't
know about IBM2 namespaces which are quite different.
--
WildHeart'2k4
| |
| TaliesinSoft 2004-07-15, 3:56 pm |
| On Thu, 15 Jul 2004 02:37:24 -0500, Stefano Lanzavecchia wrote
(in article <2lmqhkFemtjtU1@uni-berlin.de> ):
> Dyalog APL namespaces can indeed be written into component files. I don't
> know about IBM2 namespaces which are quite different.
Another very important and useful aspect of Dyalog APL namespaces is that
they can be passed as arguments to functions and returned as results. And, as
you should expect, namespaces can contain namespaces. Given that namespaces
can contain functions, this becomes an easy and efficient way of passing
custom functional capabilities into another function. Another interesting
aspect is that when passed as an argument to a function it is by reference
and not by value, meaning that any action taken on that namespace will affect
the copy outside of the function even if not returned as a result. If that
behavior is not wanted it is a simple action to change the namespace to be,
in effect, by value. Dyalog APL's implementation of amespaces with Dyalog
APLs dynamic functions have brought APL to the forefront of programming
languages in terms of being able to easily express powerful programming
structures.
-- James L. Ryan -- TaliesinSoft
"My dog never came across a bush he didn't like!"
| |
| Curtis A. Jones 2004-07-15, 3:56 pm |
| Brian,
There are a lot of interesting questions in your note.
I've already commented that my ACM renewal listed SIGAPL and that we
keep our SIGAPL memberships for another year without having to pay dues.
Stefano Lanzaveccia and James Ryan have addressed some of your questions
about APL itself.
I'm not an implementer, so I can't say if C++ offers any great benefit
over C for writing an interpreter.
Thank you, Stefano, for noting Dyalog's use of FN1{jot}FN2.
Can one use the same name for both a function and a namespace? I often
have a main function that has the same name as the workspace I've
assembled in which to run the function.
{quadNL} and {quadCR} were established in what I'd call
"first-generation" APL without vectors of vectors. I don't think they
should be changed because I don't want to break existing code. Stefano
noted Dyalog's {quadNR} system function as a way to convert the
character matrices to nested vectors.
Good point about math programs in the standard C library. In APL2 we
use name association to get to outside routines. Are the math programs
in the standard C library shipped with APL products?
Regular expressions: Is this a UNIX format for search strings?
Providing a system function to use them sounds good to me.
)IN and )OUT are specifically for transferring APL workspaces between
different interpreters. The transfer format predates XML by maybe 20
years. It also predates (I think) Unicode. I suppose I'm prickly about
keeping things backward compatible because I still occasionally use APL
under DOS.
"It would be nice to have a good, second generation, open source APL
interpreter..." I think you're actually talking about at least
THIRD-generation APL. There may be disagreement here. I think of APL2
and I. P. Sharp's Dictionary APL with nested arrays (including the
vectors of vectors you'd like from {quadNL}) as second-generation APLs.
Some might make a good argument that J is the third-generation of APL,
in which case we should be speaking of FOURTH-generation APL.
FORTH is already taken. Take the FIFTH? :-( (I'd rather have a bottle
in front of me than to have a frontal lobotomy. [citation?] This note
is too long!) Curtis
| |
| pmrdealmeida 2004-07-15, 8:56 pm |
| Hi!
I did not see any new issue available in the SIGAPL electronic archive!
What is the current volume and issue number (of the last APL Quote Quad)?
Can I get a table of contents online?
Cheers,
Pedro Rodrigues de Almeida
Helsinki - Finland
| |
| Curtis A. Jones 2004-07-15, 8:56 pm |
| Pedro,
The place to get the table of contents of the latest Quote Quad should
be the SIGAPL Web site at
http://www.acm.org/sigs/sigapl/
(Surprise! ".../sigs/..." is new.)
It appears the latest issue has not yet made it there. (It has not made
it to San Jose, California, USA either). Curtis
| |
| Steve Rogers 2004-07-16, 3:55 am |
| "Curtis A. Jones" <Curtis_Jones@prodigy.net> wrote in message news:<40F6BC92.5D073736@prodigy.net>...
> ...
> I'm not an implementer, so I can't say if C++ offers any great benefit
> over C for writing an interpreter.
> ...
A+ <http://www.aplusdev.org> is open source and it looks like the core
APL functionality is standard C, but that the GUI and IPC are C++.
The early versions of J, for which source is available, was standard
C, though in a non-standard style. I'd think that C++ templates would
be useful for writng an APL interpreter, but would not provide a large
advantage.
Regards,
Steve
| |
| Takuon Soho 2004-07-17, 3:55 am |
| I'm a new member of the ACM and an APL acolyte.
How do I join the SIGAPL?
Thanks
Jim
"Brian McGuinness" <brian.b.mcguinness@lmco.com> wrote in message
news:3fd57b8c.0407140530.6f1a6e00@posting.google.com...
> It was a pleasant surprise to receive a new APL Quote Quad. As I
> recall,
> I did not see SIGAPL listed on the ACM renewal form, so I was afraid
> that
> the SIG had become defunct. It is nice to know that this is not the
> case.
>
> I have not done any groundbreaking work in APL to write an article
> about,
> but there are a few things that I am wondering about. For example:
>
> * From reading APL interpreter documentation that is available online
> for
> free it appears that most interpreters are written in C. I wonder
> if
> C++ would be more useful for this. For example, if you define an
> APL
> integer type as
>
> typedef long Integer;
>
> then it seems that vector<Integer> would be a convenient way to
> store
> the shape of an array. And various array types could be derived
> from
> an abstract base array type, inheriting common methods such as
> reshape().
>
> * Some implementations use the period as a separator in namespace
> pathnames.
> This would appear to conflict with the use of usr-defined functions
> in
> inner products (FN1.FN2). Would jot be a better delimiter?
>
> * Would it be more convenient if system functions such as #NL or #CR
> returned
> vectors of character vectors rather than character matrices?
> Perhaps an
> optional left argument could be added to #CR to allow this. I
> believe that
> one APL implementation uses such an argument in place of the
> APL*PLUS #VR.
>
> * If most APL interpreters are written in C, then since the standard C
> library
> provides a number of useful mathematical functions such as Bessel
> functions
> that are not already provided by APL it should be easy to add these
> to APL,
> perhaps through new left argument values to the circle function.
> Would this
> be useful?
>
> * It might be nice to have a regular expression system function, say
> #RE, e.g.
> '[a-z]*xyzzy' #RE chavect similar to epsilon underbar, but using
> regular expressions
>
> '([0-9])*:' '\1.' #RE charvect find and replace
>
> * An extension to #TF, )IN, and )OUT allowing APL arrays and
> workspaces to be
> converted to and from an XML representation with APL characters in
> the form
> of Unicode character entities might be useful for porting
> applications
> between APL interpreters, storing workspaces in host system files or
> databases, and so on.
>
> * Can namespaces be read and written directly to APL component files?
>
> It would be nice to have a good, second generation, open source APL
> interpreter, not because there is anything wrong with SAX or APLX,
> which are
> quite nice, but because that would make it easy to experiment with
> extensions
> to the language.
>
> --- Brian
| |
| Takuon Soho 2004-07-18, 3:55 pm |
| Thanks.
I joined.
Jim
"Curtis A. Jones" <Curtis_Jones@prodigy.net> wrote in message
news:40F9413E.7CD4BC96@prodigy.net...
> Jim,
> The SIGAPL Web page has links under "SIGAPL Membership".
>
> The SIGAPL Web page:
> http://www.acm.org/sigs/sigapl/
> (Note that "/sigs" is new.)
>
> The link "ACM application form (online version)" is at:
> https://campus.acm.org/public/gensi...gqj_siglist.cfm
>
> "ACM application form (print version)" link gets "Not Found".
>
> It's probably worthwhile to have the ACM member-services number handy:
> 800:342-6626. (Are you in the US? Outside US it's +1-212-626-0500 or
> acmhelp@acm.org) Curtis
| |
| Brian McGuinness 2004-07-19, 8:55 am |
| On Thu, 15 Jul 2004 at 17:19:14 GMT Curtis Jones wrote:
....
>Thank you, Stefano, for noting Dyalog's use of FN1{jot}FN2.
>Can one use the same name for both a function and a namespace? I often
>have a main function that has the same name as the workspace I've
>assembled in which to run the function.
I'm not comfortable with the excessive overloading of the '.'
character as it seems to me that this makes it harder to parse
expressions (for both humans and machines). So I was looking for an
alternate character that would be relatively small and unobtrusive,
keeping namespace pathnames readable. The next possibility that comes
to mind is overbar, but I believe that APL2 allows that in identifier
names. So I'm not sure what would be the best character to use.
The other main thing I was wondering about with regard to namespaces
was whether they could be used for the same purposes as Sharp APL
packages. In at least one APL implementation this appears to be true.
>{quadNL} and {quadCR} were established in what I'd call
>"first-generation" APL without vectors of vectors. I don't think they
>should be changed because I don't want to break existing code. Stefano
>noted Dyalog's {quadNR} system function as a way to convert the
>character matrices to nested vectors.
#CR can be extended to support an optional left argument to select old
style or new style behavior. Extending #NL, which already has a left
argument, would be more difficult. I personally prefer using one
system function with an argument to select options rather than using a
number of different system functions, as it somehow seems cleaner.
>Good point about math programs in the standard C library. In APL2 we
>use name association to get to outside routines. Are the math programs
>in the standard C library shipped with APL products?
These are functions provided for use in C programs. I have never
heard of these (Bessel functions) being provided as part of an APL
distribution.
>Regular expressions: Is this a UNIX format for search strings?
>Providing a system function to use them sounds good to me.
Yes. For example, you could write "[0-9]" to match a digit or
"[a-zA-Z]*" to match zero or more letters of the alphabet, and so on.
I was thinking of perhaps emulating some of the useful capabilities of
Perl.
> )IN and )OUT are specifically for transferring APL workspaces between
>different interpreters. The transfer format predates XML by maybe 20
>years. It also predates (I think) Unicode. I suppose I'm prickly about
>keeping things backward compatible because I still occasionally use APL
>under DOS.
I have been thinking about options for APL system commands, perhaps
along the line of Unix command options. For example, the separate
)LOAD, )QLOAD, and )XLOAD commands could be replaced with a single
)LOAD command if we allowed the syntax )LOAD -Q WSID to represent
)QLOAD and )LOAD -X WSID to represent )XLOAD. Something similar could
be done to allow variations of )IN and )OUT. On the other hand,
perhaps system commands should be done away with in favor of system
functions, which have the advantage of being executable by
user-defined APL functions. In that case, an optional left argument
could be used to select options. So we could support the old format,
as well as XML with Unicode, and perhaps other options as well, such
as APLASCII.
>"It would be nice to have a good, second generation, open source APL
>interpreter..." I think you're actually talking about at least
>THIRD-generation APL. There may be disagreement here. I think of APL2
>and I. P. Sharp's Dictionary APL with nested arrays (including the
>vectors of vectors you'd like from {quadNL}) as second-generation APLs.
>Some might make a good argument that J is the third-generation of APL,
>in which case we should be speaking of FOURTH-generation APL.
APL/11 and OpenAPL do not have nested or boxed arrays. That was the
major shortcoming I was thinking of. Of course, it would also be nice
to have complex numbers, arrays of expressions (perhaps a function
could be thought of as a vector of expressions), namespaces, and so
on. Arrays of expressions would allow control structures to be
implemented as functions operating on expressions. This seems like a
fun thing to play around with.
--- Brian
| |
| Martin Neitzel 2004-07-19, 8:55 pm |
| > Arrays of expressions would allow control structures to be
> implemented as functions operating on expressions. This seems like a
> fun thing to play around with.
Hi Brian,
you might enjoy to take a look at one of the old (pre-1994)
J versions (those with the public source, up to J version 7.)
At that time, J didn't have the control structures. Explicit
functions were written by assembling a series of boxed expression
strings. (This is still possible with current J Releases, even
though probably not many J users are aware of it these days).
The execution of those expressions was governed by a control vector
indexing the vector, called "suite" and denoted by "$.".
It was initialized on function entry for a simple sequential execution
of all expressions, but you could do reassignments to the control
vector any time. For example, assigning 0 1 1 1 1 3 to $. would
do the first (0) expression once, loop four times over the second
(1) expression, skip the third, do the fourth once, and exit.
ftp://ftp.gaertner.de/pub/j/j-v7-src.tgz has the sources for v7.
Please be aware that J has changed a *lot* since then. Don't expect
to be able to do _anything_ with this based on current-day J knowledge
or docs. I can sent you an old "Dictionary" edition appropriate
to the old version by over-seas snail-mail if you are really serious
about it.
Martin
| |
| Brian McGuinness 2004-07-20, 8:55 am |
| neitzel@marshlabs.gaertner.de (Martin Neitzel) wrote in message news:<I14DKJ.10w@marshlabs.gaertner.de>...
> you might enjoy to take a look at one of the old (pre-1994)
> J versions (those with the public source, up to J version 7.)
....
> ftp://ftp.gaertner.de/pub/j/j-v7-src.tgz has the sources for v7.
> Please be aware that J has changed a *lot* since then. Don't expect
> to be able to do _anything_ with this based on current-day J knowledge
> or docs. I can sent you an old "Dictionary" edition appropriate
> to the old version by over-seas snail-mail if you are really serious
> about it.
>
> Martin
Thanks. I have downloaded the file and will look at it.
Generally when a new data type (e.g. complex numbers) is added to APL,
the existing functions are extended to operate on it. It is interesting
to consider what meaning the standard operations might have when applied
to an expression or function data type. I suppose that they would then,
by definition, be acting as operators. An outer product of an expression
array with a data array might apply each expression to each data element.
A number of operators could be defined without requiring new symbols;
for example, a plus sign might represent composition, the power symbol (*)
might apply a function (or its inverse for a negative power) a specified
number of times, and so on. For an expression x e y, where e is an
expression scalar and x and y are data arrays, {rotate} (x e y) could
reverse the order of arguments.
Of course, new functions could be defined, e.g. for expressions e1, e2,
e3, and e4, e1 e2 e3 {quad_circle} e4 might be equivalent to the C/C++
"for" loop for (e1; e2; e3) e4;
I am sure that one could have a great deal of fun playing with this,
and the results might prove useful for real-world applications. Of
course there are other things that should probably be done first,
such as, say, coming up with a standard, easy way to access sockets to
support web applications, or boiling GUIs down to their essential,
fundamental components and coming up with a simple, standard way to
create them, but given a good, modern, open-source APL interpreter it
would be possible to experiment with extensions such as an expression
data type and see if they really did work out well or not.
--- Brian
| |
| Eric Landau 2004-07-20, 8:55 pm |
| In article <40F6BC92.5D073736@prodigy.net>, "Curtis A. Jones"
<Curtis_Jones@prodigy.net> wrote:
>I'd rather have a bottle
>in front of me than to have a frontal lobotomy. [citation?]
"Existential Blues" by T-Bone Stankus.
Eric Landau, APL Solutions, Inc.
"Sacred cows make the tastiest hamburger." - Abbie Hoffman
| |
| Curtis A. Jones 2004-07-21, 3:55 am |
| Jim,
The SIGAPL Web page has links under "SIGAPL Membership".
The SIGAPL Web page:
http://www.acm.org/sigs/sigapl/
(Note that "/sigs" is new.)
The link "ACM application form (online version)" is at:
https://campus.acm.org/public/gensi...gqj_siglist.cfm
"ACM application form (print version)" link gets "Not Found".
It's probably worthwhile to have the ACM member-services number handy:
800:342-6626. (Are you in the US? Outside US it's +1-212-626-0500 or
acmhelp@acm.org) Curtis
| |
| Curtis A. Jones 2004-08-03, 8:56 am |
| My issue of Quote Quad arrived in San Jose, California (USA) on Saturday
- 31 July 2004. (More than two w s after Brian McGuinness received
his copy.)
Since http://www.acm.org/sigapl does not yet list the contents, here
they are:
Robert G. Brown
View from the Chair: Changes
Alexander Skomorokhov, Vladimir Kutinsky
Cooperative Computing based on Dyalog APL
and the R statistical system
Cliff Reiter
With J: Fractal Forecasting
Stephen M. Mansour
Duplicate Bridge Match Point Scoring with APL
Robert A. McEwen
Hyperbolic Symmetry:A Family Affair
Eke Van Batenburg
What's News
Devon McCormick
What I Did on My Summer Vacation:
A review of APL 2003
Yes, the APL in my copy is also garbled. Curtis
|
|
|
|
|