Re: [Bug-apl] A request for gnu-apl-mode

2014-04-28 Thread Elias Mårtenson
It's done. Please check the latest version and let me know if there are any problems. Regards, Elias On 29 April 2014 07:59, Elias Mårtenson wrote: > Yes. I will do this. I never tested this because I don't use > comment-region myself. > > Regards, > Elias > On 29 Apr 2014 03:37, "David B. Lam

Re: [Bug-apl] A request for gnu-apl-mode

2014-04-28 Thread Elias Mårtenson
Yes. I will do this. I never tested this because I don't use comment-region myself. Regards, Elias On 29 Apr 2014 03:37, "David B. Lamkins" wrote: > Please configure such that M-x comment-region works for APL code. > > >

Re: [Bug-apl] A request for gnu-apl-mode

2014-04-28 Thread Blake McBride
Good call! On Mon, Apr 28, 2014 at 2:33 PM, David B. Lamkins wrote: > Please configure such that M-x comment-region works for APL code. > > >

[Bug-apl] A request for gnu-apl-mode

2014-04-28 Thread David B. Lamkins
Please configure such that M-x comment-region works for APL code.

Re: [Bug-apl] Test build re SVN 221

2014-04-28 Thread Peter Teeson
Hi Jürgen: > "your compiler apparently pretends to be g++" ROTFLOL Yes no need to push this any further….. respect… Peter

Re: [Bug-apl] Request: quad-COPY (needed to implement package manager)

2014-04-28 Thread David B. Lamkins
I withdraw my request for a quad-COPY. I've built a comparable facility in APL using lib_file_io, a UTF-to-UCS conversion (on top of quad-UCS), and some glue around quad-FX and execute. On Sun, 2014-04-27 at 09:15 -0700, David B. Lamkins wrote: > I'm far enough along in developing a package manage

[Bug-apl] Probes

2014-04-28 Thread Juergen Sauermann
Hi, I have added a tiny new feature called "Probe" that allows more precise benchmarks and simpler benchmark programs. A probe is a small compile-time history of the CPU cycle counter. Currently two probes are installed in SkalarFunction.cc to measure one iteration of the inner loop of skalar fu

Re: [Bug-apl] APL and text editors- some initial thoughts

2014-04-28 Thread Juergen Sauermann
Hi Peter, the current line editor of GNU APL is in Nabla.cc. It is pretty simple. The editor gets its line input from Input::get_user_line_nabla(). My concern with [a?b] is this: currently we print a prompt and then get a user line from either readline or from the operating system (in cooked m

Re: [Bug-apl] APL and text editors- some initial thoughts

2014-04-28 Thread Elias Mårtenson
Peter, The Emacs mode is much more than a simple way of editing functions in an editor. The intention is to transform the standalone GNU APL interpreter into some kind of IDE in a similar way as SLIME does for Common Lisp. The Emacs mode backend provides similar functionality as the Swank backend

Re: [Bug-apl] Bug-apl Digest, Vol 8, Issue 101

2014-04-28 Thread David B. Lamkins
Thanks. I'll integrate that tonight when I finish the loader. (Before I turned in last night, I wrote an APL function to do the equivalent of 19 quad-CR; it's surprisingly simple.) On Mon, 2014-04-28 at 10:28 -0400, bug-apl-requ...@gnu.org wrote: > Send Bug-apl mailing list submissions to >

Re: [Bug-apl] APL and text editors- some initial thoughts

2014-04-28 Thread Peter Teeson
Hi Elias: Firstly I am totally agnostic as to which text editor should be used. I don't even understand why there should be an Emacs mode. But since you said it's actually generic maybe we can change it's name to more clearly reflect its generic nature? External Editor Mode? Just a fleeting th

Re: [Bug-apl] Is there a way of having a session log?

