Home AMX User Forum AMX General Discussion

What functionality do you wish NetLinx had / What annoys you?

2»

Comments

  • GSLogicGSLogic Posts: 562
    I'm programming a project for someone in the software biz worth over 10 digits. He insisted that I don't use any Java code and explained how he spent over a million dollars testing their applications in Java and ended up trashing the whole idea. He kept saying Java's FAT and slow. I personally like programming in Java but until AMX goes completely Java I won't use it. I can't stand waiting for the slow reboot among many other issues.
  • a_riot42a_riot42 Posts: 1,624
    GSLogic wrote: »
    I'm programming a project for someone in the software biz worth over 10 digits. He insisted that I don't use any Java code and explained how he spent over a million dollars testing their applications in Java and ended up trashing the whole idea. He kept saying Java's FAT and slow. I personally like programming in Java but until AMX goes completely Java I won't use it. I can't stand waiting for the slow reboot among many other issues.

    This isn't totally true though. The Java VM will obviously add resources, but if your code is well written, and you are using a fast VM, Java is very close and sometimes better than C/C++ in execution speeds in numerical programs. There are many white papers out there with Java vs C analysis to examine. The problem is making sure the Java code is well written. Because so much is under the covers, it is easier to write inefficient Java code so I think that's where Java gets a bad rap.

    I think that for a RTOS, Java may lose some advantage, but I haven't seen the data on that yet.
    Paul
  • mpullinmpullin Posts: 949
    a_riot42 wrote: »
    I am curious about others ideas, so if I don't think they make sense or I don't understand them I ask questions to find out. Not sure why you view this as 'negative'. In the field of programming, such back and forth is good to knead the best ideas out, and also to make people think. Sorry if you or anyone else was offended.
    Paul
    Oh thanks for letting me know what it's like in the field of programming. Being a professional I had no idea.

    I perceived it as negative because based on your behavior in other threads I found it hard to believe that you were asking an honest question. I don't think we need a ternary operator in NetLinx either but I think because this thread was an attempt to compile everybody's wishes I didn't spend the time/energy to criticize the poster's desire for a ternary operator as trivial.

    Doesn't really matter I guess, this thread has morphed into yet another Java debate.
  • truetrue Posts: 307
    Lots of duet posts... not quite what the thread was intended for, but oh well. :) I personally don't like Duet not just because I do not like to write Java, but also because of how long it takes when sending updated code (an extra 2mb of stuff to send?) and boot time. Again, I'd like to see a more embedded language like Lua or Pawn and open up functionality there. We already have callbacks / events - it'd be nice to execute a Pawn function from a NetLinx event for instance...
    jweather wrote: »
    Don't forget that you can have multiple DEFINE_VARIABLE sections. If you have a bunch of variables that logically belong in a certain section of the code, stick them in a new DEFINE_VARIABLE section. Just don't forget to put a DEFINE_EVENT below it.

    Also don't forget that you can use STACK_VARs and LOCAL_VARs in functions and events where you need them to reduce the number of global variables you need.
    Yes, I know and I do do this :) It is just annoying to break up code blocks with DEFINE_VARIABLE, so unless the code can be broken up, I only define in one place... I wish variable declaration was more C-like. Is it because the parser just is written this way? Or has it remained this way to be easy to learn?

    Re: ternary operator as trivial - some people use it, some don't, some overuse it. It's not a big thing at all, just one of those things that makes me think "I wish I could have had that here..." It's one of many things, but just one I ran into a few times before I posted. (I don't only write AMX for a living, or especially for hobby...)
  • jjamesjjames Posts: 2,908
    I must be in a NetLinx bubble because I have no idea what a ternary operator is.
  • ericmedleyericmedley Posts: 4,177
    jjames wrote: »
    I must be in a NetLinx bubble because I have no idea what a ternary operator is.


    Sounds like something from Star Trek TNG
  • a_riot42a_riot42 Posts: 1,624
    mpullin wrote: »
    Oh thanks for letting me know what it's like in the field of programming. Being a professional I had no idea.

    I perceived it as negative because based on your behavior in other threads I found it hard to believe that you were asking an honest question. I don't think we need a ternary operator in NetLinx either but I think because this thread was an attempt to compile everybody's wishes I didn't spend the time/energy to criticize the poster's desire for a ternary operator as trivial.

    Doesn't really matter I guess, this thread has morphed into yet another Java debate.

    Just so I understand, are you an AMX Forum moderator, or do you take it upon yourself to scold posters who ask other posters questions that weren't directed at you? Please show me where I criticized anyone or said anything was trivial in this thread. I guarantee you won't find it. I simply asked someone why they cared about the ternary operator as a feature when the same thing can be done in a different way, a perfectly innocent and logical question. Well guess what, Phreak politely answered my question and now I know, and it didn't require you to get involved.
    Paul
  • jjamesjjames Posts: 2,908
    I'm still trying to figure out what this ternary function is you all speak of. I almost feel like I'm missing something . . .
  • ColzieColzie Posts: 470
    HA HA! Jeremiah still doesn't know what a ternary function is!!!



    ....what IS a ternary function?




    http://en.wikipedia.org/wiki/Ternary_operation
    Looks like a compact if/else ??
  • ericmedleyericmedley Posts: 4,177
    Colzie wrote: »
    HA HA! Jeremiah still doesn't know what a ternary function is!!!



    ....what IS a ternary function?




    http://en.wikipedia.org/wiki/Ternary_operation
    Looks like a compact if/else ??

    Oh yeah! I remember that from BASIC. Now I understand.
  • PhreaKPhreaK Posts: 966
    jjames wrote: »
    I'm still trying to figure out what this ternary function is you all speak of. I almost feel like I'm missing something . . .

    An IF ELSE statement is a ternary operation, however the 'ternary operators' that have been referred to in this thread (well the ones I've been referring to anyway) are the ? : which is essentially a short hand if else used in many other languages. When you've got them available it allows you to condense a lot of ternary logic giving you neater, leaner, sexier code eg:

    minVal = (a < b; a ? b)

    rather than

    IF (a < b)
    {
    minVal = a
    } ELSE {
    minVal = b
    }
Sign In or Register to comment.