Prime words: Difference between revisions

Added Uiua solution
imported>Chinhouse
(Added Uiua solution)
 
(One intermediate revision by one other user not shown)
Line 1,690:
meg
q
</pre>
 
=={{header|Uiua}}==
{{works with|Uiua|0.11.0-dev.1}}
<syntaxhighlight lang="Uiua">
⊜□ ≠@\n. &fras "unixdict.txt"
Ps ← ⇌◌⍢(▽≠0◿⊢..⟜(⊂⊢)|>0⧻.):[]+2⇡256 # Build primes
Pc ← ▽:⟜(∊-@\0)⊂¯.+@a⇡26Ps # Test A-Za-z for primal ASCII codes
▽:⟜(≡(/×◇∊)⊙¤):Pc
</syntaxhighlight>
{{out}}
<pre>
{"a" "aaa" "age" "agee" "ak" "am" "ama" "e" "egg" "eke" "em" "emma" "g" "ga" "gag" "gage" "gam" "game" "gamma" "ge" "gee" "gem" "gemma" "gm" "k" "keg" "m" "ma" "mae" "magma" "make" "mamma" "me" "meek" "meg" "q"}
</pre>
 
Line 1,695 ⟶ 1,708:
{{libheader|Wren-math}}
{{libheader|Wren-iterate}}
<syntaxhighlight lang="ecmascriptwren">import "io" for File
import "./math" for Int
import "./iterate" for Stepped
 
// cache prime characters with codepoints between 33 and 255 say
67

edits