Thursday, September 10, 2015

Algol68 code samples, view on-line...

View... and then run on-line...

Maybe you want to hack your first "Hello, world!" program and run it on-line right NOW:
To see how easy Concurrent computing is, paste this specimen:
  PAR(
    print("Enjoy "),
    print("Rosetta "),
    print("Code ")
  )

See also: Have you ever wanted to test drive Algol68?... are ANY of the rumours true?

The Algol68 code specimen samples:

9

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

Y

Z

Wednesday, September 9, 2015

Facebook hates Pythagoras: a²+b²=c²

And Wikipedia love/hates "a2+b2=c2" even more! = ☹

Are you a FaceBook user? And have you EVER tried to cut-and-past the Pythagorean-theorem of "a²+b²=c²?" [ I do it EVERY day :-^) ] ... But found your resulting paste gives the grotesque result of "a2+b2=c2?" ...

Now try to cut-and-paste this Facebook/Wikipedia version: "a2+b2=c2?"

Don't believe me? ... then try to cut and paste from either: Facebook: Pythagorean-theorem or Wikipedia: Pythagorean-theorem - Proof by rearrangement.

¢ Kind of typical of the 21ˢᵗ century... after 2½ thousand years of civilisation one cannot simply cut and paste Pythagoras's theorem of a²+b²=c² from wikipedia and share it with a friend on FaceBook! ☹ ¢

Fortunately WolframAlpha has no such problem, eg. click on: a²+b²=c²

Here is a useful table you from where you CAN cut-and-paste ˢᵘᵖᵉʳˢᶜʳᶦᵖᵗˢ and ₛᵤbₛcᵣᵢₚₜ... ¢ oops... Note the b & c, maybe we need to wait until the 22ⁿᵈ century for the entire alphabet to be in all browsers? ¢

Superscript and subscripts cut-and-paste
  0 1 2 3 4 5 6 7 8 9 A B C D E F
U+00Bx                          
U+207x x⁰ xⁱ     x⁴ x⁵ x⁶ x⁷ x⁸ x⁹ x⁺ x⁻ x⁼ x⁽ x⁾ xⁿ
U+208x x₀ x₁ x₂ x₃ x₄ x₅ x₆ x₇ x₈ x₉ x₊ x₋ x₌ x₍ x₎  
U+209x xₐ xₑ xₒ xₓ xₔ xₕ xₖ xₗ xₘ xₙ xₚ xₛ xₜ      

Ironically Wikipedia does detail how to achieve the alphabet in either ₛᵤbₛcᵣᵢₚₜ and ˢᵘᵖᵉʳˢᶜʳᶦᵖᵗˢ... Wikipedia: Unicode subscripts and superscripts.

But you can simply use this page: piliapp.com to: c̶r̶o̶s̶s̶ ̶o̶u̶t̶ ̶m̶i̶s̶t̶a̶k̶e̶s̶ or u͟n͟d͟e͟r͟l͟i͟n͟e͟ ͟i͟m͟p͟o͟r͟t͟a͟n͟t͟ ͟s͟t͟u͟f͟f AND THEN cut and paste it to share on FaceBook. Or use tiny-text to generate ˢᵘᵖᵉʳˢᶜʳᶦᵖᵗˢ.

And for even more find try: ₛᵤbₛcᵣᵢₚₜ @ panix.com

For the technically minded, here is a table of as many of the SI units that I could find, all ready for your cut-and-paste. ¢ Enjoy ¢

Wikipedia: SI Base Units

Named base SI base units.
Name Symbol Unicode Codepoint Quantity Typical Symbol for Variables
metre m

length l (lowercase L)
kilogram kg U+338F mass m
second s

time t
ampere A

electric current I (capital i)
kelvin K

thermodynamic temperature T
candela cd U+33C5 luminous intensity Iv (capital i with lowercase non-italicized v subscript)
mole mol U+33D6 amount of substance n

Wikipedia: Derived Units

Named units derived from SI base units

Symbol Unicode Expression in terms of other units Expression in terms of SI base units Quantity
hertz Hz ¹⁄s s⁻¹ frequency
radian rad m⁄m dimensionless angle
steradian sr ㎡⁄㎡ dimensionless solid angle
newton N
㎏⋅m⁄s² or ㎏⋅㎨ force, weight
pascal Pa N⁄㎡ ㎏⁄m⁄s² pressure, stress
joule J
N⋅m = C⋅V = W⋅s ㎏⋅㎡⁄s² energy, work, heat
watt W
J⁄s = V⋅A ㎏⋅㎡⁄s³ power, radiant flux
coulomb C
s⋅A s⋅A electric charge or quantity of electricity
volt V
W⁄A = J⁄C ㎏⋅㎡⁄s³⁄A voltage, electrical potential difference, electromotive force
farad F
C⁄V s⁴⋅A²⁄㎏⁄㎡ electric capacitance
ohm Ω
V⁄A ㎏⋅㎡⁄s³⁄A² electric resistance, impedance, reactance
siemens S
℧ = A⁄V s³⋅A²⁄㎏⁄㎡ electrical conductance
weber Wb J⁄A ㎏⋅㎡⁄s²⁄A magnetic flux
tesla T
V⋅s⁄㎡ = ㏝⁄㎡ = N⁄A⁄m ㎏⁄s²⁄A
magnetic field strength, magnetic flux density
henry H
V⋅s⁄A = ㏝⁄A ㎏⋅㎡⁄s²⁄A² inductance
deg Celsius °C K K temperature relative to 273.15 K
lumen lm ㏅⋅㏛ luminous flux
lux lx ㏐⁄㎡ ㏅⁄㎡ illuminance
becquerel Bq ¹⁄s s⁻¹ radioactivity (decays per unit time)
gray Gy J⁄㎏ ㎡⁄s² absorbed dose (of ionizing radiation)
sievert Sv J⁄㎏ ㎡⁄s² equivalent dose (of ionizing radiation)
katal kat
㏖⁄s ㏖⁄s catalytic activity

Wikipedia: The Metric Prefix

Unicode characters of SI derived units and other related non SI units.
Scale femto pico nano micro milli centi deci
hecto kilo Mega Giga Tera Other
Dimensionless

, ㏙, ㏗
Distance



㎞, ㏎
㍳, ㍶, ㏕, ㏌
Area


Volume
㎣, ㎖ ㎤,㏄ ㍹, ㎗ ㎥, ℓ
㎦, ㎘
Mass





㍲, ㍺, 🝲, 🝳, ℥
Pressure


, ㍴
Time

㏂, ㏘, 🝮, 🝱
Frequency


Potential





㍵, ㏞, ㋎
Current





Impedance related





Power





㏋, ㏈
Heat and Energy


, ℉, ㋍
Speed, acceleration and miscellaneous ㎧, ㎨, ㏏,㏚, ㏍
Radio Activity and light , , , , , ㎮, ㎯, , , , ㏆
Note: Struck through units are Unicode SI units already appearing in the first two tables.