[spam] Language learning: Julia
Karl Semich
0xloem at gmail.com
Sun Apr 24 01:03:18 PDT 2022
https://docs.julialang.org/en/v1/
Notes
Chapter 1: getting started
- install and run
Chapter 2: variables
for T in [Int8,Int16,Int32,Int64,Int128,UInt8,UInt16,UInt32,UInt64,UInt128]
println("$(lpad(T,7)): [$(typemin(T)),$(typemax(T))]")
end
lpad() appears to be a built-in function that extends a string with spaces
on the left
typemin() and typemax() return the extreme-most values for a type
types appear to be values, which is great
multiplication by prefixing a variable with an expression:
julia> x = 3
3
julia> 2x^2 - 3x + 1
10
further types: Float16, Float32, Float64, BigInt, BigFloat
further functions:
eps(): smallest representable delta for a type at 1.0
nextfloat(), prevfloat(): adjacent floats
bitstring(): shows raw bits
zero(), one(): return identity literals of passed type
big"1.3": arbitrary-precision literals
parse(T, str): number parsing
setprecision(digits): change BigFloat precision
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/html
Size: 1851 bytes
Desc: not available
URL: <https://lists.cpunks.org/pipermail/cypherpunks/attachments/20220424/3736fe66/attachment.txt>
More information about the cypherpunks
mailing list