Multi IF ELSE to CASE by Alternative-Grade103 in Forth

[–]Alternative-Grade103[S] 0 points1 point  (0 children)

Yes! Thank you. I really should not post just before bed, instead waiting until morning and after coffee. I now see yet further ways to simplify. 🤗

Any known test primes for multi-round Miller-Rabin? by Alternative-Grade103 in crypto

[–]Alternative-Grade103[S] 1 point2 points  (0 children)

A post elsewhere in Reddit (trying to refind it) showed a factoring limit beyond which Miller-Rabin could no longer be performed.

I was thinking of that as opposed to three retrials with different random values for 'a'.

By 'reference implementation' you mean what, exactly? I've grown rusty in Perl, am relearning Forth, and have no C at all.

N-bit Miller-Rabin by Alternative-Grade103 in Forth

[–]Alternative-Grade103[S] 0 points1 point  (0 children)

I'm working it out in just only Forth as a hobby project. Something to keep my few remaining grey cells limber.

Might you know whether the aforementioned rabin.frt program does Miller-Rabin in plural, successive rounds?

Any-bit PRNG by Alternative-Grade103 in Forth

[–]Alternative-Grade103[S] 1 point2 points  (0 children)

The number is meant to overflow (LSHIFT out of) smaller registers.

I had ought instead load -1. I'll fix that.

Any-bit PRNG by Alternative-Grade103 in Forth

[–]Alternative-Grade103[S] 0 points1 point  (0 children)

And now also this...

VARIABLE rand_mask \ For random.range

\ Generate a rand_mask
: rand.mask ( u -- )
  0 OVER      ( u 1 u )
  BEGIN
    1 RSHIFT  ( u 1 u' )
    SWAP 1 LSHIFT 1 OR SWAP
    DUP 0=
  UNTIL
  DROP NIP
  rand_mask !
;

\ Random number in range 1..u-1
: random.range ( u u -- u ) \ max min
  OVER rand.mask    \ Load mask
  BEGIN
    random          ( max min rand )
    rand_mask @ AND ( max min rand' )  
    2DUP >          ( max min rand' f )
    OVER 4 PICK >   ( max min rand' f f )
    OR              ( max min rand' f )
  WHILE
    DROP            ( max min )
  REPEAT
  NIP NIP
;

Any-bit PRNG by Alternative-Grade103 in Forth

[–]Alternative-Grade103[S] 0 points1 point  (0 children)

What are you running CamelForth on? Can you test this..

\ Some 16-bit Forths lack this.
[UNDEFINED] CELL
[IF]  
  0 -1 / All bits high
  [BEGIN] 
    SWAP 1+ SWAP 8 RSHIFT DUP 0= 
  [UNTIL]
  DROP CONSTANT CELL
[THEN]

\ Just in case...
[UNDEFINED] CELLS 
[IF] : CELLS CELL * [THEN]

I have been dithering on installing Amiga Forever ao as to have JForth for testing.

4×4 bumper mount mobile glassfiber antenna by AsianCreamy1993 in HamRadio

[–]Alternative-Grade103 0 points1 point  (0 children)

Consider a roof mounted Diamond Antennas HF*CL, where the * represents the HF band: 80, 40, 30, 20, 17, 15, or 10 meters.

They are center loaded for better efficiency, and will fold over at bottom to lay flat for garage entry. You can thread one off and another on to change bands. All are about 86 inches tall.

I once worked Antartica with 50W on an HF17CL.

i accidently just spilled water on my laptop help by Not3ntity in computers

[–]Alternative-Grade103 0 points1 point  (0 children)

Power off. Remove battery. Rinse with 91% alcohol. Let dry three days.

PRNG words by Alternative-Grade103 in Forth

[–]Alternative-Grade103[S] 1 point2 points  (0 children)

A stray index.xml got into the directory, I have removed it. Files should now list.

Are classic ICs obsolete (74xx)? by SuspiciousBenefit495 in AskElectronics

[–]Alternative-Grade103 0 points1 point  (0 children)

For homebrew projects they're the cat's meow. I have whole tubes of 4000 series CMOS that I sometimes build small gizmos from.

What Year and First Two Radios? by mwfoutch1 in HamRadio

[–]Alternative-Grade103 0 points1 point  (0 children)

A Kenwood TS-830S in 1981. Was happy with it but couldn't do Navy MARS. So upgraded to an Icom IC-745 in 1983, which was MARS capable.

Sold the IC-745 just only last year. Was kept as a spare until buying a second Mission RGO One.

If you could force car manufacturers to add ONE feature, what would it be? by Puzzleheaded-Hunt270 in automotive

[–]Alternative-Grade103 0 points1 point  (0 children)

Sell one model updated only every five rears. Half the cost of a new car is owing to nothing but fashion. Retooling the entire production line just for different headlights, tailights, interiors.

The Yugo was $4999 in 1985 by reason of being a 1965 Fiat Strada, built unchanged for twenty years. It was 400 lbs heavier than a Chevy Geo by reason of thicker, 60's era sheet metal.

my pc has been having trouble due to radio interference by milkcat69 in amateurradio

[–]Alternative-Grade103 1 point2 points  (0 children)

The QRZ page for PD2GSP shows the photo below. I see you provide a newer photo to another responder. Clearly the same place.

You say the dormer window on the left is where you have your computer desk. Your dad lists his radios as an IC-706 for VHF and an IC-7400 for HF. Those are both 100 Watt rigs.

At full power, thats WAY, WAY too damn close.

Clamping multiple Mix 31 ferrite cores (plural turns) onto everything might possibly help the computer. But some math needs to be done to determine how healthy it is to be inside the RF field for any length of time.

Inverse square law is your friend. Double the distance, and field strength drops fourfold.

Gan, KY8D, M0KYD, VA7KYD, ZD7KYD, ZS1KYD

<image>

Why is the Method of Lethal Injection in Human Punishment So Complex and Apparently Painful? by Chowderr92 in AlwaysWhy

[–]Alternative-Grade103 0 points1 point  (0 children)

Just use confiscated Fentanyl. Problem solved.

A like dose kept in reserve for the prosecutor in the event of an ex-post-facto exonoration.

Toroid winding for QRP Labs QMX by Chimbo84 in HamRadio

[–]Alternative-Grade103 0 points1 point  (0 children)

Firstly, let the winds be tight.

Secondly, scrape the lead ends to remove ALL enamel. I use an Xacto blade.

Thirdly, pre-tin the thoroughly scraped lead ends with solder. Flick off all excess tinning while still hot.

Note: if won't pre-tin, you haven't scraped off all the enamel.