Compare commits
No commits in common. 'bd06431dc8d878440f6eb2853543252434fad736' and 'a1c369ad4df077d9c12c5c951d0d83f320ad7155' have entirely different histories.
bd06431dc8
...
a1c369ad4d
@ -1,52 +0,0 @@
|
|||||||
# tk
|
|
||||||
tk is my Guile toolkit.
|
|
||||||
Each unit contains a group of tools I commonly used together or with a
|
|
||||||
particular module.
|
|
||||||
|
|
||||||
`make; sudo make install` Will install source files to `(%site-dir)` and
|
|
||||||
compiled versions to `(%site-ccache-dir)`. All units are installed under a
|
|
||||||
folder named `tk/` and so are imported using `(use-modules (tk <unit>))`.
|
|
||||||
|
|
||||||
## short.scm
|
|
||||||
Aliases for only the most common names. I use this literally everywhere
|
|
||||||
`(string->symbol)` => `(ss>)`
|
|
||||||
`(symbol->string)` => `(ss<)`
|
|
||||||
`(ssa>)` appends strings into a symbol
|
|
||||||
|
|
||||||
## listlogic.scm
|
|
||||||
Various logical tools. Especially useful for handling `map` and `fold` where a
|
|
||||||
default path is required.
|
|
||||||
|
|
||||||
`(display-if-not)`
|
|
||||||
Displays a given string if the first argument is `#f`
|
|
||||||
`(flatten)`
|
|
||||||
De-nests lists into a form where no `(car)` contains a list
|
|
||||||
`(lp&)`
|
|
||||||
Tests some predicate pairwise over two lists
|
|
||||||
`(l&)`
|
|
||||||
Tests the equality according to `eq?` over two lists, returns as a list
|
|
||||||
all passing elements
|
|
||||||
`(if-some)`
|
|
||||||
The common `(if var var)` pattern
|
|
||||||
`(if-some-else)`
|
|
||||||
The common `(if var var default)` pattern
|
|
||||||
|
|
||||||
## mcron.scm
|
|
||||||
Constants and functions for working with time, schedules and mcron.
|
|
||||||
|
|
||||||
`sec/min` `sec/hour` `sec/day` `sec/week`
|
|
||||||
Useful constants
|
|
||||||
`sec/mins` `sec/hours` `sec/days` `sec/weeks`
|
|
||||||
Readable shortcuts, `(sec/mins 4)` rather than `(* 4 60)` or worse `240`
|
|
||||||
`(step-from)`
|
|
||||||
Normalize a time to be the next step sized increment from a base time
|
|
||||||
`(str->secs)`
|
|
||||||
`(strf->secs)`
|
|
||||||
Converts a date string into seconds
|
|
||||||
`(current-date-string)`
|
|
||||||
`(yesterday-date-string)`
|
|
||||||
Returns the date as a string for logging purposes
|
|
||||||
|
|
||||||
## ports.scm
|
|
||||||
Convenience when working with ports and parsers.
|
|
||||||
`(port-rewind!)`
|
|
||||||
Loading…
Reference in new issue