Source language: Translate to:

Comments in compiled apps

General questions about NeoBook

Moderator: Neosoft Support

Comments in compiled apps

Postby Enigman » Wed Jun 18, 2014 10:02 am

Can anyone tell me if comments in the NB script are compiled into the EXE file, or are they stripped out during the compile?

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Comments in compiled apps

Postby Neosoft Support » Wed Jun 18, 2014 10:34 am

Comments are not removed during the compile, but they won't be visible in the exe if you enable the "compress and encrypt publication source code" option on the compile/publish screen.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Comments in compiled apps

Postby Enigman » Wed Jun 18, 2014 10:49 am

Bummer. I was wondering if I start writing massive comments on algorythms if it would impact the size of the pub. That's a yes.

Speaking of comments, is there a comment identification to create "block" comments, such as the "/*" and "*/" start and stop comment symbols?

Also, can you tell me what encryption algorythm is used in the pub? IE, how secure is it when it is not keyed?

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Comments in compiled apps

Postby HPW » Thu Jun 19, 2014 12:08 am

Hello,

When it is so important for you, you have another option to write a parser for the pub-source to strip out the comments.
Then you will have a develoment code base and a production version to final compile.

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: Comments in compiled apps

Postby Neosoft Support » Thu Jun 19, 2014 10:02 am

Speaking of comments, is there a comment identification to create "block" comments, such as the "/*" and "*/" start and stop comment symbols?


Currently, the only way to identify a comment is by placing a period "." at the beginning of each line. However, you can select a block of code and select "Comment/UnComment" from the right click menu.

Also, can you tell me what encryption algorythm is used in the pub? IE, how secure is it when it is not keyed?


The encryption isn't very complex, but it's generally more secure than exes created by other compilers. As with anything, I'm sure someone skilled could crack it if they were sufficiently motivated. Unfortunately, without using key-based encryption the complexity of our encryption is limited. A key-based system would require the user to supply the key every time the program runs.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Comments in compiled apps

Postby Enigman » Thu Jun 19, 2014 10:50 am

However, you can select a block of code and select "Comment/UnComment" from the right click menu.

Ahhhhh ... cool. I never saw that. That's certainly a workable alternative.

As with anything, I'm sure someone skilled could crack it if they were sufficiently motivated. Unfortunately, without using key-based encryption the complexity of our encryption is limited. A key-based system would require the user to supply the key every time the program runs.

Yeah, supplying a key at runtime would suck. As an aside to that, one of the things I ... "do" ... is create encryption methods at the higher ASCII level (as opposed to binary like AES) that result in what I would consider to be "extremely secure" encoded text, without the need for an external key. The methods were inspired by the methods of the Enigma Machine of WWII fame. If you are interested we could chat about that offline.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Comments in compiled apps

Postby Enigman » Thu Jun 19, 2014 10:52 am

HPW wrote:you have another option to write a parser for the pub-source to strip out the comments.
Then you will have a develoment code base and a production version to final compile.

That certainly is an option and would cut down on the compiled size.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Comments in compiled apps

Postby Enigman » Thu Jun 19, 2014 11:09 am

Neosoft Support wrote:Comments are not removed during the compile, but they won't be visible in the exe if you enable the "compress and encrypt publication source code" option on the compile/publish screen.

You may want to consider adding a checkbox on the compile page to "Strip comments from the compiled pub". That would be a great option for reducing pub size and would decrease your encryption overhead, pub startup time, and more...
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Comments in compiled apps

Postby Neosoft Support » Fri Jun 20, 2014 10:37 am

As an aside to that, one of the things I ... "do" ... is create encryption methods at the higher ASCII level (as opposed to binary like AES) that result in what I would consider to be "extremely secure" encoded text, without the need for an external key. The methods were inspired by the methods of the Enigma Machine of WWII fame.


That might be something we can consider for the future if there is sufficient demand. As far as I'm aware, no one has broken the current encryption/compression.

You may want to consider adding a checkbox on the compile page to "Strip comments from the compiled pub". That would be a great option for reducing pub size and would decrease your encryption overhead, pub startup time, and more...


That's a good idea - I'll add it to the list. However, because the compression of plain text is very efficient, unless you're comments are novel length they really shouldn't add significantly to the size of a compiled exe.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Comments in compiled apps

Postby Enigman » Fri Jun 20, 2014 11:06 am

That's a good idea - I'll add it to the list.

Cool. Let me know when that is available.

However, because the compression of plain text is very efficient, unless you're comments are novel length they really shouldn't add significantly to the size of a compiled exe.

If a programmer is worth his salt and writes for future maintainability, then the comments are at least three times the length of the code. In the case of my encryption apps, it needs to be more like ten times. A savings is still a savings. It's all good.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: Comments in compiled apps

Postby bunker » Mon Jun 23, 2014 5:51 am

Hi in the meantime you can use NeoIndent 2...just enable delete comments in options

Image

Greetings
User avatar
bunker
 
Posts: 141
Joined: Sat Sep 29, 2007 4:00 pm


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests