LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2023, 09:49 AM   #46
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,789
Blog Entries: 13

Rep: Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831

Quote:
Originally Posted by Skaperen View Post
the idea is to be able to attach a small amount of data to a file that in the context of the file, does not affect the file, but can still be recognized as being there, extracted, decoded, (if needed), etc.
Well that's not "comments".

Comments are there to aid the code, not to be taken out, decoded, or have zero impact to the file. Yes they have zero impact to the parser, that's the intent and definition of a comment. Instead you're proposing something like markup language.

Reading this makes me feel the same as that user who is continually inventing their own language for years.
 
1 members found this post helpful.
Old 04-23-2023, 10:51 AM   #47
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,479
Blog Entries: 1

Rep: Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695
Java has annotations which is some sort of alternative data-stream in the class files.
 
Old 04-23-2023, 12:22 PM   #48
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,954

Rep: Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215
Quote:
Originally Posted by Skaperen View Post
suppose uuencode did not exist and i was designing something to make it easy to include a binary file in email. would you still wonder why?
You're asking us to consider an alternate scenario in which you clearly stated what you were doing and why you were doing it?

Last edited by dugan; 04-25-2023 at 11:11 AM.
 
Old 04-25-2023, 05:04 PM   #49
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,647

Original Poster
Blog Entries: 31

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by dugan View Post
But uuencode does exist, and if you were trying to reinvent it we'd tell you to use base64.
at least you wouldn't be saying that uuencode could be better than base64.

