Poll

Should we have a command line only version of QB64?

Yes.
5 (38.5%)
Mabye.
1 (7.7%)
No.
6 (46.2%)
Pancakes.
1 (7.7%)

Total Members Voted: 13

  • Print

Author Topic: Command Line only version of QB64  (Read 291 times)

fatman2021

  • Hero Member
  • *****
  • Posts: 978
  • Lord Jesus Christ, Son of God, have mercy on us.
    • Email
Command Line only version of QB64
« on: February 23, 2013, 10:04:07 AM »
What do you think? Should we have a command line only version of QB64?
Woe to those who call evil good, and good evil;
Who put darkness for light, and light for darkness;
Who put bitter for sweet, and sweet for bitter!

Isaiah 5:20

Gorlock

  • Sr. Member
  • ****
  • Posts: 337
    • Email
Re: Command Line only version of QB64
« Reply #1 on: February 23, 2013, 10:16:44 AM »
What would this entitle?

sjt1975

  • Newbie
  • *
  • Posts: 46
    • My Personal Web-Site
    • Email
Re: Command Line only version of QB64
« Reply #2 on: February 23, 2013, 01:31:05 PM »
If there were a command-line version of the QB64 compiler, this would allow others to develop a different Editor GUI, which would then call the command-line compiler, when the user wanted to compile their program.
« Last Edit: February 23, 2013, 02:47:00 PM by sjt1975 »

SMcNeill

  • Hero Member
  • *****
  • Posts: 2414
    • Email
Re: Command Line only version of QB64
« Reply #3 on: February 23, 2013, 01:42:23 PM »
You can already compile from the command line.   Just do:

QB64.exe -c filename.bas

It's that simple.
http://bit.ly/TextImage -- Library of QB64 code to manipulate text and images, as a BM library.
http://bit.ly/Color32 -- A set of color CONST for use in 32 bit mode, as a BI library.

http://bit.ly/DataToDrive - A set of routines to quickly and easily get data to and from the disk.  BI and BM files

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: Command Line only version of QB64
« Reply #4 on: February 23, 2013, 01:49:37 PM »
If you know what you are doing, you can compile different ways. If you know what you are doing you can call your program too. If you know what your doing...  ;)
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

Barrykgerdes

  • Full Member
  • ***
  • Posts: 249
    • Email
Re: Command Line only version of QB64
« Reply #5 on: February 23, 2013, 02:13:45 PM »
Command line operation of QB64 is available as already stated. However since we have all been brainwashed to the GUI of the modern high level operating systems we tend to forget that there is a menu command  shortcut icon "Command Prompt" which you can find in the start menu - accessories.

This will allow executive programs to be executed directly from the command line using the syntax that we learnt from DOS many years ago.

I use a higher level Command line program called Msys in Windows that allows a bit more flexibility or Terminal in Linux that is very much like Msys.

So the answer to the question is No because we already have it.

Barry

DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Command Line only version of QB64
« Reply #6 on: February 23, 2013, 02:24:55 PM »
You should actually use the '-x' parameter if you want to have the output in the command line. -c will dump the output into it's own window.

However, I've mentioned this before in that I think QB64 would be much easier to work on if it was split into a compiler and IDE. I don't see any reason why a split like this would harm anything, but it would make everything much easier to manage, if only for the reason that the compiler and IDE would be separate code bases. Having a command-line only compiler also means that it would be easy to install it system-wide like every other compiler (Which has some advantages for Linux -- A bit debatable if that's worth it but it would at least be an option). With Galleon eventually planning to create a new GUI for QB64's IDE, doing this split would mean that you could have multiple GUI's (One that looks like QBasic and one that's graphical) and you wouldn't have to have the compiler built into each one, just one single compiler that both IDE's use.

The more you can separate things that don't really need to be together, the easier it'll be to bug fix and change down the road. That's just how it is with code really, if you break things into more manageable pieces that are separate then you won't need to worry about one messing up the other by accident or one becoming to dependent on the other. I mean, that's basically the entire reason for moving to QB64-GL instead of SDL. Internally in QB64 the compiler is already pretty separate from the IDE anyway, such a change wouldn't be that much work from what I can tell. That's of course up to Galleon, but I do think such a change would be worth it in the end.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

fatman2021

  • Hero Member
  • *****
  • Posts: 978
  • Lord Jesus Christ, Son of God, have mercy on us.
    • Email
Re: Command Line only version of QB64
« Reply #7 on: February 23, 2013, 03:40:52 PM »
The problem is that the current version requires x11 to run. At least on computers running Linux. A command line only version would not.
« Last Edit: February 23, 2013, 03:46:16 PM by fatman2021 »
Woe to those who call evil good, and good evil;
Who put darkness for light, and light for darkness;
Who put bitter for sweet, and sweet for bitter!

Isaiah 5:20

DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Command Line only version of QB64
« Reply #8 on: February 23, 2013, 04:15:55 PM »
Quote from: fatman2021 on February 23, 2013, 03:40:52 PM
The problem is that the current version requires x11 to run. At least on computers running Linux. A command line only version would not.

Actually, it turns out that it works as long as the program has $SCREENHIDE. I've been working on getting that command working in GL. But with $SCREENHIDE the window won't be created and X11 won't be required.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

fatman2021

  • Hero Member
  • *****
  • Posts: 978
  • Lord Jesus Christ, Son of God, have mercy on us.
    • Email
Re: Command Line only version of QB64
« Reply #9 on: February 23, 2013, 08:49:36 PM »
QB64 itself still requires X11 in order to run.
Woe to those who call evil good, and good evil;
Who put darkness for light, and light for darkness;
Who put bitter for sweet, and sweet for bitter!

Isaiah 5:20

SamuraiClinton

  • Sr. Member
  • ****
  • Posts: 327
    • Email
Re: Command Line only version of QB64
« Reply #10 on: February 28, 2013, 04:05:53 AM »
I say, we should create GW64, and have it mimic the interfact of GW-BASIC using QB64 commands.

Mrwhy

  • Hero Member
  • *****
  • Posts: 2890
  • My Dad called me Mr Why when I was 5.
    • Email
Re: Command Line only version of QB64
« Reply #11 on: February 28, 2013, 04:49:22 AM »
Good idea!

OlDosLover

  • Hero Member
  • *****
  • Posts: 3859
  • OlDosLover
    • Email
Re: Command Line only version of QB64
« Reply #12 on: February 28, 2013, 06:39:14 AM »
Hi all,
    I changed my vote to no as we can do it now as matt has pointed out. Secondly , in my opinion, it would benefit such a minority not to warrant the amount of work to justify it.
OlDosLover.

codeguy

  • Hero Member
  • *****
  • Posts: 3552
  • what the h3ll did i name that code?
    • stuff at dkm
    • Email
Re: Command Line only version of QB64
« Reply #13 on: March 06, 2013, 05:27:55 PM »
i too have voted no as the extra code for the ide takes very little extra disk space. WHY do we NEED 2 versions of qb64? time to modify these things could be better spent on enhanced functionality.
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

DSMan195276

  • Hero Member
  • *****
  • Posts: 1978
  • Yes
    • Email
Re: Command Line only version of QB64
« Reply #14 on: March 06, 2013, 07:12:12 PM »
Quote from: codeguy on March 06, 2013, 05:27:55 PM
i too have voted no as the extra code for the ide takes very little extra disk space. WHY do we NEED 2 versions of qb64? time to modify these things could be better spent on enhanced functionality.

Quote from: OlDosLover on February 28, 2013, 06:39:14 AM
Hi all,
    I changed my vote to no as we can do it now as matt has pointed out. Secondly , in my opinion, it would benefit such a minority not to warrant the amount of work to justify it.
OlDosLover.

Oh the irony in that I voted 'yes' ;)

The amount of work required to make the compiler separate from the IDE should be somewhat minimal, for those who have dared to take a look at qb64.bas they will realize the Compiler is pretty much completely separate from the IDE already. It's however not completely separate, and the combo of the two creates problems for both.

What I'm suggesting is *not* creating two different QB64's. There would only be *one* compiler, the IDE simply runs the command-line compiler. The *huge* advantage is that you can switch how the IDE works as much as you want and there is no danger to the compiler. They are already pretty separate, but seeing as Galleon is planning on redoing the GUI system at some point, he's going to have tons of work to do to keep the compiler happy while moving to the new GUI. Not only that, there is *no* way for the old IDE to be updated and keep running because it was so integrated into QB64 already. If the compiler was separate, multiple IDE's could be made with no problem what-so-ever or even code duplicated if a bit of care was taken to use some BM files.

And if we're going to be honest, the chances that the GUI Galleon is working on will be the last GUI QB64 will ever use is simply just not true. If QB64 is going to keep evolving, then eventually it's going to improve and the various GUI's and such will evolve too. But what's not going to change (with reason) is the compiler, and the fact that you can compile from the command line (And the command line is not going away any time in the next 20 years or foreseeable future).

For Windows users, if the IDE and compiler were separate, then you wouldn't have the issue of a console popping up every time you open the IDE. The only reason it pop's up is so that QB64 can support compiling and outputting to the console. And if the compiler is made into it's own command line only program then the IDE can be it's own graphics-only program and that issue would go away.

The only piece of code that may be duplicated is the syntax checking and possibly some other parts, but honestly just shove them in a BM file and move on. It's more useful like that anyway because others could use it to make their own IDE's if wanted. This change *wouldn't* be that hard to do, wouldn't create any more complexity then is already there, but it would almost certainly make QB64 so much easier to manage down the road and so much more useful in many circumstances (Such as in cases where a graphical setup is never needed).

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

  • Print