Re: Quad-PW on macOS

2024-12-21 Thread Kacper Gutowski
On Sat, 21 Dec 2024 at 03:56, Blake McBride wrote: > Quad-PW should not change with the screen size. It is not used for screen > display only. Quad-PW should always default to 80 to be consistent with IBM > APL. GNU APL has an option to make it adjust automatically to the window size. It's not

Re: output formatting

2023-09-10 Thread Kacper Gutowski
On Sun, 10 Sept 2023 at 01:08, Stephen Lewis wrote: > Writes elements in 4 row matrix with spurious > extra characters and a blank line. One thing you could do is to increase the print width ⎕PW so that it doesn't wrap, but ultimately this default printout is intended for human consumption. Shor

Re: Niladic functions vs niladic lambdas

2023-06-08 Thread Kacper Gutowski
On Thu, 8 Jun 2023 at 17:38, Emmanuel Charpentier wrote: > It seems that niladic lambdas are treated like constants. > In GNU APL lambda is dyadic if it contains a reference to ⍺ or monadic if it uses ⍵. There is no way to distinguish a call of niladic lambda from a definition of niladic lambda in

Re: Absolute limits of rank 2 bool matrix size in GNU APL?

2021-12-28 Thread Kacper Gutowski
This is somewhat tangential but, On Tue, Dec 28, 2021 at 01:25:19PM -0600, Blake McBride wrote: Level 1: you are using the RAM that exists (not over-committed) Level 2: you are using more RAM than you have causing over-commit and paging. Level 3: you allocate more memory than exists in RA

Re: Question on scalar extension of left arg

2021-07-29 Thread Kacper Gutowski
Looking at this post I think there is a tiny bug in the implementation of each: (⍳6) {⍺,⍵}¨ ⍳5 1 1 2 2 3 3 4 4 5 5 (⍳5) {⍺,⍵}¨ ⍳6 INDEX ERROR μ-Z__vA_LO_EACH_vB[2] (μ-N⊃μ-Z)←(μ-N⊃μ-A)μ-LO ^^ I think both should give a LENGTH ERRO

Re: Stack Overflow Question

2021-06-18 Thread Kacper Gutowski
On Fri, Jun 18, 2021 at 01:50:51PM +0100, Adám Brudzewsky wrote: Hi, can anyone answer this? Unrecognised symbols in GNU APL Support for ⍸ was added in December 2020 (r1368). Released tarballs don't have it; you will have to compile the developmen

Re: ending/stopping a script

2021-06-11 Thread Kacper Gutowski
On Fri, Jun 11, 2021 at 08:27:58PM -0600, enz...@gmx.com wrote: )off ends the apl session completely - i want to keep the ws open and just end the script execytuib and then edit the script in directory (and move around the '→0' or what ever can end the script execution - for debug) and then )co

Re: Broken commandline

2021-06-04 Thread Kacper Gutowski
On Fri, Jun 04, 2021 at 12:47:31AM +0200, Hans-Peter Sorge wrote: However, there are "graphically oriented" UTF characters (including ⍝⊖⍟⍱), that take two character positions when being displayed and take one character position when being selected. So it's not an APL character / font handling

Re: APL Christmas 2020 doodle: Tree

2020-12-23 Thread Kacper Gutowski
On Wed, Dec 23, 2020 at 10:46:13PM -0800, Russtopia wrote: [Dyalog] 9 2 9/↑'∘⌹∘' ' ⌹ ' ∘⌹⌹∘ ⌹⌹ [GNU] 9 2 9/↑'∘⌹∘' ' ⌹ ' ∘⌹⌹∘ Is it unexpected that GNU APL does not apply the Compress (/) across multiple right-hand items? There are some subtle differen

Re: Confused ⎕UCS

2020-11-22 Thread Kacper Gutowski
On Sun, Nov 22, 2020 at 03:19:19PM +0100, Dr. Jürgen Sauermann wrote: Floating point and complex numbers are not allowed as to avoid interference with ⎕CT (i.e. how should rounding be performed?). I share your sentiment regarding the upper bound of the ⎕UCS domain, but throwing a domain error

Re: ⎕FIO Buffer limit is 5000 Bytes

2020-10-30 Thread Kacper Gutowski
On Fri, Oct 30, 2020 at 02:34:35PM +0100, Dr. Jürgen Sauermann wrote: There is also ⎕FIO[26] which reads an entire file, but I am not sure how it works with popen()ed streams. It doesn't at all because it takes a path which additionally needs to be a regular file because it's mmaped rather tha

Re: ⎕FIO Buffer limit is 5000 Bytes

2020-10-30 Thread Kacper Gutowski
On Fri, Oct 30, 2020 at 09:17:27AM -0500, Blake McBride wrote: I'd like to see your API design proposal. It's not like I want to change anything, but wouldn't it be great to be able to write it simply as something like {⍵,⎕FIO[6] fd}⍣≡⍬ ? Disregarding errors, this would be possible if ⎕FIO[6]

Re: ⎕FIO Buffer limit is 5000 Bytes

2020-10-30 Thread Kacper Gutowski
On Thu, Oct 29, 2020 at 10:22:52PM +0100, Hans-Peter Sorge wrote: the return size from ⎕FIO[24] / ⎕FIO[6] is limited to 5000B: (...) Should be: What ever it takes :-) It's not limited to 5000B, it's just the default size and you can use any other with dyadic form. ⎕FIO is fairly low-level a

Re: Standard way to compute a Mandelbrot fractal in APL

2020-09-22 Thread Kacper Gutowski
On Tue, Sep 22, 2020 at 03:16:08PM +0200, Dr. Jürgen Sauermann wrote: thanks, fixed missing DOMAIN ERROR in SVN 1348. Thanks, but I failed to realize these are separate cases; the power function with complex left argument and real right still gives infinity at r1348. These should be domain e

Re: How find GNUAPL svn repository revision number

2020-09-22 Thread Kacper Gutowski
On Tue, Sep 22, 2020 at 02:17:46PM -0400, Peter Teeson wrote: I want to write a bash script to compare the local working copy revision number vs the svn://svn.savannah.gnu.org/apl/trun repository revision number. I know how to find out the revision number of my local working copy using sv

Re: Standard way to compute a Mandelbrot fractal in APL

2020-09-22 Thread Kacper Gutowski
On Mon, Sep 21, 2020 at 01:17:18PM +0800, Elias Mårtenson wrote: What is the neatest way to compute a Mandelbrot fractal in APL? The fact that you have to break out of the loop as soon as the absolute value of Z is >2 makes it a bit ugly. Is there a neater way to do this? This is what I came up

Re: Potential problem in diadic iota (⍳) or in Pick (⊃)

2020-08-07 Thread Kacper Gutowski
Indeed, as Christian wrote, the fix is not sufficient. But I still believe it's in the branch I previously mentioned as commenting out the whole optimization by flipping #if 1 to 0 at PrimitiveFunction.cc:319 fixes it as far as I can see (at cost of performance of course). Other examples in t

Re: Potential problem in diadic iota (⍳) or in Pick (⊃)

2020-08-07 Thread Kacper Gutowski
On Thu, Aug 06, 2020 at 08:50:27PM -0400, Christian Robert wrote: ∇z←(F fasteach) A;shp;vec;nub;res;idx shp←⍴A ⍝ Shape and ... vec←,A ⍝ ... ravel of arg. nub←∪ vec⍝ Vector of unique elements. nub←∪ vec⍝ Vector of unique elements. res←F¨nub

Problems with division et al.

2020-06-23 Thread Kacper Gutowski
When dividing a number relatively close to zero by an integer, the result unexpectedly gets clamped to zero: (2⋆¯34)÷1 0 Using ⌹ or ×÷ gives expected results instead. Looks like it happens at the line IntCell.cc:543 which should be removed. But I don't think there should be a check for

Re: Empty arguments

2020-05-04 Thread Kacper Gutowski
On Mon, May 04, 2020 at 10:43:25AM +0100, Jay Foad wrote: Interesting. Dyalog APL is different: if you apply f¨ to empty argument(s), it applies f once to the prototypical items of the argument(s) to determine the prototypical item of the result. Yes, I liked the idea until I realized this incl

Re: Empty arguments

2020-05-03 Thread Kacper Gutowski
On Sat, May 02, 2020 at 08:13:17PM -0400, Colin Verrilli wrote: This next one I'm not sure about. Theoretically, it should give the same result as above, but maybe the behavior is different for defined functions. ↑ (0↑(1 2)(3 4))f¨(0↑(1 2 3)(4 5 6)) 0 0 0 ⎕cr 'f' z←l f r z←l,r The AP

Re: sparse vector 'without' returns ⍬ with sufficiently large vector

2020-05-01 Thread Kacper Gutowski
On Fri, May 01, 2020 at 03:08:16PM +0200, Dr. Jürgen Sauermann wrote: > Fixed in SVN 1275. With g++ 9.3.0, it fails to build tripping on a warning: g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Werror -rdynamic -g -O2 -MT apl-Bif_F12_FORMAT.o -MD -MP -MF .deps/apl-Bif_F12_FORMAT.Tpo -c -o a

Re: sparse vector 'without' returns ⍬ with sufficiently large vector

2020-04-30 Thread Kacper Gutowski
On Thu, Apr 30, 2020 at 11:17:20PM +0400, Ala'a Mohammad wrote: I suspect It has something to do with Zero value. Kacper example also produce output when Zero is replaced with other values. Zero isn't stricly needed to reproduce: (61⍴10) ~ 60⍴¯10 I didn't try to properly debug it, but the bug

Re: sparse vector 'without' returns ⍬ with sufficiently large vector

2020-04-30 Thread Kacper Gutowski
On Thu, Apr 30, 2020 at 08:14:46PM +0200, Dr. Jürgen Sauermann wrote: Could you please reformulate the problem in a more readable way? I have not idea what the expression is doing and  if the result is correct or not. Or which primitive actually fails. I understand the problem is as described i

Re: I don't understand

2020-04-25 Thread Kacper Gutowski
On Sat, Apr 25, 2020 at 09:23:28AM -0400, Bill Daly wrote: What happended to LINES? It's probably a shell variable that wasn't exported to envionment. See what this shows: $ env | grep LINES You can export it with the export command. $ export LINES -k

Issues with drop of a scalar argument

2020-04-24 Thread Kacper Gutowski
1° With left argument longer than one, the scalar is properly extended to a higher rank one-element array, but then it's not dropped correctly unless all axes are non-zero. ⊢X← 1 0↓2 2 ⍴X 1 1 The X here should be an empty array (0 1⍴0) but is (1 1⍴2). 2° When left argument has

Bugs in extended transfer form

2020-04-21 Thread Kacper Gutowski
Hi. 1° Enclosed value is incorrectly rendered using only parentheses as if it were part of a strand expression even if it's not. The generated representation is wrong, and then parsing it back correctly gives the same value as ⍎ would. XX←X←⊂,1 2⎕TF ⎕← 2⎕TF'X' X←(,1) X XX≡

Re: linear algebra & LAPACK - questions and thoughts

2020-04-19 Thread Kacper Gutowski
On Sun, Apr 19, 2020 at 08:48:27PM +0200, Dr. Jürgen Sauermann wrote: Not sure what;s wrong with your qt (character ?) since I don't have it. This behavior is indicative of a NaN: ⊢NaN←12⎕CR17⎕CR'AAAgICABAgAAAPj/AAA=' 0.0 0×NaN DOMAIN ERROR 0×N

Re: exercise 2019/04

2020-04-19 Thread Kacper Gutowski
On Sat, Apr 18, 2020 at 09:54:13PM +0200, Otto Diesenbacher-Reinmüller wrote: 4: Knight Moves (...) *. Given a 2-element vector representing thecurrent square for a knight, return a vector of 2-element vectors representing (in any order) all the squares that the knight can moveto. Hint: The ou

Re: Parsing entities in HTML input

2020-04-18 Thread Kacper Gutowski
On Sat, Apr 18, 2020 at 12:36:19PM +0200, Dr. Jürgen Sauermann wrote: Fixed in SVN 1264. On Sat, Apr 18, 2020 at 03:47:31PM +0200, Dr. Jürgen Sauermann wrote: the ]DOXY problem should be fixed in *SVN **1265*. Tanks and thanks! Both look good now. -k

Re: Division by 0

2020-04-17 Thread Kacper Gutowski
This is actually correct. It's what APL is supposed to do. Domain of division is extended to include 0÷0, but not any other numbers divided by zero. -k On Fri, Apr 17, 2020 at 10:26:09PM +0200, Hans-Peter Sorge wrote: > Hi, > > I just noted some inconsistencies: > >   0÷0 > 1 > >  

Re: Parsing entities in HTML input

2020-04-17 Thread Kacper Gutowski
On Thu, Apr 16, 2020 at 03:29:08PM +0200, Dr. Jürgen Sauermann wrote: > fixed in SVN 1262. Thanks! Angle brackets are now correctly converted at the end of lines too. But parsing numeric entities decimally was actually correct. Now doing a )DUMP-HTML followed by )COPY or )LOAD changes all amper

Parsing entities in HTML input

2020-04-15 Thread Kacper Gutowski
When loading from HTML file (cool feature, why is it undocumented?), entities that occur at the end of a line are not correctly parsed. Normally it should occur only in comments, but still looks like a bug. )CLEAR CLEAR WS ⎕FX 'a' '⍝<>' a ⎕CR'a' a ⍝<> )DUMP-HTML 9 a DUM

Re: exercise 2019/02

2020-04-14 Thread Kacper Gutowski
On Tue, Apr 14, 2020 at 05:40:26PM +0200, Otto Diesenbacher-Reinmüller wrote: 2 making the grade (...) Any hint? I think all those ranges are mostly a distraction, because it's nowhere said you need to handle out-of-range arguments in any graceful way. I would start with ⍵>table[;2] which is

Re: exercise 2019/01

2020-04-11 Thread Kacper Gutowski
On Sat, Apr 11, 2020 at 11:02:39PM +0200, Otto Diesenbacher-Reinmüller wrote: 1 chunk monkey I would write it as {(+\(⍴,⍵)⍴⍺↑1)⊂,⍵}. (In low-⎕ML Dyalog it would be {((≢⍵)⍴⍺↑1)⊂,⍵} without needing that +\ on left argument.) You can write ≢⍵ or ⍴,⍵ here, using ≢ is probably more idiomatic in Dy

Re: Five-dimensional transpose results in incorrect shape

2020-03-10 Thread Kacper Gutowski
On Wed, Mar 11, 2020 at 12:57:09AM +0800, Elias Mårtenson wrote: Now, for the problematic version: * ⍴ 2 4 1 0 3 ⍉ 3 4 5 6 7 ⍴ ⍳100* ┏→┓ ┃6 5 3 7 4┃ ┗━┛ As you can see, the numbers are all over the place. For some reason, it seems to have interpreted the left arguments to

Re: Corrupted Workspace

2020-03-01 Thread Kacper Gutowski
SVN 1237 fails to build with g++ 9.2.1. It gives the following: In file included from Common.hh:65, from Bif_F12_TAKE_DROP.hh:24, from StateIndicator.cc:23: StateIndicator.cc: In member function ‘bool StateIndicator::uses_function(const UserFunction*) const’: Ass

Re: Incorrect results with unique of 20 or more elements

2020-01-29 Thread Kacper Gutowski
On Wed, Jan 29, 2020 at 07:55:50PM +0100, Dr. Jürgen Sauermann wrote: SVN 1231. Looks good, thanks. -k

Re: Incorrect results with unique of 20 or more elements

2020-01-28 Thread Kacper Gutowski
Actually, while the algorithm used for 20≥⍴ works well with characters or integers (once you fix the direction of inequality), I don't think it's actually correct at all for non-zero ⎕CT because tolerant equality is not transitive. Consider this: X←1+0 1 2 5 4 3×(⎕CT←1E¯9)÷2 ∪19

Incorrect results with unique of 20 or more elements

2020-01-28 Thread Kacper Gutowski
Hello, Unique with argument of 20 or more items gives results in an incorrect order: ∪'abbbaaa' ab ∪'abbb' ba Or even with wrong set of distinct elements: (A B C)←1+¯1 0 1×(⎕CT←1E¯9)÷2 ∪19↑B A B C 1 0 ∪20↑B A B C 0.95 1.000

Re: Comments on GNU APL

2020-01-09 Thread Kacper Gutowski
On Thu, Jan 09, 2020 at 07:53:17PM +, Mr. Brian B. McGuinness wrote: >For example, if I do > > )wsid test >WAS CLEAR WS > sec2rad ← 4.8481368110953599359e¯6 > )dump > >and then I look at the test.apl file, I see > >sec2rad←0.0484813681109536 >

[Bug-apl] Segfault in CDR parser

2019-08-10 Thread Kacper Gutowski
Hi, Giving empty vector to 12⎕CR causes segmentation fault: 12 ⎕CR '' SEGMENTATION FAULT -- Stack trace at main.cc:88 0x7FE24301409B __libc_start_main 0x5

Re: [Bug-apl] An inventory of entropy

2019-06-22 Thread Kacper Gutowski
On Sat, Jun 22, 2019 at 01:59:18PM +0200, Dr. Jürgen Sauermann wrote: > Looking at getrandom() and friends it seems like they have considerable > portability problems (e.g. the header files are missing on Mint-17 but > available on Mint-19). From that perspective using /dev/urandom seems > to be a

Re: [Bug-apl] An inventory of entropy

2019-06-21 Thread Kacper Gutowski
I used something similar installed as an user command, but it's a trivial one-liner and only good reason to include it in distribution would be to do it right while avoiding possible mistakes and pitfalls—which the proposed code doesn't do. (Where does 4294967294 come from? Twice the MINSTD modulu

Re: [Bug-apl] Toronto Toolkit documentation wanted - how to load in running GNU-APL

2019-04-13 Thread Kacper Gutowski
On Sat, Apr 13, 2019 at 09:18:51PM -0400, Patrick Giagnocavo wrote: > If I use apl -f toronto-toolkit.apl (saved from the text version of the > toronto-toolkit.html file) it somewhat works. However whatever attempt to > load from within a running GNU-APL (under Emacs) fails. It might be a bit we

[Bug-apl] Assertion failure in setup_one_lambda

2018-09-30 Thread Kacper Gutowski
Hi, Tokenizer fails to catch unbalanced brackets when input is just "{⋄}" which triggers assertion in setup_one_lambda: {⋄} == Assertion failed: bend < body.size() in Function: setup_one_lambda in file:

Re: [Bug-apl] bad character in execute+

2018-09-30 Thread Kacper Gutowski
On Sun, Sep 30, 2018 at 03:42:53PM -0600, Nathan Rogers wrote: > When using the diamond operator, the repl returns "bad character in > execute+" > > simple example: \ > {1:2◊3} > Bad char in execute+ Lambda syntax in GNU APL isn't compatible with Dyalog's, and you can't use diamond within it. B

Re: [Bug-apl] #!apl

2018-08-21 Thread Kacper Gutowski
On Tue, Aug 21, 2018 at 04:54:52PM -0300, Hudson Flavio Meneses Lacerda wrote: > I presume it works because apl binary is generated inside that directory > (apl-1.7/src/), and "." is in your $PATH. So, "#!apl" calls > "./apl" inside apl-1.7/src/. That is the case, #!apl will work only when called

Re: [Bug-apl] async syscall

2018-08-18 Thread Kacper Gutowski
On Sat, Aug 18, 2018 at 02:14:35PM -0300, Hudson Flavio Meneses Lacerda wrote: > How to run a subprocess in background (like system("foo &") in GNU > Octave)? > > I have tried: > > )HOST gv file.ps & With )HOST you can do it like that: )HOST gv file.ps >&- & )HOST uses popen(3) to captur

Re: [Bug-apl] FIO[57]

2018-07-25 Thread Kacper Gutowski
On Wed, Jul 25, 2018 at 08:03:23PM +0200, Juergen Sauermann wrote: > The Time below (Wed, Jul 25, 2018 at 11:55 AM) does not match any email that I > have sent > (the only outgoing email today was at 6:55 to enztec, responding to his email. That's the mail. 6:55 PM CEST (+0200) in Europe is 11:55

[Bug-apl] Disclose and enlist of empty arrays

2018-05-26 Thread Kacper Gutowski
Hi, Thanks for the division fixes. I'm not sure if the below are outright bugs, but I find these rather unexpected: A←'abc' 'def' ≡A[⍳1] 2 ≡⊃A[⍳1] 1 ≡⊃A[⍳0] ⍝ I think it should be 1 too 2 ≡∊A[⍳1] 1 ≡∊A[⍳0] ⍝ result of ∊ should always be simple 2

[Bug-apl] Division by zero in floats and complex

2018-05-22 Thread Kacper Gutowski
Hi, I'm pretty sure it worked at some point before, but now (r1049) I encountered the following: 1.1÷0 ⍝ should signal DOMAIN ERROR like 1÷0 does 0 1J1÷0 ⍝ ditto 0 And when I tried to ensure division by zero doesn't happen in the first place, I ran into this: a←1.1× b←1 0

[Bug-apl] Enclosed scalars in execute-each

2017-11-05 Thread Kacper Gutowski
It was troublesome in the past and it's still not bug free. Consider this: 0 0≡ ⍎¨'00' 0 It should be 1, but the value returned by ⍎¨'00' is a vector of enclosed scalars, i.e. something that's impossible in APL type system. -k

[Bug-apl] Promotion of float to complex

2017-11-05 Thread Kacper Gutowski
Multiplication or division of complex number by non-integer real number gives incorrect result: 0J1 × 3.1 0J1 0J1 × 3.1J0 0J3.1 -k

Re: [Bug-apl] Why /* #undef ....*/ in config.h?

2017-08-18 Thread Kacper Gutowski
On Fri, Aug 18, 2017 at 04:18:16PM -0400, Peter Teeson wrote: > I have been wandering in the GNU APL autotools byzantine(1) labyrinth(2) > and am wondering why the #undefs in config.h are commented out? > See for example lines 244, 247, 250 for WANT_ANDROID, WANT_ERLANG, > WANT_LIBAPL. >

[Bug-apl] Execute each changes shape

2017-08-15 Thread Kacper Gutowski
I'm not sure when it started happening, but it seems that ⍎¨ always returns a vector regardless of the shape of its argument: ⍴ ⍎¨ '1' 1 ⍴ {⍎⍵}¨ '1' ⍴ ⍎¨ 2 2⍴,¨'1234' 4 ⍴ {⍎⍵}¨ 2 2⍴,¨'1234' 2 2 -k

Re: [Bug-apl] Right-arrow, correct behaviour?

2017-06-28 Thread Kacper Gutowski
On Wed, Jun 28, 2017 at 06:02:03PM +0800, Elias Mårtenson wrote: > I have defined a function as such: > > ∇ Z ← foo X > →(X=0)/zero > Z ← 'not zero' > → > zero: > Z ← 'zero' > ∇ > > When calling this function with a non-zero argument, I expect the return > value to be 'not zero'. Instead

Re: [Bug-apl] Grouping function

2017-06-17 Thread Kacper Gutowski
On Sat, Jun 17, 2017 at 06:17:24PM +0800, Elias Mårtenson wrote: > I'm sure there was a function that could do this, but for the life of me > can't figure out which one it was. It was dyadic reduce operator: 3,/⍳6 1 2 3 2 3 4 3 4 5 4 5 6 -k

Re: [Bug-apl] Crash on )copy

2017-05-07 Thread Kacper Gutowski
On Sun, May 07, 2017 at 01:33:46PM +0200, Juergen Sauermann wrote: > thanks, the backtrace below was very important. I believe that > I have found the reason now. SVN 945. Thank you! It no longer happens in 945. In the meantime I could reconfirm the problem with g++ 5.2, 6.2, 6.3, but it didn't a

Re: [Bug-apl] Crash on )copy

2017-05-06 Thread Kacper Gutowski
On Sat, May 06, 2017 at 05:18:42PM +0200, Juergen Sauermann wrote: > thanks. Unfortunately I cannot reproduce this problem on my box: [...] > However, I may have located and fixed it in SVN 942. I'm still seeing it in 944. I'll try to find the cause myself, then. The backtrace from gdb looks like

Re: [Bug-apl] Misleading indentation

