Re: Changing to C++

2017-06-04 Thread John Ralls

> On Jun 4, 2017, at 8:59 PM, Leon Taylor  wrote:
> 
> Hi all,
> 
> I recently saw the blog post on how the project is going to be re-written
> in C++.
> I understand that I am not to decide where the project goes or what happens
> to it, but if it is not to late, I personally think that we should re-think
> making the change to C++.
> I understand the GObject is a pain in the ass to use and learn, and that
> C++ is a better choice for developing desktop software (not to mention that
> there more libraries available for C++), but I (personally) think that
> re-writing the source code is counter-productive.
> Many people do not want to use C++, as it is very complex and hard to use
> properly. I know that you said it would be easier for people to learn C++
> than GObject, but I disagree. Many people know C and how to use it
> PROPERLY, whereas only experienced C++ developers can use it properly. I
> think the only thing changing to C++ would do is scare off contributors.
> This is just *my *opinion, so just take it with a grain of salt. Please
> tell me if I have misunderstood something or taken something the wrong way.
> 

Leon,

What you misunderstand is that it's even harder to write correct GObject than 
C++ *and* there is a much smaller pool of developers who know how.  There are 
no development tools that can statically analyze it, no compiler warnings for 
it, and so on. It's firmly bound to the Gnome ecosystem, which means that in 
order to eventually support platforms that Gnome doesn't--meaning anything 
mobile--it has to go.

One more thing: GnuCash's use of GObject is screwed up, so the code has to be 
rewritten anyway.

Regards,
John Ralls


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Changing to C++

2017-06-04 Thread John Ralls

