Importing an ASCII workspace with APLASCII

2020-09-14 Thread Rowan Cannaday
t;-- MAY_USE(0x03e90001, 0) <-- MAY_USE(0x03e90001, 1) <-- MAY_USE(0x03e90001, 2) <-- MAY_USE(0x03e90001, 3) ``` I have removed the rest of the output, it repeats "MAY_USE(0x03e90001, N)" where N is an incrementing integer in what seems like an endless loop. I was wondering if somebody had familiarity with this workspace, or what might be causing this issue. Thanks, - Rowan Cannaday

Re: Error building APL

2020-05-01 Thread Rowan Cannaday
What about excluding certain "error on warning" flags, except when compiling in developer mode? For example, make `CXXFLAGS=-Werror=maybe-uninitialized ./configure` the default and force an error when configuring with `DEVELOP_WANTED=yes`. - Rowan On Fri, May 1, 2020 at 6:41 PM Dr. Jürgen Sauerm

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

2020-04-30 Thread Rowan Cannaday
Sorry for the late reply. I was out venturing for groceries, which has turned into a significantly more stressful task than anticipated it would. Thanks to responders who have provided simpler demonstrations of the effect. - Rowan On Thu, Apr 30, 2020, 3:30 PM Kacper Gutowski wrote: > On Thu,

sparse vector 'without' returns ⍬ with sufficiently large vector

2020-04-30 Thread Rowan Cannaday
{{0~⍨⍵×⍳≢⍵} 0=47|⍵ ⍴ ⍵?⍵} 3600 10 45 179 183 185 203 234 299 326 353 516 609 764 766 807 916 946 976 1069 1135 1199 1217 1239 1249 1284 1443 1466 1532 1585 1605 1747 1841 1857 1926 1932 1957 2027 2048 2145 2147 2178 2179 2242 2372 2402 2474 2513 2563 2601 2644 2658 2698 2777 2807 2869 3000 30

Re: Linear Algebra assistance

2020-04-28 Thread Rowan Cannaday
It looks like the Cholesky decomposition article uses block matrix notation, so it looks like it will be useful, just not for the reason I was expecting. Thank you Ala'a. - Rowan On Wed, Apr 29, 2020 at 2:24 AM Rowan Cannaday wrote: > I believe I've figured out what was conf

Re: Linear Algebra assistance

2020-04-28 Thread Rowan Cannaday
28, 2020 at 9:04 PM Ala'a Mohammad wrote: > Hi, > > I assumed that same technique can be used for QR algorithm. check the > algorithm section. > > Regards, > > Ala'a > > On Wed, Apr 29, 2020 at 12:54 AM Rowan Cannaday > wrote: > >> Thank you. The C

Re: Linear Algebra assistance

2020-04-28 Thread Rowan Cannaday
ikipedia.org/wiki/QR_algorithm <https://en.wikipedia.org/wiki/QR_algorithm>* - Rowan On Tue, Apr 28, 2020, 4:37 PM Ala'a Mohammad wrote: > Hi, > > This may be related: > https://www.dyalog.com/blog/2015/01/cholesky-decomposition/ > > HiH. > > Regards, > > Ala&#

Linear Algebra assistance

2020-04-28 Thread Rowan Cannaday
Is anybody familiar with the QR algorithm, or the notation used in Golub & Van Loan's book "Matrix Computations"? I am working my way towards building an APL linear algebra toolkit, and am having trouble deciphering what some of the steps signify. Any other communities that might be able to assis

Re: linear algebra & LAPACK - questions and thoughts

2020-04-19 Thread Rowan Cannaday
nstrate what is happening, but I thought I'd reach out in meantime to see if there is a workaround. Thank you, - Rowan On Mon, Apr 13, 2020 at 6:32 PM Rowan Cannaday wrote: > Another deficiency I've noticed in my above solution is that it does not > converge for complex eigenval

Re: linear algebra & LAPACK - questions and thoughts

2020-04-13 Thread Rowan Cannaday
Another deficiency I've noticed in my above solution is that it does not converge for complex eigenvalues. - Rowan On Mon, Apr 13, 2020 at 6:07 PM Rowan Cannaday wrote: > Here is a quick solution to the eigenvalue problem. Should be refined and > extended to calculate eigenvect

Re: linear algebra & LAPACK - questions and thoughts

2020-04-13 Thread Rowan Cannaday
Here is a quick solution to the eigenvalue problem. Should be refined and extended to calculate eigenvectors. {0~⍨∈⍵×∘.=⍨⍳≢⍵}({r+.×⍉qt⊣(qt r)←⌹[⎕CT]⍵ ;qt;r}⍣{(|⍺)≡|⍵}) 3 3 ⍴ ⍳9 16.11684397 ¯1.11684397 ¯3.625973215E¯16 As a quick note, my ⎕CT was 1E¯13, however it doesn't seem to zero out the

Re: linear algebra & LAPACK - questions and thoughts

2020-04-13 Thread Rowan Cannaday
> > On 4/13/20 4:57 PM, Rowan Cannaday wrote: > > "I added a > new primitive in GNU APL which computes the QR factorization of a real > or complex matrix" > > Looking through the source code I see the following in `src/LApack.hh`: > ``` >// Compute QR

Re: linear algebra & LAPACK - questions and thoughts

2020-04-13 Thread Rowan Cannaday
than > a direct implementation in, say, C/C++. But that is the only drawback that > I can currently see. Given the many advantages that a translation of LApack > to APL could have, that would be my preferred option (= the last option in > your "way forward" list below). >

Re: exercise 2019/01

2020-04-12 Thread Rowan Cannaday
t; > ⍨ operator: you are using it to avoid parentheses? > > Beside of restructuring code, avoiding duplicate code-fragment and > parentheses, ⍨ has no "functional" impact? > > br & many thanks - Otto > > Rowan Cannaday writes: > > > addendum, f

linear algebra & LAPACK - questions and thoughts

2020-04-12 Thread Rowan Cannaday
I've been mulling over methods of bringing linear algebra methods into gnu-apl, specifically eigenvalues & eigenvectors (leaving open the possibility for more). The canonical methods for this are from LAPACK (which was formerly a compilation dependency). Specifically: dgeev dsyev zheev

Re: exercise 2019/01

2020-04-11 Thread Rowan Cannaday
addendum, forget an extra ⍳≢ {(⍵⍴⍨≢⍵)⊂⍨(≢⍵)↑⍺/⍳≢⍵} Cheers. On Sat, Apr 11, 2020 at 9:19 PM Rowan Cannaday wrote: > quick attempt: > > 3 {(⍵⍴⍨≢⍵)⊂⍨(≢⍵)↑⍺/⍵} 1 2 3 4 5 6 7 > ┏→━━┓ > ┃┏→┓ ┏→┓ ┏→┓┃ > ┃

Re: exercise 2019/01

2020-04-11 Thread Rowan Cannaday
quick attempt: 3 {(⍵⍴⍨≢⍵)⊂⍨(≢⍵)↑⍺/⍵} 1 2 3 4 5 6 7 ┏→━━┓ ┃┏→┓ ┏→┓ ┏→┓┃ ┃┃1 2 3┃ ┃4 5 6┃ ┃7┃┃ ┃┗━┛ ┗━┛ ┗━┛┃ ┗∊━━┛ On Sat, Apr 11, 2020 at 9:02 PM Otto Diesenbacher-Reinmüller < ok...@diesenbacher.net> wrote: > Hi APLers! > > as I had a look i

Re: Building GNU APL (1.8, SVN: 1252) under OpenBSD/amd64 6.6-STABLE

2020-04-08 Thread Rowan Cannaday
Heres the contents of /proc/meminfo on linux 5.4.0-2-amd64: MemTotal:7833580 kB MemFree: 949240 kB MemAvailable: 997536 kB Buffers: 108 kB Cached: 1062792 kB SwapCached: 532548 kB Active: 3367828 kB Inactive:2045752 kB Active(anon):

Re: seg-fault with deeply nested assignment

2020-04-07 Thread Rowan Cannaday
just throw a syntax error as in: >> >> (+/10 10⍴⍳100)[2]←4 >> SYNTAX ERROR >> (+/10 10⍴⍳100)[2]←4 >> ^^ >> >> (Surely a syntax error is more appropriate th

seg-fault with deeply nested assignment

2020-04-04 Thread Rowan Cannaday
hello y'all, hope everyone is staying safe. x ← 1 (2 3 (4 5)) (⊃⊃x)[2;3;] ← 6 7 === SEGMENTATION FAULT -- Stack trace at main.cc:88 0x7F032D7BABBB __libc

bug report

2020-03-12 Thread Rowan Cannaday
Hello, receiving the following segfault when attempting to use dfn's with all possible arguments: ⍵ ⍺ ⍹ ⍶ χ. {⍵+1}{⍹ ⍶ χ+⍵}[1]{⍵+1} 1 === SEGMENTATION FAULT -- Stack trace at main.cc:88 -

alternate fibonacci sequence using recursive list traversal

2019-11-20 Thread Rowan Cannaday
1↑⍺} ltrav) list ⍳10 Cheers, Rowan Cannaday

Re: [Bug-apl] segfault when using 'CORE_COUNT_WANTED' configure flag

2019-10-17 Thread Rowan Cannaday
cally generated hast table that does lookups essentially in time > O(1) per prefix.) > > This lookup table replaces the AST that you would have in a compiled > language, > > Best regards, > Jürgen Sauermann > > > On 10/16/19 6:55 PM, Rowan Cannaday wrote: > > Thanks aga

Re: [Bug-apl] segfault when using 'CORE_COUNT_WANTED' configure flag

2019-10-16 Thread Rowan Cannaday
stem functions and variables > are not in )help, > but I suppose extending file *src/Help.def* could easily add them. > > > Compiling APL is IMHO a wrong path. Too many problems, too little gain. > > Best Regards, > Jürgen Sauermann > > > On 10/16/19 5:01 PM, Rowan Cannada

Re: [Bug-apl] segfault when using 'CORE_COUNT_WANTED' configure flag

2019-10-16 Thread Rowan Cannaday
, >> >> fixed in *SVN 1191*. >> >> You should not be too enthusiastic, though, because the speed-ups that >> can be achieved are somewhat disappointing. And due to that, I >> haven't put too much effort into fixing faults (sometimes apl hangs >> on a semap

[Bug-apl] segfault when using 'CORE_COUNT_WANTED' configure flag

