Conversation

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: MS DOS batch file ebook.

#16 Post by berserker » 28 Dec 2013 21:52

foxidrive wrote:So your goal is to sit on the sidelines and yell obscenities at the referee? :)

there's no smoke without fire. I have debated my points, but no one wants to debate me on technicalities except for the "this is a batch forum so others are not allowed" human made rule. Like i said before, Perl is just another tool, much like wget /sed which are also third party , and others. So why is not allowed? Even asking the TS what tools he can use is also not allowed. Don't you think the "rules" is too extreme? well i have sinced got past that so i don't wish to engage in this anymore than you do.


foxidrive wrote:No offense intended but from your input to date it's doubtful that you know how to script in batch, to solve the problems. Maybe you could solve them in perl.


Knowing how to script in batch vs knowing how to solve the problem are entirely different things. I didn't post batch solutions, but that doesn't mean I don't know how to script in batch. I have been doing that since eons ago. But have since stopped because I know there are better ways to use my tools to do things.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: MS DOS batch file ebook.

#17 Post by Squashman » 28 Dec 2013 22:01

Perl is an interpreter that needs to be installed and configured. While wget and sed are self contained executable programs that can easily be integrated into a batch program.

berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: MS DOS batch file ebook.

#18 Post by berserker » 28 Dec 2013 22:12

Squashman wrote:Perl is an interpreter that needs to be installed and configured. While wget and sed are self contained executable programs that can easily be integrated into a batch program.


wget/sed are C programs. They are already compiled and distributed like that. And you download them from somewhere. If not, you compile the source yourself. But you still need the compiler. you can also think of it this way, "compiling" a C program is the same as zipping up necessary libraries+headers together to make it one. Think of Java and how the jar format works. same concept.

If you can install a third party program, you can install Perl. :)

If you really want to talk about self containment, Perl has a packager to "combine" the script into a standalone executable. Then you can distribute your program. Other languages too. Python has pyinstaller/py2exe, Ruby has ocra, even PHP has too.

There are many things we can do nowadays, but most of them restricted by policies in my opinion.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: MS DOS batch file ebook.

#19 Post by Squashman » 28 Dec 2013 22:40

You are not installing WGET or SED because they are self contained executable programs. Trying explaining all what you just said to someone new who needs help writing a batch file and does not even have experience with batch. All you are going to do is confuse them more.

Your reference to java is a bad example as you still need Java installed to run the JAR.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: MS DOS batch file ebook.

#20 Post by foxidrive » 28 Dec 2013 22:53

berserker wrote:I have debated my points, but no one wants to debate me on technicalities except for the "this is a batch forum so others are not allowed" human made rule. Like i said before, Perl is just another tool, much like wget /sed which are also third party , and others. So why is not allowed?


if you want to solely post perl solutions, then it's appropriate for you to find a perl forum. This is what you started doing when you arrived here and why it was not appreciated.

Even asking the TS what tools he can use is also not allowed.


Quite untrue.

Knowing how to script in batch vs knowing how to solve the problem are entirely different things. I didn't post batch solutions, but that doesn't mean I don't know how to script in batch.
I have been doing that since eons ago. But have since stopped because I know there are better ways to use my tools to do things.


Here is the bone of contention. As I understand the forum, it focuses on batch files and solutions using batch files.

berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: MS DOS batch file ebook.

#21 Post by berserker » 28 Dec 2013 22:55

Squashman wrote:You are not installing WGET or SED because they are self contained executable programs. Trying explaining all what you just said to someone new who needs help writing a batch file and does not even have experience with batch. All you are going to do is confuse them more.

well, I just replied based on your comment.
Squashman wrote:While wget and sed are self contained executable programs that can easily be integrated into a batch program.


well, if you are arguing that they are self contained and easily integrated. I am just telling you isn't it the same ? For example , sed

Code: Select all

sed "s/old/new" file


Perl:

Code: Select all

perl -pne 's/kites/new/' file


The issue of "installation" is not a problem. If you can use sed, you can use perl. And besides, there is learning curve for using sed as well and practically most other tools!

berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: MS DOS batch file ebook.

#22 Post by berserker » 28 Dec 2013 22:59

Squashman wrote:Your reference to java is a bad example as you still need Java installed to run the JAR.


and that reference is for TS whose environment allows it. If that environment allows wget/sed, why is other tools not allowed?

berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: MS DOS batch file ebook.

#23 Post by berserker » 28 Dec 2013 23:07

foxidrive wrote:if you want to solely post perl solutions, then it's appropriate for you to find a perl forum. This is what you started doing when you arrived here and why it was not appreciated.

but nowhere in the rules of this forum says we cannot. That's why I asked for specific rules to be instated. No one answers me why that's not possible to be put in black and white. And why not create another part of the forum, one dedicated to alternative solutions? powershell included.

foxidrive wrote:
Even asking the TS what tools he can use is also not allowed.

Quite untrue.

yes, its true.

foxidrive wrote:Here is the bone of contention. As I understand the forum, it focuses on batch files and solutions using batch files.

yes, and I have debated before also, in batch files, you can use wget and sed and other tools as well. batch files are just making use of tools bundled together to perform a task. it doesn't matter how you script it or what tools you use. The fact is, we are only restricted in how we set and define what are actually batch files! Are your kind of batch files only restricted to a bare install of the windows system only and no other tools are allowed? from what I know, a batch file is not like that, technically.

I find that mods are placing too much emphasis on "guessing" what the TS can or cannot use, before TS even specify their type of environment. Coming to that, why not set a rule or template for every asker to state their environment and tools they can use and what they know?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: MS DOS batch file ebook.

#24 Post by foxidrive » 29 Dec 2013 08:02

berserker wrote:
foxidrive wrote:if you want to solely post perl solutions, then it's appropriate for you to find a perl forum. This is what you started doing when you arrived here and why it was not appreciated.

but nowhere in the rules of this forum says we cannot.


More than one admin discussed this with you in PMs and you argued with them and did what you wanted anyway.
Your account was suspended for a short period, so you took to creating numerous other accounts. This is frowned upon by the admin.

Keep your comments on topic, and in the spirit of the forum, and nobody will have a problem with you.
If you reply to say that you don't know what is on topic or what the spirit of the forum is, then you really aren't trying.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Conversation

#25 Post by Squashman » 29 Dec 2013 09:30

Why dont you understand that installation is the problem and installing Perl and running one of your scripts is not really the easiest solution for someone who barely knows anything about programming. A self contained executable can easily be downloaded and run whereas the user may not have the rights to install perl at all! Not to mention we are not a Perl forum.

Have you seen Avengers when she says "I have a very unique and specific skill set." That is what we are trying to foster here as much as possible. We only reach out to 3rd party utilities when absolutely necessary.

You can either contribute code to this forum or learn from this forum but pushing your agenda on the rest of us is not helping anyone.

berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: Conversation

#26 Post by berserker » 29 Dec 2013 10:23

Squashman wrote:Why dont you understand that installation is the problem and installing Perl and running one of your scripts is not really the easiest solution for someone who barely knows anything about programming. A self contained executable can easily be downloaded and run whereas the user may not have the rights to install perl at all! Not to mention we are not a Perl forum.

In that case, set up one time Perl installation on a test machine. use a packager to convert to standalone self contained exe. And then use in your batch. Not just Perl can do this.

Squashman wrote:You can either contribute code to this forum or learn from this forum but pushing your agenda on the rest of us is not helping anyone.
[/quote][/quote]
well, my ultimate agenda is only to show people how things can be done another way if TS's rules permit. But none of you can understand that point, then not every TS is ignorant in programming.

berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: MS DOS batch file ebook.

#27 Post by berserker » 29 Dec 2013 10:32

foxidrive wrote:
Keep your comments on topic, and in the spirit of the forum, and nobody will have a problem with you.


when is my comments not on topic? At the very least, I didn't post an Assembly code to solve the problem. That's wayyy not on topic. I am merely just suggesting a different tool to do the job and if this tool is being used in a batch file, then what is wrong? Furthermore, if TS can use other tools, then why the fuss?

AiroNG
Posts: 46
Joined: 17 Nov 2013 15:00
Location: Germany

Re: Conversation

#28 Post by AiroNG » 29 Dec 2013 14:08

@berserker
The way i see it:
This is a forum for dos-batch. Since (almost) every computer has acces to vbscript/jscript code snippets of those are welcome.
On my work machine i'm strictly forbidden to install third-party software (compiler, wget, etc) and while i'm at home
I do not have the slightest interest in installing/using compilers of Perl/C/whatever...
But if i wanted to, i'd go and visit a forum which is dedicated to those programing languages and NOT a dos-batch forum.

when is my comments not on topic? [...] I am merely just suggesting a different tool to do the job and if this tool is being used in a batch file, then what is wrong? [...]

correct me if i'm wrong, but you (and a very similar sounding "blyanadams"...) are throwing perl codes around like this is a perl forum.
How about posting dos-batch codesnippets in this dostipps forum?


Judging by the comments of others, you've been told what NOT to do on this forum.
Act accordingly instead of acting like a little child that's not getting what it wants.

If you do not like the rules, then feel free to leave and never return here otherwise stop trolling :!:

berserker
Posts: 95
Joined: 18 Dec 2013 00:51

Re: Conversation

#29 Post by berserker » 29 Dec 2013 19:07

AiroNG wrote:@berserker
The way i see it:
This is a forum for dos-batch. Since (almost) every computer has acces to vbscript/jscript code snippets of those are welcome.
On my work machine i'm strictly forbidden to install third-party software (compiler, wget, etc) and while i'm at home
I do not have the slightest interest in installing/using compilers of Perl/C/whatever...
But if i wanted to, i'd go and visit a forum which is dedicated to those programing languages and NOT a dos-batch forum.

again, the "dos-batch" term defined here is very vague. what does dos-batch mean to you?
1) pure dos-batch + no other external tools? ie only cmd.exe internal commands?
2) dos-batch+tools?
3) Or dos-batch + only those that comes with Windows pre-installed?

programming languages are also tools. Like I already stated so many times. What can or cannot be done in a batch environment is only restricted by 2 things
1) TS's environment
2) Ts's knowledge
other than that batch is just a text file that does a job.

What you do at home I am not interested. I am only interested in TS's problems.

AiroNG wrote:correct me if i'm wrong, but you (and a very similar sounding "blyanadams"...) are throwing perl codes around like this is a perl forum.
How about posting dos-batch codesnippets in this dostipps forum?

Perl is just a tool. If TS doesn't have it or know it, so be it. There's nothing wrong suggesting alternative solutions to solve a problem. How do you all assume that TS knows nothing besides batch ?

AiroNG wrote:Judging by the comments of others, you've been told what NOT to do on this forum.
Act accordingly instead of acting like a little child that's not getting what it wants.

If you do not like the rules, then feel free to leave and never return here otherwise stop trolling :!:


yes, so I have asked the rules to be set up in black and white. Imagine you are the police, but you don't have a law that says i cannot do it. Can you arrest me and charge me in court? rules should be defined
1) Define what is really DOS-batch in this forum
2) Define what the TS should specify when posting questions
- environment
- tools he can use
3) others.

Then I will be satisfied.
(PS if you are not happy, then just ignore my posts. anyway I give suggestions not to you but the TS. why is it a problem to you? )

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Conversation

#30 Post by penpen » 29 Dec 2013 19:47

I've done some research, so it took a while before i could post something.
To hold it short i avoid quoting who has said what, but i summarize a little bit:
This should anwer the question which is a replacement of what, and i see this a little bit like berserk
berserker wrote:depends how you look at it.
But i don't let my personal view count in this case, as it is the view of microsoft that counts.

http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-01-91-05-67/Monad-Manifesto-_2D00_-Public.doc
Monad == Powershell

Monad-Manifesto wrote:Monad is the next generation platform for administrative automation.
Monad solves traditional management problems by leveraging the .Net Platform.
So this should replace the usage of these tools for system developers, testers, power users, and administrators only:
Monad-Manifesto wrote:1. A programmatic shell (e.g. sh, csh, ksh, bash)
2. A set of administrative commands (e.g. ifconfig, ps, chmod, kill)
3. A set of text manipulation utilities (e.g. awk, grep, sed).
4. Administrative GUIs layered on top of commands and utilities
This includes the cmd.exe, the complete WSH (cscript/wscript with JScript, and VBScript), and VB.
But this is explicitely for system developers, testers, power users, and administrators only:
not for default users, although a subset of the Monad Shell commands may be free to use, if not disabled by admin.


http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true
cmd.mspx wrote:You can use the command shell to create and edit batch files (also called scripts) to automate routine tasks:
Result: cmd.exe replaces command.com


WSH (VBScript/JScript/cscript/wscript)
This should replace qbasic, i actually haven't found the html page in internet, but i think this should be not hard to believe.


The next big task: Using Perl, Python, PHP
There are portable versions available; as only 2 links are allowed, i misuse the code-blocks,
but i only link the portable perl version, as i the other portable programs don't look trustworthy (at least in my eyes):

Code: Select all

http://strawberryperl.com/
seems to be trustworthy, because it is linked by: http://www.perl.org/
But these portables have a great disadvantage: They are really huge... the smallest is the strawberryperl:
~ 100 MB (zipped), 315 MB (unzipped)
My user profile at work is limited to 128 MB, so i cannot use them there, even if i would want.
And if i had to solve tasks at work, i even would not download these software at home,
berserker wrote:to "combine" the script into a standalone executable
In addition if developing such an application it could be, that i have to bustle between home and work,
or to completely developing it at home: Both not my favorites, and i think i'm not the only one with this opinion.
Downloading that much may even discourage most users.


In addition there are similar tools to do the same: JScript, VBScript, server sided XML/XSLT/JavaScript.
No need to download anything which, i think, most of the users would prefer.


Next point for discussion: portable versions of wget (~450 KB) /sed (~ 77KB)
These sizes are much better, although i doubt i ever would use them for my own:
These programs could easily be programmed with JScript/C#;
i also have access to C++ at work, but i think that is an exception.
But i have no doubt that it might be acceptable for many end users,
as this serves fast (wanted) results, especially if they cannot solve that with pure batch.


Finally my opinion about that all:
On a batch forum, a solutions may not bound on any specific language:
i have no problem in using perl, c++ assembler, or even whitespace,
or even more strange programming languages.

But every programmer should follow this rules (among others) of programming (in computer science terms): Minimal costs - maximum benefits.
So if a solution with pure batch is possible, pure batch should be preferred;
Pure batch == all that is listed here:

Code: Select all

http://technet.microsoft.com/en-us/library/bb490890.aspx
If no pure batch solution seems to be/is possible then just use the next known solution with minimal costs:
1) A small windows built in (even sytsem dependent) executable (explorer.exe, iexplore.exe, ...)
2) A script that can be executed using windows without further external tools (VBScript/JScript).
3) Optional windows updates, that allows to build more powerfull tools (.NET with Powershell, C#, ...) (at least optional using WinXP)
4) External tools, again with minimal costs: a tradeoff between file size, and usability.
So i would prefer using Perl with downloading 100 MB unpacked to 315 MB, if the only alternative were
something with lets say 20 MB (unpacked size) but much to do to get it run.
If some inbetween steps are unknown to a poster then he may skip it.
Another reason for that order (1) to 4)): If you ask your admin to do install software, he surely prefers the lower numbered.

Your boss might follow an economic rule: Minimal costs - maximum benefits.
But i assume your boss has dollars in his eyes, when he thinks about that.
So he lets the admins install something like Perl per default, so you produce solutions in less time.
But in such a case i see it similar as AiroNG:
AiroNG wrote:But if i wanted to, i'd go and visit a forum which is dedicated to those programming languages


Next topic: (Edited: Corrected the author of the next quote to berserker.)
berserker wrote:"Guessing" what the TS can or cannot use.
If the user of this forum doesn't say anything, then the only useful assumption is: He has nothing else but built in functionality.
If a user want to allow for example a C++ solution, he should say: "I have access on a C++ compiler, too."
If he has access and doesn't inform us, it is not our task to figure that out.
If we ask if he has (installed) this or that product/tool the answer even from software developers that have 5 tools installed will be: No.


In addition there might be juridical problems, the next is an example that should be noticed at least in Germany.
If something went totally wrong and causes damage to a company (server unavailable, hardware damaged)
as a result of an error (bug) in (for example) the interpreter.
Such a damage easily can reach thousands of euros/dollars/... .
When using open source software the risk is at the side of the user who uses this software if it wasn't installed by an admin.
When using proprietary software, the producer of this software (in case of VBScript interpreter: Microsoft) is liable.
So this user should avoid downloading such software, and i don't want to bring someone into such a situation,
although i know this is a only minimal risk: If something happens it is not of much use for such a person.


@berserker: I hope this anwers some of your questions, too: what is pure/native batch, why not first using Perl, and others.

I hope i haven't offended anyone.

Regards,
penpen

Edit: Corrected the authors name within a quote; sorry to AiroNG and berserker for that.
Last edited by penpen on 30 Dec 2013 10:20, edited 1 time in total.

Locked