Skip to content

Lua support - initial PR#8847

Merged
jia200x merged 2 commits intoRIOT-OS:masterfrom
danpetry:lua_initial
May 25, 2018
Merged

Lua support - initial PR#8847
jia200x merged 2 commits intoRIOT-OS:masterfrom
danpetry:lua_initial

Conversation

@danpetry
Copy link
Contributor

@danpetry danpetry commented Mar 28, 2018

Summary

This is an initial PR intended as a first step in development for adding Lua support. Lua is a lightweight scripting language suitable for embedded devices.

Requirements

The requirements of this PR are to achieve the download and build into RIOT of the Lua interpreter, and demonstrate its working status via a simple example.

Contribution details

Package

Lua v5.3.4 is cloned from github and built into RIOT, ready for its API to be accessed. Currently, only the Lua print() function is supported, which is adequate to demonstrate a working state of the interpreter.

Example

A .lua file called main.lua containing a simple "hello world" program, residing in the RIOT application's home directory, is converted to a char array at compile time, and stored in a header file called main.lua.h. This header file is then #included into an application, and the converted script is run in the program via a helper function called lua_run_script.

Issues/PRs references

#8434

@danpetry danpetry mentioned this pull request Mar 28, 2018
@danpetry
Copy link
Contributor Author

@kaspar030 would you be interested in having a look at this?

@basilfx basilfx added Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: pkg Area: External package ports labels Mar 28, 2018

#define LUA_INITVARVERSION LUA_INIT_VAR LUA_VERSUFFIX


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove extra empty line here

#include "lauxlib.h"
#include "lualib.h"

#if !defined(LUA_PROMPT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ifndef?

@@ -0,0 +1,658 @@
/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I see, a large portion of this file is internal code. This should be in pkg/lua/contrib

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of this is implementation of a cli program, rather than the api - similar to e.g. examples/gcoap/gcoap_cli.c. So, is it best to think now about the API which is going to be exposed to an application and rearrange/separate out the lua.c file accordingly? My approach was to leave it to "evolve", but maybe the more usual approach is that code merged to master needs to be well thought out everywhere, is this true? If so will spend some time here...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further thoughts: just spoke to @miri64 who suggested I think more about what the user would need to know about to implement a program (goes in example) and what they don't need to know (goes in pkg)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on Lua now. The lua.c file is going away. It contains a REPL that is best implemented in Lua itself.

}

static const shell_command_t shell_commands[] = {
{ "lua", "Start a Lua prompt", lua_main},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to have a single command here.
E.g lua console, lua run, etc.


### How to run

Type `make flash term
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ` after "term"


#endif /* } */


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra empty line


#endif /* } */

#endif /* } */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add /* / to mark the closing bracket? E.g / lua_stdin_is_tty */


#endif /* } */


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra empty lines here

@jia200x jia200x requested a review from kaspar030 April 3, 2018 11:29
@danpetry
Copy link
Contributor Author

Reduced scope of PR from a command-line interpreter + a script parser and runner, to just the script parser and runner.

Updated the top comment accordingly.

# example directory. The header file contains a byte array of the
# ASCII characters in the .lua script.

LUA_PATH := $(BINDIR)/lua
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lines can be moved to the pkg Makefiles and invoked when USEPKG+=lua. See e.g here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on second thoughts, maybe it's not bad to leave it as is. It explicitly tells the developer where's the file. But it could also be documented in the README.md. I'm OK with both ;)

Copy link
Contributor Author

@danpetry danpetry Apr 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to keep it as it is, for consistency with examples/javascript and pkg/jerryscript which do the same thing. Will document in README.md. (How important is consistency between WIP packages and examples?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can think about this later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's the best place for this kind of discussion after a PR has been closed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another PR/RFC should do the trick

}

static const shell_command_t shell_commands[] = {
{ "run_lua_script", "Run main.lua", lua_run_main_script},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this command can be dropped, since there's no configuration required to run the main.lua script

pkg/lua/Makefile Outdated
.PHONY: all

all:
# The lower case "makefile" is so that it copies over the lua makefile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to specify a file with -f. It should be enough to copy the file

static lua_State *globalL = NULL;

static const char *progname = "lua";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and below, please remove double empty lines. Should be just one empty line between 2 blocks of code

/*
** Hook set by signal function to stop the interpreter.
*/
static void lstop (lua_State *L, lua_Debug *ar) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although static, do you think it's possible to prefix these functions?

** interpreter.
*/
static void laction (int i) {
signal(i, SIG_DFL); /* if another SIGINT happens, terminate process */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identation should be 4 spaces

#include "main.lua.h"

extern int lua_main(int argc, char **argv);
extern int lua_run_char_array(const char *buffer, size_t buffer_len);
Copy link
Member

@jia200x jia200x Apr 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a proper header file with it's Doxygen documentation. See e.g here


#include <stdio.h>

#include "msg.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is msg.h required here?

# example directory. The header file contains a byte array of the
# ASCII characters in the .lua script.

LUA_PATH := $(BINDIR)/lua
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on second thoughts, maybe it's not bad to leave it as is. It explicitly tells the developer where's the file. But it could also be documented in the README.md. I'm OK with both ;)

@jia200x
Copy link
Member

jia200x commented Apr 23, 2018

@danpetry just wondering, I've check most of the functions are already implemented in external sources (here for instances). Is this file available in the Lua implementation? If so, maybe it could be a good idea to reuse as much as possible.

@danpetry
Copy link
Contributor Author

@jia200x the file lua_run_char_array.c was derived from the lua.c file you linked to. Lua.c was their command line interpreter implementation, so not part of the Lua implementation as such... I took that file and cut it down and added the lua_run_char_array function.

@jia200x
Copy link
Member

jia200x commented Apr 23, 2018

@danpetry what differences exists between their CLI and the one proposed here? If it's not part of the official CLI implementation, I think using an external file might help maintainance (if possible though).

What do you think?

@jia200x
Copy link
Member

jia200x commented Apr 23, 2018

As discussed offline with @danpetry, the original lua.c can be reused. Only some small functions in contrib folder would be required.

@danpetry
Copy link
Contributor Author

danpetry commented Apr 23, 2018

There are a few options for implementation of the pkg/contrib code

  1. Have a cut-down version of lua.c in pkg/contrib
  • Replicates some upstream code
  • Avoids a patch, allowing code to be edited more readily for future development on this pkg
  • Currently, this is what's done. (see pkg/contrib/lua_run_char_array.c)
  1. patch the lua.c file.
  • Some functions need to have their scope expanded by removing the static keyword. These are:

lstop - stops the interpreter
laction - sets a hook for lstop to stop the interpreter on a c signal
l_message - prints an error message
report - checks status and calls l_message if not ok
msghandler, docall, dochunk - run a chunk of lua code

  • The lua_run_char_array function is then implemented in the pkg/contrib directory, and the functions above declared in that file as externs

Basically, it seems to be a choice between replication of upstream code or a patch. Opinions please? :)

@danpetry
Copy link
Contributor Author

danpetry commented Apr 24, 2018

So, here is another option which I think is better

The API wrapper code is not patched from Lua code, and it's not downstreamed either. It's re-written in a well-structured and maintainable way that can be extended in future iterations and included in the RIOT repo. It would need to be significantly different from the Lua code for this so neither patched nor downstreamed (nor a combination of both)

Re whether we need an API wrapper at all: when this PR was first submitted there was no wrapper, the functionality was implemented in the example, and it was requested for this to be moved to the package directory as an API wrapper - hence its inclusion there.

#8847 (review)

@jia200x
Copy link
Member

jia200x commented Apr 24, 2018

@danpetry can you provide a concrete example of this kind of wrapper?

If it's possible to call Lua instructions with the raw package, the current PR can be merged. I think the wrapper can come later, specially since there are other high level languages that might require also an abstraction layer.

@danpetry
Copy link
Contributor Author

danpetry commented Apr 24, 2018

Sorry, just to clarify - by "the current PR" what state of the PR do you refer to? Would it be:

  • script parser and runner implemented in example
  • script parser and runner implemented in /pkg
  • some other state

(the current state at the moment is as a wrapper.)

@jia200x
Copy link
Member

jia200x commented Apr 24, 2018

@danpetry check the current JS implementation. It fetches the original jerryscript code, and the application calls pkg functions.

I tend to think the Lua CLI can be added in another PR, so this one can easily gets merged with a simple example file showing actual Lua code. What do you think?

@danpetry
Copy link
Contributor Author

That sounds fine to me. Will do :)


#include "main.lua.h"

extern int lua_run_char_array(const char *buffer, size_t buffer_len);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function should be included from a header file with its proper Doxygen documentation. As far as I see, it's intended to be called by the user

@jia200x jia200x added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Apr 25, 2018
# example directory. The header file contains a byte array of the
# ASCII characters in the .lua script.

LUA_PATH := $(BINDIR)/lua
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can think about this later


if (L == NULL) {
puts("cannot create state: not enough memory");
return EXIT_FAILURE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danpetry are this return codes LUA specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, they're defined in stdlib.h

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer here errno (e.g ENOBUFS)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used ENOMEM for this one; EINTR for failure of the protected call to the lua engine, to run the script; and return 0; for success in line with most other examples I looked at.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine ;)


#include "main.lua.h"

int lua_run_script (const char *buffer, size_t buffer_len ){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove space between function name and parentheses, and between buffer_len and parentheses.
Also, add a space between the closing parentheses and curly bracket

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting the opening curly bracket on the next line as I see that seems to be the most common way of doing it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, sorry. Curly bracket here should be in next line

}

luaL_openlibs(L);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to remove this extra line here

}

lua_close(L);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

int main(void)
{
puts("Lua RIOT build");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Re the coding conventions, how much will uncrustify catch if I run that? Or is it more a case of learning by doing? (With some leeway re personal preference in certain cases?)

pkg/lua/Makefile Outdated
@@ -0,0 +1,13 @@
PKG_NAME=lua
PKG_URL=https://github.com/lua/lua.git
PKG_VERSION=v5-3-4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should pointing to a commit. See e.g here

@jia200x
Copy link
Member

jia200x commented May 22, 2018

@danpetry please address the comments above, squash and I give the ACK. I tested and works as expected.

Then I need @kaspar030 approval (or dismissing the review ;) in order to merge.

EDIT: I noticed @jcarrano is also reviewing. So, let me know ;)

@danpetry
Copy link
Contributor Author

@kaspar030 said a few weeks ago he's ok with us proceeding, he won't have a look at it.

Addressing the rest of the comments now.

@jia200x
Copy link
Member

jia200x commented May 22, 2018

@danpetry Ok

@jia200x jia200x self-assigned this May 22, 2018
@danpetry
Copy link
Contributor Author

danpetry commented May 22, 2018

I've made the changes, squashed, rebased, and pushed.
However, now it doesn't build for the samr21-xpro or phynode, for the reasons detailed in #9051. I narrowed the step which stopped it building down to the rebasing step. So, there must have been a change on RIOT master which now requires linking in some new functions. Going to do some more investigation, but if anyone has any helpful info or suggestions on how to proceed in the meantime, that would be helpful.
Initial thoughts are to get #9090 merged, but we need to understand why it linked before and not now, in case there are other implications.
@jcarrano is at lunch but may be able to shed some more light on the subject...

@danpetry
Copy link
Contributor Author

Update: it was this PR, which essentially removed some newlib stubs, which stops it building: #8795

pkg/lua/Makefile Outdated
PKG_LICENSE=MIT
PKG_BUILDDIR ?= $(BINDIRBASE)/pkg/$(BOARD)/$(PKG_NAME)

#PKG_SOURCE_LOCAL=~/Sandbox/lua
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this line here?


# This redefines a lua prng function, avoiding the need for the _times system
# call, which RIOT doesn't provide
CFLAGS += -D'l_randomizePivot()=0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a cleaner approach to remove this function with the patch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lua source is written in such a way that one is supposed to redefine things to change them. In this case, the definition of l_randomizePivot() is wrapped inside a #ifndef l_randomizePivot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm for putting all the patches for this fixup together in one patch. eg

#define l_randomizePivot() 0

just above if !defined(l_randomizePivot)

sorts it out.

- const char *fromname = luaL_checkstring(L, 1);
- const char *toname = luaL_checkstring(L, 2);
- return luaL_fileresult(L, rename(fromname, toname) == 0, NULL);
+ return luaL_error(L, "This function is not implemented in RIOT yet");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This errors can be in a buffer, I don't think RIOT compiles with "string pooling".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the advantage of putting the strings in buffers? String literals are all over the lua source code.

Copy link
Contributor Author

@danpetry danpetry May 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with juan re this... I don't actually think it makes that much difference though. I'm going to just change to buffers to avoid "bikeshedding"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in theory saves some ROM bytes, but if's the whole source code it won't make a big difference

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's leave it like that then

@jia200x
Copy link
Member

jia200x commented May 23, 2018

ok, works as expected. Tested in samr21-xpro and native. ACK

@jia200x
Copy link
Member

jia200x commented May 23, 2018

let's wait Murdock

@jia200x
Copy link
Member

jia200x commented May 23, 2018

please squash, Travis is complaining

@jia200x jia200x added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 23, 2018
@miri64
Copy link
Member

miri64 commented May 24, 2018

@aabadie @kaspar030 @smlng Murdock has an issue with this PR that we can't reproduce locally. Any idea what is wrong?

@smlng
Copy link
Member

smlng commented May 24, 2018

@miri64 I guess the murdock slave don't have the LUA-dev package? That's why:

fatal error: lauxlib.h: No such file or directory

@danpetry
Copy link
Contributor Author

lauxlib.h is part of the pkg added as part of this PR. I suspect it's something to do with the way I've specified include paths. the two "debug commits" are there to get more info

@miri64
Copy link
Member

miri64 commented May 24, 2018

@miri64 I guess the murdock slave don't have the LUA-dev package? That's why:

fatal error: lauxlib.h: No such file or directory

@smlng I tested the same application with one of the failing boards on my dev machine and installed nothing extra (granted this is no guarantee that something isn't missing, but I most certainly don't have liblua-dev installed, see below) and it worked.

