Re: [Bug-apl] gnu-apl-mode patch: Full-featured indentation

2014-07-31 Thread Elias Mårtenson
Thanks. Integrated. Regards, Elias On 1 August 2014 12:24, David B. Lamkins wrote: > The customization turned out to be not so difficult. Thanks for the > nudge and the (off-list) hints. > > Patch attached. > > On Fri, 2014-08-01 at 10:48 +0800, Elias Mårtenson wrote: > > Thank you. It's been

Re: [Bug-apl] gnu-apl-mode patch: Full-featured indentation

2014-07-31 Thread David B. Lamkins
The customization turned out to be not so difficult. Thanks for the nudge and the (off-list) hints. Patch attached. On Fri, 2014-08-01 at 10:48 +0800, Elias Mårtenson wrote: > Thank you. It's been applied. > > > I would like to see the indentation amounts be a bit more > configurable. I think d

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Blake McBride
Thanks. I wasn't sure whether it was upper or lower case chi. I guessed right. Thanks for the verification! Blake On Thu, Jul 31, 2014 at 11:14 PM, Kacper Gutowski wrote: > On 2014-07-31 22:51:39, Blake McBride wrote: > > Never heard of χ. Not on my keyboard. Sounds like I need it. What

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Kacper Gutowski
On 2014-07-31 22:51:39, Blake McBride wrote: > Never heard of χ.  Not on my keyboard.  Sounds like I need it.  What is the U > code for it?  Is it U+03a7 or U+03C7? It's a small chi, u+03c7. No APL kayboards have it because it's indeed unique to GNU APL. -k

[Bug-apl] Matching ]keyb on WASD keyboard

2014-07-31 Thread Blake McBride
Enclosed is an update to my WASD keyboard configuration. The GNU APL distribution should be updated with this. I added/corrected the following: χ ¥ ⍹ ⍶ ⍙ £ ¢ I now exactly match ]keyb. Thanks. Blake apl.wasd.xkb Description: Binary data

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Blake McBride
Never heard of χ. Not on my keyboard. Sounds like I need it. What is the U code for it? Is it U+03a7 or U+03C7? Thanks. Blake On Thu, Jul 31, 2014 at 10:02 PM, Elias Mårtenson wrote: > Right. I was thinking of χ, which apparently is called chi. > > Regards, > Elias > > > On 1 August 2014

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Elias Mårtenson
Right. I was thinking of χ, which apparently is called chi. Regards, Elias On 1 August 2014 10:53, Kacper Gutowski wrote: > On 2014-07-31 22:49:06, Peter Teeson wrote: > > David used theta as well. Is that also an available symbol? > > i.e. a greek letter not otherwise used by the APL language

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Kacper Gutowski
On 2014-07-31 22:49:06, Peter Teeson wrote: > David used theta as well. Is that also an available symbol? > i.e. a greek letter not otherwise used by the APL language? You're probably refering to ⍬. This is not a theta. This symbol is called zilde and it should look like zero with superimposed t

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Elias Mårtenson
It's a GNU APL extension. Standard APL does not support functions with indexes. Since GNU APL does, it also needed a symbol to represent that parameter inside lambdas. Regards, Elias On 1 August 2014 10:49, Peter Teeson wrote: > Thanks Elias: > > David used theta as well. Is that also an avail

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Peter Teeson
Thanks Elias: David used theta as well. Is that also an available symbol? i.e. a greek letter not otherwise used by the APL language? I will have to Google for a good intro to lambdas… They look interesting... respect… Peter On 2014-07-31, at 10:11 PM, Elias Mårtenson wrote: > Yes, you are ri

Re: [Bug-apl] gnu-apl-mode patch: Full-featured indentation

2014-07-31 Thread Elias Mårtenson
Thank you. It's been applied. I would like to see the indentation amounts be a bit more configurable. I think designating multiple variables using defcustom for this is a better option. That said, isn't there another way in which a set of numbers can be edited from "customize"? What is your opini

[Bug-apl] gnu-apl-mode patch: Full-featured indentation

