+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Expression2, beta patch release (help with testing)

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

    Default Expression2, beta patch release (help with testing)

    UPDATE2: Another patch.
    UPDATE1: Forgot to add typechecker.lua to the patch, new patch has been uploaded.


    For those unaware of what this is: E2=c^2 (expression2)
    This patch will cause expressions to compile into native Lua, meaning you should see quite a performance improvement for many purposes (when it is finished).



    So here's the first version of the patch, everything should compile properly into Lua, it should be almost 100% backwards-compatible with all extensions. But most of the core-extensions have not yet been rewritten to make use of the new native functions, meaning the performance is currently about the same.

    So please, apply the patch to your wiremod, try out your old expressions and make sure they work properly, when you're done you can just right-click the wiremod addon and use "revert" to restore it. Make sure you have access to the console (add "-console" to the launch parameters in steam).



    Known issues:
    - OPS/PERFORMANCE MONITORING IS NOT YET IMPLEMENTED ... expressions that rely on opscounter()/minquota()/maxquota() to restrict performance will not work.
    - changed(*) works, but it may work incorrectly if you use it in many places.
    - A ?: B is not yet implemented



    If an expression errors, please provide the code and error message. I would be greatful if you could try to pin-point the problem yourself, almost all errors that can occur are caused by a single instruction, meaning, remove large sections of code until you basically just get a few lines of code left that still causes the error.

    If the expression behaves improperly, please make sure it's not caused by one of the above known issues and then post code, what's wrong and if possible what you think may be causing it.

    (private messages is fine if you don't want to publish your code for others to see)
    Attached Files Attached Files
    Last edited by Syranide; 02-14-2010 at 06:35 AM.

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

    Default Re: Expression2, beta patch release (help with testing)

    Some issues with the patch, I'll provide a new patch a bit later today that should work better!

  3. #3
    Banned kajar9's Avatar
    Join Date
    Jun 2009
    Location
    Estonia
    Posts
    187

    Default Re: Expression2, beta patch release (help with testing)

    tested it out, but i found something weird
    with some sound chips i have on my computer
    But when i spawn them it says infinite loop detected
    In non-patch version it worked fine
    i post one of them here (TETRIS)

    Then the chip-s OPS doesn't work
    always on 0 ops per second, even the most needy ones don't show any
    Attached Files Attached Files

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

    Default Re: Expression2, beta patch release (help with testing)

    Quote Originally Posted by kajar9 View Post
    tested it out, but i found something weird
    with some sound chips i have on my computer
    But when i spawn them it says infinite loop detected
    In non-patch version it worked fine
    i post one of them here (TETRIS)

    Then the chip-s OPS doesn't work
    always on 0 ops per second, even the most needy ones don't show any
    - OPS/PERFORMANCE MONITORING IS NOT YET IMPLEMENTED ... expressions that rely on opscounter()/minquota()/maxquota() to restrict performance will not work.
    So yeah, that's why you get the infinite loop and no ops.

    But thanks!

  5. #5
    Wirererer Hunter234564's Avatar
    Join Date
    Apr 2008
    Location
    Holland
    Posts
    225

    Default Re: Expression2, beta patch release (help with testing)

    Using clamp(NNN) gives me the following error when I spawn the E2, it validates fine:

    Code:
    entities\gmod_wire_expression2\core/e2lib.lua:576: attempt to call global 'ERROR' (a nil value)
    Entire E2 code:
    Code:
     clamp(1,2,3)
    Edit:
    Using exit() gives me:
    Code:
    Expression 2 (Stacker): unknown chunk:5: attempt to read from global scope error
    [eXs] TP Hunter NL: Is there something you didn't make?
    Black Phoenix: you?

  6. #6
    billywitchdoctor.com Whosdr's Avatar
    Join Date
    Dec 2008
    Posts
    2,300

    Default Re: Expression2, beta patch release (help with testing)

    I've got some errors for you.

    Code:
    
    Expression 2 (generic): entities/gmod_wire_expression2/core/core.lua:62: attempt to call upvalue '__f_g' (a nil value)
    sv: Expression 2 (generic): Error(s) occured while executing 'destruct' hook:
    entities/gmod_wire_expression2/core/custom/e2derma.lua:243: attempt to index field '?' (a nil value)
    sv: Expression 2 (generic): entities/gmod_wire_expression2/core/core.lua:62: attempt to call upvalue '__f_g' (a nil value)
    Expression 2 (generic): Error(s) occured while executing 'destruct' hook:
    entities/gmod_wire_expression2/core/custom/e2derma.lua:243: attempt to index field '?' (a nil value)
    native = function()
    local e2fun, extern, iextern = e2fun, extern, iextern
    
    local environment = {}
    setmetatable(environment, {
    __index = function(_, id) error("attempt to read from global scope " .. id, 1) end,
    __newindex = function(_, id) error("attempt to write to global scope " .. id, 1) end,
    })
    setfenv(1, environment)
    
    local self
    local __tmp
    local __vars,__dlts,__clks
    local __f={}
    local __c={}
    
    local __c_0=iextern("abs")
    
    local __f_0=e2fun("op:ass(e)")
    local __f_1=e2fun("entity()")
    local __f_2=e2fun("holoCreate(n)")
    local __f_3=e2fun("holoModelAny(ns)")
    local __f_4=e2fun("holoScaleUnits(nv)")
    local __f_5=e2fun("holoPos(nv)")
    local __f_6=e2fun("toWorld(e:v)")
    local __f_7=e2fun("holoParent(ne)")
    local __f_8=e2fun("holoMaterial(ns)")
    local __f_9=e2fun("holoRenderFX(nn)")
    local __f_a=e2fun("holoColor(nv)")
    local __f_b=e2fun("holoAlpha(nn)")
    local __f_c=e2fun("op:ass(s)")
    local __f_d=e2fun("holoModel(ns)")
    local __f_e=e2fun("interval(n)")
    local __f_f=e2fun("op:eq(ss)")
    local __f_g=e2fun("changed(s)")
    local __f_h=e2fun("sin(n)")
    local __f_i=e2fun("cos(n)")
    
    __c['0']={nil,{function() return 1 end},{function() return "models/props_phx/ball.mdl" end}}
    __c['1']={nil,'Mode',{function() return "charge" end}}
    __c['2']={nil,{function() return __vars['Mode'] end},{function() return "charge" end}}
    __c['3']={nil,{function() return __vars['Mode'] end}}
    __c['4']={nil,{function() return __vars['Z'] end}}
    __c['5']={nil,'Mode',{function() return "charged" end}}
    __c['6']={nil,{function() return __vars['Mode'] end},{function() return "charged" end}}
    
    return function(context)
    self=context
    __vars,__dlts,__clks=self.vars,self.dltvars,self.vclk
    if (self.entity.first == true) then __f_0(self,'E',__f_1(self))
    __f_2(self,1)
    __f_3(self,__c['0'])
    __f_4(self,1,{100, 100, 100})
    __f_5(self,1,__f_6(self,__vars['E'],{0, 0, 80}))
    __f_7(self,1,__vars['E'])
    __f_8(self,1,"models/debug/debugwhite")
    __f_9(self,1,4)
    __f_a(self,1,{255, 0, 0})
    __f_b(self,1,150)
    __f_c(self,__c['1'])
    __f_2(self,2)
    __f_d(self,2,"hqcylinder2")
    __f_4(self,2,{10, 10, 10})
    __f_5(self,2,__f_6(self,__vars['E'],{0, 0, 80}))
    __f_7(self,2,__vars['E'])
    __f_8(self,2,"models/debug/debugwhite")
    __f_a(self,2,{255, 0, 0})
    __f_b(self,2,255)
    end
    __f_e(self,100)
    __vars['Z'] = (__vars['Z'] + 0.1)
    if __f_f(self,__c['2']) then  if (__f_g(self,__c['3']) != 0) then    __vars['Z'] = 0
    end
    __f_a(self,1,{(255 * __f_h(self,__c['4'])), 0, (255 * __f_i(self,__c['4']))})
    if (__c_0(__vars['Z'] - 90) <= 1e-007) then __f_c(self,__c['5'])
    end
    end
    if __f_f(self,__c['6']) then  if (__f_g(self,__c['3']) != 0) then    __vars['Z'] = 0
    end
    __vars['Z'] = (__vars['Z'] + 1)
    end
    end
    end
    On E2 code

    Code:
    @name 
    @inputs 
    @outputs 
    @persist E:entity Mode:string Z
    @trigger 
    @model models/Cerus/Modbridge/Misc/Engines/eng_sq11b.mdl
    if (first()) {
    E = entity()
    
    holoCreate(    1)
    holoModelAny(  1,"models/props_phx/ball.mdl")
    holoScaleUnits(1,vec(100,100,100))
    holoPos(       1,E:toWorld(vec(0,0,80)))
    holoParent(    1,E)
    holoMaterial(  1,"models/debug/debugwhite")
    holoRenderFX(  1,4)
    holoColor(     1,vec(255,0,0))
    holoAlpha(     1,150)
    Mode = "charge"
    
    holoCreate(    2)
    holoModel(     2,"hqcylinder2")
    holoScaleUnits(2,vec(100,100,100))
    holoPos(       2,E:toWorld(vec(0,0,80)))
    holoParent(    2,E)
    holoMaterial(  2,"models/debug/debugwhite")
    holoRenderFX(  2,0)
    holoColor(     2,vec(255,0,0))
    holoAlpha(     2,255)
    
    
    
    }
    interval(100-Z)
    Z += 0.1
    if (Mode == "charge") {
        if (changed(Mode)) {Z = 0}
        holoColor(1,vec(255*sin(Z),0,255*cos(Z)))
        if (Z == 90) {Mode = "charged"}
    }
    
    if (Mode == "charged") {
        if (changed(Mode)) {Z = 0}
        Z += 1
        
        
        
    }
    I would have debugged, but it spammed me with
    Code:
    [ents.Create( "prop_physics" )] This frame you have created 148871136 entities! (Lua Error!?)
    Until my client crashed with no errors.
    .siht daer ot gniyrt emit detsaw ev'uoY

  7. #7
    billywitchdoctor.com Whosdr's Avatar
    Join Date
    Dec 2008
    Posts
    2,300

    Default Re: Expression2, beta patch release (help with testing)

    Bump due to no reply above.
    .siht daer ot gniyrt emit detsaw ev'uoY

  8. #8
    billywitchdoctor.com Whosdr's Avatar
    Join Date
    Dec 2008
    Posts
    2,300

    Default Re: Expression2, beta patch release (help with testing)

    Bump...again.
    Could I have a reply to this, just to say you've seen it or something?
    .siht daer ot gniyrt emit detsaw ev'uoY

  9. #9
    Ursus maritimus Drunkie's Avatar
    Join Date
    Feb 2009
    Location
    Canada
    Posts
    5,662
    Blog Entries
    1

    Default Re: Expression2, beta patch release (help with testing)

    I'm curious, how is this coming along, will it be committed soon?

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

    Default Re: Expression2, beta patch release (help with testing)

    Sorry everyone, I got really busy around the time I posted that patch and haven't really had any time since then. There has not been any further progress due to time and motivation. So I'm sad to say that it's currently on ice, it's mostly in a working state, but there's a couple of new features that has to be added to before it's safe for the public, one being benchmarking all functions/operators which I'm not even quite sure how to do reliably at the moment.

+ Reply to Thread
Page 1 of 2 12 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