StalableTask in Weave: <https://github.com/mratsim/weave/blob/2e528bd2/weave/datatypes/prell_deques.nim#L10-L20> type StealableTask* = concept task, var mutTask, type T ## task is a ptr object and has a next/prev field ## for intrusive doubly-linked list based deque task is ptr task.prev is T task.next is T # A task has a parent field task.parent is T # task has a "fn" field with the proc to run task.fn is proc (param: pointer) {.nimcall.} Run
Explanation: It's a type that allows intrusive linked lists, has a parent field and has a callable proc in a field TrainableLayer in Arraymancer: <https://github.com/mratsim/Arraymancer/blob/88edbb67/src/arraymancer/nn_dsl/dsl_types.nim#L63-L68> TrainableLayer*[TT] = concept layer block: var trainable: false for field in fields(layer): trainable = trainable or (field is Variable[TT]) trainable Run Explanation: it's a type that contains a `Variable` type at any nesting level. Quadratic and Cubic extensions in Constantine: <https://github.com/mratsim/constantine/blob/28e83e7b/constantine/tower_field_extensions/tower_common.nim#L26-L39> type CubicExt* = concept x ## Cubic Extension field concept type BaseField = auto x.c0 is BaseField x.c1 is BaseField x.c2 is BaseField QuadraticExt* = concept x ## Quadratic Extension field concept not(x is CubicExt) type BaseField = auto x.c0 is BaseField x.c1 is BaseField Run Those are types which contain the same inner type twice (Quadratic extension) or thrice (Cubic Extension). For example type Complex[T] = object c0, c1: T Run would fit quadratic concept. In my case T is a modular big integer or a Complex or a Complex of Complex ...