Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Nimp O
I understand now I was just defining a verb and applying it twice in the first case. Thanks everyone. From: Programming on behalf of Louis de Forcrand Sent: Wednesday, November 20, 2019 9:52 PM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Explicit

Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Henry Rich
Think nothing of it.  I was back in the highschool today, talking linear algebra to the very top layer of the high-performing students, having them write proofs on the board. It is obvious that the distinction between "its" and "it's" is not observed in practice, even among these kids who are t

Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Louis de Forcrand
Just to correct a mistake that I always hate making: "... for use after _its_ application ..." Sorry for the noise, Louis > On 21 Nov 2019, at 03:49, Louis de Forcrand wrote: > > (a,a=.?@#) is a verb, namely (?@# , ?@#). In this expression a is set to the > _verb_ ?@# and then train (a,a) is

Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Louis de Forcrand
(a,a=.?@#) is a verb, namely (?@# , ?@#). In this expression a is set to the _verb_ ?@# and then train (a,a) is evaluated. In the second case a is set to the _result_ of ?@# and then (a,a) is evaluated. To do this tacitly: (] , ]) @ (?@#) or more concisely ,~@?@# or equivalently (how I would

Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Henry Rich
Re your first question:    (a,a=.?@#) a , ?@#    a ?@# You have created a fork.  a is equal to a, but it contains ?, and ?y is not equal to ?y. Henry Rich On 11/20/2019 9:29 PM, bill lam wrote: But it gives trash instead of raising a domain error. Wed, 20 Nov 2019, Henry Rich написал(а):

Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Henry Rich
It's not trash.  It follows the parsing rules. Henry Rich On 11/20/2019 9:29 PM, bill lam wrote: But it gives trash instead of raising a domain error. Wed, 20 Nov 2019, Henry Rich написал(а): Tacit verbs are functional.  No assignments of results are allowed. Henry Rich On 11/20/2019 9:26 P

Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread bill lam
But it gives trash instead of raising a domain error. Wed, 20 Nov 2019, Henry Rich написал(а): > Tacit verbs are functional.  No assignments of results are allowed. > > Henry Rich > > On 11/20/2019 9:26 PM, Nimp O wrote: > > Hello, simple question. > > > > This behaviour surprised me. > > > >

Re: [Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Henry Rich
Tacit verbs are functional.  No assignments of results are allowed. Henry Rich On 11/20/2019 9:26 PM, Nimp O wrote: Hello, simple question. This behaviour surprised me. (a,a=.?@#)'01234' 2 4 3 : 'a,a=.?@#y' '01234' 1 1 Why a is not equal to a in the first case? How can I save the ro

[Jprogramming] Explicit vs tacit with assignment

2019-11-20 Thread Nimp O
Hello, simple question. This behaviour surprised me. (a,a=.?@#)'01234' 2 4 3 : 'a,a=.?@#y' '01234' 1 1 Why a is not equal to a in the first case? How can I save the roll as an intermediate result in the tacit version? Thanks. --

Re: [Jprogramming] Adding constants to intervals

2019-11-20 Thread Henry Rich
Use (+ i.)&.> > on unboxed values is like ]"0 If you are trying to create selectors for an array use ];.0 Henry Rich On 11/20/2019 7:35 PM, Jimmy Gauvin wrote: Hi, I have intervals of varying length and I want to add a different constant to each of them. Is there a better way than the follo

[Jprogramming] Adding constants to intervals

2019-11-20 Thread Jimmy Gauvin
Hi, I have intervals of varying length and I want to add a different constant to each of them. Is there a better way than the following to achieve this : (<"0 , 10 20 30) +&.> <@i."0 (3 2 4) ┌┬─┬───┐ │10 11 12│20 21│30 31 32 33│ └┴─┴───┘ Thanks --

Re: [Jprogramming] A bug in fill?

2019-11-20 Thread Henry Rich
You need to upgrade your beta.  (Not for this problem, which has been around for years.  We just need testing on all the new changes). Fixed for next release. Henry Rich On 11/20/2019 12:42 PM, 'Pascal Jasmin' via Programming wrote:   (,2),!._ i.0 2 4611686018427387904 9218868437227405312

Re: [Jprogramming] spline - fix

2019-11-20 Thread chris burke
Thanks, I made the change. Chris On Wed, Nov 20, 2019 at 11:15 AM Mario C wrote: > I think there is a mistake in verb cubicspline (spline addon) for intervals > different than 1.0. > > If you try an interval of 0.1: > > load 'math/misc/spline plot numeric' > x=. 1.1 1.2 1.3 1.4 1.5 > y=. 351.6

[Jprogramming] spline - fix

2019-11-20 Thread Mario C
I think there is a mistake in verb cubicspline (spline addon) for intervals different than 1.0. If you try an interval of 0.1: load 'math/misc/spline plot numeric' x=. 1.1 1.2 1.3 1.4 1.5 y=. 351.6 351.6 354.6 371.0 387.7 csp=. cubicspline x,:y plot csp interspline range 1.1 1.5 0.02 you see the

Re: [Jprogramming] dictionary design

2019-11-20 Thread Raul Miller
A table in a column oriented database system has one key for each column. If keys on each row/record are actually unique, then you don't have a table, you have a collection of unrelated rows (though, in practice, you might synthesize something that behaves like a table by repeating the same keys i

[Jprogramming] A bug in fill?

2019-11-20 Thread 'Pascal Jasmin' via Programming
  (,2),!._ i.0 2 4611686018427387904 9218868437227405312 (,2), i.0 2 2 0 (,2),!.0 i.0 2 2 0 JVERSION Engine: j901/j64avx2/windows Beta-k: commercial/2019-09-16T17:16:41 Library: 9.01.09 Qt IDE: 1.8.3/5.12.3 Platform: Win 64

Re: [Jprogramming] dictionary design

2019-11-20 Thread 'Pascal Jasmin' via Programming
A column oriented database system or table such as in jd has each field stored as a list, and independently of each other. A common conceptualization of a database table is a 2d structure with fields and records.  Keys on a table (or dictionary) are unique to each record/row A dictionary is just

Re: [Jprogramming] J and data structures

2019-11-20 Thread Raul Miller
On Tue, Nov 19, 2019 at 8:00 PM 'Rob Hodgkinson' via Programming wrote: > The overhead associated with the multi key indexing you describe > below is impractical for low latency matching, and avoided by > managing a free space list for bucket re-use. Why do you say that? (How big of a dataset doe

Re: [Jprogramming] dictionary design

2019-11-20 Thread Raul Miller
This might be better on the chat forum, but: (1) "table" -- we've got lots of existing uses of that term. For example: https://www.jsoftware.com/help/dictionary/samp07.htm Specifying a table as "just a dictionary with ..." could conflict with those uses (existing tables have rank and shape. But

[Jprogramming] dictionary design

2019-11-20 Thread 'Pascal Jasmin' via Programming
Here are the goals I have for a dictionary class. A table is just a dictionary with (potentially multiple) key(s) and multiple values.  A dictionary is a table with just one key and 1 value. Underlying storage should be at the most performant data type:  If all keys or value (columns) are of the