Rip van Winkle feeling

Just starting out? Need help? Post your questions and find answers here.
tonyaimer
New User
New User
Posts: 1
Joined: Wed Dec 31, 2014 7:01 pm
Location: Johannesburg

Rip van Winkle feeling

Post by tonyaimer »

Greetings fellow forum members

I have a distinct Rip van winkle feeling at present as I last did any serious programming back in 1990 when I was
doing a lot of AutoCAD customisation. I am a structural engineer and I fear I may be one of the oldest members
on this whole forum judging by the ages for some of the birthdays mentioned.

I wrote a concrete continuous beam program back in 1975 for the then HP9830 which I had access to, and have upgraded
it steadily through half a dozen machines since then, finally coming to a halt with GWBasic for the IBM PC AT.

I still use the program as I have an old machine that can talk to a HPLJ 4P via DB25 LPT1 and a centronics connector.

I realised while on a bush vcation in November that my professional practice is dependant on the serviceability of that
old printer and most modern printers have USB connectors.

I have since upgraded the program to PDS ( QB7.1? ) and compiled it to EXE format and extended the output options to
include a print to file option. I can now run the EXE on Win XP and a DOSBOX on Win7 and print out the required info to
any of the windows printers on my network. So far so good but I do not plan to stop there.

It is now time for a GUI interface and I have chosen PureBasic as the tool for the job because of the Linux potiential
going foward - I have drawn a line in the sand as far as Microsoft OS's are concerned becasue of Autodesk's latest nonsense
but that is a different story.

My immediate questions are the following to which I could not find any answer in the FAQ or by a forum search

Are there any gadgets which will accept a 'real' as input? Or does everything have to come in as a string and then checked
and converted to a 'real'? There is probably a library function for that anyway.

My application has lots of real values for example beam spans, depths and breadths, loadings and start and end positions. Is
a GUI the right way to handle this kind of input? I could read a preprepared file but that does not seem elegant. Without going
into too much detail could someone be kind enough to tell me if I am heading in the right direction or not.

I wrote my first program in Fortran back in 1969 for the University of CapeTown IBM1130 We had 8k of RAM in those days and
I remember how excited we got when it was upgraded to 16k!

You might ask why an old topper like me still wants to do programming and the answer is simple. Because it is fun and Linus T.
would understand that I think. I aklso own the program and it reflects my design style. It can be important to own the process
on occasions.

I have slept past VBDOS, VBasic, .net Framework and OOP and based on my internet research I may not have missed out on too
much of real value, especially in regards to technical programmig.

Regards

Tony Aimer

Johannesburg
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Rip van Winkle feeling

Post by netmaestro »

Welcome to the forums! Purebasic's REAL type is a double-precision float identified in prototypes as .d so you can use var.d anywhere you want to define or accept a REAL. Purebasic is a robust and powerful language and there's not much you can't do with it, and rapidly too.
BERESHEIT
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Rip van Winkle feeling

Post by heartbone »

Welcome Tony. It's good to see new members older than I am. :o
Back in 1980 or so, I remember what a big (and expensive) deal it was to upgrade the IBM mainframes wto 16 megabytes of real memory.

I agree that of the software technology items that you listed, you have not missed much of importance as it pertains to efficient and improved programming.
However, if you are paid by the hour, and you like spending a lot of time to complete anything, then you might want to check out OOP.

Nomenclature wise, the PB community uses the terms float and double precision (float) instead of real.
Real usually refers to non-imaginary numbers.
If your users will be typing, then the software has to convert the input from string values to float.
If the input is coming from a file, then the values can be stored as floats in the file.

I hope that I am correct, and I hope that it helps in understanding the PB system.
Keep it BASIC.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4946
Joined: Sun Apr 12, 2009 6:27 am

Re: Rip van Winkle feeling

Post by RASHAD »

Welcome to the board
As NM mentioned you are on the right track
And do not tell me you are older than The Finite Element
Maybe you are from the generation of Column Analogy,Virtual Work and Moment distribution :mrgreen:
Have a good time with the best Compiler and Forum members
Egypt my love
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Rip van Winkle feeling

Post by luis »

tonyaimer wrote: Are there any gadgets which will accept a 'real' as input? Or does everything have to come in as a string and then checked
and converted to a 'real'?
No there isn't, and yes you have to retrieve the input as a string.
But if you used GW Basic and Microsoft PDS 7.1 (I have too) you had to solve the same problem there.
So you probably already wrote some code to get a string from input following a certain format (masked) or at least wrote a function to check the input to verify that what entered was a real number.
You'll have to do something similar here. I remember some example about that here in the forum but don't know if they are up to date and working, when the time will come a post from you in coding question will probably result in someone pointing those links out or helping you directly depending on your specific requirements.
tonyaimer wrote: My application has lots of real values for example beam spans, depths and breadths, loadings and start and end positions. Is
a GUI the right way to handle this kind of input? I could read a preprepared file but that does not seem elegant. Without going
into too much detail could someone be kind enough to tell me if I am heading in the right direction or not.
Both are doable. The GUI approach as said above will require a lot more work depending on the sophistication you are aiming at for your input routine.
tonyaimer wrote: I wrote my first program in Fortran back in 1969 ...
As already mentioned, if you come from Fortran REAL*4 are .f (float) in PB and REAL*8 are .d (double)

If you are currently using DOSBox to run your program, then the major hurdle you will have to confront with I believe it will be not the change of language but the change of programming model. In DOS you had sequential programming with a precise, linear flow. In Windows (or Linux) you have an event driven programming model, with events coming from multiple source both directly pertinent to your program (a key pressed, a mouse movement) and less pertinent but dictated from a shared environment (the window is resized, the OS is shutting down, etc.)
tonyaimer wrote: I have slept past VBDOS, VBasic, .net Framework and OOP and based on my internet research I may not have missed out on too
much of real value, especially in regards to technical programmig.
All those language, OOP or not, in the end results in ASM instructions: you can do the same in FORTRAN, C#, C++ or PB. They can offer you different levels of freedom and control, but if you are comfortable with procedural programming and BASIC, as long as you don't need to access the tons of code available in the modern world (in source and binary form), and you can do what you need to do in a somewhat isolated environment, you can be perfectly fine with PB.

I just want to say I disagree with the absolute remarks about the total brilliancy of PB. IMHO is not particularly robust or the best compiler. Not by any stretch of imagination. In the realm of the indie compilers, where most BASIC dialects are available, it is probably one of the best, this due not in small part to the fact many really suck. And has some unique advantages. You can read some more critical and IMHO fair observations about it in the link in my signature. It can work or not for you, if it does and you can accept its shortcomings it can be a nice experience.

And welcome :wink:
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Rip van Winkle feeling

Post by skywalk »

tonyaimer wrote:I have slept past VBDOS, VBasic, .net Framework and OOP and based on my internet research I may not have missed out on too much of real value, especially in regards to technical programmig
You woke too soon! Functional programming via neural implants is not quite ready for injection. PureBasic is a fine compromise. luis makes good points as always. For technical libraries, you can import c dll's or roll your own(which you obviously have lived on for some time). The growing list of c++/python/java libraries are simply not accessible.
tonyaimer wrote:My application has lots of real values for example beam spans, depths and breadths, loadings and start and end positions. Is
a GUI the right way to handle this kind of input? I could read a preprepared file but that does not seem elegant.
I find most gui's impediments to efficiency. Why is it inelegant to have an app read a prepared file and execute your users' wishes? Isn't this what our compilers do now? Would your users be happy to enter 100's of numbers into tiny gadget fields with all the mouse clicks and tabs and enters? Or instead, just cut and paste in a text document and go.
Determine what your users need from your app and deliver it in as few keystrokes/mouse moves as possible.
If your results are used to feed another machine, then format them to match and save your user a step.
Spend more time verifying the users prepared their inputs correctly to avoid delivering garbage data.

Happy coding.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
TI-994A
Addict
Addict
Posts: 2700
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Rip van Winkle feeling

Post by TI-994A »

luis wrote:...I disagree with the absolute remarks about the total brilliancy of PB. IMHO is not particularly robust or the best compiler. Not by any stretch of imagination. In the realm of the indie compilers, where most BASIC dialects are available, it is probably one of the best, this due not in small part to the fact many really suck...
Hello tonyaimer, and welcome to the PureBasic forum. Please allow me a moment on the soapbox.

IMHO, the above statements made by luis seem to stem from a utopic desire for the perfect development platform; that's a pink elephant. Having traversed the programming language sphere many times round, I personally found sheer perfection in PureBasic.

It is a language that is easy to learn, easy to use, and easy to deploy across the major desktop platforms, and it does so most gracefully. Without any additional dependencies, PureBasic produces very tight and very fast executables on Windows, OSX and Linux. For a very modest price, it includes native IDEs for each platform, and comes with a lifetime of support and upgrades. Best of all, barring a few caveats, the code is absolutely cross-platform, deployable directly onto all three platforms without any changes or modifications. And for the more discerning and demanding programmer, it is extensible right out of the box, right from within the IDE, to utilise external libraries and APIs.

Unequivocally, PureBasic is unmatched, and in a league of its own. There is not a single development tool out there today, for any language, that can claim to rival this little dynamo. To casually dismiss such stellar features just because of a handful of diminutive shortcomings is simply naiveté.

So, to an old topper like you, PureBasic is going to be a wonderfully surprising breath of fresh air. :D
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Rip van Winkle feeling

Post by luis »

You opinions are perfectly legitimate as long you don't dismiss mine like the delusional desires of a dreamer.
TI-994A wrote: IMHO, the above statements made by luis seem to stem from a utopic desire for the perfect development platform
Nope, they stem from rational observation of the current state of the compiler/language and minimum common expectancy from any compiler/language. At least the expectancies programmers have about a compiler, like generating correct code for valid statements for example. But I don't want to repeat myself beyond this, that's one of the reasons I summarized all in one place. The other is I would have loved to read that when I was trying out PB.
So, you are entitled to your opinion and your happyland, just don't call that level of expectancies utopic, it is just ridiculous.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
TI-994A
Addict
Addict
Posts: 2700
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Rip van Winkle feeling

Post by TI-994A »

luis wrote:...they stem from rational observation of the current state of the compiler/language and minimum common expectancy from any compiler/language.
Let's examine some of your rational observations.
luis wrote:Bugs and regressions are not strangers to PB.
Neither are they to any other development tool.
luis wrote:I don't remember a moment in time where all the known bugs were fixed before releasing a new version.
When Microsoft abandoned VB6, the unfixed bug list was appalling.
luis wrote:The most disturbing fact it is sometimes the bugs are at the compiler level, in the code generated.
Being bugs, they have no boundaries, and can occur anywhere, in any software product.
luis wrote:...a new version of the compiler should never been released until all the known bugs in code generation have been fixed.
There's that utopic rhetoric again.
luis wrote:This is for me the worst aspect of PB, and that's reason enough to say anyone using it professionally (as in generating income from it) is voluntarily taking additional risks, by compounding possible humans errors with a variable set of compiler errors, without an history suggesting they will be fixed in a reasonable time.
Clearly you've never seen the changelogs of mainstream compilers like GCC, Java, Ruby, etc. They have been used professionally over the years through each and every bug-fix, and you can be sure that there are still a wealth of wonderful bugs yet to be discovered. But as programmers, you build, you stumble, you fix, and you move on. That's how it works in the real world.
luis wrote:...so if you want to avoid it use a mainstream language, with a big user base, big code libraries, a professional quality compiler and from a big company.
Let's see; a mainstream language, with a big user base, big code libraries, a professional compiler, from a big company... Like Microsoft? Perhaps you should add some parentheses around that logic.
luis wrote:...don't dismiss mine like the delusional desires of a dreamer ... don't call my expectancies utopic ... they don't deserve that label at all.
It won't be, once you produce a totally bug-free development tool. Until then, the label sticks.

Sorry luis, but it just had to be said. :lol:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Rip van Winkle feeling

Post by luis »

TI-994A wrote: Sorry luis, but it just had to be said. :lol:
No, you are not sorry.
I'm not talking about esoteric bugs presents in almost any compiler. I'm talking of gigantic, macroscopic, shamefully ridiculous things.
And they stay that way for too long, probably not for laziness, but as a clue to the shakiness of the underlying compiler structure.

I'm not replying to your observations because what I wanted to say has already been said, there is no reason in trying to reconcile extremely opposed views when there is not common ground. We see things differently.

Anyway, as long that page is useful to just one person to discover more quickly the things I mentioned and make an informed decision I'm happy.

Maybe if I'll read PB is the best compiler in the world, with no defects, and you can't go wrong with it I'll briefly point again why that's false.
And maybe if I'll read PB is a fragile and squeaky compiler good for nothing I'll briefly point out why it's not that either.

Or maybe this is enough, and I'll just maintain my page. It's not difficult to stumble on it if one is interested in PB.

