A set of conventions for managing versions of a flat directory.
If the directory to be versioned is /bb/data/configs
, then the
diversion-compatible layout of the parent directory, /bb/data/
, could look
Let's see whether github highlights racket as a language.
(require graph)
(define g (directed-graph '((a b) (b a))))
(with-output-to-file "out.dot"
(lambda () (graphviz g)))
#lang racket | |
(provide | |
; function that converts an SXML s-expression into one of the types below | |
sxml->bdlat | |
; function that finds all types define in an SXML s-expression and returns | |
; an association list of name -> type. | |
sxml->types |
This module provides data structures representing Python code abstract syntax tree (AST) elements and procedures for producing python code from bdlat types.
For example, this module can be used to tranform the following list of bdlat types:
(list
(sequence "BerDecoderOptions"
'("BER decoding options")
Does it need a blank line?
Does it need a blank line?
A practical guide to Racket macros.
Copyright (c) 2012-2018 by Greg Hendershott. All rights reserved.
Parse into attribute types
Tiny domain specific languages sometimes find their way into C++ code. An ideal way to parse these langauges is to use [boost.spirit][spirit]. However, sometimes the full glory of Spirit is more or less than you need. Spirit is powerful and general, but you have to tell it how to parse into your AST types,
#lang at-exp racket | |
(displayln "here's a string | |
with line breaks | |
in it.") | |
(displayln @~a{Here's an attempt | |
at using the at-exp reader | |
list list foo first}) |
(json {"how": "does", "it": ["look", 2, 3]}) | |
(json-object ("how" "does") ("it" (json-array "look" 2 3))) | |
"{\"how\": \"does\", \"it\": [\"look\", 2, 3]}" | |
; What about null? | |
(json [1, null, 3]) |