Commit graph

1095 commits

Author SHA1 Message Date
Kovid Goyal
31a5fcf297
DRYer 2024-02-25 09:57:41 +05:30
Kovid Goyal
561712090d
Fix cmplt implementation 2024-02-25 09:57:41 +05:30
Kovid Goyal
d9190ea675
DRYer 2024-02-25 09:57:41 +05:30
Kovid Goyal
57f4ea4d4a
Add some tests for broadcast from constant intrinsic 2024-02-25 09:57:41 +05:30
Kovid Goyal
9b0ae8d403
Dont use VEX encoded instructions for 128 bit ISA 2024-02-25 09:57:41 +05:30
Kovid Goyal
aed0611fb8
Avoid double trailing RET 2024-02-25 09:57:40 +05:30
Kovid Goyal
5a5e31c38b
Also zero upper at start of function 2024-02-25 09:57:40 +05:30
Kovid Goyal
db2e0e816d
Fix mixing of register types in the same function 2024-02-25 09:57:40 +05:30
Kovid Goyal
a298781b85
DRYer 2024-02-25 09:57:40 +05:30
Kovid Goyal
d5cd9ef2ca
... 2024-02-25 09:57:40 +05:30
Kovid Goyal
da31db3212
... 2024-02-25 09:57:40 +05:30
Kovid Goyal
601c4ad4df
Fix some typos 2024-02-25 09:57:40 +05:30
Kovid Goyal
68d800d4fa
make clean should clean generated asm as well 2024-02-25 09:57:40 +05:30
Kovid Goyal
9fc3db1dd1
Work on C0 index func 2024-02-25 09:57:40 +05:30
Kovid Goyal
161eae78b6
Make generated asm_* files world readable 2024-02-25 09:57:40 +05:30
Kovid Goyal
77cfd44f24
More efficient clearing of register to all zeros or all ones 2024-02-25 09:57:39 +05:30
Kovid Goyal
59be7213cf
Make set1_epi8 more general 2024-02-25 09:57:39 +05:30
Kovid Goyal
d60dacbd09
Implement > and < intrinsics for vector registers 2024-02-25 09:57:39 +05:30
Kovid Goyal
82b7b4fcce
Make a re-useable template for generating ASM index functions with different tests 2024-02-25 09:57:39 +05:30
Kovid Goyal
4e6138d785
Generate SIMD code during build 2024-02-25 09:57:39 +05:30
Kovid Goyal
de8c1e0206
Work on porting SIMD vt arser to Go for the kittens 2024-02-25 09:57:39 +05:30
Kovid Goyal
fa11858a72
Make bash integration tests more robust on macOS 2024-02-25 09:57:38 +05:30
Kovid Goyal
1293ee60e0
... 2024-02-25 09:57:38 +05:30
Kovid Goyal
d5fae07ab7
More help text for the benchmark kitten 2024-02-25 09:57:36 +05:30
Kovid Goyal
58dbcf0840
... 2024-02-25 09:57:36 +05:30
Kovid Goyal
0340c3c8f7
Ensure CSI state reset at end of test 2024-02-25 09:57:36 +05:30
Kovid Goyal
d8a53fbafd
Retry on temp errors when reading from terminal 2024-02-25 09:57:36 +05:30
Kovid Goyal
f0efb1cb19
Also clear screen at end of each loop when rendering 2024-02-25 09:57:35 +05:30
Kovid Goyal
4eb49b3320
Simplify benchmark kitten
On macOS reading from the same tty device file as we are writing too in
another thread gives continuous EAGAIN errors. We dont actually need
simultaneous read/write, so move the reads to the end.
2024-02-25 09:57:35 +05:30
Kovid Goyal
0fcb055246
tty: retry on temporary read errors 2024-02-25 09:57:35 +05:30
Kovid Goyal
61a89a14b6
Ignore temporary write failures in benchmark kitten 2024-02-25 09:57:35 +05:30
Kovid Goyal
8d01a42db1
Make the default number of repetitions for benchmark 100 2024-02-25 09:57:35 +05:30
Kovid Goyal
c1793d8781
Pause rendering per repetition
Needed when number of repetitions is large enough to cause
paused rendering to be aborted
2024-02-25 09:57:33 +05:30
Kovid Goyal
fce896c480
Do not render when benchmarking parser to better isolate parser performance 2024-02-25 09:57:33 +05:30
Kovid Goyal
0f6d11351b
Fix benchmark rate calculation 2024-02-25 09:57:30 +05:30
Kovid Goyal
cc6dc96c90
Allow setting benchmark options 2024-02-25 09:57:29 +05:30
Kovid Goyal
93430cd5f4
Images benchmark should not measure speed of zlib 2024-02-25 09:57:29 +05:30
Kovid Goyal
9eb91984dd
Cleanup benchmark warmup code 2024-02-25 09:57:29 +05:30
Kovid Goyal
ad7175a24d
... 2024-02-25 09:57:29 +05:30
Kovid Goyal
24232ba277
Ensure goroutine has started before sending data 2024-02-25 09:57:28 +05:30
Kovid Goyal
0f6e5fe57e
Fix benchmark rate calculation 2024-02-25 09:57:28 +05:30
Kovid Goyal
17cb65e981
Adjust amount of data in the benchmarks for more consistent timing 2024-02-25 09:57:28 +05:30
Kovid Goyal
f2153f060d
add unicode benchmark 2024-02-25 09:57:28 +05:30
Kovid Goyal
e8f67281cf
Warmup font rendering before running benchmark 2024-02-25 09:57:28 +05:30
Kovid Goyal
9cf425006f
... 2024-02-25 09:57:28 +05:30
Kovid Goyal
a75fb6509e
... 2024-02-25 09:57:27 +05:30
Kovid Goyal
f0afdc51af
... 2024-02-25 09:57:27 +05:30
Kovid Goyal
ad7f671a7b
Add a long escape code benchmark 2024-02-25 09:57:27 +05:30
Kovid Goyal
5921ca1139
Add images benchmark 2024-02-25 09:57:26 +05:30
Kovid Goyal
822c9cb1d6
... 2024-02-25 09:57:26 +05:30
Kovid Goyal
529de9c91d
Allow specifying benchmarks to run on the command line 2024-02-25 09:57:26 +05:30
Kovid Goyal
7914523a16
Add a CSI + ascii test 2024-02-25 09:57:26 +05:30
Kovid Goyal
d39c71f927
Round the time to two digit precision 2024-02-25 09:57:26 +05:30
Kovid Goyal
934f2ede0b
Start work on simple benchmark tool 2024-02-25 09:57:26 +05:30
Kovid Goyal
47a493c090
Increase chunk size for graphics protocol since the VT parser now supports it 2024-02-25 09:57:25 +05:30
Kovid Goyal
52025ff030
misc parser and test fixes 2024-02-25 09:57:22 +05:30
Kovid Goyal
946d28ae37
Completion for kitty @ load-config --override xxx 2024-02-10 14:52:29 +05:30
Kovid Goyal
97e2d41233
Completion for kitty @ action 2024-02-10 14:01:45 +05:30
Kovid Goyal
777fd5350b
Add a test for Go flock implementation 2024-02-09 11:54:51 +05:30
Kovid Goyal
a1f2a7df4d
Port new shlex code to Go 2023-12-04 14:14:11 +05:30
Kovid Goyal
2b751f56bd
Port test 2023-11-22 10:50:05 +05:30
Kovid Goyal
882d471c90
Make config line parsing in Go use same algorithm as in python 2023-11-22 10:01:45 +05:30
Kovid Goyal
fc64ef41b3
when parsing conf files in go accept both space and tab as key separators 2023-11-22 09:49:33 +05:30
Kovid Goyal
70bc4f1033
Generate man pages for kitten and all its sub-commands recursively
Fixes #6808
2023-11-11 17:09:23 +05:30
Kovid Goyal
65754a2032
... 2023-11-11 08:45:39 +05:30
Kovid Goyal
24d9d502b1
Set window title when showing errors 2023-10-29 08:24:08 +05:30
Kovid Goyal
7292d1c9df
Clean up mouse-demo kitten
Fixes #6738
2023-10-21 07:55:23 +05:30
Kovid Goyal
314fe4fe4a
Allow launched background process to work with --allow-remote-control
Use a dedicated socketpair for such processes. Fixes #6712
2023-10-18 19:56:58 +05:30
Kovid Goyal
a9b412baba
Fix a regression that broke kitten update-self
Fixes #6729
2023-10-18 19:19:35 +05:30
Kovid Goyal
6a50af12d3
Make set_pointer_shapes private 2023-10-17 21:47:03 +05:30
Kovid Goyal
ee8399ba56
Port the mouse_demo kitten to Go 2023-10-17 20:21:22 +05:30
Kovid Goyal
81b032a161
Dont expand cwd=current in rc launch
This is easily done at the command line. And its semantics are
are to refer to cwd of active window.
2023-10-17 05:01:28 +05:30
Kovid Goyal
ddb121b418
Remote control launch: Fix the --copy-env option not copying current environment variables
Fixes #6724
2023-10-16 22:32:51 +05:30
Kovid Goyal
187fa996f8
Add the cell pointer shape 2023-10-16 20:33:12 +05:30
Kovid Goyal
17ce474b79
Use hand pointer when hovering over buttons in ask kitten 2023-10-15 21:35:51 +05:30
Kovid Goyal
d66074f19f
Add pointer shape enum to kittens 2023-10-15 21:03:41 +05:30
Kovid Goyal
00dc5a8dc5
Fix a regression caused by rewrite of kittens to Go that made various kittens reset colors in a terminal when the colors were changed by escape code
Fixes #6708
2023-10-12 20:19:28 +05:30
Kovid Goyal
455d0a6048
Dont show hidden sub-commands during completion 2023-10-10 05:41:27 +05:30
Kovid Goyal
5d0dabe51c
completion: match exe on basename alone 2023-10-10 05:22:40 +05:30
Kovid Goyal
9e514df604
More linter fixes 2023-10-05 10:07:25 +05:30
Kovid Goyal
8865d3231a
Fix themes that dont define a background color incorrectly being classified as light
The default bg in kitty is dark
2023-10-05 09:36:59 +05:30
Kovid Goyal
59e4c6660e
run-shell: Allow specifying the cwd 2023-09-24 10:40:21 +05:30
Kovid Goyal
38be3e98a1
More linter fixes 2023-09-24 09:16:27 +05:30
Kovid Goyal
4af1a38507
More linter fixes 2023-09-24 09:06:15 +05:30
Kovid Goyal
c280a28155
Dont use os.Remove on failures in syscall_shm
Use shm_unlink instead
2023-09-23 11:16:30 +05:30
Kovid Goyal
24598b846c
... 2023-09-23 11:09:51 +05:30
Kovid Goyal
dc43f0d42f
... 2023-09-23 11:08:55 +05:30
Kovid Goyal
5fede41205
Always use fallocate() on Linux for SHM creation 2023-09-23 10:55:15 +05:30
Kovid Goyal
6619bf33b0
Using fcntl() based fallocate on darwin doesnt work with file descriptors returned by shm_open 2023-09-23 10:39:10 +05:30
Kovid Goyal
38bac98c12
Fix build of fallocate_darwin.go 2023-09-23 10:08:04 +05:30
Kovid Goyal
2e4f3dab41
Use fallocate() rather than truncate() when creating SHM memory
With truncate() the OS might not actually allocate the space leading to
a SIGBUS if /dev/shm runs out of space when actually using the mmap.

