lupa

Lua in Python (by scoder)

Lupa Alternatives

Similar projects and alternatives to lupa

  • Lua

    Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.

  • sol2

    20 lupa VS sol2

    Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better lupa alternative or higher similarity.

lupa reviews and mentions

Posts with mentions or reviews of lupa. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-30.
  • Design Issues for Foreign Function Interfaces (2004)
    3 projects | news.ycombinator.com | 30 Nov 2021
    Very interesting article!

    Unfortunately, it doesn't mention Lua, which in my opinion has one of the most elegant C APIs that I have seen. It is entirely stack based, which means you only need to work with primitive types, such as numbers, C strings and user provided opaque pointers. As a consequence, you never have to care about memory management because Lua doesn't even let you access the actual Lua objects.

    You want to create a table (= Lua's dictionary/array hybrid) and set a field "foo" to 5? lua_newtable() creates a new table and pushes it onto the stack. Then you push "foo" with lua_pushstring() and 5 with lua_pushnumber(). Finally you call lua_settable(), which pops the key and value from the stack, checks if the top of the stack contains a table, and if yes, sets the given field to the given value. The actual table structure is never exposed!

    This kind of stack manipulation might seem unusual and a bit unweildy, but what you get is safety. If you mess up the stack or perform illegal operations, Lua will call an error handler, but the VM should never crash. The stack API can be seen as the fundamental layer upon which people can create nice abstractions for their host language of choice. Examples are "sol2" for C++ (https://github.com/ThePhD/sol2) or "lupa" for Python (https://github.com/scoder/lupa)

    The public API is contained in "lua.h": https://github.com/lua/lua/blob/master/lua.h. "lauxlib.h" offers some useful helper functions: https://github.com/lua/lua/blob/master/lauxlib.h

    For comparison, this is Python's "Limited" C API: https://docs.python.org/3/c-api/stable.html#stable

    If you want to learn more about Lua's C API, have a look at section 4 in https://www.lua.org/manual/5.4/manual.html

Stats

Basic lupa repo stats
1
963
8.6
about 2 months ago

scoder/lupa is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.

The primary programming language of lupa is Python.

Popular Comparisons


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com