(λ (bde)
"\( ゚ヮ゚)/")
(λ (bde)
"\( ゚ヮ゚)/")
#!/bin/sh | |
# Capture all network traffic that mentions a particular port, and write the | |
# packets to a file. Stop capture when either enough data has been collected, | |
# or enough time has elapsed, where "enough" is configurable in this script. | |
port=80 | |
file=dump.pcap | |
max_size_bytes=$((1024 * 1024 * 100)) | |
max_time_seconds=$((60 * 10)) |
(λ (bde)
"\( ゚ヮ゚)/")
(λ (bde)
"\( ゚ヮ゚)/")
{"id": "1", "message": {"open": {"schema": ...}}} | |
{"id": "1", "message": {"request": {"service": "1", ...}}} | |
{"blah": "this is the request payload nananananannaana"} | |
{"id": "2", "message": {"respond": {"request": "1"}}}} | |
{"foo": "this is the payload OMGOMGOMGOMGOMGOM"} | |
{"id": "2", "message": {"complain": {"id": "2", "what": "unable to decode as JSON"}}}} |
(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]) |
#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}) |
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,
A practical guide to Racket macros.
Copyright (c) 2012-2018 by Greg Hendershott. All rights reserved.
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")