2017-05-06 Thread Kacper Gutowski
On Sat, May 06, 2017 at 05:12:10PM +0200, Juergen Sauermann wrote: > thanks, maybe fixed in SVN 942. No idea what the compiler means, though. > > Maybe I should respond with -Werror=misleading-warning-since-g++6.x Yes, that fixed it. That's what you get when compiler tries to be a linter at the s

[Bug-apl] Crash on )copy

2017-05-06 Thread Kacper Gutowski
Having two )copy commands in loaded or copied APL script aborts the interpreter in r940. Consider trivial files a.apl and b.apl consisting respectively of a.apl: ⍝! )copy b )copy b b.apl: ⍝! Then trying to load a.apl yields the following: )copy a DUMPED 2017-05-06 12:05:19 (GMT+2) DUMPED

[Bug-apl] Misleading indentation

2017-05-06 Thread Kacper Gutowski
Attempting to compile r941 with g++ 6.3.0 fails due to it not liking your coding style and -Werror: Command.cc: In static member function ‘static bool Command::check_params(std::ostream&, const char*, int, const char*)’: Command.cc:163:20: error: this ‘if’ clause does not guard... [-Werror=misle

Re: [Bug-apl] update for the help.def

2017-04-26 Thread Kacper Gutowski
> > On 04/22/2017 12:28 AM, enz...@gmx.com wrote: > > line 13but WITHOUT ANY WARRANTY; without even the implied warranty > > of ; -> , for oxford comma? FWIW, it wouldn't be an Oxford comma because there isn't any kind of enumeration here. The clause starting with "without

Re: [Bug-apl] Problem with modulo arithmetic on Gaussian integers

2017-04-26 Thread Kacper Gutowski
On Wed, Apr 26, 2017 at 06:30:34PM +0200, Juergen Sauermann wrote: > For those of you that can reproduce the problem on their machine, please let > me > know if the problem has not disappeared. I just compiled 934 and 3J1|23J1 gives 3J1 for me too. My g++ version is 6.3.0 20170415 on debian sid.

Re: [Bug-apl] Overflow in LCM

2017-04-20 Thread Kacper Gutowski
On Thu, Apr 20, 2017 at 05:42:25PM +0200, Juergen Sauermann wrote: > thanks, fixed in SVN 926. > > I believe that the last example is not an overflow but the proper result. > At least tryapl.org says so. Thanks. I think the last one also should be positive. Tryapl says so too. -k

[Bug-apl] Overflow in LCM

2017-04-19 Thread Kacper Gutowski
Hi, There are overflows in least common multiple function: 2028259601 ∧ 9094863431 ¯585 2028259601 ∧ 9094863431.0 ¯585 2028259601 ∧ 9094863431J0 ¯1.844674407E19 -k

Re: [Bug-apl] Safe mode is not so safe

2017-03-29 Thread Kacper Gutowski
On 29 March 2017 at 06:39, Christian Robert wrote: > what is the meaning of "no native functions" ? See info apl -n 'Section 3.9': > A Native Function is a function that can be called in APL like a normal > user defined APL function, but is implemented in C++. >A native function is created wit

Re: [Bug-apl] scalar/array

2017-03-04 Thread Kacper Gutowski
On Fri, Mar 03, 2017 at 02:57:00PM -0700, enz...@gmx.com wrote: > cause 1 is 1 element and 1 2 3 is 3 elements so ⍴ 1 2 3 is 3 > and ⍴ 1 should have been 1 But 1-element arrays come in many different shapes and ⍴ returns the shape rather than number of elements. To get the later

Re: [Bug-apl] AP100 problem

2017-02-15 Thread Kacper Gutowski
On 15 February 2017 at 03:59, Frederick Pitts wrote: > But the problem does seem specific to my platform. I can reproduce it under debian testing. It appears that strings longer than 12 are somehow misinterpreted by AP100 and garbage is sent to popen. It doesn't seem to have anything to do with

Re: [Bug-apl] Sqlite provider truncates integers in results

2017-02-14 Thread Kacper Gutowski
On 14 February 2017 at 14:31, Elias Mårtenson wrote: > I've taken a look at this now, and I believe this patch should fix your > problem. Please try it, and I'd like to ask Jürgen to merge it. Yes, this fixes it. Thanks. -k

[Bug-apl] Sqlite provider truncates integers in results

2017-02-12 Thread Kacper Gutowski
The sqlite provider seems to silently truncate integer values in results: )COPY 5 SQL DUMPED 2017-02-12 10:13:53 (GMT+1) db←'sqlite' SQL∆Connect ':memory:' 'create table a(b)' SQL∆Exec[db] ⍬ 'insert into a values(?),(?)' SQL∆Exec[db] 2⋆31 32 'select b from a' SQL∆Se

Re: [Bug-apl] Silence the )copy command

2017-02-03 Thread Kacper Gutowski
On 3 February 2017 at 20:31, Alexey Veretennikov wrote: > How can I silence this output when I execute the )copy command from the > script? You can do ⊣⍎')COPY 5 FILE_IO FIO∆errno' -k