$ apt list --installed | grep -i "lua"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

liblua5.1-0/xenial,now 5.1.5-8ubuntu1 amd64 [installed,automatic]
liblua5.2-0/xenial,now 5.2.4-1ubuntu1 amd64 [installed,automatic]
libluajit-5.1-2/xenial,now 2.0.4+dfsg-1 amd64 [installed,automatic]
libluajit-5.1-common/xenial,xenial,now 2.0.4+dfsg-1 all [installed,automatic]
libtexlua52/xenial,now 2015.20160222.37495-1 amd64 [installed,automatic]
libtexluajit2/xenial,now 2015.20160222.37495-1 amd64 [installed,automatic]
lua-lpeg/xenial,now 0.12.2-1 amd64 [installed,automatic]
texlive-luatex/xenial-updates,xenial-updates,xenial-security,xenial-security,now 2015.20160320-1ubuntu0.1 all [installed,automatic]

# This builds for native using POSIX system calls and some extra libraries, and
# removes a compiler warning that warns against using tmpnam().
ifeq ($(BOARD),native)
CFLAGS += -DLUA_USE_LINUX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor, this should be indented with 2 spaces

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A frustrated Dan just came to my office. Can we stop asking for minor changes when a PR is already ACK'd, please? This is also something that scares away contributors, IMHO. If the PR is defective and the ACK was given wrongly, yes then asking for changes is definitely okay. But not like this! Yes code quality is important, but these kind of non-functional errors can also be fixed in post.

Copy link
Contributor

@aabadie aabadie May 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pinged for a build issue, so I came, had a look at the package makefile, saw this and finally decided to comment this. I'm not requesting any change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So there's no need for being frustrated @danpetry.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it raises wider issues about the efficiency of our review process, which is something that could be improved, I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, and I guess @miri64 hit the point: Reviewers should carefully work with authors to get things into a state at which code can be merged. For this reviews need structuring, streamlining, and pacing in the most constructive manner.
This means for instance that code-style review should be completed at some early stage, but also means to aid authors in case of troubles with build or similar.
I guess that's a generic discussion, but a very important one: I've seen many old open PRs where authors have been exhausted by being pushed around randomly without hitting anywhere.

Copy link
Contributor Author

@danpetry danpetry May 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, I was just going to make the changes, as it would have been quicker than having a discussion about it. But the impression I get is that the PRs building up is a real problem and the review process itself should a) allow for valuable support of contributors by maintainers to get it into a good shape, which tbh has formed the bulk of my time on this PR; but also b) try not to duplicate work and streamline the process otherwise. I think it would be worth talking about tomorrow, insofar as it's not just going over the same ground we've already talked about

Copy link
Member

@miri64 miri64 May 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pinged for a build issue, so I came, had a look at the package makefile, saw this and finally decided to comment this. I'm not requesting any change.

Just to be clear, I appreciate that you only commented on this and did not make a change request.

I didn't know an ACK by one reviewer should stop others from pointing out errors or possible improvements (as minor as they might be) anyway.

I already pointed out, that it's totally fine if the PR is defective. Then a late comment is ok. But it certainly gives a weird impression if a person that wasn't involved in the discussion before suddenly comes in and also comments on minor, non-functional details, when the PR was already ACK'd (even if they were pinged in for a completely different issue).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this should be on schedule tomorrow, also automated code style checking. I hear, tools are in place already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth talking about this over voice call tomorrow... not sure this is a great format for this kind of discussion... :)

USEMODULE += ps

ifneq ($(BOARD),native)
# This stack size is large enough to run Lua print() functions of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent this block (2 spaces)

danpetry added 2 commits May 24, 2018 17:56
- download of v5.3.4 of Lua from git
- building using RIOT build system
- patched to remove the need for _times and _link to be
provided to Lua via newlib.
- Lua print() function is only supported function
- Lua script is parsed at compile time and run in example
@jia200x
Copy link
Member

jia200x commented May 25, 2018

ok, all green. Re-ACK.

@smlng
Copy link
Member

smlng commented May 25, 2018

@jia200x then hit merge 🎉

@jia200x
Copy link
Member

jia200x commented May 25, 2018

@jia200x then hit merge 🎉
pic

@jia200x
Copy link
Member

jia200x commented May 25, 2018

GO!

@jia200x jia200x merged commit 2b08ea3 into RIOT-OS:master May 25, 2018
@jia200x
Copy link
Member

jia200x commented May 25, 2018

congratz @danpetry 🎉 🎉

@danpetry
Copy link
Contributor Author

Woop!

@cladmi cladmi added this to the Release 2018.07 milestone Jul 10, 2018
@danpetry danpetry deleted the lua_initial branch July 12, 2018 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants