Hi all,
I need to put complex numbers in a grid control, but I get an error because
the 8!:0 verb does not allow complex arguments:
cmplx=: 3 3 $ 0 j. i.9
load 'grid'
grid cmplx
|domain error: fmt
| fmt y
My workaround is to re-define the fmt verb in the jzgrid locale, in order t
Hi everyone,
I've been busy these last 3 weeks with the "optimizations" for my
project. It's in quotes because I still don't have accurate metrics on
comparison between old and new system. Still, I've taken a lot of the
advice here in the forum and it will work ... for better or worse.
Hehehehehe.
Yes ... exchange supports IMAP.
On Tue, 2008-10-07 at 18:32 +0800, bill lam wrote:
> On Tue, 07 Oct 2008, Alex Rufon wrote:
> > I've taken the plunged and formatted my Lenovo T61 with Ubuntu 8.04 and
> > installed WindowsXP on a virtual machine. The only hair pulling part is
> > getting Evolution
> I've got a sorted list of numbers, and I want to find the longest run
> of consecutive integers:
>
> 2 4 5 6 12 --> 3
> 1 2 3 4 5 6 --> 6
My simple solution:
ms =: [: >./ [: (# ;. 2) 0 ,~ _1 = 2-/\]
Seems to be pretty fast one:
in =: 1e6 [EMAIL PROTECTED] 10
6!:2 'ms in'
0.0336962
--
Hi Chris/Oleg,
I have the following questions for JDB:
1. Would it be possible to use JDB without creating the physical file
structure? I.e. Folders and files.
2. How do I find out the existing tables in a database without reading
the "dir" file?
3. Isn't it logical to get a "Read" verb at the tab
On Tue, Oct 7, 2008 at 5:19 AM, Alex Rufon <[EMAIL PROTECTED]> wrote:
> Playing with this we get:
> NB. converting from string to numbers
> searchLOOKUP ;: 'The quick brown fox jumped'
> 12 13 14 15 16
> searchLOOKUP 'fox'
> 15
> searchLOOKUP 'Fox'
> 17
> NB. converting from numbers to string
On Tue, 07 Oct 2008, Alex Rufon wrote:
> I've taken the plunged and formatted my Lenovo T61 with Ubuntu 8.04 and
> installed WindowsXP on a virtual machine. The only hair pulling part is
> getting Evolution to use MS-Exchange's OWA access. Up to now, I still
> can't get my Global Address List. Grrr
Alex Rufon wrote:
> A few years back, I've asked this same forum on how to
> convert strings to numbers and back again.
I remember these discussions. Oleg suggested s2i =: 6 s: s: [1], and in a
follow up a few years later, you responded that you'd tried the suggestion, but
it didn't meet
I wrote:
> Oleg suggested s2i =: 6 s: s: [1], but it didn't meet
> your needs because of the memory constraints imposed by
> your architecture [2].
Whoops, forgot the links:
[1] http://www.jsoftware.com/pipermail/general/2004-March/016703.html
[2] http://www.jsoftware.com/pipermail/genera
Hello Dan;
If you are saying that when an optimization results in a result smaller
than what ": would give, you use the optimized string, something an
APLer, like me, who remembers 1200 baud as lightning fast, would
appreciate, my intuition said that wasn't the case in the instances I
was us
Hello Ric;
I guess all that I can say is that rank coloring wouldn't solve any
problems that $x doesn't. The existing syntax coloring already taxes my
cognitive powers, as it has done since color came to APL+PC.
Sherlock, Ric wrote:
---Randy MacDonald wrote:
(I'll leave the irony of no
Randy wrote:
> an actual test would confirm or refute this [whether the]
> optimization results in a result smaller than what ": would give
I included such a test in the message you quoted:
> 5!:5{.;:'A'
> 29+14.5*i.100
> ":A
> 29 43.5 58 72.5 87 101.5 116 130.5 1
Dear J Forum
Dyalog APL allows f <- where f is a dyadic function, as in
a <- 10 rho 0
a[2 2 5 6 2] + <- 3 4 5 6 7
a
0 0 14 0 0 5 6 0 0 0
How do I do this in J?
Amend won't do it - I didn't expect it to.
a=: 10$0
a=: a+(3 4 5 6 7)(2 2 5 6 2)}a
a
0 0 7 0 0 5 6 0 0 0
The
> Dyalog APL allows f <- where f is a dyadic function, as in
> How do I do this in J?
You need to roll up all repeated elements, then do the amendment. In this
case, you need to sum all the contributions at the same index, then use the nub
of the indices to amend the sums back into the array.
> From: Alex Rufon <[EMAIL PROTECTED]>
>
> Hi Chris/Oleg,
>
> I have the following questions for JDB:
> 1. Would it be possible to use JDB without creating the physical file
> structure? I.e. Folders and files.
This is an interesting and question which was discussed.
There are a few approaches,
Hello Henry;
Yes, they jump to conclusions, conclusions that are in this case wrong,
which you cannot tell by looking. A little test, no, the willingness to
do a little test, helps to avoid a lot of potholes.
A false intuition I found in some beginner APL classes I taught:
x =:2
y =: x+2
---Randy MacDonald wrote:
> I guess all that I can say is that rank coloring wouldn't solve any
> problems that $x doesn't. The existing syntax coloring
> already taxes my
> cognitive powers, as it has done since color came to APL+PC.
Yes $x will tell you the same information, but you would have
Hello Raul;
I don't see the coloration you describe as a problem, since 'example'
will not be an adverb until the line following the assignment.
Raul Miller wrote:
On Mon, Oct 6, 2008 at 4:11 PM, Sherlock, Ric <[EMAIL PROTECTED]> wrote:
As for "where does it end?", given that this would b
I wrote:
> The problem is that if your domain is unbounded (i.e. the input strings
> are arbitrary and there are no constraints on their content or length),
> and you need a 1:1 mapping, then your range is unbounded too.
> That is, the strings are as efficient a representation as you're goi
On Tue, Oct 7, 2008 at 4:35 PM, Randy MacDonald <[EMAIL PROTECTED]> wrote:
> I don't see the coloration you describe as a problem, since 'example' will
> not be an adverb until the line following the assignment.
If I divide your sentence into two parts, splitting on the comma, I would
agree with t
Hello Dan;
The obvious case you mention is fine enough, yet...
dd =: monad : '5!:5<''y'''
dd 1 2 3 4 5 6 7
1 2 3 4 5 6 7
dd 1 2 3 4 5 6 7 8 NC. it takes its time to switch over.
1+i.8
dd ,:1 2 NB. The result exceeds ":
1+i.1 2
Which just means test as you go, the criterion is far from
Hello Ric;
Actually, $x is such a part of my toolbox that there is no thinking to
use it. Those adverse to a little thought might want to go in another
direction. It is also something one doesn't have to wait on the whims
of the implementors for like syntax coloring would be.
Now if J's w
Hello Raul;
I see the following as an error:
example =: /
+example ...
I wonder how these lines would be colored?
example =: 2
example =: +
example =: /
I expect a flaw.
Raul Miller wrote:
On Tue, Oct 7, 2008 at 4:35 PM, Randy MacDonald <[EMAIL PROTECTED]> wrote:
I don't see the colorat
Randy,
I don't understand the comments:
>dd 1 2 3 4 5 6 7 8 NC. it takes its time to switch over.
> 1+i.8
> dd ,:1 2 NB. The result exceeds ":
> 1+i.1 2
or how they relate to your conclusion:
> Which just means test as you go, the criterion is far from
> simple.
-Dan
---
Thank you, Dan! I do browse through the vocabulary but apparently don't take
in the functionality until I need it! Key (/.) does the job nicely and I was
unaware of it.
Yes, I know Dyalog APL quite well, but haven't used it for two years since I
moved to J. Shouldn't ardent APLers be populating th
I wrote:
> I don't understand
Regarding your comment:
> dd ,:1 2 NB. The result exceeds ":
> 1+i.1 2
Ah, I see. You're saying (dd > ":) ,: 1 2 . Well, keep two things in mind:
(A) For large arguments, dd will either dramatically beat or tie with ":
. For small arguments, th
linrep=: 3 : '5!:5 <''y'''
linrep 99+i.5
99 100 101 102 103
linrep 99+i.6
99 100 101 102 103 104
linrep 99+i.7
99 100 101 102 103 104 105
linrep 99+i.8
99+i.8
http://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two
On Tue, 07 Oct 2008, Alex Rufon wrote:
> Yes ... exchange supports IMAP.
>
> On Tue, 2008-10-07 at 18:32 +0800, bill lam wrote:
> > On Tue, 07 Oct 2008, Alex Rufon wrote:
> > > I've taken the plunged and formatted my Lenovo T61 with Ubuntu 8.04 and
> > > installed WindowsXP on a virtual machine.
Hi Raul,
Thanks for the idea, particularly on the use of asserts. I've know of
them but for some reason never used them. I have an idea on where to put
them in my code. thanks.
One of my source of J optimization was Chapter 35 of J for C
Programmer ... specifically the topic Tips For Coding. Ther
Hello Dan;
dd 1 2
1 2
dd 1 2 3
1 2 3
dd 1 2 3 4
1 2 3 4
dd 1 2 3 4 5
1 2 3 4 5
dd 1 2 3 4 5 6
1 2 3 4 5 6
dd 1 2 3 4 5 6 7
1 2 3 4 5 6 7
dd 1 2 3 4 5 6 7 8 NB. J seems to wait for an 8 item list to kick in
the i.
1+i.8
My conclusion was that I didn't see what J was using to deci
Hello Dan;
The more comments you use to justify dd, the less attractive I find it.
Dan Bron wrote:
I wrote:
I don't understand
Regarding your comment:
dd ,:1 2 NB. The result exceeds ":
1+i.1 2
Ah, I see. You're saying (dd > ":) ,: 1 2 . Well, keep two things in
Hello Roger;
linrep=: 3 : '5!:5 <''y'''
linrep ,:99+i.5
99+i.1 5
linrep ,:99+i.6
99+i.1 6
linrep ,:99+i.4
99+i.1 7
linrep ,:99+i.4
99+i.1 4
linrep ,:99+i.3
99+i.1 3
linrep ,:99+i.1
99+i.1 2
linrep ,:99+i.1
,.99
Tables don't seem to wait for 7 items.. hmm.
Roger Hui wrote:
Of course my intent was not to challenge grep or the numerous searching
utilities at our disposal. As far as grep is concerned, even in this
trivial case I find J easier to use and gave up on grep after a few tests.
The intent of the note to the forum was simply to point out that if properly
used
Hi Dan,
Thanks for the reply.
On Tue, 2008-10-07 at 11:47 -0400, Dan Bron wrote:
> Alex Rufon wrote:
> > A few years back, I've asked this same forum on how to
> > convert strings to numbers and back again.
>
> I remember these discussions. Oleg suggested s2i =: 6 s: s: [1], and in a
>
Hi Bill,
I never knew there was something like this.
I'll look into it. Although I really prefer a J only solution since I am
thinking of using JDB on a linux server.
Still, thanks. :)
r/Alex
On Wed, 2008-10-08 at 08:30 +0800, bill lam wrote:
> On Tue, 07 Oct 2008, Alex Rufon wrote:
>
> > Yes
Robert, my impression was that Oleg was just adding to the point that you were
making - i.e. that not only is the C code only a bit faster than J, but you
also need check that it is portable across platforms and you have to compile
for each supported platform etc unlike J.
---Robert Cyr wro
Hi,
I guess another approach in designing the complete in-memory database is
on how I expect to use it.
So here is a scenario where I would use an in-memory database.
First off, I need to import data from multiple sources, MS-SQL, Oracle,
SAP, AS400 export text files, EDI files, Excel File, PDF
How about passing the result to a user-configurable J verb and then
showing the output of that as well as (or instead of) the original
result. Something like:
x =: option NB. 0 -> off, 1 -> as-well-as(default), 2 -> instead-of
y =: verb NB. J verb as string or gerund
x showinfo y NB. e.g.
38 matches
Mail list logo