The temporal-functions Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The temporal-functions Reference Manual

This is the temporal-functions Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:25:01 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

temporal-functions

Adds tlambda & tdefun along with a small collection of related funcs and macros

tlambda is a lambda with an internal concept of time

(tlambda () (before (seconds 10) (print "hi")))

Gives a function that will work for the next 10 seconds. After that with will return nil and release an 'expired' signal.

(expiredp *) ;; will return true if function has expired

Can be fairly complicated and will expand into a fast state-machine, by only using the signal mechanism if all stages have expired.

(tlambda ()
  (then
   (before (seconds 3)
     (print "hi"))
   (before (seconds 3)
     (print "still here"))
   (before (seconds 3)
     (print "Bored now"))))

Also has brevity macros

(before (millseconds 1300)
  (print "ping!"))

;; expands to

(tlambda ()
  (before (millseconds 1300)
    (print "ping!")))

;; which, in turn, expands to a form equivilent to

(let* ((start (get-internal-real-time))
       (deadline (+ start (millseconds 1300))))
  (let ((func
         (lambda ()
           (let ((time (get-internal-real-time)))
             (labels ((expired () (when (>= time deadline)
                                    deadline)))
               (if (expired)
                   (signal-expired)
                   (print "ping!")))))))
    func))

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 temporal-functions

Author

Chris Bagley <techsnuffle@gmail.com>

License

2 Clause BSD

Description

A means of creating functions that have an internal concept of time

Dependency

fn

Source

temporal-functions.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 temporal-functions.asd

Location

temporal-functions.asd

Systems

