Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th June 2007, 10:22   #21  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Try this http://avisynth2.sourceforge.net/avisynth2572.zip
IanB is offline   Reply With Quote
Old 11th June 2007, 12:54   #22  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Nested comments is interesting.
But why both nested and not nested?
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 12th June 2007, 02:43   #23  |  Link
check
phjbdpcrjlj2sb3h
 
check's Avatar
 
Join Date: Sep 2005
Location: Western Australia
Posts: 1,692
The only concern I have with [* *] is that it's very unusual and will take me a while to get used to. If /* */ is included as well hopefully everyone will just use the latter instead
check is offline   Reply With Quote
Old 12th June 2007, 03:28   #24  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Quote:
Originally Posted by Fizick
But why both nested and not nested?
So people can experiment, experience and comment on both philosophies.
Quote:
Originally Posted by check
... concern I have with [* *] is that it's very unusual ...
I needed 2 distinct tokens to make both nested and first drop comments available together in the one version. The choice at this point is purely arbitary.

Now is the time to speak up. Make a proposition and argue your case.
IanB is offline   Reply With Quote
Old 12th June 2007, 08:13   #25  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by IanB View Post
Now is the time to speak up. Make a proposition and argue your case.
Is there even any reason for non-nestable comments? If you don't want to nest comments you can just not do it...

But it's always a pain in the rear end to comment out bigger parts of code that happen to already have a block comment - like they're often used to document functions and the like, after all...

A vote for nested comments from me.
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 13th June 2007, 20:28   #26  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
Probably one nested will be enough (if it is not very hard for parser to process complex multi-level scripts).
I tried a new avisynth version a little.
Seems, it works fine.

Let's comment all!
IMO it is the greatest addition to avisynth language for recent years!
The previous was KillVideo of course (I can not appraise the mysterious OPT_UseWaveExtensible)
Fizick is offline   Reply With Quote
Old 14th June 2007, 00:06   #27  |  Link
gzarkadas
Registered User
 
gzarkadas's Avatar
 
Join Date: Sep 2005
Location: 100011110010001000001 10000011111111000001
Posts: 221
I like having both alternatives. They are useful on different occasions. The interaction with strings must be thinked of more though IMHO. The following script:
Code:
[*
s = " [* "
*]
BlankClip().Subtitle("OK")
gives error "nestable block comment missing closing *]", which I believe it would suprised most people of Avisynth user base that are not inclined in programing.

Perhaps string contents should not be examined for starting or terminating comment characters, as they currently do not for single line # comments.
__________________
AVSLib, a free extension library for Avisynth. Current version: 1.1.0 (beta), 14/05/2007.
[ Home page | Download page ]
gzarkadas is offline   Reply With Quote
Old 14th June 2007, 00:55   #28  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@gzarkadas,

Yes, sprung! The current code has been thrown together rather quickly to explore the concept. You will also find a comment closing inside a string trips up as well.

This is where we need to define some grammar rules with hierachy and how this most usefully will work.
IanB is offline   Reply With Quote
Old 14th June 2007, 06:39   #29  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
So, in this beta version we can not use comment symbols in string.
In this case we probably can replace comment block symbols to combination not-permitted in strings (and more long):
[""" for comment opening
"""] for comment closing

It is not perfect but more rarely occures.
Fizick is offline   Reply With Quote
Old 20th June 2007, 15:59   #30  |  Link
3ngel
Registered User
 
Join Date: Mar 2005
Posts: 457
Quote:
I am looking forward for a facility like /* */ of C++
Wow, now i remember i wanted to open this thread many time ago, but then i forgot

BTW, i would be very happy if avisynth would implement the C++ /* */ comments.
MANY times i've had the situation to comment out many lines, and i had to type # and type... and type... and type... and type...

Any news about this?
Sorry if i'm late or if it's already developed

OPS: I forgot an important, i think the /* */ is the best because some of avs users are programmers, and so it's good to the non programmers to just adapt them to the C++ language in some way eheheh

Last edited by 3ngel; 20th June 2007 at 16:01.
3ngel is offline   Reply With Quote
Old 20th June 2007, 16:21   #31  |  Link
esby
Registered User
 
esby's Avatar
 
Join Date: Oct 2001
Location: france
Posts: 521
Is // assigned to something currently in avisynth?

Could it be used as an alternative to # single line comments ?

esby
__________________
http://esby.free.fr/
esby is offline   Reply With Quote
Old 24th June 2007, 21:29   #32  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
IMO, adding // will broke compatibility without any real need.

here is my version to try:
http://avisynth.org.ru/tmp/avisynth258_comments.zip

[" "] nested block comments
/""" """/ not nested

this way we can use nested comments in complex string (with tripled doublequote) for Eval, subtitle, etc.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 24th June 2007, 22:14   #33  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Quote:
Originally Posted by 3ngel View Post
MANY times i've had the situation to comment out many lines, and i had to type # and type... and type... and type... and type...
You need a better text editor.

In TextPad, for example, I can select the lines, hit Ctrl+Q,B to enable block-selection mode, then go to Edit > Fill Block. And then to undo it, I could enable block-selection mode, highlight the # characters, and just hit delete.

Or as I mentioned a the very beginning of this thread, it's trivial to wrap the relevant lines in a function.
stickboy is offline   Reply With Quote
Old 24th June 2007, 22:17   #34  |  Link
stickboy
AviSynth Enthusiast
 
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
Quote:
Originally Posted by esby View Post
Is // assigned to something currently in avisynth?

Could it be used as an alternative to # single line comments ?
I agree with Fizick. It doesn't offer new functionality and just restricts the grammar. Multiple ways to do things isn't always good.
stickboy is offline   Reply With Quote
Old 24th June 2007, 23:11   #35  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,393
Quote:
Originally Posted by stickboy View Post
In TextPad, for example, I can select the lines, hit Ctrl+Q,B to enable block-selection mode, then go to Edit > Fill Block.
Somewhat cumbersome for my taste, since you need to Ctrl+Q,B once more to quit block-selection mode again. I prefer Alt+draggin' (press down Alt before using the mouse button).
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 24th June 2007, 23:57   #36  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@Fizick, Ahhggggg! You just changed the strings, you didn't fix my code

Parse this
Code:
/"""
BlankClip()
SubTitle("""/ is the "divide" character""")
"""/
As I said
Quote:
Originally Posted by IanB
This is where we need to define some grammar rules with hierachy and how this most usefully will work.
In C // seems to have the highest lexical priority followed by /* , i.e. // /* does not start a block comment. And nothing protects or masks a */ and the nearest C has to nestable comments is #if 0, #endif.

This model does not seem to be what people want. We struggle to express clearly how we want the grammar to work. Less coding more deep thinking needed here.
IanB is offline   Reply With Quote
Old 25th June 2007, 00:25   #37  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
from a nonprogramer; i do like a # button in AVSedit 1.1.0.0
smok3 is offline   Reply With Quote
Old 25th June 2007, 11:03   #38  |  Link
gzarkadas
Registered User
 
gzarkadas's Avatar
 
Join Date: Sep 2005
Location: 100011110010001000001 10000011111111000001
Posts: 221
Quote:
Originally Posted by IanB View Post
This is where we need to define some grammar rules with hierachy and how this most usefully will work.
The existing behavior is that everything inside a string is preserved, even a comment character (#); once a " or """ is found the tokenizer skips everything until a matching closing " or """ is found.

Thus, IMHO, the tokenizer when searching for a matching closing block comment should skip entirely string literals, with the existing rules (which allow inserting a "" string inside a """ string). Anything else would break the established from the current behavior user expectations.
__________________
AVSLib, a free extension library for Avisynth. Current version: 1.1.0 (beta), 14/05/2007.
[ Home page | Download page ]
gzarkadas is offline   Reply With Quote
Old 25th June 2007, 15:31   #39  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
@gzarkadas, How would you parse this
Code:
/* """ */
How is it different from this
Code:
# """
IanB is offline   Reply With Quote
Old 25th June 2007, 19:28   #40  |  Link
Bidoche
Avisynth 3.0 Developer
 
Join Date: Jan 2002
Location: France
Posts: 639
easy : "/*" *(. - "*/") "*/"
Bidoche is offline   Reply With Quote
Reply

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.