> On Jun 4, 2017, at 9:23 PM, Bob Gustafson  wrote:
> 
> I can put in a good word for Nim ( http://nim-lang.org/ )
> 
> It is as fast as C++ (compiles to C/C++), has intelligent (per-thread) 
> garbage collection, a robust type system (if it compiles, chances are it is 
> correct) and has a very lean syntax.
> 
> It also works well with Postgresql (probably also MySql, but I use post). It 
> is worth taking a look at.
> 
> Developing with Nim can be a lot faster than with C++. The lean syntax helps 
> a lot.
> 
> The front-end can also target Javascript for GUI development, although I have 
> not used that feature.


Yeah, there are a couple of hundred languages out there like that, each with 
its own tiny band of apostles. I'm sure they're all wonderful, but the small 
number of experienced developers makes them unsuitable for an open-source 
project that needs to recruit from as wide a pool as possible.

Regards,
John Ralls

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Changing to C++

2017-06-04 Thread Bob Gustafson

I can put in a good word for Nim ( http://nim-lang.org/ )

It is as fast as C++ (compiles to C/C++), has intelligent (per-thread) 
garbage collection, a robust type system (if it compiles, chances are it 
is correct) and has a very lean syntax.


It also works well with Postgresql (probably also MySql, but I use 
post). It is worth taking a look at.


Developing with Nim can be a lot faster than with C++. The lean syntax 
helps a lot.


The front-end can also target Javascript for GUI development, although I 
have not used that feature.


Best regards - BobG

On 06/04/2017 10:59 PM, Leon Taylor wrote:

Hi all,

I recently saw the blog post on how the project is going to be re-written
in C++.
I understand that I am not to decide where the project goes or what happens
to it, but if it is not to late, I personally think that we should re-think
making the change to C++.
I understand the GObject is a pain in the ass to use and learn, and that
C++ is a better choice for developing desktop software (not to mention that
there more libraries available for C++), but I (personally) think that
re-writing the source code is counter-productive.
Many people do not want to use C++, as it is very complex and hard to use
properly. I know that you said it would be easier for people to learn C++
than GObject, but I disagree. Many people know C and how to use it
PROPERLY, whereas only experienced C++ developers can use it properly. I
think the only thing changing to C++ would do is scare off contributors.
This is just *my *opinion, so just take it with a grain of salt. Please
tell me if I have misunderstood something or taken something the wrong way.

Thanks, Leon.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Changing to C++

2017-06-04 Thread Leon Taylor
Hi all,

I recently saw the blog post on how the project is going to be re-written
in C++.
I understand that I am not to decide where the project goes or what happens
to it, but if it is not to late, I personally think that we should re-think
making the change to C++.
I understand the GObject is a pain in the ass to use and learn, and that
C++ is a better choice for developing desktop software (not to mention that
there more libraries available for C++), but I (personally) think that
re-writing the source code is counter-productive.
Many people do not want to use C++, as it is very complex and hard to use
properly. I know that you said it would be easier for people to learn C++
than GObject, but I disagree. Many people know C and how to use it
PROPERLY, whereas only experienced C++ developers can use it properly. I
think the only thing changing to C++ would do is scare off contributors.
This is just *my *opinion, so just take it with a grain of salt. Please
tell me if I have misunderstood something or taken something the wrong way.

Thanks, Leon.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-04 Thread DaveC49
Hi Rob,

I do have a build file under gnucash and the cache files were located there.
I have deleted all files in it.

I'll take your advice and get a clean clone up and compile that without
modifying anyof the files. I had already modified the files to include a
feature for addinga link to external documents to invoices/bills, etc. I can
then transfer the modified files from the current sources directory once I
have it building successfully.

Having done that I can now identify the problem. I had made the build
directory a subdirectory of the gnucash file created when I cloned gnucash
from github instead of a directory in the same folder. The cmake is now
working OK but ninja is dropping out with an error.

/usr/local/include/boost/mpl/vector/aux_/push_front.hpp:22:45: fatal error:
/usr/local/include/boost/mpl/vector/aux_/item.hpp: Timer expired

Which is clearly something to do with my boost installation - possibly the
wrong version. I hav both 1.64.0 and 1.58.0 installed and it is currently
linking to 1.64.0. That I can sort out fairly easily.

Thanks for your help in sorting me out on cmake. I havent done any C++
development since the mid 1990s , I was trying to get familiar with Eclipse
and cmake at the same time as finding my way around the gnucash architecture
and got myself in a knot.

Best wishes

David Cousens



--
View this message in context: 
http://gnucash.1415818.n4.nabble.com/Building-with-CMake-tp4691977p4692019.html
Sent from the GnuCash - Dev mailing list archive at Nabble.com.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Building with CMake

2017-06-04 Thread Rob Gowin
On Sun, Jun 4, 2017 at 12:34 AM, DaveC49  wrote:

>  Hi further progress
> I ran cmake with the --trace option ( *cmake --trace -D
> CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash*). It appears that
> cmake
> is executing the call to add the libqof directory
> .../gnucash/src/CMakeLists.txt  line 141 and the qof/test subdirectory
> .../gnucash/src/libqof/CMakeLists.txt(3) without ever having called the
> INCLUDE (GncAddTest) at line 48 of .../gnucash/CMakeLists.txt.
> In the resultant trace output cmake in fact never seems to enter
> .../gnucash/CMakeLists.txt as the trace starts with
> .../gnucash/src/CMakeLists.txt(0):  PROJECT(Project )  and does not appear
> to be executing .../gnucash/CMakeLists.txt at all or if it is is executing
> it silently.
>
> I have deleted the cach files .../gnucash/CMakeFiles and rerun the above
> command but still get the same error and trace output
>
> If I execute *cmake --trace -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel
> ../gnucash/CmakeLists.txt*
> I obtain
> *cmake: /usr/local/lib/libcurl.so.4: no version information available
> (required by cmake)
> Running with trace output on.
> CMake Error: The source ".../gnucash/CMakeLists.txt" does not match the
> source ".../gnucash/src/CMakeLists.txt" used to generate cache.  Re-run
> cmake with a different source directory.*
>  I confess to being totally confused as to why cmake is not executing
> .../gnucash/CmakeLists.txt
>
> The trace output can be accessed using this link to a folder in my dropbox
> https://www.dropbox.com/sh/chibk4l66mz1esp/AADDP0EV9pmHjwpUHeow_zkra?dl=0
>
> Thanks for any help anyone can offer
>
> David Cousens


 Hi David,

Do you have CMake cache files in
/home/david/Documents/SoftwareDevelopment/GnucashDevelopment/sources/gnucash/src?
I think you do. If so, you need to remove them.

>From what I can tell, you haven't created a separate CMake build directory,
which you should. I usually use 'gnucash-build' that lives in the same
directory as gnucash (so in the 'sources' directory for you). Other folks
will create a 'build' directory in the gnucash source directory and use
that.

Run these commands to do a clean clone and build in a /tmp directory. If
these work, you might want to remove your .../sources/gnucash directory and
start over. Also, you should consider building with ninja for faster build
times (CMake generates a build using 'make' by default).

Commands: (assumes bash)

$ rm -rf /tmp/gcdev
$ mkdir /tmp/gcdev
$ cd /tmp/gcdev
$ git clone https://github.com/Gnucash/gnucash.git
$ mkdir gnucash-build
$ cd gnucash-build
# For ninja, add '-G Ninja' to cmake command below before '../gnucash'
# Also, make sure /opt/gnucash-devel is user-writable
$ cmake -D CMAKE_INSTALL_PREFIX=/opt/gnucash-devel ../gnucash
$ make -j 4 && TZ=America/Los_Angeles make -j 4 check && make install
# or: ninja && TZ=America/Los_Angeles ninja check && ninja install

Let me know how it goes.

Regards,
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel