Software / code / prosody
Annotate
teal-src/util/format.d.tl @ 11640:51598e46e136
util.stanza: Simplify and make pretty-printing look nicer
I've had this color theme in a local debug module for some time and I
quite like it. The colors are from the XMPP logo.
Removes extra XML serialization implementation in favor of the standard
one. Also removes recursive str=str..more string building.
The new two-level gsub has the accumulator in C space so shouldn't be
too bad. The inner gsub calls use no callback, so should be fast and
not create all that much garbage.
No serious benchmarking has been done, but who cares if it looks nice?
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 07 Nov 2020 22:09:46 +0100 |
| parent | 11432:113f3912c7cb |
| rev | line source |
|---|---|
|
11432
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 local record lib |
|
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 format : function (string, ... : any) : string |
|
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 end |
|
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 return lib |