Number to ByteVector conversion #43

Closed
opened 2025-08-14 10:40:24 -07:00 by affine · 1 comment
Owner

An instruction should be added to facilitate converting a number into a bytevector.

An instruction should be added to facilitate converting a number into a bytevector.
affine added this to the HyphaeVM Roadmap project 2025-08-14 10:40:24 -07:00
Collaborator

Notes

This should work similar to ctos (char to string) and cton (char to number) in HyphaeVM code

  1. Get the inexact form of a number (example: 2/3 to 0.6 repeating)
  2. Cast that segment of memory into individual bytes
  3. Individual bytes are to be passed around in the VM as a ByteVector Datum

Requires mutable access to input address

> Notes This should work similar to [ctos](https://hephaestus.sunnypup.io/affine/Mycelium/src/branch/main/hyphae/vm.toml#L622) (char to string) and [cton](https://hephaestus.sunnypup.io/affine/Mycelium/src/branch/main/hyphae/vm.toml#L633) (char to number) in HyphaeVM code 1. Get the inexact form of a number (example: 2/3 to 0.6 repeating) 1. Cast that segment of memory into individual bytes 1. Individual bytes are to be passed around in the VM as a ByteVector Datum Requires mutable access to input address
Kolby was assigned by affine 2025-12-04 12:12:06 -08:00
Sign in to join this conversation.
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: affine/Mycelium#43
No description provided.