<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/scripts/generate-alt-random-writes.py, branch 1.7.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-03-14T09:40:29Z</updated>
<entry>
<title>scripts: generate-alt-random: reduce number of emitted sixels</title>
<updated>2021-03-14T09:40:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-14T09:40:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=29709c696626ac4a024ae3f5aece8161527bbb56'/>
<id>urn:sha1:29709c696626ac4a024ae3f5aece8161527bbb56</id>
<content type='text'>
After emitting multiple color bands for each sixel row, the increased
amount of sixel data shifted the balance in the profiling data,
causing a performance regression in regular ASCII handling.
</content>
</entry>
<entry>
<title>generate-alt-random: sixel: emit at least 4 color bands</title>
<updated>2021-03-11T16:33:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T11:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a8186351d16f6daba770ddfb0a850fd0f4d11adf'/>
<id>urn:sha1:a8186351d16f6daba770ddfb0a850fd0f4d11adf</id>
<content type='text'>
This fixes an issue where there was a relatively high chance of not
emitting any color bands at all, causing the final image size to be
too small.
</content>
</entry>
<entry>
<title>generate-alt-random: DECGRI: don’t emit zero-length repeat sequences</title>
<updated>2021-03-11T16:33:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T11:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f3bc5a95b553f41de794db7d3351b79ffcd64efd'/>
<id>urn:sha1:f3bc5a95b553f41de794db7d3351b79ffcd64efd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-alt-random: DECGRI: random repeat lengths</title>
<updated>2021-03-11T16:33:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T10:37:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8ba455f70e0acfaa4ee61fb71a415e796e27dfce'/>
<id>urn:sha1:8ba455f70e0acfaa4ee61fb71a415e796e27dfce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-alt-random: don’t skip that last partial row</title>
<updated>2021-03-11T16:33:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T10:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=660a7f9345f83c0ea3b1b92ec98d3ab5cbc06e7e'/>
<id>urn:sha1:660a7f9345f83c0ea3b1b92ec98d3ab5cbc06e7e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-alt-random: emit “Set Raster Attributes” before color definitions</title>
<updated>2021-03-11T16:33:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T10:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0bc98877f35ef56e127aecc3df3aff986a4c3c93'/>
<id>urn:sha1:0bc98877f35ef56e127aecc3df3aff986a4c3c93</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-alt-random: 50% chance of overwriting the last sixel</title>
<updated>2021-03-11T16:33:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T10:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a3f2e2220ad0448bddb853eca339962f7d64732a'/>
<id>urn:sha1:a3f2e2220ad0448bddb853eca339962f7d64732a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-alt-random: emit sixels on the alt screen</title>
<updated>2021-03-11T16:32:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-09T10:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4a86cd7475f43c5bc44c3309a9caa7bd1ee5a453'/>
<id>urn:sha1:4a86cd7475f43c5bc44c3309a9caa7bd1ee5a453</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-alt-random: emit multiple sixel bands</title>
<updated>2021-03-11T16:32:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-07T16:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f8e51fcb178924dd63c2ce185b1b1ab5daa09362'/>
<id>urn:sha1:f8e51fcb178924dd63c2ce185b1b1ab5daa09362</id>
<content type='text'>
This ensures we’re getting the ‘$’ command PGO:d
</content>
</entry>
<entry>
<title>generate-alt-random: sixel: pan/pad must not be 0</title>
<updated>2021-03-11T16:32:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-07T15:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=eee216f5feef19ac51c11cd55e64d141f7612a70'/>
<id>urn:sha1:eee216f5feef19ac51c11cd55e64d141f7612a70</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scripts: generate-alt-random: sixel: emit DECGRI - Repeat Character</title>
<updated>2021-03-11T16:32:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-06T20:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=add30a38f3aaa702c065ed0e267f72371df24313'/>
<id>urn:sha1:add30a38f3aaa702c065ed0e267f72371df24313</id>
<content type='text'>
</content>
</entry>
<entry>
<title>generate-alt-random: ioctl(TIOCGWINSZ) may fail in run inside a container</title>
<updated>2020-12-21T12:40:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-21T12:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e4ae5a7586cce0ee4efa7f264404dff49f70e87e'/>
<id>urn:sha1:e4ae5a7586cce0ee4efa7f264404dff49f70e87e</id>
<content type='text'>
This _should_ only happen when we’re doing a partial PGO build, since
then the script is run in the parent terminal. In this case, the user
is expected to use --rows/--cols anyway.
</content>
</entry>
<entry>
<title>generate-alt-random: override detected width/height when --cols/--rows have been used</title>
<updated>2020-12-20T14:36:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-20T14:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e9dea5bb9d25bf18ffc5884e13573f8f2caf7436'/>
<id>urn:sha1:e9dea5bb9d25bf18ffc5884e13573f8f2caf7436</id>
<content type='text'>
This ensures we have a valid width and height, that matches what the
PGO helper binary expects.
</content>
</entry>
<entry>
<title>generate-alt-random: fix “new style” cube escape</title>
<updated>2020-12-20T14:27:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-20T14:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=21cb4671a47794ec13e03e2edaafce641f2e0b10'/>
<id>urn:sha1:21cb4671a47794ec13e03e2edaafce641f2e0b10</id>
<content type='text'>
It’s “38:5:&lt;idx&gt;”, not “38:2:5:&lt;idx&gt;”.
</content>
</entry>
<entry>
<title>generate-alt-random-writes: use python random, allow setting a seed</title>
<updated>2020-12-20T13:52:27Z</updated>
<author>
<name>sterni</name>
<email>sternenseemann@systemli.org</email>
</author>
<published>2020-12-20T13:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=050da302b8048f8ebf5f8a2f83ea302c7f954669'/>
<id>urn:sha1:050da302b8048f8ebf5f8a2f83ea302c7f954669</id>
<content type='text'>
Using Python's own PRNG should make the code cleaner and allow for
reproducible stimulus files if that is desired via setting --seed (at
least for the same versions of the script, changing the kind and/or
order of the random calls will of course impact the output in the
future).