temporal-functions (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 temporal-functions/package.lisp

Parent

temporal-functions (system)

Location

package.lisp

Packages

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 temporal-functions/helpers.lisp

Dependency

package.lisp (file)

Parent

temporal-functions (system)

Location

helpers.lisp

Internal Definitions

case= (macro)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 temporal-functions/units.lisp

Dependency

helpers.lisp (file)

Parent

temporal-functions (system)

Location

units.lisp

Exported Definitions
Internal Definitions

ms (function)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 temporal-functions/temporal-functions.lisp

Dependency

units.lisp (file)

Parent

temporal-functions (system)

Location

temporal-functions.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.6 temporal-functions/tiny-time-manager.lisp

Dependency

temporal-functions.lisp (file)

Parent

temporal-functions (system)

Location

tiny-time-manager.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 tiny-time-manager

Source

package.lisp (file)

Nickname

ttm

Use List
Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.2 temporal-functions

Source

package.lisp (file)

Use List

common-lisp

Used By List

tiny-time-manager

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: after DELAY &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: before DEADLINE &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: def-time-units &body FORMS
Package

temporal-functions

Source

units.lisp (file)

Macro: defun-t NAME ARGS &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: each DELAY &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: expiredp &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: expiredp+ &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: repeat &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: then &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: tlambda ARGS &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: add ITEM &optional POOL
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: clean &optional POOL
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: hours QUANTITY
Package

temporal-functions

Source

units.lisp (file)

Function: make-stepper STEP-SIZE &optional MAX-CACHE-SIZE DEFAULT-SOURCE ALLOW-REPLACE-SOURCE

this takes absolute sources

Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: make-tfunc-pool ()
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: milliseconds QUANTITY
Package

temporal-functions

Source

units.lisp (file)

Function: minutes QUANTITY
Package

temporal-functions

Source

units.lisp (file)

Function: release ITEM &optional POOL
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: seconds QUANTITY
Package

temporal-functions

Source

units.lisp (file)

Function: signal-expired ()
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: update &optional POOL
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *default-time-source*
Package

temporal-functions

Source

temporal-functions.lisp (file)

Special Variable: *default-time-source-name*
Package

temporal-functions

Source

temporal-functions.lisp (file)

Special Variable: *init-arg*
Package

temporal-functions

Source

temporal-functions.lisp (file)

Special Variable: *progress-var*
Package

temporal-functions

Source

temporal-functions.lisp (file)

Special Variable: *temporal-clause-expanders*
Package

temporal-functions

Source

temporal-functions.lisp (file)

Special Variable: *time-var*
Package

temporal-functions

Source

temporal-functions.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: case= FORM &body CASES
Package

temporal-functions

Source

helpers.lisp (file)

Macro: def-t-expander NAME ARGS &body BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Macro: with-compile-result FORM &body WCR-BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: %make-tfp &key (FUNCS FUNCS)
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: after-expander DELAY &rest BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: before-expander DEADLINE &rest BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: clean-result RESULT
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: copy-temporal-func-pool INSTANCE
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: each-expander DELAY &rest BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: empty-result ()
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: expose &optional POOL
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: gen-t-r-step COMPILE-RESULT STEP-NUM START-VAR TOP STEP-VAR

each then/repeat step has two steps. One that sets up and another than runs

Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: improve-readability FORM
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: mapcat FUNCTION &rest LISTS
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: merge-results RESULTS &optional FIRST-OVERRIDES-BODY-FORM
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: ms QUANTITY
Package

temporal-functions

Source

units.lisp (file)

Function: new-result &key CLOSED-VARS START-TEST EXPIRE-TEST FUNCS INIT BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: once-expander &rest BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: process-t-body FORM
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: repeat-expander &rest FORMS
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: t-init-base COMPILED
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: tbody COMPILED
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: tcompile BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: temporal-func-pool-funcs INSTANCE
Function: (setf temporal-func-pool-funcs) VALUE INSTANCE
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: temporal-func-pool-p OBJECT
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Function: then-expander &rest FORMS
Package

temporal-functions

Source

temporal-functions.lisp (file)

Function: until-expander TEST &rest BODY
Package

temporal-functions

Source

temporal-functions.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Generic functions

Generic Function: body OBJECT
Generic Function: (setf body) NEW-VALUE OBJECT
Package

temporal-functions

Methods
Method: body (RESULT result)

automatically generated reader method

Source

temporal-functions.lisp (file)

Method: (setf body) NEW-VALUE (RESULT result)

automatically generated writer method

Source

temporal-functions.lisp (file)

Generic Function: closed-vars OBJECT
Generic Function: (setf closed-vars) NEW-VALUE OBJECT
Package

temporal-functions

Methods
Method: closed-vars (RESULT result)

automatically generated reader method

Source

temporal-functions.lisp (file)

Method: (setf closed-vars) NEW-VALUE (RESULT result)

automatically generated writer method

Source

temporal-functions.lisp (file)

Generic Function: expire-test OBJECT
Generic Function: (setf expire-test) NEW-VALUE OBJECT
Package

temporal-functions

Methods
Method: expire-test (RESULT result)

automatically generated reader method

Source

temporal-functions.lisp (file)

Method: (setf expire-test) NEW-VALUE (RESULT result)

automatically generated writer method

Source

temporal-functions.lisp (file)

Generic Function: funcs OBJECT
Generic Function: (setf funcs) NEW-VALUE OBJECT
Package

temporal-functions

Methods
Method: funcs (RESULT result)

automatically generated reader method

Source

temporal-functions.lisp (file)

Method: (setf funcs) NEW-VALUE (RESULT result)

automatically generated writer method

Source

temporal-functions.lisp (file)

Generic Function: init OBJECT
Generic Function: (setf init) NEW-VALUE OBJECT
Package

temporal-functions

Methods
Method: init (RESULT result)

automatically generated reader method

Source

temporal-functions.lisp (file)

Method: (setf init) NEW-VALUE (RESULT result)

automatically generated writer method

Source

temporal-functions.lisp (file)

Generic Function: start-test OBJECT
Generic Function: (setf start-test) NEW-VALUE OBJECT
Package

temporal-functions

Methods
Method: start-test (RESULT result)

automatically generated reader method

Source

temporal-functions.lisp (file)

Method: (setf start-test) NEW-VALUE (RESULT result)

automatically generated writer method

Source

temporal-functions.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Conditions

Condition: c-expired ()
Package

temporal-functions

Source

temporal-functions.lisp (file)

Direct superclasses

condition (condition)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.6 Structures

Structure: temporal-func-pool ()
Package

tiny-time-manager

Source

tiny-time-manager.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: funcs
Type

list

Initform

(list t)

Readers

temporal-func-pool-funcs (function)

Writers

(setf temporal-func-pool-funcs) (function)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.7 Classes

Class: result ()
Package

temporal-functions

Source

temporal-functions.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: closed-vars
Initargs

:closed-vars

Readers

closed-vars (generic function)

Writers

(setf closed-vars) (generic function)

Slot: start-test
Initargs

:start-test

Readers

start-test (generic function)

Writers

(setf start-test) (generic function)

Slot: expire-test
Initargs

:expire-test

Readers

expire-test (generic function)

Writers

(setf expire-test) (generic function)

Slot: funcs
Initargs

:funcs

Readers

funcs (generic function)

Writers

(setf funcs) (generic function)

Slot: init
Initargs

:init

Readers

init (generic function)

Writers

(setf init) (generic function)

Slot: body
Initargs

:body

Readers

body (generic function)

Writers

(setf body) (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   T  
Index Entry  Section

F
File, Lisp, temporal-functions.asd: The temporal-functions<dot>asd file
File, Lisp, temporal-functions/helpers.lisp: The temporal-functions/helpers<dot>lisp file
File, Lisp, temporal-functions/package.lisp: The temporal-functions/package<dot>lisp file
File, Lisp, temporal-functions/temporal-functions.lisp: The temporal-functions/temporal-functions<dot>lisp file
File, Lisp, temporal-functions/tiny-time-manager.lisp: The temporal-functions/tiny-time-manager<dot>lisp file
File, Lisp, temporal-functions/units.lisp: The temporal-functions/units<dot>lisp file

L
Lisp File, temporal-functions.asd: The temporal-functions<dot>asd file
Lisp File, temporal-functions/helpers.lisp: The temporal-functions/helpers<dot>lisp file
Lisp File, temporal-functions/package.lisp: The temporal-functions/package<dot>lisp file
Lisp File, temporal-functions/temporal-functions.lisp: The temporal-functions/temporal-functions<dot>lisp file
Lisp File, temporal-functions/tiny-time-manager.lisp: The temporal-functions/tiny-time-manager<dot>lisp file
Lisp File, temporal-functions/units.lisp: The temporal-functions/units<dot>lisp file

T
temporal-functions.asd: The temporal-functions<dot>asd file
temporal-functions/helpers.lisp: The temporal-functions/helpers<dot>lisp file
temporal-functions/package.lisp: The temporal-functions/package<dot>lisp file
temporal-functions/temporal-functions.lisp: The temporal-functions/temporal-functions<dot>lisp file
temporal-functions/tiny-time-manager.lisp: The temporal-functions/tiny-time-manager<dot>lisp file
temporal-functions/units.lisp: The temporal-functions/units<dot>lisp file

Jump to:   F   L   T  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
A   B   C   D   E   F   G   H   I   M   N   O   P   R   S   T   U   W  
Index Entry  Section

%
%make-tfp: Internal functions

(
(setf body): Internal generic functions
(setf body): Internal generic functions
(setf closed-vars): Internal generic functions
(setf closed-vars): Internal generic functions
(setf expire-test): Internal generic functions
(setf expire-test): Internal generic functions
(setf funcs): Internal generic functions
(setf funcs): Internal generic functions
(setf init): Internal generic functions
(setf init): Internal generic functions
(setf start-test): Internal generic functions
(setf start-test): Internal generic functions
(setf temporal-func-pool-funcs): Internal functions

A
add: Exported functions
after: Exported macros
after-expander: Internal functions

B
before: Exported macros
before-expander: Internal functions
body: Internal generic functions
body: Internal generic functions

C
case=: Internal macros
clean: Exported functions
clean-result: Internal functions
closed-vars: Internal generic functions
closed-vars: Internal generic functions
copy-temporal-func-pool: Internal functions

D
def-t-expander: Internal macros
def-time-units: Exported macros
defun-t: Exported macros

E
each: Exported macros
each-expander: Internal functions
empty-result: Internal functions
expire-test: Internal generic functions
expire-test: Internal generic functions
expiredp: Exported macros
expiredp+: Exported macros
expose: Internal functions

F
funcs: Internal generic functions
funcs: Internal generic functions
Function, %make-tfp: Internal functions
Function, (setf temporal-func-pool-funcs): Internal functions
Function, add: Exported functions
Function, after-expander: Internal functions
Function, before-expander: Internal functions
Function, clean: Exported functions
Function, clean-result: Internal functions
Function, copy-temporal-func-pool: Internal functions
Function, each-expander: Internal functions
Function, empty-result: Internal functions
Function, expose: Internal functions
Function, gen-t-r-step: Internal functions
Function, hours: Exported functions
Function, improve-readability: Internal functions
Function, make-stepper: Exported functions
Function, make-tfunc-pool: Exported functions
Function, mapcat: Internal functions
Function, merge-results: Internal functions
Function, milliseconds: Exported functions
Function, minutes: Exported functions
Function, ms: Internal functions
Function, new-result: Internal functions
Function, once-expander: Internal functions
Function, process-t-body: Internal functions
Function, release: Exported functions
Function, repeat-expander: Internal functions
Function, seconds: Exported functions
Function, signal-expired: Exported functions
Function, t-init-base: Internal functions
Function, tbody: Internal functions
Function, tcompile: Internal functions
Function, temporal-func-pool-funcs: Internal functions
Function, temporal-func-pool-p: Internal functions
Function, then-expander: Internal functions
Function, until-expander: Internal functions
Function, update: Exported functions

G
gen-t-r-step: Internal functions
Generic Function, (setf body): Internal generic functions
Generic Function, (setf closed-vars): Internal generic functions
Generic Function, (setf expire-test): Internal generic functions
Generic Function, (setf funcs): Internal generic functions
Generic Function, (setf init): Internal generic functions
Generic Function, (setf start-test): Internal generic functions
Generic Function, body: Internal generic functions
Generic Function, closed-vars: Internal generic functions
Generic Function, expire-test: Internal generic functions
Generic Function, funcs: Internal generic functions
Generic Function, init: Internal generic functions
Generic Function, start-test: Internal generic functions

H
hours: Exported functions

I
improve-readability: Internal functions
init: Internal generic functions
init: Internal generic functions

M
Macro, after: Exported macros
Macro, before: Exported macros
Macro, case=: Internal macros
Macro, def-t-expander: Internal macros
Macro, def-time-units: Exported macros
Macro, defun-t: Exported macros
Macro, each: Exported macros
Macro, expiredp: Exported macros
Macro, expiredp+: Exported macros
Macro, repeat: Exported macros
Macro, then: Exported macros
Macro, tlambda: Exported macros
Macro, with-compile-result: Internal macros
make-stepper: Exported functions
make-tfunc-pool: Exported functions
mapcat: Internal functions
merge-results: Internal functions
Method, (setf body): Internal generic functions
Method, (setf closed-vars): Internal generic functions
Method, (setf expire-test): Internal generic functions
Method, (setf funcs): Internal generic functions
Method, (setf init): Internal generic functions
Method, (setf start-test): Internal generic functions
Method, body: Internal generic functions
Method, closed-vars: Internal generic functions
Method, expire-test: Internal generic functions
Method, funcs: Internal generic functions
Method, init: Internal generic functions
Method, start-test: Internal generic functions
milliseconds: Exported functions
minutes: Exported functions
ms: Internal functions

N
new-result: Internal functions

O
once-expander: Internal functions

P
process-t-body: Internal functions

R
release: Exported functions
repeat: Exported macros
repeat-expander: Internal functions

S
seconds: Exported functions
signal-expired: Exported functions
start-test: Internal generic functions
start-test: Internal generic functions

T
t-init-base: Internal functions
tbody: Internal functions
tcompile: Internal functions
temporal-func-pool-funcs: Internal functions
temporal-func-pool-p: Internal functions
then: Exported macros
then-expander: Internal functions
tlambda: Exported macros

U
until-expander: Internal functions
update: Exported functions

W
with-compile-result: Internal macros

Jump to:   %   (  
A   B   C   D   E   F   G   H   I   M   N   O   P   R   S   T   U   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
B   C   E   F   I   S  
Index Entry  Section

*
*default-time-source*: Internal special variables
*default-time-source-name*: Internal special variables
*init-arg*: Internal special variables
*progress-var*: Internal special variables
*temporal-clause-expanders*: Internal special variables
*time-var*: Internal special variables

B
body: Internal classes

C
closed-vars: Internal classes

E
expire-test: Internal classes

F
funcs: Internal structures
funcs: Internal classes

I
init: Internal classes

S
Slot, body: Internal classes
Slot, closed-vars: Internal classes
Slot, expire-test: Internal classes
Slot, funcs: Internal structures
Slot, funcs: Internal classes
Slot, init: Internal classes
Slot, start-test: Internal classes
Special Variable, *default-time-source*: Internal special variables
Special Variable, *default-time-source-name*: Internal special variables
Special Variable, *init-arg*: Internal special variables
Special Variable, *progress-var*: Internal special variables
Special Variable, *temporal-clause-expanders*: Internal special variables
Special Variable, *time-var*: Internal special variables
start-test: Internal classes

Jump to:   *  
B   C   E   F   I   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   R   S   T  
Index Entry  Section

C
c-expired: Internal conditions
Class, result: Internal classes
Condition, c-expired: Internal conditions

P
Package, temporal-functions: The temporal-functions package
Package, tiny-time-manager: The tiny-time-manager package

R
result: Internal classes

S
Structure, temporal-func-pool: Internal structures
System, temporal-functions: The temporal-functions system

T
temporal-func-pool: Internal structures
temporal-functions: The temporal-functions system
temporal-functions: The temporal-functions package
tiny-time-manager: The tiny-time-manager package

Jump to:   C   P   R   S   T