Certainly it's enough for this thread, I'll stop here.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
TI-994A
Addict
Addict
Posts: 2700
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Rip van Winkle feeling

Post by TI-994A »

luis wrote:I'm not replying to your observations because what I wanted to say has already been said...
And because those observations have pulled the rug from under what you've said.
luis wrote:...I'm talking of gigantic, macroscopic, shamefully ridiculous things. And they stay that way for too long, probably not for laziness, but as a clue to the shakiness of the underlying compiler structure.
Where are these elusive woolly mammoths that you claim are plaguing PureBasic?

Of the two examples that you had cited, one is only weeks old, and another is based on some non-standard boolean acrobatics that you had cooked up, which has not received the time of day from the dev team for nearly two years now. And justifiably so.

Hardly gigantic, macroscopic, shamefully ridiculous things. :wink:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Rip van Winkle feeling

Post by heartbone »

Somehow in my convoluted mind, I am able to agree with both gentlemen's (luis and TI-994A) views.

The main problem as far as I can figure is that the compiler is written in C++,
which IMO makes Fred and Freak some sort of geniuses for delivering what they have so far.
Keep it BASIC.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Rip van Winkle feeling

Post by netmaestro »

luis wrote:Certainly it's enough for this thread, there is no will from my part to make this deteriorate so I'll stop here.
What's the matter, don't want to have the distinction of taking part in the first flamewar of 2015? :D With respect luis while I can partly agree with you I do find that most of the tools in PureBasic are solid and reliable. For the most part it "just works". There are certainly some bugs but I've never come across one that couldn't be avoided with a bit of extra code that I shouldn't have had to write. What I find a real benefit to using PureBasic is the library set. For example, how many languages do you know that have native hash tables? or a full-featured Canvas control that you can build almost anything on? A native purifier? The IDE is advanced and solid and the 2D graphics library is robust too. Full support for alphablending and callbacks for custom filter creation make advanced image manipulation a breeze. Notice I said robust and not perfect. Perfect or close to it would be if there were antialiased primitives, native rotations and the implementation of STARGÅTE'S 3D rendering library for 2D images. On the downside, ReceiveHTTPFile isn't good for much, the mail library needs SSL to be useful, the FTP library could use some more capability and there are still bugs in quads even though that datatype has been with us almost ten years now. And are they ever going to give us an unsigned dword? Sometimes I think we'll go oop before that happens. Like many others, I feel frustration when the team spends valuable time coding on things I'll never use, like 3D gaming. A lot of time goes into SpiderBasic and I understand that. Anything that keeps Fred out of the job market is a good and necessary thing imho. But SpiderBasic won't be useful for me until it fills out more. Bottom line for me is that PureBasic as a PL is indeed robust and while not bug-free, is entirely dependable. No offense luis, I just think that sometimes you spend too much time worrying about the pebbles in your sandals and not enough appreciating the rich beauty of the countryside around you. I don't know you but I guess you're a bit of a perfectionist. Nothing wrong with that, it makes you produce good software. Peace :mrgreen:
BERESHEIT
User avatar
heartbone
Addict
Addict
Posts: 1058
Joined: Fri Apr 12, 2013 1:55 pm
Location: just outside of Ferguson

Re: Rip van Winkle feeling

Post by heartbone »

tonyaimer wrote:Greetings fellow forum members
{snip}
I have chosen PureBasic as the tool for the job because of the Linux potential going foward - I have drawn a line in the sand as far as Microsoft OS's are concerned becasue of Autodesk's latest nonsense
{snip}
luis is correct about the wrongness of releasing a compiler with known SERIOUS bugs.
For some reason the latest compiler version was released with several reported deal breaking Linux bugs which were not present in previous versions.
Bugs reported by me during the BETA period.
Just so you know, I'm feeling a serious lack of respect for, or caring about Linux users, and you may end up with that feeling as well.
The Windoze support is superb.
Keep it BASIC.
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Rip van Winkle feeling

Post by skywalk »

TI-994A wrote:Where are these elusive woolly mammoths that you claim are plaguing PureBasic?
luis lists them in his New to PB? blog.
I am glad luis is so thorough. He helped me avoid several tricky bugs.

I do not consider this thread a flame war and instead wish there was a separate "new user" or "getting started" section. I doubt new users would think to search "Rip van Winkle" when considering PureBasic. :oops: :idea:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Locked