Interesting. Does it happen for all empty tables?
On 10 May 2014 02:27, "Blake McBride" wrote:
> APL:
> db←'postgresql' SQL∆Connect 'host=localhost user=postgres
> password=postgres dbname=apl'
> db
> 'select * from apl_files;' SQL∆Select[db]''
>
> PostgreSQL:
>
> $ psql apl pos
That is correct. Normally the code is merged prior to a major release, so
the plan is to do that before 1.4.
On 10 May 2014 01:30, "Blake McBride" wrote:
> Dear Elias,
>
> That fixed the problem. I suppose the native code needs to updated in GNU
> APL (since I am also using the latest version o
Here's a version that doesn't use a lambda. Instead, there's a new
function `findl' that captures `list' from its caller (`finds').
∇z←list find key
z←key≡¨list
∇
∇z←findl key
z←(nl list) find ⊂key
∇
∇z←list finds keys
z←findl¨nl keys
∇
∇z←me e
z←⊂(⎕io+≡e)⊃(⊂,e) (,e) (e)
∇
∇z←nl l
z←me¨(⎕
This is a lot easier in Lisp. On the other hand, I've known Lisp for 40
years and am just now learning APL 2. I was pretty good at APL in the
`70s and `80s, but the nested arrays are new to me. I really ought to
read some of Dr. Brown's papers...
Anyhow, I think this ought to help:
∇z←list find k
I think you are correct Blake.
IIRC @ IPSA we used UTC internally for things saved to HD.
But displayed local time on the Terminal which was an IBM 2741 with an APL golf
ball.
(FWIW We also had a really really precise external clock custom built for us
which we used for date/time things rather
Dear David,
I had a solution to the single key case a while ago (see prior messages).
My problem is handling one or more keys.
Thanks for the help!
Blake
On Fri, May 9, 2014 at 11:39 AM, David B. Lamkins wrote:
> That particular function is not designed to accept multiple keys.
>
>
> On Fri,
That particular function is not designed to accept multiple keys.
On Fri, 2014-05-09 at 11:34 -0500, Blake McBride wrote:
> Greetings,
>
>
> It doesn't work:
>
>
> m←'hello' 'there' 'how' 'are' 'you'
> m
> hello there how are you
>
>
> m find 'are'
> 0 0 0 1 0
> m
Greetings,
It doesn't work:
m←'hello' 'there' 'how' 'are' 'you'
m
hello there how are you
m find 'are'
0 0 0 1 0
m find 'are' 'hello'
0 0 0 0 0
'are' find m
0 0 0
Thanks.
Blake
On Fri, May 9, 2014 at 11:15 AM, David B. Lamkins wrote:
> Try this:
>
> ∇z←list fi
APL:
db←'postgresql' SQL∆Connect 'host=localhost user=postgres
password=postgres dbname=apl'
db
'select * from apl_files;' SQL∆Select[db]''
PostgreSQL:
$ psql apl postgres
psql (9.1.13)
Type "help" for help.
apl=# \dt
List of relations
Schema | Name| Type |
Try this:
∇z←list find key
z←(,¨list)∊⊂,key
∇
(Also: please trim your replies.)
On Fri, 2014-05-09 at 10:26 -0500, Blake McBride wrote:
> Interesting. I didn't know about ≡. That's helpful, but the issue
> you raise with 'a' 'b' leaves us back to where I started. There
> should be a simple w
Greetings,
Perhaps the time they are showing is local and the "(GMT-4)" is showing its
relationship to GMT.
Blake
On Fri, May 9, 2014 at 11:03 AM, Juergen Sauermann <
juergen.sauerm...@t-online.de> wrote:
> Hi,
>
> GNU APL is following the IBM APL2 language reference manual as much as
> poss
Hi,
GNU APL is following the IBM APL2 language reference manual as much as
possible (so that we can
use it as GNU APL reference and need no write our own one).
It says:
"For example:
)WSID
THISWS
)SAVE
1992-03-27 21.51.09 (GMT-4) THISWS
Note: The system response includes the wor
Dear Elias,
That fixed the problem. I suppose the native code needs to updated in GNU
APL (since I am also using the latest version of that). Is that correct?
Thanks!
Blake
On Fri, May 9, 2014 at 10:19 AM, Elias Mårtenson wrote:
> You need to specify the full path (including extension).
>
Interesting. I didn't know about ≡. That's helpful, but the issue you
raise with 'a' 'b' leaves us back to where I started. There should be a
simple way for me to determine whether to do ⊂ or not. I just haven't
figured out how.
I read that there was a big debate about what ⊂ does on a scalar.
You need to specify the full path (including extension).
If you get that error message, typing )MORE should reveal information as to
why the library didn't load.
To answer your question regarding the packaging of the libraries, it's
because it's impossible (or at least exceedingly hard) to ship n
Dear Elias,
This really confuses me. Why would libemacs come with GNU APL if the .el
files don't? Why would the libemacs that comes with GNU APL be out of
date? I changed the path in gnu-apl-interactive.el as follows:
(defvar gnu-apl-libemacs-location "/home/blake/apl-mode/native/libemacs"
"
How would you do that? The problem here is that you as a person see 'foo'
and think of it as a string in this context and that you want to match on
it. However, the ∊ function sees an array of elements (those elements being
characters) so it acts upon them.
I suppose the best you can do would be t
Thanks for the tutorial. In my case, however, I already knew that. More
specifically, my problem is:
x←'hello' 'there' 'how' 'are' 'you'
∇r←test v
r←(⊂v)∊x
∇
This works for:
test 'there'
But doesn't work for:
test 'there' 'are'
I know I can remove the ⊂ for the second case. I need a sing
No, it doesn't. You need to set the variable gnu-apl-libemacs-location to
point to the location of the native library. The default is the value
"libemacs" which will be resolved by GNU APL to the one that comes with the
interpreter itself.
Regards,
Elias
On 9 May 2014 22:43, Blake McBride wrote
I am surely building the latest version. I am, however, not installing it
anywhere (since the Makefile has no install target). I have the following
in my emacs startup file:
;; APL Mode
(add-to-list 'load-path "~/apl-mode")
(require 'gnu-apl-mode)
Based on this, I assumed it would get the .so
Right. That means that you are not actually using the latest version of the
native library. This bug is was fixed a couple of weeks ago.
Regards,
Elias
On 9 May 2014 22:32, Blake McBride wrote:
> Okay. Sorry. Now I get it.
>
> With the space I get the Unexpected error:. Here is the Message
Okay. Sorry. Now I get it.
With the space I get the Unexpected error:. Here is the Message window:
Command="proto"
Connected to APL interpreter
(New file)
Command="si"
Command="def:/home/blake/foo.apl&3A;1"
Command=#("foo" 0 3 (fontified t))
Command=#("'a'" 0 3 (face font-lock-string-face font
I was very confused about this when I started learning APL too (well
documented in this very mailing list's archive).
What happens can be illustrated by boxing the output. Let's look at a
string:
* 8⎕CR 'foo'*
┌→──┐
│foo│
└───┘
* ⍴'foo'*
3
In order words,this is a three-element array o
What is the query you ran, and what was the content of the database table?
I won't be able to test this on a real Postgres instance until I get back
home (on Monday), but this information may at least give me an idea.
Regards,
Elias
On 9 May 2014 21:58, Blake McBride wrote:
> Greetings,
>
> I
What I mean is that you open a new file in a buffer. Let's call it
"foo.apl". Then, enter the following into the file:
*∇foo*
*'a'*
*'b'*
*∇*
Then, move the cursor to some point within this function definition (for
example, the line containing 'a'), and press C-c C-c.
Regards,
Elias
On 9 May
Greetings,
I've got my keyed file system running on sqlite. As soon as I started
testing it under PostgreSQL I got some errors. I am thinking that it is
possible that you still needed to change the PostgreSQL stuff to match the
other changes you had to make for the new API. This is the error I
Ooh, sorry, I don't understand.
What does "open a file with a name that ends with .apl" mean?
And then, when you say "define a function in it which has a newline in it"
do you means in emacs-mode?
Sorry.
Blake
On Fri, May 9, 2014 at 8:01 AM, Elias Mårtenson wrote:
> Ah yes, that's a differ
Ah yes, that's a different bug that I will fix.
Can you open a file with a name that ends with .apl and then define a
function in it which has a newline in it? For example:
*∇foo*
*'a'*
*'b'*
*∇*
Then go to it and press C-c C-c to define it. Do you get the error? If so,
try removing the newlin
Defining a function with a blank line worked without errors. Here is the
Message buffer:
Command="si"
Command="def"
Command=#("foo" 0 3 (fontified t))
Command=#("'a'" 0 3 (face font-lock-string-face fontified t))
Command=#("'b'" 0 3 (face font-lock-string-face fontified t))
Command="APL_NATIVE_EN
Interesting. Can you test another thing? Can you try to define a function
in the function editor that contains a blank line? Say, for example:
*∇foo*
*'a'*
*'b'*
Note the blank line in the middle. If that gives the same error, remove the
blank line and confirm the error was caused by the blank
CL is lexically scoped. I think emacs is dynamicly scoped. I think emacs
lisp doesn't have real macros either. Lastly, emacs lisp has notions of
buffer local variables and keyboard mappings that are not completely clear
to me. In short (even though I learned lisp on InterLisp) I am lost enough
Emacs Lisp has lots of similarities to Common Lisp, so you should be quite
comfortable with it I think.
Could you add a similar call to *message* that logs the content of the
variable "command" in the function "gnu-apl--send-network-command"
(gnu-apl-network.el, like 98). Inserting the following a
I am fine having it show timezone. I just need local time AND the WSID.
Thanks.
Blake
On Fri, May 9, 2014 at 7:21 AM, Elias Mårtenson wrote:
> You are right. )SAVE is indeed a command, and the output is meant for
> humans to read. It should be local time. That said, I don't mind seeing the
Data:("error" "DOMAIN ERROR" "" ""):End-Data
Note: although I don't know emacs lisp well, CL is one of my favorite
languages
On Fri, May 9, 2014 at 7:03 AM, Elias Mårtenson wrote:
> OK, I'm confused, That should not happen.
>
> Could you change the code that displays the error (line 102 in
>
You are right. )SAVE is indeed a command, and the output is meant for
humans to read. It should be local time. That said, I don't mind seeing the
timezone there as well. It's helpful when looking at logs (I'm speaking
from experience here since I'm right now sitting in a hotel room in Sydney,
two t
Given that )SAVE is a command and not a function (something intended to be
used by another program), I think it is clear that it should display local
time without any timezone information.
Secondly, the output message from )SAVE is for convenience of the immediate
programmer doing the work, and no
Greetings,
On Fri, May 9, 2014 at 12:10 AM, Daniel H. Leidisch wrote:
> Hello!
>
> Blake McBride
> writes:
>
> > x←'abcd' 'efg' 'hijkl'
> >
> > Now, if I have:
> >
> > y←'hijkl'
> >
> > z←'hhh'
> >
> > How can I tell if y is in x? How can I tell if z is in x?
>
> Or for both at once:
>
>
OK, I'm confused, That should not happen.
Could you change the code that displays the error (line 102 in
gnu-apl-editor.el) to ad some logging?
This line contains the following form, followed by a few extra
end-parentheses:
(error "Unexpected error: " (second return-data))
Change this expre
Before I continue further, I want to emphasise that there is a problem with
the output of )SAVE. It may, however, be different from your opinion.
There are two different things to think about when working with time:
- Displaying time information for the user's benefit
- For processing by a
I just did a make clean, followed by a make under native. Also verified
that emacs is loading the one I just built. Same errors.
Thanks.
Blake
On Fri, May 9, 2014 at 6:48 AM, Elias Mårtenson wrote:
> Right, but did you compile the module in the "native" directory and point
> your Emacs to
Right, but did you compile the module in the "native" directory and point
your Emacs to use it?
On 9 May 2014 19:44, Blake McBride wrote:
> $ git pull
> Already up-to-date.
> $
>
>
>
> On Fri, May 9, 2014 at 6:32 AM, Elias Mårtenson wrote:
>
>> Hmm... I think I have an idea what's going on.
>>
$ git pull
Already up-to-date.
$
On Fri, May 9, 2014 at 6:32 AM, Elias Mårtenson wrote:
> Hmm... I think I have an idea what's going on.
>
> Can you try with the latest version of gnu-apl-mode? That means both the
> Elisp code as well as the name module.
>
> Regards,
> Elias
>
>
> On 9 May 201
Greetings,
Two additional problems with the )SAVE message:
1. Drop the timezone info i.e. "(GMT -5)"
2. Display local time instead of GMT time.
My entire life revolves around my local time. GMT time is largely
meaningless to me. For me, GMT time only has value when I am trying to
coordinate
Hmm... I think I have an idea what's going on.
Can you try with the latest version of gnu-apl-mode? That means both the
Elisp code as well as the name module.
Regards,
Elias
On 9 May 2014 19:21, Blake McBride wrote:
> Dear Elias,
>
> Emacs version 24.3.1.
>
> I always have to move the cursor
Thanks to all! Very cool! I feel comfortable creating, unpacking, and
moving general arrays, but that's the extent of it. I'll have to get some
of this new stuff in my head.
Thanks for the help!
Blake
On Fri, May 9, 2014 at 12:10 AM, Daniel H. Leidisch wrote:
> Hello!
>
> Blake McBride
>
Dear Elias,
Emacs version 24.3.1.
I always have to move the cursor or I get the other error. So, after I
move the cursor and attempt to save, I get the second error:
Unexpected error:
Thanks.
Blake
On Fri, May 9, 2014 at 12:14 AM, Elias Mårtenson wrote:
> Yes, I've been told that this ha
Hello!
Blake McBride
writes:
> I'm not sure of this but - if you try to )ERASE something that isn't there,
> shouldn't it display a not found message on the ones not found?
>
> The problem is, if you erase something and mistype it, there is no message.
> You have no idea you didn't erase it. I
Hello!
Blake McBride
writes:
> x←'abcd' 'efg' 'hijkl'
>
> Now, if I have:
>
> y←'hijkl'
>
> z←'hhh'
>
> How can I tell if y is in x? How can I tell if z is in x?
Or for both at once:
(y z)∊x
1 0
Regards,
Daniel
Hello!
Blake McBride
writes:
> x←'abcd' 'efg' 'hijkl'
>
> Now, if I have:
>
> y←'hijkl'
>
> z←'hhh'
>
> How can I tell if y is in x? How can I tell if z is in x?
(⊂y)∊x
Regards,
Daniel
49 matches
Mail list logo