Closed Thread
Page 51 of 353 FirstFirst ... 41495051525361101151 ... LastLast
Results 501 to 510 of 3521
Like Tree5Likes

Thread: Expression Gate 2

  1. #501
    Wire Sofaking Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,357

    Default Re: Expression Gate 2

    Quote Originally Posted by Syranide View Post
    It's almost finished I would say, I mentioned 1-2 weeks a sometime ago, and that is basically the status now too because I haven't had time lately, so I'm not sure when I can do those 1-2 weeks at the moment.

    But, in essence, it is ready now, it just needs to some fixing, error messages for the compiler, add/fix/improve extensions (especially so that it works for players joining servers), (fix) dupe-support, save-support, and improvements here and there.

    Credits to shandolum as well!
    Thanks for the reply.. and sorry Shandolum! I remember reading a long time ago (could have been in the Wire2 topic) that it was only being worked on by one person and that it was going to take 7,894 years to complete.

    To hear that this project is moving along at a steady pace was a big surprise.. but I guess I was confused in thinking it was just Syranide.

    Huge thanks to the both of you and anyone else who contributed.

    Edit:
    Oh, and does EG2 have support for while/for loops? It drives me nuts that EG1 doesn't support them.. I need it all the time. I read the entire documentation word for word last night and saw nothing about it.
    Last edited by Beer; 09-29-2008 at 12:56 AM. Reason: typo

  2. #502
    Wire Sofaking Shandolum's Avatar
    Join Date
    Apr 2007
    Location
    Europe -> Denmark
    Posts
    887

    Default Re: Expression Gate 2

    Quote Originally Posted by Beer View Post
    Oh, and does EG2 have support for while/for loops? It drives me nuts that EG1 doesn't support them.. I need it all the time. I read the entire documentation word for word last night and saw nothing about it.
    It doesn't support loops at the moment, but it has been a planned part of the gate, even though it would require some restrictions as to not make endless loops that would kill the server.
    But it will probably come sometime, though probably not soon. First we need to fix the various bugs, and then add some more functionality to the support that is already there, and then it will probably be released.
    Everything can be improved upon. Nothing is Perfect.
    The only way to move forward, is to surpass what has already been done.
    Creator of many things.

  3. #503
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default Re: Expression Gate 2

    Quote Originally Posted by Hideharu View Post
    When did ya'll throw "* rad2deg" behind a bunch of the common math functions? It took me an hour to figure out why my stuff stopped working.
    It was the wrong way around before, sin, cos, etc are supposed to input and output degrees, and sinr, cosr, etc should take radians, but it was the wrong way around before.

    Quote Originally Posted by Beer View Post
    Thanks for the reply.. and sorry Shandolum! I remember reading a long time ago (could have been in the Wire2 topic) that it was only being worked on by one person and that it was going to take 7,894 years to complete.

    To hear that this project is moving along at a steady pace was a big surprise.. but I guess I was confused in thinking it was just Syranide.

    Huge thanks to the both of you and anyone else who contributed.

    Edit:
    Oh, and does EG2 have support for while/for loops? It drives me nuts that EG1 doesn't support them.. I need it all the time. I read the entire documentation word for word last night and saw nothing about it.
    Documentation? :P
    There is no documentation about the constructs of e2 I believe.
    (What do you need it for?)

    Quote Originally Posted by Shandolum View Post
    It doesn't support loops at the moment, but it has been a planned part of the gate, even though it would require some restrictions as to not make endless loops that would kill the server.
    But it will probably come sometime, though probably not soon. First we need to fix the various bugs, and then add some more functionality to the support that is already there, and then it will probably be released.
    I wouldn't say I've planned it, more that it's a possibility for the future, depending on the need for it (seeing as there are quite many more possibilities now). But so everyone is on the clear, if it ever gets implemented then it will be really limited because of the way the expression gate works with executing all code every time an inputs changes.

  4. #504
    Wire Sofaking Bobsymalone's Avatar
    Join Date
    Jul 2008
    Posts
    770

    Default Re: Expression Gate 2

    How about a character-to-byte function? Would allow you to print strings to a console screen. Something like: S:tobyte(n)
    n being the nth character in the string.

    Also, I just checked, angVel actually breaks the expression. Nothing else works while you're using it. Once it's replaced with $, it works and stops spamming errors to the console.

  5. #505
    Wire Sofaking Azrael's Avatar
    Join Date
    Aug 2007
    Posts
    1,946

    Default Re: Expression Gate 2

    Random question: What about functions/subroutines? Are those possible yet? I'd love to see it doable, especially with the CPU being broken.

  6. #506
    Wire Sofaking Bobsymalone's Avatar
    Join Date
    Jul 2008
    Posts
    770

    Default Re: Expression Gate 2

    Quote Originally Posted by AzraelUK View Post
    Random question: What about functions/subroutines? Are those possible yet? I'd love to see it doable, especially with the CPU being broken.
    You can sort of do subroutines with egate1, I imagine it's still possible with egate2.

    Code:
    I@ One Two
    O@ ValueOne ValueTwo
    
    ~One & One -> SubOne = !SubOne;
    ~Two & Two -> SubTwo = !SubTwo;
    
    SubOne -> interval(20)
    *Code*
    ;
    
    SubTwo -> interval(20)
    *Code*
    ;
    The mock-subroutines are inside conditional statements, so you can toggle the chip to skip them or not.
    In this case, imagine SubOne calculates a value for ValueOne, and SubTwo calculates ValueTwo.
    When You deactivate SubOne, ValueOne is essentially saved as it is. You can use it in other subroutines then.

    Works fairly well for de-lagging a contraption. See my "Tow ship with path plotter" for working examples.

  7. #507
    Wirererer 3dfactor's Avatar
    Join Date
    Aug 2008
    Posts
    178

    Default Re: Expression Gate 2

    Quote Originally Posted by AzraelUK View Post
    Random question: What about functions/subroutines? Are those possible yet? I'd love to see it doable, especially with the CPU being broken.
    I bet you can do it by splitting your code in to separate expression gates, that way your functions becomes separate modules. What would really be cool is addressing system, like "GOTO" in basic

    Something like:

    Code:
    :ONE
    A = 10
    GOTO END
    :TWO
    A = 20
    GOTO END
    :THREE
    if(A > 10){GOTO ONE}else{GOTO TWO};
    :END
    Now this code is just an example (and doable in one line in current expression), but I mean the principle itself. That way we could have easily divided several modules in one egate... Also we could then have predefined adresses like

    Code:
    :FIRST
    code ran when expression first run
    :END
    part of the code if you would use the "end" command... in other words would execute on every exit
    Hope that makes sense :P
    2d head with 3d brains

  8. #508
    Wire Amateur Exitium II's Avatar
    Join Date
    Sep 2008
    Location
    The bush just outside your window
    Posts
    55

    Default Re: Expression Gate 2

    Aren't these new features you're asking for more commonly found in a higher level programming language? :huh:

    Yeah they'd be cool and probably useful, but I thought the expression gate was a gate that just dealt with it's own form of expression.

    Personally, I think the other features would be better suited to a more specific chip, which has been done before if I'm not mistaken, by the moongate.

    Don't get me wrong, I'd love to have all the tools I'm used to having with a full blown language, but on the other hand, I don't want a totally overcomplicated and bloated gate when it's working beautifully the way it is. Not to mention all the extra work the devs would need to put in to add these other things.

    Also, don't forget it's been built in a modular way, so if you really want those features, well...
    - I have no life.


  9. #509
    Wire Sofaking Beer's Avatar
    Join Date
    Jul 2007
    Location
    Dallas, Texas
    Posts
    1,357

    Default Re: Expression Gate 2

    Quote Originally Posted by Syranide View Post
    Documentation? :P
    There is no documentation about the constructs of e2 I believe.
    (What do you need it for?)
    If you mean what do I need loops for.. there have been countless situations where I've needed them. I can't remember most of them, but I do remember the most recent.

    I wanted to loop through all the targets found from a target finder, determine the distance of each one from the player's position, and find out which is the nearest and which is the furthest. Anyway, I realized I couldn't do what I wanted to do anyway because of a quirk with the target finders (I made a thread about it a while back but received no replies).

    Is there no order to the target finder's "next target"?

    Oh, and I meant Wiki, not documentation. http://wiki.garrysmod.com/wiki/?title=Wire_Expression2

  10. #510
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default Re: Expression Gate 2

    Quote Originally Posted by Bobsymalone View Post
    How about a character-to-byte function? Would allow you to print strings to a console screen. Something like: S:tobyte(n)
    n being the nth character in the string.

    Also, I just checked, angVel actually breaks the expression. Nothing else works while you're using it. Once it's replaced with $, it works and stops spamming errors to the console.
    Definately, string support is not yet done, it is basically just a placeholder so suitable functions will be added. (I don't know of or can't fix the angVel-error at the moment, thanks for reporting it!)

    Quote Originally Posted by AzraelUK View Post
    Random question: What about functions/subroutines? Are those possible yet? I'd love to see it doable, especially with the CPU being broken.
    These fall under the same category as loops, definately doable, but for them to be feasible there have to be some pretty good anti-abuse system monitoring the scripts. Otherwise server lag or crashes would be possible at will or even by mistake.

    Quote Originally Posted by 3dfactor View Post
    I bet you can do it by splitting your code in to separate expression gates, that way your functions becomes separate modules. What would really be cool is addressing system, like "GOTO" in basic

    Something like:

    Code:
    :ONE
    A = 10
    GOTO END
    :TWO
    A = 20
    GOTO END
    :THREE
    if(A > 10){GOTO ONE}else{GOTO TWO};
    :END
    Now this code is just an example (and doable in one line in current expression), but I mean the principle itself. That way we could have easily divided several modules in one egate... Also we could then have predefined adresses like

    Code:
    :FIRST
    code ran when expression first run
    :END
    part of the code if you would use the "end" command... in other words would execute on every exit
    Hope that makes sense :P
    FAIL!
    Goto is NOT cool, goto should never have been "invented", goto is the worst mechanic ever invented in a higher-level language. :P

    Goto will never be implemented because of the previous, and because it isn't at all in-line with the "expression style" and it is a one way trip to certain failure and impossible debugging.

    Quote Originally Posted by Exitium II View Post
    Aren't these new features you're asking for more commonly found in a higher level programming language? :huh:

    Yeah they'd be cool and probably useful, but I thought the expression gate was a gate that just dealt with it's own form of expression.

    Personally, I think the other features would be better suited to a more specific chip, which has been done before if I'm not mistaken, by the moongate.

    Don't get me wrong, I'd love to have all the tools I'm used to having with a full blown language, but on the other hand, I don't want a totally overcomplicated and bloated gate when it's working beautifully the way it is. Not to mention all the extra work the devs would need to put in to add these other things.

    Also, don't forget it's been built in a modular way, so if you really want those features, well...
    That basically sums up my current thoughts (although it requires core modifications so it can't be implemented as extensions, well it could actually, but it would be ugly as hell).

    Expressions are intended as being one function in a regular language, it takes inputs and updates the outputs according to the inputs. It's simple and straight-forward for most primary purposes.

    People have been able to build the most amazing things so far, without functions and loops, without proper vector and string support. (No one has yet provided me with a proper good reason for implementing functions and loops either)

    I think it is important to realize that expressions are not intended as the wiremod equivalent of C++ or Java, it's intended as an simple light-weight language for performing equations and basic logic. Meaning that there is little use of functions ("in this spirit"), surely sometimes they could help you save a little duplication. But my opinion is along the lines of; if you require functions or loops then you haven't thought it through or you shouldn't be using expressions, but rather the CPU or some other means.

    The different way expressions and CPUs execute is a major key in making the expression accessible and easy to use, but also why the CPU can do lengthy calculations, whereas expressions "can't". Expressions are intended for equations and basic logic (of nature), not complex logic and advanced systems.

    Also, expressions are not intended as a "one gate does it all", but I encourage you to build modules of expressions that completes different tasks, it's better, more effective and much more useful.

    EDIT: Well, yeah I understood you meant the wiki, what I meant was that the wiki doesn't explain or present any constructs, only functions and extensions
    Last edited by Syranide; 09-29-2008 at 01:29 PM.

Closed Thread

LinkBacks (?)


Similar Threads

  1. Expression Gate : Can't save expression
    By m0nday in forum Bug Reports
    Replies: 2
    Last Post: 08-06-2008, 12:29 PM
  2. Gate - Expression -> Gone!
    By Qvazzler in forum Installation and Malfunctions Support
    Replies: 10
    Last Post: 05-25-2007, 10:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots