On this page:
1.0
top
← prev up

Package SconeπŸ”— i

Simon Johnston <johnstonskj@gmail.com>

SCONE - SCheme Object Notation (Economized) is a simple file format that is a strict subset of the Scheme language and is intended to be parsed directly by the Scheme reader. The intent is to be a Scheme-friendly replacement for file types such as CSV or JSON where simple tabular data is stored or exchanged.

This package provides the core data types as well as read and write capabilities and simple query over the in-memory representation.

Example

> (define names-list(read-table-from-file"./tests/names-list.scone"))
> (describenames-list)

CREATE EXTERNAL TABLE unnamed_1 (

code_point number,

name string,

syntax symbol,

decomposition LISTOF number,

aliases LISTOF string,

formal_aliases LISTOF string,

xref LISTOF string,

)

STORED AS scone

WITH HEADER ROW;

> (define (has-decomposition_1_2_3dc. __)(not (null? dc)))
> (define selected
(select
'(code_pointdecompositionname)
#:fromnames-list
#:wherehas-decomposition
#:order-by'(name. desc)
#:as'names-with-dc))
> (describeselected)

CREATE EXTERNAL TABLE names-with-dc (

code_point number,

decomposition LISTOF number,

name string,

)

STORED AS scone

WITH HEADER ROW;

Why another File Format?

The Reader in The Racket Reference introduces the Racket reader.

Simplicity. I didn’t want to write a lexer/parser when Racket/Scheme has a perfectly good one already in the reader. Use a simple set of types, simple serialization and some high-level tools and it just works.

Contents

top
← prev up

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /