Author | Message | Time |
---|---|---|
FaDeS | Well, I am sort of new to VB, so I decided just to tamper someone else's source a bit to try and get my bearings. I am also in a clan, and want to optimize a Flawed Bot source (No I am not slapping in my bot's name in the Ver command, just adding some useful features.) One feature I wanted to add, but I can't seem to figure out is something like Guard`Bot's "Crisis Mode"... For those of you who don't know what that is, it is a command that sets the bot to automatically clear it's que every 10 or so seconds. I thought this would be useful alongside the "Own" command, so you don't have to Scq after every one. Anyways, I am afraid that the bot automatically clearing it's que after a number of seconds might also clear it of this command, causing it to have no effect, and acting the same as a basic Scq... Also, I would like to know how I could change it so that the user could set the number of seconds between each Scq, so the command would go something like ".acq 1 10", which would mean Auto Clear Que, Activated, every 10 seconds... Any suggestions other than, "Learn VB", "Use CSB newb", or "Stfu and leave the forums newb"... Thanks! | February 1, 2005, 12:32 AM |
Myndfyr | [quote author=FaDeS link=topic=10389.msg97697#msg97697 date=1107217971] Any suggestions other than, "Learn VB", "Use CSB newb", or "Stfu and leave the forums newb"... [/quote] "Queue" is spelled with two "ue"s, and is pronounced like the letter Q. "Que" is a Spanish preposition meaning "what" or "that," as well as the occasional "who(m);" it is pronounced like the letter K, but much more tersely. If you add a variable to wherever the timer is (given that I don't know anything about this source code that you acquired) and check to see if its value indicates that you're using the special clear-queue command rather than the standard clear-queue command, and then make it not behave like the standard command if that is the case, you'll be okay. (This is when actually understanding programming -- not just the language -- and being able to think prevents you from having to say, "ohhhh, that was a really easy solution to a really simple question.") Perhaps the "special value" the I indicated can be just an integer, and you can specify that the timer you use to repeatedly clear the queue would have its interval set by the number of seconds specified in the special value. If the "special value" is 0, then you know auto-clear-queue is off. I have worked hard to ensure that my response has fallen within the parameters that you set. I hope it was helpful. | February 1, 2005, 12:42 AM |
FaDeS | That helped, in an angry, newb hating, rather intimidating way... Thank you for showing me the way of the programmer, which is pretty useless to me, being a 'programmer in training', as it were... But other than that, I sort of understand... And aside from giving me the source (which I don't want), is there any way to slightly clarify this to a, oh say, "Creating This Command for Dummies" extent...? Thanks! | February 1, 2005, 12:49 AM |
Myndfyr | [quote author=FaDeS link=topic=10389.msg97703#msg97703 date=1107218991] That helped, in an angry, newb hating, rather intimidating way... Thank you for showing me the way of the programmer, which is pretty useless to me, being a 'programmer in training', as it were... But other than that, I sort of understand... And aside from giving me the source (which I don't want), is there any way to slightly clarify this to a, oh say, "Creating This Command for Dummies" extent...? Thanks! [/quote] But see.... If you learn the "way of the programmer," as you so called it, now, then when you want to move on to more advanced things, it won't be so difficult to train you then. :P So you shouldn't look at it as "useless." Unfortunately, because I'm not familiar (and I would bet that most others here are also unfamiliar) with the structure of the program to which you're referring, I can't specifically come up with a way to add a new command to it. Generally -- 1.) You need to know when the command is coming in. There's probably a command parser, which is probably characterized by a Select Case and then a lot of Case "somecommand"...End Case statements. 2.) You need a timer object. 3.) You need to tell the timer object to check a variable. 4.) If the variable meets a certain condition (say, it's not 0), you make it clear its queue. Since you're adamant about not wanting code, I can't give you sample code. That's a rather high-level type of pseudocode, though, and it should give you some hints about what to look for. My ultimate recommendation is: don't be lazy. I have a friend who's familiar with VB6 and trying to learn VB.NET. I keep telling him, "You need to learn object-oriented programming to work in VB.NET." He just finished something and was happy, until he realized he needed to do the same thing twice (just slightly different), but the way he had structured his application prevented him from doing it. Learn how to program first. Learn the "programmer's way," so-to-speak. It will continue to frustrate you, and frustrate the rest of us. Unfortunately, this is equivalent to the "stfu newb and leave the forums" that you had asked not to hear, but it's the truth, and it's the most helpful suggest I can offer at this point. *shrug* | February 1, 2005, 1:00 AM |
FaDeS | As I sit here, reading your posts with that dumb look that people get when you are speaking different language to them, I find myself asking for a sample code... I didn't want to, but I figure things out better when I have something to look at... And if you really want to preview the code I am looking at, it is located at Pianka.net, or Bnetweb.net... Oh yeah, I have given up on the custom delay venture on this command, I just want it to repeat the *Queue* Clear command until ".acq 0" is sent, canceling the command... (I presume you like the correct spelling MyndFyre... Que?) | February 1, 2005, 1:20 AM |
shout | It seems to me like your not really trying. The "code" i gave you is not anything, it is just a more visual way of explaining what I said. I don't know what you are trying to acomplish by replying to all the posts like that, but if you want help, don't do that. | February 1, 2005, 1:39 AM |
Myndfyr | hehe. Well unfortunately I don't have VB6 so I can't give you specifics about how a Timer object works. You'll need to add one to Form1, I believe, and I'm sure one is already there. It'll be easiest to make one for this by itself. This is the code he used to process the "cq" command. It's in module3.bas (I opened it in Notepad and did a search ;)) [code] '### ClearQueue If ChkStr = Trigg & "cq" Then UA (Username) If UserP >= 50 Then Form1.lstAutoUnIp.Clear: ClearQue: Form1.txtQT.Text = "": Form1.AQ "†±ownend±†": Form1.AQ "Queue is cleared": RunData End If '### ClearQueue [/code] I'm not sure what ALL of that does, but: [code] If ChkStr = Trigg & "cq" then [/code] This checks to make sure the command being checked is the trigger plus the "cq" command. Thus if the trigger is ".", and the user sends ".cq", this If statement will evaluate as true. Then the code block below it will execute. I assume UA(username) is some kind of User Authorization check. Then you have: [code] Then Form1.lstAutoUnIp.Clear [/code] It looks like right there is the command that clears the list. So perhaps in all of this, you could do something like... [code] 'inside Module3.bas perhaps? ' this is that "special value" Private Dim numAutoClearValue as Integer Sub tmrAutoCQ_Tick ' this is added when you add that timer. If (numAutoClearValue <> 0) Then Form1.lstAutoUnIp.Clear End If End Sub [/code] Then you can add the .acq command somewhere in the command parser code in module3.bas.... perhaps next to the .cq command? There has been extensive discussion about adding commands like this -- do a forum search. Flawed bot's source sucks. And I noticed that Fleet ALSO spells "queue" correctly about 50% of the time. But yeah.... I prefer the correct spelling because I speak Spanish and seeing "que" throws me off. | February 1, 2005, 1:48 AM |
FaDeS | MyndFyre... Thank you! I understood that to an extent where I may be able to make this all pull together... And as I noticed, Flawed Bot is pretty messy... Do you have any suggestions as to what bot source I could look into to sort of get all the concepts implemented in a Battle.net Chat Client? That would probably help me a bit better than Fleet-'s source, because it is sort of sketchy in areas... | February 1, 2005, 1:59 AM |
Myndfyr | Unfortunately I do not at this time. You might check out JavaOp, which is open-source and highly customizable. It's in Java, though. | February 1, 2005, 2:14 AM |
Mephisto | [quote author=MyndFyre link=topic=10389.msg97706#msg97706 date=1107219641] [quote author=FaDeS link=topic=10389.msg97703#msg97703 date=1107218991] That helped, in an angry, newb hating, rather intimidating way... Thank you for showing me the way of the programmer, which is pretty useless to me, being a 'programmer in training', as it were... But other than that, I sort of understand... And aside from giving me the source (which I don't want), is there any way to slightly clarify this to a, oh say, "Creating This Command for Dummies" extent...? Thanks! [/quote] But see.... If you learn the "way of the programmer," as you so called it, now, then when you want to move on to more advanced things, it won't be so difficult to train you then. :P So you shouldn't look at it as "useless." Unfortunately, because I'm not familiar (and I would bet that most others here are also unfamiliar) with the structure of the program to which you're referring, I can't specifically come up with a way to add a new command to it. Generally -- 1.) You need to know when the command is coming in. There's probably a command parser, which is probably characterized by a Select Case and then a lot of Case "somecommand"...End Case statements. 2.) You need a timer object. 3.) You need to tell the timer object to check a variable. 4.) If the variable meets a certain condition (say, it's not 0), you make it clear its queue. Since you're adamant about not wanting code, I can't give you sample code. That's a rather high-level type of pseudocode, though, and it should give you some hints about what to look for. My ultimate recommendation is: don't be lazy. I have a friend who's familiar with VB6 and trying to learn VB.NET. I keep telling him, "You need to learn object-oriented programming to work in VB.NET." He just finished something and was happy, until he realized he needed to do the same thing twice (just slightly different), but the way he had structured his application prevented him from doing it. Learn how to program first. Learn the "programmer's way," so-to-speak. It will continue to frustrate you, and frustrate the rest of us. Unfortunately, this is equivalent to the "stfu newb and leave the forums" that you had asked not to hear, but it's the truth, and it's the most helpful suggest I can offer at this point. *shrug* [/quote] que = that qu`e = what qui`en = who | February 1, 2005, 2:20 AM |
FaDeS | Hmm... Your code sample throws me off a bit... With the line: [code]Sub tmrAutoCQ_Tick()[/code] The whole Module3 is just one giant Sub, that particular line throws off the whole rest of the original Sub, causing numerous errors... I understand what this does, but I think I may not have understood it's placement... If I understand this a little, which I forwarn you, I most likely don't, I would create an 'If' statement for my "acq" command... Then work in the code, but then I don't know, here is my source. [code]'### Auto Clear Queue If ChkStr = Trigg & "acq " Then UA (Username) If vFlagB > 0 And UserP >= 200 Then Message = Mid(Message, 8, 1): If Message <> "1" And Message <> "0" Then Exit Sub If Message = 0 Then Form1.AQ "Auto Clear Que - Disabled" End If If Message = 1 Or 2 Or 3 Or 4 Or 5 Or 6 Or 7 Or 8 Or 9 Or 10 Or 11 Or 12 Or 13 Or 14 Or 15 Or 16 Or 17 Or 18 Or 19 Or 20 Then Form1.lstAutoUnIp.Clear: ClearQue: Form1.AQ "†±ownend±†" Form1.AQ "Auto Clear Que - Enabled": RunData 'no idea what to do with this code... =/ Sub tmrAutoCQ_Tick() If (numAutoClearValue <> 0) Then Form1.lstAutoUnIp.Clear End If End If '### Auto Clear Queue[/code] Basically, what I *think* this code is doing, is when a use types ".acq number_0-20", it will check the integer, and set it as the number of seconds between Queue clearings, and if it is 0, will not function... I know I don't understand this well, but is this correct? And if there are errors please alert me because this could take me a long time to fix without actual programmer input =X. | February 1, 2005, 2:33 AM |
Myndfyr | [quote author=Mephisto link=topic=10389.msg97727#msg97727 date=1107224400] que = that qu`e = what qui`en = who [/quote] Uh, no. Correct English grammar dictates (by the way, split these two posts and put them somewhere like the Trash can), that you should use the pronoun "who" when referring to a personal object. For example: I don't know who won the Nobel Prize. Spanish: No sé que ganó el premio Nobel. Note the use of the personal "que". You don't use "quien." I argued with my professor about it last semester. I lost. You also use "que" (without the accent) to indicate "what" in conjuctive statements, for example: I don't know what you're talking about. Spanish: No sé de que hablas (or de que estás hablando). Qué and quién (with accents) are used in questions about the pronoun (¿Quién habla el español? ¿Qué quieres?) only; the accent doesn't indicate a different meaning, just a different context. | February 1, 2005, 2:35 AM |
FaDeS | Heh, I know you two are the experts around here, but can you please help me with my issue THEN debate the Spanish language. Thanks, and my source is posted up there to anyone who only reads the last posts... Which is pretty much nobody. | February 1, 2005, 2:53 AM |
shout | I think you should look at the JavaOps code. It is not really that hard to figure out what it is doing, and it is well commented and nicely orginaized. Btw, try putting a breakpoint in and following the values. Then you can see excactly what your code is doing. Off topic: What does the '<>' do in vB? | February 1, 2005, 3:04 AM |
FaDeS | Basically, it means not... (In this sense, it means anything but.) | February 1, 2005, 3:10 AM |
Myndfyr | [quote author=FaDeS link=topic=10389.msg97738#msg97738 date=1107227457] Basically, it means not... (In this sense, it means anything but.) [/quote] More specifically, it is the binary operator which means "not equals to." It is parallel of the != operator in C-based languages. | February 1, 2005, 3:48 AM |
FaDeS | Well, yes, MyndFyre once again is the VB programmer, making me the "trainee"... Anyways, you saw my thoughts on your code example, and my code, how do I get it to function? | February 1, 2005, 4:34 AM |
shout | You need to have method "blah blah timer_TickCount()". Then you must call that function you made, except without the "Sub TimerWhatnot". | February 1, 2005, 1:24 PM |
Myndfyr | [quote author=FaDeS link=topic=10389.msg97745#msg97745 date=1107232452] Well, yes, MyndFyre once again is the VB programmer [/quote] Don't accuse me of that! :P | February 1, 2005, 10:58 PM |
FaDeS | Visual Basic programmer... Sorry for throwing that one your way, what I meant to say, was "God of all things programming"... My bad, once again... | February 2, 2005, 11:49 PM |
shout | God of all things programming...? Wow MyndFyre, you sure are 1337! | February 2, 2005, 11:59 PM |
Myndfyr | [quote author=FaDeS link=topic=10389.msg97955#msg97955 date=1107388164] Visual Basic programmer... Sorry for throwing that one your way, what I meant to say, was "God of all things programming"... My bad, once again... [/quote] Hehehe.... That wasn't what I was looking for. I try to shirk praise. But you're apparently not familiar with the generally-negative stigma carried by VB. :P | February 3, 2005, 12:48 AM |
FaDeS | I retract my last statement... not the "God of all things programming", but the "God of all things grammatically correct"... That, my friends, is how you should describe MyndFyre... And oh yeah, thank everybody (But mainly the grammar wizard) for your help, and now my bot is down the drain because I was owned by a worm, and had to reformat... So bye bye progress, hello regression (By the way, this is a very VERY loose use of this word, but it does fit...)... Anyways, thanks, and when I come back with another simple VB6 question, you can all rage at me for being a newb once again... Until then... This one's for you MyndFyre... "i r teh l3av1ngg 4 n0w... bi!!!!!!11!!!!!1eleven1!!!!!11111111" | February 3, 2005, 3:38 AM |
CrAz3D | [quote author=FaDeS link=topic=10389.msg97990#msg97990 date=1107401880] Until then... This one's for you MyndFyre... "i r teh l3av1ngg 4 n0w... bi!!!!!!11!!!!!1eleven1!!!!!11111111" [/quote] I like the "eleven"....VERY nice touch. Why is everyone so insistent that VB is SO horrible & that CSB is basically the devil's code child?... I don't think that they are THAT bad. Sure VB maybe not run as well & CSB is "newb", but ALL people are "newbs" @ one point or another. Poor VB & CSB. Come back sometime FaDeSexclamation | February 3, 2005, 4:38 AM |
Zakath | The reason is simply because the "newbs" gravitate to VB & CSB. If they were only used by people who were knowledgable of their limitations and where they were properly usable, nobody would have as much of a problem. When people post incredibly badly written code in C++ or C#, they get harassed for it just as much. It simply doesn't happen as often, since very few "newbs" bother to try writing anything in those more advanced languages. | February 3, 2005, 5:23 AM |
shout | My advice: Start over. If anything, your code will be better than the first time you wrote it. Unless your brain was owned by a worm as well. | February 3, 2005, 5:47 AM |
CrAz3D | [quote author=shout link=topic=10389.msg98018#msg98018 date=1107409654] My advice: Start over. If anything, your code will be better than the first time you wrote it. Unless your brain was owned by a worm as well. [/quote]Heck yes!... I just restarted my current bot project from scratch, it is coming along QUITE nicely for the 5-6 hours of work I put in to it. It can connect & it reads all the info (access userdb, login info, bot info, & command access lists) from a nicely organized access database. I'm WAY liking it so far. | February 3, 2005, 5:57 AM |
Zakath | Ewww, access database. I don't really see the point in using a large-scale database for a project like this, but eh? | February 3, 2005, 6:05 AM |
Myndfyr | [quote author=Zakath link=topic=10389.msg98014#msg98014 date=1107408200] The reason is simply because the "newbs" gravitate to VB & CSB. If they were only used by people who were knowledgable of their limitations and where they were properly usable, nobody would have as much of a problem. When people post incredibly badly written code in C++ or C#, they get harassed for it just as much. It simply doesn't happen as often, since very few "newbs" bother to try writing anything in those more advanced languages. [/quote] /signed [quote author=shout link=topic=10389.msg98018#msg98018 date=1107409654] My advice: Start over. If anything, your code will be better than the first time you wrote it. Unless your brain was owned by a worm as well. [/quote] /signed Hehe, yes FaDeS, I appreciated your leet-speak, particularly the "eleven" inside. It made a grumpy guy smile. ;) Personally, the reason I dislike VB in general is, I suppose, the development environments available for it are shoddy. VB6's IDE isn't particularly nice, and, while the IDE features of VS7 are nice, VB still seems cluttered. I can't put my finger on it; perhaps it's everything being capitalized, like the obnoxious person Who Types Each Word In A Sentence With A Capital Letter, Who You Want To Just Shoot On Messenger Because It Pisses You Off. That gives me a new thesis idea -- I could bring computer science and psychology together! Does seeing constant capitalization on keywords cause more fatigue than an all-lowercase language? Additionally, I think VB is verbose. For example, there is a VB7 keyword "Overloads." C# and C++ allow overloading automatically. Consider the following class definition: [code] // C# public class Something { public virtual void A(); public virtual void A(string blah); } // C++ class CSomething { public: virtual void A(); virtual void A(char *blah); } ' VB Public Class Something Public Overridable Overloads Sub A() Public Overridable Overloads Sub A(ByVal blah As String) End Class } [/code] I mean, I just want to pull out my hair at that last VB class definition. C++ is easily the shortest one, but C#'s isn't particularly longer -- maybe 4 or 5 keystrokes -- but it just hurts to look at. *shrug* [edit] Since you mentioned my grammar, I just got my final paper back for another class. There are a few typographical errors, and the end of a paragraph where I meant to continue on about something, most likely due to the fact that I was up until 4:00 am typing it. I got an A- on the paper, which proves one thing: grammar is so ingrained in my head that, even half-unconscious, I do it correctly. The paper is here: Rational or Irrational: Kim Jong-Il and North Korea (first draft, the one I got an A- on :P) | February 3, 2005, 7:41 AM |
Dyndrilliac | [quote author=CrAz3D link=topic=10389.msg98003#msg98003 date=1107405517]CSB is basically the devil's code child?[/quote] Lol. That is with out a doubt the funniest thing I have read on the Bot Dev board. I particularly got a kick out of that. @MyndFyre: Wow, C# looks cool. Looks a lot like Java :D I should pick up VS.Net 2003 or something. Anyhoo, I don't think Visual Basic allows you to create classes like that. I believe you have to use the natively functioning "Class Modules" to create classes, as that's the only way I was taught to do it. It's the closest thing to an OOP-Style Object in the programming sense that Visual Basic has. | February 5, 2005, 2:23 AM |
OnlyMeat | [quote author=MyndFyre link=topic=10389.msg98032#msg98032 date=1107416491] [quote author=Zakath link=topic=10389.msg98014#msg98014 date=1107408200] The reason is simply because the "newbs" gravitate to VB & CSB. If they were only used by people who were knowledgable of their limitations and where they were properly usable, nobody would have as much of a problem. When people post incredibly badly written code in C++ or C#, they get harassed for it just as much. It simply doesn't happen as often, since very few "newbs" bother to try writing anything in those more advanced languages. [/quote] /signed [quote author=shout link=topic=10389.msg98018#msg98018 date=1107409654] My advice: Start over. If anything, your code will be better than the first time you wrote it. Unless your brain was owned by a worm as well. [/quote] /signed Hehe, yes FaDeS, I appreciated your leet-speak, particularly the "eleven" inside. It made a grumpy guy smile. ;) Personally, the reason I dislike VB in general is, I suppose, the development environments available for it are shoddy. VB6's IDE isn't particularly nice, and, while the IDE features of VS7 are nice, VB still seems cluttered. I can't put my finger on it; perhaps it's everything being capitalized, like the obnoxious person Who Types Each Word In A Sentence With A Capital Letter, Who You Want To Just Shoot On Messenger Because It Pisses You Off. That gives me a new thesis idea -- I could bring computer science and psychology together! Does seeing constant capitalization on keywords cause more fatigue than an all-lowercase language? Additionally, I think VB is verbose. For example, there is a VB7 keyword "Overloads." C# and C++ allow overloading automatically. Consider the following class definition: [code] // C# public class Something { public virtual void A(); public virtual void A(string blah); } // C++ class CSomething { public: virtual void A(); virtual void A(char *blah); } ' VB Public Class Something Public Overridable Overloads Sub A() Public Overridable Overloads Sub A(ByVal blah As String) End Class } [/code] I mean, I just want to pull out my hair at that last VB class definition. C++ is easily the shortest one, but C#'s isn't particularly longer -- maybe 4 or 5 keystrokes -- but it just hurts to look at. *shrug* [edit] Since you mentioned my grammar, I just got my final paper back for another class. There are a few typographical errors, and the end of a paragraph where I meant to continue on about something, most likely due to the fact that I was up until 4:00 am typing it. I got an A- on the paper, which proves one thing: grammar is so ingrained in my head that, even half-unconscious, I do it correctly. The paper is here: Rational or Irrational: Kim Jong-Il and North Korea (first draft, the one I got an A- on :P) [/quote] I find someone who codes in c# calling another language verbose hilarious. The statements you choose to select for comparison to c++/c# are almost exactly the same. Overridable is a longer word than virtual WOW! OMG! Emo alert!. You failed to note vb doesn't require semi colons and opening/closing braces for blocks, VB is truly a RAD language. With .net it's even less verbose and more functional as you have additional operators i.e +=, true polymorphism/inheritance,multithreading,structured exception handling exactly like c++. c# was created to satisfy the programmer who cant code in c++ and thinks they are above VB. vb.net and c# compile to the same MSIL and run at exactly the same speed while c# is more verbose than c++. If you want high performance/elegance write c++. If you want RAD development go with vb.net it's that simple, c# is left in between for novalty purposes just like java really, but atleast java has cross platform support. Im afraid c# is the most self indulgent language i have ever encountered. | February 5, 2005, 3:53 AM |
Myndfyr | [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] I find someone who codes in c# calling another language verbose hilarious. The statements you choose to select for comparison to c++/c# are almost exactly the same. [/quote] The purpose wasn't to compare C++ and C#, but to compare the two of them to VB. [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] Overridable is a longer word than virtual WOW! OMG! Emo alert!. [/quote] Um, I don't know what "emo" is, but you ignored my point about "Overloads." It's implied, but you'll generate a warning in VB.NET if you don't supply it. [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] You failed to note vb doesn't require semi colons and opening/closing braces for blocks, VB is truly a RAD language. [/quote] You're right, it doesn't require opening-closing braces for blocks. It requires "End If," "End Class," "End Struct," "End Interface," "Next," "Loop," etc. Each of these is longer than the combined "{" and "}" delimiting blocks. VB.NET doesn't support multiple statements on a single line without a token separator (I believe ":"). VB.NET doesn't support pointers, which allow C# to approach the speed of C++ in critical code sections. VB.NET doesn't support inline comments. VB.NET doesn't support XML class documentation without a plugin, i.e., it's not built into the compiler; if you're developing a library using RAD principles, you'd better be prepared to document it yourself if you're using VB.NET. VB.NET doesn't support unsigned numbers. VB.NET doesn't support escape sequences in strings (although it does allow newlines in string literals, but C# does as well if you prefix the string with the @ symbol). VB.NET requires that attributes have a _ after to indicate that the attribute applies to the tokens on the next line, if you have a newline between them. And you didn't address the annoying Capitalize Every Keyword Or The Ide Will Do It For You. On this topic, have you ever read Code Complete? It provides a very effective empirical analysis for the effects of language on a rapid application development project, but points out that there are a lot of other factors that can provide a much more significant efficiency increase. [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] With .net it's even less verbose and more functional as you have additional operators i.e +=, true polymorphism/inheritance,multithreading,structured exception handling exactly like c++. [/quote] VB .NET does not allow overloading operators until 2005. [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] vb.net and c# compile to the same MSIL and run at exactly the same speed while c# is more verbose than c++. [/quote] Well, they don't compile to EXACTLY the same MSIL, but close. And VB is more verbose than C#, which means that VB is more verbose than C++, which makes whatever point you were trying to make irrelevant.... [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] If you want high performance/elegance write c++. If you want RAD development go with vb.net it's that simple, c# is left in between for novalty purposes just like java really, but atleast java has cross platform support. [/quote] I don't know why you say Java is there for "novelty purposes." Java is an extremely effective language, and it certainly has its applications. I think C# was developed to be a direct competitor to Java, which was undoubtedly gaining ground on VB; C# has a similar syntax derived from Java, C#, and Ada, and provides the benefits of the Common Language Infrastructure to that syntax, including type-safe function pointers (delegates), types that are passed by value (structures), type-safe enumerations, and attributed programming. Java lacks all of these features, which are present in each .NET Framework language, but C# really synthesizes a nice combination of Java's elegance with these features. [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] Im afraid c# is the most self indulgent language i have ever encountered. [/quote] On what grounds? | February 5, 2005, 7:03 AM |
OnlyMeat | [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] The purpose wasn't to compare C++ and C#, but to compare the two of them to VB. [/quote] I'll repeat what i said because you clearly didn't understand the sentence. [quote author=OnlyMeat link=topic=10389.msg98275#msg98275 date=1107575638] The statements you choose to select for comparison to c++/c# are almost exactly the same. [/quote] [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] Um, I don't know what "emo" is, but you ignored my point about "Overloads." It's implied, but you'll generate a warning in VB.NET if you don't supply it. [/quote] Emo means someone who over-reacts. My point was you are basically saying because Overridable is longer than virtual then vb is verbose, im afraid that is just a false assertion. [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] You're right, it doesn't require opening-closing braces for blocks. It requires "End If," "End Class," "End Struct," "End Interface," "Next," "Loop," etc. Each of these is longer than the combined "{" and "}" delimiting blocks. VB.NET doesn't support multiple statements on a single line without a token separator (I believe ":"). VB.NET doesn't support pointers, which allow C# to approach the speed of C++ in critical code sections. VB.NET doesn't support inline comments. VB.NET doesn't support XML class documentation without a plugin, i.e., it's not built into the compiler; if you're developing a library using RAD principles, you'd better be prepared to document it yourself if you're using VB.NET. VB.NET doesn't support unsigned numbers. VB.NET doesn't support escape sequences in strings (although it does allow newlines in string literals, but C# does as well if you prefix the string with the @ symbol). VB.NET requires that attributes have a _ after to indicate that the attribute applies to the tokens on the next line, if you have a newline between them. And you didn't address the annoying Capitalize Every Keyword Or The Ide Will Do It For You. On this topic, have you ever read Code Complete? It provides a very effective empirical analysis for the effects of language on a rapid application development project, but points out that there are a lot of other factors that can provide a much more significant efficiency increase. [/quote] You can argue to you are blue in the face the point is you can write apps faster and easier with vb.net than c# at exactly the same performance, if you want detailed examples of this try searching google:- http://www.vbrad.com/pf.asp?p=source/src_top_10_vb.htm A good example in there is vb's with statement which sets the context of an object so you can access it's properties and methods without having to type in the name of the object over and over. [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] VB .NET does not allow overloading operators until 2005. [/quote] Exactly what does that have to do with how verbose vb.net is? [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] Well, they don't compile to EXACTLY the same MSIL, but close. And VB is more verbose than C#, which means that VB is more verbose than C++, which makes whatever point you were trying to make irrelevant.... [/quote] I think it's safe to say vb is much simpler than c++ in terms of how many lines you have to write which any vb programmer here can verify. Another false assertion anymore? [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] I don't know why you say Java is there for "novelty purposes." Java is an extremely effective language, and it certainly has its applications. I think C# was developed to be a direct competitor to Java, which was undoubtedly gaining ground on VB; C# has a similar syntax derived from Java, C#, and Ada, and provides the benefits of the Common Language Infrastructure to that syntax, including type-safe function pointers (delegates), types that are passed by value (structures), type-safe enumerations, and attributed programming. Java lacks all of these features, which are present in each .NET Framework language, but C# really syntesizes a nice combination of Java's elegance with these features. [/quote] The problem with c# is it has no commercial value, it's not suitable for performance critical or for fast turn around applications. These qualities are found in c/c++ and vb respectively. Java was based on c/c++ so actually it synthesizes it's so called elegance (Using an interpreted language is elegant??) from those. [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] On what grounds? [/quote] See above. [quote author=MyndFyre link=topic=10389.msg98294#msg98294 date=1107587039] I can't put my finger on it; perhaps it's everything being capitalized, like the obnoxious person Who Types Each Word In A Sentence With A Capital Letter, Who You Want To Just Shoot On Messenger Because It Pisses You Off. [/quote] How long have you used visual studio?? lol - i guess not long as that feature is actually optional, it can auto capitalize keywords or leave them as typed. | February 5, 2005, 5:36 PM |