2014-04-28 Thread Elias Mårtenson
Also, keep in mind the "script" command that allows you to log anything from an interactive session. (or, of course... E nah. Won't say it). Regards, Elias On 28 April 2014 23:56, Juergen Sauermann wrote: > Hi Thomas, > > a log of the input (without the responses from APL) is contained in

Re: [Bug-apl] Is there a way of having a session log?

2014-04-28 Thread Juergen Sauermann
Hi Thomas, a log of the input (without the responses from APL) is contained in the .apl.history file created by readline (length and position settable in the preferences file). For a mix of input and output you could use eg. xterm logging facility (CTRL-left-mouse-button and select "Log to f

Re: [Bug-apl] Bug-apl] APL and text editors- some initial thoughts

2014-04-28 Thread Elias Mårtenson
Hello Peter, You might want to read up in the email archives on the discussions that led to the creation of the Emacs backend. It was done exactly because Jürgen did not want to maintain a special protocol used for things such as the Emacs mode. It's included in the base release because shipping

Re: [Bug-apl] Crash when using lib_file_io

2014-04-28 Thread Juergen Sauermann
Hi, thanks, fixed in SVN 235. /// Jürgen On 04/25/2014 05:40 AM, Elias Mårtenson wrote: To reproduce, load the attached APL file that provides a definition for the function io∆readfile. Then try to read the attached file called "services": * foo ← io∆readfile '/path/to/services'* Thi

Re: [Bug-apl] Segmentation fault with Emacs mode

2014-04-28 Thread Elias Mårtenson
Weird. I will investigate this. Regards, Elias On 28 April 2014 23:28, Blake McBride wrote: > Bug is still there: > > EMACS_NATIVE > Network listener started. Connection information: mode:tcp addr:37165 > )load Devices > SAVED 2014-4-27 16:11:45 (GMT-5) > VALUE ERROR > auto[

Re: [Bug-apl] Segmentation fault with Emacs mode

2014-04-28 Thread Blake McBride
Bug is still there: EMACS_NATIVE Network listener started. Connection information: mode:tcp addr:37165 )load Devices SAVED 2014-4-27 16:11:45 (GMT-5) VALUE ERROR auto[11] start ^ SEGMENTATION FAULT Process apl se

[Bug-apl] Bug-apl] APL and text editors- some initial thoughts

2014-04-28 Thread Peter Teeson
Hi Jürgen - I'm back from a mini-break. The ISO Standard Ch 16 p 239 et seq specifically states "The user makes entries on a keyboard, and obtains responses by seeing them presented on a display- device. The combination of a keyboard and a display-device is intended to represent, abstractly, a te

[Bug-apl] Is there a way of having a session log?

2014-04-28 Thread baruchel
Hi, a nice thing in many interpreters of various languages or mathematical software is the ability of enabling/disabling a raw/text log of the current session; is it possible with GNU APL? I think it would be easy to implement if itsn't already the case. Regards, -- Thomas Baruchel

Re: [Bug-apl] Segmentation fault with Emacs mode

2014-04-28 Thread Elias Mårtenson
It's easy to reproduce even without Emacs. Just load the library and start the server prior to loading his workspace. On 28 Apr 2014 23:06, "Juergen Sauermann" wrote: > Hi, > > I have initialized current_char in SVN 234, but can't see either how this > would > make a difference. I would be inter

Re: [Bug-apl] Segmentation fault with Emacs mode

2014-04-28 Thread Juergen Sauermann
Hi, I have initialized current_char in SVN 234, but can't see either how this would make a difference. I would be interested in the workspace file as well if the error persists. /// Jürgen On 04/28/2014 06:04 AM, Elias Mårtenson wrote: I've analysed the problem using Valgrind, and it seems

Re: [Bug-apl] How do I convert a byte sequence to Unicode?

2014-04-28 Thread Elias Mårtenson
You are right. I'll write a native library that hooks into libiconv later. :-) Regards, Elias On 28 April 2014 22:43, Juergen Sauermann wrote: > Hi Elias, > > I used ⎕CR instead of ⎕UCS because I believe it is more "standard" and also > has a different semantics in GNU APL (mix of integer and c

Re: [Bug-apl] How do I convert a byte sequence to Unicode?

2014-04-28 Thread Juergen Sauermann
Hi Elias, I used ⎕CR instead of ⎕UCS because I believe it is more "standard" and also has a different semantics in GNU APL (mix of integer and char, etc). ⎕UCS was more for IBM APL2 compatibility. Also, I try to keep the number of libraries to a minimum. Almost every library I used so far in

Re: [Bug-apl] About the reduction of clone() calls

