YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

SqPlus, and the next level...
benjamin
#1 Posted : Thursday, September 08, 2005 11:02:28 AM(UTC)
Rank: Member

Groups: Registered
Joined: 9/8/2005(UTC)
Posts: 7

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I have to say, and have been saying for a long time, that having to hand code this stuff (as is done in SquirrelPlus or DXSquirrel), is extremely laborious. Not to mention its extremely error prone when most of this code is just basic plumbing that requires no brain at all. Its easy to make mistakes here.


There needs to be somekind of way to automate it. Yes, I agree that you don't always want a 1:1 mapping to C++, but a lot of times you do, or if anything, you want the ability to automatically generate the bindings for some arbitrary subset of your C++ API.


The closest thing that has come to doing this has been SQUADD. I hoped SQUADD would be the holy grail here but it has gone through numerous revisions and doesn't have any documentation. Plus there are a lot of edge cases with C++ class types (inheritence, etc.) that seemed to have trouble.


As it is now, SqPlus to me is not really any better than binding everything by hand without any helper library. Hopefully someone will take the next step and take SqPlus to the template generation level at least as an option. Until then I still have not been able to fully integrate Squirrel into my projects, it just takes way too much time to do this stuff by hand, and its error prone.


Sorry for complaining :(

John Schultz
#2 Posted : Thursday, September 08, 2005 6:13:22 PM(UTC)
Rank: Member

Groups: Registered
Joined: 6/24/2005(UTC)
Posts: 241

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Did you try the latest version of SqPlus? I recently added code to ease binding functions and variables. When using the arg-type string, type checking will be performed automatically. An agreement with your complaint is that one must type out all of the arg passing to the C/C++ function (sa.GetInt(), etc.) when it could be automated via a lightweight template system.



LuaPlus's template-based Call Dispatcher is only ~1000 lines of code (much of it is replicated for various arg cases (1-7 args)). Additional code would be required from LuaObject.h (fairly small). An expert in Lua/Squirrel should be able to port the code in a few hours. The end result would be a useful lightweight+fast template-based system (as opposed to a much more complicated+large boost-based method (which would still be useful to users, but would require a greater effort))).



John
benjamin
#3 Posted : Friday, September 09, 2005 9:24:13 AM(UTC)
Rank: Member

Groups: Registered
Joined: 9/8/2005(UTC)
Posts: 7

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
Yeah I guess I am a bit bummed that Squirrel has not developed a following large enough to have someone do this yet. Its been a long time coming. I see Squirrel as being a lot better than Lua in terms of syntax and even features, but Lua has become like a blind religion, and this was going on even when it had obvious perofrmance impacts due to its garbage collection scheme.


I think Squadd was based on boost stuff, so I agree that something simpler is needed like LuaPlus.

fagiano
#4 Posted : Sunday, September 11, 2005 3:03:25 AM(UTC)
Rank: Advanced Member

Groups: Registered, Administrators
Joined: 6/11/2005(UTC)
Posts: 825

Thanks: 0 times
Was thanked: 36 time(s) in 29 post(s)
[quote user="benjamin"]
Yeah I guess I am a bit bummed that Squirrel has not developed a following large enough to have someone do this yet. Its been a long time coming. I see Squirrel as being a lot better than Lua in terms of syntax and even features, but Lua has become like a blind religion, and this was going on even when it had obvious perofrmance impacts due to its garbage collection scheme.


[/quote]


Partially is my fault, I never put any effort trying evangelize Squirrel. However is the ploblem of the chicken and the egg, if there isn't a big followup people wont write extensions etc.. and vice versa if there are enough tool people wont feel like joining the community.


Lua is 13 years old, if you look at its community grow rate, was kinda the same as squirrel now(2 years old). Squirrel is probably doing even better.


ciao


Alberto


 

benjamin
#5 Posted : Sunday, September 11, 2005 6:15:50 AM(UTC)
Rank: Member

Groups: Registered
Joined: 9/8/2005(UTC)
Posts: 7

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I understand, you've been more than generous in the first place. The only thig I can see you doing at this point is maybe releasing NutPad? To help knock down the debugging barriar in Squirrel. Did your company ever say if it was ok for you to do that?



At this point I don't have the time to muddle through LuaPlus and hack something together, I'd be willing to pay someone to do it and release it to the community as open source. If anyone feels like they can do a solid implementation of what we're talking about, get back to me, and let's talk. Squirrel needs a boost (no pun intended).
John Schultz
#6 Posted : Sunday, September 11, 2005 8:55:46 AM(UTC)
Rank: Member

Groups: Registered
Joined: 6/24/2005(UTC)
Posts: 241

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
[quote user="benjamin"]I understand, you've been more than generous in the first place. The only thig I can see you doing at this point is maybe releasing NutPad? To help knock down the debugging barriar in Squirrel. Did your company ever say if it was ok for you to do that?

[/quote]



It appears a Java/Eclipse-based debugger will be available in about a week (depending on developer party factors ;-) ).



[quote user="benjamin"]

At this point I don't have the time to muddle through LuaPlus and hack something together, I'd be willing to pay someone to do it and release it to the community as open source. If anyone feels like they can do a solid implementation of what we're talking about, get back to me, and let's talk. Squirrel needs a boost (no pun intended).

[/quote]



Perhaps shoot Joshua Jensen an email about porting LuaPlus (or elements thereof) to Squirrel. Since Squirrel is similar to Lua (and Joshua knows LuaPlus better than anyone), he would be able to do it quickly.



John
fagiano
#7 Posted : Sunday, September 11, 2005 9:52:09 AM(UTC)
Rank: Advanced Member

Groups: Registered, Administrators
Joined: 6/11/2005(UTC)
Posts: 825

Thanks: 0 times
Was thanked: 36 time(s) in 29 post(s)
Joshua Jensen contacted me a bit more than a year ago, proposing to do something like LuaPlus with squirrel. However is intention was to merge the code base and I disagreed. So he went back to his own path. To me seems that LuaPlus and luarc are inspired by squirrel's memory management(I even read some JJ post on lua's mailing list discussing squirrel's memory model).


If something like LuaPlus happens for squirrel, it wont 'pollute' the language core. However I'm fine to tweak squirrel's API to match a bit more a ipotetical library(if strictly needed). I'm also fine of putting it on squirrel's sourceforge project/website, as separated package. I also suggest to not call it SQPlus sounds too much like a clone, I can alredy ear people saying "but luaplus does it this way...bla bla".


Btw, I took a look at LuaPlus templates etc... and I must say isn't really my style, I still prefer a light weight macro approach. But well that's just me I guess, I'm not a bit fan of metaprogramming in C++.


ciao


Alberto

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.144 seconds.