Skip to content

Instantly share code, notes, and snippets.

View jlettvin's full-sized avatar
💭
reflex system mathematics

Jonathan D. Lettvin jlettvin

💭
reflex system mathematics
View GitHub Profile
class Dict(dict):
def __init__(self, **kw)
self.__dict__ = self
self.update(kw)
hard = {'hello': 'world'}
easy = Dict(**hard)
assert easy.hello == hard["hello"], "Should not fail" # Because this is the purpose of the class
assert easy["hello"] == hard["hello"], "Should not fail" # Because it should not invalidate old code.

Comparing assembler syntax

A variety of assemblers are available for programming on Intel machines. In this gist, commonalities and differences between them are illustrated. This exploration does not expose the ability of most assemblers to lex/parse different code syntax such as Intel or AT&T, and variations for 32 and 64 bit. Examples of some syntax variations are shown to illustrate. Effort has been taken to reduce the syntax differences to only those absolutely necessary.