By using fallocate we ensure that once the SHM mmap is created it wont
fail
2023-09-23 09:53:17 +05:30
Kovid Goyal
911c80aa3b
More linter fixes 2023-09-22 12:20:37 +05:30
Kovid Goyal
fd85dfb417
DRYer 2023-09-22 12:13:17 +05:30
Kovid Goyal
c650bd0aac
icat: Dont open the controlling terminal to query for size if stdout is a terminal, use it instead 2023-09-22 12:10:21 +05:30
Kovid Goyal
fc1331cfdc
Dont call tcgetattr when no operations are specified 2023-09-22 09:37:48 +05:30
Kovid Goyal
fe4fdaefb9
Remove unused code 2023-09-22 09:25:21 +05:30
Kovid Goyal
704ae40dee
More linter fixes 2023-09-22 09:24:31 +05:30
Kovid Goyal
1a32e62ebf
More linter fixes 2023-09-18 21:07:39 +05:30
Kovid Goyal
7faf216f9e
More linter fixes 2023-09-18 20:59:47 +05:30
Kovid Goyal
6bafdedd65
Fix some linter issues 2023-09-18 20:38:08 +05:30
Kovid Goyal
bd036040a6
themes kitten: Allow absolute paths for --config-file-name
Fixes #6638
2023-09-18 20:31:30 +05:30
Kovid Goyal
863adb3e8d
Go: Fix parsing of nullable colors
Fixes #6629
2023-09-15 20:36:24 +05:30
Kovid Goyal
5c4efc0fd7
... 2023-09-14 08:24:43 +05:30
Kovid Goyal
93618842ae
Make a couple of other Set API functions nil-safe 2023-09-12 15:37:24 +05:30
Kovid Goyal
2d7bbf60cc
Fix #6615 2023-09-12 15:34:09 +05:30
Kovid Goyal
d1d888ce19
Remove unnecessary copy of the decoder array 2023-09-04 22:28:18 +05:30
Kovid Goyal
1f4386fd08
... 2023-09-04 21:44:46 +05:30
Kovid Goyal
34e5c7f8aa
Ensure efficient conversion for base85 string API 2023-09-04 21:39:03 +05:30
Kovid Goyal
541c0cdde4
Do not build decode table for base85 until it is actually needed
Also make the tests actual tests
2023-09-04 21:32:25 +05:30
Kovid Goyal
0107d1cb89
Import base85.go into tree
Upstream is not maintained last commit was six years ago and there
are various improvements to be had in the code
2023-09-04 20:29:20 +05:30
Kovid Goyal
4ffb22199b
Cleanup previous PR 2023-09-03 18:59:37 +05:30
Jake Stewart
8754d80832 add tests for go config parser 2023-09-03 16:39:27 +08:00
Jake Stewart
0aa4c850ba add line break syntax to go config parser 2023-09-03 16:39:13 +08:00
Kovid Goyal
0be1295023
kitten run-shell: Make kitty terminfo database available if needed before starting the shell 2023-09-01 22:05:26 +05:30
Kovid Goyal
71a2d7359a
Function to extract terminfo 2023-09-01 19:41:46 +05:30
Kovid Goyal
9702f08698
kitten run-shell: Allow specifying env vars when running the shell 2023-08-30 14:12:10 +05:30
Eng Zer Jun
77563cebb0
cli/command: remove redundant nil check
From the Go specification:

  "1. For a nil slice, the number of iterations is 0." [1]

Therefore, an additional nil check for before the loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-08-30 11:50:52 +08:00
Kovid Goyal
4f72bb9894
Replace utils.Once with stdlib sync.OnceValue 2023-08-09 12:08:42 +05:30
Kovid Goyal
49ea26968c
Bump go version to 1.21
Allows us to use the much faster builtin min/max functions
for two variable min/max
2023-08-09 11:58:16 +05:30
Kovid Goyal
696ef40e38
Remove already done TODO note 2023-08-08 21:20:16 +05:30
Kovid Goyal
f8b8f68e38
Make wait_for_write_complete more robust
It now actually waits for the expected sentinel id even when there are
no pending writes
2023-08-08 17:17:51 +05:30
Kovid Goyal
8bf5b92cd6
Merge branch 'master-1' of https://github.com/hezhizhen/kitty 2023-08-08 16:47:27 +05:30
Zhizhen He
47e130c4c0
Fix typo 2023-08-08 16:39:00 +08:00
Kovid Goyal
0e87e0c7de
Work on refactoring send kitten to fix various issues 2023-08-08 06:28:43 +05:30
Kovid Goyal
0971e8c630
strings.Title works better than cases.Title 2023-08-07 21:49:50 +05:30
Kovid Goyal
04febb20d5
... 2023-08-07 15:45:46 +05:30
Kovid Goyal
bd68dc75f3
simplify code 2023-08-07 12:57:01 +05:30
Kovid Goyal
2a5a89e01c
Speed up write performance to loop
20x speed for large numbers of queued writes by avoiding pinging between
the writer and main goroutines
2023-08-05 13:53:32 +05:30
Kovid Goyal
a3369465dc
Remove unused code 2023-08-05 10:11:15 +05:30
Kovid Goyal
ec77d051df
Replace another deprecated function 2023-08-04 23:02:55 +05:30
Kovid Goyal
341d845b9a
Port calls to slices.Sort functions since they now need a cmp() function rather than a less() function
Also rename os.SEEK_* to io.Seek* as the former has been deprecated
2023-08-04 22:50:13 +05:30
Kovid Goyal
ffd997c338
Detect prompt lines in code blocks 2023-07-30 19:49:47 +05:30
Kovid Goyal
ce593dbb5f
lp.Println() should act live fmt.Println()
also use a dedicated error type for signalining perm denied
2023-07-30 19:49:47 +05:30
Kovid Goyal
a55a918d4f
Improve stack trace formatting 2023-07-30 19:49:47 +05:30
Kovid Goyal
2cae0ab695
Dont wait for cancel response when user denies permission 2023-07-30 19:49:46 +05:30
Kovid Goyal
ca485cc0f7
Make getting function name a utility function 2023-07-30 19:49:46 +05:30
Kovid Goyal
5881041fcd
Ensure shortduration is no more than 8 chars 2023-07-30 19:49:46 +05:30
Kovid Goyal
b60d15fe75
Make short duration formatter re-useable 2023-07-30 19:49:46 +05:30
Kovid Goyal
4d686b2f47
Nicer string repr for operations 2023-07-30 19:49:46 +05:30
Kovid Goyal
d0490672e1
Fix block range coalescing not working in algorithm.c 2023-07-30 19:49:46 +05:30
Kovid Goyal
aff7f19580
DRYer 2023-07-30 19:49:46 +05:30
Kovid Goyal
b3819d3226
Ensure output.Write is not called outside of the stream decompressor function 2023-07-30 19:49:45 +05:30
Kovid Goyal
301f309444
... 2023-07-30 19:49:45 +05:30
Kovid Goyal
42c9f30618
Change receive code to use new streaming decomp infra 2023-07-30 19:49:45 +05:30
Kovid Goyal
b4d8eaa0fe
... 2023-07-30 19:49:45 +05:30
Kovid Goyal
a210e0c977
Simplify stream decompressor 2023-07-30 19:49:45 +05:30
Kovid Goyal
c8f35019f0
Fix debugprintln to forwarded stdio implementation 2023-07-30 19:49:45 +05:30
Kovid Goyal
d46590c2e6
Fix fd leak in debugprintln 2023-07-30 19:49:45 +05:30
Kovid Goyal
6b5520f07a
More work on porting the receive kitten 2023-07-30 19:49:45 +05:30
Kovid Goyal
3d5fdad029
More work on porting receive kitten 2023-07-30 19:49:44 +05:30