This is obviously a bug in the GNU Apl parser...
this kind of bugs usually are fixed by Jürgen within hours or even minutes.
may be he is on vacation ?
Xtian.
On 2023-01-05 21:58, Mr. Brian B. McGuinness wrote:
GNU APL2:
12345678909876543210
1.234567891E20
10⍟123456789098765432
and the "make" worked fine thereafter
Xtian.
On 2023-06-06 11:31, Chris Moller wrote:
Hi, Xtian,
Just pushed a fix for edif if you want to give it a try. Works for me on SVN
1706 and yesterday's SVN 1708.
--cm
On 6/5/23 03:33, Christian Robert wrote:
SVN 1704 completel
Even in a standard function your code crash. Definitely a problem somewhere.
Xtian.
[xtian@fedora:/home/xtian] $ apl
__ _ __ __ _____ __
/ // | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_
In NARS200 it also give a "DOMAIN ERROR"
)edit bar
bar 3
DOMAIN ERROR
bar[1] z←(+/(,(v⍴(1,Omega ⍴O))-m+.×⌹m←(v←2⍴ Omega)⍴(2*Omega)?Omega)*2)*÷2
∧
so, the diagnostic is probably correct, only the displaying of the error is
strange
ould open an other xterm and offer editing/modifying/saving a function
in a window, ala VI/VIM or ala emacs or ala nano. (I may be able to help in this matter, ps: ala
means "like", not really "with")
nevertheless I'm quite pleased with "GNU APL" (2 days old installation)
Christian Robert,
Poly.
lack most of the :if :else :endif stuff and similars
please take a look at http://aplwiki.com/SudokuSolver
as stated above.
Xtian. (Christian)
On 2015-02-19 08:10, Juergen Sauermann wrote:
Hi Christian,
see my answers inline below...
/// Jürgen
On 02/19/2015 03:10 AM, Christian Robert wrote:
This was working yesterday. Today I did an "svn update" and make && make install
and it fail now.
Xtian.
xtian@localhost:/home/xtian] $ aplt
__ _ __ __ _____ __
/ // | / // / / / / | / __ \ / /
/ / __ / |/
I do not understand why assigning a scalar to several index in a matrix fail
Xtian.
ps: there should be a gnuapl users group somewhere where I can ask trivial
questions like this one
if not, someone should create one.
]boxing 8
a
┌→─┐
↓
5 at 8:55 PM, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
I do not understand why assigning a scalar to several index in a matrix fail
Xtian.
ps: there should be a gnuapl users group somewhere where I can ask trivial
questions like this one
if not, so
Hi,
I'm pretty sure this was working a few days ago to test if a variable has a
value or not at entry to a function.
Is it broken or I miss something ?
thanks,
Xtian.
∇Time[⎕]∇
∇
[0] z←ncpu Time what;⎕io;start;stop;day;old_ncpu
[1] →(1=⎕NL 'ncpu')/already_set
[2] ncpu←1 ⍝
o.
Xtian.
On 2015-03-10 21:09, Blake McBride wrote:
I think you are confusing ⎕NC and ⎕NL
On Tue, Mar 10, 2015 at 7:16 PM, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
Hi,
I'm pretty sure this was working a few days ago to test if a variable has a
value or
ind bugs in it -
which turn out to be a misunderstanding on my part. Take it from someone with
years experience doing nothing but APL, GNU APL is pretty solid. If you
encounter a bug, definitely look closely at your code.
Glad to help.
--blake
On Tue, Mar 10, 2015 at 8:49 PM, Christian R
Probably one or two bugs here
you should call it like:
Fntb 'Fntb'
it give a syntax error, fine, so I added a 8 QuadCR (something) and it now
abort (core dump)
)load bug
loading )DUMP file /home/xtian/workspaces/bug.apl...
WAS CLEAR WS
Fntb 'Fntb'
18 96
SYNTAX ERROR
Fntb[10] (
46 44 8902 48 95 175)
⎕IO←1
⎕L←0
⎕LX←' '
⎕LX←0⍴⎕LX
⎕PP←10
⎕PR←' '
⎕PS←0
⎕PW←500
⎕R←0
⎕RL←16807
⎕TZ←-4
⎕X←0
On 2015-03-11 21:19, Christian Robert wrote:
Probably one or two bugs here
you should call it like:
Fntb 'Fntb'
it give a syntax error, fine
On my "still" prefered platform (nars2000) '⎕fmt var' is equivalent to the gnu
apl '8 ⎕cr var'
but on that platform ⎕fmt gives more info and this is probably not hard
to implement also into gnu apl.
here some examples in nars2000
a←⍳10
⎕fmt a
┌10──┐
│1 2 3 4 5 6 7 8
w GNU APL
(and IBM APL2) do it
and I believe this would create too much confusion to be helpful.
/// Jürgen
For example ∈ indicates an empty item in APL2 and not an aggregate (whatever
that may be).
On 03/13/2015 02:20 AM, Christian Robert wrote:
On my "still" prefered platform (n
perties of the entire
value) would therefore not
be very plausible.
The new *⎕CR* values are *20-24* for different frame styles.
/// Jürgen
On 03/14/2015 03:50 AM, Christian Robert wrote:
on Gnu APL:
8 ⎕cr (3 4 ⍴ ⍳12) (4 5 ⍴ ⍳20)
┌→┐
│┌→─┐ ┌→
)load Util
SAVED 2015-03-17 -3:23:11 (GMT-4)
∇Time[⎕]∇
∇
[0] z←ncpu Time what;⎕io;start;stop;old_cpu;max_cpu;SYLGet;SYLSet
[1] ⍝
[2] ⍝ Define 2 utility functions
[3] ⍝
[4] z←⎕FX 'Z←SYLGet what;⎕io;index' '⎕io←1' 'index←((⊂
what)≡¨⎕SYL[;1])/⍳↑⍴⎕SYL' 'Z←⎕SYL[index;2]'
[5] z
)load Util
SAVED 2015-03-17 -3:23:11 (GMT-4)
^^
the first two lines of the previous bug report also show a "bug" in the *SAVED*
time
of a workspace (show negative hours on reload).
Xtian.
rallel.hh* / *Parallel.**cc* area then
please let me know.
You can also use the *workspaces/ScalarBenchmark.apl* workspace which uses a
more precise timing
measurement based on the CPU cycle counter. It also crashes at times, but not
so often.
/// Jürgen
On 03/17/2015 02:33 AM, Christian R
It's not work, it's pure pleasure !
Xtian.
On 2015-03-17 07:14, Juergen Sauermann wrote:
Hi Xtian,
thanks. fixed in *SVN 565*.
Don't work that late!
/// Jürgen
On 03/17/2015 03:01 AM, Christian Robert wrote:
)load Util
SAVED 2015-03-17 -3:23:11 (GMT-4)
^^
practically empty
P*rintBuffer::PrintBuffer() *constructor.
BTW: Shouldn't it be Xian rather than Xtian?
/// Jürgen
On 03/17/2015 04:57 PM, Christian Robert wrote:
That code "only" crash when "traced" with T∆Time.
It work perfectly well (never crash) without the trace.
To
lso crashes at times, but not
so often.
/// Jürgen
On 03/17/2015 02:33 AM, Christian Robert wrote:
)load Util
SAVED 2015-03-17 -3:23:11 (GMT-4)
∇Time[⎕]∇
∇
[0] z←ncpu Time what;⎕io;start;stop;old_cpu;max_cpu;SYLGet;SYLSet
[1] ⍝
[2] ⍝ Define 2 utility functions
[3] ⍝
[4] z←⎕FX
ash happens in the practically empty
P*rintBuffer::PrintBuffer() *constructor.
BTW: Shouldn't it be Xian rather than Xtian?
/// Jürgen
On 03/17/2015 04:57 PM, Christian Robert wrote:
That code "only" crash when "traced" with T∆Time.
It work perfectly well (never cr
measurement based on the CPU cycle counter. It also crashes at times, but not
so often.
/// Jürgen
On 03/17/2015 02:33 AM, Christian Robert wrote:
)load Util
SAVED 2015-03-17 -3:23:11 (GMT-4)
∇Time[⎕]∇
∇
[0] z←ncpu Time what;⎕io;start;stop;old_cpu;max_cpu;SYLGet;SYLSet
[1] ⍝
[2
)load Determinant
SAVED 2015-03-19 21:02:15 (GMT-4)
t
1 3 0 0 0 0 2 1 2 3
2 1 3 0 2 3 0 0 2 3
1 1 2 3 1 3 3 0 3 3
1 2 3 1 0 1 1 1 1 2
2 0 1 2 2 3 1 1 2 3
3 1 0 0 3 0 2 1 3 0
0 0 2 0 0 1 2 1 1 3
3 2 1 2 3 3 0 3 1 0
1 1 0 1 3 3 1 0 1 0
3 0 2 1 2 1 0 0 0 1
⍝ I did per error exchang
Is there something wrong with monadic div ?
t←37817019821952000
t
37817019821952000
1000÷t
2.644312018E¯14
1÷(1000÷t)
3.781701982E13
÷(1000÷t)
DOMAIN ERROR
÷(1000÷t)
^^
It work well with not that huges values.
Xtian.
0÷0
1
2⎕tf 'c'
c←0 9454254955488000 18908509910976000 28362764866464000 37817019821952000
4727127477744 56725529732928000 66179784688416000 75634039643904000
85088294599392000
c
0 9454254955488000 18908509910976000 28362764866464000 37817019821952000
4727127477744 5672
0÷0
1
2⎕tf 'c'
c←0 9454254955488000 18908509910976000 28362764866464000 37817019821952000
4727127477744 56725529732928000 66179784688416000 75634039643904000
85088294599392000
c
0 9454254955488000 18908509910976000 28362764866464000 37817019821952000
4727127477744 5672
)clear
CLEAR WS
⎕pw←500
)copy Convert2 ∆length
SAVED 2015-03-27 16:52:16 (GMT-4)
24 ⎕cr ⊃
┌2─┐
│┌5┐
┌13──
ber correctly
then characters in *⎕TF* refer
to some IBM code page., There could be elements of the GNU APL *⎕AV* that are
not in that
codepage (and not in the IBM*⎕AV*).
/// Jürgen
On 03/28/2015 02:18 AM, Christian Robert wrote:
)clear
CLEAR WS
⎕pw←500
)clear
CLEAR WS
⎕pw←1000
)copy Convert2 ∆length
SAVED 2015-03-27 16:52:16 (GMT-4)
24 ⎕cr ∆length
┌2─┐
│┌5┐
┌13───
var←'kelvin' (,'v') 'some text'
D var
┌3───┐
│┌6─┐ ┌→┐ ┌9┐│
││kelvin│ │v│ │some text││
│└──┘ └─┘ └─┘│
└∊───┘
2 ⎕tf 'var'
var←'kelvin' 'v' 'some text'
⍎2 ⎕tf 'var'
D var
┌3─┐
│┌6─┐
var←'kelvin' (,'v') 'some text'
D var
┌3───┐
│┌6─┐ ┌→┐ ┌9┐│
││kelvin│ │v│ │some text││
│└──┘ └─┘ └─┘│
└∊───┘
2 ⎕tf 'var'
var←'kelvin' 'v' 'some text'
⍎2 ⎕tf 'var'
D var
┌3─┐
│┌6─┐
Hi,
sock←FIO∆socket 'AF_INET' 'SOCK_STREAM' 'IPPROTO_TCP'
DOMAIN ERROR
FIO∆socket[3] Zh←FILE_IO[32]Bi
^ ^
of course it fail, because it is expecting integer numbers ...
Such integer numbers are *very* *very* hard to remember, why not accepting this
syntax (in
On 2015-04-16 22:44, Elias Mårtenson wrote:
On 17 April 2015 at 10:39, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
Hi,
sock←FIO∆socket 'AF_INET' 'SOCK_STREAM' 'IPPROTO_TCP'
DOMAIN ERROR
quot;.so" as strings get the advantage to not accept an "AF_INET" as a
value to an "IPPROTP_TCP" parameter.
On 2015-04-16 22:59, Elias Mårtenson wrote:
On 17 April 2015 at 10:55, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
I though abo
On 17 April 2015 at 10:55, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
I though about that too (defining AF_INET, AF_UNIX, SOCK_STREAM,
SOCK_DGRAM, IPPROTO_TCP, IPPROTO_UDP, IPPROTO_RAW, and such (tenths more)),
but I *still* think it should be in the ".so"
;PF_UNIX" 1
t←t⍪"SOCK_STREAM" 1
t←t⍪"SOCK_DGRAM" 2
t←t⍪"SOCK_RAW" 3
t←t⍪"SOCK_RDM" 4
t←t⍪"SOCK_SEQPACKET" 5
t←t⍪"SOCK_DCCP" 6
t←t⍪"SOCK_PACKET" 10
t←t⍪"SOCK_CLOEXEC" 524288
t←t⍪"SOCK_NONBLOCK" 2048
t←t⍪"IPPROTO_IP" 0
t←t⍪"IPPROTO_ICMP" 1
t←t⍪"IPPROTO_IPIP" 4
t←t⍪"IPPROTO_TCP" 6
t←t⍪"IPPROTO_PUP" 12
t←t⍪"IPPROTO_UDP" 17
t←t⍪"IPPROTO_IDP" 22
t←t⍪"IPPROTO_TP" 29
t←t⍪"IPPROTO_DCCP" 33
t←t⍪"IPPROTO_IPV6" 41
t←t⍪"IPPROTO_ROUTING" 43
t←t⍪"IPPROTO_FRAGMENT" 44
t←t⍪"IPPROTO_RSVP" 46
t←t⍪"IPPROTO_GRE" 47
t←t⍪"IPPROTO_ESP" 50
t←t⍪"IPPROTO_AH" 51
t←t⍪"IPPROTO_ICMPV6" 58
t←t⍪"IPPROTO_NONE" 59
t←t⍪"IPPROTO_DSTOPTS" 60
t←t⍪"IPPROTO_MTP" 92
t←t⍪"IPPROTO_ENCAP" 98
t←t⍪"IPPROTO_PIM" 103
t←t⍪"IPPROTO_COMP" 108
t←t⍪"IPPROTO_SCTP" 132
t←t⍪"IPPROTO_UDPLITE" 136
t←t⍪"IPPROTO_RAW" 255
t←t⍪"SOL_SOCKET" 1
t←t⍪"SO_BINDTODEVICE" 25
t←t⍪"SO_REUSEADDR" 2
t←t⍪"SO_BROADCAST" 6
t←t⍪"INADDR_ANY" 0
$
Feel free to use any/all of this code (.c or .apl) as you wish, especially if
it's to be included in whole,
in part or as a starting point idea into GNU APL. Feel free to rename function,
improve the code, etc.
Christian Robert.
132.207.4.11
132.207 0.4 0.11
24 ⎕cr 132.207.4.11
┌3───┐
│132.207 0.4 0.11│
└┘
Well, is it a bug or not, I don't know really. Was typing an IP address.
Xtian.
D temp
┌32─┐
│1 0 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0│
└───┘
D bitsidx
┌5─┐
│28 29 30 31 32│
└──┘
bitsidx⊃temp
D
v×1609.344│││
││└─┘ └─┘ └──┘ └─┘ └┘ └─┘ └──┘ └───┘
└──┘ └┘ └┘ └┘ └──┘││
│
└∊──┘│
└∊∊───┘
btw, can I be part/member of this list ?
Xtian.
On 2015-04-24 22:38, Christian Robert wrote:
Forget this bug report, I'm completely wrong here.
Pick (or diadic right shoe) can be use to "pick" one thing at a time
1 2 3 ⊃ temp
do not mean: temp[1 2 3]
it mean: temp[1;2;3]
sorry,
Xtian.
Got some kind of limit bug. When my function '∆' is called with an undefined
function name
it core dump. I understood why and fixed the function by addind the line #2
(actually commented out).
Nevertheless, I report this because it abort rather than give some APL errors.
Session:
$ aplt
)load Delta
WARNING: this workspace was )SAVEd with SVN version 618
but is now being )LOADed with SVN version 619
Expect problems, in particular when the )SI was not clear.
In case of problems, please try )COPY instead off )LOAD.
SAVED 2015-04-30 22:15:45 (GMT-4)
)wsid
IS D
[...]
4 6 8 9
4 7 8 9
5 6 7 8
5 6 7 9
5 6 8 9
5 7 8 9
6 7 8 9
t←t[(~∧/t=1⊖t)/⍳↑⍴t;]
⍴t
126 4
)erase t
)vars
)fns
D FreqGraph LotoTime
)save
LVAL CELL in 1 at Archive.cc:822
LVAL CELL in 1 at Archive.cc:822
LVAL CELL in 1 at Archive.cc:822
LVAL CELL i
As I understand (may be wrong as usual)
trying to display an error via diadic ⎕cr is aborting your session.
I really think it's a bug. Abort is the worst thing in software, but it has his
utility.
Xtian.
On 2015-05-04 20:32, alexwei...@alexweiner.com wrote:
Hi bug-apl,
Check out this example
)reset
1+i
VALUE ERROR
1+i
^
)si
⋆
i←10
→⍳0
SYNTAX ERROR+
→⍳0
^
)si
⋆
⋆
I'm curious about *why* thoses "at the prompt" commands add to the ")si"
they just can't be resumed in any way to my knowledge, and if so this is
unneeded and u
you enter after the prompt) resumable
in *SVN 630*.
I believe the description of *→⍳0* in the IBM APL2 language reference differs
slightly from the actual
behavior of IBM APL2, but GNU APL now behaves like IBM APL2 for *→⍳0*.
/// Jürgen
On 05/15/2015 03:27 AM, Christian Robert wrote:
)reset
"a" is an array of length 1
'' <> "" because '' is an empty scalar and "" is an empty array.
So, use the double quotes rather than the single quote for most things will
save you
lot of problems, especially where the program expect a st
Working fine here
Xtian.
D←{24 ⎕cr ⍵}
D ⍳4
┌4──┐
│1 2 3 4│
└───┘
t←(3 4 ⍴ 12?100) (4 5 ⍴⍳20)
D t
┌2──┐
│┌4───┐ ┌5─┐│
│377 85 51 69│ 4 1 2 3 4 5││
││ 8 42 46 41│ │ 6 7 8 9 10││
││93 67 100 52│ │11 12 13 14 1
I would say that you are out of memory.
Killed alone means killed by the system.
# dmesg | tail -n 50
will probably confirm the out of memory condition.
Xtian.
On 2016-02-16 19:25, alexwei...@alexweiner.com wrote:
Hi Bug-APL,
I was running APL as a script, working on a file that is several
On the same subject, I would love to have Quad-PW set to 1000 by default.
Xtian.
On 2016-02-23 16:20, Alexey Veretennikov wrote:
Hi,
What is the format of the preference file? Can't find anything in
documentation.
I need in particular to set ]BOXING 8 on every startup and probably some
other
I have this function,
∇IOTA[⎕]∇
∇
[0] z←IOTA v
[1] z←⍳↑v
[2] v←1↓,v
[3] Loop: →(0=⍴v)/0
[4] z←z∘.,⍳↑v
[5] v←1↓v
[6] →Loop
∇
]boxing 24
IOTA 0
┌⊖┐
│0│
└─┘
IOTA 10
┌10──┐
│1 2 3 4 5 6 7 8 9 10│
└┘
IOTA 2 3
┌3──
6 at 09:57, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
I have this function,
∇IOTA[⎕]∇
∇
[0] z←IOTA v
[1] z←⍳↑v
[2] v←1↓,v
[3] Loop: →(0=⍴v)/0
[4] z←z∘.,⍳↑v
[5] v←1↓v
[6] →Loop
∇
]boxing 24
← {∘.,/⍳¨⍵}*
Regards,
Elias
On 2 March 2016 at 09:57, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
I have this function,
∇IOTA[⎕]∇
∇
[0] z←IOTA v
[1] z←⍳↑v
[2] v←1↓,v
[3] Loop: →(0=⍴v)/0
thank you very much, I now understand how it work !
looks so easy for you ;-) and so hard for me :-(
Xtian.
On 2016-03-01 21:43, Elias Mårtenson wrote:
On 2 March 2016 at 10:28, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
IOTA ← {∘.,/⍳¨⍵}
yes, it does the
You can also use something like this
∇multi a;a1;a2;a3
[1] (a1 a2 a3)←a
[2] ⍕a1
[3] ⍕a2
[4] ⍕a3
[5] ∇
multi 3 5 7
3
5
7
I think that implementing this "a la Dyalog" way is possible
but would not be trivial source changes.
Xtian.
On 2016-03-03 17:17, Alexey Veretennikov wrote:
Hi,
]boxing off
(⊂10 1) ⍕ 1+10⍴1e15
left argument of ⍕:
┏━━┓
┃┏→━━━┓┃
┃┃10 1┃┃
┃┗┛┃
┗∊━┛
DOMAIN ERROR
(⊂10 1)⍕1+10⍴1000
^ ^
I love the way it display by default the argument in error (eg: in boxing mode).
Is this new ? If not, I never noticed
Second though, it looks like a piece of debug code forgotten in the source ...
Xtian.
On 2016-03-03 20:51, Christian Robert wrote:
]boxing off
(⊂10 1) ⍕ 1+10⍴1e15
left argument of ⍕:
┏━━┓
┃┏→━━━┓┃
┃┃10 1┃┃
┃┗┛┃
┗∊━┛
DOMAIN ERROR
(⊂10 1)⍕1+10
)load CONTINUE
SAVED 2016-03-04 21:36:54 (GMT-5)
0
1
1
2
3
5
8
13
21
34
55
89
I think you will have to "fflush()" the stream *before* it will be available in
any )host command
Zi ← ⎕FIO[16] Bh fflush(Bh)
( From ⎕FIO '' )
Xtian.
On 2016-03-04 21:54, alexwei...@alexweiner.com wrote:
Hi Bug-apl,
Currently, at a point in my code I do something like this:
⍝assume the v
On 2016-03-04 21:54, alexwei...@alexweiner.com wrote:
./shellscript.sh yadda.file yadda.file.new
I would use popen("./shellscript.sh yadda.file yadda.file.new","r")
then "pclose()" on the stream when it return EOF
rather than ")host ./shellscript.sh yadda.file yadda.file.new"
Zh ← As ⎕F
∇Execute[⎕]∇
∇
[0] z←Execute cmd;⎕io;fh
[1] ⎕io←0
[2] fh ← ⎕FIO[24] cmd
[3] z←⎕av[⎕fio [8] fh]
[4] Loop: →(0≠⎕FIO[10] fh)/Fini
[5] z←z,⎕av[⎕fio [8] fh]
[6] →Loop
[7] Fini: ⎕FIO[25] fh
[8] ⊃⊃z
∇
)save
2016-03-05 00:20:57 (GMT-5) CONTINUE
D Execute 'date'
Use a function like this one to execute a host command and get the result into
a variable.
ps: still debugging this one.
∇Execute[⎕]∇
∇
[0] z←Execute cmd;⎕io;fh
[1] ⎕io←0
[2] fh ← ⎕FIO[24] cmd
[3] z←⎕av[⎕fio [8] fh]
[4] Loop: →(0≠⎕FIO[10] fh)/Fini
[5] z←z,⎕av[⎕fio [8] fh]
[
right ! It was late ...
On 2016-03-05 08:14, Kacper Gutowski wrote:
On Sat, Mar 5, 2016 at 6:45 AM, Christian Robert
wrote:
[0] z←Execute cmd;⎕io;fh
[7] Fini: ⎕FIO[25] fh
[8] ⊃⊃z
(...)
I do not understand why it repeat the result twice. one via stdout and one
via boxing as I can guess
Assume f2c take a function name and return each function line, removing
trailings blanks and adding LINEFEED to each one.
f2c←{(⎕ucs 10),⍨¨{(∼⌽∧\⌽⍵=' ')/⍵}¨{⊂[2]⎕cr ⍵} ⍵}
f2c 'Execute' ⍝ Execute is an example function. Any function is ok here
z←Execute cmd;⎕io;fh
⎕io←0
fh ← ⎕FIO
text vectors (=
APL strings),
you can use *18⎕CR* and *19⎕CR* in GNU APL.
/// Jürgen
On 03/10/2016 03:18 AM, Christian Robert wrote:
Assume f2c take a function name and return each function line, removing
trailings blanks and adding LINEFEED to each one.
f2c←{(⎕ucs 10),⍨¨{(∼⌽∧\⌽⍵='
When I joined this bug-apl@gnu.org ~two years ago, my first complains the lack
of:
)edit function_name
well, with ./configure --with-libapl I can now near do that.
[xtian@fc-22:/home/xtian/libapl] $ ls -la
total 16
drwxrwxr-x. 2 xtian xtian 35 18 mar 23:34 ./
drwx--. 26 xtian xti
Kacper,
I love the way ∇EDIT⍙OPEN solve the problem of "input is not a tty" said by ")host
vi function_file"
I *still* think that this ")edit function_name" should be right into the
interpretor functionnality.
Ideally it should invoke EDITOR in a new terminal window (fork() and
exec(EDITOR,p
se exiting tools to do that? It's a lot better than
opening vi externally anyway.
OK, enough blowing my own horn here. There was another project that aimed to
provide something similar, using a dedicated application called aplwrap. What
happened to that?
On 22 Mar 2016 09:39, &q
David,
Do you still have access to the aplwrap GitHub login ?
This evening I had tracked down why it sometime (aplwrap) abort/coredump on me.
this is a one line change into file src/txtbuf.c
since I made that change I can no longer make it abort on me.
int
handle_copy_down ()
{
GtkTextIt
Got this stack trace while experimenting with the power operator. I'm not
saying that what I was trying was correct/valid.
Xtian.
{1+÷⍵}⍣= ⊢ 2
1.618033989
{1+÷⍵}⍣0 ⊢ 2
2
{1+÷⍵}⍣1 ⊢ 2
1.5
{1+÷⍵}⍣2 ⊢ 2
==
An other way to do that, written some time ago:
⎕cr 'Replace'
z←Line Replace patterns;f;t;P;pos
⍝
⍝ Check what is effectively `Line`
⍝
→((≡Line)≥2)/Enclosed ⍝ Line is an Enclose of things
→(2=⍴⍴Line)/Matrix⍝ Line is a Matrix
⍝
⍝ Do the job, single vector source,
where are you taking the definition of various functions like ?
power operator ?
dieresis jot ? like: (⊂⍤1) z,⍪z (I really don't know what it is doing)
I see no references anywhere on the web. None in apl2 manual, none in Dyalog
manual.
how can I learn thoses ... without a manual and/or som
, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
where are you taking the definition of various functions like ?
power operator ?
dieresis jot ? like: (⊂⍤1) z,⍪z (I really don't know what it is doing)
I see no references anywhere on the web. None in apl2 manu
)load Loto2
SAVED 2016-04-29 21:57:45 (GMT-4)
)fns
LotoRandomize
⎕CR 'Loto'
z←n Loto a;b
(a b)←a
z←(0,a)⍴0
Loop: →(n=0)/Sort
z←z⍪a?b
n←¯1+n
→Loop
Sort: z←{⍵[⍋⍵;]} {(⊂⍋⍵)⌷⍵}⍤1 ⊢ z
5 Loto 6 49
1 9 18 21 43 48
5 6 10 39 41 44
8 18 19 21 36 44
14 18 23 31 4
__ _ __ __ _____ __
/ // | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / // /___
\//_/ |_/ \/ /_/ |_|/
hi,
in the result of "]help" I can see:
λ { ... } result
⍺ { ... } left value argument
⍵ { ... } right value argument
χ { ... } axis argument
⍶ { ... } left function argument
⍹ { ... } right function argument
can someone
-17 22:30, Xiao-Yong Jin wrote:
They are for direct function (operator?) definitions. Try:
hook←{⍵⍶⍹⍵}
+hook÷2
2.5
On May 17, 2016, at 8:24 PM, Christian Robert
wrote:
hi,
in the result of "]help" I can see:
λ { ... } result
⍺ { ... } left valu
name:
* bar ← {(⍺ ⍶ 2) ⍹ (⍵ **⍶** 3) }*
* 10 +bar- 20*
¯11
The call to bar results in the following formula being evaluated: (10+2)-(20+3).
Regards,
Elias
On 18 May 2016 at 10:48, Christian Robert mailto:christian.rob...@polymtl.ca>> wrote:
Sorry, no explanations given.
a newbie.
I really want a working examples.
Xtian.
On 2016-05-17 22:30, Xiao-Yong Jin wrote:
They are for direct function (operator?) definitions. Try:
hook←{⍵⍶⍹⍵}
+hook÷2
2.5
On May 17, 2016, at 8:24 PM, Christian Robert
wrote:
hi,
in the result of "]help" I can see
Now pretty clear.
> It’s a definition for an operator receiving two function arguments ⍶ and ⍹,
for which you can not do ⎕←⍹ or ⎕←⍶. ...
many thanks.
Xtian.
On 2016-05-17 23:12, Xiao-Yong Jin wrote:
On May 17, 2016, at 9:48 PM, Christian Robert
wrote:
Sorry, no explanations gi
Looking at
https://www.youtube.com/watch?v=DmT80OseAGs
Every thing goes fine (when he says "take" and use "⊃" you write "↑" instead in
gnuapl)
[...]
88 {⍺ ⍵} s44
88 ┌→──┐
↓0 0 0 0│
│0 0 2 1│
│3 0 0 4│
│0 0 0 0│
└───┘
at the minute 03:41 it fail with a syntax e
)clear
CLEAR WS
a←20?100
b←15?100
a
77 7 19 54 24 32 84 40 5 95 97 76 82 92 63 26 10 98 21 50
b
38 80 99 90 26 30 74 50 85 81 47 76 93 95 88
a∘.=b
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
)clear
CLEAR WS
)wsid test
WAS CLEAR WS
a←20?100
b←15?100
)save
2016-05-25 22:16:27 (GMT-4) test
a
77 7 19 54 24 32 84 40 5 95 97 76 82 92 63 26 10 98 21 50
b
38 80 99 90 26 30 74 50 85 81 47 76 93 95 88
cmp←{(∨/⍺∘.=⍵)/⍵}
a cmp b
LENGTH ERROR
c
ns with *λ* followed by a number:
* FOO←{⍺ + ⍵}**
** ∇FOO[⎕]∇**
**DEFN ERROR+**
** ∇FOO[⎕]∇**
** ^**
** )more**
**function is a lambda
⎕CR 'FOO'**
**λ←⍺ λ1 ⍵**
**λ←⍺ + ⍵ **
*
/// Jürgen
On 05/26/2016 04:38 AM, Christian Robert wrote:
)clear
You can force binding monadic like this
1 ({⍵} 2)
1 2
but what you describe may effectively be a bug.
Xtian.
On 2016-06-04 02:58, Daniel H. Leidisch wrote:
Hello!
On r734:
1 {⍵} 2
VALENCE ERROR
1 λ1 2
^ ^
Unless I'm mistaken, this used to work. I assumed it to be a
[xtian@fc-23:/home/xtian] $ apl
__ _ __ __ _____ __
/ // | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / // /___
something similar,
)reset
∇z←Push func;f2c;fh
[1] f2c←{(⎕ucs 10),⍨¨{(∼⌽∧\⌽⍵=' ')/⍵}¨{⊂[1+⎕io]⎕cr ⍵} ⍵}⍝ Internal macro
to transform a function to text
[2] fh←'w' ⎕fio[3] 18 ⎕cr {(∼⌽∧\⌽⍵=' ')/⍵}func ⍝ Open a file, no
trailing blanks, honor utf-8 names
[3] ⊣{⍵ ⎕fi
I agree,
)sic
a←2 3⍴.1×⍳6
b←2 3⍴⍳6
a + b
1.1 2.2 3.3
4.4 5.5 6.6
a+[1]b
1.1 1.2 1.3
4.4 4.5 4.6
⍝ should give an error above, rank error.
a+[2]b
LENGTH ERROR
a+[2]b
^^
⍝ this is NOT ok
⎕io
1
my 2 cents,
Xtian.
On 2016-06
06-06 23:35, Christian Robert wrote:
I agree,
)sic
a←2 3⍴.1×⍳6
b←2 3⍴⍳6
a + b
1.1 2.2 3.3
4.4 5.5 6.6
a+[1]b
1.1 1.2 1.3
4.4 4.5 4.6
⍝ should give an error above, rank error.
a+[2]b
LENGTH ERROR
a+[2]b
^^
⍝ this is NOT ok
⎕io
At svn 739:
---
[xtian@fc-23:/home/xtian] $ apl
__ _ __ __ _____ __
/ // | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | /
12 vs 2 **
** debug: 12 vs 3 **
** debug: 12 vs 4 **
** debug: 12 vs 5 **
** debug: 12 vs 6 **
** debug: 12 vs 7 **
** debug: 12 vs 8 **
** debug: 12 vs 9 **
** debug: 12 vs 10 **
** debug: 12 vs 11 **
** debug: 12 vs 12 **
**1 2 3 5 8 13 21 34 55 89 144 233**
*
/// Jürgen
On 06/
Work like a charm.
[xtian@xtian:/home/xtian] $ apl
__ _ __ __ _____ __
/ // | / // / / / / | / __ \ / /
/ / __ / |/ // / / / / /| | / /_/ // /
/ /_/ // /| // /_/ / / ___ | / // /_
How was that outputting *before* svn 740 ?
On 2016-06-13 22:11, Xiao-Yong Jin wrote:
Hello,
It breaks when the left argument is 1. In addition, with the internal macros,
the si stack is polluted.
1+/⍳5
1 2 3 4 5
NARS2000 give the exact same result:
1+/⍳5
1 2 3 4 5
quite stran
I agree that the new behavior after 740 is not right.
still newbie and will be for a long time,
Xtian.
On 2016-06-13 23:39, Xiao-Yong Jin wrote:
Hello,
I guess the c++ code is calling the wrong macro.
Before r740:
(⊂'abc'){⍺ ⍵}¨3⍴1
abc 1abc 1abc 1
(⊂'abc'){⍺ ⍵}¨4⍴1
abc 1
I concurs,
f←(1?2*48)÷1333.3
DOMAIN ERROR
f←(1?2⋆48)÷1333.3
^ ^
f←(1?2*32)÷1333.3
DOMAIN ERROR
f←(1?2⋆32)÷1333.3
^ ^
f←(1?2*31)÷1333.3
DOMAIN ERROR
f←(1?2⋆31)÷1333.3
^ ^
f←(1
I thing a couple of right arrows or )sic or )reset would do the trick
→
→
)sic
)reset
when something is interrupted, no memory is freed, and the operation can be
"resumed" with
→⍳0
my 2 cents,
Xtian.
On 2016-06-16 15:14, Blake McBride wrote:
blake@blake-vml
⎕pw←1000
df
Freq ╔═══╗
║z←Freq m;c ║
║z←⌈/,m ║
║c←z⍴0 ║
║⊣ {c[⍵]←c[⍵]+1}⍤0 ⊢ m ║
║z←⍉(2,z)⍴(⍳z),c║
╚═══╝
Loto ╔═══
1 - 100 of 263 matches
Mail list logo