Author Topic: Brain damage! Alert BASIC is Toxic!  (Read 6866 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #15 on: June 08, 2019, 10:21:42 am »
Nice source code, BPlus. I use rather _CLIPBOARD$ for direct decoding / coding this string instead of disc file access.

Hi Petr,

I tried clipboard to QB64 IDE code line. Worked fine with short string but xra7en forced me to text file to get the whole line in a string variable to translate. The IDE was cutting the string short and hanging when I tried pasting it in so I could work on it.

Then you posted another long string reply so another text file... :)

So since I had decoding worked out, it was time to try my hand at coding. Of course with B+, one line is not enough! :D

So maybe you know something I don't about using _CLIPBOARD$ ? The first time ever I tried it was for doing Color CONSTants. How else do you get the string into a place where you can work on it with code?

Hey for this Google Translator doesn't work! :-(((

Hi TempodiBasic,

Maybe this will help:
Code: QB64: [Select]
  1.     INPUT "Enter a letter "; in$
  2.     b$ = n2b2$(ASC(in$))
  3.     PRINT "Binary = "; b$
  4.     n2% = b2n%(b$)
  5.     PRINT "Back again to letter (as check of function) :"; CHR$(n2%)
  6.  
  7. FUNCTION b2n% (b2$)
  8.     b2n% = VAL("&B" + b2$)
  9.  
  10. FUNCTION n2b2$ (n%) 'for 8 bits
  11.     IF n% < 0 OR n% > 255 THEN BEEP: EXIT FUNCTION ' beep for error
  12.     b$ = "": j% = 0
  13.     WHILE 2 ^ j% <= n%
  14.         IF (n% AND 2 ^ j%) > 0 THEN b$ = "1" + b$ ELSE b$ = "0" + b$
  15.         j% = j% + 1
  16.     WEND
  17.     n2b2$ = RIGHT$(STRING$(8, "0") + b$, 8)
  18.  
  19.  

And, I like Cheetos.
Cheese PUFFS!

Well, the chips are in the Blackjack thread.
« Last Edit: June 08, 2019, 10:40:42 am by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #16 on: June 08, 2019, 11:14:28 am »
Update: I just tried again pasting long strings from Clipboard, ie from forum code box to IDE editor because I remember being able to copy long PI string from browser to IDE.

I don't know what happened last night but I have no problem doing that today.

Ah, must be true about the damage...  :-))
« Last Edit: June 08, 2019, 11:42:02 am by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #17 on: June 08, 2019, 11:49:40 am »
You scientists are mostly idiots with degrees to convince other idiots they know what they are talking about. Thank God their are some exceptions or we'd still be trying to figure out indoor plumbing. Don't worry Steve, I hear it's coming to Virginia any day now! Well, I should talk. The way California is going, will probably be building outdoor facilities for homeless people by the thousands, but I digress...

So we have high level and low level languages. That's great. It means we have something for everyone. I like to put building blocks together, but if I have to go lower than BASIC, like C, Assembly, or Machine code, I'd stop coding. Lucky for me, I don't want a job with a company that would require me to be a C or Java coder. If I ever changed my mid about that, I would need to make some adjustments to my coding style and approach. BASIC let's us skips a lot of crap like declaring variables. I like that. Provided BASIC can get me what I want, I'm completely delighted with the language. Now that I'm older, I think coding regularly does keep me sharp, if I can remember where I put my keyboard. Anyway, it all gets converted into machine code by the compiler, so maybe it's just human nature to divide up into camps to find faults with other tribes. My philosophy is use whatever tool you can be the most productive with. You can't lose if you follow that advice. 

Pete

Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #18 on: June 08, 2019, 12:47:51 pm »
Now that I'm older, I think coding regularly does keep me sharp

Oh, yeah?

Thank God their are some exceptions or we'd still be trying to figure out indoor plumbing.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #19 on: June 08, 2019, 01:28:32 pm »
Sorry, they're.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #20 on: June 08, 2019, 08:06:39 pm »
Sorry, they're.

Uuuh, still wrong. Before Fellippe gets rightfully indignant about "native speakers,"

"Thank God THERE are some exceptions ..."

(Of course, knowing Pete, he was aware of this. He may feel free to depreciate my comment. Or was that deprecate?)

Back to the main topic, I'm certainly not an expert programmer or anything like that. However, I've been able to make sense of Pascal code with little trouble. I don't see it as being so fundamentally different from Basic. (And am grateful that Basic was the survivor.)
« Last Edit: June 08, 2019, 08:11:13 pm by Bert22306 »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #21 on: June 08, 2019, 08:24:08 pm »
Yeah, sorry Bert. During Gay Pride Month, I get a little homophonic.

I agree with you about the Pascal language, it's very close to BASIC, but limited in scope, so BASIC 1, Pascal 0. Dammit, now we're back to binary!

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #22 on: June 08, 2019, 11:48:45 pm »
Hi! I disagree with this. I think BASIC not toxic but it is a tonic.
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #23 on: June 09, 2019, 07:48:57 am »
Hi Guys

fine to talk with you!

@Bplus
thank you very much to save me from my lazyness!
You're precious!

@Ashis
Yes I can affirm in my  little experience as  coder  that among QBasic, TurboPascal (I never met an academic Pascal with no pointers and no strings), TurboC/C++, ASM, VisualBasic, RapidQ  I find more suitable that of old DOS because that OS gives you little limitation (and also little direct access to machine, but by language you can do so many things) while the generation of these languages for windowed OS are too shrinked and stricted in OS structures.
However I find BASIC (Qbasic and QB64) the place where I feel to code with liberty (no INT in QB64 for windows I think)
In summary:
BASIC = be free but COMAL is also good https://sys64738.org/2019/02/comal-la-strana-storia-di-un-linguaggio-dimenticato/ (I met it here when an our member posted info about it)


@Pete
my thread is a joke but I don't know if the authors of the articles do the same!
It is true that each our activity has its corrispondence in our brain and our mind and our soul.
But can we say that a violinist is smarter than a mathematician or than a baker or than a fisher or than a painter? Or has  Each one his own intelligence developed for his activity?
Also using a different human language we tend to use more some expressions than other expressions... it is evident for you when you read my Italian_English :-)  But can human language affect IQ results? Yes if I speak English and the test is written in Greek with greek cultural background. (if you think valid the measure of IQ to have a digital valutation of some mental skills)
Going down to coding languages, mutatis mutantis, different High Level Languages and Low level languages use different kind of structures for managing data and performing actions in a PC or other similar electronic machine. So I'll tend to use more some kind of structures versus other structures and these will be the tools that I use in problem solving. But setting a task (for example a login) , can you say that is better a program written in QB64 or that written in PHP or that written in Delphi or that written in Java o that written in C++? If the performance is done well IMHO I cannot choose what is the best one! I can talk about the dimension of the file executable or about the dimension of the whole program, about the time taken to do this task, about the dimension of the RAM used  and so many other aspects of running the program in a specific machine.
Please remember Protagora's and Socrate's messages https://it.wikipedia.org/wiki/Protagora  & https://it.wikipedia.org/wiki/Socrate
Quote
Protagora:
Man is the measure of all things, of those that are for what they are, and of those that are not for that they are not

Socrate:
know to no know

@Bert22036

Bert
I have no knowledge in market diffusion but
why do you affirm that Pascal is dead?  For windows it seems that there is Object Pascal and Delphi, and FreePascal

See here a tool developed today in FreePascal
https://it.wikipedia.org/wiki/PeaZip


I thanks all you for these flourishing feedbacks
Programming isn't difficult, only it's  consuming time and coffee

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #24 on: June 09, 2019, 03:31:05 pm »
Well, you can thank the dogs at Microsoft for keeping VB alive in the .net project. It's unfortunate they refused to do the same with QBasic. I've tried VB, but found it too limited. Like many OOP languages, you lose an ability to build what you want, and have to settle for what the language library provides. FORTRAN keeps popping up in these ratings, too. javascript, well, no surprise there. It's my GOTO language when I'm working on websites. I never liked JAVA. I have a friend that left QB for Python. He still likes BASIC better, but he wanted to stay up with a leading language he thought he could tolerate, I guess.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #25 on: June 10, 2019, 01:02:21 am »
a ,,aaaaaa,aaaaaaaaaa i

C++ is just a ugly incarnation of C by  brain damage author
python is ugly and fake incarnation of C++
OLD procedural PASCAL is good and i learned it in high school and i like it.
new Object pacal simply is not Pascal if you ask me.
VB-net ..yes it is ugly with all this UDT - dots but still is BASIC dialect.
VB6 is nice but i never spend more time using it.
QuickBasic - nice , but i don't do any programming in DOS time so i skipped it.
Java..hmmm heavy
JavaScript - little bit better but for web
ASS-EMBLER ...i feel pain in AS* when i tried to use it
Carl Gundel - fake expert
etc..etc.... 
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Re: Brain damage! Alert BASIC is Toxic!
« Reply #26 on: June 12, 2019, 08:09:57 pm »
And, I like Cheetos.
Wrong the correct quote is "I like turtles"