BESEN is moved to Google Code http://code.google.com/p/besen/ now. And it's also relicensed as LGPL with static-link-exception now.
BESEN is moved to Google Code http://code.google.com/p/besen/ now. And it's also relicensed as LGPL with static-link-exception now.
Any special reason to move to Google code? Many people are doing it nowadays.
The reasons:
- The SourceForge servers are often very slow, even with my 64mbit/s down 5mbit/s up internet connection here in Germany. Google's server are simply reaction-faster and better load-balanced.
- The whole GoogleCode site (the enduser site backend and the admin web interface) is more cleaner and better usable than SourceForge. And GoogleCode has a nice Wiki integration, what is somewhat better than the stuff at SourceForge, at least for my usage.
- SourceForge forces an additional SSH Layer for R/W SVN Connections over Putty/TortoisePLink under Windows as TortoiseSVN user (and without a option to save the SVN user password, argh omg ), if you upgrade to their new platform version, what I've did, but what was a mistake from me at the end. Short: The SVN usage at GoogleCode is better than at SourceForge. And if you're on SF, then don't upgrade to their new platform version, at least, if you're using a SVN repo for your project.
- And some other smaller not-so-important reasons.
Looks like Sourceforge will lose their position soon...
After testing BESEN a bit, I'm still impressed with your work. Thanks for adding support for FPC 2.4.0.
It works without any problems on my Windows machine, but unfortunately I'm having some issues getting it to work on a Mac.
First off, you something like this
[pascal]
{$ifdef fpc}
{$ifdef darwin}
{$pic off}
{$endif}
...
[/pascal]
since -fPic switch is set by default when compiling on a Mac.
BESEN loads dynamically from libc.so. Well, libc.so doesn't exist on Mac, it's called libc.dylib. So around line 41287 please change it to following:
[pascal]
{$ifdef darwin}
fpmprotect:=dlsym(dlopen('libc.dylib',RTLD_NOW),'m protect');
{$else}
fpmprotect:=dlsym(dlopen('libc.so',RTLD_NOW),'mpro tect');
{$endif}
[/pascal]
With those two changes it compile and BESENTest will at least start when being executed, but as soon as I load any script into the sample, I get this error:
Code:Exception object An unhandled exception occurred at $00043114 : Illegal instruction
I would love to see some more examples especially in regards on how to integrate BESEN into existing applications, like how to access certain aspects of the application from the script and vice versa.
Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)
Programmer: A device for converting coffein into software.
But support for 2.4.0 is only inoffically For example the 64-bit x64/AMD64 codegenerator of FPC 2.4.0 was/is very buggy, so BESEN compiles there only with -O1 or without any code optimizations.Originally Posted by Stoney
FixedOriginally Posted by Stoney
Try the new BESEN.pas from the Sourceforge SVN with -dDisableJIT to disable the JIT testwise, and say me then, if it had work or not. The JIT stuff works at least under Windows and LInux with FPC 2.5.1 and Delphi 7 + Kylix.Originally Posted by Stoney
Yeah, this example stuff comes later.Originally Posted by Stoney
Unfortunately I didn't work with the DisableJIT switch. I still get the same error
Also when I recompile the latest SVN sources I get
Only if I do a clean build (delete all *.o and *.ppu) compilation works without problems.Code:BESEN.pas(19,24) Fatal: Internal error 200208151 Fatal: Compilation aborted
Freeze Development | Elysion Game Framework | Twitter: @Stoney_FD
Check out my new book: Irrlicht 1.7.1 Realtime 3D Engine Beginner's Guide (It's C++ flavored though)
Programmer: A device for converting coffein into software.
Which CPU target? 32-bit x86, 64-bit x64/AMD64, PowerPC, etc.?Originally Posted by Stoney
Maybe you can try to remove the Set8087CW($133f); stuff from the BESENTest.dpr. Or otherwise try to get the exact code line, where the "Illegal instruction" is triggered with the -g parameter to the FPC compiler to generate debug infos for GDB. and then run "./gdb --args ./BESENTEST.dpr myfile.js", type run, and check the output.
Anyway a new version is on the SVN again, some bugs in the RegEx Stuff fixed.
Actually this exception happens with the latest SVN version on all Lazarus/FPC 2.4.1 builds. Not sure exactly what it is, but I know it has to do with Inlining (http://bugs.freepascal.org/view.php?id=15909) typically.BESEN.pas(19,24) Fatal: Internal error 200208151
I posted this to the mail group as well, but I finally started playing with BESEN. Great, excellent, amazing work! Except...
I want to import existing objects that do not inherit from TBESENNativeObject and some that do, and make them accessible to (some/all of) the running scripts . I found that you can register the prototype for a TBESENNativeObject via RegisterNativeObject, but can't figure out how to register the actual instance (btw: how can you create a proper instance of a TBESENNativeObject without passing in the BESEN base?) I'm guessing this is done via RegisterNativeFunction for instances that derive from TBESENNativeObject, but can't figure out the exact details.
So, in short, lets say I have a playing field that has "smart objects" placed on it. Each object has a script assigned to it, and there is a global master script that needs access to these objects as well. How do I achieve this?
This brings me to a great example app that could be put together: Tic-Tac-Toe. Two separate AI scripts loaded and one "master" script loaded. Each AI gets ran for 1 turn, then the master gets ran to check game state and report back. The game board is a standard object and each "player" is a TBESENNativeObject.
This would should most scenarios where you need to interface with existing and custom objects.
Thanks, and hopefully someone is still reading this thread,
- Jeremy
- Jeremy
http://www.eonclash.com/
PPS: If you want to get rid of the error building with Lazarus on the latest version, change line 160 to:BESEN.pas(19,24) Fatal: Internal error 200208151
This removes the inlining (slowing down execution a bit) and lets you do a regular build with no exceptions.Code:{.$define caninline}
- Jeremy
- Jeremy
http://www.eonclash.com/
Bookmarks