• vON: Vercas' Object Notation [Release for developers]
    112 replies, posted
Can you please add version numbers to the top of the release and a change log on the OP with correlating version numbers? Would make it easier to ensure our copies are up to date.
[QUOTE=Remscar;36644400]Can you please add version numbers to the top of the release and a change log on the OP with correlating version numbers? Would make it easier to ensure our copies are up to date.[/QUOTE] Ah, okay. I shall do so right now. I'll call the current version number one. I will also declare the GMod development version a stable one.
Got an error on line 537. "Attempt to get length of a nil value" I thought you had fixed nil the nil value error.
[QUOTE=Remscar;37045856]Got an error on line 537. "Attempt to get length of a nil value" I thought you had fixed nil the nil value error.[/QUOTE] [code]_d_meta = { __call = function(self, str) return _d_table(str, nil, #str, true) -- this is line 537 end }[/code] You are trying to deserialize a nil value. It should be a string. Perhaps I should add error checking... [b]Edit[/b]: [I]2012.08.02 8:55[/I] - Version 1.1.0 - Fixed errors on Angle and Vector deserialization saying they're entities. - Added errors when trying to (de)serialize the wong types. - Fixed GLua version's distribution link pointing to the pure Lua version. - Added Player data type to the GLua version. Players are saved by their entity ID. - Removed two redundant arguments in the deserialization functable.
[QUOTE=vercas;37046968][code]_d_meta = { __call = function(self, str) return _d_table(str, nil, #str, true) -- this is line 537 end }[/code] You are trying to deserialize a nil value. It should be a string. Perhaps I should add error checking... [b]Edit[/b]: [I]2012.08.02 8:55[/I] - Version 1.1.0 - Fixed errors on Angle and Vector deserialization saying they're entities. - Added errors when trying to (de)serialize the wong types. - Fixed GLua version's distribution link pointing to the pure Lua version. - Added Player data type to the GLua version. Players are saved by their entity ID. - Removed two redundant arguments in the deserialization functable.[/QUOTE] Yeah i should, only be doing that, but sometimes i pass a nil value on. I had manually added a if type(str) != "string" then str = "" end or something like that.... Time2Sleep
Looks neat, probably going to use this from now on.
Nice
Could I have this moved to [I]Gamemodes & Addons[/I]?
I updated this. Can I haz it moved now? :downs:
You probably should mark this as solved and recreate the thread in the correct section.
Vercas don't hate but I just made a pull request on Von's GitHub page that makes it way faster, my username is ThatItalianGuy P.S: You're now faster then pON ;)
[QUOTE=Crazycarpet69;44717376]Vercas don't hate but I just made a pull request on Von's GitHub page that makes it way faster, my username is ThatItalianGuy P.S: You're now faster then pON ;)[/QUOTE] I benchmarked that, and you are right. It takes only half the time to write those now! I will add those ASAP. [editline]asd[/editline]: Actually, no, that only works well with integers. If I switch to flats or compact floats (%f or %g), it is slower than simple concatenation. This helps with references and entities, but not with numbers, vectors or angles. [editline]asdf[/editline]: %X is actually faster than %i for integers, and the output is more compact as well...
[QUOTE=vercas;44718660]I benchmarked that, and you are right. It takes only half the time to write those now! I will add those ASAP. [editline]asd[/editline]: Actually, no, that only works well with integers. If I switch to flats or compact floats (%f or %g), it is slower than simple concatenation. This helps with references and entities, but not with numbers, vectors or angles. [editline]asdf[/editline]: %X is actually faster than %i for integers, and the output is more compact as well...[/QUOTE] Yeah, sorry man I did it well driving home yesterday, didn't even test it. I more just threw it your way because I used to use vON when I wrote stuff for Garry's Mod. Anyways change whatever and good luck ;) [editline]asdf[/editline]: To those who "Disliked" please actually test things before you hate.
What are the benchmark speeds now? :( this means I'll have to start optimizing again... Time to inline every function call me thinks.
[QUOTE=thelastpenguin;44721618]What are the benchmark speeds now? :( this means I'll have to start optimizing again... Time to inline every function call me thinks.[/QUOTE] I don't know about them in Garry's Mod... but in my engine it was almost 50% faster then before.
Question. I want to create an addon based on vON, so in addonname/lua folder will be some vendors/von/von.lua and I want to use latest version of it, but some people may use outdated versions, so is it backward-compatibility? Won't their old addons face errors?
[QUOTE=Koji6ac9H;51136255]Question. I want to create an addon based on vON, so in addonname/lua folder will be some vendors/von/von.lua and I want to use latest version of it, but some people may use outdated versions, so is it backward-compatibility? Won't their old addons face errors?[/QUOTE] It's up to you to make sure [I]your[/I] version doesn't conflict with somebody else's. Also, you can find it [URL="https://github.com/vercas/vON/blob/master/von.lua"]here on GitHub[/URL]. On an unrelated note, I believe you necroposted.
[QUOTE=vercas;51136259]It's up to you to make sure [I]your[/I] version doesn't conflict with somebody else's. Also, you can find it [URL="https://github.com/vercas/vON/blob/master/von.lua"]here on GitHub[/URL]. On an unrelated note, I believe you necroposted.[/QUOTE] Ofc I get latest from GitHub. How should I know which version others use? I mean if I create an addon which requires vON, so I need to be sure that server which will use that addon have vON, so I have to include it in my script, but if he already has one, it will override his old version with my new one, and I concern about will it cause errors on older scripts that used old vON and won't work with new that I bring with my addon
[QUOTE=Koji6ac9H;51136710]Ofc I get latest from GitHub. How should I know which version others use? I mean if I create an addon which requires vON, so I need to be sure that server which will use that addon have vON, so I have to include it in my script, but if he already has one, it will override his old version with my new one, and I concern about will it cause errors on older scripts that used old vON and won't work with new that I bring with my addon[/QUOTE] You just get the latest and change the line that says... [code]von = [/code] ... to ... [code]my.own.von = [/code]
5 May 2014 >I will commit soon with lots of changes, including an adaptation of this. 2 Oct 2016 >nil ] lua_run print(similar( vercas, Gaben )) true
[QUOTE=uRandomAlex;51140088]5 May 2014 >I will commit soon with lots of changes, including an adaptation of this. 2 Oct 2016 >nil ] lua_run print(similar( vercas, Gaben )) true[/QUOTE] So fork it.
Instead of bumping 4 years old thread you can use pON. It was updated 2 months ago, you know. [url]https://facepunch.com/showthread.php?t=1367349[/url]
[QUOTE=iJohnny;51141760]Instead of bumping 4 years old thread you can use pON. It was updated 2 months ago, you know. [url]https://facepunch.com/showthread.php?t=1367349[/url][/QUOTE] And vON is working and stable for 4 years. :smug:
Sorry, you need to Log In to post a reply to this thread.