Code Monkey home page Code Monkey logo

lua-plot's People

Contributors

aryajur avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

lua-plot's Issues

Plotting example fails despite dependencies being installed

Hi,

I tried your plotting example, namely:

lp = require("lua-plot")
p = lp.plot{}
p:Show()    -- shows a blank plot
p:AddSeries({ {1,1},{2,2},{3,3} })
p:Redraw()
-- The graph can be closed at this point by closing the window pressing the cross button
p:Show()   -- shows the graph again.
lp.listPlots()   -- displays the list of plots maintained locally and by the plotserver ( should be just 1)
p = nil      -- will cause the graph to be garbage collected
lp.listPlots()   -- will show no plots left

In a Lua shell and while I had installed all the dependencies listed here I got the error:

> lp = require("lua-plot")
> p = lp.plot{}
stdin:1: attempt to index a boolean value (global 'lp')
stack traceback:
        stdin:1: in main chunk
        [C]: in ?
> p:Show()    -- shows a blank plot
stdin:1: attempt to index a nil value (global 'p')
stack traceback:
        stdin:1: in main chunk
        [C]: in ?
> p:AddSeries({ {1,1},{2,2},{3,3} })
stdin:1: attempt to index a nil value (global 'p')
stack traceback:
        stdin:1: in main chunk
        [C]: in ?
> p:Redraw()
stdin:1: attempt to index a nil value (global 'p')
stack traceback:
        stdin:1: in main chunk
        [C]: in ?
> -- The graph can be closed at this point by closing the window pressing the cross button
> p:Show()   -- shows the graph again.
stdin:1: attempt to index a nil value (global 'p')
stack traceback:
        stdin:1: in main chunk
        [C]: in ?
> lp.listPlots()   -- displays the list of plots maintained locally and by the plotserver ( should be just 1)
stdin:1: attempt to index a boolean value (global 'lp')
stack traceback:
        stdin:1: in main chunk
        [C]: in ?
> p = nil      -- will cause the graph to be garbage collected
> lp.listPlots()   -- will show no plots left
stdin:1: attempt to index a boolean value (global 'lp')
stack traceback:
        stdin:1: in main chunk
        [C]: in ?

as you can see the issue really started when p was first defined. Any ideas what the problem is? I should mention that I had disabled the use of llthreads due to #1.

Thanks for your time,

Admirable project but llthreads is incorrectly required

Hi,

The llthreads dependency seems to be required incorrectly as I have installed the llthreads2 (version 0.1.4) from the repository you linked in the documentation. It installs its crucial library to /usr/lib/lua/5.3/llthreads2.so with llthreads2.so being the notable part of that path. When I symlink this path to /usr/lib/lua/5.3/llthreads.so I get yet another error when I try to load lua-plot:

error loading module 'llthreads' from file '/usr/lib/lua/5.3/llthreads.so':
        /usr/lib/lua/5.3/llthreads.so: undefined symbol: luaopen_llthreads
stack traceback:
        [C]: in ?
        [C]: in function 'require'
        /usr/share/lua/5.3/lua-plot.lua:21: in main chunk
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: in ?
> lp = require("lua-plot")
/usr/share/lua/5.3/lua-plot.lua:21: module 'llthreads' not found:
        no field package.preload['llthreads']
        no file '/usr/share/lua/5.3/llthreads.lua'
        no file '/usr/share/lua/5.3/llthreads/init.lua'
        no file '/usr/lib/lua/5.3/llthreads.lua'
        no file '/usr/lib/lua/5.3/llthreads/init.lua'
        no file './llthreads.lua'
        no file './llthreads/init.lua'
        no file '/usr/lib/lua/5.3/llthreads.so'
        no file '/usr/lib/lua/5.3/loadall.so'
        no file './llthreads.so'
stack traceback:
        [C]: in function 'require'
        /usr/share/lua/5.3/lua-plot.lua:21: in main chunk
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: in ?

If I disable the use of llthreads by editing line 17 of lua-plot.lua changing nil to 1 everything works, fine, however. So it is clearly with what's done with llthreads. If relevant my platform is Arch Linux and I installed llthreads2 with this PKGBUILD:

pkgname=lua-llthreads2
pkgver=0.1.4
pkgrel=1
pkgdesc="This is full dropin replacement for llthreads library"
arch=("i686" "x86_64")
url="http://github.com/moteus/lua-llthreads2/"
license=("MIT")
depends=("lua")
makedepends=("luarocks")
source=("$pkgname-$pkgver.tar.gz::https://github.com/moteus/$pkgname/archive/v$pkgver.tar.gz")
md5sums=('b76af7ef6970b0e8089472fe377d3757')

build() {
	cd "$srcdir/$pkgname-$pkgver"
	luarocks make --pack-binary-rock "rockspecs/$pkgname-$pkgver-1.rockspec"
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	install -Dm755 llthreads2.so "$pkgdir/usr/lib/lua/5.3/llthreads2.so"
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

Thanks for your time

How to install

i do not even see a hint how to install. After three hours of trying I gave up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.