Naming conventions:
c#is a lambda extracted to be top-level.l#_xis a local namedxin the source code.p#is a function parameter.s#is a data stack variable.
| Undefined symbols for architecture x86_64: | |
| "_b_deserialize_size_t", referenced from: | |
| DatabaseInMemory::deserialize(unsigned long (*)(char*, unsigned long, void*), void*) in DatabaseInMemory.cc.o | |
| "_b_deserialize_sized", referenced from: | |
| std::__1::unique_ptr<UnresolvedQuestionAnswer, std::__1::default_delete<UnresolvedQuestionAnswer> > b_deserialize_sized<UnresolvedQuestionAnswer>(unsigned long (*)(bool*, unsigned long (*)(char*, unsigned long, void*), void*), unsigned long (*)(char*, unsigned long, void*), void*) in DatabaseInMemory.cc.o | |
| std::__1::unique_ptr<UnresolvedDependency, std::__1::default_delete<UnresolvedDependency> > b_deserialize_sized<UnresolvedDependency>(unsigned long (*)(bool*, unsigned long (*)(char*, unsigned long, void*), void*), unsigned long (*)(char*, unsigned long, void*), void*) in DatabaseInMemory.cc.o | |
| "_b_serialize_size_t", referenced from: | |
| serialize_uuid(B_UUID, void (*)(char const*, unsigned long, void*), void*) in DatabaseInMemory.cc.o | |
| DatabaseIn |
| for (auto i = begin; i != end; ++i) { | |
| qas.erase(i); | |
| } |
| {-# LANGUAGE ExistentialQuantification #-} | |
| import Data.Typeable (Typeable, TypeRep, typeOf) | |
| import Unsafe.Coerce (unsafeCoerce) | |
| data Magic = forall a. Magic | |
| (a -> a -> Bool) | |
| TypeRep | |
| a |
| def safeHead([a] -> a?): | |
| ->xs | |
| if (xs isEmpty): | |
| none | |
| else: | |
| xs head some | |
| def find([a] (a -> Bool) -> a?): | |
| filter safeHead |
| type Instruction Char | |
| type Program [Instruction] | |
| type Memory [Int] | |
| //////////////////////////////////////////////////////////// | |
| // Configuration | |
| def debug: false | |
| // Some programs want 0; some want -1. |
| // NOTE: apply is broken! | |
| // NOTE: arity is incorrect. | |
| // NOTE: parameters are not yet explicit. | |
| != (0 -> 0): | |
| s0 <- neInt p0 p1 | |
| return s0 | |
| //////////////////////////////////////////////////////////// | |
| // Core. | |
| type Node (Element | [Char]) | |
| type Element ([Char] & [Attribute] & [Node]) | |
| type Attribute ([Char] & [Char]) | |
| def element([Char] [[Char] & [Char]] [Node] -> Element): | |
| ->{name attributes children} | |
| (name, attributes {to Attribute} map, children) to Element |
| forall _0 _1 . (t0 [t1 (type var a)] [Char] -> t0 Int + ()) | |
| ("unify",t4,t3) | |
| ("declare",_4,t3) | |
| ("unify",(t4 -> t3 t2 (type of x) + ()),(t6 -> t6 t5 + ())) | |
| ("declare",_2,t5) | |
| ("declare",_3,t6) | |
| ("unify",t10,t7) | |
| ("declare",_10,t7) | |
| ("unify",t7 [t5],t8 [t9] [t9]) | |
| ("declare",_5,t9) |
Ordered
The ordering of two operations is significant (outside of data dependencies). For example, writing to a file and removing a file are order-dependent.
Mutating
An operation is observable to non-deterministic operations. Mutations are non-reversible after a non-deterministic operation depends upon the mutation.