<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/generators/gen_eval.lua, branch usermarks</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>build: make generated source files reproducible #21586</title>
<updated>2023-01-23T09:26:46+00:00</updated>
<author>
<name>Arnout Engelen</name>
<email>arnout@engelen.eu</email>
</author>
<published>2023-01-23T09:26:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=cb757f2663e6950e655c6306d713338dfa66b18d'/>
<id>cb757f2663e6950e655c6306d713338dfa66b18d</id>
<content type='text'>
Problem:
Build is not reproducible, because generated source files (.c/.h/) are not
deterministic, mostly because Lua pairs() is unordered by design (for security).

https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671
https://www.lua.org/manual/5.1/manual.html#pdf-next
&gt; The order in which the indices are enumerated is not specified [...]
&gt;
&gt;&gt; The hardening of the VM deliberately randomizes string hashes. This in
&gt;&gt; turn randomizes the iteration order of tables with string keys.

Solution:
- Update the code generation scripts to be deterministic.
    - That is only a partial solution: the exported function
      (funcs_metadata.generated.h) and ui event
      (ui_events_metadata.generated.h) metadata have some mpack'ed
      tables, which are not serialized deterministically.
    - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can
      inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0)
      that preserves table order.
    - Longer-term we should change the mpack'ed data structure so it no
      longer uses tables keyed by strings.

Closes #20124

Co-Authored-By: dundargoc &lt;gocdundar@gmail.com&gt;
Co-Authored-By: Arnout Engelen &lt;arnout@bzzt.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Build is not reproducible, because generated source files (.c/.h/) are not
deterministic, mostly because Lua pairs() is unordered by design (for security).

https://github.com/LuaJIT/LuaJIT/issues/626#issuecomment-707005671
https://www.lua.org/manual/5.1/manual.html#pdf-next
&gt; The order in which the indices are enumerated is not specified [...]
&gt;
&gt;&gt; The hardening of the VM deliberately randomizes string hashes. This in
&gt;&gt; turn randomizes the iteration order of tables with string keys.

Solution:
- Update the code generation scripts to be deterministic.
    - That is only a partial solution: the exported function
      (funcs_metadata.generated.h) and ui event
      (ui_events_metadata.generated.h) metadata have some mpack'ed
      tables, which are not serialized deterministically.
    - As a workaround, introduce `PRG_GEN_LUA` cmake setting, so you can
      inject a modified build of luajit (with LUAJIT_SECURITY_PRN=0)
      that preserves table order.
    - Longer-term we should change the mpack'ed data structure so it no
      longer uses tables keyed by strings.

Closes #20124

Co-Authored-By: dundargoc &lt;gocdundar@gmail.com&gt;
Co-Authored-By: Arnout Engelen &lt;arnout@bzzt.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.2001: some source files are too big (#21231)</title>
<updated>2022-11-29T08:47:29+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-11-29T08:47:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0b79137c59fbe44bded76f123602e552dc6f7b03'/>
<id>0b79137c59fbe44bded76f123602e552dc6f7b03</id>
<content type='text'>
Problem:    Some source files are too big.
Solution:   Move buffer and window related functions to evalbuffer.c and
            evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898)

https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Some source files are too big.
Solution:   Move buffer and window related functions to evalbuffer.c and
            evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898)

https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e</pre>
</div>
</content>
</entry>
<entry>
<title>build: allow IWYU to fix includes for all .c files</title>
<updated>2022-11-15T09:30:03+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2022-09-11T15:12:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=66360675cf4d091b7460e4a8e1435c13216c1929'/>
<id>66360675cf4d091b7460e4a8e1435c13216c1929</id>
<content type='text'>
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.

Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.

Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
</pre>
</div>
</content>
</entry>
<entry>
<title>perf(api): allow to use an arena for return values</title>
<updated>2022-08-23T16:34:24+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-08-23T07:33:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c0d60526541a3cf977ae623471ae4a347b492af1'/>
<id>c0d60526541a3cf977ae623471ae4a347b492af1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): allow some viml functions to run in fast</title>
<updated>2022-05-17T09:29:33+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2022-04-29T16:26:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5c41165c8e89356bdb7d1b5835d1f79725b62d2c'/>
<id>5c41165c8e89356bdb7d1b5835d1f79725b62d2c</id>
<content type='text'>
This change adds the necessary plumbing to annotate functions in funcs.c
as being allowed in run in luv fast events.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds the necessary plumbing to annotate functions in funcs.c
as being allowed in run in luv fast events.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(eval): use Hashy McHashFace instead of gperf</title>
<updated>2022-05-12T18:01:04+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2022-05-12T16:56:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=36613b888bae7df764a26a28ca1627a2c0c2edeb'/>
<id>36613b888bae7df764a26a28ca1627a2c0c2edeb</id>
<content type='text'>
this removes gperf as a build dependency
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this removes gperf as a build dependency
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.1807: more functions can be used as a method</title>
<updated>2021-08-12T21:35:20+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2021-08-06T16:09:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=003c8acc8a9863932430bfb51bee8403b964c19b'/>
<id>003c8acc8a9863932430bfb51bee8403b964c19b</id>
<content type='text'>
Problem:    More functions can be used as a method.
Solution:   Add append(), appendbufline(), assert_equal(), etc.
            Also add the :eval command.
https://github.com/vim/vim/commit/25e42231d3ee27feec2568fa4be2aa2bfba82ae5

:eval is already ported.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    More functions can be used as a method.
Solution:   Add append(), appendbufline(), assert_equal(), etc.
            Also add the :eval command.
https://github.com/vim/vim/commit/25e42231d3ee27feec2568fa4be2aa2bfba82ae5

:eval is already ported.
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:8.1.1803: all builtin functions are global</title>
<updated>2021-08-12T21:35:19+00:00</updated>
<author>
<name>Sean Dewar</name>
<email>seandewar@users.noreply.github.com</email>
</author>
<published>2021-08-05T18:46:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e6be6c307a832d661d2a6269ad2d322e4bf5e9cc'/>
<id>e6be6c307a832d661d2a6269ad2d322e4bf5e9cc</id>
<content type='text'>
Problem:    All builtin functions are global.
Solution:   Add the method call operator -&gt;.  Implemented for a limited number
            of functions.
https://github.com/vim/vim/commit/ac92e25a33c37ec5becbfffeccda136c73b761ac

- Note that to *exactly* port hunk @@ -7376,18 +7444,19 from
  handle_subscript(), we need the :scriptversion patches (I have an open
  PR for those, but this patch works fine without them anyway).
- Port call_internal_func() from v7.4.2058.
- Adjust some error messages in tests, as they rely on the Blob patches.
- Add a modeline to test_method.vim.

Ignore the global_functions and base_method tables and prefer the
current GPerf implementation. Instead, add an extra base_arg field to
VimLFuncDef that holds the number of the argument to use as the base
(1-indexed, so that 0 may be used to refer to functions that cannot be
used as methods).

This also means we support using any argument as a base from the get-go,
rather than just the first (Vim includes this ability in future patches,
however).

To mark a function as usable as a method, use the "base" key as
described in eval.lua.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    All builtin functions are global.
Solution:   Add the method call operator -&gt;.  Implemented for a limited number
            of functions.
https://github.com/vim/vim/commit/ac92e25a33c37ec5becbfffeccda136c73b761ac

- Note that to *exactly* port hunk @@ -7376,18 +7444,19 from
  handle_subscript(), we need the :scriptversion patches (I have an open
  PR for those, but this patch works fine without them anyway).
- Port call_internal_func() from v7.4.2058.
- Adjust some error messages in tests, as they rely on the Blob patches.
- Add a modeline to test_method.vim.

Ignore the global_functions and base_method tables and prefer the
current GPerf implementation. Instead, add an extra base_arg field to
VimLFuncDef that holds the number of the argument to use as the base
(1-indexed, so that 0 may be used to refer to functions that cannot be
used as methods).

This also means we support using any argument as a base from the get-go,
rather than just the first (Vim includes this ability in future patches,
however).

To mark a function as usable as a method, use the "base" key as
described in eval.lua.
</pre>
</div>
</content>
</entry>
<entry>
<title>api: allow open non-current buffer as terminal (+ xmas bonus)</title>
<updated>2021-03-12T13:44:47+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2020-12-20T15:52:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ed0893698777ae13c06cb3c76a8b7b4b9a967d5f'/>
<id>ed0893698777ae13c06cb3c76a8b7b4b9a967d5f</id>
<content type='text'>
vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
</pre>
</div>
</content>
</entry>
<entry>
<title>tree-sitter: implement query functionality and highlighting prototype [skip.lint]</title>
<updated>2019-12-22T11:51:46+00:00</updated>
<author>
<name>Björn Linse</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2019-09-28T12:27:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=440695c29696f261337227e5c419aa1cf313c2dd'/>
<id>440695c29696f261337227e5c419aa1cf313c2dd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