Re: [Bug-apl] ⎕FIO[49]

2017-01-24 Thread Kacper Gutowski
On 25 January 2017 at 05:54, Elias Mårtenson wrote: > Is there anything inherently wrong with having more quad-commands? What is > the reason we have to do ⎕FIO[49] instead of simply ⎕ReadLines or something > like that? > > It's like we're going out of way to make code unreadable. I know APL is all

Re: [Bug-apl] Exercise on ⎕ts.

2017-01-12 Thread Kacper Gutowski
Actually, disregard that. It's just: '0006-06-06@06:06:06.000'⍕⎕TS 2017-01-12@10:42:39.088 Formatting dates is literally what was used as an example of using formatting code 6 in apl2lrm. -k

Re: [Bug-apl] SVN 839 doesn't compile

2017-01-11 Thread Kacper Gutowski
Actually, I have observed the same thing on a clean checkout. The -I sql part ends up being commented out in generated Makefile if configure fails to detect sqlite3 but these includes aren't guarded with appropriate ifdef. As a side note, libsqlite3-dev isn't mentioned in debian/control. -k

Re: [Bug-apl] ⎕PW handling

2016-12-26 Thread Kacper Gutowski
On 26 December 2016 at 20:09, Juergen Sauermann wrote: > Kacper: you can now enable change of ⎕PW via the WINCH signal. This may not > work on all platforms, therefore is has to be enabled in one of your > preferences files. Works great, thanks. It's okay that it requires enabling, it's not someth

Re: [Bug-apl] How to set the screen width in APL interpreter

2016-12-23 Thread Kacper Gutowski
On Sat, Dec 24, 2016 at 12:14:41AM +0100, Alexey Veretennikov wrote: > I'm running GNU APL in the X terminal with geometry 48x15 (it is a small > screen). How could I set this width(48) to the GNU APL interpreter so it > will behave correctly on deletion of characters in long lines etc? Setting pr

Re: [Bug-apl] Calling external editor from APL session

