<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/meson.build, branch 1.8.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.8.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.8.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-07-18T15:58:05Z</updated>
<entry>
<title>meson/pkgbuild: bump version to 1.8.2</title>
<updated>2021-07-18T15:58:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-18T15:58:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cd8c96d746f7a584be9b15423a566b6e5c0117ed'/>
<id>urn:sha1:cd8c96d746f7a584be9b15423a566b6e5c0117ed</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson/pkgbuild: bump version to 1.8.1</title>
<updated>2021-07-01T18:14:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-01T18:14:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1d488bb6a7f387a183df53e29c2b4a0f4942b0fa'/>
<id>urn:sha1:1d488bb6a7f387a183df53e29c2b4a0f4942b0fa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson/pkgbuild: bump version to 1.8.0</title>
<updated>2021-06-25T06:24:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-25T06:24:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0a455174f46e3e97c5deb01e75845f86e5011ad0'/>
<id>urn:sha1:0a455174f46e3e97c5deb01e75845f86e5011ad0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: add utf8proc dep to all libraries pulling in terminal.h</title>
<updated>2021-06-24T18:29:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-24T18:16:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ad981930c3c685a595fd7567d9a4b09481446d2c'/>
<id>urn:sha1:ad981930c3c685a595fd7567d9a4b09481446d2c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>composed: store compose chains in a binary search tree</title>
<updated>2021-06-24T15:30:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-24T11:17:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fe8ca23cfee77a6cac433892755dd7455e354a9d'/>
<id>urn:sha1:fe8ca23cfee77a6cac433892755dd7455e354a9d</id>
<content type='text'>
The previous implementation stored compose chains in a dynamically
allocated array. Adding a chain was easy: resize the array and append
the new chain at the end. Looking up a compose chain given a compose
chain key/index was also easy: just index into the array.

However, searching for a pre-existing chain given a codepoint sequence
was very slow. Since the array wasn’t sorted, we typically had to scan
through the entire array, just to realize that there is no
pre-existing chain, and that we need to add a new one.

Since this happens for *each* codepoint in a grapheme cluster, things
quickly became really slow.

Things were ok:ish as long as the compose chain struct was small, as
that made it possible to hold all the chains in the cache. Once the
number of chains reached a certain point, or when we were forced to
bump maximum number of allowed codepoints in a chain, we started
thrashing the cache and things got much much worse.

So what can we do?

We can’t sort the array, because

a) that would invalidate all existing chain keys in the grid (and
iterating the entire scrollback and updating compose keys is *not* an
option).

b) inserting a chain becomes slow as we need to first find _where_ to
insert it, and then memmove() the rest of the array.

This patch uses a binary search tree to store the chains instead of a
simple array.

The tree is sorted on a “key”, which is the XOR of all codepoints,
truncated to the CELL_COMB_CHARS_HI-CELL_COMB_CHARS_LO range.

The grid now stores CELL_COMB_CHARS_LO+key, instead of
CELL_COMB_CHARS_LO+index.

Since the key is truncated, collisions may occur. This is handled by
incrementing the key by 1.

Lookup is of course slower than before, O(log n) instead of
O(1).

Insertion is slightly slower as well: technically it’s O(log n)
instead of O(1). However, we also need to take into account the
re-allocating the array will occasionally force a full copy of the
array when it cannot simply be growed.

But finding a pre-existing chain is now *much* faster: O(log n)
instead of O(n). In most cases, the first lookup will either
succeed (return a true match), or fail (return NULL). However, since
key collisions are possible, it may also return false matches. This
means we need to verify the contents of the chain before deciding to
use it instead of inserting a new chain. But remember that this
comparison was being done for each and every chain in the previous
implementation.

With lookups being much faster, and in particular, no longer requiring
us to check the chain contents for every singlec chain, we can now use
a dynamically allocated ‘chars’ array in the chain. This was
previously a hardcoded array of 10 chars.

Using a dynamic allocated array means looking in the array is slower,
since we now need two loads: one to load the pointer, and a second to
load _from_ the pointer.

As a result, the base size of a compose chain (i.e. an “empty” chain)
has now been reduced from 48 bytes to 32. A chain with two codepoints
is 40 bytes. This means we have up to 4 codepoints while still using
less, or the same amount, of memory as before.

Furthermore, the Unicode random test (i.e. write random “unicode”
chars) is now **faster** than current master (i.e. before text-shaping
support was added), **with** test-shaping enabled. With text-shaping
disabled, we’re _even_ faster.
</content>
</entry>
<entry>
<title>wip: grapheme shaping</title>
<updated>2021-06-24T15:30:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-20T17:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b9ef703eb14ba2357b847b62a715b4e97f690209'/>
<id>urn:sha1:b9ef703eb14ba2357b847b62a715b4e97f690209</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: add -Dterminfo-install-location=disabled|custom-path</title>
<updated>2021-06-23T14:43:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T14:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6268fc536b99d8594c3d48ad5473e9a411e75b5a'/>
<id>urn:sha1:6268fc536b99d8594c3d48ad5473e9a411e75b5a</id>
<content type='text'>
Add a new meson option, ‘terminfo-install-location’, that allows you
to customize _where_ the terminfo files are installed, relative to the
installation prefix.

It also recognizes the special value ‘disabled’, in which case the
terminfo files are not installed at all. The terminfo files _are_
however built (allowing us to catch build errors), and foot still
defaults to the ‘foot’ terminfo.

It defaults to $datadir/terminfo

If (the other option) ‘terminfo’ is set to disabled (or tic cannot be
found), terminfo-install-location is automatically set to ‘disabled’.
</content>
</entry>
<entry>
<title>client: send overrides for everything that is publicly visible in the conf</title>
<updated>2021-06-23T13:12:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=136d60606a1e01eb68ed984de63b7a55f8966075'/>
<id>urn:sha1:136d60606a1e01eb68ed984de63b7a55f8966075</id>
<content type='text'>
Send a generic “overrides” list to the server, containing options in
text, on the format “section.key=value”.

