Bald middle-aged man joins the club...

General discussion for topics related to the FreeBASIC project or its community.
Lord Baldy
Posts: 4
Joined: Jan 15, 2015 17:42
Location: Newton Abbot, Devon

Bald middle-aged man joins the club...

Post by Lord Baldy »

Greetings ladies and gentlemen!

I just thought i'd put an opening post here as it seemed as good a place as any to start, so here i go but just a warning to the impatient that this may well end up being a bit of an incoherent ramble which does not go anywhere, so you may wish to make a cup of tea and wait for something more interesting to come along...

So a big hello to those of you who have not left the room!

My real name is not in fact Lord Baldy i'm ashamed to admit,it's David, although the bald part is correct, and i find myself here through trial and error on my quest to solve one of man's greatest mysteries...What does a middle-aged bald man who's dwindling reflexes have forced him to give up on console gaming do with his spare time? I'm not into mountain climbing, i'm not mechanically minded in the least so i don't want to start restoring vintage cars and i'm getting a bit too *cough* "fuller in the stomach area" to continue playing sport with any enjoyment. So at the tender age of 44 and a bit (45 at the end of January, i'll be expecting a full military fly past on here when the time comes), i've decided to try and get back into coding as a hobby.

Now when i say "get back into", i haven't done any programming at all since about 1995! My first computer was a Texas Ti-99/4A, which i had around 82/83 for Christmas, i had a choice in the shop of either that or a 16k Spectrum, and knowing nothing about computers opted for the one with the nice keyboard, which as that was the year the Ti was being discontinued was a bit of a mistake, you can imagine my disappointment when armed with my birthday money in January i went hunting for some new games for my machine only to find the stores had just about cleared out all of their Ti stock! The next Christmas i was given a 2nd hand (not pre-owned in those days!) 48k Spectrum much to my delight, and although obviously games were my favourite pastime i still dabbled in Sinclair basic and tried later (without much luck) to learn Forth with the White Lighting (I think?) complier thingy, when i started work i later got an Atari St and used STOS basic, then an Amiga and AMOS (I may be wrong with the names), but i had got into console gaming by then and not having to use a computer at work, basically gave up on trying to create anything and until about 18mths ago did not even own a PC!

But i thought i needed to get into the interweb age and so took the plunge and got myself a cheap laptop and with a lot of effort, sweat and swearing can just about turn it on now, so i think i'm ready to take the next step in my evolution and use it for something more useful than looking at porn. So after spending quite a while trying to decide what language i'd attempt to learn, ended up here after using the logic that as it's a form of basic i may find it a bit easier than some of the more modern stuff.

So i've installed the complier alongside FBIde and after googling how to get the bloody help to work, managed to do the "Hello World" my first programme test and i'm now all raring to go!

I've even decided what i'm going to attempt, as i've been playing in an old school football PBEM which uses ESMS+ for a few months and will try and do an offline single player version of that, nothing fancy, no graphics just text basically.

So here i am, this seems a friendly community and i'll try and keep you informed as to my progress, probably will crash and burn but if you don't try you'll never know! and i have to say it's a bit of a difference nowadays trying to learn something new due to the power of the magical interweb, everything you could possibly need to know all in one place, no libraries to visit looking for that obscure text you need (not that many are still open now!) or waiting for the postman to deliver a parcel, we are truly in the space age!

Cheers and thanks for reading!

xxx
anonymous1337
Posts: 5494
Joined: Sep 12, 2005 20:06
Location: California

Re: Bald middle-aged man joins the club...

Post by anonymous1337 »

Fully haired youth welcomes you.
fxm
Moderator
Posts: 12131
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Bald middle-aged man joins the club...

Post by fxm »

Welcome too, with my 20 years older than you (+19 more precisely) but still well provided hair!
Quark
Posts: 474
Joined: May 27, 2011 18:16
Location: Pennsylvania, U.S.
Contact:

Re: Bald middle-aged man joins the club...

Post by Quark »

.
Non-fully-haired non-youth welcomes you too. Don't know if you can do what Tesla was reported to do -- create a machine in his mind and come back to check the wear, but coding is great fun. When not doing that, you can sip a shake while watching people work out, even if they don't smile much :-)
.
Imortis
Moderator
Posts: 1925
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: Bald middle-aged man joins the club...

Post by Imortis »

Lord Baldy wrote:Greetings ladies and gentlemen!
...
Sir...

That was a glorious post and I personally offer my support in your endeavors. Welcome to the forum.
integer
Posts: 408
Joined: Feb 01, 2007 16:54
Location: usa

Re: Bald middle-aged man joins the club...

Post by integer »

Welcome!
...seems a friendly community...
IT IS.
...i'll try and keep you informed as to my progress, probably will crash...
my fun is trying to get FreeBasic to crash. My programs crash, but that is MY fault, not FB. So, welcome and start playing.
TeeEmCee
Posts: 375
Joined: Jul 22, 2006 0:54
Location: Auckland

Re: Bald middle-aged man joins the club...

Post by TeeEmCee »

Wow. Welcome. The bit that surprised me most was that you went from dabbling with early computers to not owning one for such a long time.

Definitely want to avoid languages and tools that have a lot of avoidable complexity because they're aimed at professionals. I happen to think FB is still a good choice*, but there are also modern 'straight forward' languages that can make a lot of things easy. But I don't think to need to be able to get 3D graphics on the screen in 5 lines of code to have fun; non-graphical stuff is underappreciated!

*trivia: John Carmack taught his son BASIC after originally threatening to start him off with Haskell!
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Bald middle-aged man joins the club...

Post by caseih »

Not sure how I feel about AppleSoft BASIC, though people did some very cool things with it over the years. Something about a very limited environment teaches you to think creatively.

I'll always have a soft spot in my heart for the structured BASICs that came out in the 80s and 90s during my formative years, and so I'm happy to see FreeBASIC thriving. I've had some fun porting my old PB programs to run natively under Linux.

Although if I were to teach a son to program, I think my first choice, hands down, is Python.

That said, I'd really love to see two things come to FreeBASIC.
1. Object-oriented bindings for GTK, similar to GTKmm
2. Good (OO) bindings to Qt.

Though I suspect that in order to get both of these, we'd need FreeBASIC to be so much like C++ it'd just be a prettier version of C++, which I suspect most folks here would rather not see! Thus I'm not at all sure the best approach to get #1, let alone #2.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: Bald middle-aged man joins the club...

Post by TJF »

caseih wrote:2. Good (OO) bindings to Qt.
Did you try Qt? It looks simple at the beginning. After some time you'll need a minimal adaption of any feature and you'll get frustrated because you cannot implement it. You can either spend all your time to learn QT for month or drop the project.

Qt is made for binary-mutants, but not for solution orientated programmers. Creating a wrapper isn't worth the effort. And it needs more than a wrapper to use the GUI designer.
caseih wrote:1. Object-oriented bindings for GTK, similar to GTKmm
(I don't know GTKmm.) GirToBac is prepared to generate OO bindings similar to JavaSrcipt or Vala. This requires inheritance for multiple interfaces, which isn't implemented in the FreeBASIC compiler yet (up to version 1.01).

As long as D.J.Peters and me are the only ones calling for that feature, nothing will happen. Why don't you file a feature request?
fxm
Moderator
Posts: 12131
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Bald middle-aged man joins the club...

Post by fxm »

TJF wrote:...This requires inheritance for multiple interfaces, which isn't implemented in the FreeBASIC compiler yet (up to version 1.01).

As long as D.J.Peters and me are the only ones calling for that feature, nothing will happen.
- And me also:
http://www.freebasic.net/forum/viewtopi ... 65#p203665
- already requested in the todo list (http://sourceforge.net/p/fbc/code/ci/ma ... e/todo.txt), but with reserve for multiple interfaces!.
See my remark at http://www.freebasic.net/forum/viewtopi ... 40#p188540

Any one can complement the already existing feature request: #154 Class Interface, and even init a dedicated topic on forum.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Bald middle-aged man joins the club...

Post by caseih »

TJF, I've been using Qt and GTK both for nearly 20 years. GTK feels a bit more comfortable to me, but Qt has much much better cross-platform support and excellent docs. GTK on Windows and Mac just doesn't get the love that the *nix version gets. Hence I would never recommend GTK for any serious commercial project. I have no idea what you mean when you say "After some time you'll need a minimal adaption of any feature and you'll get frustrated because you cannot implement it. You can either spend all your time to learn QT for month or drop the project." Qt is not at all hard to pick up and use effectively. You just have to grasp its widget packing and event model. I've written at least one major project in Qt (in C++) and thoroughly enjoyed it. This is arguably off topic, but I can't let your Qt bashing slide It's just not right. GTK is improving and GTK3 can do things that GTK2 could not do easily, such as animating control transitions, etc. If you're curious, check out the story of how Linus Torvald's personal project subsurface switched to Qt and had a very good experience. Sorry to digress.

GTKmm is an excellent binding for C++, but relies on C++ features like templates and smart pointers, so I don't expect this sort of binding would ever work in FB. If we could get bindings similar to how GTK works in Vala, that would indeed be excellent.

Qt's being based on C++ has always been a problem in making bindings for other languages. The most excellent PyQt and PySides bindings for Python use a lot of wrapper code (auto generated in PySide's case, not sure about PyQt). Replicating that work with FB would be hard. However Qt does not use multiple inheritance in the framework itself, so theoretically it could be done.
fxm
Moderator
Posts: 12131
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Bald middle-aged man joins the club...

Post by fxm »

fxm wrote:Any one can complement the already existing feature request: #154 Class Interface, and even init a dedicated topic on forum.
I propose to do it, but only if other people also want to participate (I already initialized other topics where I regret that there are very few participants!):
eg, "Multiple interfaces for FreeBASIC" in Community Discussion.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Bald middle-aged man joins the club...

Post by D.J.Peters »

"inheritance for multiple interfaces" isn't a problem you can fake it
the real problem for big C++ libs are the missing bool class in FreeBASIC.

Joshy

inheritance for multiple interfaces:

Code: Select all

type A
  as integer placeholder
end type

type B
  as integer placeholder
end type

type AB extends A ' one extra step 
  declare operator cast as B
  as integer placeholder
end type
operator AB.cast as B
  dim as any ptr p=@this
  return *cptr(B ptr,p)
end operator

type C extends AB ' class C : public A : public B {};
  as integer placeholder
end type
Last edited by D.J.Peters on Jan 17, 2015 22:21, edited 1 time in total.
fxm
Moderator
Posts: 12131
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Bald middle-aged man joins the club...

Post by fxm »

The future request is for interfaces containing only abstract procedures!
D.J.Peters wrote:"inheritance for multiple interfaces" isn't a problem you can fake it
Yes a fake but which does not work at all!
Dr_D
Posts: 2451
Joined: May 27, 2005 4:59
Contact:

Re: Bald middle-aged man joins the club...

Post by Dr_D »

Hi. Welcome to the forum. That porn bit really made me laugh. :) Also, you're just a few years older than me... so... I'm off to test the speed of my reflexes. :p
Post Reply