# Announcing uni-table - a Unicode text table renderer with ECMA-48 SGR support

**URL:** <https://racket.discourse.group/t/announcing-uni-table-a-unicode-text-table-renderer-with-ecma-48-sgr-support/278>\
**Category:** Show & Tell\
**Tags:** package\
**Created:** [November 26, 2021, 6:01pm UTC](https://racket.discourse.group/t/announcing-uni-table-a-unicode-text-table-renderer-with-ecma-48-sgr-support/278 "2021-11-26T18:01:36Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![dominik.pantucek](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dominik.pantucek/32/144_2.png) [@dominik.pantucek](https://racket.discourse.group/u/dominik.pantucek)\
**Post date:** [December 12, 2021, 10:44pm UTC](https://racket.discourse.group/t/announcing-uni-table-a-unicode-text-table-renderer-with-ecma-48-sgr-support/278/21 "2021-12-12T22:44:16Z")

</div>

Could you, please, write more details about the type of data being rendered? As I am preparing for 0.8, I actually started streamlining some of the code and turns out that even with contracts and no futures it can perform nicely. I tried 10 columns x 23000 rows table for testing and on i7-1160G7 got:

cpu time: 15916 real time: 17002 gc time: 808

Not bad for a start.

I would appreciate to know:

- the number of columns in your test-case
- their minimum, maximum, and average widths
- whether there are multi-line cells used

I'd like to replicate that and see for myself what can be done before focusing on lazy evaluation and parallel processing (which is definitely post-0.8 feature).

Also the cell clipping/wrapping/re-flowing and the ability to specify fixed column widths is already there. That should help too.

---

<div class="post-metadata">

**Author:** ![dominik.pantucek](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/dominik.pantucek/32/144_2.png) [@dominik.pantucek](https://racket.discourse.group/u/dominik.pantucek)\
**Post date:** [December 16, 2021, 9:08am UTC](https://racket.discourse.group/t/announcing-uni-table-a-unicode-text-table-renderer-with-ecma-48-sgr-support/278/22 "2021-12-16T09:08:06Z")

</div>

I've just released 0.8.2 which computes certain values (like column widths) more efficiently.

@jtp - could you give it a try with that 23k rows table and share results? Also if you could provide me with more details about that test case I would really appreciate that.

You can also specify fixed column widths and wrapping/clipping/re-flowing of cell contents:

```scheme
┏━━━━━━━━━━┳━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━━━━┳━━━━┳━━━━┳━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ ┃r0c1┃r0c2┃r0c3┃r0c4┃ r0c5 ┃r0c6┃r0c7┃r0c8┃ r0c9 ┃
┣━━━━━━━━━━╋━━━━╇━━━━╇━━━━╇━━━━╇━━━━━━━━━━━╇━━━━╇━━━━╇━━━━╇━━━━━━━━━━━━━━━━━━━━┫
┃ ┃ ╎ ╎ ╎r1c4╎ r1c5╎r1c6╎r1c7╎r1c8╎ Lorem ipsum dolor┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ sit amet,┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ consectetur┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎adipiscing elit, sed┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ do eiusmod tempor┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎incididunt ut labore┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ et dolore magna┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ aliqua. Ut enim ad┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ minim veniam, quis┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎nostrud exercitation┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ullamco laboris nisi┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ut aliquip ex ea┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ commodo consequat.┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ Duis aute irure┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ dolor in┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ reprehenderit in┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎voluptate velit esse┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ cillum dolore eu┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ fugiat nulla┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ pariatur. Excepteur┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ sint occaecat┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ cupidatat non┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ proident, sunt in┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎ culpa qui officia┃
┃ ┃ ╎ ╎ ╎ ╎ ╎ ╎ ╎ ╎deserunt mollit anim┃
┃ r1c0┃r1c1╎r1c2╎r1c3╎ ╎ ╎ ╎ ╎ ╎ id est laborum.┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃ r2c0┃r2c1╎r2c2╎r2c3╎r2c4╎ r2c5╎r2c6╎r2c7╎r2c8╎ r2c9┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃ r3c0┃r3c1╎r3c2╎r3c3╎r3c4╎ r3c5╎r3c6╎r3c7╎r3c8╎ r3c9┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃ ┃ ╎ ╎ ╎big ╎big ╎r4c6╎r4c7╎r4c8╎r4c9 ┃
┃ ┃ ╎ ╎ ╎bigg╎bigger ╎ ╎ ╎ ╎ ┃
┃ ┃ ╎ ╎ ╎er ╎the biggest╎ ╎ ╎ ╎ ┃
┃ ┃ ╎ ╎ ╎the ╎ ╎ ╎ ╎ ╎ ┃
┃ ┃ ╎ ╎ ╎bigg╎ ╎ ╎ ╎ ╎ ┃
┃r4c0 ┃r4c1╎r4c2╎r4c3╎est ╎ ╎ ╎ ╎ ╎ ┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃r5c0 ┃r5c1╎r5c2╎r5c3╎r5c4╎r5c5 ╎r5c6╎r5c7╎r5c8╎r5c9 ┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃r6c0 ┃r6c1╎r6c2╎r6c3╎r6c4╎r6c5 ╎r6c6╎r6c7╎r6c8╎r6c9 ┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃r7c0 ┃r7c1╎r7c2╎r7c3╎r7c4╎r7c5 ╎r7c6╎r7c7╎r7c8╎r7c9 ┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃r8c0 ┃r8c1╎r8c2╎r8c3╎r8c4╎r8c5 ╎r8c6╎r8c7╎r8c8╎r8c9 ┃
┣━━━━━━━━━━╉╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┨
┃r9c0 ┃r9c1╎r9c2╎r9c3╎r9c4╎r9c5 ╎r9c6╎r9c7╎r9c8╎r9c9 ┃
┗━━━━━━━━━━┻━━━━┷━━━━┷━━━━┷━━━━┷━━━━━━━━━━━┷━━━━┷━━━━┷━━━━┷━━━━━━━━━━━━━━━━━━━━┛

```

[Previous page](https://racket.discourse.group/t/announcing-uni-table-a-unicode-text-table-renderer-with-ecma-48-sgr-support/278.md?page=1)
