lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Feb 27, 2018 at 4:26 AM, Glenn Travis <travplays@comcast.net> wrote:
> You are so right about not knowing the OS/toolset very well, and I figure
> that; x86_64-apple-darwin17 has a lot to do with it. I do not know why, but
> Darwin seems to be a collections of all sorts of unix like things; perhaps
> to get the macOS/ OS X GUI to work the way that they wanted it to.
Hi Glen,

All Unixes and unix-like systems are a little different because they
*are* a collection of little tools. OSX has it's underpinnings from
different sources than Linux due to licensing and Steve Jobs being,
well, Steve Jobs. Anyway, what you'll find is in some cases it's much
closer to BSD than GNU tools used in GNU/Linux (every "Linux" except
Android). I know that doesn't make a hill of beans difference to you
right now but make no mistake: OSX is certified UNIX. GNU/Linux is
not. OSX adheres to standards that "Linux" does not.

At this
> point, it seems to me that going the install via the terminal, Apple users
> have to use  sudo make install to things working properly.

I'd like to point out that sudo is no different than having to type in
your password before you install something from the app store or buy
something with your paypal account. It is a means to prove credentials
and elevate privilege in Unix.

I'm not sure if this has been suggested, but you Lua can be run from
within the src directory where it was built or be put pretty much
*anywhere* that you have access. If you don't want to bother
installing it system wide (which requires sudo!), then alter the
makefile (that installs Lua) to point to your local home directory and
install it there (~/bin perhaps?). Then you add that path to your
shell initialization and it's always available to YOU but it's not
available to anyone else. On a Mac Laptop or PC, that isn't really an
issue I suspect. I'm sure if you ask, someone on the list can help out
with the commands if you figure out what shell your using. Dirk can
provide a link to that I think? (Also another joke, just Google it).

To be honest
> however, I can’t remember if I ever tried using the lua binaries route but
> perhaps that would explain how I ended up with version 5.1. I have the 3rd
> edition of Programming in Lua  in which I am finding that 5.3 appears to be
> very different that 5.2 which is discussed in 3rd edition.  Seeing as how
> the book is often over my head (I believe that the book description uses the
> word “programmer” which to me means experienced), I am having a debate with
> myself regarding spending money on the 4th edition.  The only programming
> experience that I have is in BASIC back in the mid 70s and that was on a HP
> 9830.

It seems to me you are experiencing the same response that 99% of us
do when faced with a new challenge. I've been using computers
literally my whole life and I still *seethe* when doing something new.
I want to throw my computer (I know, I need help) because they are
so... impossibly... complicated!  Keep persisting. It pays off.

Some advice since you didn't ask:

- PIL 4 is a fantastic book. If you know what a loop and a variable
is, start at Page 1 and follow the examples. Otherwise, learn what a
loop and a variable is and then start at page 1. ;)
- Read some Unix history and start at the basics by learning to follow
man pages (short for Manual because people in Unix hate typing. tee
hee, that's a joke.). Man pages are also something that is *totally
infuriating* until you "get it" and then it's good. I find them
easiest to read online, but have never looked for OSX man pages (I
mostly use FreeBSD).
- KEEP NOTES. Write down all your commands and come back to it and
update it. Those notes will become invaluable and if you persist will
likely turn into "shell scripts".
- Follow KHMan's advice (pretty much the same as keep notes). Start a
temp directory (mkdir ~/temp/) and dump your work in there until it's
worth keeping. As for GUIs, ZeroBrane is a fantastic way to learn Lua.
There are a TON of great examples. Geany and Scite are both good free
GUI editors that support Lua syntax highlighting but don't support a
Lua debugger out of the box.

Hope that helps. :)

Cheers,
Russ
>
>
> On Feb 23, 2018, at 11:49 AM, Francisco Olarte <folarte@peoplecall.com>
> wrote:
>
> On Fri, Feb 23, 2018 at 6:16 PM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
>
> The README in the tarball and in says:
>
> http://www.lua.org/manual/5.3/readme.html#install
>
> Installing Lua
>
> Once you have built Lua, you may want to install it in an official
> place in your system. In this case, do "make install". The official
> place and the way to install files are defined in the Makefile. You'll
> probably need the right permissions to install files.
>
> Perhaps this should mention sudo?
>
>
> Given the previous section mentions unix-like and linux it may be
> useful, and maybe a mentioning mac os-x is unix like too ( I do not
> think linux users compiling will have problems, but mac users seem to
> be more like windows one, they do not know they OS/toolset too well ).
>
> Francisco Olarte.
>
>