Re: Lua Loader Failure to Include
On Mon, Feb 11, 2019 at 9:14 AM Cy Schubert wrote: > > On February 11, 2019 5:05:37 AM PST, Cy Schubert > wrote: > >Hi, > > > >Under the old Forth loader the line: > > > > include /boot/testbed/test_sys > > > >would load the file and execute loader commands. > > > >However the the Lua loader results in the following: > > > >OK include /boot/testbed/amd64-current-r > >no error message > >OK > > > >Looking at the code, interp_include() expects to run actual Lua code > >using luaL_dofile(). Is this an intended change? > > > >The loader statements the file above is intending to execute are: > > > >echo > >echo > >echo testbed/amd64-current-r (12.0-CURRENT) loader file selected > >set bootdev=disk1s4a: > >include /boot/testbed/current.hints > >include /boot/testbed/do_load_KOMQUATS > > > >Let me know if I am to rewrite these loader statements into Lua or > >whether the Lua loader should be taught to read loader statements > >instead. > > Thinking about this while travelling to $JOB, it's probably best to leave it > as is. I'll rewrite the includes into Lua. The benefit is greater flexibility > and functionality. > Indeed, this is the best course of action. The translation shouldn't be too hard -- the main caveat to note is that your current.hints include likely can't be required in directly, you'll need to run it through config.load(). I intend to write up a wiki page or something for converting common Forth-isms to either portable loader.conf(5) directives or Lua-specific equivalents, depending on the feasibility of the former. Thanks, Kyle Evans ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Lua Loader Failure to Include
On February 11, 2019 5:05:37 AM PST, Cy Schubert wrote: >Hi, > >Under the old Forth loader the line: > > include /boot/testbed/test_sys > >would load the file and execute loader commands. > >However the the Lua loader results in the following: > >OK include /boot/testbed/amd64-current-r >no error message >OK > >Looking at the code, interp_include() expects to run actual Lua code >using luaL_dofile(). Is this an intended change? > >The loader statements the file above is intending to execute are: > >echo >echo >echo testbed/amd64-current-r (12.0-CURRENT) loader file selected >set bootdev=disk1s4a: >include /boot/testbed/current.hints >include /boot/testbed/do_load_KOMQUATS > >Let me know if I am to rewrite these loader statements into Lua or >whether the Lua loader should be taught to read loader statements >instead. Thinking about this while travelling to $JOB, it's probably best to leave it as is. I'll rewrite the includes into Lua. The benefit is greater flexibility and functionality. -- Pardon the typos and autocorrect, small keyboard in use. Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Lua Loader Failure to Include
Hi, Under the old Forth loader the line: include /boot/testbed/test_sys would load the file and execute loader commands. However the the Lua loader results in the following: OK include /boot/testbed/amd64-current-r no error message OK Looking at the code, interp_include() expects to run actual Lua code using luaL_dofile(). Is this an intended change? The loader statements the file above is intending to execute are: echo echo echo testbed/amd64-current-r (12.0-CURRENT) loader file selected set bootdev=disk1s4a: include /boot/testbed/current.hints include /boot/testbed/do_load_KOMQUATS Let me know if I am to rewrite these loader statements into Lua or whether the Lua loader should be taught to read loader statements instead. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"