Re: [Vala] Vala++

2017-04-04 Thread Daniel Brendle
On 04/04/2017 11:47 AM, Mohan R wrote:
> Hi,
>
> A request to gnome+rust language developers, Please keep dbus and glade
> integration as easy as Vala. I enjoy writing GUI and dbus apps with Vala.
> It's just awesome integration which I don't see in other language bindings.
>
> Thanks,
> Mohan R
I second this.

As a matter of fact there are many languages you can use gobject in. But
it doesn't necessarily feel right because you're supposed to follow the
patterns of the language (and naturally also want to do so) but you have
to follow GLibs pattern. About ten years earlier i started programming
against Gtk in python which was one of the more convenient ways to do so
at the time (before i tried coding Gtk in perl and C). Oh boy. It was
such a hazzle until I figured out which of the mechanics belonged to
python and wich ones belonged to glib and even that there is a
difference between python threads and glib threads. Each language brings
their own means (stdlib) of interfacing with system functionality and
GLib brings it's own. This will allways be confusing in any language
that does not follow the same principles as Vala and Genie. I've read
that you can use Rust without a standard library. Maybe this will
actually make it suitable for GObject code. I know i repeat myself, but
i am stoked to see the results.



___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Al Thomas via vala-list
> From: Alessandro Pellizzari 
> Sent: Tuesday, 4 April 2017, 10:27
> Subject: Re: [Vala] Vala++


You seem to over talking Rust and under talking Vala. 

> Rust, on the other hand, is a general language, that can be used for 
> many things: CLI apps, OS kernels, C-compatible libraries, GUI apps, 
> servers, web apps, etc. etc.


The https://www.rust-lang.org/ website still labels Rust as a "systems 

programming language", but going through your list and applying Vala:

CLI apps, for Vala see:
https://valadoc.org/glib-2.0/GLib.OptionEntry.html - for handling args

https://wiki.gnome.org/Projects/Vala/IoChannelsSample - for handling pipes
https://valadoc.org/curses/Curses.html - although an ncurses binding would
be good

OS kernels, well that's not a good use of Vala

C-compatible libraries, surprisingly the Vala compiler is mainly in a
C compatible library called libvala. If you want to write a library in
Vala then a few tips:
--hide-internal switch of valac controls symbol visibility with GLib's
G_GNUC_INTERNAL macro
Producing a GIR with valac and then using g-ir-compiler allows bindings
to be produced that can be used in many languages
There is the beginnings of a tutorial at 

https://wiki.gnome.org/Projects/Vala/LibraryWriting


GUI apps, hmmm GTK+3 anyone? Vala includes excellent bindings and also
composite template code generation routines with the use of the
[GtkTemplate] attribute.


Servers, web apps, etc. :
[DBus] attribute for code generation
https://valadoc.org/gio-2.0/GLib.Socket.html
https://github.com/arteymix/valum/ and importantly work on Vala Server
Gateway Interface (VSGI)
http://www.ambitionframework.org/
Maybe all of these don't fit with your needs, but there is an active Vala 

community and I hope these examples have broadened your outlook a little.

> Bacause of this, the ecosystem is many times bigger, so it's easier to 
> find skilled devs, but also crates (linkable libraries), bindings for 

> current libraries, etc.
There are certainly more resources put in to Rust. Remember it is sponsored
by Mozilla. There is a core team:
https://www.rust-lang.org/en-US/team.html
and some of them are paid to work full team, e.g.:
https://news.ycombinator.com/item?id=13324458

Mozilla's audited financial statement for 2015 ( 
https://static.mozilla.com/moco/en-US/pdf/2015_Mozilla_Audited_Financial_Statement.pdf)
 shows $414,380,000 in royalty revenue and $214,187,000 software development
