• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

PowerBasic Forum down (20.07.2013)

Started by Theo Gottwald, July 20, 2013, 09:37:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

John Spikowski

#105
QuoteBut how are you going to know it, if you don't use it?

I'm on the PowerBASIC black list remember? I can't get any response from support or register on the forum. Why would I spend money for this abuse and no support. I would hold judgment until you see their next release. That will indicate if PB has a future or not.

I don't understand what makes PowerBASIC so special. You mention the outstanding COM support but if it wasn't for you, there would be no OCX container. (ATL/yours) Maybe you can enlighten me by telling me what specific COM features does PB excel in over other COM supported languages. Here is an example of ScriptBasic doing a low level COM call to the SAPI API which was scripted at runtime via DLLC. I think Charles added COM support to ScriptBasic in a couple of days. Why does it take PowerBASIC so long to do anything?


'DECLARING PROCEDURES

stringbuf        = dllproc(mylib,"stringbuf stdcall i=(c*buf, i bufsize) " )
doublebyref      = dllproc(mylib,"doublebyref (d*num)"           )
longbyref        = dllproc(mylib,"longbyref (l*num)"             )
returnbstring    = dllproc(mylib,"returnbstring o=()"            )
rectanglearea    = dllproc(mylib,"rectanglearea i=(t*rectangle)" )
showguid         = dllproc(mylib,"showguid z=(t*guidinput,t*guidinput)"      )

CoInitialize     = dllproc(ole32,"CoInitialize (i)")
CoUninitialize   = dllproc(ole32,"CoUninitialize (i)")
CoCreateInstance = dllproc(ole32,"CoCreateInstance i=(t*ObjGuid ,i pUnkOuter,i context, t*IspGuid, i*Iface)" )

'COM SPEECH

VoiceObjGuid = dllguid("96749377-3391-11D2-9EE3-00C04F797396")
ISpVoiceGuid = dllguid("6C44DF74-72B9-4992-A1EC-EF996E0422D4")
Context      = 7
pUnkOuter    = 0
Voice        = 0
Release      = dllmeth( 2,"Release i=()")
Speak        = dllmeth(20,"Speak i=(z*pwcs,i flags,i pulstreamno)")
WaitUntilDone= dllmeth(32,"WaitUntilDone i=(i)")
print dllreco(speak)
Text         = dllwstr("Hello Everyone!\0")
hr=0
dllcall(CoInitialize,0)
hr=dllcall(CoCreateInstance, VoiceObjGuid, pUnkouter, Context, ISpVoiceGuid, Voice)
if (hr=0) then
  print "connected to voice\n\n"
  print dllastr(Text) & "\n\n"
  dllcobj(Voice,Speak,Text,0,0)
  dllcobj(Voice,WaitUntilDone,0xFFFFFFFF)
  dllcobj(Voice,Release)
else
  print "SAPI Error " & format("%x",hr) & "\n\n"
end if
dllcall(CoUninitialize)




Patrice Terrier

#106
José

Even if PowerBASIC has now one the best low-level COM support in any language, it comes much more than 15 years after the others. I remember the time i had to resort on JACOM/PB from Philippe Monteil. Unicode support has been introduced recently as well, and there are still bugs floating around. Dead code removal is also one of the latest addition, but it has been there for years for those using "standard" LIB.

Some may say, we now have SSL, but what a poor concept compared to LIB, we had the same problem at DOS time between  .PBU and .OBJ, no compatibility.

Like Edwin, i do not liked the direction taken by PB/DLL since the introduction of DDT, because ZALE spent most of his time trying to encapsulate the existing API (something he would never succeed in, because the core API is so large), and this was done at the detriment of learning the new technology and enhancing the core compiler. And i could say the same about the poor PB Editor (i am still using UEDIT32 with PB), but here again the resources dedicated to PBEdit could have been beter used to enhance the compiler, and he could have just used some of the tools created by you or other contributors. Like John, i think that the EGO of Mr. ZALE was his biggest problem, and i do not liked the way he treated many of his customers.

I would be very glad if PB could survive to the passing of his creator, but the lack of a clear road map is a huge handicap, this is the reason why i keep translating my PB code to C/C++ as fast as i can, trying to use a syntax as close as the BASIC syntax i like.

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Edwin Knoppert

#107
I agree.

DDT, COM (late bind) calls and some other parts where implemented that way it would be hard to change these to a better syntax.
I am very happy with the latest object implementation but then the lack of having constructor parameters compared to .NET and the need of interfaces makes it harder.
Just think twice before introducing syntax what never can be changed again.
In this case there would simply be a solution to add a 2nd class mechanism.

>Some may say, we now have SSL, but what a poor concept compared to LIB, we had the same problem at DOS time between  .PBU and .OBJ, no compatibility.
The SLL is one of the things that ticked me off, at the end it is a worthless implementation, to many (circular?) conflicts to make it actually work.
I have worked with the lcc compiler and that approach was great, it simply took the parts you actually needed from the precompiled lib.
What ticks me off is that they implement something you'll know that it will never change if it's a flawed concept.
I got pretty frustrated in a few years back, i still am with PB but i am moving on so why bother to much?

Chris Holbrook

Bob Zale managed to keep all the plates spinning for a very long time. Will his commercial successors have the same success? They need vision, a plan and self-belief, and that must be visible to all. I'm not sure about relying on Bob's vision because, outside of organised religion, I don't think that that particular kind of magic can work.

Without knowing the roadmap or the resources of the company, we can only guess.

PB did a great job for me, got me from MSDOS and UNIX into writing Windows apps very quickly. Eight years on, I would probably just ignore Windows!

There does not seem to be much sense in having only PB in the toolbox, but then for commercial people there never was.



Guy Dombrowski

Chris,

I agree with you.

But at my age, it is a bit late to start learning a new language.
Even though I have PBCC6, I still use mostly PBCC5 and with the use of a few API I got rid of the 80x25 console limitation.

So, the tool I have is plenty good for the few years I have left for programming

Guy

Chris Holbrook

Yes Guy, I generalised too soon. Long may you continue!

I should really speak only for myself.

José Roca

#111
Quote
I'm on the PowerBASIC black list remember?

I remember. I'm just refuting your afirmation that PB has only basic COM support because it is untrue, and repeating it a zillion times doesn't make it true.

Quote
Here is an example of ScriptBasic doing a low level COM call to the SAPI API which was scripted at runtime via DLLC.


'DECLARING PROCEDURES

stringbuf        = dllproc(mylib,"stringbuf stdcall i=(c*buf, i bufsize) " )
doublebyref      = dllproc(mylib,"doublebyref (d*num)"           )
longbyref        = dllproc(mylib,"longbyref (l*num)"             )
returnbstring    = dllproc(mylib,"returnbstring o=()"            )
rectanglearea    = dllproc(mylib,"rectanglearea i=(t*rectangle)" )
showguid         = dllproc(mylib,"showguid z=(t*guidinput,t*guidinput)"      )

CoInitialize     = dllproc(ole32,"CoInitialize (i)")
CoUninitialize   = dllproc(ole32,"CoUninitialize (i)")
CoCreateInstance = dllproc(ole32,"CoCreateInstance i=(t*ObjGuid ,i pUnkOuter,i context, t*IspGuid, i*Iface)" )

'COM SPEECH

VoiceObjGuid = dllguid("96749377-3391-11D2-9EE3-00C04F797396")
ISpVoiceGuid = dllguid("6C44DF74-72B9-4992-A1EC-EF996E0422D4")
Context      = 7
pUnkOuter    = 0
Voice        = 0
Release      = dllmeth( 2,"Release i=()")
Speak        = dllmeth(20,"Speak i=(z*pwcs,i flags,i pulstreamno)")
WaitUntilDone= dllmeth(32,"WaitUntilDone i=(i)")
print dllreco(speak)
Text         = dllwstr("Hello Everyone!\0")
hr=0
dllcall(CoInitialize,0)
hr=dllcall(CoCreateInstance, VoiceObjGuid, pUnkouter, Context, ISpVoiceGuid, Voice)
if (hr=0) then
  print "connected to voice\n\n"
  print dllastr(Text) & "\n\n"
  dllcobj(Voice,Speak,Text,0,0)
  dllcobj(Voice,WaitUntilDone,0xFFFFFFFF)
  dllcobj(Voice,Release)
else
  print "SAPI Error " & format("%x",hr) & "\n\n"
end if
dllcall(CoUninitialize)


Here is the same example using PB:


#COMPILE EXE
#INCLUDE "SAPI.INC"

FUNCTION PBMAIN

   LOCAL pISpVoice AS ISpVoice
   pISpVoice = NEWCOM CLSID $CLSID_SpVoice
   pISpVoice.Speak("Hello Everyone", 0, BYVAL %NULL)
   pISpVoice.WaitUntilDone(&HFFFFFFFF)

END FUNCTION


Quote
I think Charles added COM support to ScriptBasic in a couple of days. Why does it take PowerBASIC so long to do anything?

Was there a demand? Direct interface call support was implemented several years ago and nobody has used it seriously except Dominic and me. Even Edwin has not used it because he does not like to use include files. And please don't compare one implementation with the other. I'm quite sure that Charles can do it much better, but it requires more that a couple of days.


John Spikowski

#112
QuoteAnd please don't compare one implementation with the other. I'm quite sure that Charles can do it much better, but it requires more that a couple of days.

How can the two examples be compared? The SB version was scripted at runtime using a console interpreter. Charles example was just to test the new functions added to DLLC for low level COM access. COM is NOT ScriptBasic's focus but nice to know the functionality is there if needed. My point is Bob made everything seem like an epic adventure when in reality he was claiming ownership of everyones else's efforts. You are Bob's trophy example of how to use someone for a profit. Sorry if that hurts but but it shouldn't. Your generosity and the value of your work goes beyond anything that would come out of the PB shop. 


José Roca

I did all the testing, because I was the only COM guy in the beta team, but he did the implementation. Therefore, most of the merit belongs to him. I think that you attribute to me more merit that I deserve with the sole intention of taking the credit away from Bob.

IMO, his mistake was to provide a new set of include files that does not have the slightest support for low-level COM programming. Mine are freely available, of course, but most PBers only use the ones that come with the compiler.

John Spikowski

#114
QuoteIMO, his mistake was to provide a new set of include files that does not have the slightest support for low-level COM programming. Mine are freely available, of course, but most PBers only use the ones that come with the compiler.

No container or include files needed to support the compiler. What would become of PB if you took my position and said I'm done?

I think you give Bob / PowerBASIC more credit than it deserves. It's a half baked makeover of a QB lookalike that is over priced.

Chris Holbrook

Quote from: Patrice Terrier link=topic=4721.msg18586#msg18586..i do not liked the direction taken by PB/DLL since the introduction of DDT
it would appeal to hobbists. Blame BZ's business model, which gave him no benefit from supplying a few demanding highly technical developers.
Quote...i think that the EGO of Mr. ZALE was his biggest problem...
I cannot imagine how he could achieve what he did without a big fat ego, or for that matter without upsetting people. I have the greatest respect, though he is not one of my heroes.

José Roca

John, you have bored me to death. End of the discussion.

Frederick J. Harris

I've never even touched the whole *.sll thing.  Static libraries were never language agnostic and were only ever useful if created by the same version of he same compiler.  There was never any standard.

COM on the other hand, suffered not from this limitation.  Folks had been screeming for object files for years and Bob Zale finally gave it to them.  But the real answer was COM and he gave us that too.  It works fine for me in C, C++ and PowerBASIC, and that's all I care about.  At least in my little world, I'm satisfied. 

I don't think Bob's vision was ever to follow closely along like a lap dog with whatever Microsoft trotted out as being the latest and greatest.  He waited long enough to see what had lasting value and implemented that.  That's what happened with COM.   

Frederick J. Harris

Actually, there are some minor problems (as Patrice alluded to), and I'm somewhat dispairing of seeing them ever fixed.  But I can live with it.

Mike Stefanik

Quote from: Frederick J. Harris on July 29, 2013, 02:51:43 AM
I don't think Bob's vision was ever to follow closely along like a lap dog with whatever Microsoft trotted out as being the latest and greatest.  He waited long enough to see what had lasting value and implemented that.  That's what happened with COM.

I seriously doubt that.

PowerBasic included intrinsic support for COM objects in version 9.0, released in 2008. That was a full 15 years after COM was introduced (longer, if you include OLE in the timeline). While we can't know all of the reasoning behind what features did or did not make it into the language, I feel fairly certain that Bob didn't wake up one morning and said to himself, "You know, it's been 15 years, and Windows is still using COM. I guess it would be a good idea to support it now that I know it's going to be around for a while."

In reality, I suspect it had a lot more to do with more practical matters (i.e.: the amount of time and resources it would take to implement, the number of developers asking for those features, etc.) and not a concern that COM might be some kind of flash-in-the-pan technology that Microsoft would abandon. He would have known that COM had "lasting value" in the Windows platform by the mid-to-late 1990s.
Mike Stefanik
sockettools.com