1. Post #3201

    August 2011
    192 Posts
    I hate that about java
    actually java is pretty consistent there. java never wanted operator overloads and thus == compares only reference not if the string is the same.

    == as a comparison between the string content is actually inconsistent as it is an operator overload someone "made up". of course in this case I agree string comparison should be made easy BUT it is actually confusing if you don't know what operator overloading actually means
    Reply With Quote Edit / Delete Windows 7 Switzerland Show Events Agree Agree x 5 (list)

  2. Post #3202
    Team Hamster
    Mordi's Avatar
    January 2012
    312 Posts
    Looks neat, but shouldn't the "Load" icon be a folder instead? In my head, an open door with an arrow pointing into it means "Exit" or "Leave".
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Agree Agree x 7 (list)

  3. Post #3203
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    actually java is pretty consistent there. java never wanted operator overloads and thus == compares only reference not if the string is the same.

    == as a comparison between the string content is actually inconsistent as it is an operator overload someone "made up". of course in this case I agree string comparison should be made easy BUT it is actually confusing if you don't know what operator overloading actually means
    However, it is inconsistent in that it compares the value of primitive values but the addresses of objects, which is spectacularly confusing if you don't know that objects are special and stupid if you actually think about it.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 5Disagree Disagree x 2 (list)

  4. Post #3204
    I bought a title for $1.
    sambooo's Avatar
    March 2011
    3,067 Posts
    Anyone suggest a good resource to learn C? I'm looking for a reference more so than a 'from scratch' tutorial that starts with hello world and making a command-line calculator.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  5. Post #3205
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,069 Posts
    Looks neat, but shouldn't the "Load" icon be a folder instead? In my head, an open door with an arrow pointing into it means "Exit" or "Leave".
    it's "leaves" and "exits" the current project!
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Funny Funny x 2 (list)

  6. Post #3206
    Icedshot's Avatar
    April 2010
    2,361 Posts
    BUT it is actually confusing if you don't know what operator overloading actually means
    I find operator overloading an extremely useful feature in C++, and i'd be pissed if for whatever reason they took it out

    Being able to overload an operator for vector addition and the like saves a lot of time, and leads to more intuitive use of code. Something that useful shouldn't be not put into a language simply because it might be confusing when you are learning the language.

    Though, i'm the kind of person who got bored and learnt C for the PSP as my first language, so perhaps my slightly morbid streak with programming difficulty slightly (massively) biases my argument towards not simplifying a language
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events

  7. Post #3207
    Dotmister's Avatar
    May 2008
    898 Posts
    I find operator overloading an extremely useful feature in C++, and i'd be pissed if for whatever reason they took it out

    Being able to overload an operator for vector addition and the like saves a lot of time, and leads to more intuitive use of code. Something that useful shouldn't be not put into a language simply because it might be confusing when you are learning the language.

    Though, i'm the kind of person who got bored and learnt C for the PSP as my first language, so perhaps my slightly morbid streak with programming difficulty slightly (massively) biases my argument towards not simplifying a language
    The main downside to operator overloading is that it can be easy to add performance intensive tasks to your program without realising, for example if you overloaded operator+ to do a long task, it might be a bit confusing where your program was suddenly hanging because you expect + to be a short, quick operation. Especially a problem when dealing with third party libraries.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  8. Post #3208
    I made WAYWO a better place
    OldFusion's Avatar
    September 2011
    1,311 Posts
    Anyone suggest a good resource to learn C? I'm looking for a reference more so than a 'from scratch' tutorial that starts with hello world and making a command-line calculator.
    There is a very good reason why all tutorials start with such things, its stuff you need to get through before it gets interesting, you need to know the basics before you can make anything interesting.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2Dumb Dumb x 1 (list)

  9. Post #3209
    Icedshot's Avatar
    April 2010
    2,361 Posts
    Anyone suggest a good resource to learn C? I'm looking for a reference more so than a 'from scratch' tutorial that starts with hello world and making a command-line calculator.
    This probably isn't what you're looking for at all, but the compiler/ide Pelles C comes with a massive reference database, and several (long) articles on various aspects of programming

    I was severely disappointed when moving from pelles C to code::blocks, simply because it is such an amazingly useful IDE. I learnt a ton about programming from there. There are helpful descriptions that go along with all the functions, and a big function list. I used to just browse through it and try out cool sounding stuff/functions based on the description they gave there.
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events Dumb Dumb x 1 (list)

  10. Post #3210
    Gold Member
    Darwin226's Avatar
    January 2009
    4,159 Posts
    However, it is inconsistent in that it compares the value of primitive values but the addresses of objects, which is spectacularly confusing if you don't know that objects are special and stupid if you actually think about it.
    I think the solution is that string should be made into a primitive.
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Disagree Disagree x 1 (list)

  11. Post #3211
    Icedshot's Avatar
    April 2010
    2,361 Posts
    The main downside to operator overloading is that it can be easy to add performance intensive tasks to your program without realising, for example if you overloaded operator+ to do a long task, it might be a bit confusing where your program was suddenly hanging because you expect + to be a short, quick operation. Especially a problem when dealing with third party libraries.
    That's your own fault though, if you implement it yourself.

    And most ide's come with code profilers nowadays, so its not *so* much of an issue. I agree though, third party libraries *could* abuse it like that, but so far i haven't found myself in a situation where its been too much of an issue. Not using operator overloading wouldn't fix the problem either
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events

  12. Post #3212
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,069 Posts


    way better than a folder.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Dumb Dumb x 36Funny Funny x 7Disagree Disagree x 2Optimistic Optimistic x 1 (list)

  13. Post #3213
    I bought a title for $1.
    sambooo's Avatar
    March 2011
    3,067 Posts
    There is a very good reason why all tutorials start with such things, its stuff you need to get through before it gets interesting, you need to know the basics before you can make anything interesting.
    I know the basics though, I've programmed in many other languages and just want to add C to that list.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  14. Post #3214
    I made WAYWO a better place
    OldFusion's Avatar
    September 2011
    1,311 Posts
    The main thing about operator overloading is that people use it to overload operators with completely different behavior then the operator should provide in default C.

    Vector1 + Vector2 = SumVector; // Good
    std::cout << "Some text" << 12; // Bad
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 3 (list)

  15. Post #3215
    Ploo's Avatar
    December 2009
    364 Posts
    There's finally a public reflection bot available, everything is hooked and it's neat. It uses powerbot API so once that comes out I can hop onto something safer without much changes to my scripts. The guy behind this bot (RareBot) has a fairly bad reputation and a history of will-steal-your-gold so I'm testing scripts in a VM.

    Anyway, a void in my life has been filled. I'm whole once again.

    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 7 (list)

  16. Post #3216
    I made WAYWO a better place
    OldFusion's Avatar
    September 2011
    1,311 Posts
    I know the basics though, I've programmed in many other languages and just want to add C to that list.
    http://www.cplusplus.com/doc/tutorial/

    its C++ But this covers the language itself only, no programming in general.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 2 (list)

  17. Post #3217
    Gold Member

    March 2005
    3,028 Posts
    Anyone suggest a good resource to learn C? I'm looking for a reference more so than a 'from scratch' tutorial that starts with hello world and making a command-line calculator.
    AFAIK, there are none, at least online.
    All the C references I've found are either written as a footnote to a C++ reference, or leave out really important information. There are good references for specific C APIs (such as posix, etc), but the language itself you pretty much have to learn by reading other people's code and googling along the way (or by ancient dead-tree tomes).

    You can pretty much judge a reference by how well it explains the 'static' keyword, which is usually only glossed over, but is extremely important if you want to write clean code.
    Reply With Quote Edit / Delete Windows 7 Show Events

  18. Post #3218
    Person
    geel9's Avatar
    June 2008
    5,743 Posts
    You guys know how YoGUI was UGLY AS SHIT?

    Well I recently added nine-patch support. So if you make a nine-patch image, YoGUI supports it.

    I stole Android's ICS button image and stuck it in YoGUI.

    IT'S WONDROUS!

    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny x 6Artistic x 2Programming King x 1Dumb x 1Optimistic x 1 (list)

  19. Post #3219
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    I think the solution is that string should be made into a primitive.
    I personally think the actual solution is to stop using Java, though sadly I doubt that'll happen.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 2Funny Funny x 1 (list)

  20. Post #3220
    Gold Member
    mechanarchy's Avatar
    September 2009
    1,214 Posts


    way better than a folder.
    The problem with that image is now whenever I see the box anywhere else, I always associate it with the dumb rating. I see it a lot with things like "View packages" and all I can think of is how dumb that would be on facepunch.
    Reply With Quote Edit / Delete Australia Show Events Agree Agree x 22Funny Funny x 1 (list)

  21. Post #3221
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    9,905 Posts
    It's also the best way to prevent people from learning OpenGL at all. It's like giving people the choice between an automatic car and a manual car, where you need to learn how the manual car is built before being allowed to use it.
    Hey, that's an insult to manual transmission. If there ware a car operated using the Windows API, it would randomly freeze up because you forgot to defer the main car loop to other cars every millisecond.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Optimistic Optimistic x 1 (list)

  22. Post #3222
    Basic cinematics! (With that, I mean a dialogue and a delay on the fadeout effect)



    Edit:

    This is all map-specific (no shit), loaded from a Lua file:

    return {
        init= function ()
            map.blackTimeout = 3.5
            tools.timer.add(function ()
                tools.dialogue.addLine("It was a dark night...", {255,255,255})
            end, 1)
            tools.timer.add(function ()
                tools.dialogue.addLine("You don't remember anything.", {255,255,255})
            end, 3)
            tools.timer.add(function ()
                tools.dialogue.addLine("You: Where am I?", {255,127,0})
            end, 8)
            tools.timer.add(function ()
                nots.add("Use [A] and [D] to walk around", 10)
            end, 12)
        end,
        tick= function ()
            
        end
    }
    
    Reply With Quote Edit / Delete Windows 8 Netherlands Show Events Winner Winner x 9Informative Informative x 1Agree Agree x 1 (list)

  23. Post #3223
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    9,905 Posts
    The main thing about operator overloading is that people use it to overload operators with completely different behavior then the operator should provide in default C.

    Vector1 + Vector2 = SumVector; // Good
    std::cout << "Some text" << 12; // Bad
    I know... what if I ever wanted to left shift "Some text" 12 times? What would I do!??
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Agree Agree x 1Winner Winner x 1 (list)

  24. Post #3224
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    I know... what if I ever wanted to left shift "Some text" 12 times? What would I do!??
    std::cout << ("Some text" << 12); ?
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 2Funny Funny x 1 (list)

  25. Post #3225
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,626 Posts
    Basic cinematics! (With that, I mean a dialogue and a delay on the fadeout effect)

    dude you went from having some weird font issues

    to some really good looking shit - good job!
    Reply With Quote Edit / Delete Windows XP United States Show Events Agree Agree x 11Dumb Dumb x 2Friendly Friendly x 1 (list)

  26. Post #3226
    grlira's Avatar
    November 2009
    455 Posts
    I know... what if I ever wanted to left shift "Some text" 12 times? What would I do!??
    I know you're presenting that as a ridiculous idea (which it might not be, what if I want just "the text from character 12 onwards"?), but that's still possible:
    #include <string>
    #include <iostream>
    
    using namespace std;
    
    string operator<< (string s, int i) {
            return "fudge";
    }
    
    int main(void) {
            string s = "some text";
            cout << s << 12; // prints "some text12"
            cout << endl;
            cout << (s << 12); // prints "fudge"
            cout << endl;
            (cout << s) << 12; // prints "some text12"
    }
    

    Still, yes it's probably not the best idea to use a previously well known and well defined operator for a totally new thing.

    And on the broader topic, it's very annoying the way java uses == and .equals() Specially because == works the expected way for primitives.
    Reply With Quote Edit / Delete Windows 7 Portugal Show Events Agree Agree x 1 (list)

  27. Post #3227

    August 2011
    192 Posts
    And on the broader topic, it's very annoying the way java uses == and .equals() Specially because == works in the expected way for primitives.
    this is also very consistent in Java, primitives are call by value and objects are call by reference.
    it makes sense, you might hate or love this fact about java but the language itself is highly consistent (except + for string concat)
    Reply With Quote Edit / Delete Windows 7 Switzerland Show Events Agree Agree x 6 (list)

  28. Post #3228
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    this is also very consistent in Java, primitives are call by value and objects are call by reference.
    it makes sense, you might hate or love this fact about java but the language itself is highly consistent (except + for string concat)
    Consistency is King, Sanity is Ignored. (™)
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Artistic Artistic x 1Dumb Dumb x 1 (list)

  29. Post #3229
    grlira's Avatar
    November 2009
    455 Posts
    this is also very consistent in Java, primitives are call by value and objects are call by reference.
    it makes sense, you might hate or love this fact about java but the language itself is highly consistent (except + for string concat)
    Indeed it is consistent. But consistency can be counter-productive at times.
    Reply With Quote Edit / Delete Windows 7 Portugal Show Events

  30. Post #3230
    Wyzard's Avatar
    June 2008
    1,243 Posts
    Java's consistency makes it a relatively simple and, frankly, boring language. Its strength is the broad collection of libraries available, not the language itself.

    C++ doesn't have the breadth of high-level libraries Java has, but the language itself is much more expressive.
    Reply With Quote Edit / Delete Linux United States Show Events Agree Agree x 3 (list)

  31. Post #3231
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,626 Posts
    this is also very consistent in Java, primitives are call by value and objects are call by reference.
    it makes sense, you might hate or love this fact about java but the language itself is highly consistent (except + for string concat)
    java? consistent?

    int myInt = IntegerFactory.createNewObjectWithDescriptor(new IntegerObjectDescriptor(new IntegerDefaultValue(5)));
    
    Reply With Quote Edit / Delete Windows XP United States Show Events Funny Funny x 15Dumb Dumb x 4Winner Winner x 1Agree Agree x 1 (list)

  32. Post #3232
    Gold Member
    Loli's Avatar
    April 2008
    2,288 Posts


    WHY AM I MOST PRODUCTIVE WHEN I SHOULD BE IN BED?!
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 14 (list)

  33. Post #3233
    Gold Member

    March 2005
    3,028 Posts
    The 'objects are by reference' thing is one of the features I really love about Java. That and static initialization blocks, which I find myself often wishing for when working in other languages.

    Of course the mandatory OOP-even-when-it-doesn't-make-sense kinda ruins it for me, as well as the super-verbose Java naming conventions.


    On an entirely unrelated note, I forgot how much of a pain it is to do anything at all in Windows. I started with Code::Blocks, but gave up because it wouldn't run my Makefile (it failed with absolutely no error info) and because I hate having to manually specify include/library search paths. I started trying to get all set up with MinGW+msys, but it still doesn't have a decent package manager, and it completely breaks everything else on my system because some of the libraries it uses are incompatible with libraries used by gedit, etc., and if I don't have those directories in %path%, it doesn't know how to GCC.

    This could be so much less painful...
    Reply With Quote Edit / Delete Windows 7 Show Events Funny Funny x 4 (list)

  34. Post #3234
    Gold Member
    mechanarchy's Avatar
    September 2009
    1,214 Posts
    On an entirely unrelated note, I forgot how much of a pain it is to do anything at all in Windows. I started with Code::Blocks, but gave up because it wouldn't run my Makefile (it failed with absolutely no error info) and because I hate having to manually specify include/library search paths. I started trying to get all set up with MinGW+msys, but it still doesn't have a decent package manager, and it completely breaks everything else on my system because some of the libraries it uses are incompatible with libraries used by gedit, etc., and if I don't have those directories in %path%, it doesn't know how to GCC.

    This could be so much less painful...
    I know what you mean. Linux has spoiled me, it's so much easier to develop on linux when you can just grab whatever dev libraries you need with a package manager, add -lLibrary to your build options and you're pretty much completely set. On windows, on teh other hand, you've got to find the third-party website with the libraries, download & put in right place, and then set up include&link dirs and options in your compile settings. It might not seem like much more work but it's a pain in the ass nonetheless.
    Reply With Quote Edit / Delete Australia Show Events Agree Agree x 5Funny Funny x 1 (list)

  35. Post #3235
    Gold Member
    ryan1271's Avatar
    February 2008
    1,130 Posts
    I can I post ideas I'm working on? I don't have the ability to do it but I would very much like it if there was a Cleverbot Facade mix. Maybe someone can past the idea to whoever made CleverOmegle.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 1 (list)

  36. Post #3236
    Gold Member
    Programmer's Avatar
    February 2012
    98 Posts


    I just have to make .gif avatars displaying and it's done. ;> ( All of that is drawn automatically via Lua. )
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 5Optimistic Optimistic x 1Funny Funny x 1Dumb Dumb x 1 (list)

  37. Post #3237
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,626 Posts


    I just have to make .gif avatars displaying and it's done. ;> ( All of that is drawn automatically via Lua. )
    needs more agop shirinian
    Reply With Quote Edit / Delete Windows XP United States Show Events Dumb Dumb x 9Agree Agree x 2Funny Funny x 1 (list)

  38. Post #3238
    Gold Member
    Programmer's Avatar
    February 2012
    98 Posts
    needs more agop shirinian
    attention whore.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 9Friendly Friendly x 1 (list)

  39. Post #3239
    Gold Member

    March 2005
    3,028 Posts
    I know what you mean. Linux has spoiled me, it's so much easier to develop on linux when you can just grab whatever dev libraries you need with a package manager, add -lLibrary to your build options and you're pretty much completely set. On windows, on teh other hand, you've got to find the third-party website with the libraries, download & put in right place, and then set up include&link dirs and options in your compile settings. It might not seem like much more work but it's a pain in the ass nonetheless.
    And that's if they even provide Windows binaries. I've run into at least a few packages where I could just apt-get them on Linux, then when I try to build for Windows they just go "Here's the source tarball, godspeed!"
    Reply With Quote Edit / Delete Windows 7 Show Events Funny Funny x 10Agree Agree x 4 (list)

  40. Post #3240
    calzoneman's Avatar
    February 2008
    460 Posts
    And that's if they even provide Windows binaries. I've run into at least a few packages where I could just apt-get them on Linux, then when I try to build for Windows they just go "Here's the source tarball, godspeed!"
    Windows is just a pain in the ass in general.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 12Disagree Disagree x 5Agree Agree x 4 (list)