[ANN] Lua 5.3 Glossary

classic Classic list List threaded Threaded
38 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Michal Kottman
On May 4, 2017 9:13 AM, "Dirk Laurie" <[hidden email]> wrote:
2017-05-04 3:59 GMT+02:00 Luiz Henrique de Figueiredo <[hidden email]>:
>> Inspired by Adel's original post on the thread "Beginner to Programming",
>> I have put together:
>>
>>      https://rawgit.com/dlaurie/lua-notes/master/glossary.html
>
> You may want to add some css to that.
>
> A random google search found this, which indeed makes it look much nicer:
>         https://gist.github.com/killercup/5917178

A good idea, which I have implemented. Thanks.

The site with new CSS looks great on big screen, unfortunately I lost the ability to read it on a mobile phone without having to zig-zag scroll, or zoom out and use a microscope (2560x1440 on a 6" screen is both a blessing and a curse)
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
2017-05-04 10:06 GMT+02:00 Michal Kottman <[hidden email]>:

> On May 4, 2017 9:13 AM, "Dirk Laurie" <[hidden email]> wrote:
>
> 2017-05-04 3:59 GMT+02:00 Luiz Henrique de Figueiredo
> <[hidden email]>:
>>> Inspired by Adel's original post on the thread "Beginner to Programming",
>>> I have put together:
>>>
>>>      https://rawgit.com/dlaurie/lua-notes/master/glossary.html
>>
>> You may want to add some css to that.
>>
>> A random google search found this, which indeed makes it look much nicer:
>>         https://gist.github.com/killercup/5917178
>
> A good idea, which I have implemented. Thanks.
>
>
> The site with new CSS looks great on big screen, unfortunately I lost the
> ability to read it on a mobile phone without having to zig-zag scroll, or
> zoom out and use a microscope (2560x1440 on a 6" screen is both a blessing
> and a curse)

Point taken. The old non-css look is now avalable as glossary-m.html.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Martin
In reply to this post by Dirk Laurie-2
On 05/04/2017 12:12 AM, Dirk Laurie wrote:
> I have expanded the Upvalue entry, thanks. The site also contains an
> essay "upvalues.html" that I wrote two years ago which goes way beyond
> glossary level.
>
Sorry for nitpicking but there are still ambiguous text
"a pair of [=====] with any number of equal signs" in
"delimiter" description.

-- Martin

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
2017-05-05 12:41 GMT+02:00 Martin <[hidden email]>:
> On 05/04/2017 12:12 AM, Dirk Laurie wrote:
>> I have expanded the Upvalue entry, thanks. The site also contains an
>> essay "upvalues.html" that I wrote two years ago which goes way beyond
>> glossary level.
>>
> Sorry for nitpicking

I agree with this assessment ...

> but there are still ambiguous text "a pair of [=====] with any number
> of equal signs" in "delimiter" description.

... but not with this. "A pair of" implies that they are same size. Think
shoes.

The Oracle says: Zot.

-- Dirk

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Roberto Ierusalimschy
> > but there are still ambiguous text "a pair of [=====] with any number
> > of equal signs" in "delimiter" description.
>
> ... but not with this. "A pair of" implies that they are same size. Think
> shoes.

I think the problem is the "[=====]". What is "a pair of [=====]"?

     [=====] some text [=====]?

     [=====  some text  =====]?

     [=====[ some text ]=====]?

-- Roberto

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Peter Pimley
This is great.

"\xcafe" in the entry for "Escape" is a cute in-joke for experts, but an unfair trap for noobs or people for whom English is not their first language.  Could it be replaced by something with at least one 1-9 digit at the start?


On 5 May 2017 at 13:59, Roberto Ierusalimschy <[hidden email]> wrote:
> > but there are still ambiguous text "a pair of [=====] with any number
> > of equal signs" in "delimiter" description.
>
> ... but not with this. "A pair of" implies that they are same size. Think
> shoes.

I think the problem is the "[=====]". What is "a pair of [=====]"?

     [=====] some text [=====]?

     [=====  some text  =====]?

     [=====[ some text ]=====]?

-- Roberto


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
In reply to this post by Roberto Ierusalimschy
2017-05-05 14:59 GMT+02:00 Roberto Ierusalimschy <[hidden email]>:

>> > but there are still ambiguous text "a pair of [=====] with any number
>> > of equal signs" in "delimiter" description.
>>
>> ... but not with this. "A pair of" implies that they are same size. Think
>> shoes.
>
> I think the problem is the "[=====]". What is "a pair of [=====]"?
>
>      [=====] some text [=====]?
>
>      [=====  some text  =====]?
>
>      [=====[ some text ]=====]?

If anyone else had posted this, the Oracle would again have said: Zot.

But for you, I'll think about it.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
2017-05-05 19:44 GMT+02:00 Dirk Laurie <[hidden email]>:

> 2017-05-05 14:59 GMT+02:00 Roberto Ierusalimschy <[hidden email]>:
>>> > but there are still ambiguous text "a pair of [=====] with any number
>>> > of equal signs" in "delimiter" description.
>>>
>>> ... but not with this. "A pair of" implies that they are same size. Think
>>> shoes.
>>
>> I think the problem is the "[=====]". What is "a pair of [=====]"?
>>
>>      [=====] some text [=====]?
>>
>>      [=====  some text  =====]?
>>
>>      [=====[ some text ]=====]?
>
> If anyone else had posted this, the Oracle would again have said: Zot.
>
> But for you, I'll think about it.

OK, I have replaced the paragraph of text by Lua examples, and
somewhat reluctantly removed "cafe".

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Andrew Starks-2
In reply to this post by Dirk Laurie-2
On Fri, Apr 28, 2017 at 8:54 AM, Dirk Laurie <[hidden email]> wrote:
> Inspired by Adel's original post on the thread "Beginner to Programming",
> I have put together:
>
>      https://rawgit.com/dlaurie/lua-notes/master/glossary.html
>

Adding a complete definition for a coroutine and thread seems within
reach of the apparent intent, no? You may draw the goal post as you
wish (I'm sure that you don't want this to become a manual) but
completeness would be a reasonable goal.

 I'll get it wrong, but:

Thread: 1) One of Lua's basic types 2) A Lua state. In the Lua
scripting language, a thread value contains an execution state that is
initialized with the the `coroutine.create` and a function, which
serves as the thread's main function. The thread may be in one of four
states:

 * normal: initialized but not running
 * running: the current thread
 * suspended: a thread that has been yielded with coroutine.yield
 * dead: the execution is finished because the main function exited
cleanly or there was an error


Coroutine: A function that contains one or more calls to
`coroutine.yield`. A coroutine is executed in a thread that is created
by `coroutine.create`.


-------

As I send this email, I know that this is wrong. One of the fantastic
things about your index is that it forces the definition of difficult
terms to grasp. I think that the Luaverse will be much better off if
you tackle `coroutine` and `thread`.

Thanks for doing this Dirk! Hopefully my suggestions are helpful and make sense.



--
Andrew Starks

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Paul E. Merrell, J.D.
Is load and  execute too advanced for the glossary? I use it a lot, e.g.,

     load(s)()

Best regards,

Paul
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
The term 'load' has been in from the start, with some examples.
Execute, call, invoke, are not. The nuances are subtle. It's a
challenge. :-)

2017-05-06 0:41 GMT+02:00 Paul E. Merrell, J.D. <[hidden email]>:

> Is load and  execute too advanced for the glossary? I use it a lot, e.g.,
>
>      load(s)()
>
> Best regards,
>
> Paul
>
> ________________________________
> View this message in context: Re: [ANN] Lua 5.3 Glossary
> Sent from the Lua-l mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
In reply to this post by Andrew Starks-2
2017-05-05 23:27 GMT+02:00 Andrew Starks <[hidden email]>:

> I think that the Luaverse will be much better off if
> you tackle `coroutine` and `thread`.

OK, the most recent push has them.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Andrew Starks-2

On Sat, May 6, 2017 at 01:18 Dirk Laurie <[hidden email]> wrote:
2017-05-05 23:27 GMT+02:00 Andrew Starks <[hidden email]>:

> I think that the Luaverse will be much better off if
> you tackle `coroutine` and `thread`.

OK, the most recent push has them.

Thank you! I read them. Why are coroutines too complicated to explain?

What is the hard definition of a coroutine in Lua?

Is it the execution stack that is contained in a thread that is not the main thread?

Is it any function definition with a call to coroutine.yield?

I think that it's the first one, which doesn't require a call to `coroutine.resume`, which is at least kind of interesting. 

Also, I think that you can leave off the "this topic is to complicated" comment. If it's wanting for further definition, then it should be further defined as part of some later update. If not, then what is there doesn't need and isn't helped by the disclaimer. Imho. 

-Andrew

-Andrew


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
2017-05-06 17:50 GMT+02:00 Andrew Starks <[hidden email]>:

>
> On Sat, May 6, 2017 at 01:18 Dirk Laurie <[hidden email]> wrote:
>>
>> 2017-05-05 23:27 GMT+02:00 Andrew Starks <[hidden email]>:
>>
>> > I think that the Luaverse will be much better off if
>> > you tackle `coroutine` and `thread`.
>>
>> OK, the most recent push has them.
>
>
> Thank you! I read them. Why are coroutines too complicated to explain?
>
> What is the hard definition of a coroutine in Lua?

I can't remeber anymore, All I can remember is that when I was a newbie,
metamethods, coroutines and the generic 'for' were the things that
threw me. (I never had any problem with #tbl).

> Also, I think that you can leave off the "this topic is to complicated"
> comment. If it's wanting for further definition, then it should be further
> defined as part of some later update. If not, then what is there doesn't
> need and isn't helped by the disclaimer. Imho.

I like this suggestion.

-- Dirk

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Andrew Starks-2

On Sat, May 6, 2017 at 15:16 Dirk Laurie <[hidden email]> wrote:
2017-05-06 17:50 GMT+02:00 Andrew Starks <[hidden email]>:
>
> On Sat, May 6, 2017 at 01:18 Dirk Laurie <[hidden email]> wrote:
>>
>> 2017-05-05 23:27 GMT+02:00 Andrew Starks <[hidden email]>:
>>
>> > I think that the Luaverse will be much better off if
>> > you tackle `coroutine` and `thread`.
>>
>> OK, the most recent push has them.
>
>
> Thank you! I read them. Why are coroutines too complicated to explain?
>
> What is the hard definition of a coroutine in Lua?

I can't remeber anymore, All I can remember is that when I was a newbie,
metamethods, coroutines and the generic 'for' were the things that
threw me. (I never had any problem with #tbl).


As a newbie, I'd like something to explain a concept to me to the degree that if it's being discussed in a sentence, I know conceptually what author is referring to. Therefore, I think that:


thread: A Lua state, which may be initialized, executing, paused,  and done (with or without error). 


coroutine: a thread that has a parent.




> Also, I think that you can leave off the "this topic is to complicated"
> comment. If it's wanting for further definition, then it should be further
> defined as part of some later update. If not, then what is there doesn't
> need and isn't helped by the disclaimer. Imho.

I like this suggestion.

-- Dirk

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
2017-05-06 23:02 GMT+02:00 Andrew Starks <[hidden email]>:

>
> On Sat, May 6, 2017 at 15:16 Dirk Laurie <[hidden email]> wrote:
>>
>> 2017-05-06 17:50 GMT+02:00 Andrew Starks <[hidden email]>:
>> >
>> > On Sat, May 6, 2017 at 01:18 Dirk Laurie <[hidden email]> wrote:
>> >>
>> >> 2017-05-05 23:27 GMT+02:00 Andrew Starks <[hidden email]>:
>> >>
>> >> > I think that the Luaverse will be much better off if
>> >> > you tackle `coroutine` and `thread`.
>> >>
>> >> OK, the most recent push has them.
>> >
>> >
>> > Thank you! I read them. Why are coroutines too complicated to explain?
>> >
>> > What is the hard definition of a coroutine in Lua?
>>
>> I can't remeber anymore, All I can remember is that when I was a newbie,
>> metamethods, coroutines and the generic 'for' were the things that
>> threw me. (I never had any problem with #tbl).
>
>
> As a newbie, I'd like something to explain a concept to me to the degree
> that if it's being discussed in a sentence, I know conceptually what author
> is referring to. Therefore, I think that:
>
> thread: A Lua state, which may be initialized, executing, paused,  and done
> (with or without error).
>
> coroutine: a thread that has a parent.

I think that you are very precise but way above the head of the
intended readership. Lua states are API only, and 'parent' is
a word not used in the Manual.

There's a new push on the website, with a new look courtesy of Jay Carlson.

-- Dirk

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Andrew Starks-2

On Sun, May 7, 2017 at 05:26 Dirk Laurie <[hidden email]> wrote:
2017-05-06 23:02 GMT+02:00 Andrew Starks <[hidden email]>:
>
> On Sat, May 6, 2017 at 15:16 Dirk Laurie <[hidden email]> wrote:
>>
>> 2017-05-06 17:50 GMT+02:00 Andrew Starks <[hidden email]>:
>> >
>> > On Sat, May 6, 2017 at 01:18 Dirk Laurie <[hidden email]> wrote:
>> >>
>> >> 2017-05-05 23:27 GMT+02:00 Andrew Starks <[hidden email]>:
>> >>
>> >> > I think that the Luaverse will be much better off if
>> >> > you tackle `coroutine` and `thread`.
>> >>
>> >> OK, the most recent push has them.
>> >
>> >
>> > Thank you! I read them. Why are coroutines too complicated to explain?
>> >
>> > What is the hard definition of a coroutine in Lua?
>>
>> I can't remeber anymore, All I can remember is that when I was a newbie,
>> metamethods, coroutines and the generic 'for' were the things that
>> threw me. (I never had any problem with #tbl).
>
>
> As a newbie, I'd like something to explain a concept to me to the degree
> that if it's being discussed in a sentence, I know conceptually what author
> is referring to. Therefore, I think that:
>
> thread: A Lua state, which may be initialized, executing, paused,  and done
> (with or without error).
>
> coroutine: a thread that has a parent.

I think that you are very precise but way above the head of the
intended readership. Lua states are API only, and 'parent' is
a word not used in the Manual.

There's a new push on the website, with a new look courtesy of Jay Carlson.

-- Dirk

Good point and I like the changes. It's an advanced topic and if the goal is to teach a newcomer about it, a blog post with tutorial is a better avenue. 

-- Andrew

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Lua 5.3 Glossary

Dirk Laurie-2
In reply to this post by Dirk Laurie-2
2017-04-28 15:54 GMT+02:00 Dirk Laurie <[hidden email]>:
> Inspired by Adel's original post on the thread "Beginner to Programming",
> I have put together:
>
>      https://rawgit.com/dlaurie/lua-notes/master/glossary.html

Latest push with inter alia several topics related to memory
dated 9 May 2017/

12