2014-07-31 Thread David B. Lamkins
Elias, I took the liberty of rewriting `gnu-apl--indent-this'. The function now takes indentation amounts from `gnu-apl--indent-amounts'; this variable specifies the indentation for header (between del and the first nonblank character; del is still flush-left), comment, label and other within a

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Elias Mårtenson
Oh yeah, now that you mention it I remember seeing the same thing. Blank lines gets eaten when the function is defined using ⎕FX. You can see that when using the function editor in the Emacs mode. On 1 August 2014 10:11, David B. Lamkins wrote: > One caution about blank lines: I seem to have tr

[Bug-apl] Error defining operators using lambda

2014-07-31 Thread Elias Mårtenson
The following definition throws a SYNTAX ERROR: * foo ← { (1 ⍶ ⍵) }* SYNTAX ERROR foo←foo ^ ^ Calling it directly works though: * +{1 ⍶ ⍵} 10* 11 Regards, Elias

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread David B. Lamkins
One caution about blank lines: I seem to have tripped on quad-FX choking on empty lines. (This would've been in the case where the argument is a list, not an array.) I haven't checked recently... On Fri, 2014-08-01 at 10:03 +0800, Elias Mårtenson wrote: > I don't really like the cut line. I'd rath

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Elias Mårtenson
Yes, you are right. Here are the available symbols: ⍵ - Right-hand argument ⍺ - Left-hand argument ⍹ - Right-hand function (the lambda is an operator) ⍶ - Left-hand function (the lambda is an operator) χ - Index Regards, Elias On 1 August 2014 10:04, Peter Teeson wrote: > Thank you kind gentl

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Peter Teeson
Thank you kind gentlemen for helping me move forward with modern APL. Am I correct in assuming that expressions such as {⍬≡0⍴⍵} are lambdas? And that the symbols theta and omega are place holders similar to X and Y in a user defined function? (all new stuff to me BTW - but very interesting.) resp

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Elias Mårtenson
I don't really like the cut line. I'd rather see the use of a blank line to make this separation if needed: ∇Z←foo X ⍝ Doc comment ⍝ This one too ⍝ But not this one Z←X+1 ∇ Now, in your latest example, you went back to using a single ⍝ character as prefix. This is in line with my current

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Elias Mårtenson
This is the table I have included in the Emacs mode documentation. I got the information from the ISO spec, so I hope it's correct: 0 (1-R⋆2)⋆0.5 ¯1 arcsin R 1 sin R ¯2 arccos R 2 cosin R ¯3 arctan R 3 tan R ¯4 (R+1)×((R-1)÷R+1)⋆0.5

Re: [Bug-apl] Determining data type...

2014-07-31 Thread Kacper Gutowski
On 2014-07-31 15:54:44, Peter Teeson wrote: > Looked in the APL2 IBM manual but do not understand how to determine the data > type of a variable. > Neither the primitives nor the Quads sparked the answer in my brain. > It must be something pretty obvious but not to me right now. > > So if I have

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread David B. Lamkins
On Fri, 2014-08-01 at 00:32 +0800, Elias Mårtenson wrote: > So you are basically suggesting using the same principle as me, just > using two ⍝ symbols instead of one? I'm OK with that. :-) I have a difficult time imagining a use case that'd have two different kinds of comments at the beginning of

Re: [Bug-apl] Determining data type...

2014-07-31 Thread David B. Lamkins
Reshape your datum as an empty vector then match to zilde. If the match succeeds then your datum is a number; otherwise a character/string. I believe that there's a circle function to extract the imaginary part of a number, if any. You can test for a nonzero imaginary part. Finally, you can compa

[Bug-apl] Determining data type...

2014-07-31 Thread Peter Teeson
I feel pretty stupid. Looked in the APL2 IBM manual but do not understand how to determine the data type of a variable. Neither the primitives nor the Quads sparked the answer in my brain. It must be something pretty obvious but not to me right now. So if I have a function FOO X how do I determi

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Juergen Sauermann
Hi, the whole comment would go into Doxygen as one block. Doxygen has different output formats (HTML, Tex, PDF so HTML markup would not work for the others. But they have their own markup link \b for bold. I downloaded the Doxygen sources. It looks feasible to add a language. Not trivial but

Re: [Bug-apl] Error loading the HTML library

2014-07-31 Thread Juergen Sauermann
Hi Elias, thanks, fixed in SVN 410. /// Jürgen On 07/31/2014 06:06 PM, Elias Mårtenson wrote: Getting the following error when loading HTML.sql: * )copy 5 HTML* loading )DUMP file /home/elias/src/apl/dist/lib/apl/wslib5/HTML.apl... SYNTAX ERROR Regards, Elias

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Elias Mårtenson
So you are basically suggesting using the same principle as me, just using two ⍝ symbols instead of one? I'm OK with that. :-) Should be first line be the "summary"? Should we allow leading spaces before the ⍝⍝? Should we assume that the content of the doc comment is HTML or some other kind of ma

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Juergen Sauermann
Hi Elias, the standard Doxygen way would be ⍝⍝< I believe. But I doubt that we will get Doxygen support for APL unless we contribute it ourselves (their wishlist is somewhat lengthy and APL is most likely not on their top-10 list). Another way would be to define our own marker and then trans

[Bug-apl] Error loading the HTML library

2014-07-31 Thread Elias Mårtenson
Getting the following error when loading HTML.sql: * )copy 5 HTML* loading )DUMP file /home/elias/src/apl/dist/lib/apl/wslib5/HTML.apl... SYNTAX ERROR Regards, Elias

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Elias Mårtenson
Right now, yes. It is the first comment block. If you want to define a more complex format, please go ahead. I'll update the Emacs code to make something clever with it. :-) On 31 July 2014 23:26, Juergen Sauermann wrote: > Hi Elias, > > so its simply an APL comment at the beginning of the fun

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Juergen Sauermann
Hi Elias, so its simply an APL comment at the beginning of the function? I would still propose some kind of marker that distinguishes it from normal APL comments (and in order to make it Doxygen compatible). /// Jürgen On 07/31/2014 05:03 PM, Elias Mårtenson wrote: Docstrings is documentati

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Elias Mårtenson
Docstrings is documentation for a function, embedded in the function definition itself, as discussed in a previous thread last week or so. Here's an example for the Connect command: https://github.com/lokedhs/apl-sqlite/blob/master/SQL.apl#L20 The Emacs mode uses this to provide integrated docume

