Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Don Kelly
Did anyone try these? +/2*1+i.21 462 +/2*i.22 462 Don Kelly On 2017-08-29 6:17 AM, Murray Eisenberg wrote: The sum in question is twice the sum of the integers from 1 to 21. By the well-known formula (sometimes attributed to Gauss), the latter sum is half the product of 21 and 21 + 1,

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Ric Sherlock
Hi Harvey, I haven't used it but the 'debug/tte' addon available in Package Manager has the following description: Addon: tte is an adverb to "explicate" a given tacitly-defined verb by generating an explanatory explicit definition from the given tacit definition. The result is a working verb which

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread PR PackRat
On 8/29/17, Roger Hui wrote: > The version I heard was that the math teacher wanted to have a rest, so > assigned +/1+i.100 to the class. Gauss got the answer right away. The rest > of the class labored for the entire hour. The only correct answer was > submitted by Gauss. Roger's version of the

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Skip Cave
Project Euler problems typically assume the use of a computer. Thus the problems are often posed in a way that makes brute-force computer solutions impractical, even when using fairly powerful machines. This forces Project Euler problem-solvers to seek algorithmic approaches that avoid large amount

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Roger Hui
The version I heard was that the math teacher wanted to have a rest, so assigned +/1+i.100 to the class. Gauss got the answer right away. The rest of the class labored for the entire hour. The only correct answer was submitted by Gauss. On Aug 29, 2017 3:28 PM, "'Mike Day' via Programming" < prog

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread HenryRich
You meant    21 ^!.1 (2) Henry Rich On 8/29/2017 12:36 PM, Roger Hui wrote: Oops, off by a factor of 2. On Aug 29, 2017 13:34, "Roger Hui" wrote: 2!>:21 On Aug 29, 2017 10:17, "Murray Eisenberg" wrote: The sum in question is twice the sum of the integers from 1 to 21. By the well-kno

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread 'Mike Day' via Programming
At the risk of getting too chatty,  I'd point out that in the majority of Project Euler problems*,  while you can (sometimes) explore the foothills of the challenge, including example solutions provided,  with a brute-force approach, it is generally necessary to find ways to avoid requiring too

Re: [Jprogramming] j806 beta-5

2017-08-29 Thread Joey K Tuttle
Update on my late night confusion. With a clearer mind, I noticed today that 3 J icons had shown up on my OS X 10.12.6 desktop jqt806.app, jhs806.app, and jc806.app - I don't know why they landed on my desktop in the course of installing, but I put them into /Applications/J64-806 (along side t

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Roger Hui
Oops, off by a factor of 2. On Aug 29, 2017 13:34, "Roger Hui" wrote: > 2!>:21 > > > > On Aug 29, 2017 10:17, "Murray Eisenberg" wrote: > >> The sum in question is twice the sum of the integers from 1 to 21. By the >> well-known formula (sometimes attributed to Gauss), the latter sum is half >>

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Roger Hui
2!>:21 On Aug 29, 2017 10:17, "Murray Eisenberg" wrote: > The sum in question is twice the sum of the integers from 1 to 21. By the > well-known formula (sometimes attributed to Gauss), the latter sum is half > the product of 21 and 21 + 1, so the sum in question is > > */21+i. 2 > 462 > >

Re: [Jprogramming] j806 beta-5

2017-08-29 Thread Joey K Tuttle
Eric, I don't have a problem with not being able to run the beta on my older machines - but I'm looking forward to a non-avx Linux version with the improved performance. Thanks for all the effort that is going into this. - joey > On 2017Aug 29, at 05:33, Eric Iverson wrote: > > 806 linux64

Re: [Jprogramming] j806 beta-5 [avx?]

2017-08-29 Thread Murray Eisenberg
For the Mac version, did anything change in the latest berta-5 except lib.dylib (which is what, I presume, corresponds to lib.so)? > On28 Aug 2017 16:30:46 -0400,Eric Iverson > wrote: > > Mon, 28 Aug 2017 16:30:46 -0400 > From: > To: Programming forum

[Jprogramming] Another Quora Problem

2017-08-29 Thread Murray Eisenberg
The sum in question is twice the sum of the integers from 1 to 21. By the well-known formula (sometimes attributed to Gauss), the latter sum is half the product of 21 and 21 + 1, so the sum in question is */21+i. 2 462 > On28 Aug 2017 12:02:57 -0500,S kip Cave

Re: [Jprogramming] j806 beta-5

2017-08-29 Thread Eric Iverson
806 linux64 beta: It is possible that we will have to provide 2 installer packages for linux64. One with the non-avx binary and one with the avx binary. Given that most users will probably be OK with the avx binary it seems unnecessary to burden them with an additional non-avx binary and instructi

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Rob Hodgkinson
Further to Louis’ comment Skip, I think you might be confusing how the parens ( ) affect the “verb train”. A simple example: x=:3 5 8 12 +/ % # x 0.25 NB. The above line without parens is just +/ (sum) of the % (reciprocal) of the # (tally) of x … so reduces as follows +/ % 4 +/

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Louis de Forcrand
Stick a pair of parens around the hook, otherwise it executes like any explicit sentence! Louis > On 29 Aug 2017, at 11:33, Skip Cave wrote: > > Louis: > > This works: > > +/(#~[:-.2&|)i.43 > > 462 > > > This doesn't: > > +/#~ -.@:(2&|)i.43 > > 22 > > Skip Cave > Cave Consultin

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Skip Cave
Louis: This works: +/(#~[:-.2&|)i.43 462 This doesn't: +/#~ -.@:(2&|)i.43 22 Skip Cave Cave Consulting LLC On Tue, Aug 29, 2017 at 4:17 AM, Louis de Forcrand wrote: > Also count the verbs in > > #~ -. 2&| > > With three verbs this evaluates to a fork, so > > (#~ -. 2&|) v > (#~

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Louis de Forcrand
Also count the verbs in #~ -. 2&| With three verbs this evaluates to a fork, so (#~ -. 2&|) v (#~v) -. 2&|v which signals a length error because #~ changes the shape of its argument. What you want is to apply -. mondadically to 2&|, not apply it between #~ and 2&|; to do so use a cap [: like

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Raul Miller
You should be using #~ instead of # If you look at your intermediate result without the +/ you will see why. Thanks, -- Raul On Tue, Aug 29, 2017 at 4:04 AM, Skip Cave wrote: > There seems to be two basic approaches to this problem: > > 1. Generate the even numbers between 1 & 42, and add th

Re: [Jprogramming] Another Quora Problem

2017-08-29 Thread Skip Cave
There seems to be two basic approaches to this problem: 1. Generate the even numbers between 1 & 42, and add them up. 2. Use the formula for the sum of an arithmetic progression - e.g.: Sum=n(a+b)/2 *n* = number of numbers in the sequence (here 21) *a* = the first number in the sequence (here 2)

Re: [Jprogramming] j806 beta-5

2017-08-29 Thread Joey K Tuttle
OK, I have downloaded the updated Linux j806 Beta-5 and now it doesn't run (gets Illegal instruction on starting jconsole ). I believe that Bill Lam meant to say "Your cpu does [NOT] support avx and supposed to be incapable of running j806 binary." and that would seem to be the case now. On the