Re: [Vala] any latest vala binary for windows?

2018-09-20 Thread Daniel Brendle
On 9/20/18 2:40 AM, oyster via vala-list wrote:
> thanks, but this github's build uses installed vala to compile latest
> source, in other words, there is no pre-built binary. It installs
> mingw-w64-x86_64-vala-0.38.4-1 first, which happens do not work on my
> MSYS2(no matter I input `valac`, `valac --help`, `valac test.vala`,
> there is no message displays;  `valac test.vala` does not produce any
> C file)
>
> Years ago, vala did not work on my MSYS2. Years later, it fails too.
> Maybe vala loves Linux better. Perhaps this is my last time to try
> vala before I totally switch to nim for which I can build the latest
> version without any problem.
>
> bye. good luck to vala and me
> Al Thomas  于2018年9月20日周四 上午8:01写道:
>>> On Thursday, 20 September 2018, 00:45:51 BST, oyster via vala-list 
>>>  wrote:
>>> I give up building from source. So is there any binary vala for
>>> windows? On MSYS2, there is an old mingw-w64-x86_64-vala-0.38.4-1
>> It looks like 0.42.0 is there: 
>> https://github.com/Alexpux/MINGW-packages/pull/4350
>>
>> I'm not a Windows user so can't really help further.
>>
>> Al
>>
>>
>>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
> Years ago, vala did not work on my MSYS2. Years later, it fails too.

i have to object, as i built libgtkflow, libhttpseverywhere, effector,
all of them being projects of mine written in vala, on msys2 for win32
in 2017 and it worked more or less flawlessly.

___
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/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 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


[Vala] Invalid cast Warnings

2017-02-05 Thread Daniel Brendle
Hi, fellow valaists.

At the moment I deal with a series of warnings like these:

(process:3325): GLib-GObject-WARNING **: invalid cast from 'OParlSystem'
to 'System'

I have a library that exposes a set of classes. I extend each of those
classes in the application that uses said library. When I fetch a new
Object of one of those library-classes, I downcast it to the matching
class of the application layer code.

I compiled a minimum example to trigger the issue here:

https://0bin.net/paste/J0sgx2b2NJp6lTj8#QBfz-GUhWagsfGsF7nUqEn/8XneAiL9NhYNIdo8GRt6

Note that the deriving application-layer class System is entirely empty
and only inherits from the library-level class.

Why is this considered an invalid cast?

Thanks in advance,

Grindhold



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


[Vala] Vala's little helpers.

2016-12-19 Thread Daniel Brendle
I want to leave this here as a little premature present for the holidays
[0].

It's a little bashscript that downloads all of valadoc's devhelp
docbooks and makes them available offline through either Devhelp or Builder.

May the docs be with you. Always.  (And not only if you are connected to
teh internetz)


Happy holiday, Vala community!

[0] https://github.com/grindhold/my_valadoc


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


[Vala] VAPI-Bindings to obscure c-types.

2016-12-05 Thread Daniel Brendle
Hi there.

First of all, sorry for the bad subject-line, but I'm really missing the
words to describe this in a concise manner.

As some of you know, I am playing with writing a GLib wrapper for
libode6. I've come across another problem that I don't think has been
documented on this mailinglist or elsewhere yet:

In libode's code, there is a type called dReal. Depending on some
compiler flags, dReal might be a double or a float:

#if defined(dSINGLE)
typedef float dReal;
#ifdef dDOUBLE
#error You can only #define dSINGLE or dDOUBLE, not both.
#endif /* dDOUBLE */
#elif defined(dDOUBLE)
typedef double dReal;
#else
#error You must #define dSINGLE or dDOUBLE
#endif

The library then uses dReal in various method signatures that I have to
bind against. Is there any possibility to cover this in vala? I can
never know which distribution sets libode's compiler flags in which way,
so I fear my VAPI would break on some systems.

Help's very appreciated.

Yours, Grindhold


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


[Vala] Vapi bindings and a weird C-pattern

2016-05-14 Thread Daniel Brendle
Hi, Guys

I want to write VAPI bindings for liborient [0].

While analyzing the C-code i came across the functions which turned out
to work in a somewhat unexpected way.
Usually one has some struct, methods to create and free the struct and a
set of methods that operate on that struct. Such code can be converted
to VAPI bindings in a straightforward way.
However liborient keeps managing stuff like this:

 - One struct to represent a handle
 - One struct to represent a connection
 - A set of methods which operate on _both_ of the previously mentioned
structs.

A typical method-definition looks like this:

long o_bin_dataclustercount(orientdb *o, orientdb_con *c, struct timeval
*timeout, int nonblocking, short clusternumber);

In Vala I'd like to use the lib like this:
var handle = new OrientDB();
var connection = handle.connect("foo","bar");
connection.dataclustercount(sometimeval, 1, 1);

Under the given circumstances I have the feeling that the best thing one
can achieve is something like this:

var handle = new OrientDB();
var connection = Connection.connect(handle, "foo", "bar")
handle.dataclustercount(connection, sometimeval, 1, 1);

Am I right? Is there any possibility to cover this C-Pattern?

Second question: The library imports  at some point and uses
the timeval definition from in there in method signatures. How can i
write equivalent Vala Types to write Vala signatures for them?

Thanks in Advance and a nice evening,
grindhold




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


Re: [Vala] Mixing C with vala

