Skip to content

Instantly share code, notes, and snippets.

*.pyc
@o11c
o11c / forks.b98
Created August 7, 2015 04:34
Befunge concurrency test
#v t v
vf'< >' vl'< > 'lve' < >'rv '< >'Bv
, ^t^#<,>#^t^ , ^t^#<,>#^t^ ,
@ t@t @ t@t @
, vtv#<,>#vtv , vtv#<,>#vtv ,
# # # #
^,'< >'o^H'< > 'e^r' < >'u^n'< >'t^
# # # # # #
^t^# < > #^t^
t t
#!/usr/bin/env python3
''' The Kaleidoscope LLVM example, translated to python
'''
from abc import ABCMeta, abstractmethod
import string
import sys
import traceback
class Foo:
def frob(self):
return __class__.__name__
class Bar(Foo):
pass
# >>> Bar().frob()
# 'Foo'
// Warning: I haven't used this code for years.
#pragma once
// gpl3-minmax.hpp - Smart templated versions of min/max.
//
// Copyright © 2011 Ben Longbons <b.r.longbons@gmail.com>
//
// This file is part of The Mana World (Athena server)
//
// This program is free software: you can redistribute it and/or modify
@o11c
o11c / test-annotations.md
Last active October 6, 2023 12:11
Possible test annotations and results

Things that a test can be annotated with:

  • XFAIL(cond): for tests that are known to be buggy.
  • FLAKY(cond): for tests that have nondeterministic bugs that have not been hunted down.
  • SKIP(cond): for tests not applicable to the current platform, that cannot be fixed by installing or configuring dependencies.
  • MISSING(cond): for tests that can't run because of uninstalled or unconfigured dependencies.
  • WIP: for tests you are implementing
  • TIME(cpumin, cpumax, realmax): min/max computation expected for a test. Also real time added in case you sleep or something.
#!/bin/sh
# Hang with bison 3.0.2 with a pipe and without --feature=none
cat test.y | bison /dev/stdin -o /dev/null --xml=/dev/stdout
𝘚𝘰 𝘺𝘰𝘶 𝘤𝘢𝘯 𝘸𝘳𝘪𝘵𝘦 𝘪𝘯 𝘪𝘵𝘢𝘭𝘪𝘤𝘴, 𝘣𝘶𝘵 𝘢𝘱𝘱𝘢𝘳𝘦𝘯𝘵𝘭𝘺 𝘴𝘰𝘮𝘦 𝘸𝘦𝘣𝘴𝘪𝘵𝘦𝘴 "𝘴𝘢𝘯𝘪𝘵𝘪𝘻𝘦" 𝘪𝘵 𝘰𝘶𝘵 𝘰𝘧 𝘴𝘶𝘣𝘮𝘪𝘴𝘴𝘪𝘰𝘯𝘴…
@o11c
o11c / evil.xsd
Created June 13, 2015 18:42
Please don't do this
<?xml version="1.0" encoding="utf-8"?>
<!-- vim: set sts=2 sw=2: -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- enum types -->
<xs:simpleType name="enum1">
<xs:restriction base="xs:string">
<xs:enumeration value="val-a"/>
<xs:enumeration value="val-b"/>
</xs:restriction>
</xs:simpleType>
@o11c
o11c / .gitignore
Last active August 29, 2015 14:21
bison xml schema
*.c
*.h
*.dot
*.png
*.output
*.xml
*.hackxml
*.hackxsd
/out/
/__pycache__/