Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-07 Thread Cody Garver
Trivia: there exists an audio podcast of a CMake representative talking
about the project  for an hour or so. Skip to 4:24
for the content.


On Thu, Feb 7, 2013 at 4:47 PM, Sergey "Shnatsel" Davidoff <
ser...@elementaryos.org> wrote:

> 2013/2/8 Tom Beckmann 
>
>> I wrote a script which I think does about what the go build tools would
>> do.
>> http://pastebin.com/hr8TfdPu
>> To see what exactly it should be able to do, check line 30 following :)
>> If you want to use it, it'd be best to copy it to /usr/bin, so you can
>> just run 'ebuild' whenever you want to rebuild something.
>> Some small things like internationalization and installing are still
>> missing, but those are quite easy to add, in case there's interest.
>>
>
> The problem about this is we now have 3-layered nested generators. This
> thing abstracts/generates CMake which in turn generates makefiles. We have
> three different layers with completely different syntax now.
>
> The topmost level (this script) covers the most common use cases, but the
> problem is, when you need to diverge a tiny bit, you can't use it anymore
> and have to go to the next level which is completely freaking different.
> And you have to make your way through several hundred lines of generated
> code even though you've never seen it before (maybe even never saw CMake
> before) and have no idea what it does. And that's not even the real thing,
> it's a generator too!
>
> Another problem with hiding complexity instead of axing it is very well
> illustrated by this script. Let me quote a command the usage notice:
>
>> clean - Removes build directory, sometimes required to have new packages
>> used correctly
>>
> So you have to remove the build directory and regenerate it once in a
> while. As a newbie, you never know if you should do it after a particular
> change or not. You have to either waste time regenerating it every time, or
> not forget to try and regenerate it if something breaks. In fact, when
> something breaks, you never know on which level the cause is located and
> what did you do wrong (or was it just outdated build directory or some
> other obscure ritual you forgot to perform?).
>
> When we get to a three-layered system, isn't it the point where we should
> drop it and flatten it all into one level again? Bake seems to do all this
> script does and more while being a flat one-level structure. With it you
> always work with the real thing. There are no startling transitions in the
> learning curve where you should suddenly jump to a whole new level.
>
> Well, technically there is, it's just much further away so I hope most
> projects won't hit it. Bake is designed to be simple and probably won't be
> able to cover some really advanced use cases, so if your project grows
> really complicated, you'll have to transition to CMake. This is a pretty
> jarring transition, but it exists in the generate-the-cmake solution too
> and after setting up a pretty complex thing in Bake I think you'll have a
> pretty good idea about what your build system does and it will be much
> easier to recreate that in CMake.
>
> IMO the adoption of Bake depends on how much complexity can it sanely
> cover, i.e. how far away the transition to CMake is. I believe it's farther
> away and less jarring than in the generate-the-cmake approach, but I can't
> see the point of taking time to transition to it or write docs for it if it
> can't cover even a half of our existing projects.
>
> Either way this is not the right time for such discussion - any drastic
> build system changes should be postponed till Luna+1 cycle.
>
> --
> Sergey "Shnatsel" Davidoff
> OS architect @ elementary
>
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to : elementary-dev-community@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~elementary-dev-community
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Cody Garver
-- 
Mailing list: https://launchpad.net/~elementary-dev-community
Post to : elementary-dev-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~elementary-dev-community
More help   : https://help.launchpad.net/ListHelp


Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-07 Thread Sergey "Shnatsel" Davidoff
2013/2/8 Tom Beckmann 

> I wrote a script which I think does about what the go build tools would do.
> http://pastebin.com/hr8TfdPu
> To see what exactly it should be able to do, check line 30 following :)
> If you want to use it, it'd be best to copy it to /usr/bin, so you can
> just run 'ebuild' whenever you want to rebuild something.
> Some small things like internationalization and installing are still
> missing, but those are quite easy to add, in case there's interest.
>

The problem about this is we now have 3-layered nested generators. This
thing abstracts/generates CMake which in turn generates makefiles. We have
three different layers with completely different syntax now.

The topmost level (this script) covers the most common use cases, but the
problem is, when you need to diverge a tiny bit, you can't use it anymore
and have to go to the next level which is completely freaking different.
And you have to make your way through several hundred lines of generated
code even though you've never seen it before (maybe even never saw CMake
before) and have no idea what it does. And that's not even the real thing,
it's a generator too!

Another problem with hiding complexity instead of axing it is very well
illustrated by this script. Let me quote a command the usage notice:

> clean - Removes build directory, sometimes required to have new packages
> used correctly
>
So you have to remove the build directory and regenerate it once in a
while. As a newbie, you never know if you should do it after a particular
change or not. You have to either waste time regenerating it every time, or
not forget to try and regenerate it if something breaks. In fact, when
something breaks, you never know on which level the cause is located and
what did you do wrong (or was it just outdated build directory or some
other obscure ritual you forgot to perform?).

When we get to a three-layered system, isn't it the point where we should
drop it and flatten it all into one level again? Bake seems to do all this
script does and more while being a flat one-level structure. With it you
always work with the real thing. There are no startling transitions in the
learning curve where you should suddenly jump to a whole new level.

Well, technically there is, it's just much further away so I hope most
projects won't hit it. Bake is designed to be simple and probably won't be
able to cover some really advanced use cases, so if your project grows
really complicated, you'll have to transition to CMake. This is a pretty
jarring transition, but it exists in the generate-the-cmake solution too
and after setting up a pretty complex thing in Bake I think you'll have a
pretty good idea about what your build system does and it will be much
easier to recreate that in CMake.

IMO the adoption of Bake depends on how much complexity can it sanely
cover, i.e. how far away the transition to CMake is. I believe it's farther
away and less jarring than in the generate-the-cmake approach, but I can't
see the point of taking time to transition to it or write docs for it if it
can't cover even a half of our existing projects.

Either way this is not the right time for such discussion - any drastic
build system changes should be postponed till Luna+1 cycle.

-- 
Sergey "Shnatsel" Davidoff
OS architect @ elementary
-- 
Mailing list: https://launchpad.net/~elementary-dev-community
Post to : elementary-dev-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~elementary-dev-community
More help   : https://help.launchpad.net/ListHelp


Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-07 Thread Craig
Thanks Tom, I'll take a look.
On Feb 7, 2013 4:07 PM, "Tom Beckmann"  wrote:

> I wrote a script which I think does about what the go build tools would do.
> http://pastebin.com/hr8TfdPu
> To see what exactly it should be able to do, check line 30 following :)
> If you want to use it, it'd be best to copy it to /usr/bin, so you can
> just run 'ebuild' whenever you want to rebuild something.
> Some small things like internationalization and installing are still
> missing, but those are quite easy to add, in case there's interest.
>
>
> On Wed, Feb 6, 2013 at 9:35 PM, Donnie McNeal wrote:
>
>> Loo Loo
>> On Feb 5, 2013 1:16 PM, "David Gomes"  wrote:
>>
>>> If by "Elementary", you mean elementary OS, I'd like to say that I've
>>> been doing desktop development there for almost a year now and only rarely
>>> did I have to use CMake to its full extent. All I have to do is fetch a
>>> project, "mkdir build; cd build; cmake ..;make;", and after I've fetched a
>>> project, I really only have to write some code "cd build;make;". I really
>>> hope CMake isn't the reason you aren't helping us, because right now we
>>> could really use some help!
>>>
>>> However, I did learn how to write CMakeLists.txt files on side projects,
>>> which came in handy later on for elementary OS development, but to help us,
>>> there's no need to struggle with CMak. If you need to write anything, I
>>> encourage you to learn because it's really easy -
>>> https://github.com/davidgomes/2dplatformer/blob/master/CMakeLists.txt,
>>> that is the CMakeLists.txt I had to write for a side project, and it was
>>> quite simple (also, I do realize it's pretty badly-written, from what I've
>>> been told on #cmake).
>>>
>>> Those Go build tools you're talking about look cool and easy to use, but
>>> they are go-only. I think you should learn CMake or Autotools because you
>>> can use them with every language/library/framework that needs building
>>> (even Go!). Anyways, "go build" is probably not too hard to write for Vala
>>> projects that don't use any external libraries.
>>>
>>> Oh, and I just remembered, autotools, CMake and the likes help you A LOT
>>> with packaging your applications. They handle lots of stuff that would be a
>>> PITA to do yourself.
>>>
>>> David "Munchor" Gomes
>>>
>>>
>>> On Tue, Feb 5, 2013 at 9:05 PM, Craig  wrote:
>>>
 Firstly, let me just say that CMake and Make are a pain to learn. I'm a
 professional software developer and I still can't figure them out. In my
 job, we use tools that automate the nightmare that is project management
 (usually IDEs) and it's usually still unpleasant. The tedium of these
 "tools" is the one thing keeping me from using Vala as a primary
 programming language and otherwise contributing to Elementary.

 That said, lately I've been getting into Go (golang), and I'm finding
 it to be an AMAZING language; however, it's only 3 years old, thus it
 doesn't have an extensive collection of libraries. The only prominent GTK
 library is very immature and (I believe) it only supports some features
 from GTK+2.0 (none from 3.0). Among the more amazing features of Go are its
 build environment tools.

 `go build [app-name]` is all that is needed to build an entire
 application--no messing with CMakeLists or makefiles (no project metadata
 of any kind, in fact). Furthermore, `go install [app-name]` will build and
 install the application to a location in your PATH, making it instantly
 executable. Go also comes with an awesome test suite out of the box, and
 `go get 
 [http://path.to.online/repository]`will
  automatically fetch a package from a public code repository (it works
 with git and several other repo types) and store the files alongside your
 own source code.

 I think it would be a huge help to elementary developers if we at least
 created a Vala version of (at least) the `go build` tools to facilitate
 project management. This would dramatically lower the entry barrier to
 Elementary development, and it would encourage an organized structure for
 application source code across applications.

 At this point, I'm not proposing spending time and resources working on
 this, but I'd like to get some discussion going about the merits of this
 idea, particularly from people with Go and Vala experience.

 Sound off!

 -Craig Weber


 --
 Mailing list: https://launchpad.net/~elementary-dev-community
 Post to : elementary-dev-community@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~elementary-dev-community
 More help   : https://help.launchpad.net/ListHelp


>>>
>>> --
>>> Mailing list: https://launchpad.net/~elementary-dev-community
>>> Post to : elementary-dev-community@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~elementary-dev-community
>>> Mor

Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-07 Thread Tom Beckmann
I wrote a script which I think does about what the go build tools would do.
http://pastebin.com/hr8TfdPu
To see what exactly it should be able to do, check line 30 following :)
If you want to use it, it'd be best to copy it to /usr/bin, so you can just
run 'ebuild' whenever you want to rebuild something.
Some small things like internationalization and installing are still
missing, but those are quite easy to add, in case there's interest.


