Why does this Library not load?

Freeform discussion about anything related to modding Transcendence.
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

Using a semi-colon to delimit TLisp comments is objectively worse than explicitly enclosing it inside XML comments.

Code: Select all

<!-- ; Use in <OnUpdate with AU_AmmoBoxHandler in <OnFireWeapon> -->
This would-be syntax error that required George's intervention to even identify is totally sanitized when enclosed by XML tags, TLisp doesn't even see it.

And a semi-colon is still more convenient? Sure, if you have a team of developers to scan through your code and fix your errors on demand.
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
User avatar
sun1404
Militia Captain
Militia Captain
Posts: 527
Joined: Thu Nov 03, 2011 10:32 am
Location: Heretic. (Finally!)

The reason this required George's attention to detect is, I believe, because no one else knew that this would cause an error. Now that we know, just not do it again. Every code has the risk of error, and I don't think just because a symbol caused error once it would be a bad symbol and shouldn't be used.
Yes, look at my avatar, I have a wyvera type ship.
TVR
Militia Commander
Militia Commander
Posts: 334
Joined: Sat Sep 08, 2012 3:26 am

For future reference, here is a list of all the solutions proposed to deal with the inability for TLisp semi-colon comments to contain XML tags:

a) Continue using semi-colons, and refer to XML tags in riddle only.
b) Wrap all TLisp code in a <[CDATA]> block and never use pointers again.
c) Invent a brand new comment token along with a brand new preprocessor to get rid of them.
d) Atarlost's method, which was apparently too good to be shared in this thread as a solution.

These measures would be laughable, if they weren't also so sincere. To those of you reading this who actually want to avoid the problems mentioned in this thread, and use XML tags in comments, now and without having to lose some other random functionality:

e) Use <!-- and --> to enclose all comments. Compared to semicolon comments, XML comments require an additional token at the end of each comment, but is the only way to include XML tags inside comments without side effects. Consider the extra effort as a form of syntactic salt, tokens of good programming practice.

/thread (That's your cue, Atar)
Fiction is reality, simplified for mass consumption.
PGP: 0x940707ED, 5DB8 4CB4 1EF5 E987 18A0 CD99 3554 3C13 9407 07ED
Bitcoin: 1LLDr7pnZDjXVT5mMDrkqRKkAPByPCQiXQ
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

TVR wrote:For future reference, here is a list of all the solutions proposed to deal with the inability for TLisp semi-colon comments to contain XML tags:

a) Continue using semi-colons, and refer to XML tags in riddle only.
b) Wrap all TLisp code in a <[CDATA]> block and never use pointers again.
c) Invent a brand new comment token along with a brand new preprocessor to get rid of them.
d) Atarlost's method, which was apparently too good to be shared in this thread as a solution.

These measures would be laughable, if they weren't also so sincere. To those of you reading this who actually want to avoid the problems mentioned in this thread, and use XML tags in comments, now and without having to lose some other random functionality:

e) Use <!-- and --> to enclose all comments. Compared to semicolon comments, XML comments require an additional token at the end of each comment, but is the only way to include XML tags inside comments without side effects. Consider the extra effort as a form of syntactic salt, tokens of good programming practice.

/thread (That's your cue, Atar)
Okay, I'm going to stop this thread right now.

For starts:
There needs be no arguments or baiting of other members of the community.

Second, lets be clear, most people here are using the current comment system just fine, and the ; comment delimiter works for quite a few languages not just tlisp. But if there is an issue, lets resolve it by filing bug reports.
The solution that was found can be published, but we don't need to make it into an issue in the chance it isn't published.

Send me a message if you want this topic reopened.
Image
Image
Locked