What are you using FB for and what features do you use most?

General discussion for topics related to the FreeBASIC project or its community.
miilvyxg
Posts: 184
Joined: Dec 07, 2021 6:51

Re: What are you using FB for and what features do you use most?

Postby miilvyxg » Jan 14, 2022 17:20

Any usage I find for FB is fail for me. The language is simply not suitable for me which being a Java guy from the beginning.
Lost Zergling
Posts: 485
Joined: Dec 02, 2011 22:51
Location: France

Re: What are you using FB for and what features do you use most?

Postby Lost Zergling » Jan 14, 2022 23:34

@miilvyxg : wisely you didn't fail using the forum. So far you didn't fail everything with FB, did you ?
Added. Sorry. Many people are doing good stuff here, maybe not good enough or suitable for you, I don't know, explaining perhaps some missunderstanding. Do not forget Basic also assume an historic side. I don't know Java, only remember the first versions. I'm sure nowadays there is no doubt Java containers are very efficient. Basic spirit side shall assume something easy, versatile and flexible.
caseih
Posts: 1890
Joined: Feb 26, 2007 5:32

Re: What are you using FB for and what features do you use most?

Postby caseih » Jan 15, 2022 0:25

miilvyxg wrote:The language is simply not suitable for me which being a Java guy from the beginning.

Yes, that's understandable. But I'll let you in on a secret. If you ever want to learn and enjoy another language, you're going to have to learn to let go of the java habits you've developed, at least for other languages. I've watched dozens of times where Java programmers pick up Python, often not of their own choice, and they immediately try to code Python using Java idioms. It never ends well. Usually those folk go away thinking what a horrible language Python is and how could anyone love that bizarre language. And the same could go for Java programmers learning C++, or even FB.

It's not that the language isn't suitable; it's that Java shaped (warped) their view of how other languages should work and when they don't work that way, frustration ensues. It's always far more comfortable to learn the idioms of a language as you learn the language. Lots of different kinds of languages can be very enjoyable. They each serve their purpose. There's no problem that FB doesn't fit your needs.

Java is language that I hate and love. I love that it helped make programming more accessible, I hate that it's ruined the perception of a generation of programmers as to what OOP is.
paul doe
Moderator
Posts: 1538
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: What are you using FB for and what features do you use most?

Postby paul doe » Jan 15, 2022 2:19

caseih wrote:...
Usually those folk go away thinking what a horrible language Python is and how could anyone love that bizarre language.
...

That's mostly because Python is a horrible language that makes you wonder how could anyone love that bizarre language.

On a more serious note, it's not only Java: BASIC is about as pernicious, if not even more. Interestingly enough, I've noticed that it is usually the first language you learn (natural or otherwise) that shapes your cognition the most. And we're not the only ones that share this point of view. See Sapir–Whorf hypothesis for an interesting read on the subject.
caseih
Posts: 1890
Joined: Feb 26, 2007 5:32

Re: What are you using FB for and what features do you use most?

Postby caseih » Jan 15, 2022 3:13

BASIC (actually BASICA) was my first language, but I don't have any bad habits from it. Probably because I never did much more than simple things with it as I was six at the time. Maybe I successfully unlearned the other bad habits later. I remember when Turbo BASIC came out, I taught myself how to use structured flow control and never really looked back. I picked up C++ in high school and that wasn't really that big of a jump.

Java's problem is more the OO-style of coding it forces on you. Really warps the thinking and makes you treat everything like a nail.

One thing that really broadened my mind was a class I took in Scheme. We used it as a tool for exploring programming languages and formal programming language theory including lambda calculus. We also implemented our own language on top of it (LISP and Scheme are really good at that). Learning how to use a list as a basic unit of data structure (not to mention programming structure) was mind blowing and mind expanding. I haven't used LISP or Scheme since, but I've never forgotten some of those principles. Lists are a lot like arrays but the operations you perform on them are much more flexible, particularly chopping and slicing. I've come to realize that all data structures can be collapsed down to either lists of some kind, or dictionaries (hash tables).

Had LISP or Scheme been my first language I'd probably have been warped for life, probably using some obscure functional programming language.
Munair
Posts: 1109
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: What are you using FB for and what features do you use most?

Postby Munair » Jan 15, 2022 9:19

Old BASIC may have encouraged bad programming style with its GOTO support, but in later versions it became a good, easy to learn procedural language. I remember my first experience with C++ (v3.0 DOS) and how students were encouraged to solve problems with classes. Then came JAVA conceptualizing everything, effectively clouding the basic programming concepts of data versus action. I have never written a single line of code in JAVA and I probably never will.

If a procedural language like BASIC is the first language you've learned, you will have little problems adapting to other languages. This is in stark contrast with JAVA programmers claiming languages such as FB are worthless, spoiled as they are knowing only one "easy" way to solve problems. The difference became very clear to me as I witnessed the development of REALbasic from a BASIC-like compiler (CrossBasic) with class support, into a JAVA clone deprecating nearly every syntax that did not support objects.
Julcar
Posts: 134
Joined: Oct 19, 2010 18:52
Contact:

Re: What are you using FB for and what features do you use most?

Postby Julcar » Jan 15, 2022 9:49

Let me tell my history with FB:

I started out to learning web programming circa 2005, and the first tutorial I found was about classic ASP with VB Script. Then I learned PHP, tried to do things but I didn't feel good with PHP (I was sort of a disaster with C syntax), so I choosed to continue with VB Script.

When classic ASP started to be very limited for the things I wanted to develop, I tried to look in VB.Net as the "natural" choose, but I didn't get adapted to the OOP model of VB.Net (and trust me, I did a lot of tests). Then between 2008 and 2012 I tried several BASIC dialects so far: Euphoria, Chipmunkbasic, ScriptBasic, YABasic, BWBasic, and FreeBasic. The final option was FreeBASIC and I started my big project using the QB dialect because it was more closer to what I learned in Chipmunk, but then I did the final jump to FB lang and I guess nobody will make me leave it :)
marcov
Posts: 3268
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: What are you using FB for and what features do you use most?

Postby marcov » Jan 15, 2022 14:40

paul doe wrote: I've noticed that it is usually the first language you learn (natural or otherwise) that shapes your cognition the most.


Definitely not in my case. Started out with Basic V2(and used it for half a decade) and moved to QBasic later. I had troubles migrating from a line based interpreter (with goto/gosub) to something with SUBs. But after half an year I got Turbo Pascal, and it suddenly made more sense.
jj2007
Posts: 2260
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: What are you using FB for and what features do you use most?

Postby jj2007 » Jan 15, 2022 17:05

paul doe wrote:I've noticed that it is usually the first language you learn (natural or otherwise) that shapes your cognition the most.
Sinclair ZX Spectrum BASIC definitely didn't shape my cognition. But GfaBasic (a Basic/Pascal hybrid) did until today, and so did Assembly because in the early days it was necessary to speed up your Basic dialect. Later I wrote quite a bit in VBA for MS Word and Excel (OOP!), and that was ok, Javascript and DHTML (OOP!) were necessary but no love affair. C/C++ gives me the creeps with their {brackets}, stupid semicolons and Select...Case fall thru bug. So, yes, BASIC is still my favourite - as long as it remains as simple as it should be.
BasicCoder2
Posts: 3768
Joined: Jan 01, 2009 7:03
Location: Australia

Re: What are you using FB for and what features do you use most?

Postby BasicCoder2 » Jan 15, 2022 18:37

jj2007
C/C++ gives me the creeps with their {brackets}, stupid semicolons and Select...Case fall thru bug. So, yes, BASIC is still my favourite - as long as it remains as simple as it should be.


FreeBASIC offers simple and advanced features so the simple features will always be there no matter how many advanced features are added. The same is true of c++. The squiggly brackets are a problem which you can overcome to some extent by making the code blocks visible with indents and linefeeds. I stick to the simple features of FreeBASIC so it is more readable and I can easily write Arduino c++ versions.

My first language was Assembler or more correctly machine code entered via toggle switches on a home made computer kit. Good way to learn binary.

The computer languages of choice depends on your needs and abilities.
speedfixer
Posts: 546
Joined: Nov 28, 2012 1:27
Location: California
Contact:

Re: What are you using FB for and what features do you use most?

Postby speedfixer » Jan 15, 2022 18:59

I "learned" programming first while watching the development of the 4004 become 8008, 8080, etc. and all the small DIY systems. Toggle in the code, make your own keyboard, etc. Couldn't build my own yet, so I self-taught electronics. By the time I had some money and small machines available, I had a life. Came back when some serious small systems became available. First was add surplus 8" disks to my system.

Overheard an electonic repair tech cry that he could not find out what was wrong with a system he was trying to fix. System/parts were too old: early version dense disk drive controller. Explained his problem. Then he whined his customer (Kraft Foods) NEEDED this for their wharehousing/inventory custom program. I suggested they migrate to some better system. Somehow, I took the job. Started my first business. Next sale: $10000 for a business to move to inhouse accounting. Sold several custom accounting systems - all in commercial compiled BASIC. Later, I was writing strictly custom interface code for CNC systems used for custom IC prototyping. More life: quit again.

20+ years at a very large high-tech company - trouble analyst: retired.

I have a personal general AI project. (Hint: the big AI systems need gigawatts of power. Our brain does NOT. The answer is: divide, specialize, THEN generalize, and conquer.) Searched for a language. Through the years have used: about 10 BASICs, Cobol, C, C++, FORTH, assembly, D, Java, others. I had bought maybe 10 commercial-grade compilers. I like C++, but still too easy to hide errors for decades. Not good to design into my AI a mid-life meltdown. Progress: I still have more lines of meta-code than lines of FB code. First: a cluster controller; then, a thread controlling framework; then task/load mgmt framework; then, ... NOW finally back to AI.

FB was the answer. There are a few missing features, but all easily overcome.

If you are flexible, you make the language serve you, not the other way around.

david
dodicat
Posts: 7194
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: What are you using FB for and what features do you use most?

Postby dodicat » Jan 15, 2022 21:16

jj2007
I don't think the C
Select...Case fall thru bug
is a bug.
After all, C, having written Windows and Linux and many modern programming languages, you might have have thought they would have it repaired by now.
A simple break gets your route out, in freebasic a simple nobreak keeps your route in.

Code: Select all


#define nobreak(n)  end select: select case n

Dim As Long n=6
Print "number ";n

Select Case  n
Case 1,3,6:
      Print "1,3,6"
      nobreak(n)
Case 4,5:
      Print "4,5"
      nobreak(n)
Case 1 To 7
      Print "1 to 7"
       nobreak(n)
Case 7
      Print "7"
Case Is < 9
      Print "is < 9"
      nobreak(n)
Case Else
      Print "else"
End Select
Sleep
 

To answer the OP, I use Freebasic for messing around (as above)
I have never written an ide or a rad or new operating system.
I have never made a penny piece out of coding or have been employed in any computing activity, I don't write viruses or malicious things.
I enjoy coding amongst forum "friends", who are getting thin on the ground these days (sigh).

I had asked a question to an ide author (in a roundabout way)
https://www.freebasic.net/forum/viewtopic.php?f=8&t=25215&start=810 (just under SARG's post).
I got no response there, but I wonder if the new capability will affect the ides of the future?
jj2007
Posts: 2260
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: What are you using FB for and what features do you use most?

Postby jj2007 » Jan 15, 2022 21:46

dodicat wrote:jj2007
I don't think the C
Select...Case fall thru bug
is a bug.
After all, C, having written Windows and Linux and many modern programming languages, you might have have thought they would have it repaired by now.
It is a serious design error, but they can't "repair" it because tons of software relying on that bug would be broken.
paul doe
Moderator
Posts: 1538
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: What are you using FB for and what features do you use most?

Postby paul doe » Jan 16, 2022 0:15

jj2007 wrote:It is a serious design error, but they can't "repair" it because tons of software relying on that bug would be broken.

Believe it or not, C was designed that way purposely. In fact, it does very little to help the coder, but again, it was designed to be like that: extremely minimalistic. It was just a tiny step up from Assembler, much in the same way that the latter was just a tiny step up from machine code.

Make no mistake: it did raise some heavy criticism when it was first introduced, but it is nonetheless useable, and fairly easy to learn, so it isn't surprising it gained traction (especially considering that the more 'serious' languages of the time, like Lisp, required either dedicated hardware, or a heavy penalty to execution times).
jj2007
Posts: 2260
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: What are you using FB for and what features do you use most?

Postby jj2007 » Jan 16, 2022 0:28

Paul,
C is ok most of the time, except for the {PITA} of brackets and semicolons, and except for the lousy design of Select...Case. That C is just a tiny step above Assembly is no excuse, because there is no stupid fall thru in the standard Switch macro, and you can do way more things with it (more) than with C.

Code: Select all

  mov eax, 17                ; try any combination you like,..
  mov edx, 77
  mov ecx, 99
  mov ebx, 17

  Switch eax
  Case 1
          print "eax is one", 13, 10
  Case edx .. ecx
          print "eax is between edx and ecx", 13, 10
  Case 10 .. 15
          print "eax is between 10 and 15", 13, 10
  Case ebx
          print "eax is the same as ebx", 13, 10
  Case 16, 18, 20
          print "eax is sixteen or eighteen or twenty", 13, 10
  Default
          print str$(eax), " is nowhere in the ranges above", 13, 10
  Endsw
Note that Case 16, 18, 20 is, technically speaking, fall through, but with a much clearer syntax.
Last edited by jj2007 on Jan 16, 2022 0:34, edited 1 time in total.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 5 guests