2014-04-28 Thread Elias Mårtenson
Fair enough. I will keep playing with this and report back on any results I get. Thanks for the test cases. :-) Regards, Elias On 28 April 2014 22:24, Juergen Sauermann wrote: > Hi, > > generally speaking unnecessary clone() of values should of course be > avoided. > > In GNU APL 1.0 and 1.1 t

Re: [Bug-apl] About the reduction of clone() calls

2014-04-28 Thread Juergen Sauermann
Hi, generally speaking unnecessary clone() of values should of course be avoided. In GNU APL 1.0 and 1.1 there was a flag-based system of value ownership where the last owner would delete the value when giving up its interest in the value. This system began like the tmp flag, but then caused

Re: [Bug-apl] How do I convert a byte sequence to Unicode?

2014-04-28 Thread Elias Mårtenson
What do you think of the idea of supporting arbitrary encodings using dyadic ⎕UCS? I'd be happy to implement it. Although, perhaps you don't want to add a dependency on iconv? Regards, Elias On 28 April 2014 21:39, Juergen Sauermann wrote: > Hi, > > I have added 18 ⎕CR and 19 ⎕CR to convert fro

Re: [Bug-apl] How do I convert a byte sequence to Unicode?

2014-04-28 Thread Juergen Sauermann
Hi, I have added 18 ⎕CR and 19 ⎕CR to convert from Unicode strings (like 'Hello ⍴ ∇' in APL) to byte vectors (character vectors with values 0-255) in UTF8 encoding and back. See SVN 233. /// Jürgen On 04/28/2014 06:17 AM, David B. Lamkins wrote: I can use lib_file_io to read a sequence of b

Re: [Bug-apl] Internal storage of iota

2014-04-28 Thread Blake McBride
Dear Jürgen, For starters, this discussion, in my mind, is just academic at this point. Not knowing the details of GNU APL, I will speak somewhat abstractly. 1. The intent is to save space and not time. The space savings, depending on the application, can be extremely high. 2. The time cost

[Bug-apl] About the reduction of clone() calls

2014-04-28 Thread Elias Mårtenson
Hello Jürgen, I don't know if you have given this issue any thought, but it has certainly occupied my mind for the last few days. It's clear that heavy array processing does far too much cloning than should be necessary. Especially in cases where you have lots of operations on smaller arrays (as

Re: [Bug-apl] Internal storage of iota

2014-04-28 Thread Juergen Sauermann
Hi Blake, it is definitely saving space, but it most likely taking more time. Consider Z←A ⍴ IDX← ⍳ N to represent the creation (IDX ← ⍳ N) and use (Z ← A ⍴ IDX) of IDX. At ravel cell level a cell is created with constructor IntCell() and used with get_ravel(r). The argument of IntCell is a

[Bug-apl] Emacs mode is incredible!

2014-04-28 Thread Blake McBride
Emacs mode for GNU APL is incredible! Configuration/setup is very easy, and the advantage in function editing alone make it instantly a big win. It is easy to learn too. I start to edit a function just as in normal APL. The only thing I had to know was that Ctl-c Ctl-c saved my edit. Just know

Re: [Bug-apl] C-c C-c not working

2014-04-28 Thread Blake McBride
That fixed it. Thanks! Blake On Mon, Apr 28, 2014 at 6:04 AM, Elias Mårtenson wrote: > Oops. llog is an internal debug function I use. That should never go into > the repository. I've pushed an update to fix that. > > Regards, > Elias > > > On 28 April 2014 19:02, Blake McBride wrote: > >> G

Re: [Bug-apl] C-c C-c not working

2014-04-28 Thread Elias Mårtenson
Oops. llog is an internal debug function I use. That should never go into the repository. I've pushed an update to fix that. Regards, Elias On 28 April 2014 19:02, Blake McBride wrote: > Greetings, > > When using a brand new evocation of Emacs/GNU APL mode, I attempt to > define a function usi

[Bug-apl] C-c C-c not working

2014-04-28 Thread Blake McBride
Greetings, When using a brand new evocation of Emacs/GNU APL mode, I attempt to define a function using: ∇test I get a new window where I can edit the new function. When done, I hit C-c C-c and the system responds: Symbol's function definition is void: llog If I do: describe-key C-c C-c I