expenditure. Whereas the GNOME Fiscal Report for 2015 ( 
https://www.gnome.org/wp-content/uploads/2016/08/GAR2015-web.pdf ) shows an 
income of $644,174. Notice the missing zeros at the end there.


Vala follows a very different development model. What is amazing that after
a decade from the initial release Vala is still going strong. Look at the
latest release notes ( 
https://mail.gnome.org/archives/ftp-release-list/2017-March/msg00119.html ) and 
you see at the end 31 people credited with contributions.


Vala/Genie is a very useful tool for producing performant native binaries for
a wide range of applications. Including embedded systems, command line and text
based user interfaces and graphical user interfaces.

Vala certainly has some rough edges that need smoothing off before any
1.0 release - but that is another thread :-) If you wish to participate
then great, otherwise good luck with your chosen development platform.

Al

P.S. for a more critical view of Rust one article is 
http://esr.ibiblio.org/?p=7294=1
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Alessandro Pellizzari

On 04/04/17 13:28, Al Thomas via vala-list wrote:


From: Alessandro Pellizzari 



You seem to over talking Rust and under talking Vala.


No, I don't. :)

I know all you have linked. I have been following this ml since 2008. I 
also know the article by esr and agree, in part, with him.


Rust is a hard beast to learn. It took me months to have a decent grasp 
of it, and I'm still missing many "rustic ways" of doing things, while 
in Vala I was productive in weeks.


But, on the other side: no memory leaks, no segmentation faults, no 
concurrency mess-ups (unless you try VERY hard).


I don't want to advocate rust (but try it. You will hate it. And then 
you'll love it :).


What I'm saying is exactly what you said: Rust has many more resources. 
It's growing much faster (it is not even 2 years old).
Inevitably, in a couple of years, it will be ahead of Vala even in 
Gtk/Gnome support, unless hundreds of developers adopt Vala now.


I am sorry about it because I really liked the idea behind Vala.
I am glad about it because it's a safer language.

Bye.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Al Thomas via vala-list


> From: Alessandro Pellizzari > Sent: Tuesday, 4 April 2017, 
> 13:47
> Subject: Re: [Vala] Vala++

> On 04/04/17 13:28, Al Thomas via vala-list wrote:

>> You seem to over talking Rust and under talking Vala.
> No, I don't. :)
> Rust is a hard beast to learn. It took me months to have a decent grasp 
> of it, and I'm still missing many "rustic ways" of doing things, while 
> in Vala I was productive in weeks.

May be that's why Rust is still labelled a systems programming language.
So it's in the same application space as Erlang. Vala is a lot more
fun and gives people who are not systems and software engineers the
opportunity to express their ideas. Although Vala has and needs all
levels of abilities.

> But, on the other side: no memory leaks, no segmentation faults, no 
> concurrency mess-ups (unless you try VERY hard).

Vala is pretty good on this, but hopefully you took a little bit of
your time and reported the problem you had with Vala. Just as Rust
users do:
https://github.com/rust-lang/rust/issues/4494

Also Vala links to libraries that may cause such problems. I'm not
sure how Rust deals with that. I found this in the Rust docs:
https://doc.rust-lang.org/book/ffi.html#ffi-and-panics
but that says "Please note that catch_unwind() will only catch
unwinding panics, not those who abort the process."

Is there a lot of wrapping? The initialisation of GTK uses wrapping
in the example:


> What I'm saying is exactly what you said: Rust has many more resources. 
> It's growing much faster (it is not even 2 years old).

I guess that must be a typo. Looks like the first commit was back on

16 June 2010:
https://github.com/rust-lang/rust/commit/c01efc669f09508b55eced32d3c88702578a7c3e
Or maybe you mean from the 1.0 release. Looks like that was 15 May 2015:
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-100-2015-05-15
So yes, five years from first commit to 1.0 release is pretty good.

> Inevitably, in a couple of years, it will be ahead of Vala even in Gtk/Gnome 

> support, unless hundreds of developers adopt Vala now.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Alessandro Pellizzari

On 04/04/17 08:22, Daniel Brendle wrote:


On 04/03/2017 02:16 AM, Nor Jaidi Tuah wrote:



https://blogs.gnome.org/chergert/2017/03/31/rustic-gnome-day-3/



There are many languages that are also fun when it comes to programming
against the Glib based library stack. The more interesting part is: will
there ever be a language that makes it also as convenient to write
gobject-introspectable libraries.


From the post:

"In particular, Niko and Federico have been working on a GObject plugin 
for Rust that allows us to have a nice, almost Vala-esque, syntax for 
writing GObjects"


Bye.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Ulink
Am 2017-04-03 um 02:16 schrieb Nor Jaidi Tuah:
> It looks like Vala is going to have
> a parallel life:
> 
> https://blogs.gnome.org/chergert/2017/03/31/rustic-gnome-day-3/
> 
> I hope the gnome+rust people succeed in
> recreating the Vala awesomeness in Rust
> (even if they don't name it after Vala).

I simply can't understand why the Gnome people seems to hate or at least
ignore Vala and instead promote Javascript or Rust or other weird stuff.

This makes me very unhappy.

IMHO Vala is by far the cleanest, easiest and most performant way (both
in terms of coding and running) to use GLib/Gtk.

I recently wrote a 200k LOC Gtk app and Vala did the job perfectly. No
way for Javascript, Python, C++ or even C or Rust.




___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Christian Hergert
On 04/04/2017 01:47 AM, Ulink wrote:
> I simply can't understand why the Gnome people seems to hate or at least
> ignore Vala and instead promote Javascript or Rust or other weird stuff.

Some of us in GNOME have spent many years writing programming languages
and runtimes. Therefore our view is somewhat nuanced and opinionated.
Your viewpoint may be different, and that's okay.

> I recently wrote a 200k LOC Gtk app and Vala did the job perfectly. No
> way for Javascript, Python, C++ or even C or Rust.

Congrats! Builder is about 200k of C and it's taken me the past 2 years
to get there. That amount of work should be applauded no matter what the
language.

Cheers,

-- Christian

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Daniel Brendle
On 04/03/2017 02:16 AM, Nor Jaidi Tuah wrote:
> It looks like Vala is going to have
> a parallel life:
>
> https://blogs.gnome.org/chergert/2017/03/31/rustic-gnome-day-3/
>
> I hope the gnome+rust people succeed in
> recreating the Vala awesomeness in Rust
> (even if they don't name it after Vala).

There are many languages that are also fun when it comes to programming
against the Glib based library stack. The more interesting part is: will
there ever be a language that makes it also as convenient to write
gobject-introspectable libraries. That is the one true thing that one
can do very conveniently with Vala but with no other ecosystem can do
yet. I hope the rust-gnomies care about that too and not only on using
the bindings. It's an integral part of integrating well into the gnome
library ecosystem imho.
I am stoked to see what the results will be.




signature.asc
Description: OpenPGP digital signature
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Starting with Vala

2017-04-04 Thread raum
Hello,

I humbly tried to create some programs in Vala but I made a lot of
mistakes (especially on NPC which was my first "big" program that is
really not optimized, clean, etc. but has the merit to try something
complex)

http://www.github.com/Raumy

You could take a look to "check_fs" which is better and my lastest 
"graph_map".

Regards

Raum

> Hello list,
>
> i would like to learn Vala and plan to port a Mono-GNOME-App to Vala. I
> already seen the documentation.
>
> Maybe you know some small Vala apps where i can see the code in action?
>
> Greetings
>
> Sascha
>
> --
> Sascha Manns
> Maifeldstraße 10
> 56727 Mayen
>
> P: +49-2651-4014045
> W: http://saigkill.tuxfamily.org
>
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Christian Hergert
On 04/04/2017 12:22 AM, Daniel Brendle wrote:
> There are many languages that are also fun when it comes to programming
> against the Glib based library stack. The more interesting part is: will
> there ever be a language that makes it also as convenient to write
> gobject-introspectable libraries. That is the one true thing that one
> can do very conveniently with Vala but with no other ecosystem can do
> yet. I hope the rust-gnomies care about that too and not only on using
> the bindings. It's an integral part of integrating well into the gnome
> library ecosystem imho.
> I am stoked to see what the results will be.

Yes, it can go both directions.

-- Christian





signature.asc
Description: OpenPGP digital signature
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Alessandro Pellizzari

On 04/04/17 09:47, Ulink wrote:


I simply can't understand why the Gnome people seems to hate or at least
ignore Vala and instead promote Javascript or Rust or other weird stuff.


I really like Vala, and I also really like Rust, so don't hate me for 
this post. :)


I think the main problem is that Vala is a very small ecosystem (few 
core developers, few users), ha a "proprietary" syntax, even if it's 
similar to C# and is strongly oriented towards Gtk software (as it's 
based on GLib)


Rust, on the other hand, is a general language, that can be used for 
many things: CLI apps, OS kernels, C-compatible libraries, GUI apps, 
servers, web apps, etc. etc.


Bacause of this, the ecosystem is many times bigger, so it's easier to 
find skilled devs, but also crates (linkable libraries), bindings for 
current libraries, etc.


So, on the long run, I am afraid/glad it's gonna replace Vala completely.

Bye.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Writing DLLs, was Re: Starting with Vala

2017-04-04 Thread Al Thomas via vala-list

> From: "r...@no-log.org" 
> Cc: vala-list 
> Sent: Tuesday, 4 April 2017, 8:41
> Subject: Re: [Vala] Starting with Vala

> You could take a look to "check_fs" which is better and my lastest 

> "graph_map".

I really like what you have done here:

[CCode (cname="G_MODULE_EXPORT event_save_bitmap")]
public bool event_save_bitmap() { ... }

in:
https://github.com/Raumy/graphmap/blob/master/src/graphmap.vala

Does this allow you to produce a Windows DLL? The G_MODULE_EXPORT
should add __declspec(dllexport) on the Windows platform. As per:

https://developer.gnome.org/glib/stable/glib-Dynamic-Loading-of-Modules.html#G-MODULE-EXPORT:CAPS

Thanks,

Al
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala++

2017-04-04 Thread Ulink
Hi Christian,

> Some of us in GNOME have spent many years writing programming languages
> and runtimes. Therefore our view is somewhat nuanced and opinionated.

As mine is ;-)

But I don't understand why the Gnome guys effectively ditch vala (as it
appears to me, maybe I'm wrong?). I simply can't find any real reason
for this.

Gjs is of course a good choice for small Gnome Desktop apps, but why not
favor BOTH? Vala and Gjs would be a perfect team I think in different areas.

I REALLY don't want (and can't ;-) ) force someone at Gnome to do
anything they don't want to do but it's a pity Vala don't receive more
support from Gnome.

> Congrats! Builder is about 200k of C and it's taken me the past 2 years
> to get there.

To be honest, a colleague has written 3/4 of it, so my part is only
50.000 LOC (mostly system level code), but total LOC is 200.000.

For performance and resource reasons, there was no other option than
Vala (maybe except C, but this would have been 500.000 LOC).

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list