+ Reply to Thread
Page 3 of 37 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 361

Thread: E2 User Defined Functions

  1. #21
    Wire Sofaking jacoby6000's Avatar
    Join Date
    Feb 2008
    Location
    behind you when you aren't looking
    Posts
    792

    Default Re: Colonel Thirty Two's Wiremod Addons

    I think his is more like action script :3

    also
    HOW FRAKING LONG HAVE YOU BEEN WORKING ON THIS WITHOUT TELLING US!?!?!?!?!?!?!?
    Quote Originally Posted by Garrysmod View Post
    Warning: You're trying to render in the wrong place. This doesn't play nice with multi-core rendering, so we're not going to let you draw here.
    I'm not stupid!
    In [his] experience that was a sentence never to be uttered except to prove its own inaccuracy
    --Orson Scott Card

  2. #22
    aka Colonel Never Online Colonel Thirty Two's Avatar
    Join Date
    Oct 2009
    Posts
    2,683
    Blog Entries
    5

    Default Re: Colonel Thirty Two's Wiremod Addons

    About a month, maybe. It actually wasn't too hard.

  3. #23
    has a custom title mattwd0526's Avatar
    Join Date
    Apr 2009
    Location
    Born Bostonian
    Posts
    2,652

    Default Re: Colonel Thirty Two's Wiremod Addons

    So Syranide was lying to us the whole time?

  4. #24
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Colonel Thirty Two's Wiremod Addons

    Nice work on the functions.
    Just wanted to tell you that the thing able to run Lua code snippets will definitely not be added to the official SVN. If you do that, you might as well add a crashServer() command while you're at it.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  5. #25
    aka Colonel Never Online Colonel Thirty Two's Avatar
    Join Date
    Oct 2009
    Posts
    2,683
    Blog Entries
    5

    Default Re: Colonel Thirty Two's Wiremod Addons

    It doesn't run Lua snippets, it runs E2 code.
    However, I think there might be a way to hack it to run arbitrary lua code involving glon, I'll have to fix...

  6. #26
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Colonel Thirty Two's Wiremod Addons

    Quote Originally Posted by initrd.gz View Post
    It doesn't run Lua snippets, it runs E2 code.
    ohhhhhhhh my bad
    EDIT: Heh you're right. Even the first post says "runs strings of E2 code"... I failed
    EDIT: In that case, nice work on all of it
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  7. #27
    Wirererer Riddler's Avatar
    Join Date
    Nov 2007
    Location
    /dev/null
    Posts
    257

    Default Re: Colonel Thirty Two's Wiremod Addons

    Quote Originally Posted by mattwd0526 View Post
    Er...

    C++:
    returntype name(parameters) {...}

    Lua:
    function name(parameters) {...}

    Neither of those start with the name of the function, and neither of them involve defining a variable (except C++ defining the type)

    Actualy, if you want to be nit-picky about it they do just not in a way that we would tend perceve them as variables. As far as what you see in lua/c++ that tends to be true. However as far as the 'inner workings' of it go and what is actualy given out when it's compiled that's wrong.

    Function names are stored in a table and when you call a 'function' it looks it up in the table, the function name is a veriable and if your compiler permits it, you can overwrite it, set it to a normal number, whatever and treat it exactly like a variable. This is because when it's compiled there is no variables or function names anymore, it's just set/call memory cell X, so "functionname()" in code is actualy replaced with "goto memory cell X". So while memory cell X could be a 'veriable' you could rewrite it to be a 'function' the computer won't care, as long as it's used in the right way.

    Thats why you get errors from C++ compilers about the function table, it's just a table where the function names are a veriable containing a pointer to it's code. WireCPU is a good example, if you've ever used it. labels are pointers to adresses in memory you can put a 'function' after them and call it or put a veriable after it, and change it to the other later, as long as it's used correctly the cpu dosn't care. The variable system is there and seperate from the function system because it's convienient and nicer to work with, nothing more. I use the word function and variable there because I can't think of a better word, to the processor the two are not seperate but I needed words to diferentiate for the purposes of the example.
    That's oversimplified quite a bit, but you get the idea.

    In the start, theres both, in the middle there is only one, in the end there is nither.
    Last edited by Riddler; 05-16-2010 at 04:43 PM.

  8. #28
    ส็็็็็็็็็็็็็็็็ส็็ ็็็็็ Dav1d's Avatar
    Join Date
    May 2009
    Posts
    1,118

    Default Re: Colonel Thirty Two's Wiremod Addons

    Pinch me, I think I'm dreaming.

  9. #29
    has a custom title mattwd0526's Avatar
    Join Date
    Apr 2009
    Location
    Born Bostonian
    Posts
    2,652

    Default Re: Colonel Thirty Two's Wiremod Addons

    @Riddler, yeah, but I'm talking about what we would see

  10. #30
    Not a bot itsbth's Avatar
    Join Date
    Feb 2007
    Location
    Norway
    Posts
    1,173

    Default Re: Colonel Thirty Two's Wiremod Addons

    Quote Originally Posted by mattwd0526 View Post
    Er...

    C++:
    returntype name(parameters) {...}

    Lua:
    function name(parameters) {...}

    Neither of those start with the name of the function, and neither of them involve defining a variable (except C++ defining the type)
    Actually, function foo() end is just syntactic sugar for foo = function() end in Lua in its current form.

    On topic: Nice work, though I doubt it'll make it into the Wire SVN in its current form.
    Last edited by itsbth; 05-16-2010 at 07:07 PM.

+ Reply to Thread
Page 3 of 37 FirstFirst 1234513 ... LastLast

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