Re: [fpc-pascal] Javascript in Desktop Applications
Am 07.02.2011 15:16, schrieb Andrew Brunner: On Mon, Feb 7, 2011 at 7:35 AM, wrote: A cross-platform solution is to use one of libsee or BESEN. The latter is implemented in 100% native Object Pascal. Michael. BESEN is very, very, very well written but I can't seem to get any indication how to use it in my project. I would love FPC to include a JIT system for JS or Pascal. IMO, FPC absolutely needs a scripting FCL going forward. BESEN seems like the right guy for the job, but I suspect he's burned out :-( I think he had memory concerns too. Does anyone have any BESEN examples that integrated actual FPC units? It seems like all the samle js units are self contained with no interface to system or GUI units. Including JS support on my project would enable people to leverage exiting "proven" technologies which would make for easier/allowable for adoption in working groups / houses where selection of language is restricted to language of the day :-) Taking this statment and applying this across the board, it would be an easier sell for adoption of FPC/Lazarus with JIT support. Personally, I'm thinking along the lines of Web RAD down the road... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal Have you looked at the BESENShell.dpr/BESENShell.lpr? Because that contains the most important part, how you can integrate own API stuff. And the last commit to the BESEN SVN was just a few days ago with a few weeks pause, because I've found no bugs and got no bugreports in that time. Benjamin 'BeRo' Rosseaux ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help with synapse mime routines...
Hi Waldo, I have now got the units so I can build and test your code properly. The reason you are getting the exception is that when you free m1 at line 66 you are not freeing the m1 you created at line 44, but the subpart belonging to m. This means that when you finally free m it is trying to free all the objects (mime parts) that it owns including the one you already freed at line 66. If you declare an m2 and use it at line 49 and 50 instead of the m1 all will be well. You have to watch out for objects that are owned by other objects or horrible things will happen! Regards Kevin Jesshope - In Touch Computer Support >> can anyone assist with the reason for the exception?? i'm using the last >> release code of synapse (download zip archive) with FPC 2.4.3... currently >> on win32... >> > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Android calling JNI functions crash
On 15.2.2011 9:57, Felipe Monteiro de Carvalho wrote: No idea, I always use Linux, but if no-one has a better idea, I would suggest that you try first using the linux cross-compiler, just to check if the crash is really related to the binutils. There are some instructions here: http://wiki.lazarus.freepascal.org/Android_Interface#Configuring_the_Free_Pascal_Compiler_for_Android I've successfully created a win32 crosscompiler. It was a matter of passing the right parameters to as and ld which required creating hook scripts (actually programs), and using the appropriate binutils, in this case YAGARTO, but CodeSourcery ones should work too (did not test). Luckily, Benjamin Rosseaux helped me with this or I've would have been stuck at for longer. For gnu as I've passed the following parameters in the as hookscript '-march=armv6 -meabi=5' and of course when compiling the crosscompiler and programs the '-CpARMv6 -CfSOFT' parameters need to be passed to fpc. I don't think there are any special parameters required for ld, at least not for ARMv6 CPUs. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help with synapse mime routines...
On 2/16/2011 23:39, Kevin Jesshope wrote: Hi Waldo, I don't have the mimepart or synaser units available at the moment so without actually compiling the code I am not certain the following observations are the cause of your trouble. They are however somewhere to start. 1 In line 63 you are checking to see if m1 is nil to see if the object has already been freed. This will not work as Free does not set the var to nil. Use FreeAndNil(m1) instead to acheive that. yes, that was a flailing attempt to try to bypass the free that apparently shouldn't be... i'll remove that... or, i think i see what you are saying... if i use freeandnil instead of the current m1.free, then the nil test might work and show me that the object is really already gone... i'll try that in addition to the below... 2 In line 49 you are assigning m1 := m.GetSubPart(MyPart - 1) so when you go to free m1, expecting to free the m1 created in line 44, you are in fact freeing the result from the GetSubPart function. right... i'm thinking that m1 should contain only the indicated MIME part from m... ahhh! so what you are saying is that i do not need to explicitly create m1 before assigning m.GetSubPart to it... hummm... but then i have to wonder why it works the first time and not the second? the process does show the proper mime parts, one text/plain and the other text/html... i think i'll manually add a third part to the test message i'm processing and see if i still get the failure on the second one or if it then moves to the third one... i'll do this in addition to testing the above possibility... You have lost the reference you had to the original TMimePart created at line 44. Declare and use say m2 to fix this one. i think the above is one of the main clues... i'll try it out and see what happens... Regards Kevin Jesshope - In Touch Computer Support can anyone assist with the reason for the exception?? i'm using the last release code of synapse (download zip archive) with FPC 2.4.3... currently on win32... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help with synapse mime routines...
On 2/17/2011 08:32, Kevin Jesshope wrote: Hi Waldo, I have now got the units so I can build and test your code properly. The reason you are getting the exception is that when you free m1 at line 66 you are not freeing the m1 you created at line 44, but the subpart belonging to m. This means that when you finally free m it is trying to free all the objects (mime parts) that it owns including the one you already freed at line 66. If you declare an m2 and use it at line 49 and 50 instead of the m1 all will be well. i will follow along with this and see what happens... thanks!! You have to watch out for objects that are owned by other objects or horrible things will happen! so i'm finding out! thanks for the assist... and to think, i'm wading into this thinking that it would be easier than what i was trying to develop to extract the text/plain mime section :) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Name of the programming language used in/with FPC
On 16 February 2011 16:51, leledumbo wrote: > > Yeah, he let Pascal in the last state he worked on. But don't you know he's > also an actor behind (Apple's) Object Pascal? > -- > View this message in context: > http://free-pascal-general.1045716.n5.nabble.com/Name-of-the-programming-language-used-in-with-FPC-tp3375543p3387995.html > Sent from the Free Pascal - General mailing list archive at Nabble.com. > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > How about Dijkstra? This will focus minds our wonderfully and will lead us to ensure that our programs are derived correctly from precise unambiguous semantically sound specifications. . I mean, we can't call our language Dijkstra and write buggy programs, can we? We should consider it a challenge. Let the voting begin!! -- Frank Church === http://devblog.brahmancreations.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Name of the programming language used in/with FPC
On 2/17/11 12:04 PM, Frank Church wrote: How about Dijkstra? Where can I send a letter to the editor saying "Naming the language Dijkstra is considered harmful." ;) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Name of the programming language used in/with FPC
Philippe Kahn did more for Pascal then Dijkstra. He expanded it and made it soo cheaply available that it was an instant winner. Regards / Cees On 02/17/2011 07:32 PM, Doug Chamberlin wrote: > On 2/17/11 12:04 PM, Frank Church wrote: >> How about Dijkstra? > Where can I send a letter to the editor saying "Naming the language > Dijkstra is considered harmful." ;) > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Name of the programming language used in/with FPC
On Thu, 17 Feb 2011, Cees Binkhorst wrote: Philippe Kahn did more for Pascal then Dijkstra. He expanded it and made it soo cheaply available that it was an instant winner. ...and Borland/Inprise squandered the lead. g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.simpits.org/geneb - The Me-109F/X Project ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Name of the programming language used in/with FPC
That was the time the professional managers took over. Fuller was his name if my memory is correct. They allowed Anders Hejlsberg to be bought by MS (signing bonus), while 'the managers' took hefty bonuses and shares (which Anders did not get, while he was the brains, and they only the suites). Regards / Cees On 02/17/2011 10:01 PM, Gene Buckle wrote: > On Thu, 17 Feb 2011, Cees Binkhorst wrote: > >> Philippe Kahn did more for Pascal then Dijkstra. >> >> He expanded it and made it soo cheaply available that it was an instant >> winner. >> > ...and Borland/Inprise squandered the lead. > > g. > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Name of the programming language used in/with FPC
On Thu, 17 Feb 2011, Cees Binkhorst wrote: That was the time the professional managers took over. Fuller was his name if my memory is correct. They allowed Anders Hejlsberg to be bought by MS (signing bonus), while 'the managers' took hefty bonuses and shares (which Anders did not get, while he was the brains, and they only the suites). Yep. Any time you've got accountants running a technology company, you've got a failed company that doesn't know it yet. g. -- Proud owner of F-15C 80-0007 http://www.f15sim.com - The only one of its kind. http://www.simpits.org/geneb - The Me-109F/X Project ScarletDME - The red hot Data Management Environment A Multi-Value database for the masses, not the classes. http://www.scarletdme.org - Get it _today_! Political correctness is a doctrine, fostered by a delusional, illogical minority, and rabidly promoted by an unscrupulous mainstream media, which holds forth the proposition that it is entirely possible to pick up a turd by the clean end. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Name of the programming language used in/with FPC
On 17 Feb 2011, at 22:48, Gene Buckle wrote: > Yep. Any time you've got accountants running a technology company, you've > got a failed company that doesn't know it yet. I believe this discussion has ended up well into the territory of the fpc-other list now... :) Thanks, Jonas FPC mailing lists admin___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help with synapse mime routines...
Waldo, You are assigning an OnWalkPart hook procedure to the m1 mimepart you have created, not the mimepart you actually end up freeing. It does not look like the tc.ph procedure is called from the m1 mimeparts (which is what I would expect). If you do need to use the tc.ph on the individual m1 parts, it will need to be setup after m1 := m.GetSubPart(MyPart - 1); The code does not actually use the first m1 so it could be removed including the try finally and the free code. You will also need to remove the m1 := m.GetSubPart(MyPart - 1) line too. The reason that it works the first time is that when you enter the loop m1 is valid. you then set the hook proc up even though this is not the m1 you actually end up using. You then assign a new mimepart to m1, use it and free it at the end of the loop. Second time through, m1 refers to the mimepart for the first sub part which you just freed at the end of the loop and you attempt to use that mimpart to set the hook again but as it has already been freed you get the exception. I think I have that right. I am working from memory now as I do not have the code before me. Regards Kevin Jesshope - In Touch Computer Support >>> can anyone assist with the reason for the exception?? i'm using the last >>> release code of synapse (download zip archive) with FPC 2.4.3... >>> currently >>> on win32... >>> >> ___ >> fpc-pascal maillist - fpc-pascal@lists.freepascal.org >> http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help with synapse mime routines...
On 2/17/2011 18:16, Kevin Jesshope wrote: [TRIM] I think I have that right. I am working from memory now as I do not have the code before me. i wanted to thank you again.. you gave me some hints that enabled me to propel myself much further than i've gone in the last week of floundering... in fact, i've reverse my flow process somewhat and now have a working win32 tool... YAY! but the real destination platform is OS/2, OS/2 EMX or "pure" DOS on OS/2... my next problem is to get it compiling on my OS/2 box with FPC 2.4.2 and so far, that is not working... complaints of missing units and include files that i just don't know where to tell the compiler to look for... my development has been on a winXP box with the FPC 2.4.3 code pulled from SVN along with Lazarus code... however, i've not been working in the Lazarus environment at all... i pulled this and compiled it by following the instructions on the FPC wiki... on my OS/2 box, i've tried targets of OS2 and OS2 with EMX but both have failed all kinds of ways... i suspect that it is simply to do with the paths to the units and include files... i have been able to get something going somewhat but then run into masses of "duplicate identifier" errors... i'm just not sure where to turn now so out of frustration, i'm now pulling down the dos242full.zip of FPC and will be installing that to another directory on the OS/2 box... then it should be a simple matter of copying the project to another directory in there and giving it a kick in the arse to see what happens... hopefully i'll end up with a workable executable and my project with be, basically, at the end :) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] help with synapse mime routines...
Good luck with the other OSs. At this time I am only doing Win32 but I am sure there are others here who can help if you ask. Regards Kevin Jesshope - In Touch Computer Support > on my OS/2 box, i've tried targets of OS2 and OS2 with EMX but both have > failed all kinds of ways... i suspect that it is simply to do with the paths > to the units and include files... i have been able to get something going > somewhat but then run into masses of "duplicate identifier" errors... > > i'm just not sure where to turn now so out of frustration, i'm now pulling > down the dos242full.zip of FPC and will be installing that to another > directory on the OS/2 box... then it should be a simple matter of copying > the project to another directory in there and giving it a kick in the arse > to see what happens... hopefully i'll end up with a workable executable and > my project with be, basically, at the end :) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal