Does it? I only use the runtime DLL for C when I can control the target environment - normally I make them self-contained.
Printable View
Does it? I only use the runtime DLL for C when I can control the target environment - normally I make them self-contained.
Msvcrt.dll contains calls such as strlen, printf, malloc, puts, etc. Msvcrt.dll has been succeeded by Msvcrt20.dll, Msvcrt40.dll, etc.
If you use those calls, you are using Msvcrtxx.dll. This dll, and likely some of the successors, will exist on ALL Windows systems. This is why you don't have to worry about them being there and your code always seems to work.
Only if you write very simple programs will no DLL calls be made. For instance, a simple variable increment in C requires NO outside calls - it can simply be an INC instruction on the processor.
Now, is it possible to have a compiler extract (some or all) of this code from the DLL and put it into a stand alone EXE? Yes. Does C let you do this - I don't know.
Even if it does, it does not negate the point. Both VB and C give you access to standard calls and those calls are not your code - they exist in a support DLL.
So your 'self-contained' program still relies on C library code - no matter if it's stripped into your EXE or not.Quote:
Does it? I only use the runtime DLL for C when I can control the target environment - normally I make them self-contained.
If you can, and do, put this code into your own EXE you are defeating the purpose of DLL's and also you are disallowing your end-users from upgrading a potentially buggy DLL call (i.e. even if they upgrade their Msvcrtxx.dll - your program will still exhibit the bug).
VB has the Dll due to the compiler, I heard of compiler that compile VB into standalone exe's so runtime's shouldn't be part of when considering languages, but part of compilers.
I use C++ not C, because C doesn't have the power of OOP. I'd say most programmers, quite close to 100% around here use RAD-style programming mainly, that's of course how a simple one purpose application could be programmed most effectively in time perspective, the available API's just need to be called in the correct order and that's that, hardly you do any real OOP work. These API makes your application dependent and unportable.
OOP work should be platform independent, and so C++ does perfectly, there's no need for strllen's or printf's but in RAD style projects. The main point with OOP applications is reusability, a base to derive other projects from, much the style you need for developing API's. Such interfaces where other programmers derive your work has to be as flexible as possible, well encapsulated to avoid unintended misuse, easy to use and not to forget with best possible performance. Of course you need to do compromises between these but with a poweful OOP language as C++ the performance losses are quite minimal. VB, C and ASM are far from useful in this style of programming.
The clients of enough powerful interfaces shouldn't consider about what language is most efficient in the first place but the usefullness, since if the base interface does all time critical jobs any language could be used to put them together into a interface for the end user.
Im half way reading through this post and i am having fun. But who ever said {} brackets or braces (what ever you want to call them) are mainly for scope. Not for tidying up your code.
Has anyone ever programed using Lisp, Python, or Ada?
And if so what are the strong points for each language. I heard Lisp is mainly used for AI. And Python for server stuff. Is that true?
I don't know LISP but it's short for 'list processing' which tells you a fair bit about what the language is good for. It's certainly used for a lot of AI stuff. Has too many parenthesis for my comfort though.
Python is a fully object oriented, platform independant scripting language, and I use it a lot. It's very flexible and easy to use and read (especially if you are familiar with C syntax), although it's not compiled to native machine code, so it can be slower than some languages. Still, it's fast enough for me and it's easily extensible with C/C++ modules if you want some more speed. It's mostly used for CGI apps at the moment, and in the scientific community.
Ada is more or less an even stricter version of Pascal (yikes!), which is great if you're writing code to run an ejector seat but pretty tedious if you're writing non-critical code. It's one of those must-be-bug-free kind of languages; the military use it quite a bit.
"Operator Overloading, probably the best beer in the world"
td.
VC++ has linker options. You can either link with the DLL stub library, or use the ACTUAL static library. The default is in fact to use the static library so if you use the normal settings you don't need any DLLs other than the system ones. And yes, it needs library code, but you can strip a lot of that out by writing your own _mainCRTStartup function and being careful (you also need to rewrite a few of the library functions but you can get them from the source if necessary). This makes stupidly small executables with no external dependencies (other than the system).Quote:
Originally posted by Jay Rogozinsky
Msvcrt.dll contains calls such as strlen, printf, malloc, puts, etc. Msvcrt.dll has been succeeded by Msvcrt20.dll, Msvcrt40.dll, etc.
If you use those calls, you are using Msvcrtxx.dll. This dll, and likely some of the successors, will exist on ALL Windows systems. This is why you don't have to worry about them being there and your code always seems to work.
Only if you write very simple programs will no DLL calls be made. For instance, a simple variable increment in C requires NO outside calls - it can simply be an INC instruction on the processor.
Now, is it possible to have a compiler extract (some or all) of this code from the DLL and put it into a stand alone EXE? Yes. Does C let you do this - I don't know.
Even if it does, it does not negate the point. Both VB and C give you access to standard calls and those calls are not your code - they exist in a support DLL.
So your 'self-contained' program still relies on C library code - no matter if it's stripped into your EXE or not.
If you can, and do, put this code into your own EXE you are defeating the purpose of DLL's and also you are disallowing your end-users from upgrading a potentially buggy DLL call (i.e. even if they upgrade their Msvcrtxx.dll - your program will still exhibit the bug).
Dont forget all these banks, financial companies, insurance co.s, etc... that use VB. It is useful for internal database apps. As I have said many times though, when it comes to mainstream commercial apps, i challenge you to find a successful, decent one made in VB.Quote:
Originally posted by Jay Rogozinsky
Yes, let us not forget that C also utilizes a runtime DLL.
VB has always been a great place to slap off a conversion utility or such.
Heh :p
Wow this has just got to be the thread in town....lets keep talking.
Hooray Jay, thanks for your enlightenment. Gosh you had to write in machine code?!!???, that must have been fun huh? Well I am the moment am learning assembly language. I will need it for systems programming later on (early anouncement of the death of Windows and the birth of....I dunno but its coming no more crashes and BSOD's LOL.) Also this compiler that I am making for Ciyana will need the stuff.
You know you guys are right. Learning VB as a first language is fun but thats until you become proficient and start asking questions. I have been using VB for some time now and I wanted to know what on earth goes on within the chunks of silicon on my desk. You ask VB what Form.Visible=False means it tells you its gonna hide your form nnnnnnnnnnhhhhhhhhggggg!!!!! wrong answer its SendMessage(hWnd,SW_HIDE,0&,0&) (hope i got that right). Well those are the kind of answers I was looking for but good ol Vb just hides them. NOT FUN WHEN YOU REALLY WANNA KNOW WHATS UP. So I started learning windows programming. I have a windows skeleton program written using the API and a couple of BAS modules.Its about 400 lines long and all it does is register a window, show it,have two little menus and an empty About box .....HELLELUJAH FOR VB SOMETIMES.....you'd be surprised how much it really does for you. So anyway the point is I wanna go low level and know the real truth and C++, ASM all take the cake. Now i know why its never a good idea to use Goto statements (leads to flushing the prefetch queue on some pcs meaning data has to be fetched all over again) or how you can call a function give it a couple of bit values and have it work out what ORing/ANDing etc those bit values would produce without ever writing the expression. (boolean algebra..you gotta love the stuff). Plus theres more but hey thats for another day.
DONT ANYBODY STOP TALKING THIS DISCUSION IS FOR THE AGES I GOTTA GO BUT I WILL BE BACK. And yeah thanks for answering my efficiency question. Oh so does this mean the C++ compiler writers at microsoft are better than the VB ones??? HERE IS A SECRET EVERYONE, YOU KNOW THE VB COMPILER AND THE C++ COMPILER................SSHHHHHHHSSHHH THEY ARE THE SAME THING!!!!!!Tell you more later.(eric is taken away by a horde of guards from the secret Gates society nooooooooooo.....)
Now
You sure sound excited :p
A lot of people here know more about C and VB than I do, but thanks. I know exactly how things work, just not the specifics in some cases.Quote:
Hooray Jay, thanks for your enlightenment
Ya. OMG. Hundreds of hand written pages containing OP CODES (1F, A9, ADC, MOV, etc). Everytime a serious correction was made, many of those pages were re-written. The code was entered with dip-switches. HeHe. I built a significant amount of the electronics too. I worked on the same stuff Bill Gates started on. S100 bus type systems (the name IMSAI rings a bell, or something like that). 8080 and 80x88 processors (the pre 80x86 stuff) - then some Z80 processors too were used. The only sound we had was turning on a standard radio and listening to the loops execute (by the system generated electrical noise). Memories! :-) And yes, it was a blast.Quote:
Gosh you had to write in machine code?!!???
It was around this period that we made the rocket sled (playing with science and physics) - but thats another story.
I can see the Linker being the same ... but the compiler? Neat.Quote:
HERE IS A SECRET EVERYONE, YOU KNOW THE VB COMPILER AND THE C++ COMPILER................SSHHHHHHHSSHHH THEY ARE THE SAME THING!!!!!!
Then why aren't you a billionaire?Quote:
Originally posted by Jay Rogozinsky
I worked on the same stuff Bill Gates started on.
What makes you presume I'm not. :-)
blah compile blah blah boot sector... 1:23 and Im drunk........
:p
Cuz I ain't seen yer name in Forbes.Quote:
Originally posted by Jay Rogozinsky
What makes you presume I'm not. :-)
Ha!
Hello people, I have returned. So what have I missed?
Well Ciyana is going on well and I had some insipiration today on thoughts about the execution and debugging of programs. Does anybody know where I can get material on debuggers and intepreters? I need to know how they work so I can use them for Ciyana.
So far about the intepreter I have the following ideas.
Variables and the likes will be stored in files during the intepretation of code.
When the code refers to a variable,using some specialised routines,I can read the values as they are in the files, work on them and store the results back in the files.
Built in functions will be implemented as follows.Say the code reads: a = Sqrt(b). What I would do is the following. From the file, I would read the current value of b into a vb variable say an integer. I would then call the Sqrt function (which I would write myself) to get what the result is. Then the value would be saved to file where "a" has its space.
My current code library contains over 3000 lines of code (about 81 string functions ,rougly 30 mathematical functions, 10 logical functions and 4 sort and search functions) Yep I have been writing this library for the past 6 months and everyday it continues to grow. I intend to include it as part of the Ciyana runtime libraries. Ciyana by the way is going to be very powerful when it comes to text processing.Why? what do compilers,word processors, browsers, intepreters etc work with? TEXT TEXT TEXT. The more functions there are to deal with text the better.I have functions to select individual words,swap them, move them, replace them,expand them,encrypt them, analyse facts about them etc. All this is to be used for the Ciyana compiler itself.
If anyone wants any of it, as soon as I can get it into a DLL ,I can mail you a copy(let me know at: [email protected])
So then people lets share our ideas about how compilers and intepreters work. I will return and we can start right with VB itself.Meanwhile keep chatting and see ya. Eric.
cuz gates didnt do jack $hi7. He just bought the rite stuff at the rite timeQuote:
Originally posted by aknisely
Then why aren't you a billionaire?
Yeah, so? What's stopping you from doing the same?;)Quote:
Originally posted by spetnik
cuz gates didnt do jack $hi7. He just bought the rite stuff at the rite time
it's too late now.
ok... scam time *salesman voice: "if you send me and infinite amount of money in the mail i will send you a time maching (actualy a wooden box with batteries in it).
Hello people, I have returned. So what have I missed?
Well Ciyana is going on well and I had some insipiration today on thoughts about the execution and debugging of programs. Does anybody know where I can get material on debuggers and intepreters? I need to know how they work so I can use them for Ciyana.
So far about the intepreter I have the following ideas.
Variables and the likes will be stored in files during the intepretation of code.
When the code refers to a variable,using some specialised routines,I can read the values as they are in the files, work on them and store the results back in the files.
Built in functions will be implemented as follows.Say the code reads: a = Sqrt(b). What I would do is the following. From the file, I would read the current value of b into a vb variable say an integer. I would then call the Sqrt function (which I would write myself) to get what the result is. Then the value would be saved to file where "a" has its space.
My current code library contains over 3000 lines of code (about 81 string functions ,rougly 30 mathematical functions, 10 logical functions and 4 sort and search functions) Yep I have been writing this library for the past 6 months and everyday it continues to grow. I intend to include it as part of the Ciyana runtime libraries. Ciyana by the way is going to be very powerful when it comes to text processing.Why? what do compilers,word processors, browsers, intepreters etc work with? TEXT TEXT TEXT. The more functions there are to deal with text the better.I have functions to select individual words,swap them, move them, replace them,expand them,encrypt them, analyse facts about them etc. All this is to be used for the Ciyana compiler itself.
If anyone wants any of it, as soon as I can get it into a DLL ,I can mail you a copy(let me know at: [email protected])
So then people lets share our ideas about how compilers and intepreters work. I will return and we can start right with VB itself.Meanwhile keep chatting and see ya. Eric.
C\C++\VB\PERL - yada yada yada
How many out there rememeber when programming was really programming - the syntax and librabries have gotten so huge it's hard to remember everything all the time
Granted that just could be the age factor - and perhaps the woodstock effect
I miss OS/8 octal assembler 32K magnetic core memory and a power bill that would have brought down ENRON two years earlier.....
but THAT is just MY opinion - won't even buy a coffee
hehe
Cheers
...and even then, Enron would still have been alive and well when the last person before you posted in this thread.Quote:
I miss OS/8 octal assembler 32K magnetic core memory and a power bill that would have brought down ENRON two years earlier.....
ASM rules. I can't claim veteranship of ancient hardware but I did once write a mouce accelerator in ASM on my atari ST when I was 8.
OK - so... well....... um...........
Sometimes when you are browsing for a solution you stumble on stuff -
For an old dude like me, 2001 was yesterday - you just WAIT until your bowels go - then you'll know - you'll understand.....
Whippersnapper....
;-)