I did the following substitutions:

* rand.read(1)[0] % n and struct.unpack('@H', rand.read(2))[0] % n →
  random.randrange(n)
* rand.read(1)[0] → random.randrange(256)
* rand.read(n) → [random.randrange(256) for _ in range(n)]
  (better alternative would have been random.randbytes(n), but is only
  available for Python &gt;= 3.9, switching to this in the future will
  impact output)
* list[rand.read(1) % len(list)] → random.choice(list)
</content>
</entry>
<entry>
<title>scripts: generate-alt-random-writes: add --sixel</title>
<updated>2020-11-24T20:31:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-23T18:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d2f0b82bdaa9ca87fdec0f3fd99b659e5ed21a5f'/>
<id>urn:sha1:d2f0b82bdaa9ca87fdec0f3fd99b659e5ed21a5f</id>
<content type='text'>
When --sixel is specified, we generate random sixel images in the
‘normal’ screen, after exiting the alt screen.
</content>
</entry>
<entry>
<title>scripts: generate-alt-random-writes: add unicode and multi-column chars</title>
<updated>2020-11-22T18:29:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-16T19:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=96db338262a850a9aec4f6c1d04e4ea601be3467'/>
<id>urn:sha1:96db338262a850a9aec4f6c1d04e4ea601be3467</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scripts: generate-alt-random-writes: add support for bold/italic/underline</title>
<updated>2020-11-22T18:29:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-16T19:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b437013a3b7968a4f211d55725e4e0e406edb076'/>
<id>urn:sha1:b437013a3b7968a4f211d55725e4e0e406edb076</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scripts: generate-alt-random-writes: don’t always reset all attributes</title>
<updated>2020-11-22T18:29:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-16T19:02:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=60c86372310c96759334fc6c0a5c46b729b470f9'/>
<id>urn:sha1:60c86372310c96759334fc6c0a5c46b729b470f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scripts: generate-alt-random-writes: mix \e[S with \n</title>
<updated>2020-11-22T18:29:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-16T19:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1e1fb157dc5762f571d8e39e837c010ef9aaf45b'/>
<id>urn:sha1:1e1fb157dc5762f571d8e39e837c010ef9aaf45b</id>
<content type='text'>
</content>
</entry>
</feed>