This reduces the size of the base client/server protocol packet, as
well as opens up for a generic -o,--override command line option (not
yet implemented).
</content>
</entry>
<entry>
<title>meson: add xdg-activation-v1.xml conditionally</title>
<updated>2021-05-14T11:26:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-11T15:58:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=03e1b906abc6b29bb4b76b6e0429b8da9e2e2c0e'/>
<id>urn:sha1:03e1b906abc6b29bb4b76b6e0429b8da9e2e2c0e</id>
<content type='text'>
Only enable XDG activation when compiling against wayland-protocols
1.21. Older versions don’t have this protocol.

When available, define HAVE_XDG_ACTIVATION.

Make all usages of xdg_activation_v1 and xdg_activation_token_v1
conditional.
</content>
</entry>
<entry>
<title>xdg-activation: initial support for setting urgency using XDG activation</title>
<updated>2021-05-14T11:26:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-09T10:13:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3e92361534cdd02e8da8a5f7e8112361b1d6eb67'/>
<id>urn:sha1:3e92361534cdd02e8da8a5f7e8112361b1d6eb67</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: require fcft &gt;= 2.4</title>
<updated>2021-05-07T09:31:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-07T09:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=96ae2d2bd7f48f8513dfea2f5ec5c7221b409784'/>
<id>urn:sha1:96ae2d2bd7f48f8513dfea2f5ec5c7221b409784</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: add ‘xkb’ as a dependency to vtlib, pgolib and pgo</title>
<updated>2021-05-01T20:47:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-01T20:24:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7edda924a0ac962c98fac8342a474b6a2a057c1d'/>
<id>urn:sha1:7edda924a0ac962c98fac8342a474b6a2a057c1d</id>
<content type='text'>
All of these include wayland.h (either directly, or indirectly), which
pulls in xkbcommon.h.

Reported by swayyyy on IRC:

  FAILED: libvtlib.a.p/dcs.c.o

  In file included from ../../terminal.h:19,
                   from ../../dcs.h:4,
                   from ../../dcs.c:1:
  ../../wayland.h:9:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory
      9 | #include &lt;xkbcommon/xkbcommon.h&gt;
        |          ^
</content>
</entry>
<entry>
<title>Merge branch 'releases/1.7'</title>
<updated>2021-04-18T18:16:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-18T18:16:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4044b6fa99d6cd464ad926993059c6e76fc81d14'/>
<id>urn:sha1:4044b6fa99d6cd464ad926993059c6e76fc81d14</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson/pkgbuild: bump version to 1.7.2</title>
<updated>2021-04-18T18:12:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-18T18:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0d4e61bbe801eb4f0d8618bb7001497f1f2ea834'/>
<id>urn:sha1:0d4e61bbe801eb4f0d8618bb7001497f1f2ea834</id>
<content type='text'>
</content>
</entry>
<entry>
<title>main: call fcft_log_init(). Note that this requires fcft &gt;= 2.3.90</title>
<updated>2021-04-17T17:31:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-17T17:31:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=353c2f012af8fe0b440387ff20f3b0d032a2fd04'/>
<id>urn:sha1:353c2f012af8fe0b440387ff20f3b0d032a2fd04</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson/pkgbuild: bump version to 1.7.1</title>
<updated>2021-03-28T12:25:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-28T12:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ca89f977b51a57a5dc0fc9be0086d2d9a8e21c9d'/>
<id>urn:sha1:ca89f977b51a57a5dc0fc9be0086d2d9a8e21c9d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: replace log+debug+xmalloc static libraries with a single ‘common’ library</title>
<updated>2021-03-27T12:20:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-27T12:17:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b5ceed7b2bfa41584e17d156ecac231dde195798'/>
<id>urn:sha1:b5ceed7b2bfa41584e17d156ecac231dde195798</id>
<content type='text'>
There are cyclic dependencies between the log, debug and xmalloc
libraries. While having them as separate static libraries work, as
long as consumers of them link against all of them, having them in a
single library feels slightly better.
</content>
</entry>
<entry>
<title>meson: only build the pgo helper binary when -Db_pgo=generate</title>
<updated>2021-03-26T19:34:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-26T19:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ae6a656f4963b8cc5bde13fa347cfd4b76a4d4a5'/>
<id>urn:sha1:ae6a656f4963b8cc5bde13fa347cfd4b76a4d4a5</id>
<content type='text'>
This is the only time it’s needed.

In non-PGO builds, it is completely unnecessary, and we’re only
wasting CPU cycles building it.

In full PGO builds, with -Db_pgo=use, we get link warnings and/or
failures, depending on compiler, since the pgo binary hasn’t been
executed.
</content>
</entry>
<entry>
<title>meson: build source files common to both foot and footclient as libraries</title>
<updated>2021-03-26T19:31:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-26T19:31:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c6fb10863d0f985c1b9eb6a859086e761d393547'/>
<id>urn:sha1:c6fb10863d0f985c1b9eb6a859086e761d393547</id>
<content type='text'>
Source files used by both foot and footclient are now compiled as
static libraries, which foot and footclient links against.
</content>
</entry>
<entry>
<title>features: --version now logs +/-pgo</title>
<updated>2021-03-26T19:30:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-26T19:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9b20764f35094963ecbfc40a972ef54443630447'/>
<id>urn:sha1:9b20764f35094963ecbfc40a972ef54443630447</id>
<content type='text'>
That is, whether the binary was compiled with PGO or not.
</content>
</entry>
</feed>
