Repository navigation
v0.3.0
Language
Address<M>says what its service takes: a message of any other type is a compile error where it is sent, and the answer is anM.spawnreadsMoff its handler, and a handler's third parameter is anAddress<M>of its own mailbox type.attakes its type from where it land, or from the first later use that says it —x := at(#Name)thenx(Op.Ping())— and keep it.monitor's notice is one of the watcher's messages.Secret<T>keeps any plain value:hide(T)andbypass(T)make one, andrevealanswers theTback.- An
Intwraps round pastMAXandMIN, as the machine's arithmetic does, where it stopped at the edge. - A counting loop proves its counter only where it cannot wrap: starting at a non-negative literal, stepping by one, and held below something by a
<. - Sized numbers:
UInt1…UInt64,Int1…Int63andFloat32, each kept in the smallest Go type that holds it and wrapping at its own width;Int64andFloat64areIntandFloat. - Every number conversion is written:
Int(b),Float(f),UInt4(x), orUInt4.checked(x)for aResult; two integers of any sizes still compare. - A sized index proves itself against a vector its type cannot outrun, and an unsigned one is never negative.
- A vector of sized integers is packed where Go has no integer that wide: a
UInt4[dyn]keeps each value in four bits. - One call never lends a vector and a path inside it:
both(v, v[0])with both parametersmutis a compile error, where the write throughv[0]could be lost. - Only a keyword's lower-case spelling is reserved:
Proc,QueryandproCare names like any other. - Bitwise operators:
&,|,^,~,<<and>>, with&=|=^=<<=>>=; a shift counts by an unsigned number or a literal, and two different ones need parentheses. - The pipe is
|>, which leaves|to bitwise or. - Binary patterns:
<<version: UInt4, length: UInt16, body: UInt8[length], ...rest>>matches bytes, aStror an integer field by field, and the same<<...>>builds bytes. 0xFF,0b1010and1_000; a hexadecimal literal pastInt's largest is aUInt64.v[h & 255]proves itself against a vector of 256 or more.
Standard library
- A library error is a union of what went wrong:
FileError,WsError,SocketError,NetError,SqlError,CryptoError,SyslinkErrorandSecretErrorhave a variant per failure, matched and covered like any other union. - An error comes with the module that answers with it, whether or not the program names its type.
hive.conv.itf32, andhive.mathanswers aFloat32when handed only those.hive.timecounts milliseconds:now(),dateFrom,dateTimeFromandformatall speak Unix milliseconds.hive.conv.bytesOfandfromBytescross between aStrand its bytes.
Breaking
| was | is |
|---|---|
Address |
Address<M>, with M the service's message type |
why.reason == "NotFound" |
why is file.FileError.NotFound |
SqlError reason "Query" |
SqlError.Statement |
Secret |
Secret<Str>, and the library's secrets with it |
hide(text: s), bypass(text: s) |
hide(value: s), bypass(value: s) |
Int overflow stopping at MAX or MIN |
it wraps round to the other |
for i := 0; i < n; i += 2 { echo v[i] } |
a guard: if v bounds i |
both(v, v[0]), both mut |
lend v alone and reach v[0] through it |
x | f, the pipe |
x |> f |
hive.time.now() in seconds |
in milliseconds — hive.time.now() / 1000 for seconds, as a JWT exp wants |
To bootstrap from this release, seed/pinned.txt becomes:
tag: v0.3.0
asset: hivec-linux-amd64
sha256: 40f4a6e9b9b7f9369c811880819fcc8b16d793799d055ecffa0dbbec4efd79f3