2016-12-20 Thread Kacper Gutowski
On Tue, Dec 20, 2016 at 10:30:14AM +0100, Alexey Veretennikov wrote: > Using )HOST Vim complains "Vim: Warning: Output is not to a terminal" > and not really useful (can't see what I type for instance). > Same if I use popen() via ⎕FIO. )HOST and popen are essentially the same thing and they both

Re: [Bug-apl] Invalid value in binomial

2016-12-16 Thread Kacper Gutowski
Thanks. I noticed one more thing, with numbers of huge magnitude of either sign or with infinities, it fails an assertion rather than reporting domain error. 1!⋆99 == Assertion failed: N >= K in Function: do_

Re: [Bug-apl] Invalid value in binomial

2016-12-16 Thread Kacper Gutowski
On Fri, Dec 16, 2016 at 11:43:19AM +0100, Nick Lobachevsky wrote: > Wouldn't this really be a domain error, the maximum argument value for > ! being around 170? > > !170 > 7.257415615307994E306 > !171 > DOMAIN ERROR I'm using dyadic ! here so it should return 1 nevertheless; it does s

[Bug-apl] Invalid value in binomial

2016-12-16 Thread Kacper Gutowski
Hello, Binomial returns malformed result when called with some non-integer arguments: 0!200.1 0.0 -k

[Bug-apl] Domain error in grade up/down with near-reals

2016-12-16 Thread Kacper Gutowski
Hello, There is another case of not handling near-real numbers properly: ⍋,1J0 DOMAIN ERROR ⍋,1 ^^ It should of course return ,1. -k

Re: [Bug-apl] Spell corrector - APL

2016-09-09 Thread Kacper Gutowski
On 9 September 2016 at 23:39, Ala'a Mohammad wrote: > the errors happened inside 'hist' function, and I presume mostly due > to the jot dot find (if understand correctly, operating on a matrix of > length equal to : unique-length * words-length) Try (∪⍵)∘.≡⍵ instead of ∨/¨(∪⍵)∘.⍷⍵. -k

Re: [Bug-apl] Nil result from ⌹

2016-08-28 Thread Kacper Gutowski
On 28 August 2016 at 14:02, Juergen Sauermann wrote: > I believe I managed to reduce the amount of memory needed for A⌹B > considerably. SVN 791. Great! Thanks. -k

Re: [Bug-apl] Nil result from ⌹

2016-08-28 Thread Kacper Gutowski
On 28 August 2016 at 04:12, enztec wrote: > works here Perhaps it would fail if you tried bigger array? 9 seemed enough to reproduce it reliably in my environment. And no, this is a complete transcript, nothing else was defined. -k

[Bug-apl] Nil result from ⌹

2016-08-27 Thread Kacper Gutowski
Hi, Matrix division returns no value for large-shaped arguments. There doesn't seem to be any fixed threshold above which it fails, it differs from case to case. A←?9 3⍴256 X←A⌹A X VALUE ERROR X ^ -k

Re: [Bug-apl] A couple of bugs, and a question on the power operator

2016-08-13 Thread Kacper Gutowski
On 13 August 2016 at 19:28, Juergen Sauermann wrote: > It would also prevent the monadic use of the power operator with lambdas > completely > (which is not as bad as it sounds, though) because the lambdas are always > ambivalent then. I think treating all lambda functions as ambivalent is actuall

Re: [Bug-apl] A couple of bugs, and a question on the power operator

2016-08-13 Thread Kacper Gutowski
I like the second of the proposed solutions. Since ambivalent function can always be called monadically, I think that making the header of d-fns always λ←⍺ λ1 ⍵ regardless of whether ⍺ occurs in the body or not, shouldn't break anything and would only make a language a bit simpler. Although maybe

Re: [Bug-apl] APL & AKT in xterm

2016-08-03 Thread Kacper Gutowski
On Wed, Aug 03, 2016 at 07:09:38PM -0500, Blake McBride wrote: > APL with AKT works great. But now I need to use it in an xterm. Doesn't > seem to work there. Any suggestions would be greatly appreciated. You need to set metaSendsEscape. It can be configured in X resource or switched in run ti

Re: [Bug-apl] AM_MAKEFLAGS = -j 4

2016-07-30 Thread Kacper Gutowski
On 29 July 2016 at 19:54, Juergen Sauermann wrote: > After removing the AM_MAKEFLAGS = -j 4, I never saw more than one cc1plus > process, even though > I did make -j 4 clean all at the top level. This might as well be caused by > the way how automake > constructs the makefiles rather than by make i

Re: [Bug-apl] AM_MAKEFLAGS = -j 4

2016-07-29 Thread Kacper Gutowski
On 29 July 2016 at 16:08, Juergen Sauermann wrote: > unfortunately it is not that easy. make does not pass its -j option to > sub-makes. I don't know if it works as documented, I never checked it, but according to GNU make manual, it should coordinate between sub-makes to run the number of tasks i

Re: [Bug-apl] 0⍟0

2016-07-13 Thread Kacper Gutowski
On 13 July 2016 at 13:21, Juergen Sauermann wrote: > I see. Which leaves the question if "equal" shall be strict or within ⎕IO. > > Since we are dealing with real numbers (and therefore often rounding errors) > within ⎕IO > makes more sense to me but the standard does not mention ⎕IO for ⍟. I thin

Re: [Bug-apl] 0⍟0

2016-07-13 Thread Kacper Gutowski
On 13 July 2016 at 12:04, Juergen Sauermann wrote: > my ISO (June 9, 2000) says DOMAIN ERROR. I'm using the PDF that was linked from GNU APL documentation, that is, exactly the same Jun 2000 version. > If A and B are equal, return one. As Jay just have written, the evaluation sequence in section

[Bug-apl] 0⍟0

2016-07-12 Thread Kacper Gutowski
According to ISO, 0⍟0 should be one. GNU APL gives: 0⍟0 DOMAIN ERROR 0⍟0 ^^ -k

[Bug-apl] Error in rank with each

2016-07-12 Thread Kacper Gutowski
⊂⍤¯1¨0 result: 'SI_PUSHED' at Bif_OPER1_EACH.cc:257 -- Stack trace at Bif_OPER1_EACH.cc:257 0x7fa8af92d5f0 __libc_start_main 0x444ae5 main 0x58069d Workspace::immediate_execution(bool) 0x48a852

Re: [Bug-apl] Error parsing lambdas in FX

2016-07-12 Thread Kacper Gutowski
I just got this at r775: {'⍝'} copying: '1' at Executable.cc:655 tidx:'1' at Executable.cc:655 -- Stack trace at Executable.cc:655 0x7f055ac095f0 __libc_start_main 0x444ae5 main 0x

[Bug-apl] Segfault with 8⎕CR

2016-07-09 Thread Kacper Gutowski
I think this was working before. X←0⍴⊂'' 8⎕CR X SEGMENTATION FAULT -- Stack trace at main.cc:85 0x7f5bfa2f25f0 __libc_start_main 0x444ae5 main 0x58

[Bug-apl] Error parsing lambdas in FX

2016-07-09 Thread Kacper Gutowski
I commented out a line of code and suddenly GNU APL exited when FX-ing it. Looks like it hit some not-implemented-yet part, but could you please make FIXME exit with non-zero exit code? ⎕FX 'F' '⍝}' '{{}}' copying: '0' at Executable.cc:655 tidx:'2' at Executable.c

Re: [Bug-apl] multiple inner product

2016-07-08 Thread Kacper Gutowski
On 8 July 2016 at 09:24, Jay Foad wrote: > So if A and B are vectors, Z is a scalar whose single item is f/AgB. Hence Z > itself is ⊂f/AgB. I think you are right that it should be ⊂f/AgB. I stand corrected. But I was looking at the evaluation sequence just below the informal description you quo

  1   2   3   >