You are not logged in.
Pages: 1
I'd like to present the preview of new initiative (and maybe foundation) to support mORMot and other mostly used open source Pascal projects/libraries with recent FPC trunk version (tested in production) tuned for mORMot purposes . It works even on pendrive - just unpack in any location and have fun. mORMot integration is in progress. All is based on github infrastructure. Any suggestions/propositions are welcome!
best regards,
Maciej Izak
Offline
I Maciej.
Nice to see this new website.
The github infrastructure integration is a great plus.
We may have to follow the following comment on Google +:
I think it'll be help to point out that this lazarus/fpc distribution
a) has ready-to-use cross-compile setup,
b) Supports enhanced rtti needed by the mORMot framework, if I understand it correctly.
But cross-compiler is not included yet - which may have been a huge plus, e.g. cross-compile from Windows to Linux, and vice-versa.
I've also sent you a private email for discussion.
Offline
@ab, hey! That's my comment Yes, I'm Edwin Yip
PS, IIRC the fpc/lazarus distribution I downloaded from @AOG's Google Drive does have cross-compile support, isn't the one provided by newpascal.org the same version by @AOG?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
@edwinsn
No, its not (yet) the same.
But I think the main goal for NewPascal will be to get rid of the framentation and bring everything (and everybody) together.
So, I will work together with the NewPascal founders to have one access point for a FPC that is, among other features, tailored to run the mORMot on all platforms.
Cross-compile support will be included naturally !
Stay tuned.
Offline
b) Supports enhanced rtti needed by the mORMot framework, if I understand it correctly.
Ready thanks to patch from AOG
newpascalpack 1.0.3:
http://newpasca.org
https://github.com/dathox/newpascalpack/releases
best regards,
Maciej Izak
Offline
Well done AGO and hnb
BTW, I think it's necessary to include some release notes, for example, this release should include the notes about the inclusion of the enhanced RTTI.
Just a suggestion
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Actually, you should port mORMot for FPC, not vice-versa.
Regards,
Offline
@ab
No, that is not the issue, sorry ... It's just full of tricks which just don't work on FPC It can't work reliably on the same OS/Arch (Win/x86). It is up to my regret, too
Offline
It's nice to see that something is happening with FPC to bring it closer to Delphi developers. Hope it won't end up as big as CodeTyphon - though CT is a lot better than native FPC for me, it takes "a while" to make it ready to use.
Anyway good luck with this project
dc
Offline
@ab
I'm sure my experience it is not of big concern, and you may skip this, but after almost 2yrs using mORMot the recap is as follows:
I'm stuck with Laz1.4.4, FPC 2.6.4. Newer FPC versions breaks my projects by itself (you probably know why).
You're pushing hard for the FPC IF RTTI, your new revisions are not compatible with 2.6.4 (but you still keep them compatible with D7).
You're fixing bugs in the main trunk (AFAIK) together with the improvements, no separate branch for LTS.
Since lot of efforts were made to make it quicker, a lot of inline x86 assembly was put in the way. Slight chances to make it work on other OS/same arch, no chances to work on a different processor. There are full-blown Linux servers with other archs than x86, lot more stable and secure.
There is other subtle nuisances from the speed optimizations which makes me to believe that mORMot will not be easily ported, if ported at all.
And that is why I said It is up to my regret, too
IMHO mORMot should have some stable REST CS subset, which is not related to the interfaces. Method services are also useful, right? Why not CrossPlatform server?
Regards,
Offline
+1 for method based services
Offline
I beg you pardon!
Can't even compile it on intel x64-bit Lindows fpc.
Define "even work", please!
Offline
I guess the FPC version is not supported, or properly configured.
See what Alfred obtained: http://blog.synopse.info/post/soaarmfpc
Offline
On July 7, 2016 all tests went OK using the newpascal.org distribution: http://synopse.info/forum/viewtopic.php … 989#p20989
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I am preparing a whole FPC/Lazarus suite, 100% based on newpascal.
Including cross-compiling.
Will replace the old RTTI repo by me.
Offline
On July 7, 2016 all tests went OK using the newpascal.org distribution: http://synopse.info/forum/viewtopic.php … 989#p20989
Target was win32.
I guess the FPC version is not supported, or properly configured.
See what Alfred obtained: http://blog.synopse.info/post/soaarmfpc
Any FPC > 2.6.4 breaks all my string operations, didn't it break yours?
And your automated test suite gives you a bit of false confidence...
Offline
AOG, What's the difference between your project and newpascal?
Offline
@Chaa
I hope you mean by "your project" my version of FPC on GitHub (https://github.com/LongDirtyAnimAlf/fpctrunkrtti).
Answer.
Nothing. But mine is just an older version of FPC trunk. With only the RTTI for interfaces as an extra.
To prevent further fragmentation, I decided to join the newpascal effort.
NewPascal has already interface RTTI. And is updated on a daily base. And will contain more (sometimes bleeding edge) improvements by other contributors.
It has its own website, which will (also, hopefully) become a meeting place for mORMot and FPC users.
Its still in its development phase however. So, you have to be a bit patient ... ;-) ... until all quirks are solved ... !
Offline
Target was win32.
Yes. Unfortunately the New Pascal Pack doesn't support win64 so I'm unable to try it out...
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Ok.
I have created a NewPascal release that can also be used for cross-compiling.
Win64 is included in the base.
As always with these types of releases, you have to follow the install instruction.
Things will not work otherwise !
This install is fully self-contained. Will not influence other FPC or Lazarus on your system.
In the future, these releases will be easier to install.
Here you go:
https://github.com/LongDirtyAnimAlf/fpc … i/releases
ps:
fpclazup is included, together with install-scripts.
you can use this to compile your own self-contained version of NewPascal !
Offline
Ok.
I have created a NewPascal release that can also be used for cross-compiling.
Can we include that into NewPascalPack Continous Integration system? Btw. you have full admin rights for newpascal repo inside dathox.
Last edited by hnb (2016-07-07 10:42:29)
best regards,
Maciej Izak
Offline
@hnb
Sure !!
Btw, I tried to add these releases into your repo, but I did not succeed.
In fact, I want them into NewPascal ! :-)
The thing that is not ok ATM, is the fact that you need to install into c:\NewPascal.
So, a script, or a small app to adjusts paths would be nice.
But again, we are still moving towards full integration. NewPascal perfection is lingering in the near future ... ;-)
Offline
@AOG, This is awesome!
Re. the installation path configuration in the future, maybe just add an exe file for changing the path (which is now fixed to "c:\NewPascal")? Actually it's really really really good to just download the .zip files - it's just like the so-called portable programs, which would not force us to do the re-installation after a system re-installation. No installer is needed, that'll cost unnecessary time in maintaining them. We are all developers and we can handle .zip files
And my testing results:
- win64: There is no win64 compile support, maybe you are missing some files in FPCLazBaseWin32.rar? Result:
Error: Illegal parameter: -Twin64
- win32: Compiled and the tests run successfully.
- linux i386:
when {$define PUREPASCAL} is on, I got:
SynCommons.pas(56789,3) Error: Identifier not found "GetCPUID"
Otherwise I got:
..\fpc-linux32\sqlite3.o:(.data+0xc28): undefined reference to `lstat64'
C:\NewPascal\fpc\units\i386-linux\rtl\si_c21.o: In function `SI_C21_$$__FPC_LIBC21_START':
si_c21.pp:(.text.n_si_c21_$$__fpc_libc21_start+0x27): undefined reference to `__libc_csu_fini'
si_c21.pp:(.text.n_si_c21_$$__fpc_libc21_start+0x2c): undefined reference to `__libc_csu_init'
TestSQL3.dpr(190,1) Error: Error while linking
- Linux x86_64: Successfully compiled (but did not test running it), with the following added to my .lpr file:
// START http://bugs.freepascal.org/view.php?id=30112
{$ifdef FPC}
{$ifdef Linux}
{$ifdef FPC_CROSSCOMPILING}
{$linklib libc_nonshared.a}
{$endif FPC_CROSSCOMPILING}
{$endif Linux}
{$endif FPC}
// END
Last edited by edwinsn (2016-07-07 11:18:21)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
@edwinsn
Will check your remarks ... one moment ...
Edit: checks done
Win64 issue:
I cannot reproduce.
Files are there (C:\NewPascal\fpc\units\x86_64-win64)
Cross-compiler is there (C:\NewPascal\fpc\bin\i386-win32\ppcrossx64.exe)
mORMot64 runs out-of-the-box.
Linux issue:
For cross-compiling towards Linux from Windows, you indeed need:
{$ifdef FPC}
{$ifdef Linux}
{$ifdef FPC_CROSSCOMPILING}
{$linklib libc_nonshared.a}
{$endif FPC_CROSSCOMPILING}
{$endif Linux}
{$endif FPC}
in your dpr or lpr file.
With this added: out-of-the-box success !
(naturally, after installation of static link files, if needed: http://synopse.info/files/sqlite3fpc.7z)
Last edited by AOG (2016-07-07 11:52:06)
Offline
The thing that is not ok ATM, is the fact that you need to install into c:\NewPascal.
So, a script, or a small app to adjusts paths would be nice.
Please, change C:\NewPascal to C:\Users\Public\Documents\NewPascal in first step.
This is the correct placement of the users files.
Offline
@Chaa
This whole "User files" stuff of Windows Vista+ is not mandatory.
And executables should not be put in "Documents", by design.
Even worse, command line does not like spaces in folder names, and those "MS-defined folders" have space within their name.
It would be for sure a source of numerous potential issues, which are not worth it.
So IMHO C:\NewPascal sounds right to me.
Offline
@Chaa
We will allow changes. But this is just a preview. Final will have a small app that adjusts all paths to whatever location you want.
Last edited by AOG (2016-07-07 12:07:57)
Offline
Re. the path, I agree with ab, "C:\Users\Public\Documents\NewPascal" is way too verbose.
@AOG, I must was doing something wrong, now I switched the "Build Modes" set by ab for the TestSQL3.lpr project, I have successfully compiled the 4 targets:
- win32 (all tests passed)
- win64 (Total assertions failed for all test suits: 21 / 8,415,516)
- linux_x86_64 (untested)
- linux_i386 tested under Linux Mint xfce 32bit, see below for results:
2.11. DDD shared units:
- User model: 3,276 assertions passed 507us
! DDD shared units - Authentication model
! Exception EAccessViolation raised with messsage:
! Access violation
- Email validation process: 55 assertions passed 38.36ms
! DDD shared units - User CQRS repository
! Exception EAccessViolation raised with messsage:
! Access violation
2.12. DDD multi thread:
- Delete old database: 1 assertion passed 29us
- Start server: 1 assertion passed 13.71ms
- Single client test: 1,002 assertions passed 186.52ms
- Multi threaded clients test: 21 assertions passed 386.34ms
Total failed: 0 / 1,025 - DDD multi thread PASSED 586.73ms
Using mORMot 1.18.2771 FTS3
Running on Linux-3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:37:25 UTC 2015
TSQLite3LibraryStatic 3.13.0 with internal MM
Generated with: Free Pascal 3.1.1 compiler
Time elapsed for all tests: 100.05s
Tests performed at 07/07/2016 08:29:51 PM
Total assertions failed for all test suits: 0 / 20,127,664
! Some tests FAILED: please correct the code.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Current trunk has some optimalization problems. Please try -O1 as optimization level.
Offline
Current trunk has some optimalization problems. Please try -O1 as optimization level.
Thanks. Will try and test this with Ubuntu sever 16.04 LTS 64bit when I find some time...
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I just came to this thread via a suggestion on the Lazarus list.
It seems like what I want, i.e. being able to develop against a Raspberry Pi (ARM7) on my Win7 laptop including crosscompiling for the Pi.
Currently I have installed FPC 3.0/Lazarus 1.6 directly on the target RPi3 and use that as platform, but it is less than optimal for many reasons...
However this business with installation to C:/NewPascal is stopping me.
I only ever install programs on the C drive to C:\Programs (outside of the Microsoft cointrolled folders), everything else goes into my 2 TB D: data drive.
The install instructions for NewPascal says it can only ever be installed into C:\NewPascal, otherwise it will not work.
After extracting it into D:\NewPascal I searched for the string "C:\NewPascal" in xml and config files from the root of the installation using:
grep -d+ -i+ "C:\\NewPascal" *.xml *.c*
The result was disappointing because this string is put in a whole lot of files all over the place, so I cannot figure a way to safely change them, not even by changing C: to D:
What happened to the path change script/program?
--
Bo B
Offline
Does FreePascal support environment variables in config files? As noted in The Twelve Factors apps, this is a good way of customizing a configuration. FreePascal can do something like GoLang GOPATH and everyone will be happy
Offline
@mpv
Would be good to ask the FPC devs on the FPC forum.
@Bo
The whole NewPascal install that has been made available at
https://github.com/LongDirtyAnimAlf/fpc … i/releases
has been made with fpclazup.
So, it would be fairly simple to make your own with fpclazup.
Also, it has clearly been stated that this release only works in C:\NewPascal.
Being a work-in-progress, please accept the limitations at this moment.
More features will be added in the future !
Offline
Could you use a symbolic link (mklink /d) ?
Offline
Just adding moral support at this point.
Coming from the Elevate Web Builder community (Object Pascal for Web, compiles to native JavaScript/HTML)
we are presently talking about options for server code, and many people are post-Delphi in that they don't
carry Embarcadero licenses anymore.
We are just mashing up mormot with Elevate's product, so I'm pleased to see a glowing future for the free/affordable Pascal server code compatible with mormot.
Erick
Offline
Yes! Please make DBISAM and ElevateDB mORMot compatible
Last edited by Junior/RO (2016-08-30 18:53:55)
Offline
@erick,
Checked the demo pages for Elevate Web Builder, sounds very powerful! And I see the controls are documented (this is most important).
Does the code editor support code completion?
What's the Pascal to JS engine do you use? I mean, is it the same as Smart Mobile Studio? SMS is cool, except that it targets **only mobile apps**.
Last edited by edwinsn (2016-08-31 08:23:43)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
@edwinsn
Code completion, not yet..will be in v2.50
The same principle as SMS (I didn't play with SMS). In the same way of Delphi, Lazarus, you write Object Pascal, design the interface(you have a lot of components which can be extended or you can design new ones), press F9 -> compile and EWB creates for you a optimized JS file which run in any browser. EWB has also a simple http server for easy test your project. I think EWB is very good for business applications and has very good documentattion and good support. Check their forum.
Offline
@emk,
Thanks for the info, it's useful! Code-completion is about productivity so it's a must...
Does it support debugging?
Is it easy to integrate css frameworks such as the bootstrap framework?
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
@edwinsn
Yes, it supports debugging.
EWB doesn't work with CSS. It has a better way, GUI interfaces. You can easily replicate the bootstrap framework.
Check this and you can figure yourself: Elevate web builder creating custom component
Edit: By replicate, I mean the components are already there, but you can change their style as you wish.
Last edited by emk (2016-08-31 09:40:55)
Offline
Thanks, will check the video later.
Directly supporting css will be necessary, so that we can use external designs - either from open source frameworks, or designed by another designer.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
You don't need css. Every component has a some interfaces states: Focused, Selected, Error, Normal, ... etc
You can adjust properties of every state from Object Inspector (Font, Size, Border, ...etc).
So, a component comes with a standard design which can be customized per IDE (and becomes the new "standard"), or per project, or per form/component. Essentially you specify "css"/attributes of a component by Object Inspector. I think is designed that way so can be inherited and any user can develop his own components or enhancements. And is more "Delphi way". For somebody who doesn't know css, html, JS .. will be "at home" with EWB developing web applications.
So GUI and logic is made with EWB in "Delphi way" and requests for data/services or anything is made with JSON calls to a web server which can be PHP, ASP.NET or of course MORMOT. For that you have of course a component TServerRequest.
You have the same productivity like Delphi/Lazarus and you are not lost in JS world with thousands of: require.js, react.js, angular.js, .........
And one more thing, which is HUGE: in the same way Cordova makes "native" apps for mobile, the same, exists Electron which makes native apps for Windows, Linux and Mac OSX. Electron is a packed Chrome browser + Node with unrestricted access to operating system. So you write once and run everywhere. Visual Studio Code is written in JS and deployed to Linux, Windows, Mac OSX with Electron.
You can write your app in EWB in pure Delphi way(and use mORMot on server side for data requests), compile to JS and you have your app in browser, mobile, desktop Linux, Win and Mac OSX. Really cool.
Last edited by emk (2016-08-31 12:31:26)
Offline
@emk,
Thanks so much for the info. Now I'm interested in how it talks with the mORMot server, I think it's in this post:http://synopse.info/forum/viewtopic.php?id=3455
Will definitely try it when EWB supports code-completion.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1