2019-10-15 Thread Rowan Cannaday
Hello, intrigued by the ability to parallelize APL, thought I'd try to test it: `apl --cfg` followed by a line of '=' signs followed by `apl -q`: configurable options: - ASSERT_LEVEL_WANTED=2 SECURITY_LEVEL_WANTED=0 (default) APSERVER_PATH=/tmp/GNU-APL/APserver (

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-10 Thread Rowan Cannaday
Working version! dfs ← {⊃(⍶ {⍺(⍶ dfs ⍹)⍵} ⍹)⍨/⌽(⊂⍺ ⍶ ⍵),⍺ ⍹ ⍵} 0 ({⍺+0=≡⍵} dfs {⍺⊢(0=≡⍵)↓,⍵}) ((1 2)(3 4 (5 6 7))) ⍝ isomorphic to 'enlist' ⍬ {⍺,(0=≡⍵)↑⊂⍵} dfs {⍺⊢(0=≡⍵)↓,⍵} (1 2)(3 4(5 6 7)) On Thu, Oct 10, 2019 at 12:53 PM Rowan Cannaday wrote: > btw not correct, but at least

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-10 Thread Rowan Cannaday
btw not correct, but at least its valid apl, which is a start. On Thu, Oct 10, 2019 at 12:34 PM Rowan Cannaday wrote: > Thank you Jürgen. > > I found translating the late John Scholes APL videos on youtube from > dyalog specific syntax to gnu-apl helpful. > > For example,

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-10 Thread Rowan Cannaday
, you need to properly use parentheses like > this: > > Z←(f⍤1) 2 3 4 5 > > or, as a cleaner though non-standard alternative syntax, make *j* an axis > argument: > > Z←f⍤[1] 2 3 4 5 > > It is very difficult to get all that right, therefore I never use ⍤. > &g

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-09 Thread Rowan Cannaday
somebody pointed out that the previous fn was failing because i wasn't calling 'foo' w/ dyadic arguments in the inner dfn On Wed, Oct 9, 2019 at 2:16 PM Rowan Cannaday wrote: > interestingly enough this is ok: > foo ← {⍬{⍺,(1+1↑⍵),(foo 1↓⍵)}⍣(~0=⍴⍵)⍵} > f

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-09 Thread Rowan Cannaday
this seems to be behaving much better: foo ← {⍺,{((1+1↑⍵) foo 1↓⍵)}⍣(~0=⍴⍵)⊢⍵} ⍬ foo 1 2 3 2 3 4 5 4 3 foo 1 2 3 5 4 3 2 3 4 On Wed, Oct 9, 2019 at 3:40 PM Rowan Cannaday wrote: > somebody pointed out that the previous fn was failing because i wasn't > calling 

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-09 Thread Rowan Cannaday
making progress... foo ← {{(1+1↑⍵),(foo 1↓⍵)}⍣(~0=⍴⍵)⍵} foo 1 2 3 2 3 4 On Wed, Oct 9, 2019 at 12:47 PM Rowan Cannaday wrote: > this is a slightly better way of writing my (still broken) accumulator: > acc←{⍺{⍺ acc 1↑⍵}⍣(0=⍴⍵)⊢⍵} > > On Wed, Oct 9, 2019 at 12:40 PM Ro

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-09 Thread Rowan Cannaday
)⍵ On Wed, Oct 9, 2019 at 1:29 PM Rowan Cannaday wrote: > making progress... > > foo ← {{(1+1↑⍵),(foo 1↓⍵)}⍣(~0=⍴⍵)⍵} > foo 1 2 3 > 2 3 4 > > On Wed, Oct 9, 2019 at 12:47 PM Rowan Cannaday > wrote: > >> this is a slightly better way of writing my (s

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-09 Thread Rowan Cannaday
returns the input vector ⍵. Thoughts? On Fri, Sep 27, 2019 at 3:44 PM Rowan Cannaday wrote: > Hello y'all. > > I have been attempting to learn function composition & higher-order > functions in gnu-apl, and how to use it to perform tree traversal. > > https:

Re: [Bug-apl] Tree Traversal in gnu-apl

2019-10-09 Thread Rowan Cannaday
this is a slightly better way of writing my (still broken) accumulator: acc←{⍺{⍺ acc 1↑⍵}⍣(0=⍴⍵)⊢⍵} On Wed, Oct 9, 2019 at 12:40 PM Rowan Cannaday wrote: > Given a recursive factorial definition: > fact←{{⍵ × fact ⍵-1}⍣(⍵>2)⊢1⌈⍵} > > [written by Kacper Gutowski in the 'Recu

[Bug-apl] Tree Traversal in gnu-apl

2019-09-27 Thread Rowan Cannaday
Hello y'all. I have been attempting to learn function composition & higher-order functions in gnu-apl, and how to use it to perform tree traversal. https://en.wikipedia.org/wiki/Function_composition_(computer_science)#APL https://en.wikipedia.org/wiki/Higher-order_function#APL https://rosettacode

Re: [Bug-apl] 'SYNTAX ERROR+ Tokenizer: No token for Unicode U+00A0 ( )'

2019-09-27 Thread Rowan Cannaday
n, > > my best guess is that your terminal setting is incorrect. > 0xA0 is the unicode for non-braking space which has no APL significance > and might come from a regular space (0x20) with the upper bit set. > > Best Regards, > Jürgen > > > On 9/27/19 9:11 PM, Rowan Can

[Bug-apl] 'SYNTAX ERROR+ Tokenizer: No token for Unicode U+00A0 ( )'

2019-09-27 Thread Rowan Cannaday
Greetings y'all, I wanted to ask a far more interesting question, but unfortunately I'm having APL keyboard issues. I frequently get the following error when using gnu-apl on OSX. I have never had this problem on linux, using the APL x11 kbd. > SYNTAX ERROR+ Tokenizer: No token for Unicode U+00A

Re: [Bug-apl] fpc/freepascal interface

2019-06-27 Thread Rowan Cannaday
(also a shout out to the creator if theyre on here) I think I also saw a wasm target for gnu-apl somewhere (I believe from Dr. Sauermann), but my brain is starting to shut off for the day... On Thu, Jun 27, 2019 at 3:25 PM Rowan Cannaday wrote: > @Alexey > > I actually floated this id

Re: [Bug-apl] fpc/freepascal interface

2019-06-27 Thread Rowan Cannaday
@Alexey I actually floated this idea to the creator of "April" (an APL subset that compiles to common lisp). I'll link the ticket below, but his response was as follows: "JS is not a very good language for implementing APL because it has no true multidimensional arrays; only nested vectors. There

Re: [Bug-apl] APL REPL & pager

2019-06-21 Thread Rowan Cannaday
I think that'll work, thanks. On Fri, Jun 21, 2019 at 11:30 AM Dr. Jürgen Sauermann < mail@jürgen-sauermann.de> wrote: > Hi Rowan, > > ⎕PW ? > > Not exactly sure what you are after. > > Jürgen > > > On 6/21/19 5:27 PM, Rowan Cannaday wrote: > >

[Bug-apl] APL REPL & pager

2019-06-21 Thread Rowan Cannaday
Hello y'all, Is there a simple way to either increase or eliminate the wrap width in the REPL? In vim this would be :set nowrap and using a pager would be `less -S`. I have some nested objects I inspect w/ ` 4 ⎕CR` but the wrap causes the lines to overflow and make it difficult to read. - Rowan

Re: [Bug-apl] segfault

2019-06-20 Thread Rowan Cannaday
due to the ; in the axis specification). > > Best Regards, > Jürgen Sauermann > > > On 6/20/19 2:05 PM, Rowan Cannaday wrote: > > Not a normal use-case but I thought y'all might be interested... > > z ← '' > z ← z,⊂2 2 ⍴ 1 > ⊃,[;2]/z (3 3 ⍴ 2) &g

[Bug-apl] segfault

2019-06-20 Thread Rowan Cannaday
Not a normal use-case but I thought y'all might be interested... z ← '' z ← z,⊂2 2 ⍴ 1 ⊃,[;2]/z (3 3 ⍴ 2) SEGMENTATION FAULT -- Stack trace at main.cc:88 0x7F789

Re: [Bug-apl] erlang APL NIF

2019-06-05 Thread Rowan Cannaday
Works great :) - Rowan On 6/5/19, Rowan Cannaday wrote: > Hah, I hadn't fixed it yet - but I tracked down the same issue in the > last few minutes. There was no init_macros in libapl. I was wondering > why ALL the macros had null pointers, but it would have taken me a bit > lo

Re: [Bug-apl] erlang APL NIF

2019-06-05 Thread Rowan Cannaday
missing initialization of the Macro subsystem in libapl.cc. > > Macros were introduced after libapl, so I forgot to add that initialization. > > Now Erlang works again (of course only on my machine). > > Best Regards, > Jürgen Sauermann > > > On 6/4/19 11:04 PM, Row

Re: [Bug-apl] erlang APL NIF

2019-06-04 Thread Rowan Cannaday
n the near future. - Rowan On Tue, Jun 4, 2019, 4:32 PM Dr. Jürgen Sauermann wrote: > > Hi Rowan, > > see below. > > BR, Jürgen > > > On 6/4/19 5:00 PM, Rowan Cannaday wrote: >> >> Hello again, >> >> Trying out the erlang/APL interface (its building

[Bug-apl] erlang APL NIF

2019-06-04 Thread Rowan Cannaday
Hello again, Trying out the erlang/APL interface (its building now!), running into a few issues. BTW I'm pretty new to FOSS mailing lists so if in the future you'd prefer I'd start these as different threads, or use a different syntax for distinguishing shell output just let me know. First issue

Re: [Bug-apl] Error building libapl

2019-06-03 Thread Rowan Cannaday
d if that works then I am > planning to release GNU APL 1.8. > > Best Rgeards, > Jürgen > > > > On 6/2/19 10:50 PM, Dr. Jürgen Sauermann wrote: > > Hi Rowan, > > thanks for reporting this. Supposedly fixed in *SVN 1162*. > > Best Regards, > /// Jürgen > >

Re: [Bug-apl] Error building libapl

2019-06-02 Thread Rowan Cannaday
est[d] = utf8[d]; ~~^ cc1plus: all warnings being treated as errors make[3]: *** [Makefile:2119: libapl_la-libapl.lo] Error 1 ``` On Sun, Jun 2, 2019 at 8:50 PM Dr. Jürgen Sauermann < mail@jürgen-sauermann.de> wrote: > Hi Rowan, > > than

[Bug-apl] Error building libapl

2019-06-02 Thread Rowan Cannaday
Hello! I am trying to compile libapl, and am running into the following error: ``` libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -Wold-style-cast -Werror -I/usr/include -I/usr/include/postgresql -rdynamic -g -O2 -MT libapl_la-libapl.lo -MD -MP -MF .deps/libapl_la-libapl.Tpo -c liba