2015-09-24 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 09/24/2015 07:17 AM, Abderrahim Kitouni wrote:
> Hello,
> 
> Le mer 23 sept. 2015 23:21, Daniel Brendle <grindh...@skarphed.org>
> a écrit :
>> The second gist is a gist that contains a main.vala, and a 
>> gereon-page.c and a gereon-page.h . those files are generated by
>> vala with the -C and -h-flags. Additionally there is a
>> gereon.vapi that describes the methods of Page towards the
>> vala-compiler. This example does not work beacause the
>> unreferencing methods in the C-stage of main.vala is
>> "gereon_page_unref()" instead of "g_object_unref()". Why is
>> that?
>> 
>> https://gist.github.com/grindhold/f2a39dab2dd1c172b355
>> 
>> Thanks in advance. I'd really like to understand what happens.
> 
> The problem is the vapi. It should be public class Page :
> GLib.Object {
> 
> One more thing: You don't need to keep the Vala generated code and
> modify it; a better solution would be to declare the methods you
> want to implement in C as extern and implement them in another
> file
> 
> HTH, Abderrahim
> 

Ah that was the problem. It works. Thanks for the tip with the extern
keyword.

Yours, Grindhold
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWBI07AAoJEBuqgJs6izSEDqEQAIExkAlaUcsCOeyALWYa16FV
lehYoNlZKPHWkQIJlaOfcl/GVq7DmMS7U/tqlkqWk7zQ7dNDvYC8ScGKRSFa6Kze
ocryeFtk1X8kZiDEh7yyMpb30jhSl1sazc3Un5EP5sXiC/lMwDSPtMzxjq8MResH
GS2c4BZ/osoTWu5rNM7edOCjR3Yw8V4/fpsKEaDldfs00WZXFUKTwyNg3KR/Yhyl
xf4LkESsKmxWY0JFlWd0Nv4xFxtD2125SR2NDPoAEvl/jTKU14edvGKuwXUxkBHT
m0MGnDz9ui/k2t7PMDCASNcSBWEhiZlQWm3pxyg5LLdChEZlJa2vRFvKg+inD6In
jdJAoxnEaPSybxphf49EOOeVBBiV9J7/ilnxbi8r0lH1BWs7+O6B4eAKfmN6eySh
cewXR7I2iHtqvKkZMu2y+Ra+DaRl+IX8zQScILucNUM00WEenZ0cHBoJxGUckfAH
UeXyWtT0+hMDuADNl48H2K3d0sSstafCDFj8B1rYib/5BNLNl+czzWCFgHHJGhSw
52Kr4OB+7Rubm0BD6rNrDQaYUqqihPvpT+vI+vXi6HJQwPaqoGXDGf7KPcXy3l4G
6pgNWUuOqmkXXK/jmg/ZODOVpOiKCDq9+IiYjO9ocNu3UTzoffXSWLb2eWWJJ1kD
E53/5i4Mu2PmYwWjv8GD
=9o0u
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Mixing C with vala

2015-09-23 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 09/23/2015 11:10 PM, rastersoft wrote:
> 
> Hi:
> 
> If I can do a sugestion, try to use Autovala to automagically 
> generate cmake files. It allows to easily mix C and Vala too.
> 
This might be a solution to the problem but i'm afraid it does not
help me understand what is actually happening.

I've prepared two gists to reproduce the problem.

The following is a gist that contains two vala-files. one containing
the main method. The other one containing a class that is being
instantiated from the main-method. This example works as you'd expect.

https://gist.github.com/grindhold/69aaa90e30bc130b7ae0

The second gist is a gist that contains a main.vala, and a
gereon-page.c and a gereon-page.h . those files are generated by vala
with the -C and -h-flags. Additionally there is a gereon.vapi that
describes the methods of Page towards the vala-compiler. This example
does not work beacause the unreferencing methods in the C-stage of
main.vala is "gereon_page_unref()" instead of "g_object_unref()". Why
is that?

https://gist.github.com/grindhold/f2a39dab2dd1c172b355

Thanks in advance. I'd really like to understand what happens.

Yours, Grindhold.



-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWAyXqAAoJEBuqgJs6izSEPcYP/0nYc0EgI1EUZ314BmseW4lV
2wTyLAJZ0U4yWfyhHNt6lYfbcOvi3Q6SnvPRVU0BHSdENkHijGqP/BNj3QEys8z0
3MPr++adLAIiGm+wREAKUXqRYL/ogyP6D+Ag2KB6eQKkVraaRMhS/DvyMo0IVtNG
nYsV/sV5Jg+jMiZAo3/3zTjTgVOzAyj7M0yOPadPAO5X1YCdFk+RmesGs2CAYElo
AY5y9Tk/218V3p3FxLGUuoAf2S+Z+BqgEphxXiQKH+9sU20uv++pvDu7pfmEp5tU
l7GZyGUofPEXWvNu3jf6Nps4Pg0A7qtFQTLMMVUdbksZg9ILlwfl1E7hQSghkEoL
Hzr0ba4OjmygBpgJUo9Dm2zicinB/J3ktNBk3SYQ01Y5wWFSaNiSW+x3z097mwBS
03ZBKyc4JybgCXhEkTEJbu3lm+Jt/9/rbeIriSFRshNpcXKHSZcqkpvacUy+IjMF
VC4KrC5XgGb7ElBA9o9L98SwsTYpezqh+92m3qa5tcJA61QrT3rMkOg9GMeu7Jg9
jz+EQ5NgUaQ+5eBSIb/DXR4HDI0lc1WXzq+JE4fpL+KvAh957rT7NAaDOKRWmmT9
AN1RLPBRi17viOyQvUVV8A+CNSUbqJ2rdMzP05zYd7SPtwDlmoVc0zRac6QaRyXT
xRlje156WfIC0MncmYg7
=bWwB
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Diagram rendering via Clutter

2015-06-30 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 06/30/2015 12:44 PM, Козлов Кирилл wrote:
 Hello,
 
 Please give me an advice on what Clutter objects should be used
 for implementing diagram editor. Objects on the diagram can be 
 connected via lines, can be moved, deleted (like it's done in Dia, 
 for example). Any help or shared experience will be appreciated.
 

Hi, Kirill

I've done the how to connect objects graphically problem recently in
my project rainbow-lollipop [0]

I don't know if this is the nonplusultra way, but what i did was: I
defined myself a custom constraint which i called ConnectorConstraint.

Let's assume we have 3 actors:

Actor A   -  An actor that we want to connect with another
Actor B   -  The actor that we want to connect A to
Connector -  An actor that draws a connection (e.g. a line) between
the two

The ConnectorConstraint is initialized with the Actors A and B.
Everytime the allocations of A or B change, the constraint will
allocate itself appropiately between A and B. We assign the
Connector-Actor the ConnectorConstraint and voilá, We have connectors.

Releveant sourcecode can be found here [1] in lines 38 to 127

Hope this helps,
Grindhold

[0] https://github.com/grindhold/rainbow-lollipop
[1]
https://github.com/grindhold/rainbow-lollipop/blob/master/src/nodes.vala




-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVkojhAAoJEBuqgJs6izSEAtMQAIyISJzA0EANiPLVvZC7uw9f
2S5NOS4nGTEU+BBlLWeA1nhqMvD18rrPSS372K5AZDsQBTdTUzB/EEK4IHw1kJti
ksdpyWD67pP84c/sDV50HCOP3Djx33XbAvJ8bPKzSD1HeJE+rulT/cFsGacoZj1F
erjnl19OWrX6EGKRt8USJr/2CwJVqmvVYmHpH2jvsE9mPFHf0iDebuU/EMHTneWB
6B9EIEwejURKzUs4JWi+g7BjUfd8ISuBGpY45PYGUqz7n8bvPhIuKGkSQqI5Tn7N
70U+7ocnH7PVJleilZLehBl8fJk2saBypnF3qrQ2ttgubLJrGVveXKTc9M3IA7a0
bP97YEeB4Q5XpnDuYpgFaOPfXf4pbdOWGl1VVZCOqm7FUgxdCGg6D5I4TgGAIs83
3fZIvPK2VyNNhfZAWrD0I9XNjhDIkKCsDF6ZEer6rdywumHokQUFSyKDCbTTw+T1
CDVMLI4n5eFOVY1oXYFGmmMvyNIPVQ5dgMcpluukyom5cBjPZCYKeUjDdRBysS6X
/K3BeHgvkrYpoFCXRwGMk8SLEz/HUV4cCuGfNfASHkkW8388JPvpmQtP27atJgvv
YzQz2PjL7Z2e/e/MzENSgvscAW/IZZatG6yplf7NYidDZLTQ46BTehzr7OWsHPjY
2Xvwo8Y2UhhN01VD6+Z2
=W5gC
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Need some feedback for Valum, a web micro-framework!

2015-06-27 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 06/27/2015 01:23 PM, Al Thomas wrote:

 I was intending to use json-glib (
 http://www.valadoc.org/#!wiki=json-glib-1.0/index )for a project.
 What are the problems with it? Thanks, Al

Wow! I completely overlooked the methods
gvariant_serialize/deserialize and gobject_serialize/deserialize.
Valum, here i come! (After .. uuh .. refactoring some stuff, that i ..
err .. implemented much more complicated than it had to be)

Thanks.

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVjoyXAAoJEBuqgJs6izSECB8P/iK6jg0E211bgJwI2X5eIxZE
MKlZvkayyPq2tH2QjuqL+Qj/F++JCXk1d0mc+ViQaXBE1w/fvTrosvC4743rh6f1
4anI4GJdrphRZWTkFrcLVBmIcZNW3IxqtJFDnRXn9+/xCogNAZu2pq+CFZfgssn9
JaqByOdhO41CQo3DqRoH37doqa5wcC5BYVgkhbyrfN4JV8XwsfLjXuXvr9nUsGXU
1npcryIiSjAmuAIG+HpwJsAOnHSx5LGG4iec1NEa/uaQKyWqWofZytAF4zAJW39p
lJZ9TKwVNP0uWDXSE+Ppfg3pAfJocB3mwfDR8ktL9ylfIrBQwfyV/Nx51EfXlfAS
LS8Pz4H74pMmVb/3cch5ezxQ/WHrlJgBZER7adB1wMnAuFUoqKIcH+7rYsDkWQwM
MBBd/7TTlo+GzPUC6lsO4CNYyTZA3aIDg9N//6g0/5Rl5gplmk/Yfm6KH+qLsNX8
NxXzyETyRLM5CM5Gfp9W9e/nIV78BgXxITagKDvCG+QseQJpmJUcncsUiqucgmWb
RS4Ttil1eeW4EU2RUn1FwLZM0TZNMrgbsx0DDT5NlwPF6Tsb3Xjb4GW6nkC5j2oq
p/W/lxJLKlpCLxC8J1yDW06fZes6enCBd2joVq97UF5vFSBJx72/UlTIqnG7i9Ab
y88oNe+y2hrpu3c3nUi/
=OX+x
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Need some feedback for Valum, a web micro-framework!

2015-06-27 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi, Gillaume

I discovered valum in the trending projects list of github a few
months ago. The first thought was oh wow, i could write my future web
backends in Vala; how cool is that? directly followed by the
remembrance of how painful it is to parse and generate JSON in vala
when compared to Go or to Python. To be honest, this is the only thing
that keeps me from giving valum a try. Is there some way of
conveniently marshalling/unmarshalling JSON in Vala? By convenient i
mean an programming-effort comparable to pythons json.loads() or Go's
(un-)marshalling methods? If we had this, valum would seem to be a
viable option and i'll promise, i'll try it in depth for my next
web-related project.


Yours, Grindhold


-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVjoAiAAoJEBuqgJs6izSE/x4P/jiryQ4X0utROxFKcP0HAq0M
XOgS2dC6jBFT/t3c8R+vYI8cVs+3V4QnsvUaFarhGbQsNEZkCnhcEy6VP9w3nzFe
6cFL6xqxyHAuil4xQVKI7UOxTFCjVo8WQl7h9i39eTRwVmCLXYCenYPwvYuulbRZ
jDLe+T9DWsZnNrS2w2cDzSFkpA+IyCbV3By3mha8mYSV/0JlodSaqg4IYxheAdsM
ngejp/+oZ3Q+4gSIsDtvrAj/NOiJdWpgbKPGOClX8KjzHWvp9ELpVII7SKCQN8P2
FjPKifTpnI7MBzHs7DiYjz8ZmpwBpVBCOPBIxq9IWiBhKSoTtvz+0YEsYaSsVbbh
EupAEqN6eSnYZR1l9RuXElL1t8UiaYQqHanR3aKPVJb1IzlHpFwbheSDdZgH73um
z3RlQxY3K4A9FGWGNLrmzhdP0KJG3sXo3o9ll2fwKqor4d6zVYCWQPPmJFyNy7sL
M/bVCf1f+wYuaqk9xI27CeewJRTjIiORpEsBDjSKiM8K5et32YMTHOh48BwtZNU2
Fnnvni3/9cqIGVz2aD183Ujt5TgZrLvcgVZ/l8e0075vJX16ytR1xpEf3g0qwKgK
U9cXvuOsWABs0UOM3r3FZl9oYdDmWDwZGQkEaUSRgkSnxhJ4MjN/gPEjp6MpTe72
WODya1D3C3bDfZBcIZtW
=+k3E
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] libserialport binding

2015-06-19 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 06/19/2015 05:52 AM, ?? wrote:
 Hi:
 
 i was written libserialport vala's binding
 
 https://github.com/Matrix-Zhang/libserialport-vala
 
 Best Regards... ___ 
 vala-list mailing list vala-list@gnome.org 
 https://mail.gnome.org/mailman/listinfo/vala-list
 

Very nice,

Could come in handy one day. Please consider contributing your
vapi-file to nemequ's repository for non-gobject vapi-bindings:

https://github.com/nemequ/vala-extra-vapis

This is the place where many people look for bindings first.

Happy hacking,
Grindold.

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVhE79AAoJEBuqgJs6izSELuMQAKcW1HTOuRR41xnOFHDnsz4x
bzcsqtOuR4XVyasBhmT3EU6qUWxXtqIr3MdYXi5Nthtx8IOiyCIEssX8gNFHb6JA
1XT7YD62nqMXwUxxPlXLydTqTvcQ7yjoHC4SC/ITKSJpox6z24a8/gZp4rT9W6oU
J8a7QA6O1k4D0nNqfYzp2XNjFQaNSjg03AaoJpysSECmEFBmJx7JVir+ysjF0u1m
hVu0nVG5enDPV2B3zGhRRJoX5iiGBMB0REfm8HEhG/0jOU7wWl0c/SFel6h3Qo0k
A0hhrwNL4XmVY9htWufZlv5FhYWfnU/AwXKXfniuR9/YREpH2VtVIHYnnka5vmtA
K7wMZkLlbvB35i32eqTEhEsgpzrrUYNGO8fFpJs7FqXVyDqLI6smrBRr7GWmkLe/
Zo6ayCPp3CT/zljmRUcwaSJpc6LOaNcScNRFEDvb0U1SMaLGRAAtY5+8juxzHpXD
w2V6U9y0LyVmeIeGymDVPKpdr2kuV7O6P5OCWjaUBiDUK6e9Oym4KOZbNF2Ln/LQ
gT5j2mlLHIAAGKNa+XB9NtaoXy+0w4ZWzxWOWqgkAyeq/wkhzKqicyZApMdUwSoA
GvjtB9DjtMJOD7modD4eGyaRkBYkCHpvwFR1xE8OAIQF+HgenKf5pKFBPk73hq7f
DM6tOGaDmB3NpDSDi9m1
=IHlB
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Flowgraphs for Gtk in Vala

2015-05-21 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 05/21/2015 07:19 PM, Daniel Espinosa wrote:
 Thanks to be open for other build systems.
 
 I've ported GXml [1] from CMake to Autotools and used the last in
 all my Vala projects, then I think I can do the job :-)
 
 I'll fork your repository and make a pull request for it.
 

Awesome. I am thrilled to see the results.

But, as this is loosely related to Vala in general i'll ask right here:

Where do you see the benefits of autotools over cmake in a
vala-project? I know that the GNOME project requires its official
sub-projects to use autotools als buildsystem and i know that debian
packages is most simple when the source tarball uses autotools because
one can leave the debian/rules-file as is. But does this really
compensate for the time-costs of learning and using the (in my
personal view) highly unintuitive autotools? Is there any technical
aspect i am missing here?

Yours, Grindhold.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVXiBlAAoJEBuqgJs6izSEP1QP/32Ouzg6o2BmvkvMPrXYoXkL
cigGLBkTse1OyYTBTLN3Tl6UhoMDhhpIP0/NCtE/rQaT/Fjx/kxF+qL5owOwgEfs
DJh9h6z6MFrsROn3LNeyDx6pZJn7WZcQXzgdEn0IVrYuN0BwjZ/slI1Tv3Ei84fR
msTrGudAMWyAmvy40c44eopVF2LxX4FIB/aGD0ymm3xhsTW0Vflh8HVv4mjGZFqL
da5bUNGzgPVSaZgfuFpVYbsdO/UqUBrQlQVbiCw7IyNwj1tR9rUpKuiAT/wFUGC6
si83r//aloKVwxcmXFDuHYyngpoOfB3pny/m9oad9QuR+H/V1tXmuNPe/wHAYx47
MNbH9uH3M2AwGsu6lxGv5lCX/IDJt34JkZSU1NU8cjCRKtV8uyobfryGJBUJpPvP
+MSxYEzj0UxQnK2TqNQniuIv8A+8DlIeTwJ4ozCX/aHWprOkbYp0PxPts4RKACex
Oa7Uq2Wzmpf8TJ8cjDbu1sTyZpFXjhPSbUGvSTw1FNe8a4xz4zPQMLqWowBsqhy9
9NQs5BAz7QfapqiWOT5V5kwaJrSB7rTAkLKdLeUfdYGbUrCZurfUglUzkGuDU9O2
ePXj6fgP58b6qpw9qdBbWeq06pF2EwjDHlR0AesaDOeVt/i0a4QE5vBUlpauwsmh
kg8zrRv6cRySRV+gumo9
=pmM3
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Flowgraphs for Gtk in Vala

2015-05-21 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 05/21/2015 08:15 PM, Luca Bruno wrote:
 cmake is a hassle for packaging in many ways. And autotools are not
 that hard, really. It takes few minutes to get a project running.
 

Do you have any further reading/info on those many ways? The only
thing i had to change was adding three lines to my debian/rules-file
and everything else worked like a charm with debuild.

override_dh_auto_install:
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
DESTDIR=$$(pwd)/debian/libhttpseverywhere make install

Maybe my projects are not big enough to encounter the problems you've
experienced.

Yours, Grindhold
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVXi2lAAoJEBuqgJs6izSET9QP/10j4HFoJPksK5bF/bEHas23
9PKLrZsgmNvKoy9wbYm+EYTEO8ieVQWY3gCbClkOSSbZXW0Tu8+eKro3st1z4htN
qnWr9FDQjiiOTbPNPVVQkxoUZ0MIo+XKFcWn6FQQK5qWOePAKRJX+EXV0EnU8UOd
508EcwaKF34uozRQY9ymR/4eHG1rdTZeTcjWaV6+emap/69KoIjccPOYHq/jPBW0
F4rAafOu3S4rBkpKVjFfShnx1IvaVuqfnyp4eZpymSwBwUKTYkcKyejiaMabqTAQ
sDJoW4mD7riTyhMjadS9jOF9HONxP1A/plFkNg6MO8m2jmAIq6pi9MEbd+XJiBFy
JR8yP/9QGinldzfwBysKT1DyyAvHMSIM9DmhBxHT7EKG3IXiSo8TJ74X5/NmBKfy
uvr8xtpj3tzFoYEfmSYk1Cb413Tx0pY18QtVIzm01aoKBnNmtC4fX15hqUNj2kbN
JIKL85twpRBhzNFlqqYleX0hLdR7tvHFpc5xN9ztA0dW+E78TTnAO8y+3QsDgbgo
3FL2S1dV1tStmCKb4JusV1enJoCcRwbM8n6cYXiOYZYYUJkUqGCB0sdlbZ4IWTLF
RtmerLPCD0J+nE0eKhSY2/ZseJtC93zfQmNORtA5FZQpYZGPTYgDrGS6xIZXgljO
E0NWR/nxmjEQgLN5nWWN
=B0MP
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Flowgraphs for Gtk in Vala

2015-05-21 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 05/21/2015 01:32 PM, Daniel Espinosa wrote:
 Is it possible to be used to create Logic diagrams?
 
 Why cmake?
 
 Is it possible to port it to autotools? (Do you need help?)


If you mean logic digarams as in i have nodes that emit logical ONEs
and ZEROs, i have nodes that represent logic gates like AND OR XOR NOT
e.t.c and i have nodes that output the results, then yes. of course
you can write logic diagrams with it. Of course you have to implement
your own Nodes for this, but this is no problem at all since you can
inherit from GtkFlow.Node as baseclass and implement your logic on top
of it. See the example calculator.py in the examples folder.

Using cmake has a simple reason: I spend two days trying to use
autotools in one of my vala projects and gave up frustratedly with no
mentionable result. Then i tried cmake and got a vala project up and
running in one night. I am very happy with it and continued to use it
for other projects.
Currently I see no necessity to switch, but if you want to do it and
maintain it, please do and send a pull request.
To be honest, i am a bit curious what i did wrong and to see a correct
solution how to build such a project with autotools.

If you try the port, please be aware that I created some cmake logic
to detect if a system has the libgee-1.0 or libgee-0.8-package
installed and sets the compilerflags accordingly. This is necessary
because of the unlucky decision of the gee-developers to do a
backwards version-number-change from 1.0 to 0.8. On debian jessie
there are still libgee-1.0-packages around. Without that logic it
would be impossible to build on debian older than stretch (testing).

Yours, Grindhold
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVXgDbAAoJEBuqgJs6izSEqJAP/2XV2VhkNH/0BCWG5ufMlXDh
cnoMweeuL2Z5eL+OyX/2zEuhfPqxfg8th/6rim5yMpQ6sdRAk38zZKRe5cj/sUUc
dsH4DE/aTv11g9qVLj2rinRMgAKeN0U+b4jub1oXGfHtM1vSTUqCjoDEn+EiwfRH
h7JvmFJWL3muiSaow+pAb/+aUWFsgdcjZTLqc/minprqrewh1iZWa2VUabqXOGDY
GJYfOUgniguZWR2JWWjwGWgYe1O7N051UChMxGQAhMqjlvXko7pRya6NEZtqQnhT
GLyeihmses+YYRzS5r6Qf7Lresj7mvNifdO3Nt5btZjzWusWp0IwbACRNm+C2/gn
snMLRcOl7DjD9v/o99O2dGo/Efucm0q6V2IaVSepkbh9mcfvoKGb10hYsbs66Hmh
cIZfZa1aHBP6QXHnm6jljC/Y0TH3c6WtmVb2qrATCUTemuDoipYs91V3/MonJLBy
4BrmCjKkq6pbyB8vcyw6+EvtSmsnK78AFwUOV8RzVTjes3oF+eV9SWydQDLpSxeq
BHYXw8A9NY8KNh/Mpme2GfF5G/lgM28nc2v41wDmL2Bq9EdTGZBcpcSTDvRscCly
ECHcjmH4Q1g0vCG2B9h0VqaTbhCvsaZW3no3OPFybAj16CvGRCZpfTSo7x7TLHN5
7njNczaHk1Vuv7HChXOW
=gsmy
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Flowgraphs for Gtk in Vala

2015-05-21 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 05/21/2015 06:04 PM, PICCA Frederic-Emmanuel wrote:
 
 backwards version-number-change from 1.0 to 0.8. On debian
 jessie
 
 will you package it for Debian ?
 
 cheers
 
 Frederic
 

when the API is stable and the bugs are gone, i'd love to see the
package in debian. But i'd need a debian developer as sponsor if the
time has come. I have a GPG key that has been signed by some Debian
Developers, so the prerequisites should be met.
Sponsor? Anyone? :)

Yours, Grindhold
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVXgKOAAoJEBuqgJs6izSElIwP+wcYnzw9w2Vwnk+FCE+nW5wM
Xk3/jEpXDh+jJZq+M0o/vwBlZqR311HnTwoeB7ZOE2MGjWzCHqvNqZK3V9eoGCNI
9AOevzSJxbgxR4I5ZGOhwIuC9DizxskMUqyyr8dRixue1W8MFZlrpm5C04kAUWKn
hP0++TJumjzwFqKRUU9OEVjNzmp1RN4vCnyqc/lhAo6ir/dvn5S4O9QFk2upphzA
CnSB6g+ebeCrLr8/AQ+KJdFZbxj0YYN0INTXHXoFtByy6VohCeRjjLqbVTp2K+kW
Meb9RoP0T3KuxA23n7WC1a7TN5iq7aXI5P845jDNWlLWx0a2EM6J0E88knahY/0q
RLOLFUtUkn0vy4Np+6yOyZPvBaAh5gGLUW5uXGG9bhT6PctcGHxvhaJXcdW2rUFR
gBUpNlhDwmabUHTxncqC7DjBFYmOCavfYtSW53NLX9BDD6teM8kwmdrwj8JjFhxA
ov9N7g5xdSqJDwEs8T17wF2fx4KgYi59Pqn3DBkW9bUsbVA8ydDfjdz0CH3ftWji
fmWdvTwu7CmuQBhrJmCXq02xFTyugYLPnnB0O02/W0jyK2tAzaf2F8B5CZqPCdpC
bunCfDz1BmOEOb+BhjJd6u93EThdP6uV+KWnc7v77kmJOdKmTDxDvCroQPIBnVxC
Jeqt4LK15hwFV33t0N3Y
=oUcn
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Flowgraphs for Gtk in Vala

2015-05-20 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi there!

I wanted to introduce you to a project that has been on my
to-do-stack for a long time. Now it grew to be somewhat presentable.
Meet our very own Blender-Node-Editor-like flowgraph library for Gtk3:

https://github.com/grindhold/libgtkflow

GtkFlow gives you a new Widget, the GtkFlow.NodeView you can add nodes
to this view that have inputs and outputs (so called sinks and sources
respectively). These Nodes and the connections between them can be
arranged by the user by dragging and dropping.
It provides an easy way for users to communicate to a program how
things interact and how things are connected.

If you develop UI (especially for GNOME-related stuff), please let
yourself be inspired how Flowgraphs could enhance your UI-concept.
Some usecases i thought about are:
  - A GUI for GStreamer that you can build and export your GStreamer
pipelines from/to
  - UI Replacement for GNURadio's Flowgraph implementation
  - Video Compositing for PiTiVi

I am eager to hear about your thoughts of possible usecases and
especially for feedback about the library itself.

If anyone can use it, i'd also be happy about helpers that engage in
pushing the project further.


Yours, Grindhold

[I posted the same email to gtk-l...@gnome.org . If this is not
acceptable, please tell me. I won't do it again]
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVXUtWAAoJEBuqgJs6izSEvncP+QFalVHLB/IxT6/DowGMQyMU
04RPuCkFgIGztgJRAJh2M8AHN5LL9IeBM8fyGJTbF2CLhmf+mY7LU7BCd8GZkFBX
+XsrDS7FNyPRCsfiyja5vY3jvn0pKyVURB03fauI/RSiessyJN1L71nfBo9fNbgm
5NRRCnVOs85EVlVNKT3dibJpatt3l9SNqdiHn80/dRBSoCV59BkemTMdk9Nd4SP/
RcQxgFXL6gLMwuFXP3PEHFSZqYFhCBlTectNuqrkZ7Bw6boYcwC/f1Ro20s9YFTQ
8pmL9TTTy9IkSR15QATibHGkEemJDb2murY3YLdUZ5DRVtGNyn2wC6+llUu367PQ
YKc2GX4puyavj/UmeXkhu6TvZlHzs8MCPLQD0JFI+0Gq5USWFlZvrBBqZsyYUAgI
vpRXRT2IK3nG0fIQSTmLhzRJLzLE+omNmT1UuOfNHZVq3yw5OZQeNTO1cwQmB0eW
Ef4OPzJq53Jd3HXz1mY4AktBi/WC7LRp3qvL2FGU52J/MCd8kRD4KrwoJK5pNcJb
QIBCpXiCZvLVrFoiwbRB5+oXgEC3NaBfKXzJTA4ql23uk2pNpUqvp33JvrLqIxFj
aKX9NoOq4HEHNpOia4r+SdW2Ao0sikosV6TMIEhMOYry+86AuEvNDHXcbSiW3RNS
R8gv2HFMp/rom08IHmCr
=vvRh
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] GObjectIntrospection and Generics

2015-04-28 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 04/28/2015 11:44 AM, Al Thomas wrote:

 May be useful:
 
 https://wiki.gnome.org/Projects/Vala/UpstreamGuide#Generic_Types 
 https://bugzilla.gnome.org/show_bug.cgi?id=639908

explains everything. thank you.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVP2T8AAoJEBuqgJs6izSELsIP/Rhcov8WcMfyuortiDuUXHbU
gH7xnTS+U9ORZmr/dqwzkIpAPJ6wemEa0+0lkRD9s0rmsPSHXw2fBh5JFzoByHAV
o/QGAI1oCSY3f1ULGhYIEOwNx3PjLoWTipOvsvzfxBjQNVJYc6cS2et6O6xQI7Ir
x5AgQrjrOXvT9HWlANxcJ1c6rBqNnIb3rmIbYN8eAsZ2wt2Y3bO8rKVAYIkvLU4C
0Z7QkJl320KV8QEtLNEwEwC1Jd97eZ2OZ69JHgtAayMpFIWNAM9V598i5Ux+wkVE
OtrGX9FiIJ0z60B8nt8K/LjoyeKr/YaZVOtSm9/M3OMU2J5+ltz8nnPkWjwKXFix
hhEiy489AXUgsjIoz4Sa7YqrroxGduO5u7kRwC+rxsdjE2fWnBp/QGFTJSFe2mnT
95oTQ3wrkAdg4RIvJD5oNM0/QR3Vh281FL3iR7MACpuoqOvtmw28aBqcP7VMi4Oe
I2XI4bHzP/LgeVtRmusq/ck/2UBY8o4UtvkG9vX6A/JeF4NdBplr1wgXe7KLNrTc
goFd9GGLgWumsIgQFgIetGtM/GaMi3NsfgL+8GCen2kYHLWww4ldE1HrQmTmQRXa
hjiMBVg8z8B4M20r9bQLvq8OmI3tWo5qbzLzlySuQyqlT7NI5N7U1QkOZ9mLwVlS
aAZcOxBJ8lVrIsQp0+C4
=XBdA
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] GObjectIntrospection and Generics

2015-04-28 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi there.

This question actually is more about than GObjectIntrospection than
about Vala, but maybe someone can help or direct me to a better place
to ask.

I write a library in Vala that i want to expose through GObject
Introspection. No i want to expose a class that uses generics. (For
testing purposes i fiddled around with Gee.ArrayList)

In Vala i would do something like


using Gee;

var list = new Gee.ArrayListint();


In Python i tried

from gi.repository import Gee

list = Gee.ArrayList()


but it fails with an error.

How do i use generics from other languages and where could i ask about
that?

Yours, Grindhold.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJVP00AAAoJEBuqgJs6izSEA/cQAJhCN3DgBvgH2jM1Q6cQ7/Ha
PDy/CoCKbQjT2DKBkmZNOtFhm8HB4QchLedciwBTxtd+QGtSSrLksQFV94mqOr/G
aJFXPOO/Pk4XL01Pj6AOAYKY8mjF+TBdVTLJeVNNroZZeLiosDFlSm5zokfrCi4+
F6+okJDzAxOqmZqNTjIPqmebcq72nP2W3MIrr8Ia/2XvgfvrwEpDgLaPmE1at/Qo
SExu+yFwbxNo01nzWAQ7uFA7BWdwzXdRSbn1c80NGfNlF5rdD9TWqfD6KVw1iWmN
k+B5bG+c+/11jnBe9deumpE7ZQpvTFDUt4jepOxOk8+fKoF54C/sy8MXAQ+2BaB8
r6Aj2GqIIgM12SOZ631d1eZUXJwt6xRD9xckNfyea7T4uA47XBv7zsKxdrgiE7Du
zFDm+6STeSR7famLDC/iet4tIosdj6m10ZGfut4upomGnUr3Uad3pfn3NJN+IMzs
u+DLez/89/YTgFqaerEc8aLTSGo8OBtY0s7Um2/oqWCWL/SUVkz2gAm7l8LUQn36
pkTHlDJJ+7+cvlQVf3lf0s4DtvSMPcx+KkPHfwVlG+TL0mPRZ6vXmuDIZGJQGhuu
+kA6WOUVy7YrfqxaEZPc2LSV/YsrQMQ7gXHrEFfCe6oYPrg8lk8PNWmVgXMnktL2
I+FPpbE8VD+Ukdq7cHvY
=WBLp
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] conversion segfault

2015-02-06 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello, fellow Valaists

I have the following example code which segfaults:

public int main(string[] argv){
stdout.printf(hello world\n);
uint64 test = 1;
string x = foobar+(string)test;
stdout.printf(x+\n);
return  0;
}

compiled with my valac 0.26.1, the result segfaults in line 4.
I can't imagine, this is intended behaviour.

Of course, the proper way to go for line 4 would be something like

string x = foobar%lld.printf(test);

Nevertheless i wonder, why the code segfaults, shouldn't there rather
be a type conversion error at compile time?

Sorry, i don't have a more recent 0.27 or 0.26.2 compiler at hand.


TIA, Grindhold
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJU1J8SAAoJEBuqgJs6izSE+JMQAJApxYTnuGmriXvbR5KLOAcv
ZTzJ1PbUKuGs76EewJYOS5lPX997y4DRBHPTCy7cALwaAhpNcKYAI+jb6QisUbP0
Fu5JLRFv7xjoTC560r3yuRNPRgeMTd9esE6siGTm1oMB35buxt1XOQ9bz1iZ28n2
vnFhaZZ3paOFBpAwVyn6lyNGmWnjquAfCc0Km1h/w94PGgFf3wAqSQugiG9dPG9U
afOiDG1R8JFLpdQEEHCZfSd6ohq9CPjBIgncHKuRxsrfFRkmJ6CuyMdMKvzqvXeq
PgqIQ2RiAm76lVFMH4XCfsfhupVz8oDNACqaI1AEnKNRizdWBi8kqsuBZBJtlmz6
mJC2fim8ZIDUJo75/aJnUPTHFKrHFp307kkkp5AW4ihGQtn8Ef4q9Z0aLcAO4sSC
vGSdnG3hysrlUxLwozoIx1cv47IHJ+A/Nn8tO//riFsrwa821dh2wioWVdq58e7b
T5wQ+Q+nsb21LoQpd+bw2vDlRhmjJcAWXoXG/6YFPIU1zi2n9jTZ3/75m4btG6P1
sS3L99w22KldN1JDlCCWkH+6bnrQfwOP0YArQbtP7zVWEZCmKtH3ncXrAdrkjhIp
hcHAzgtsrH2fggQ9VGPMGrVVz5ALTxOMt2qUKtXSoC4LtlNDVFEXAtxvYIj5REjD
L2rx0BsJxwRq+OQfRsal
=H26t
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] DBus generated code: Missing error Field

2015-01-03 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/03/2015 10:44 PM, Luca Bruno wrote:
 Add throws Error to the method.

Thanks! That was the problem.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJUqGWWAAoJEBuqgJs6izSE6WgQAJyQLax6qsowLKF+5UTNqxZK
7Ov7MtvXSpMQErN9deDk4I7/WKWB2Y7Js4fviwWxKlkO8RED4AKQ9JrTBG/9LpfZ
7mKLsUgl4+aB5bZYCMYVLqKncUuUcvHJPapa42ziev1XJvOQ48+v1Y7nzMMpuMTk
ayKSLC6/NGjtczSK24xL3p1c9IB+iRlYaz1vlE6ZPrSmNR9TOtPVmlB7mKn+mf8E
a8qKaF7PNaeuvoLqkat5Xlzvrh9RIVg3hw4oK7RQlkFJCBTIsgBFbrB27AWj3KLz
ud1WUy9Mj9AsTFl0FSBMjKQDCCZUUXHrv10ghq8WiKAoLqB2t3Sqll7iVdNXSLGm
3fQjchJoyNkj62us9SBH9w4PO47ksZurlMj6xbm+EHd0U+0M94FCPkMBCsM1tBly
9pf+PWTefsp2WdSKEfLhSimHooEl9xxnja+L0vYgJNIRft4MDTLc7GMn3MhAzrqu
JGwrHMNzJot/GkQe3W6PCRGBp/jamMsbhdZTuZTQkBcE+I/buc2ks1sTZ5aXUGPV
fypovmTxugITK8UXNNZb2UwP3Shdt3crrph0sU8YA0Hr5HdgOdR4QVZxR1DSEmFY
DKZOsnH3znd8jCJDZrhWN9nmIxue4vgSLWBWCVT8y8jYW9UaJPpvrvOYcc7nZSxX
3UjwS9KGv7oeod7VxBad
=iN7P
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Nostril / Are you my mommy?

2014-10-07 Thread Daniel Brendle
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Vala folks.

I want to introduce you to a small project written in Vala. It's name
is nostril and it's purpose is to help people inspect HTTP-traffic in
an easy and straight-forward GNOMEish way.
Nostril acts as a proxy using libsoup and is simply plugged between
the application that generates HTTP-traffic and the target.

I started writing the program about a year ago until it was able to
perform it's most basic tasks, and then i abandoned it due to a lack
of time.
I assumed that no one else would show interest in the project anyway
but from time to time people write to me that they use it and think
it's cool, some of whom i know, some of whom are randomly from the
internet. So maybe i was wrong and there is some public interest indeed.

This is why I decided to bring this to a broader audience, and I think
the Vala-ML ist a good point to start.


As always there is good news and bad news. Bad news first: I still
don't have time to spend on this particular project. Good news:
nostril is still a very small project. There is now huge codebase.
There is only about five files with an overseeable amount of code in
it. There are still a lot of easy-to-fix-bugs and
easy-to-implement-features to be done. Nostril seems to be the perfect
opportunity for people who want to start at hacking on a cool and
useful project in vala and GTK.

Do you want to adopt a nostril? Then wait no longer and become a core
contributor :)

You find nostril in https://github.com/grindhold/nostril

Even if you don't want to adopt nostril, feedback, criticism, further
ideas, thoughts and stars are  appreciated.


Thank you,
Grindhold
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJUNDUgAAoJEBuqgJs6izSEP4YP+gNNc1TmCXQSjsyHUI9WNlbJ
DugLJsnAMXBXe84hRZLjipntVmou52G+CeTBEd9sxg/yj5LHz4uaprJKiggwDYNX
h0MWLyv8BYS/JSbGiJRzFLoEu18CDJmEXAFQ/949W50hKhMAC4kiI1efr63YM4Gl
qH2+iyPiuD2Lut4mQ8CH+CoIDo8UJ1PhLmS4Gr2HNeyzN8rZQbXPylNAc9W22Qdf
p6h+rgm6glGZk8KZWTo6foFeVwpAAvdzQhcEJodn0BREWxT1q9Jg9sbdfmTyYXKH
9Rhm9my8KZRCgZGuchOQPIpGQdLXI9n7KKk7qkL1jjXAl7Wkp+Eep+QviQvAJs3o
83dbC5JdjGtKp5Ayn6jbPBDbySWQmTRvdZN1VLGJ7x9MNqFSgybUE6xNNrrnScCv
C6pmSXVJslsyW+2vekflpW0//u/GAKeFuPFOSWkwX4iVrasx9BQtjY7eOj7HIfY0
hGwtRACjLza9AlQ213ZAxq+BEwHdkNAzElgms8IBYcFv5qv6v6kpo/1fNPUF/w5G
qtt5JA2PpRNbLXrfu0maEA7U/TQLF2NNmCYtgxxGHVyUt/Ow+9yNlMttSVF6vjEp
bLBkqvLD3T1quitZkJHXvr5uSuzvwviOEA/LaXTCeKg2gY9r2fBAjngOkrTo1d8l
MFPs36ah4lM0PbEXQ4ku
=7E2J
-END PGP SIGNATURE-
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Bug with cleared Gee.ArrayList

2013-11-12 Thread Daniel Brendle

 I triggered a cursor-changed-event by deleting the rows, thereby
 invoking a second call to render. I circumvented the problem by
 monitoring the clearing-status in a bool variable and not invoking
 render() again when this bool is true.

Amendment: This was relevant in so far, that this way, i used an
iterator that whose next() was invalid in the second render()-call.


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] libsoup Session.Async does not send stuff

2013-10-31 Thread Daniel Brendle

 Of course it won't be reentrant anymore, and multiple
 requests to the proxy will trample each other. But the
 point is that libsoup works and the handler should is
 correctly written; the fault is with vala. But as I said,
 I cannot locate the fault. Perhaps its vala+libsoup
 interaction because I rarely have problems with closure.

I'm afraid, but this means to me that i am not able to develop my tool
in Vala anymore until this issue is fixed. A blocking proxy is no option
for a tool that me or anyone wants to use in production.
Of course i would like to help the Vala community by reporting this bug.
But i don't know what to write, since this is a pretty special issue and
we basically have no clue what could possibly cause it. How should i
write my bug-report?

As both Gtk and Soup are GObject-based libraries, I will try to write an
as-exact-as-possible replica of my Vala code in Python3 with
GObject-introspection and see if the same problems occur there.

Regards


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] libsoup Session.Async does not send stuff

2013-10-31 Thread Daniel Brendle
On Thu, 2013-10-31 at 20:03 +0100, Luca Bruno wrote:
 Keep the session alive here: Soup.SessionSync session = new
 Soup.SessionSync ();
 Add that as a server instance. Also, keep the server itself alive
 somewhere.
 
Acutally this worked. Now i think i understand. The lifetime of the
SessionAsync ended, when it left the scope of the closure, this triggers
the real_cancel_message-method on all queued messages through some kind
of destructor.

Thank you for this hint!

Regards, grindhold


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Retrieve Row ID from Gtk.TreeView

2013-10-31 Thread Daniel Brendle

 
   [CCode (instance_pos = -1)]
 public void selected_request(Gtk.TreeView source){
 Gtk.TreeSelection sel = source.get_selection();
 Gtk.TreeIter selected;
 Gtk.TreeModel model;
 sel.get_selected(out model, out selected);
 model = source.get_model();
 GLib.Value val;
 model.get(selected, 1, out val);
 this.id_currently_displayed = val.get_int();
 this.render();
 }
 

Problem solved. I mistook model.get() for model.get_value()


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] libsoup Session.Async does not send stuff

2013-10-30 Thread Daniel Brendle

 Have you tried running from command line and
 see what those printfs have to say?

My debugging output says:

   Status Code: 1
   Message length: 0
   Content-type: (null)

It does not matter which file i try to get from the server, it always
delivers the same output. I am currently reading the source of libsoup
and try to understand what's happening.

I furtherly also thought of doing the asynchronous handling by using
Idle.add() of GLib. But that should theoretically make no difference as
the libsoup acts inside Gtk's mainloop anyway. Is this assumption
correct?

Regards


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] libsoup Session.Async does not send stuff

2013-10-28 Thread Daniel Brendle
 Perhaps this is the offending line:
 unowned ProxyServer self = server as ProxyServer;
 
 Try removing unowned unless you are sure that
 the Server is never freed.

I tried it, but it did not do the trick, i also tried to compile the
code with the newest vala-compiler (0.22), but it did not make a
difference (i used 0.16 before). Could the Problem be the two nested
asynchronous contexts? I am not exactly sure how those closures work.

Regards.


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] libsoup Session.Async does not send stuff

2013-10-27 Thread Daniel Brendle
Greetings, people of Vala

I try to build an HTTP proxy with libsoup underneath. I realized it like
[0], and this solution works well.
Unfortunately, as the calls to the target hosts are done synchronously,
it's blocking the gui in the time that calls are done. Besides as a
result, the proxy also is awfully slow.

I tried to fix that using [1]. I substituted the Soup.SessionSync and
used a Soup.SessionAsync instead. Further i do not send the method by
using .send_message(SoupMessage m) but using .queue_message(SoupMessage
m, callback). The outcome of that also is pretty unexpected. The
messages are returned to the browser with a status code of 1 and an
observation with wireshark revealed, that the packages are never being
sent to the target host.
Why is that?

Most interestingly: The Async-Example from the documentation works with
my Vala-Setup.

I use Vala 0.16.1

Regards, adn TIA, 
grindhold

[0] Proxy-Code as used in nostril currently:
https://github.com/grindhold/nostril/blob/master/src/proxy.vala

[1] Modified default_handler with async stuff in it:
http://pastebin.com/wgFUpmFk




signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Retrieve Row ID from Gtk.TreeView

2013-10-26 Thread Daniel Brendle

Hi guys,

I am fairly new to Vala and decided to learn it by implementing a tool,
which i always wished for in the GNOME desktop environment but never
found a solution that pleased me: A HTTP debugging proxy in Gtk.

I am familiar with Gtk, because i used it excessively in Python, which
is, why i am pretty clueless about the following function, that does not
behave as i would expect it to do.

I try to use the following code to retrieve a row ID which is stored in
the second column of my list_store. It always returns 0 with an error
message, that val does not hold int, what i dont understand because the
column value is gint (set in glade) and i set an int value to this
line. 


[CCode (instance_pos = -1)]
public void selected_request(Gtk.TreeView source){
Gtk.TreeSelection sel = source.get_selection();
Gtk.TreeIter selected;
Gtk.TreeModel model;
sel.get_selected(out model, out selected);
model = source.get_model();
GLib.Value val;
model.get(selected, 1, out val);
this.id_currently_displayed = val.get_int();
this.render();
}

The full code can be seen at http://github.com/grindhold/nostril

I have another question, too. I assume that this mailinglist is one
question - one thread-organized, so I open another Thread for that.
(please tell me if your social protocl dictates otherwise)

Regards and thanks in advance for your help.
Grindhold

P.S.: Vala is a great and very underrated language. I am glad, i
discovered it.


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list