Re: Quad-PW on macOS

2024-12-25 Thread Elias Mårtenson
You can actually request the terminal size. Unfortunately, the syntax to do that is not standardised, but on Linux you can use TIOCGWINSZ. See the documentation here: https://man.archlinux.org/man/core/man-pages/TIOCGWINSZ.2const.en Here's what the stty command does to read this infomration: stat

Re: Getting started with APL

2023-12-19 Thread Elias Mårtenson
You can use it, and even use the free version of Dyalog to try things out. Most skills are transferable between all the different array language implementations. Most of which are free and open source by the way. You can also check out aplwiki: https://aplwiki.com/ There's a lot of useful informa

Re: [EXTERNAL]Building GNU APL with clang

2023-10-03 Thread Elias Mårtenson
I'm pretty sure tge use of auto_ptr can be changed to unique_ptr here. I think I used auto_ptr because I wanted it to work on versions of C++ which didn't support unique_ptr. Den tis 3 okt. 2023 20:17Dr. Jürgen Sauermann skrev: > Hi, > > thank you all for discussing this. > > To address at least

Re: Niladic functions vs niladic lambdas

2023-06-08 Thread Elias Mårtenson
You note an inconsistency, but the problem isn't worth the lambda syntax but rather with assignment. In the lambda syntax of Dyalog, the left arrow are used both to assign functions as well as values, which makes the evaluation rules complicated. I came across the same problem when I implemented i

Re: A curious bug...

2023-05-30 Thread Elias Mårtenson
I don't have an answer. I'm going to have to have a look. Hopefully I'll have some time tomorrow. Den tis 30 maj 2023 20:49Emmanuel Charpentier skrev: > Le mardi 30 mai 2023 à 12:26 +0200, Dr. Jürgen Sauermann a écrit : > > Hi Emmanuel, > > I cant quite explain this fully, but if I copy-and-past

Re: Reassignment of a nested array element

2023-03-07 Thread Elias Mårtenson
I think this is because monadic ⊃ is first in Dyalog, as opposed to disclose in GNU, APL2 (and, incidentally, KAP 😀). Use monadic ↑ instead to get the effect you want. Den ons 8 mars 2023 00:34Dr. Jürgen Sauermann skrev: > Hi Hans-Peter, > > I believe that GNU APL, Dyalog, and IBM APL2 only now

Re: libapl stdout

2023-01-14 Thread Elias Mårtenson
Those variables are C++ variables, so the names are probably mangled. You can try to change the GNU APL code to declare them as extern "C". Den sön 15 jan. 2023 07:19 skrev: > Hi > > I'm still trying to resolve the failure of fpc using libapl to get it's > stdout > > trying to get libapl stdout

Re: Epsilon characters

2022-02-06 Thread Elias Mårtenson
I do note that Dyalog (and KAP for that matter) uses U+220A. This symbol matches ⍷ better when used with Iosevka Fixed as well as with the Dyalog font. [image: image.png] Regards, Elias On Mon, 7 Feb 2022 at 00:47, Elias Mårtenson wrote: > I think you're doing the right thing, as the &

Re: Epsilon characters

2022-02-06 Thread Elias Mårtenson
I think you're doing the right thing, as the "official" symbol is ⍷ (U+2377 APL FUNCTIONAL SYMBOL EPSILON UNDERBAR). I do agree that in some fonts, this symbol isn't rendered very well. I recently switched to using "Iosevka Fixed" for APL, and find it looks pretty good: I'm including a screenshot

Re: Unexpected result with inner product

2022-01-25 Thread Elias Mårtenson
0─┐│ > ││ 0││ 0││ > │└~─┘└~─┘│ > ││ > │┌0─┐┌0─┐│ > ││ 0││ 0││ > │└~─┘└~─┘│ > ││ > │┌0─┐┌0─┐│ > ││ 0││ 0││ > │└~─┘└~─┘2 > └∊───┘ > > so, the same thing as gnu-apl > > Xtian. > > On 2022-01-25 23:25, Elias Mårtenson wrote: > > Consider the following c

Unexpected result with inner product

2022-01-25 Thread Elias Mårtenson
Consider the following code: *A←3 4⍴1 3 2 0 2 1 0 1 4 0 0 2B←4 2⍴4 1 0 3 0 2 2 0Q←{⍺/⍵} (A≠0) +.Q B* My reading (and implementation) of the ISO spec suggests the output should be the following: ┏━━━┓ ┃4 6┃ ┃6 4┃ ┃6 1┃ ┗━━━┛ However, in GNU APL I get this: ┏→━━┓ ↓┏⊖┓ ┏⊖┓┃ ┃┃0

Re: A common logo for APL

2022-01-14 Thread Elias Mårtenson
It work for me. What error are you getting? Den fre 14 jan. 2022 20:26Blake McBride skrev: > That link is not up. > > On Fri, Jan 14, 2022 at 4:37 AM Adám Brudzewsky wrote: > >> Hello GNU APL Community, >> >> Voting is now open for the choice of a universal vendor-agnostic APL >> logo. Details,

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

2021-12-28 Thread Elias Mårtenson
Actually, the default memory allocator in glibc uses mmap and not sbrk, if I'm not mistaken. However, they both do the same thing at the end of the day, and it's to request more pages from the kernel. Unfortunately, Linux malloc never returns NULL. Even if you try to allocate a petabyte in one all

Re: Disclose fails with mixed ranks

2021-09-24 Thread Elias Mårtenson
n extension to Mix in Dyalog 14.0 > (http://docs.dyalog.com/14.0/Dyalog%20APL%20Release%20Notes.pdf p22) > inspired by the way the Rank operator assembles results with differing > ranks. I'm not aware of any other APL2-like APLs implementing this > extension. > > Jay. >

Re: Disclose fails with mixed ranks

2021-09-22 Thread Elias Mårtenson
ng a scalar, a vector and a matrix is bound to create > difficulty. > > On Sep 22, 2021, at 09:16, Elias Mårtenson wrote: > > The following expression should work, if I'm reading the ISO spec > correctly: > > ⊃ 3 (1 2) (2 2 ⍴ 0 1 2 3) > > It does work on Dya

Disclose fails with mixed ranks

2021-09-22 Thread Elias Mårtenson
The following expression should work, if I'm reading the ISO spec correctly: ⊃ 3 (1 2) (2 2 ⍴ 0 1 2 3) It does work on Dyalog, and gives the expected result. Regards, Elias

Re: nested array formating is inconsistent

2021-08-27 Thread Elias Mårtenson
On Fri, 27 Aug 2021 at 16:42, Hans-Peter Sorge wrote: > I agree. > I had something like "one depth equals one space" on my mind. > I guess my brain has to get more flexible on those old days. > > What remains is a big THANK YOU for all the good work on GNU APL. > I would suggest using ]BOXING 29

Re: Broken commandline

2021-06-02 Thread Elias Mårtenson
When using Emacs with GNU APL, you should use gnu-apl-mode. You can download it from MELPA and you start it using M-x gnu-apl. https://github.com/lokedhs/gnu-apl-mode This should hopefully fix your problems. Regards, Elias On Wed, 2 Jun 2021 at 17:23, Hans-Peter Sorge wrote: > Hi, > > I am on

Re: New to GNU APL, curiosities or possible bugs?

2021-02-23 Thread Elias Mårtenson
anks. > > The devolution of the Mac is sad, but all is flux. Thanks for your Docker > container; I'll take advantage of that for further use of gnu-apl. > > Indeed, thanks for your great contribution. > > /John > > > -- Original Message -- > *Received: *T

Re: New to GNU APL, curiosities or possible bugs?

2021-02-23 Thread Elias Mårtenson
I'll better happy to take a look at the sqlite problem. However, it's not clear to me what the error is. Could you post the actual error you're seeing, and the code you wrote? Regards, Elias Den tis 23 feb. 2021 20:18Dr. Jürgen Sauermann skrev: > Hi John, > > see below. > > Best Regards, > Jür

Re: Improvements to gnuapl

2021-02-23 Thread Elias Mårtenson
>> > (the main difference being optional end tags in >> > HTML which are mandatory in XML. I would assume that ⎕XML can do >> > the decoding of common web interfaces >> > like the REST API or other XML based queries quite well. Fetching >&

Re: Improvements to gnuapl

2021-02-23 Thread Elias Mårtenson
ean} >do this > :else >do that > :endif > > :repeat >do this > :until {boolean} > > :for {var} :in {list} >do this > :endfor > > :forlcl {var} :in {list} >do this > :endforlcl > > I think there is a :while :endwhile too > &

Re: Improvements to gnuapl

2021-02-23 Thread Elias Mårtenson
If you you want to experiment with this stuff, my project needs help. 😃 Den tis 23 feb. 2021 18:07Christian Robert skrev: > I will ask again in 6 years. > > Xtian. > > On 2021-02-22 14:36, Dr. Jürgen Sauermann wrote: > > Hi Christian, > > > > I can't quite follow the argument that :IF/:ELSE etc.

Re: Improvements to gnuapl

2021-02-22 Thread Elias Mårtenson
This could be quite useful when collecting data from a web site. For example, pull in a table of numbers from a Wikipedia page. Google Docs has this feature already and it can be quite useful. Regards, Elias On Mon, 22 Feb 2021 at 22:26, Chris Moller wrote: > Sounds like another native function

Re: Improvements to gnuapl

2021-02-20 Thread Elias Mårtenson
In principle I agree with you. There are many occasions where an IF statement in particular is useful, or even necessary. However, implementing it in GNU APL would take careful consideration, and I know Jürgen wants to make sure any new extensions doesn't contradict the principles of what APL is.

Re: SVN 1404 warning on Mac OS

2021-01-18 Thread Elias Mårtenson
How about disabling that specific warning? Den tis 19 jan. 2021 01:51Dr. Jürgen Sauermann skrev: > Hi Louis, > > thanks, lookd like the compiler guys were again busy with implementing new > stupid warnings. > > I remember that some time ago *gcc* would complain the other way around > (when > "us

Re: Operator binding

2020-12-02 Thread Elias Mårtenson
On Thu, 3 Dec 2020 at 00:41, Jay Foad wrote: > Great, this sounds like exactly the right thing to do if you're aiming > for APL2 compatibility. > > Dyalog has to jump through some hoops when it parses 2//B, to treat > the first / as a function but the second / as an operator. APL2's > parsing rul

Inconsistent result with user function vs. primitive function

2020-11-08 Thread Elias Mårtenson
Consider the following two commands. I believe they are effectively identical, but they return different results: * 1 2 3 -.×⍨ 10 11 12* 4 * 1 2 3 {⍺-⍵}.×⍨ 10 11 12* 24 I tested on Dyalog, and there both versions return 24. Regards. Elias

Fwd: Unexpected error message when allocating oversized array

2020-11-03 Thread Elias Mårtenson
Instead of the expected WS FULL, I got the following error when trying to sum a large array: * +/ ,9 (⌊n÷9) ⍴ ⍳n←200* Value_P::Value_P(ShapeItem len, const char * loc) failed at Value_P.icc:107 (caller: Bif_F12_INDEX_OF.cc:44) what: std::bad_alloc initial sbrk(): 0xeef000 current s

Standard way to compute a Mandelbrot fractal in APL

2020-09-20 Thread Elias Mårtenson
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 with that works in GNU APL: " #"[⌊0.5+50÷⍨ { (n ⊣ {(x+⍵×⍵) ⊣ n←n+1

Re: Keyboard layout and fonts for NetBSD-9/X11R7

2020-04-28 Thread Elias Mårtenson
I'd suggest taking look at the Emacs mode. It will only provide the ability to enter APL symbols in Emacs but that's usually acceptable. It does allow you to avoid messing with X keymaps. Regards, Elias On Tue, 28 Apr 2020, 07:00 Alexander Shendi (Web.DE), < alexander.she...@web.de> wrote: > De

Re: Inner join vs. outer join

2020-04-14 Thread Elias Mårtenson
the Rank > operator. For example: > X (b⍤99⍤0 99) Y ⍝ implements X ∘.b Y (where 99 is an approximation to > infinity) > X({+⌿⍺(×⍤¯1)⍵}⍤1 99)Y ⍝ implements X +.× Y > > Jay. > > On Tue, 14 Apr 2020 at 05:07, Elias Mårtenson wrote: > >> I was reading the spec on outer

Index-of function with structured left-argument

2020-04-14 Thread Elias Mårtenson
The ISO spec doesn't address what the index-of function should do when the left argument is not a scalar or a one-dimensional array. GNU APL extends this, but I don't really understand in what way. How am I to interpret the output from this? * (2 2 ⍴ 104 105 106 107) ⍳ (3 4 ⍴ 100+⍳100)* ┏→━━

Inner join vs. outer join

2020-04-13 Thread Elias Mårtenson
I was reading the spec on outer join to see if I could finally fully understand how it works. For reference, the spec refers to the syntax as follows: X a.b Y The function a is referenced twice in the description for this function, both times in the form a/ (i.e. with the reduce operator app

Re: Loading .apl files differes from .xml workspaces

2020-04-10 Thread Elias Mårtenson
Wrong may be an inappropriate word, but I agree that it's a pretty stupid thing to do. If a user formats the code in a certain way, I'd assume he does it because he wants it that way. It's one of the reasons I dislike Go. It automatically reformats your code when compiling. On Fri, 10 Apr 2020, 1

Modulo algorithm

2020-04-07 Thread Elias Mårtenson
I was reading the APL spec and noted that it specifies that the modulo operation is implementation-defined. I've been looking at various sources, and it's not clear to me how complex modulo is defined. Is there some source that documents it (and specifically the method used in GNU APL). Regards,

Crash with array index to empty array

2020-04-06 Thread Elias Mårtenson
Not much to say about this one. A parser crash. Easiest way to reproduce: * [⍬]* non-ASCII char in C-String '⍬' == Assertion failed: 0 && "Bad C-string" in Function: UCS_string in file: UCS_string.cc:93

Re: Slowness when using lambda expressions

2020-03-30 Thread Elias Mårtenson
ach A, B, and Z. These operations > are pretty fast but become noticeable if you do them very often. > > In your example one call of FOO takes 12 micro-seconds which > is, IMHO, not too bad. > > You could have avoided this overhead by computing: > > *{+/ ⍵} ⍳100* instead

Slowness when using lambda expressions

2020-03-29 Thread Elias Mårtenson
The following expression takes about 12 seconds to compute on my laptop: *{⍺+⍵}/ ⍳100* However, the equivalent expression without the lambda expression is immediate (i.e. thr prompt returns before I have time to notice that it even started calculating): *+/ ⍳100* What is causing the lar

Re: Fwd: Re: Function editing and line editing have inconsistencies.

2020-03-13 Thread Elias Mårtenson
On Fri, 13 Mar 2020, 19:31 Hans-Peter Sorge, wrote: > Hi, > > thank you for remembering me about the alternatives. > It's remarkable how ingrained the old times editors are into my mind:-) > > btw - to remove the echo line from emacs M-x shell set > `comint-process-echoes` to `t` > gnu-apl-mode

Five-dimensional transpose results in incorrect shape

2020-03-10 Thread Elias Mårtenson
At least I believe the result is incorrect. Let me show my observations. All tests done with ⎕IO←0 I will show 4 invocations of transpose, with the first three being correct but the fourth one returning the wrong result. First, let's establish the identity operation for a transpose: * ⍴ 0

Crash when dropping from empty array

2020-03-07 Thread Elias Mårtenson
This crash is very easy to reproduce, simply run the following: * ↓⍬* It gives the following error: non-ASCII char in C-String '⍬' == Assertion failed: 0 && "Bad C-string" in Function: UCS_string in file:

Fwd: Definition of "first-thingy"

2020-02-20 Thread Elias Mårtenson
-- Forwarded message - From: Elias Mårtenson Date: Thu, 20 Feb 2020, 22:39 Subject: Definition of "first-thingy" To: One benefit of experimenting with low-level PAL behaviours is that I've spent much more time lately reading the ISO spec. I was reading the sp

Re: Time/size complexity of APL algorithms

2020-02-17 Thread Elias Mårtenson
On Mon, 17 Feb 2020 at 19:57, Dr. Jürgen Sauermann wrote: > The discussions around paralellisation let me to start thinking about ways > to improve this in APL, and I was wondering if it would be possible to make > a purely immutable APL implementation. If so, it would, at least in theory, > bepo

Time/size complexity of APL algorithms

2020-02-16 Thread Elias Mårtenson
First of all, I hope Jürgen is OK with me posting about an APL-related topic that doesn't have anything directly to do with GNU APL. I'm doing this because this is the best place to find like-minded people. Sorry about that. The discussions around paralellisation let me to start thinking about way

Re: ⍬ bug?

2019-12-24 Thread Elias Mårtenson
I think such a change would make sense. A niladic function is in some sense a shortcut to writing a specific value, so it should probably be treated as such. It a little odd that: 1 2 X 4 is different from: 1 2 (X) 4 Regards, Elias On Tue, 24 Dec 2019, 14:48 Dr. Jürgen Sauermann, wrote: >

Re: Moving from svn to git and source forge to github.

2019-12-22 Thread Elias Mårtenson
I'm sorry. But you all forgot the one “source control” (in quotes, because it's barely worth the name) system: Microsoft Visual Sourcesafe. Wow. That thing was horrible. It didn't have a network protocol. Network support was implementing by sharing the repository database over SMB. Of course that

Re: Doubt about plotting on MAC OS X Catalina

2019-11-28 Thread Elias Mårtenson
There is no ldf on OSX if I'm not mistaken. I think you have to use otool. Do note that OSX doesn't behave much like a Unix, and newer version are even more limited. You probably need to add the correct compiler flags manually since its possible autotools doesn't handle it right. On Thu, 28 Nov

Re: Doubt about plotting on MAC OS X Catalina

2019-11-28 Thread Elias Mårtenson
There should be no need for that. I haven't used OSX in some time, but the way it works is that you use the - framework flag which points to the library you want to use. The framework files contain both the libraries and the header files, and the compiler will automatically find them. On Thu, 28

Re: Errors building 1199 on Mac OS 10.14.6

2019-11-07 Thread Elias Mårtenson
That release is 15 years old. I'm not entirely sure that trying to accommodate such old versions is something that a lot of time should be spent on? Regards, Elias On Thu, 7 Nov 2019 at 21:47, Louis Chrétien via Bugs and suggestions for GNU APL wrote: > Here’s the info on makeinfo: > > makeinfo

Re: [Bug-apl] Compile error in src/Performance.cc (WIP port of GNU APL 1.8 to OpenBSD)

2019-07-18 Thread Elias Mårtenson
I don't have the source code in front of me, so I can't check myself right now but GNU APL shouldn't be declaring a symbol starting with _ since such names are reserved. If it does, I believe the solution is to change them. Regards, Elias On Fri, 19 Jul 2019, 06:35 Alexander Shendi (Web.DE), < al

Re: [Bug-apl] try-GNU-APL

2019-04-08 Thread Elias Mårtenson
Isn't there some security thing in Javascript that prevents one window from communicating with another? I think that's what you're running into. You'll probably have an easier time if you put the virtual keyboard on the same page. Regards, Elias On Tue, 9 Apr 2019, 04:15 Dr. Jürgen Sauermann, w

Re: [Bug-apl] WS FULL

2019-01-22 Thread Elias Mårtenson
You should probably ensure you have enough swap. Just add a few GB and you'll be fine. On Tue, 22 Jan 2019, 22:24 Hudson Flavio Meneses Lacerda < hud...@hudsonlacerda.com wrote: > Hi. > > > After closing some other programs (== freeing memory), APL worked. > > It seems it requires about 100 MiB o

Re: [Bug-apl] libapl load problem....UPDATE 8

2018-07-02 Thread Elias Mårtenson
Since .dylib is the standard extension for libraries on OSX, it's probably a better idea to have an #ifdef that checks for the operating system and chooses the correct extension based on it. If you ever wish to support Windows in the future, they use .DLL. On 2 July 2018 at 22:15, Juergen Sauerma

Re: [Bug-apl] libapl load problem....

2018-05-17 Thread Elias Mårtenson
I don't think so. I believe the reason is that you're not compiling with a flat namespace. If I recall correctly OSX uses a different name resolution system by default where symbols from one library doesn't automatically become part of the namespace of another. There were some magic flags one can

Re: [Bug-apl] Why not reset color for cout by default?

2018-02-01 Thread Elias Mårtenson
I thought the default was to use the terminfo data? I recall submitting a patch for that long ago? On 1 Feb 2018 11:07 pm, "Juergen Sauermann" wrote: > Hi Clouds, > > thanks, fixed in *SVN 1044*. > > Please note that there is a zoo of vt100 compatible terminals around that > differ > considerabl

Re: [Bug-apl] Support for help command in emacs-mode

2018-01-13 Thread Elias Mårtenson
On 10 January 2018 at 17:31, Alexey Veretennikov < alexey.veretenni...@gmail.com> wrote: > Hi Elias, > > Could you please do you do what Juergen has requested so we can get the > changes in? > I can do it tomorrow. Basically all that is needed is to update the relevant files in the github reposit

Re: [Bug-apl] Hang in Residue

2018-01-08 Thread Elias Mårtenson
I can't easily find the document online without having to pay for it, but doesn't the Wikipedia page contain all the information you need? https://en.m.wikipedia.org/wiki/IEEE_754 On 9 Jan 2018 12:14 am, "Juergen Sauermann" wrote: > Hi Jay, > > I am still puzzled by the ISO description (and can'

Re: [Bug-apl] Support for help command in emacs-mode

2018-01-07 Thread Elias Mårtenson
h the changes from >> your git repo. >> >> I would prefer if the two repos remain in sync as long as they both exist. >> >> If you would simply remove your emacs repo then I would become responsible >> for the emacs sources in GNU APL which is close to impossible becaus

Re: [Bug-apl] Support for help command in emacs-mode

2018-01-07 Thread Elias Mårtenson
Best Regards, > /// Jürgen > > > On 01/07/2018 02:12 PM, Elias Mårtenson wrote: > > Thank you for this work. This is something have planned to do for a while > but never got around to. > > I merged your changes and tested, and it all seems to work fine. I'll > mer

Re: [Bug-apl] Support for help command in emacs-mode

2018-01-07 Thread Elias Mårtenson
Thank you for this work. This is something have planned to do for a while but never got around to. I merged your changes and tested, and it all seems to work fine. I'll merge this into gnu-apl-mode, but Jürgen needs to do the same on his side before this is complete. Regards, Elias On 7 January

[Bug-apl] Crash when trying to run illegal code

2017-12-05 Thread Elias Mårtenson
I made a typo and was presented with an APL stack trace which suggests a bug in GNU APL. The reduced test case is as follows: * (2 2⍴1) +⍤1 0 1 1* Which presents the following: Incomplete value at Symbol.cc:128 Addr:0x55891db89770 Rank:1 Shape: ⊏1⊐ Flags: -- First: 1 Dynamic:

Re: [Bug-apl] I'm curious about how will react APL compiled with ...

2017-12-04 Thread Elias Mårtenson
I don't think anyone would expect to be able to to move the apl binary to a system where the correct libraries aren't installed. You can't typically do that with any programs installed from the package managers. After all, that's why package dependencies exist. However, it does raise the question

Re: [Bug-apl] Cannot find libemacs on older mac

2017-12-03 Thread Elias Mårtenson
in that area. One poster in one of the links > below mentioned that an OS-X upgrade > had fixed a similar problem that the poster had, so my impression is that > this is a problem than cannot be fixed > inside GNU APL. > > Best Regards, > /// Jürgen > > > > On 12/03/

Re: [Bug-apl] Cannot find libemacs on older mac

2017-12-03 Thread Elias Mårtenson
10.6.8 is indeed very old. I thought my Macbook was old and it's running 10.10. I have to admit that I haven't tried the Emacs mode on OSX in a while since I don't use Macs anymore. That said, last time I did try, it worked fine. Jürgen, could there be an issue with the way the libraries are buil

Re: [Bug-apl] Suggestion for Quad-RE

2017-10-13 Thread Elias Mårtenson
On 12 October 2017 at 20:55, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi Elias, > > see below. > > /// Jürgen > > > On 10/12/2017 09:13 AM, Elias Mårtenson wrote: > > On 11 October 2017 at 21:15, Juergen Sauermann < > juergen.sauerm...@

Re: [Bug-apl] Suggestion for Quad-RE

2017-10-12 Thread Elias Mårtenson
On 11 October 2017 at 21:15, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > If I understand *libpcre* correctly (and I propably don't) then a general > regular expression RE is a tree whose > structure is determined by the nesting of the parentheses in RE, and the > result of a match

Re: [Bug-apl] Suggestion for Quad-RE

2017-10-10 Thread Elias Mårtenson
I think you have a point. It would be very useful to be able to have ⎕RE filter the results for you. In experimenting with your specific case, I came across another use-case that might warrant another flag: One that does not return the full match, but only the parenthesised subexpressions (this us

Re: [Bug-apl] ⎕RE merged

2017-10-09 Thread Elias Mårtenson
One more issue. The last snippet in the info manual for regexp (great work, and thanks for doing it, by the way) looks really weird, probably because the content is too wide. Regards, Elias On 9 October 2017 at 17:02, Jay Foad wrote: > Could you please update https://www.gnu.org/software/apl/ap

Re: [Bug-apl] Monadic form of ↓

2017-10-09 Thread Elias Mårtenson
On 9 October 2017 at 17:32, Jay Foad wrote: > On 9 October 2017 at 10:06, Elias Mårtenson wrote: > >> In GNU APL, I'd use ⊂⍤1 to achieve Split. Is that the most efficient way? >> >> > Either that or ⊂[2] (or in general ⊂[n] where n is the rank of the >

Re: [Bug-apl] Monadic form of ↓

2017-10-09 Thread Elias Mårtenson
part. In any case, my point is that monadic ↓ should do something useful. I guess split is one such useful thing. In GNU APL, I'd use ⊂⍤1 to achieve Split. Is that the most efficient way? Regards, Elias On 9 October 2017 at 16:58, Jay Foad wrote: > On 9 October 2017 at 04:56, Elias M

Re: [Bug-apl] ⎕RE merged

2017-10-09 Thread Elias Mårtenson
IN ERROR+ > 'foo' ⎕RE['⊂↓']'bar' > ^ ^ > * )more* > Multiple ⎕RE output flags: '⊂↓'. Output flags are: ⊂⍳/ > > Note the ⍳ in the error message instead of ↓. > > Regards, > Elias > > On 9

[Bug-apl] Monadic form of ↓

2017-10-08 Thread Elias Mårtenson
Currently, monadic ↑ acts as if it was called dyadically with 1 as its left argument, while monadic ↓ raises a VALENCE ERROR. In almost every single case where I have used ↓, it has been in the form 1↓X. Is there a reason why the monadic form is not allowed? And if not, would it make sense to add

Re: [Bug-apl] ⎕RE merged

2017-10-08 Thread Elias Mårtenson
^ * )more* Multiple ⎕RE output flags: '⊂↓'. Output flags are: ⊂⍳/ Note the ⍳ in the error message instead of ↓. Regards, Elias On 9 October 2017 at 10:45, Elias Mårtenson wrote: > I fixed the problem by adding a static_cast(len), but I found > another issue: The te

Re: [Bug-apl] ⎕RE merged

2017-10-08 Thread Elias Mårtenson
I fixed the problem by adding a static_cast(len), but I found another issue: The testcases file is missing. Regards, Elias On 9 October 2017 at 10:41, Elias Mårtenson wrote: > Thank you. > > There are some errors when compiling on my Arch system: > > g++ -DHAVE_CONFIG_H -I. -

Re: [Bug-apl] ⎕RE merged

2017-10-08 Thread Elias Mårtenson
Thank you. There are some errors when compiling on my Arch system: g++ -DHAVE_CONFIG_H -I. -I..-Wall -I sql -Wold-style-cast -Werror -I/usr/include -I/usr/include -rdynamic -g -O2 -MT apl-Quad_RE.o -MD -MP -MF .deps/apl-Quad_RE.Tpo -c -o apl-Quad_RE.o `test -f 'Quad_RE.cc' || echo './'`Quad_

Re: [Bug-apl] Regexp prototype

2017-10-04 Thread Elias Mårtenson
nt to write a brief description of *⎕RE* for *doc/apl.texi* ? > And should we maybe call it *⎕REX*? > > Best Regards, > Jürgen > > > On 10/04/2017 12:30 PM, Elias Mårtenson wrote: > > Thanks. > > The version I sent to you still uses "B" as the code go produ

Re: [Bug-apl] Regexp prototype

2017-10-04 Thread Elias Mårtenson
ys though. > > Best Regards, > /// Jürgen > > > On 10/04/2017 07:43 AM, Elias Mårtenson wrote: > > Here's the diffs for the current version of regexp support. It's probably > stable enough to use for real so that we can get some feedback on it. > > Do you want to merge this? > > Regards, > Elias > > >

[Bug-apl] Regexp prototype

2017-10-03 Thread Elias Mårtenson
Here's the diffs for the current version of regexp support. It's probably stable enough to use for real so that we can get some feedback on it. Do you want to merge this? Regards, Elias Index: configure.ac === --- configure.ac

Re: [Bug-apl] Regex support

2017-10-02 Thread Elias Mårtenson
ergen Sauermann wrote: > Hi Elias, > > I believe it is better to keep things together, i.e. in a single ⎕ > function than in several. > > It may be intuitive to use the character ⊂ instead of B in the axis > argument to indicate > that the result is meant for dyadic ⊂. &

Re: [Bug-apl] Regex support

2017-10-02 Thread Elias Mårtenson
{⍵ ⊂⍨ "[a-z]{4}" ⎕RE['B'] ⍵} 'abcdef45abchello9'* ┏→━━━┓ ┃"abcd" "abch" "ello"┃ ┗∊━━━┛ Regards, Elias On 2 October 2017 at 16:27, Elias Mårtenson wrote: > Some progress: > > The behaviour I described ear

Re: [Bug-apl] Regex support

2017-10-02 Thread Elias Mårtenson
e. > > The Macro definitions are contained in Macro.def > > Please note that in GNU APL functions cannot return functions, which may > or may not be a problem > in your case, depending on whether the function argument(s) of the > ⎕-operator is/are primitive or not. > In

[Bug-apl] Improved contribution workflow

2017-09-26 Thread Elias Mårtenson
Hello Jürgen, In my work to implement regex support, I realised that creating a nice diff for you is more difficult than it should be. The main problem is caused by the fact that a lot of generated files are part of the source respository. Since I made changes to these files, I end up with a mass

Re: [Bug-apl] Regex support

2017-09-24 Thread Elias Mårtenson
he top in the GNU APL implementation) > > Unfortunately ⎕R is already occupied in GNU APL (inherited from IBM APL2), > so some other name(s) are needed. > > Before implementing too much in advance, it would be good to present the > intended syntax and semantics on bug-apl and solic

Re: [Bug-apl] Regex support

2017-09-22 Thread Elias Mårtenson
I did not know this. I took a look at Dyalog's API and it's not possible to implement it fully, as it relies on their object oriented features. However, the basic functionality wouldn't be hard to replicate, if that is something that is desired. Jürgen, what is your opinion on this? On 22 Septemb

Re: [Bug-apl] Regex support

2017-09-22 Thread Elias Mårtenson
its shifting needed for UTF8 > strings. > > Best Regards, > /// Jürgen > > > On 09/21/2017 12:09 PM, Elias Mårtenson wrote: > > I've implemented the bare minimal needed to get regexes working through > a ⎕RE function. I've attached the diff. > > I real

Re: [Bug-apl] Regex support

2017-09-21 Thread Elias Mårtenson
I've implemented the bare minimal needed to get regexes working through a ⎕RE function. I've attached the diff. I really need Jürgen to take a look at this, since my code that constructs the return value cannot possibly be correct. There must be a better way to handle this which does not involve c

Re: [Bug-apl] Regex support

2017-09-20 Thread Elias Mårtenson
On 21 September 2017 at 04:30, wrote: anyone who loves grep and hates perl (and i hope java too) can't > be all bad > > using apl like syntax is goodaaa' ⎕REX['s'] 'bbb' what would > monadic ⎕REX['s'] 'bbb' return? I don't think there is any reasonably monadic interpretation o

Re: [Bug-apl] Regex support

2017-09-20 Thread Elias Mårtenson
tion with APL arrays, > would ultimately be a killer feature (I am not aware of such a feature > in other languages). > > Best, > > Giuseppe Cocomazzi > http://sbudella.altervista.org > > > On Wed, Sep 20, 2017 at 5:59 AM, Elias Mårtenson > wrote: > > On seve

[Bug-apl] Regex support

2017-09-19 Thread Elias Mårtenson
On several occasions, I have felt that built-in regex support in GNU APL would be very helpful. Implementing it should be rather simple, but I'd like to discuss how such an API should look in order for it to be as useful as possible. I was thinking of the following form: regex ⎕Regex strin

Re: [Bug-apl] Assertion failed

2017-08-30 Thread Elias Mårtenson
> > > Hope It Helps > > > > Regards, > > > > Ala'a > > > > > > > > > > > > On Tue, Aug 8, 2017 at 2:18 PM, Elias Mårtenson > wrote: > >> If that's the case, then you are indeed right. It's possible that the > >> std::

Re: [Bug-apl] Access to rational number numerator and denominator

2017-08-28 Thread Elias Mårtenson
't manage more than ~62-~63 bits limit. > > > my 2 cents, > Xtian. > > On 2017-08-28 22:33, Elias Mårtenson wrote: > >> The true benefit of rational numbers is realised once there is support >> for bigints. Jürgen has suggested that that is planned, and personal

Re: [Bug-apl] Access to rational number numerator and denominator

2017-08-28 Thread Elias Mårtenson
The true benefit of rational numbers is realised once there is support for bigints. Jürgen has suggested that that is planned, and personally I can't wait. Regards, Elias On 29 August 2017 at 08:59, Frederick Pitts wrote: > Louis, > > Thanks for the quick response. > > After wor

Re: [Bug-apl] GNU APL port for OpenBSD

2017-08-28 Thread Elias Mårtenson
Perhaps it's time for a new release? Or should it be delayed until the rational number support is stable enough to be default? On 29 Aug 2017 02:22, "Giuseppe Cocomazzi" wrote: > Hi Jürgen, > thanks for your reply. > Ported software on OpenBSD is submitted for inclusion in the so-called > "port

[Bug-apl] About fractional notation

2017-08-16 Thread Elias Mårtenson
Currently, the division symbol is used to represent fractional numbers. I would like to suggest the use of FRACTION SLASH (U+2044) instead. I think that would look better, and more intuitive. Note that this symbol is different from a regular slash, /, in several ways. First and foremost, it has a

Re: [Bug-apl] Assertion failed

2017-08-08 Thread Elias Mårtenson
S8_string* is not a string, despite of its > name. > *UCS8_string*s have no terminating 0 byte; the 0-byte is only appended if > the *UCS8_string* is converted to a C string with function *c_str()*. > > /// Jürgen > > > On 08/08/2017 09:28 AM, Elias Mårtenson wrote: > > So

Re: [Bug-apl] Assertion failed

2017-08-08 Thread Elias Mårtenson
the terminating 0 character in a 0-pointer. Using *UTF8:string::c_str* > *()* might > be better. > > Also converting a UCS or UTF8 string to *std::string* just for outputting > it with << may be > an overkill, since *ostream << *often (read: after *#include > "PrintO

Re: [Bug-apl] Assertion failed

2017-07-30 Thread Elias Mårtenson
Can you tell me exactly what you are doing in order to reproduce the problem? Regards, Elias On 31 Jul 2017 04:51, "Juergen Sauermann" wrote: > Hi Ala'a, > > maybe this is something for Elias to look into. Seems like some > Simple_string is corrupted. > > /// Jürgen > > > On 07/30/2017 09:40 PM

Re: [Bug-apl] Rational Numbers

2017-07-20 Thread Elias Mårtenson
There is an error in the rational code: In Archive.cc, line 218, the snprintf format is wrong. %lld is used, while the types of the arguments are actually "long". Thus, "%lld÷%lld" should be "%ld÷%ld" instead. On 21 July 2017 at 12:06, Elias Mårtenson wrote: >

Re: [Bug-apl] Rational Numbers

2017-07-20 Thread Elias Mårtenson
I haven't looked at this yet, but is this purely a display feature, or is it a full implementation of rational numbers? In other words, is the result of 1÷3 exact? And if so, how do I convert a rational number into a floating-point number? Regards, Elias On 21 July 2017 at 00:05, Juergen Sauerma

  1   2   3   4   5   6   7   8   9   10   >