Quote:
Originally Posted by dugan View Post
Are you being deliberately vague (to avoid revealing proprietary information, or because you don't want your idea stolen, or whatever), or is this actually how well-formed and specific your idea actually is?
i try to express my questions in a way to keep the discussion on topic. when i put more details out there, many people avoid the topic and focus where they should not.

Quote:
Originally Posted by dugan View Post
(Earlier, I actually stopped myself from wondering out loud if you this was a scheme to hide your porn collection).
now i know why you want a copy of my source code
 
Old 04-25-2023, 05:16 PM   #50
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,647

Original Poster
Blog Entries: 31

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by rtmistler View Post
Well that's not "comments".

Comments are there to aid the code, not to be taken out, decoded, or have zero impact to the file. Yes they have zero impact to the parser, that's the intent and definition of a comment. Instead you're proposing something like markup language.
call it "markup" if you want. if you know another way to get the language to be compiled with no effect for that, then i'd to have you say how. in the mean time, having information disguise itself as a comment (while revealing to certain tools) achieves the goal. an archive tool could also do this except that the goal is for the goal is for zero impact whether the added "faked" code is removed or remains in place.
 
Old 04-25-2023, 05:18 PM   #51
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,954

Rep: Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215
Quote:
Originally Posted by Skaperen View Post
i try to express my questions in a way to keep the discussion on topic. when i put more details out there, many people avoid the topic and focus where they should not.
Oh, so it's deliberate? And you kept it up after, *checks* over three weeks of everyone telling you that they have no idea what you're talking about?

This isn't working, and I've wasted enough time with this.

* permanently puts Skaperen in ignore list

Last edited by dugan; 04-25-2023 at 09:13 PM.
 
Old 04-25-2023, 05:21 PM   #52
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,647

Original Poster
Blog Entries: 31

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by dugan View Post
You're asking us to consider an alternate scenario in which you clearly stated what you were doing and why you were doing it?
no. that was in response to post #43 by pan64 to understand the "You can put whatever you want in your files. But why?".
 
Old 04-25-2023, 05:25 PM   #53
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,647

Original Poster
Blog Entries: 31

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by NevemTeve View Post
Java has annotations which is some sort of alternative data-stream in the class files.
i don't know Java. if knowing that has value in the context of this thread, maybe you can explain more.
 
Old 04-26-2023, 12:34 AM   #54
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,479
Blog Entries: 1

Rep: Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695Reputation: 1695
Going back to the original problem: what have you done so far and where are you stuck? Do you still have any open questions?
 
1 members found this post helpful.
Old 04-26-2023, 12:35 AM   #55
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 20,224

Rep: Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834Reputation: 6834
Quote:
Originally Posted by Skaperen View Post
i want to write some reasonably arbitrary text as comments to be prepended and/or appended to source code for most languages or all major languages used in BSD or Linux the code that will write this commented text will not know which language it is, or get to even see the code that the comments will be attached to for to guess the language.
Quote:
Originally Posted by Skaperen View Post
i don't know Java. if knowing that has value in the context of this thread, maybe you can explain more.
Java is definitely a major language, it looks like you need to be familiar with it.

Quote:
Originally Posted by rtmistler View Post
Well that's not "comments".

Comments are there to aid the code, not to be taken out, decoded, or have zero impact to the file. Yes they have zero impact to the parser, that's the intent and definition of a comment.
Comments [can be] used to [auto]generate documentation and also pass options/flags to different linters, analyzers and other tools working on the code.
(but I still don't understand what is it all about)
 
1 members found this post helpful.
Old 04-26-2023, 08:15 AM   #56
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,954

Rep: Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215Reputation: 5215
Quote:
Originally Posted by pan64 View Post
(but I still don't understand what is it all about)
Skaperen made sure that you did not know what it was about, because he wants to keep the thread on topic. If you knew what it was about, then you would avoid the topic and focus on what you should not.

He said that.
 
Old 04-26-2023, 03:17 PM   #57
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,081
Blog Entries: 23

Rep: Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063Reputation: 4063
@OP:

The vagueness of your question and lack of useful additional info has left others, myself included still guessing as to what your actual use case is. Clearly this is beginning to annoy some who have taken time to reply and have received no clarification, all of whom it seems have participated in good faith (and thanks to all), so I think it is time to either provide some useful information, or call it a day for this thread.

I ask you to please review the Site FAQ for guidance in asking well formed questions. Especially visit the link from that page, How to Ask Questions the Smart Way for discussion of things to consider when asking others for help.

After doing so please reformulate your question (in this thread for continuity), preferably providing a specific example of data you wish to include in your not-really-a-comment (for want of a better term) and an example or two of how you would want that to be inserted into some particular language familiar to yourself and others, and explain why simply including it as a comment does not work for you, in order to illustrate your goal. Otherwise, let's all let this thread fade into the mists.

Last edited by astrogeek; 04-26-2023 at 03:20 PM.
 
1 members found this post helpful.
Old 04-30-2023, 12:59 AM   #58
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,647

Original Poster
Blog Entries: 31

Rep: Reputation: 175Reputation: 175
Quote:
Originally Posted by NevemTeve View Post
Going back to the original problem: what have you done so far and where are you stuck? Do you still have any open questions?
i have done nothing more than just think about the "problem" which initially is trying to find if there is a way to tag a source file more directly than trying to define a container for the content and the tag. i could do this by using what each language defines as a comment. but my program would have to know or detect which language it is. a common way that spans many of today's languages would be the answer. and this can be put in front or behind the file, simplifying how this could be designed (insert in the middle could be more complex). i am "stuck" thinking about it. i have thought about it a few times over the years. i'm about to give up on it and do a container.
 
Old 04-30-2023, 01:02 AM   #59
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,647

Original Poster
Blog Entries: 31

Rep: Reputation: 175Reputation: 175
> Java is definitely a major language, it looks like you need to be familiar with it.

i need to learn how to make a comment in Java. beyond that does not meet my needs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
What are the top few most human-readable programming languages? punchy71 Programming 46 01-11-2023 02:17 PM
LXer: How To Print Files Without Comments And Empty Lines In Linux LXer Syndicated Linux News 0 07-01-2020 02:57 AM
Request: Slackware Info-Zip ZipNote be patched to support writing back comments ruario Slackware 0 04-24-2014 12:44 PM
[SOLVED] Add lines end of file above the end comments bkone Programming 2 02-27-2012 09:58 AM
languages of linux: which languages can be choosen in suse and red-hat distributions? Klaus Schnorr Linux - Software 3 09-10-2005 02:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration