Re: [Jprogramming] No package manager not working

2019-07-29 Thread Linda Alvord
Spacing problem is o the tablet. Linda Sent from my Verizon, Samsung Galaxy Tablet Original message From: Linda Alvord Date: 7/29/19 11:56 PM (GMT-05:00) To: programm...@jsoftware.com Subject: Re: [Jprogramming] No package manager not working i.5 6 0 1 2 3 4 5 6 7

Re: [Jprogramming] No package manager not working

2019-07-29 Thread Linda Alvord
i.5 6 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Linda spacing problem. copied from tablet. coo pked from tablet Sent from my Verizon, Samsung Galaxy Tablet Original message From: bill lam Date: 7/29/19 10:34 PM (GMT-05:00

Re: [Jprogramming] No package manager not working

2019-07-29 Thread bill lam
No, even android phone use intel atom/celeron cpu with recent architecture, they are crippled and will not run avx instructions. However your phone seems running with arm64-v8a cpu, so it can run asimd. Tue, 30 Jul 2019, Linda Alvord написал(а): > Can a phone handle AVX? > > > Linda > > > Sen

Re: [Jprogramming] No package manager not working

2019-07-29 Thread Linda Alvord
Can a phone handle AVX? Linda Sent from my Verizon, Samsung Galaxy smartphone Original message From: bill lam Date: 7/29/19 10:08 PM (GMT-05:00) To: programm...@jsoftware.com Subject: Re: [Jprogramming] No package manager not working I am not sure. May be Android had changed

Re: [Jprogramming] No package manager not working

2019-07-29 Thread bill lam
I am not sure. May be Android had changed media storage permission handling. The problem had also be reported for Android Q. I want to fix the https connection to pacman first when/if I have free time and then will build a new j901 beta jandroid. Tue, 30 Jul 2019, Linda Alvord написал(а): > >

[Jprogramming] No package manager not working

2019-07-29 Thread Linda Alvord
JVERSION Engine: j807/j64/android Release-d: commercial/2019-03-24T11:09:09 Library: 8.07.26 J Android: 1.2.06/28 Platform: Android 64 (arm64-v8a) Installer: unknown InstallPath: /storage/emulated/0/Android/data/com.jsoftware.j.android/files Contact: www.jsoftware.com Strange line feeds Linda

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Devon McCormick
Note that the very hard-to-fix Spectre exploit is named after the "Speculative execution" that we are talking about here. On Mon, Jul 29, 2019 at 2:14 PM Roger Hui wrote: > A relevant quote, the final sentence in *Notation as a Tool of Thought > *: > > Fi

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Roger Hui
A relevant quote, the final sentence in *Notation as a Tool of Thought *: Finally, overemphasis of efficiency leads to an unfortunate circularity in design: for reasons of efficiency early programming languages reflected the characteristics of the early com

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Linda Alvord
i.5 6 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Sent from my Verizon, Samsung Galaxy Tablet Original message From: Linda Alvord Date: 7/29/19 1:10 PM (GMT-05:00) To: programm...@jsoftware.com Subject: Re: [Jprogramming] A bit-t

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Linda Alvord
I sent two mangled messages earlier. Here's what I can explain. I installed J on a samsungtablet and it seemed to be working. However PASTE removes some spaces. Package Manager is unable to print the page correctly so it can't be used. JVERSION Engine: j807/j32/android Release-d: commercial/20

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Don Guinn
Yes. IBM's going ahead and executing both legs of the conditional branch has always bothered me too. But I guess math units were relatively cheap and it presented a novel way to speed up conditional branches. Shades of quantum computing. My comment about destroying a was that a was not copied, but

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Henry Rich
Yes, that's a problem.  You have to have some datasets that you consider typical.  I usually try on random, ascending/descending, and somewhat repeated data. In this case, where the performance depends on the instruction mix in user code, I just guess based on the J code I have written. Henr

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Henry Rich
Your instruction timings are right, but I question whether two branches would be better if the each input is zero, say, half the time randomly. a+b == (a>b?a:b) is a good trick! The fact that or doesn't fuse and cmp does is important.  It means that a+b == (a>b?a:b) takes only 4 microops, same

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Richard Donovan
MPA,B BZ STMT From: Programming on behalf of Henry Rich Sent: Monday, July 29, 2019 1:51:34 AM To: programm...@jsoftware.com Subject: [Jprogramming] A bit-twisting puzzle Many of the members of this Forum will remember the days of assemble

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Richard Donovan
Henry MP A,B Multiply & set CC BZ STMT STMT EQU * From: Programming on behalf of Roger Hui Sent: Monday, July 29, 2019 5:49:28 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] A bit-twisting puzzle If you have thought about

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Raul Miller
Which reminds me of an interesting question: How do you adequately benchmark this kind of optimization? Thanks, -- Raul On Mon, Jul 29, 2019 at 8:42 AM Henry Rich wrote: > > That's a good solution, same idea as Gilles's. As for OR destroying a > register, nowadays all registers are virtual a

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Marshall Lochbaum
Two instructions but one of them's slow. I found the test a+b == (a>b?a:b) on unsigned integers to be slightly faster in a loop with independent iterations and significantly faster when a loop dependency is introduced. However, a solution with two branches was usually faster than either. I loaded

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Henry Rich
That's a good solution, same idea as Gilles's.  As for OR destroying a register, nowadays all registers are virtual anyway. Intel machines have 150-odd registers in the execution unit IIRC, even though the programming model presents only 16 to the programmer.  Copying a register doesn't even ta

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Don Guinn
First. Since you referred to BXLE I assume you are talking IBM 370 or beyond architecture. Unfortunately, I don't know INTEL instructions, but your example implies that maybe you are thinking INTEL. I have a problem with your use of "or" as wouldn't that destroy the contents of a? And several peop

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Linda Alvord
Maybe the laptop message will look better than the one from the phone. ]c=:#:i.4 0 0 0 1 1 0 1 1 ]a=:0{"1 c 0 0 1 1 ]b=:1{"1 c 0 1 0 1 {:a*b 1 Linda -Original Message- From: Programming On Behalf Of Henry Rich Sent: Sunday, July 28, 2019 8:52 PM To: programm...@jsoft

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Henry Rich
I'm glad I posted this to the Forum, because I had been thinking in terms of standard C, and not about extensions. The best so far is Gilles's idea, assuming you can get to the entire product:    take a*b; if((high_product|low_product)==0)stmt; 2 instructions+1 branch.  Gonna be hard to beat

