module 'lubyk' not found?

17 views
Skip to first unread message

L-P

unread,
Aug 18, 2011, 12:55:19 PM8/18/11
to lu...@googlegroups.com
Hi All,

I stumbled on lubyk today, looks like a very interesting project!

I was able to build it on MacOSX 10.6.8, from the github repo, but the Mimas.app won't start, with this error:
" /usr/local/bin/lua: build/Mimas.app/Contents/Resources/mimas_app.lua:1: module 'lubyk' not found:
no field package.preload['lubyk']
no file './lubyk.lua'
no file '/usr/local/share/lua/5.1/lubyk.lua'
no file '/usr/local/share/lua/5.1/lubyk/init.lua'
no file '/usr/local/lib/lua/5.1/lubyk.lua'
no file '/usr/local/lib/lua/5.1/lubyk/init.lua'
no file './lubyk.so'
no file '/usr/local/lib/lua/5.1/lubyk.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
build/Mimas.app/Contents/Resources/mimas_app.lua:1: in main chunk
[C]: ? "

I guess it's a newbie bug that is easily solved, isn't it?

thanks!

L-P

Gaspard Bucher

unread,
Aug 18, 2011, 2:27:17 PM8/18/11
to lu...@googlegroups.com
Hi L-P !

Ouuch... Lubyk isn't even in beta yet.... It's pretty impressive you managed to build the whole thing with qt and such...

I have hacked some scripts to ease installation (puts a minimal set of files in the right places and launches some tests).

Give me half an hour to cleanup these scripts and push them on github

Cheers,

                                                               Gaspard

Louis-Philippe Perron

unread,
Aug 18, 2011, 2:37:25 PM8/18/11
to lu...@googlegroups.com
Great thanks Gaspard!
I'm a developer myself, so I'm not afraid of alpha softwares...

Gaspard Bucher

unread,
Aug 18, 2011, 4:12:30 PM8/18/11
to lu...@googlegroups.com
Ok, I finished the install script (took more time then I thought...)

> git pull
> cd build
> make 
> cd ../deploy
> lua install.lua

The script does not really do a system wide install but installs a boot script 'lubyk.lua' where lua will find it and adds creates a ".lubykrc" file with the "lib" folder where everything was built so that from now on, you don't need to reinstall even if you keep hacking on the code.

If you are even lazier, you can add more paths in .lubykrc for the lua files so that they are found without running make. I have:
local settings = {}
-- additional paths
settings.paths = {
  -- no need to compile
  '/Users/gaspard/git/lubyk/modules/lk/lua/?.lua',
  '/Users/gaspard/git/lubyk/modules/xml/lua/?.lua',
  '/Users/gaspard/git/lubyk/modules/lubyk/lua/?.lua',
  '/Users/gaspard/git/lubyk/modules/editor/lua/?.lua',
  '/Users/gaspard/git/lubyk/modules/mimas/lua/?.lua',
  '/Users/gaspard/git/lubyk/modules/zmq/lua/?.lua',
  '/Users/gaspard/git/lubyk/modules/test/lua/?.lua',
  '/Users/gaspard/git/lubyk/modules/doc/lua/?.lua',
  -- no need to install
  '/Users/gaspard/git/lubyk/lib/?.lua',
}

settings.cpaths = {
  -- no need to install
  '/Users/gaspard/git/lubyk/lib/?.so'
}

settings.editor = {
  editor_cmd = 'mvim',
  library_sources = {
    lubyk = '/Users/gaspard/git/lubyk/lib/lubyk',
  }
}
return settings

Cheers,

Gaspard

--

                                                               Gaspard

Louis-Philippe Perron

unread,
Aug 19, 2011, 10:17:57 AM8/19/11
to lu...@googlegroups.com
yes, so Now it works!
with homebrew dependency resolution was easy...

I'm now able to open examples with Lubyk, but Mimas kinda leaves me clueless....  Is there any basic infos on getting started somewhere?

thanks!

L-P

Gaspard Bucher

unread,
Aug 19, 2011, 2:07:57 PM8/19/11
to lu...@googlegroups.com
Hi LP,

No there is no documentation yet and Mimas is not ready to be used. Lubyk can be used in two ways: as a library (by doing require 'lubyk' and running a script) or as a distributed, live coding environment. The distributed execution of a "network" relies on process talking to each other by mDNS names (so we do not need a central server to run). But to "open" and "save" such a distributed thing, there has to be some kind of central place where script changes are stored: this is the "morph" server (lk.Morph class).

Currently if you launch mimas, it will ask you to join an existing zone (running network) or to start a new one. A zone is some kind of namespace in the physical network. If you start a new zone, you can indicate the ".../examples/patch/ab" folder and this will start a morph process which in turn will launch all the processes needed by the project (a process is a folder with a _patch.yml definition).

The morph server will then listen for script changes and save these in a central location.

All this is totally buggy right now (I'm changing lots of code related to "self" and C++ callbacks in Lua) but the plan for next week is to plug the WebDAV server on the lk.Morph so that you can access and edit processes through the filesystem. Eventually, clicking on a node in Mimas will mount the WebDAV share and open the file there: this is better then watching for file changes because everyone has the same content at a given time.

To summarize:

A. Next week, mimas should be fixed and allow the following operations (already implemented) :

1. Add nodes to an existing process
2. Link nodes (in a process and between processes)
3. Edit nodes (script content)

All these operations will also be exposed through WebDAV through the edition of the _patch.yml files.

B. The week after, we should have the possibility to:

1. Fork an existing process (= creates a new one)
2. View the morph server in the interface
3. Use the morph server to serve the contents of a project's "lib" folder
4. Proper application with icon and splash screen (icon already done by Nicolas Joos).

===== Deadline 5 september: Lua Workshop 2011 where I present Lubyk =====

C. Then we have to

1. Use a git library to automatically save and version a project (more work on lk.Morph).
2. "Snapshot" from the interface to save a version.
3. "Restore" (shows a list of snapshots or commit dates).
4. Discuss a security model (WebDAV/interface authentication, sandbox processes: they do not need access to the filesystem except to load lubyk code).
5. Use/write and autodoc tool to parse Lua and Doxygen xml into an SQLite database (used to generate html files with a simple web app).
6. New website (Nicolas Joos is working on it)

At this point, we will have something that can be used for real projects...

As you can see, there is still a lot of work (not counting openkinect bindings and OpenGL shaders scripting) so if you feel like hacking into this project, I would be glad to introduce you to lubyk internals.

Cheers !
--

                                                               Gaspard

Louis-Philippe Perron

unread,
Aug 19, 2011, 2:52:19 PM8/19/11
to lu...@googlegroups.com
Great thanks for the infos Gaspard!
Lubyk catches my attention enough to try and hack on it.
I have had previous experiences with the Lua stack API, but only from C, my C++ skills are yet to be developped...  but still I'm a fast learner so if you give me a couple of cues on the internals I will be glad to get up to speed and start helping.
If you feel you're too busy before your september 5th deadline, I don't mind waiting for your cues a bit more and slowly diving in myself instead.

anyway, really nice project!

Gaspard Bucher

unread,
Aug 19, 2011, 6:10:36 PM8/19/11
to lu...@googlegroups.com
Hi Louis-Philippe !

I don't have a lot of time, but I should be able to answer questions. The "examples" part of a project is a very important place for starters and the examples in lubyk are ... inexistent or broken ;-(

I just updated the gl and glu modules (provide OpenGL and OpenGL Utility Library bindings) and I realized that there are no examples. If you feel like writing an OpenGL example (with nurbs...). you can have a look at modules/mimas/test/GLWindow_test.lua for some start code and/or the http://luagl.sourceforge.net/examples/.

I also created a new "CREDITS" file that lists all the modules and the authors.

Cheers,

Gaspard
--

                                                               Gaspard

Louis-Philippe Perron

unread,
Aug 23, 2011, 12:34:02 PM8/23/11
to lu...@googlegroups.com
Hi Gaspard,
I looked into producing examples a bit and I don't think I will have that much spare time to work on this during the current week.
But, I'm surely looking forward to dive in asap... will keep you updated.

regards,

L-P

Gaspard Bucher

unread,
Aug 24, 2011, 3:46:31 AM8/24/11
to lu...@googlegroups.com
No problem, a lot of code is actually changing in lubyk (table based "self" for userdata) and things are a little unstable right now. It should cool down in the following days.

The idea for the new "self" is to allow setting properties on the object like this:

win = mimas.Window()

win.name = 'hello'
win.foo = 'bar'

This also has the advantage of easing setting/reading callbacks.

Cheers,

Gaspard

--

                                                               Gaspard

Reply all
Reply to author
Forward
0 new messages