Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Elias Mårtenson
Thanks! It works now. Could you check out the latest version from git branch "master" and copy the content of the directory "native" it to the GNU APL distribution? I've updated everything and included the Makefile.am file so that it should need to changes. This will ensure that the native module

[Bug-apl] stdin still echoed to stdout even with --noCIN

2014-05-22 Thread Peter Teeson
In Xcode I pass TERM=xterm-256color as an env var. This is the value Terminal uses. Also --noCIN as an option at launch time to turn off echoing stdin. Set breakpoint here in UserPreferences.cc: else if (!strcmp(opt, "--noCIN")) { do_not_echo = true;

Re: [Bug-apl] TERM env var not getting set

2014-05-22 Thread Peter Teeson
Hi Jürgen: Thanks - didn't know about Q or Q1.. they are defined in Common.hh right? (const void *)(getenv("TERM")): '0' at main.cc:269 getenv("TERM"): '(lldb) (const void *)(getenv("TERM")): '0x100309215' at main.cc:278 getenv("TERM"): 'dumb' at main.cc:279 So you are correct - it's w

[Bug-apl] Error after make developer

2014-05-22 Thread Peter Teeson
I did ./configure ; make develop; make /Volumes/Data/Development/MyProjects/GNUAPL/apl-svn/src/Value.cc:1319:9: Goto into protected scope Value.cc:1319:9: error: goto into protected scope goto complete; ^ const Cell * C = &get_ravel(0); ^ uint32_t error_count = 0;

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Juergen Sauermann
Hi Elias, I have added Value::print1(ostream & out, PrintContext pctx). I have used PrintContext instead of print width because you probably want to set the print precision and maybe style as well. Use like: PrintContext pctx( /* satyle */ PST_NONE, /* precision */ 16, /* width */ 2000);

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Elias Mårtenson
The value argument could be anything. Basically, all I want to do is the following: - Given any Value_P, get the textual representation of that value as if it had been displayed in the interpreter, *without* any wrapping. Or... - Given any Value_P, get the textual representation of that v

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Juergen Sauermann
Hi again, it is actually somewhat difficult to see what happens. The private use characters are not displayed in the same way on all machines. Also I can't see how your do_CR() value argument looks like (could be ⍳ something). Maybe it is easier to start with an a that does not involve print

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Juergen Sauermann
Hi Elias, so do_CR returns the internal character representation which contains "blanks" inserted by the APL formatting (which is somewhat non-trivial). The different symbols tell why a blank was inserted and the final action is to (1) replace the blanks and to (2) ⎕PW-wrap the output. You wa

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Elias Mårtenson
Well, I tried with 1 as well, and got the same result. How do you recommend I deal with it? Also, how can I use do_CR to render with the default (non-CR) output style? Regards, Elias On 22 May 2014 21:47, Juergen Sauermann wrote: > Hi Elias, > > I see, the private use symbols can be made visi

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Juergen Sauermann
Hi Elias, I see, the private use symbols can be made visible with ./configure VISIBLE_MARKERS_WANTED-yes in case you are interested in the details of APL output formatting. They can be removed (visible or not) with UCS_string::remove_pad() (which returns another UCS_string with these characte

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Elias Mårtenson
Thanks. I tried the second solution, and got the below result. Very strange. Here's the code: const PrintContext pctx( PST_NONE, Workspace::get_PP(), 10 ); Value_P cr_formatted = Quad_CR::do_CR( cr_level, *value, pctx ); const PrintContext pctx2( PST_NONE, Workspace::g

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Juergen Sauermann
Hi Elias, if the values was a matrix then you may have another problem that the matrix has no \n at the end of each row (not sure how your output is supposed to look like). Let say do_CR returns *Value_P Z *(which can be a scalar, a vector, or a matrix depending on the value ⎕CRed and the first

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Elias Mårtenson
Thank you. But I don't see how I can solve my problem then? Regards, Elias On 22 May 2014 20:44, Juergen Sauermann wrote: > Hi Elias, > > yes, sorry. Forgot to mention that the APL values used in the constructor > of UCS_string > must have rank ≤ 1 while do_CR() might produce matrices for some

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Juergen Sauermann
Hi Elias, yes, sorry. Forgot to mention that the APL values used in the constructor of UCS_string must have rank ≤ 1 while do_CR() might produce matrices for some left arguments of ⎕CR. /// Jürgen On 05/22/2014 11:13 AM, Elias Mårtenson wrote: I tried to do this, but I'm having the construc

Re: [Bug-apl] Calling Value::print() with different ⎕PW

2014-05-22 Thread Elias Mårtenson
I tried to do this, but I'm having the constructor for UCS_string crash on me when I try: #0 0x7f228d0cbd67 in raise () from /usr/lib/libc.so.6 #1 0x7f228d0cd118 in abort () from /usr/lib/libc.so.6 #2 0x7f228d9c0dc5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/lib