Re: [Jprogramming] Learning Tacit Programming

2019-07-29 Thread Raul Miller
1:`[`]} -- Raul On Saturday, July 27, 2019, Roger Hui wrote: > 13 : '(1) x}y' or 13 : '1 x}y' can not be made tacit because they use a > function argument (x) as an operand. Similarly 13 : '+/"y x' or 13 : '+/"x > y' can not be made tacit either. > > Why not, you might ask? The sequenc

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread 'lindaalvord' via Programming
Is this am answer? ]c=:#:i.40 00 11 01 1   ]a=:0{"1 c0 0 1 1   ]b=:1{"1 c      ]b=:1{"1 c0 1 0 1   {:a*b1   LindaSent from my Verizon, Samsung Galaxy smartphone Original message From: Henry Rich Date: 7/28/19 8:51 PM (GMT-05:00) To: programm...@jsoftware.com Subject: [Jprogr

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread 'lindaalvord' via Programming
Since I never spoke that language, would this answer your question? ]c=:#:i.40 00 11 01 1   ]a=:0{"1 c0 0 1 1   ]b=:1{"1 c      ]b=:1{"1 c0 1 0 1   {:a*b1    LindaSent from my Verizon, Samsung Galaxy smartphone Original message From: Henry Rich Date: 7/28/19 8:51 PM (GMT-05:00

Re: [Jprogramming] A bit-twisting puzzle

2019-07-29 Thread Henry Rich
Yes, POPCNT can be used this way.  It's not what I was thinking of, but you have solved the problem. (POPCNT(~a)|POPCNT(~b)) >> 6    (on 64-bit machines) works. (a*b)==0 fails because the product may overflow, leaving the lower part 0. Can you improve on your 6-instruction solution? Henry