On Wed, Feb 6, 2013 at 9:35 PM, Donnie McNeal wrote:

> Loo Loo
> On Feb 5, 2013 1:16 PM, "David Gomes"  wrote:
>
>> If by "Elementary", you mean elementary OS, I'd like to say that I've
>> been doing desktop development there for almost a year now and only rarely
>> did I have to use CMake to its full extent. All I have to do is fetch a
>> project, "mkdir build; cd build; cmake ..;make;", and after I've fetched a
>> project, I really only have to write some code "cd build;make;". I really
>> hope CMake isn't the reason you aren't helping us, because right now we
>> could really use some help!
>>
>> However, I did learn how to write CMakeLists.txt files on side projects,
>> which came in handy later on for elementary OS development, but to help us,
>> there's no need to struggle with CMak. If you need to write anything, I
>> encourage you to learn because it's really easy -
>> https://github.com/davidgomes/2dplatformer/blob/master/CMakeLists.txt,
>> that is the CMakeLists.txt I had to write for a side project, and it was
>> quite simple (also, I do realize it's pretty badly-written, from what I've
>> been told on #cmake).
>>
>> Those Go build tools you're talking about look cool and easy to use, but
>> they are go-only. I think you should learn CMake or Autotools because you
>> can use them with every language/library/framework that needs building
>> (even Go!). Anyways, "go build" is probably not too hard to write for Vala
>> projects that don't use any external libraries.
>>
>> Oh, and I just remembered, autotools, CMake and the likes help you A LOT
>> with packaging your applications. They handle lots of stuff that would be a
>> PITA to do yourself.
>>
>> David "Munchor" Gomes
>>
>>
>> On Tue, Feb 5, 2013 at 9:05 PM, Craig  wrote:
>>
>>> Firstly, let me just say that CMake and Make are a pain to learn. I'm a
>>> professional software developer and I still can't figure them out. In my
>>> job, we use tools that automate the nightmare that is project management
>>> (usually IDEs) and it's usually still unpleasant. The tedium of these
>>> "tools" is the one thing keeping me from using Vala as a primary
>>> programming language and otherwise contributing to Elementary.
>>>
>>> That said, lately I've been getting into Go (golang), and I'm finding it
>>> to be an AMAZING language; however, it's only 3 years old, thus it doesn't
>>> have an extensive collection of libraries. The only prominent GTK library
>>> is very immature and (I believe) it only supports some features from
>>> GTK+2.0 (none from 3.0). Among the more amazing features of Go are its
>>> build environment tools.
>>>
>>> `go build [app-name]` is all that is needed to build an entire
>>> application--no messing with CMakeLists or makefiles (no project metadata
>>> of any kind, in fact). Furthermore, `go install [app-name]` will build and
>>> install the application to a location in your PATH, making it instantly
>>> executable. Go also comes with an awesome test suite out of the box, and
>>> `go get 
>>> [http://path.to.online/repository]`will
>>>  automatically fetch a package from a public code repository (it works
>>> with git and several other repo types) and store the files alongside your
>>> own source code.
>>>
>>> I think it would be a huge help to elementary developers if we at least
>>> created a Vala version of (at least) the `go build` tools to facilitate
>>> project management. This would dramatically lower the entry barrier to
>>> Elementary development, and it would encourage an organized structure for
>>> application source code across applications.
>>>
>>> At this point, I'm not proposing spending time and resources working on
>>> this, but I'd like to get some discussion going about the merits of this
>>> idea, particularly from people with Go and Vala experience.
>>>
>>> Sound off!
>>>
>>> -Craig Weber
>>>
>>>
>>> --
>>> Mailing list: https://launchpad.net/~elementary-dev-community
>>> Post to : elementary-dev-community@lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~elementary-dev-community
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> --
>> Mailing list: https://launchpad.net/~elementary-dev-community
>> Post to : elementary-dev-community@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~elementary-dev-community
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to : elementary-dev-community@lists.launchpad.net
> 

Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-06 Thread Donnie McNeal
Loo Loo
On Feb 5, 2013 1:16 PM, "David Gomes"  wrote:

> If by "Elementary", you mean elementary OS, I'd like to say that I've been
> doing desktop development there for almost a year now and only rarely did I
> have to use CMake to its full extent. All I have to do is fetch a project,
> "mkdir build; cd build; cmake ..;make;", and after I've fetched a project,
> I really only have to write some code "cd build;make;". I really hope CMake
> isn't the reason you aren't helping us, because right now we could really
> use some help!
>
> However, I did learn how to write CMakeLists.txt files on side projects,
> which came in handy later on for elementary OS development, but to help us,
> there's no need to struggle with CMak. If you need to write anything, I
> encourage you to learn because it's really easy -
> https://github.com/davidgomes/2dplatformer/blob/master/CMakeLists.txt,
> that is the CMakeLists.txt I had to write for a side project, and it was
> quite simple (also, I do realize it's pretty badly-written, from what I've
> been told on #cmake).
>
> Those Go build tools you're talking about look cool and easy to use, but
> they are go-only. I think you should learn CMake or Autotools because you
> can use them with every language/library/framework that needs building
> (even Go!). Anyways, "go build" is probably not too hard to write for Vala
> projects that don't use any external libraries.
>
> Oh, and I just remembered, autotools, CMake and the likes help you A LOT
> with packaging your applications. They handle lots of stuff that would be a
> PITA to do yourself.
>
> David "Munchor" Gomes
>
>
> On Tue, Feb 5, 2013 at 9:05 PM, Craig  wrote:
>
>> Firstly, let me just say that CMake and Make are a pain to learn. I'm a
>> professional software developer and I still can't figure them out. In my
>> job, we use tools that automate the nightmare that is project management
>> (usually IDEs) and it's usually still unpleasant. The tedium of these
>> "tools" is the one thing keeping me from using Vala as a primary
>> programming language and otherwise contributing to Elementary.
>>
>> That said, lately I've been getting into Go (golang), and I'm finding it
>> to be an AMAZING language; however, it's only 3 years old, thus it doesn't
>> have an extensive collection of libraries. The only prominent GTK library
>> is very immature and (I believe) it only supports some features from
>> GTK+2.0 (none from 3.0). Among the more amazing features of Go are its
>> build environment tools.
>>
>> `go build [app-name]` is all that is needed to build an entire
>> application--no messing with CMakeLists or makefiles (no project metadata
>> of any kind, in fact). Furthermore, `go install [app-name]` will build and
>> install the application to a location in your PATH, making it instantly
>> executable. Go also comes with an awesome test suite out of the box, and
>> `go get 
>> [http://path.to.online/repository]`will 
>> automatically fetch a package from a public code repository (it works
>> with git and several other repo types) and store the files alongside your
>> own source code.
>>
>> I think it would be a huge help to elementary developers if we at least
>> created a Vala version of (at least) the `go build` tools to facilitate
>> project management. This would dramatically lower the entry barrier to
>> Elementary development, and it would encourage an organized structure for
>> application source code across applications.
>>
>> At this point, I'm not proposing spending time and resources working on
>> this, but I'd like to get some discussion going about the merits of this
>> idea, particularly from people with Go and Vala experience.
>>
>> Sound off!
>>
>> -Craig Weber
>>
>>
>> --
>> Mailing list: https://launchpad.net/~elementary-dev-community
>> Post to : elementary-dev-community@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~elementary-dev-community
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to : elementary-dev-community@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~elementary-dev-community
> More help   : https://help.launchpad.net/ListHelp
>
>
-- 
Mailing list: https://launchpad.net/~elementary-dev-community
Post to : elementary-dev-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~elementary-dev-community
More help   : https://help.launchpad.net/ListHelp


Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-06 Thread Craig
Firstly, I consider conditional compilation to be a fringe case; an
exception to the rule, not the rule itself. Accordingly, CMake/autotools
should only be used when necessary, IMO. And even then, conditional
compilation *can* be achieved in a variety of ways without needing to
resort to CMake (gcc macros, off the top of my head--certainly no uglier
than CMake) and there are even simpler/better solutions if you can isolate
your conditional compilation needs to a few broad use cases (for instance,
go has CC for multi-platform support via naming your files _linux.go or
some such--perhaps not the most sustainable solution, but still far better
than CMake and the like). And if those solutions are inadequate for a given
use case, then and only then would I consider something like CMake.

Let me back up on the `go install` issue--I don't think it's intended as a
user-level installation mechanism, but rather a fast way to enable
developers to test their code. `go install` builds the app and installs it
to $GOBIN (and it's standard practice for developers to add $GOBIN to their
$PATH). It doesn't supplant normal packaging procedures, it just gives
developers a quick test platform. For example, I have the following
structure:

GOPATH=~/Projects/Go
GOBIN=$GOPATH/bin
PATH=$PATH:$GOBIN

I apologize for the misunderstanding.

Furthermore, as Go tools are not analogous to WAF in any meaningful way,
I'm not proposing WAF. I'm proposing the likes of Go tools for Vala. If
Bake is any good, I support it; however, I haven't had the time to check
out the documentation. Since it's language independent, I'm guessing it's
probably not going to be the ideal tool for the job simply because (as I
understand it) the official language of elementary is Vala and a language
agnostic tool will probably come bundled with a lot of complexity.

I think the best thing would be something with a simple `elem build
[package name]` or `elem install [package name]`.

A Go environment takes about ~10 minutes to set up and it's syntax is dead
simple, so you could probably get a good feel for it in an hour or two if
you'd like to better understand my proposal. http://golang.org/doc/
http://golang.org/doc/install Also, the golang.org website has some pretty
great documentation.

Thanks,
Craig
-- 
Mailing list: https://launchpad.net/~elementary-dev-community
Post to : elementary-dev-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~elementary-dev-community
More help   : https://help.launchpad.net/ListHelp


Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-06 Thread Sergey "Shnatsel" Davidoff
>
> I agree, compiling an existing CMake project is fairly straight forward;
> however, adding files or starting a project from scratch has been an
> exercise in frustration.
>

+1

And Autotools is even more of pain to use and a nightmare to maintain.

Moreover, while I would love to have the time to learn CMake, I really
> shouldn't have to as it provides no benefit (as far as I can tell) compared
> against the "go build" solution.
>

I used to think so too. "Why do I even need this all CMake mess? My simple
200-line program compiles in just one valac line, right?".

Well, it turned out my use cases are not *that* simple. I found myself
looking for conditional compilation support (to work OK on systems without
Granite), custom VAPI support to backport a necessary fix that I
countributed upstream but had to use in an older version. So my "simple"
things grew complicated very quickly.

I can't see installing to $PATH as a viable soluition since $PATH on
elementary OS is
"/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
and XDG_DATA_DIRS is
"/usr/share/pantheon:/usr/local/share/:/usr/share/" and I can't see a way
for the build system to figure out it should actually install to
/usr/local/ based on these variables. And I'm not even mentioning
cross-distro compatibility, such as reading lib and libexec locations (with
libexec possibly being or not being the same as lib), etc.

I've seen a "simple" build system in use in elementary - WAF. That was a
nightmare comparable to that of autotools or even worse. Any WAF-based
build system rapidly disintegrates into a set of custom python scripts
substituting for the build system with very little calls to WAF - as the
project evolves, you have to override more and more WAF calls and write
more and more custom scripts. You end up with something totally unique on
your hands, with randomly picked parameters and variables it reads. Given
source code with such build system, you have no idea how it works or even
how to use it, let alone how to adapt it to a not-really-common
configuration, because it follows absolutely no conventions.

Hopefully Bake will be a better solution. I haven't tried it yet because I
deal mostly with Debian packaging instead of using build systems directly,
and there's no handler in debhelper for Bake yet. Since elementary OS used
dpkg, we'll need proper debhelper support for Bake in order to use it for
our projects. Robert has explicitly stated that Bake is designed to be
language-independent, unlike many good but language-specific build systems,
but I think he added some kind of automation for GObject nevertheless
(Robert likes Vala as much as we do).

Bake doesn't have a website yet, only a Launchpad project, and that doesn't
happen to mention where to get documentation. Turns out you can view it by
obtaining the sources and running "yelp help" there:
$ bzr export bake lp:bake; cd bake; yelp help

-- 
Sergey "Shnatsel" Davidoff
OS architect @ elementary
-- 
Mailing list: https://launchpad.net/~elementary-dev-community
Post to : elementary-dev-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~elementary-dev-community
More help   : https://help.launchpad.net/ListHelp


Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-05 Thread Daniel Foré
Hey Guys,

While I don't have vast technical knowledge around build systems, I did
talk to Robert Ancell a while back and he shared with me that he was
working on a new modern build system called "bake". If someone wants to
examine bake, try it out in a project, and then share with the list it's
pros and cons that would be awesome!

you can get bake from here: https://launchpad.net/bake


On Tue, Feb 5, 2013 at 2:24 PM, Craig  wrote:

> Thanks David,
>
> I agree, compiling an existing CMake project is fairly straight forward;
> however, adding files or starting a project from scratch has been an
> exercise in frustration. Moreover, while I would love to have the time to
> learn CMake, I really shouldn't have to as it provides no benefit (as far
> as I can tell) compared against the "go build" solution.
>
> Generally speaking, the modern development environment is sufficiently
> complex between IDEs, version control systems, online code hosting, bug
> management, distribution systems, test servers, build servers, etc.,
> (that's not to mention the complexities of the actual problems for which a
> developer is trying to write solutions)--it just seems like the unnecessary
> complexities of metadata-based build systems aren't worth learning when
> automatic systems should (and often do) exist. Personally, I can't spare
> the time to learn another tool that will be obsolete soon.
>
> And while CMake and the like _are_ broadly applicable, most languages have
> IDEs capable of managing the complexities internally (Vala is the only
> language that's required me to learn CMake or Autotools). Of all the Vala
> IDEs I've found that claim to be able to support CMake or Autotools, none
> are able to handle more than a small fraction of the conceivable project
> structures (if memory serves, Anjuta couldn't even handle most Elementary
> projects).
>
> Finally, rest assured, I haven't been actively working on Elementary for
> lack of time; however, when I had the time to contribute, the project
> management (or lackthereof) was a huge buzzkill.
>
> Thanks for your response,
>
> Craig :)
>
>
> On Tue, Feb 5, 2013 at 3:16 PM, David Gomes wrote:
>
>> If by "Elementary", you mean elementary OS, I'd like to say that I've
>> been doing desktop development there for almost a year now and only rarely
>> did I have to use CMake to its full extent. All I have to do is fetch a
>> project, "mkdir build; cd build; cmake ..;make;", and after I've fetched a
>> project, I really only have to write some code "cd build;make;". I really
>> hope CMake isn't the reason you aren't helping us, because right now we
>> could really use some help!
>>
>> However, I did learn how to write CMakeLists.txt files on side projects,
>> which came in handy later on for elementary OS development, but to help us,
>> there's no need to struggle with CMak. If you need to write anything, I
>> encourage you to learn because it's really easy -
>> https://github.com/davidgomes/2dplatformer/blob/master/CMakeLists.txt,
>> that is the CMakeLists.txt I had to write for a side project, and it was
>> quite simple (also, I do realize it's pretty badly-written, from what I've
>> been told on #cmake).
>>
>> Those Go build tools you're talking about look cool and easy to use, but
>> they are go-only. I think you should learn CMake or Autotools because you
>> can use them with every language/library/framework that needs building
>> (even Go!). Anyways, "go build" is probably not too hard to write for Vala
>> projects that don't use any external libraries.
>>
>> Oh, and I just remembered, autotools, CMake and the likes help you A LOT
>> with packaging your applications. They handle lots of stuff that would be a
>> PITA to do yourself.
>>
>> David "Munchor" Gomes
>>
>>
>> On Tue, Feb 5, 2013 at 9:05 PM, Craig  wrote:
>>
>>> Firstly, let me just say that CMake and Make are a pain to learn. I'm a
>>> professional software developer and I still can't figure them out. In my
>>> job, we use tools that automate the nightmare that is project management
>>> (usually IDEs) and it's usually still unpleasant. The tedium of these
>>> "tools" is the one thing keeping me from using Vala as a primary
>>> programming language and otherwise contributing to Elementary.
>>>
>>> That said, lately I've been getting into Go (golang), and I'm finding it
>>> to be an AMAZING language; however, it's only 3 years old, thus it doesn't
>>> have an extensive collection of libraries. The only prominent GTK library
>>> is very immature and (I believe) it only supports some features from
>>> GTK+2.0 (none from 3.0). Among the more amazing features of Go are its
>>> build environment tools.
>>>
>>> `go build [app-name]` is all that is needed to build an entire
>>> application--no messing with CMakeLists or makefiles (no project metadata
>>> of any kind, in fact). Furthermore, `go install [app-name]` will build and
>>> install the application to a location in your PATH, making it instantly
>>> executable. Go

Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-05 Thread Craig
Thanks David,

I agree, compiling an existing CMake project is fairly straight forward;
however, adding files or starting a project from scratch has been an
exercise in frustration. Moreover, while I would love to have the time to
learn CMake, I really shouldn't have to as it provides no benefit (as far
as I can tell) compared against the "go build" solution.

Generally speaking, the modern development environment is sufficiently
complex between IDEs, version control systems, online code hosting, bug
management, distribution systems, test servers, build servers, etc.,
(that's not to mention the complexities of the actual problems for which a
developer is trying to write solutions)--it just seems like the unnecessary
complexities of metadata-based build systems aren't worth learning when
automatic systems should (and often do) exist. Personally, I can't spare
the time to learn another tool that will be obsolete soon.

And while CMake and the like _are_ broadly applicable, most languages have
IDEs capable of managing the complexities internally (Vala is the only
language that's required me to learn CMake or Autotools). Of all the Vala
IDEs I've found that claim to be able to support CMake or Autotools, none
are able to handle more than a small fraction of the conceivable project
structures (if memory serves, Anjuta couldn't even handle most Elementary
projects).

Finally, rest assured, I haven't been actively working on Elementary for
lack of time; however, when I had the time to contribute, the project
management (or lackthereof) was a huge buzzkill.

Thanks for your response,

Craig :)


On Tue, Feb 5, 2013 at 3:16 PM, David Gomes  wrote:

> If by "Elementary", you mean elementary OS, I'd like to say that I've been
> doing desktop development there for almost a year now and only rarely did I
> have to use CMake to its full extent. All I have to do is fetch a project,
> "mkdir build; cd build; cmake ..;make;", and after I've fetched a project,
> I really only have to write some code "cd build;make;". I really hope CMake
> isn't the reason you aren't helping us, because right now we could really
> use some help!
>
> However, I did learn how to write CMakeLists.txt files on side projects,
> which came in handy later on for elementary OS development, but to help us,
> there's no need to struggle with CMak. If you need to write anything, I
> encourage you to learn because it's really easy -
> https://github.com/davidgomes/2dplatformer/blob/master/CMakeLists.txt,
> that is the CMakeLists.txt I had to write for a side project, and it was
> quite simple (also, I do realize it's pretty badly-written, from what I've
> been told on #cmake).
>
> Those Go build tools you're talking about look cool and easy to use, but
> they are go-only. I think you should learn CMake or Autotools because you
> can use them with every language/library/framework that needs building
> (even Go!). Anyways, "go build" is probably not too hard to write for Vala
> projects that don't use any external libraries.
>
> Oh, and I just remembered, autotools, CMake and the likes help you A LOT
> with packaging your applications. They handle lots of stuff that would be a
> PITA to do yourself.
>
> David "Munchor" Gomes
>
>
> On Tue, Feb 5, 2013 at 9:05 PM, Craig  wrote:
>
>> Firstly, let me just say that CMake and Make are a pain to learn. I'm a
>> professional software developer and I still can't figure them out. In my
>> job, we use tools that automate the nightmare that is project management
>> (usually IDEs) and it's usually still unpleasant. The tedium of these
>> "tools" is the one thing keeping me from using Vala as a primary
>> programming language and otherwise contributing to Elementary.
>>
>> That said, lately I've been getting into Go (golang), and I'm finding it
>> to be an AMAZING language; however, it's only 3 years old, thus it doesn't
>> have an extensive collection of libraries. The only prominent GTK library
>> is very immature and (I believe) it only supports some features from
>> GTK+2.0 (none from 3.0). Among the more amazing features of Go are its
>> build environment tools.
>>
>> `go build [app-name]` is all that is needed to build an entire
>> application--no messing with CMakeLists or makefiles (no project metadata
>> of any kind, in fact). Furthermore, `go install [app-name]` will build and
>> install the application to a location in your PATH, making it instantly
>> executable. Go also comes with an awesome test suite out of the box, and
>> `go get 
>> [http://path.to.online/repository]`will 
>> automatically fetch a package from a public code repository (it works
>> with git and several other repo types) and store the files alongside your
>> own source code.
>>
>> I think it would be a huge help to elementary developers if we at least
>> created a Vala version of (at least) the `go build` tools to facilitate
>> project management. This would dramatically lower the entry barrier to
>> 

Re: [Elementary-dev-community] Go-like build tools for Vala

2013-02-05 Thread David Gomes
If by "Elementary", you mean elementary OS, I'd like to say that I've been
doing desktop development there for almost a year now and only rarely did I
have to use CMake to its full extent. All I have to do is fetch a project,
"mkdir build; cd build; cmake ..;make;", and after I've fetched a project,
I really only have to write some code "cd build;make;". I really hope CMake
isn't the reason you aren't helping us, because right now we could really
use some help!

However, I did learn how to write CMakeLists.txt files on side projects,
which came in handy later on for elementary OS development, but to help us,
there's no need to struggle with CMak. If you need to write anything, I
encourage you to learn because it's really easy -
https://github.com/davidgomes/2dplatformer/blob/master/CMakeLists.txt, that
is the CMakeLists.txt I had to write for a side project, and it was quite
simple (also, I do realize it's pretty badly-written, from what I've been
told on #cmake).

Those Go build tools you're talking about look cool and easy to use, but
they are go-only. I think you should learn CMake or Autotools because you
can use them with every language/library/framework that needs building
(even Go!). Anyways, "go build" is probably not too hard to write for Vala
projects that don't use any external libraries.

Oh, and I just remembered, autotools, CMake and the likes help you A LOT
with packaging your applications. They handle lots of stuff that would be a
PITA to do yourself.

David "Munchor" Gomes


On Tue, Feb 5, 2013 at 9:05 PM, Craig  wrote:

> Firstly, let me just say that CMake and Make are a pain to learn. I'm a
> professional software developer and I still can't figure them out. In my
> job, we use tools that automate the nightmare that is project management
> (usually IDEs) and it's usually still unpleasant. The tedium of these
> "tools" is the one thing keeping me from using Vala as a primary
> programming language and otherwise contributing to Elementary.
>
> That said, lately I've been getting into Go (golang), and I'm finding it
> to be an AMAZING language; however, it's only 3 years old, thus it doesn't
> have an extensive collection of libraries. The only prominent GTK library
> is very immature and (I believe) it only supports some features from
> GTK+2.0 (none from 3.0). Among the more amazing features of Go are its
> build environment tools.
>
> `go build [app-name]` is all that is needed to build an entire
> application--no messing with CMakeLists or makefiles (no project metadata
> of any kind, in fact). Furthermore, `go install [app-name]` will build and
> install the application to a location in your PATH, making it instantly
> executable. Go also comes with an awesome test suite out of the box, and
> `go get 
> [http://path.to.online/repository]`will 
> automatically fetch a package from a public code repository (it works
> with git and several other repo types) and store the files alongside your
> own source code.
>
> I think it would be a huge help to elementary developers if we at least
> created a Vala version of (at least) the `go build` tools to facilitate
> project management. This would dramatically lower the entry barrier to
> Elementary development, and it would encourage an organized structure for
> application source code across applications.
>
> At this point, I'm not proposing spending time and resources working on
> this, but I'd like to get some discussion going about the merits of this
> idea, particularly from people with Go and Vala experience.
>
> Sound off!
>
> -Craig Weber
>
>
> --
> Mailing list: https://launchpad.net/~elementary-dev-community
> Post to : elementary-dev-community@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~elementary-dev-community
> More help   : https://help.launchpad.net/ListHelp
>
>
-- 
Mailing list: https://launchpad.net/~elementary-dev-community
Post to : elementary-dev-community@lists.launchpad.net
Unsubscribe : https://launchpad.net/~elementary-dev-community
More help   : https://help.launchpad.net/ListHelp