Re: [Bug-apl] FILE_IO library

2014-07-31 Thread Juergen Sauermann
Hi Elias, I changed/removed the _5000 functions as proposed What are docstrings? /// Jürgen On 07/31/2014 09:36 AM, Elias Mårtenson wrote: I checked out the helper library for FILE_IO. Very nice. First of all, how about adding docstrings in the same form as the SQL library? I'm willing to

Re: [Bug-apl] Remaining APserver issues

2014-07-31 Thread Juergen Sauermann
Hi Elias, thanks - that explains a lot. I changed the code to use popen() rather than fork() + execve(). That way I can see when APserver has bound its socket. SVN 409. /// Jürgen On 07/31/2014 12:24 PM, Elias Mårtenson wrote: I did another test and added a two-second sleep after attempting t

Re: [Bug-apl] Strange T∆ output... OS X 10.8.5

2014-07-31 Thread Juergen Sauermann
Hi Peter, thanks, fixed in SVN 408. /// Jürgen On 07/31/2014 04:04 AM, Peter Teeson wrote: I launched apl --noColor --silent Version / SVN: 1.3 / 7603 When I trace this line: i←(2|j)/j←⍳×/k←⍴Y it produces this display Please display the tiff because when I copy/paste mail shows this 1357

Re: [Bug-apl] Remaining APserver issues

2014-07-31 Thread Elias Mårtenson
A typo in the above email. The two-second delay was added *before* the connection attempt, of course. Regards, Elias On 31 July 2014 18:24, Elias Mårtenson wrote: > I did another test and added a two-second sleep after attempting to > connect to the APserver, and that removed the problem. Thus

Re: [Bug-apl] Remaining APserver issues

2014-07-31 Thread Elias Mårtenson
I did another test and added a two-second sleep after attempting to connect to the APserver, and that removed the problem. Thus, I conclude that the issue is that the APserver doesn't have time to initialise before the parent tries to connect. I'd like to propose that APserver sends a message to t

[Bug-apl] FILE_IO library

2014-07-31 Thread Elias Mårtenson
I checked out the helper library for FILE_IO. Very nice. First of all, how about adding docstrings in the same form as the SQL library? I'm willing to help writing it if you want. Secondly, I wonder why some functions are defined the way they are though. For example, wouldn't it make more sense t