This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Lysis: An experimental .smx decompiler


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 11-02-2011 , 00:58   Re: Lysis: An experimental .smx decompiler
Reply With Quote #1

Quote:
Originally Posted by BAILOPAN View Post
Ideally SourceMod would load source files instead of .smx files. This is doable but a large project that would require everyone change their server installs.

Unfortunately, anything less than that could be faked or obfuscated (you can obfuscate source anyway - but it's also easy to de-obfuscate).
Couldn't a SM Cvar be implemented to make the transition to load plugins via source files instead of .smx - that way it's not just a huge shot gun blast change... it's an option that server admins could choose to use...

sm_sourceplugins 1/0 (use source code to load plugins = 1)

Last edited by TnTSCS; 11-02-2011 at 00:58.
TnTSCS is offline
1nsane
SourceMod Donor
Join Date: Sep 2005
Old 12-05-2011 , 19:37   Re: Lysis: An experimental .smx decompiler
Reply With Quote #2

Quote:
Originally Posted by BAILOPAN View Post
Ideally SourceMod would load source files instead of .smx files. This is doable but a large project that would require everyone change their server installs.

Unfortunately, anything less than that could be faked or obfuscated (you can obfuscate source anyway - but it's also easy to de-obfuscate).
I just hope you won't be completely breaking backwards compatibility by requiring the source to load plugins. This won't stop the license violators. Instead they will move on to something that is much harder to decompile and will break easier (which is a bonus in the case of payed plugins).

If you can use sourcepawn you can easily earn how to edit the sample extension to do what you want and still violate the license.

Also you'll have a lot of complaints from people who lost the source to their plugins or used alternate versions of plugins.

In the end, you'd be doing a favor to someone like me. Because I keep the sources to all of the plugins that I use and could easily adapt to this change. While other people might end up partially or completely disabled .

But still, I can't pretend it's a good thing just because it benefits me.

EDIT:
I know this was posted a long time ago on your blog, but wasn't there a considerable performance (speed) benefit in using precompiled files compared to plain source files that evenscripts uses?

Last edited by 1nsane; 12-05-2011 at 19:39.
1nsane is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 12-06-2011 , 16:09   Re: Lysis: An experimental .smx decompiler
Reply With Quote #3

The source would still be compiled by SourceMod internally, so it wouldn't make any difference in performance.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 12-06-2011 at 16:09.
rhelgeby is offline
Send a message via MSN to rhelgeby
BAILOPAN
Join Date: Jan 2004
Old 12-07-2011 , 22:05   Re: Lysis: An experimental .smx decompiler
Reply With Quote #4

Quote:
Originally Posted by 1nsane View Post
I just hope you won't be completely breaking backwards compatibility by requiring the source to load plugins. This won't stop the license violators. Instead they will move on to something that is much harder to decompile and will break easier (which is a bonus in the case of payed plugins).
This isn't my decision to make. I don't have any strong opinion, except that it's best not to anger users - and if users want to keep running existing binary plugins, that's important.

It would stop naive license violation. If violators move on to C++ - great. No one wants to maintain or install C++ addons besides, SM extensions don't offer big advantages over MM:S plugins.

Quote:
Originally Posted by 1nsane View Post
Also you'll have a lot of complaints from people who lost the source to their plugins or used alternate versions of plugins.
Yeah, that is a totally legitimate concern. That alone is enough of a reason to nix breaking compatibility.

Quote:
Originally Posted by 1nsane View Post
But still, I can't pretend it's a good thing just because it benefits me.
I like this attitude!

Quote:
Originally Posted by 1nsane View Post
I know this was posted a long time ago on your blog, but wasn't there a considerable performance (speed) benefit in using precompiled files compared to plain source files that evenscripts uses?
Believe it or not, compiling from source would let us eek out - I'm estimating - another 2-3X in general Pawn performance. Loading bits out of a binary is very restrictive, you have to obey exactly what the bits say. If we loaded from source, we'd have the freedom to make all sorts of optimizations that are currently not possible.

(This is not categorically true - we could also introduce a new binary format, but the amount of work required is the same. You need a new compiler.)
__________________
egg

Last edited by BAILOPAN; 12-07-2011 at 22:07.
BAILOPAN is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-08-2011 , 11:13   Re: Lysis: An experimental .smx decompiler
Reply With Quote #5

Quote:
Originally Posted by BAILOPAN View Post
No one wants to maintain or install C++ addons besides, SM extensions don't offer big advantages over MM:S plugins.
It doesn't help that SourceMod's Extension interfaces are missing a lot of what we take for granted in plugins. Heck, HintText didn't even exist until 1.4!

I'm only saying this because APIs are better to write in C++ than SourcePawn, just because you can create type-safe Handles in the C++ API side, while you can't on the SoucePawn side.

Incidentally, the handles thing plus the lack of multi-dimension array passing through natives in SourcePawn is why BuiltinVotes is in C++ and not SourcePawn.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-08-2011 at 11:13.
Powerlord is offline
BAILOPAN
Join Date: Jan 2004
Old 12-09-2011 , 02:16   Re: Lysis: An experimental .smx decompiler
Reply With Quote #6

Quote:
Originally Posted by Powerlord View Post
I'm only saying this because APIs are better to write in C++ than SourcePawn, just because you can create type-safe Handles in the C++ API side
I can't immediately see the motivation for creating Handles from Pawn, since Pawn cannot create its own heap-allocated data structures. Deriving new Handle types from existing ones from Pawn - sure. But, for example, C++ needs to hook into CloseHandle to free memory, and that doesn't make much sense for Pawn.

And you don't need to override Handles to get similar safety properties. You can re-tag, and introduce your own alternative to CloseHandle (for example, VoteThing:, DestroyVoteThing).

Quote:
Originally Posted by Powerlord View Post
plus the lack of multi-dimension array passing through natives in SourcePawn
You mean, local arrays, and not ADT arrays? For Pawn<->Pawn you should use ADT arrays. It's difficult to marshal 2D local arrays in the current VM because they have to be copied between the plugin's memory spaces. This restriction is deeply embedded into the VM, but could be removed with a little effort.

Writing extensions in C++ is a huge burden (on you, your users, and even the SM maintainers) - sometimes it's necessary, when embedding 3rd-party libraries or needing complex datastructures not exposed to Pawn. But ideally, the language and Core functionality could be improved to obviate the need. I didn't realize this when first designing SourceMod, and thus the extension system is fairly powerful. In retrospect, we should have focused on interop and FFI.
__________________
egg

Last edited by BAILOPAN; 12-09-2011 at 02:18.
BAILOPAN is offline
BAILOPAN
Join Date: Jan 2004
Old 11-02-2011 , 02:45   Re: Lysis: An experimental .smx decompiler
Reply With Quote #7

Something like that could work, though there isn't much motivation for people to choose that unless they're installing SourceMod for the first time. Maybe I'm wrong there. Generally people don't like radical changes, so you have to sweeten the pot by offering them something really good at the same time.
__________________
egg

Last edited by BAILOPAN; 11-02-2011 at 02:47.
BAILOPAN is offline
sinblaster
Grim Reaper
Join Date: Feb 2010
Location: Australia
Old 11-02-2011 , 16:53   Re: Lysis: An experimental .smx decompiler
Reply With Quote #8

Quote:
Originally Posted by BAILOPAN View Post
changes, so you have to sweeten the pot by offering them something really good at the same time.
Like Steak Knives?
__________________
Happy Happy Joy Joy

sinblaster is offline
necavi
Veteran Member
Join Date: Sep 2010
Old 11-02-2011 , 02:55   Re: Lysis: An experimental .smx decompiler
Reply With Quote #9

Yeah...most plugins release their sourcecode right now, and the ones that don't become a lot easier to fix up/replace, thanks to lysis.
necavi is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 11-02-2011 , 11:49   Re: Lysis: An experimental .smx decompiler
Reply With Quote #10

I like the idea of running them from source code - and with the compiler being 5x faster, it's that much sweeter
TnTSCS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode