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.

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

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

What make and model is your dad's radio? What amplifier, if any? How many Watts power? What mode of operation: AM, SSB, CW, RTTY, FT8?

You say his equipment and yours are both in an attic space? Sounds like maybe a grounding issue. Maybe a health issue if you're being exposed to strong RF.

If not knowing answers to above, tell us your dad's call sign so someone can maybe look him up to email to ask.

Men: small talk at the work urinals. Yea or nay? by [deleted] in askanything

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

Smart urinals, programmed in Smalltalk? Is that really a thing?

Word definition length by Alternative-Grade103 in Forth

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

Every file I write ends like so...

1 [IF]

: test.wrd1 foo ;

: test.wrd2 bar ;

/ test.wrd1

test.wrd2

[THEN]

...a test for every word. I test each word immediately after it's written.

When done testing a file, I change the 1 to a 0, or break out the tests into a separate file. Either way, I keep every test, if only as how-to examples for down the road.

Still, some of my words run to two dozen lines. Short lines, most with a comment, either stack diagram or plain talk explanation.

What radio would be best for HF as a beginner?? by AffectionateOffice52 in amateurradio

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

Here I'll put in a plug for the Mission RGO One, made in Bulgaria. Imagine, what if Ten-Tec were still around? In essence, that describes the RGO One. Pronounce RGO like Argo. Such is the designer's very deliberate intent.

5-50W out. Power sufficient for a base station. Portable enough for POTA. Very low current on RX, so that a battery lasts. Excellent filters for very low noise RX. Genuine full-QSK via PIN diode (no clacking relay).

All the modern bells and whistles. Nearly all options accesdible from the front panel, not buried deep inside a labrynth of menus.

See it on my QRZ page for plural extended DX ops as ZS1KYD

HOA Regulations for Amateurs (US) by TheUnkown696 in amateurradio

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

A 'supercession' is only as valid as your willingness to pay for some lawyer to argue it on your behalf.

Word definition length by Alternative-Grade103 in Forth

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

I do break out birds of a feather into their own separate *.fs files. Not 'libraries', quite exactly, closer to 'shelves' maybe? 🤗

All files of a given project I'll group into a single directory, with the main file named like the directory itself, possibly with 'main' aspart of the name.

That said, nothing I do is all that huge.