Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xenoglossia

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xenoglossia

Robust(?) string manipulation language

  • 0.2
  • PyPI
  • Socket score

Maintainers
1

Introduction

A programming language specifically designed such that ASTs generated by markov chain are likely to produce programs with meaningful effect

— mcc (@mcclure111) `July 11, 2015 <https://twitter.com/mcclure111/status/619713910552133632>`__

Xenoglossia is a simple string manipulation language, akin to sed. It was created with the goal of producing surprising, fun-to-read programs which can be generated in novel manners by a computer.

An introduction to the language and its syntax can be found in the design document <https://github.com/mistydemeo/xenoglossia/blob/master/doc/design.md>, and the documentation of the builtin functions can currently be found in the docstrings of the builtins module <https://github.com/mistydemeo/xenoglossia/blob/master/xenoglossia/builtins.py>.

Usage

Xenoglossia will install an executable named xg. To run a program, call xg --input STRING "xenoglossia program"; for example:

.. code:: sh

xg --input "This is the input string" "sub 'input' 'output'"

You can also pipe input into stdin:

.. code:: sh

echo "This is the input string" | xg "sub 'input' 'output'"

Sample programs

Replace two words in a sentence:

::

gsub "favorite" "favourite" gsub "color" "colour"

Rearrange the words in a sentence, then capitalize the new sentence:

::

burst " " shuffle capitalize

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc