Thanks to visit codestin.com
Credit goes to github.com

Skip to content

crazymonkyyy/usv

Repository files navigation

pure ai slop

base line project for "spec-driven" ai dev, included allot of yelling at ai to listen to the specs, trying and probaly failing at catching it deleting unit tests

no code was written besides function headers

USV - Unicode Separated Values Parser for D

A D implementation of Unicode Separated Values (USV) parser following the official IETF specification.

Overview

Unicode Separated Values (USV) uses Unicode separator characters to structure data:

  • Unit Separator: U+001F (␟)
  • Record Separator: U+001E (␞)
  • Group Separator: U+001D (␝)
  • File Separator: U+001C (␜)
  • End of Transmission: U+0004 (␄) - supported as stop marker only

Build

This project does NOT use DUB (per NO DUB directive). Build manually with:

dmd usv.d  # Compile the library

Usage

Basic Example

import usv;

// Write USV data
int[] data = [1, 2, 3];
writeusv(data, "output.usv");  // Write to file

// Read USV data
int[] readData = readusv!(int[])(data, "output.usv");  // Read from file

API Functions

  • writeusv(T, int N=-1,alias TO=void)(T data, string file): Write data to USV file
  • T readusv(T, int N=-1,alias TO=void)(string file): Read USV file to data

Template Utilities

  • isvoid(alias A): Check if type is void
  • dim(T): Determine dimension of a type
  • isnotstructure(A): Check if type is not a structure

Project Directives

This project follows these core principles:

  • NO DUB: No DUB build system - simple manual compilation
  • KISS (Keep It Simple Stupid): Simple, straightforward implementations
  • OBEY MY API: Strict adherence to defined interfaces

Specification

Based on the official IETF draft specification for Unicode Separated Values.

Testing

Run the unit tests with:

dmd -unittest -main -run src/usv.d

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published