Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2
This is the forum to discuss the Wrox book Beginning Lua Programming by Kurt Jung, Aaron Brown; ISBN: 9780470069172
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 16th, 2007, 07:08 PM
Registered User
 
Join Date: Feb 2007
Location: Lake Jackson, TX, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning LUA

Seeing as how this book is not listed by its lonesome, I have a question regarding the unix man command and lua. I have gotten LUA installed and up and working as per the first chapter; it did require a path addition. However, I have not been able to get man lua to work without creating an alias that lists the absloute path to the lua.1 man file.
What is going on or wrong there?
Thanks
trav

Submariners are a bunch of intelligent misfits that somehow seem to get along, understand each other and work well together
  #2 (permalink)  
Old February 17th, 2007, 10:09 PM
jminatel's Avatar
Wrox Staff
Points: 18,940, Level: 59
Points: 18,940, Level: 59 Points: 18,940, Level: 59 Points: 18,940, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,945
Thanks: 73
Thanked 139 Times in 101 Posts
Default

Trav: Sorry I was asleep at the wheel and missed creating this book's forum in a timely manner. I've done it now and moved your post here. I've also let the editor know the forum is here so she can let the authors know but it will probably be next week before they're here to check as the offices are closed for a 3 day weekend and the authors won't see this until next week at the earliest. Sorry.

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!
  #3 (permalink)  
Old February 19th, 2007, 07:55 AM
Wrox Author
 
Join Date: Apr 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

> I have gotten LUA installed and up and working as per the first
> chapter; it did require a path addition. However, I have not been
> able to get man lua to work without creating an alias that lists
> the absloute path to the lua.1 man file.

By default, the command 'linux install' copies the lua and luac man
pages to /usr/local/man/man1. Make sure the man program on your
system is looking here. Either /etc/man.config should have a line
like

    MANPATH /usr/local/man

or you should have an environment variable named MANPATH that has a
value that includes it. For example,

    MANPATH=/usr/local/man:/usr/man

Note that the man pages only cover the usage of the lua and luac
programs. The in-depth documentation for Lua is in the package's
doc directory.

--
Kurt
  #4 (permalink)  
Old February 19th, 2007, 09:10 AM
Registered User
 
Join Date: Feb 2007
Location: Lake Jackson, TX, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Howdy Jim,
I appreciate it. However, I was not very happy about the last line of the email notification that I got. It came across like an incrimination:

"In the future, please be careful to post to an appropriate forum."
I mean, what appropriate forum... see what I mean
trav

Quote:
quote:Originally posted by jminatel
 Trav: Sorry I was asleep at the wheel and missed creating this book's forum in a timely manner. I've done it now and moved your post here. I've also let the editor know the forum is here so she can let the authors know but it will probably be next week before they're here to check as the offices are closed for a 3 day weekend and the authors won't see this until next week at the earliest. Sorry.

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!
Submariners are a bunch of intelligent misfits that somehow seem to get along, understand each other and work well together
  #5 (permalink)  
Old February 19th, 2007, 09:52 AM
Registered User
 
Join Date: Feb 2007
Location: Lake Jackson, TX, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Howdy Kurt,
Being a Macintosh kinda guy, I am learning Unix and Lua together. I did find the lua man pages installed as you indicated, and in a LUA sub folder in my GUI interface. However, looking around with the SET command, I did not find a MANPATH environment variable; echo $MANPATH returns a blank line; nor was I able to find a man.config file via the LOCATE or FIND commands. I guess that this may be the problem with things that I have installed before, i.e. fink. No man pages for it or others. Alas.
I am still having fun learning with the book and appreciate your efforts.
trav

Quote:
quote:Originally posted by Kurt Jung
 > I have gotten LUA installed and up and working as per the first
> chapter; it did require a path addition. However, I have not been
> able to get man lua to work without creating an alias that lists
> the absloute path to the lua.1 man file.

By default, the command 'linux install' copies the lua and luac man
pages to /usr/local/man/man1. Make sure the man program on your
system is looking here. Either /etc/man.config should have a line
like

    MANPATH /usr/local/man

or you should have an environment variable named MANPATH that has a
value that includes it. For example,

    MANPATH=/usr/local/man:/usr/man

Note that the man pages only cover the usage of the lua and luac
programs. The in-depth documentation for Lua is in the package's
doc directory.

--
Kurt


Submariners are a bunch of intelligent misfits that somehow seem to get along, understand each other and work well together
  #6 (permalink)  
Old February 19th, 2007, 10:18 AM
Wrox Author
 
Join Date: Apr 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Trav,

> Being a Macintosh kinda guy, I am learning Unix and Lua together.

Great! Unfortunately, we didn't include too many Macintosh
references in our book, but Lua should compile cleanly on Max OSX
if you're interested in doing that.

> I did find the lua man pages installed as you indicated, and in a
> LUA sub folder in my GUI interface. However, looking around with
> the SET command, I did not find a MANPATH environment variable,
> nor was I able to find a man.config file via the LOCATE or FIND
> commands.

If, from a command shell, you type

    man man

you should get some information on the various ways man can be
configured. It could be that the lua.1 and luac.1 pages are simply
not in any of the "standard" places where man looks.

The important thing is to make sure lua and luac are located
somewhere on your shell's search path. Also, it is very handy to
bookmark Lua's HTML documentation in your browser.

> I am still having fun learning with the book and appreciate your
> efforts.

I hope that when you get past the inevitable installation and new
platform issues you find Lua to be rewarding. Good luck!

--
Kurt
  #7 (permalink)  
Old February 19th, 2007, 10:33 AM
Registered User
 
Join Date: Feb 2007
Location: Lake Jackson, TX, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am finding out that Apple did some odd things with man including making an executable manpath. When I entered manpath on the command line, I got the following result:
/usr/share/man:/usr/local/share/man:/usr/X11R6/man
I guess that Apple wants the machine to do all the man page thinking for us. :^) But it seems to me that Apple is putting the man pages one folder/directory (share) deeper? than normal.
Regardless, I am on page 40 now, and things so far have, to me, at least, a BASIC feel to them.
trav

Submariners are a bunch of intelligent misfits that somehow seem to get along, understand each other and work well together
  #8 (permalink)  
Old February 19th, 2007, 10:41 AM
Registered User
 
Join Date: Feb 2007
Location: Lake Jackson, TX, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a difference between the lua/luac in the src folder and the bin folder? My memory may be messed up, but when I set a path to the bin folder, calling lua did not work, but when I set the path to the src folder it did?
Heck, it was your book that clued me to the src folder in the first place, thank goodness! I was going to the bin shell and using the ./lua command to get it to work at all. Now that I have the src path in my .bash_profile I am one happy guy.
RE: page 10 I can not get the ldd command to work. Not recognized by my Mac/bash. Not that I needed it, the make test worked the first time.
trav


Submariners are a bunch of intelligent misfits that somehow seem to get along, understand each other and work well together
  #9 (permalink)  
Old February 19th, 2007, 01:50 PM
Wrox Author
 
Join Date: Apr 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

> When I entered manpath on the command line, I got the following
> result: /usr/share/man:/usr/local/share/man:/usr/X11R6/man

It may be that on the Macintosh (and possibly other variants of
BSD) the 'share' subdirectory is the better place to install
things. When you install lua, my guess is that it is likely better
to do it this way:

    make install INSTALL_TOP=/usr/local/share

> Is there a difference between the lua/luac in the src folder and
> the bin folder?

Shouldn't be. You can run

  diff src/lua /path/to/bin/lua

to verify this. If OSX's man path is /usr/local/share/man, then am
I right it guessing that user-provided executables go in
/usr/local/share/bin?

--
Kurt

  #10 (permalink)  
Old February 19th, 2007, 04:11 PM
Registered User
 
Join Date: Feb 2007
Location: Lake Jackson, TX, .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Howdy Kurt,

Oddly enough, they seem to be in /usr/local/bin. I think just the man pages end up in the share directory.


Quote:
quote:Originally posted by Kurt Jung
If OSX's man path is /usr/local/share/man, then am
I right it guessing that user-provided executables go in
/usr/local/share/bin?

--
Kurt
I was able to get rid of my Lua man alias by moving the lua man pages from its directory to the share/man1 directory. Other than a learning exercise, mv lua.1 /usr/share/man/man1, I doubt that it was worth the effort. Besides, I am guessing that I obtained the binary(?) version also, because I can access it via my Mac GUI. I just double click on the Lua file and I am transported to the Terminal application and the Lua command line. Now that I have it in the .bash_profile path(PATH=$PATH":~/lua-5.1.1/src"), I can also access it from anywhere in the Terminal also. As I said, that has saved me a lot of frustration. It seems that Macs may be odd enough that you might want to compile some of this discussion into the next revision or make it a heads up in an errata sheet. I think that the Unix wizards at the Apple Discussions, via the support link, could give you the real details; much better than I, in my fumbling about manner, have been able to.
Thank you for your help and patience.
trav

Submariners are a bunch of intelligent misfits that somehow seem to get along, understand each other and work well together
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lua build Triezen BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 0 January 2nd, 2008 06:08 AM
Lua install and Luaedit ashzr BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 0 November 19th, 2007 10:00 AM
lua - HELP, PLEASE! thedreameater Other Programming Languages 1 November 13th, 2007 05:20 PM
Lua error messages trav BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 1 June 3rd, 2007 01:21 PM
dummy lua install Brad C BOOK Beginning Lua Programming ISBN: 978-0-470-06917-2 2 March 28th, 2007 11:36 AM



All times are GMT -4. The time now is 07:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.