* neovim and luajit?
@ 2020-07-31 20:26 Jack Hill
2021-04-22 5:33 ` Jack Hill
0 siblings, 1 reply; 5+ messages in thread
From: Jack Hill @ 2020-07-31 20:26 UTC (permalink / raw)
To: guix-devel
Hi Guix,
I'm wondering why we use Lua 5.1 instead of LuaJIT for neovim? It seems
that upstream prefers LuaJIT given the non-default configure flag we
use[0] and their FAQ[1].
I don't have an opinion either way. I'm learning about neovim today, and
am curious how we arrived at our configuration.
[0] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id=96a655a77bb087397a9436391e472c36ff0a2ec2#n647
[1] https://github.com/neovim/neovim/wiki/FAQ#why-embed-lua-instead-of-x
Best,
Jack
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: neovim and luajit?
2020-07-31 20:26 neovim and luajit? Jack Hill
@ 2021-04-22 5:33 ` Jack Hill
2021-04-25 7:15 ` Efraim Flashner
0 siblings, 1 reply; 5+ messages in thread
From: Jack Hill @ 2021-04-22 5:33 UTC (permalink / raw)
To: guix-devel, HiPhish
[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]
On Fri, 31 Jul 2020, Jack Hill wrote:
> Hi Guix,
>
> I'm wondering why we use Lua 5.1 instead of LuaJIT for neovim? It seems that
> upstream prefers LuaJIT given the non-default configure flag we use[0] and
> their FAQ[1].
>
> I don't have an opinion either way. I'm learning about neovim today, and am
> curious how we arrived at our configuration.
>
> [0] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id=96a655a77bb087397a9436391e472c36ff0a2ec2#n647
> [1] https://github.com/neovim/neovim/wiki/FAQ#why-embed-lua-instead-of-x
>
> Best,
> Jack
I've returned to the above question. With the attached patch, neovim
builds on x86_64 and performs basic editing functions. I did not test it
with any extra packages or plugins.
In addition to what I said before, I'm also interested in LuaJIT because
it supports the 5.1 language and still seems to be developed upstream. Lua
is no longer developing the 5.1 series and the newer series have an
incompatible language.
A downside to using LuaJIT is that it doesn't support all the
architectures that Guix supports [2]. In particular, it looks like
aarch64 and ppc64el are missing.
[2] https://luajit.org/install.html
Best,
Jack
P.S. Maybe its time to work on the Lua language of Guile 😀
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=0001-gnu-neovim-Use-luajit.patch, Size: 1857 bytes --]
From eea95ade77aabd0528043a68fee4d2c45a334602 Mon Sep 17 00:00:00 2001
From: Jack Hill <jackhill@jackhill.us>
Date: Thu, 22 Apr 2021 01:17:56 -0400
Subject: [PATCH] gnu: neovim: Use luajit.
* gnu/packages/vim.scm (neovim)[inputs]: Replace lua-5.1 with luajit.
[arguments]: Remove "-DPREFER_LUA:BOOL=YES" from #:configure-flags, and adjust
"set-lua-paths" phase to use luajit.
---
gnu/packages/vim.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm
index 231fae9298..35608a2220 100644
--- a/gnu/packages/vim.scm
+++ b/gnu/packages/vim.scm
@@ -643,7 +643,6 @@ are detected, the user is notified.")))
`(#:modules ((srfi srfi-26)
(guix build cmake-build-system)
(guix build utils))
- #:configure-flags '("-DPREFER_LUA:BOOL=YES")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-lua-paths
@@ -658,7 +657,7 @@ are detected, the user is notified.")))
(let ((path (string-append prefix "/share/lua/" lua-version)))
(string-append path "/?.lua;" path "/?/?.lua"))))
(lua-inputs (map (cute assoc-ref %build-inputs <>)
- '("lua"
+ '("luajit"
"lua-luv"
"lua-lpeg"
"lua-bitop"
@@ -684,7 +683,7 @@ are detected, the user is notified.")))
("unibilium" ,unibilium)
("jemalloc" ,jemalloc)
("libiconv" ,libiconv)
- ("lua" ,lua-5.1)
+ ("luajit" ,luajit)
("lua-luv" ,lua5.1-luv)
("lua-lpeg" ,lua5.1-lpeg)
("lua-bitop" ,lua5.1-bitop)
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: neovim and luajit?
2021-04-22 5:33 ` Jack Hill
@ 2021-04-25 7:15 ` Efraim Flashner
2021-04-25 9:23 ` HiPhish
0 siblings, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2021-04-25 7:15 UTC (permalink / raw)
To: Jack Hill; +Cc: guix-devel, HiPhish
[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]
On Thu, Apr 22, 2021 at 01:33:58AM -0400, Jack Hill wrote:
> On Fri, 31 Jul 2020, Jack Hill wrote:
>
> > Hi Guix,
> >
> > I'm wondering why we use Lua 5.1 instead of LuaJIT for neovim? It seems
> > that upstream prefers LuaJIT given the non-default configure flag we
> > use[0] and their FAQ[1].
> >
> > I don't have an opinion either way. I'm learning about neovim today, and
> > am curious how we arrived at our configuration.
> >
> > [0] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id=96a655a77bb087397a9436391e472c36ff0a2ec2#n647
> > [1] https://github.com/neovim/neovim/wiki/FAQ#why-embed-lua-instead-of-x
> >
> > Best,
> > Jack
>
> I've returned to the above question. With the attached patch, neovim builds
> on x86_64 and performs basic editing functions. I did not test it with any
> extra packages or plugins.
>
> In addition to what I said before, I'm also interested in LuaJIT because it
> supports the 5.1 language and still seems to be developed upstream. Lua is
> no longer developing the 5.1 series and the newer series have an
> incompatible language.
>
> A downside to using LuaJIT is that it doesn't support all the architectures
> that Guix supports [2]. In particular, it looks like aarch64 and ppc64el are
> missing.
>
> [2] https://luajit.org/install.html
>
> Best,
> Jack
>
> P.S. Maybe its time to work on the Lua language of Guile 😀
Our copy of luajit supports aarch64 so I don't think that's a problem.
(Last I checked) Debian has a patch to replace powerpc support with
64-bit ppc support. I'd go ahead with the change if that's the direction
that neovim is going and let the powerpc64le people decide between using
lua5.1 or just removing lua support on a per-architecture basis for
ppc64le.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: neovim and luajit?
2021-04-25 7:15 ` Efraim Flashner
@ 2021-04-25 9:23 ` HiPhish
2021-04-29 22:28 ` Jack Hill
0 siblings, 1 reply; 5+ messages in thread
From: HiPhish @ 2021-04-25 9:23 UTC (permalink / raw)
To: Jack Hill, guix-devel
I just want to add my 2 cents to the discussion. Officially Neovim supports only
Lua 5.1 as its extension language according to the manual (`:h lua-intro`):
> The Lua 5.1 language is builtin and always available.
Using LuaJIT allows the use of some extensions to Lua 5.1, but plugins relying
on this functionality are strictly speaking non-portable because not all users
might have them. I don't know if it is possible with Guix, but the ideal
solution would be to use LuaJIT where available and fall back on Lua 5.1
otherwise.
On Sunday, 25 April 2021 09:15:57 CEST Efraim Flashner wrote:
> On Thu, Apr 22, 2021 at 01:33:58AM -0400, Jack Hill wrote:
> > On Fri, 31 Jul 2020, Jack Hill wrote:
> > > Hi Guix,
> > >
> > > I'm wondering why we use Lua 5.1 instead of LuaJIT for neovim? It seems
> > > that upstream prefers LuaJIT given the non-default configure flag we
> > > use[0] and their FAQ[1].
> > >
> > > I don't have an opinion either way. I'm learning about neovim today, and
> > > am curious how we arrived at our configuration.
> > >
> > > [0]
> > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/vim.scm?id
> > > =96a655a77bb087397a9436391e472c36ff0a2ec2#n647 [1]
> > > https://github.com/neovim/neovim/wiki/FAQ#why-embed-lua-instead-of-x
> > >
> > > Best,
> > > Jack
> >
> > I've returned to the above question. With the attached patch, neovim
> > builds
> > on x86_64 and performs basic editing functions. I did not test it with any
> > extra packages or plugins.
> >
> > In addition to what I said before, I'm also interested in LuaJIT because
> > it
> > supports the 5.1 language and still seems to be developed upstream. Lua is
> > no longer developing the 5.1 series and the newer series have an
> > incompatible language.
> >
> > A downside to using LuaJIT is that it doesn't support all the
> > architectures
> > that Guix supports [2]. In particular, it looks like aarch64 and ppc64el
> > are missing.
> >
> > [2] https://luajit.org/install.html
> >
> > Best,
> > Jack
> >
> > P.S. Maybe its time to work on the Lua language of Guile 😀
>
> Our copy of luajit supports aarch64 so I don't think that's a problem.
> (Last I checked) Debian has a patch to replace powerpc support with
> 64-bit ppc support. I'd go ahead with the change if that's the direction
> that neovim is going and let the powerpc64le people decide between using
> lua5.1 or just removing lua support on a per-architecture basis for
> ppc64le.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: neovim and luajit?
2021-04-25 9:23 ` HiPhish
@ 2021-04-29 22:28 ` Jack Hill
0 siblings, 0 replies; 5+ messages in thread
From: Jack Hill @ 2021-04-29 22:28 UTC (permalink / raw)
To: HiPhish; +Cc: guix-devel
On Sun, 25 Apr 2021, HiPhish wrote:
> I just want to add my 2 cents to the discussion. Officially Neovim supports only
> Lua 5.1 as its extension language according to the manual (`:h lua-intro`):
>
>> The Lua 5.1 language is builtin and always available.
>
> Using LuaJIT allows the use of some extensions to Lua 5.1, but plugins relying
> on this functionality are strictly speaking non-portable because not all users
> might have them. I don't know if it is possible with Guix, but the ideal
> solution would be to use LuaJIT where available and fall back on Lua 5.1
> otherwise.
Yes, I believe that this would be possible, but based on what Efraim says
it may not even be needed.
> On Sunday, 25 April 2021 09:15:57 CEST Efraim Flashner wrote:
>>
>> Our copy of luajit supports aarch64 so I don't think that's a problem.
>> (Last I checked) Debian has a patch to replace powerpc support with
>> 64-bit ppc support. I'd go ahead with the change if that's the direction
>> that neovim is going and let the powerpc64le people decide between using
>> lua5.1 or just removing lua support on a per-architecture basis for
>> ppc64le.
That does sound promising.
Therefore, I've proposed switching to luajit in #48109
https://issues.guix.gnu.org/48109
Thanks for your replies!
Jack
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-29 22:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-31 20:26 neovim and luajit? Jack Hill
2021-04-22 5:33 ` Jack Hill
2021-04-25 7:15 ` Efraim Flashner
2021-04-25 9:23 ` HiPhish
2021-04-29 22:28 ` Jack Hill
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).