[Vala] How to pass null to Gst.init?

2016-08-23 Thread mar...@saepia.net
Hello, I would like to pass NULL to Gst.init. I intentionally do not want to pass argv. It is defined as void Gst.init (ref unowned string[]? argv) but if I pass null it throws error: Argument 1: Cannot pass null to reference parameter Gst.init(null); despite parameter type having "?"

Re: [Vala] Manipulating HTML tag soup in Vala

2016-08-01 Thread mar...@saepia.net
Hello, how about 2-stage processing? Loading HTML into WebKitGtk, dumping DOM ( https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebPage.html#webkit-web-page-get-dom-document) which contains already parsed structure, sanitizing DOM and displaying serialized version of modified DOM for the

Re: [Vala] Just a news I've read about popularity langage

2016-07-28 Thread mar...@saepia.net
l request > > On Thu, Jul 28, 2016, 4:13 PM mar...@saepia.net <mar...@saepia.net> wrote: > >> Hm I don't think it's really alligned with what I meant. >> >> For example that introduction >> >> https://github.com/eustasy/vala-lang.org/blob/master/vwiki/vala.wik

Re: [Vala] Just a news I've read about popularity langage

2016-07-28 Thread mar...@saepia.net
Hm I don't think it's really alligned with what I meant. For example that introduction https://github.com/eustasy/vala-lang.org/blob/master/vwiki/vala.wiki is not-marketing driven. And so on. None of these features give any profit to the developer alone. Even their combination. There's no

Re: [Vala] Just a news I've read about popularity langage

2016-07-26 Thread mar...@saepia.net
I do not want to overlap with elementary guys if they are already doing something, but I don't mind creating vala-lang.org or something like this at some point. m. 2016-07-22 16:42 GMT+02:00 Dr. Michael Lauer : > > As an embedded system engineer I see huge potential using

Re: [Vala] Just a news I've read about popularity langage

2016-07-22 Thread mar...@saepia.net
I think Vala needs a bit of "marketing" (quotes intentional). It has to become known in the developers community as a good fit to resolve problems within certain domain. I personally find it extremely useful for doing multimedia stuff thanks to GStreamer. There are probably several other

Re: [Vala] Equivalent for sqlitebck (sqlite backup)

2016-07-20 Thread mar...@saepia.net
Can't you just create a file with the DB in the SHM filesystem and then copy it to the regular filesystem? Marcin 2016-07-19 20:45 GMT+02:00 Adam Tauno Williams : > I am attempting to resurrect an abandoned application, rewriting it in > Vala. So far vala is really

Re: [Vala] GIO, GVfs, custom isolated URI handler

2016-07-13 Thread mar...@saepia.net
Hello, isn't what you are planning an overkill? Are you sure you need a filesystem abstraction layer for something that is basically, calling stat() a few times? You may also think about using GResource for compiling all resources and linking statically with the app (that makes sense if they are

Re: [Vala] Use rust [was: Seeking for Vala programmer]

2016-06-18 Thread mar...@saepia.net
, there will be applications for valum for sure, we are going to make devices where we will use internal APIs and they may be based on valum. M. 16.06.2016 5:30 PM "Guillaume Poirier-Morency" < guillaumepoiriermore...@gmail.com> napisał(a): Le jeudi 16 juin 2016 à 15:54 +0200, mar...@saepia.net a

Re: [Vala] Use rust [was: Seeking for Vala programmer]

2016-06-16 Thread mar...@saepia.net
RadioKit looks really amazing and I really wish I could be part of > it, but obligations forbids. Maybe Valum could be handy? > > Le mercredi 15 juin 2016 à 22:03 +0200, mar...@saepia.net a écrit : > > I don't say Rust is wrong. I don't even say it's worse than Vala or > > le

Re: [Vala] Use rust [was: Seeking for Vala programmer]

2016-06-15 Thread mar...@saepia.net
I don't say Rust is wrong. I don't even say it's worse than Vala or less promising. There are just much more popular languages than Rust that fail to maintain stable bindings to C libraries, including one I am interested of the most (GStreamer). As long as this https://crates.io/search?q=gst

[Vala] How to set custom free function for an array?

2016-06-12 Thread mar...@saepia.net
Hello, I am writing bindings for JACK. I am struggling to properly handle jack_get_ports ( http://jackaudio.org/files/docs/html/group__PortSearching.html). It returns const char **, but has to be freed by a dedicated jack_free function instead of generic vala free func for arrays. How can I

Re: [Vala] [OT] Vala -> C#

2016-03-29 Thread mar...@saepia.net
Excuse me but are you suggesting that Vala users should write a tool that eases migration from Vala to C#? You are free to do it by yourself. I agree that documentation, and overall support is incomparable between Vala and any other enterprise-backed language and it might be much better but what

Re: [Vala] Need help in debugging async code

2016-03-20 Thread mar...@saepia.net
Mar 18, 2016 at 6:22 AM mar...@saepia.net <mar...@saepia.net> > wrote: > >> Felipe, it's non threaded. >> >> Michele, good hint! I will check that. >> >> m. >> >> 2016-03-18 6:47 GMT+01:00 <michele.dioni...@gmail.com>: >> >>&g

[Vala] Need help in debugging async code

2016-03-19 Thread mar...@saepia.net
Hi all, I encounter random crashes in my app, which (it's my guess) is triggered when I call callback in async method. Such as public async void something() { SourceFunc callback_ref = something.callback; do_something_that_calls_another_callback(() => { callback_ref(); // here's crash

Re: [Vala] Need help in debugging async code

2016-03-18 Thread mar...@saepia.net
ndition. > > Il ven mar 18 01:05:05 2016 GMT+0100, Felipe Lavratti scrive: > > Hey Marcin, > > > > Just wondering, > > Is your program using threading or any threaded object that is handled in > > this part of code? > > > > > > > > >

[Vala] [job offer] Remote senior Vala programmer wanted

2016-03-07 Thread mar...@saepia.net
RadioKit (http://www.radiokit.org) is an European startup with first paying clients and initial product-market fit that is making sophisticated cloud-based solutions for radio stations. RadioKit seeks remote senior Vala programmer to take over development of some standalone, multiplatform

Re: [Vala] How to properly define struct in manually written VAPI?

2016-03-02 Thread mar...@saepia.net
the code > here > > > On Wed, Mar 2, 2016, 11:09 AM mar...@saepia.net <mar...@saepia.net> wrote: > >> Hello, >> >> thank you for suggestions. I'll try to implement them. >> >> But should I keep it as struct or rather compact class? >> >>

Re: [Vala] How to properly define struct in manually written VAPI?

2016-03-02 Thread mar...@saepia.net
json-glib > http://valadoc.org/#!api=json-glib-1.0/Json > It has nice features like deserialization with GObject properties > > On Wed, Mar 2, 2016 at 5:19 AM, mar...@saepia.net <mar...@saepia.net> > wrote: > > Hello, I need to write VAPI for jansson JSON library. I have al

[Vala] How to properly define struct in manually written VAPI?

2016-03-02 Thread mar...@saepia.net
Hello, I need to write VAPI for jansson JSON library. I have already started ( https://github.com/akheron/jansson/pull/273) and generally speaking it works fine but I have an issue with covering one struct. In C code there's the following struct: #define JSON_ERROR_TEXT_LENGTH160 #define

Re: [Vala] Is there any way to access generic type from the interface?

2016-02-28 Thread mar...@saepia.net
ed first. >> >> For your question, use typeof(G) >> El feb. 27, 2016 1:26 PM, "Felipe Lavratti" <felipe...@gmail.com> >> escribió: >> >>> I don't know if your code is valid Vala. MyInterface should not inherit >>> MyClass. >>

[Vala] Is there any way to access generic type from the interface?

2016-02-27 Thread mar...@saepia.net
Hello, I am planning to use interfaces as in vspec as they are nice syntax sugar for my purpose. However, in order to make it working properly, I need to access type defined as generic in the parent class implementing interface. Something like public interface MyIface : MyClass { public

[Vala] Storing a list of delegates with targets?

2016-02-20 Thread mar...@saepia.net
Hello, I am writing a program where I would like to have possibility to add arbitrary amount of callbacks which must be delegates. I would like to store them somewhere, and then call one after another when it's appropriate. My first step was public class Test : Object { public void delegate

Re: [Vala] Testing framework

2016-02-20 Thread mar...@saepia.net
I have started working on such project, first effects are here: https://github.com/mspanc/vspec m. 2016-02-02 3:25 GMT+01:00 Chris Daley : > Hi Evan, > Thanks for the offer, I've sent you a pull request on Github. I've got some > new Vala posts in the can that aren't

Re: [Vala] How to test async methods?

2016-02-20 Thread mar...@saepia.net
thanks! m. 2016-02-17 15:51 GMT+01:00 Ben Iofel <iofel...@gmail.com>: > You need a MainLoop to run async methods in vala > > On Tue, Feb 16, 2016, 8:19 AM mar...@saepia.net <mar...@saepia.net> wrote: > >> Hello, >> >> I need some advice on test

[Vala] How to test async methods?

2016-02-16 Thread mar...@saepia.net
Hello, I need some advice on testing async methods. When I run .begin() in the isolated test suite (where mainloop is not running) it seems that .end() callback never gets called. What is the best way to trigger running async methods? Should I just spawn mainloop on purpose or is there any

[Vala] Need help in async methods

2016-01-16 Thread mar...@saepia.net
Hello, I am trying to create a function is synchronous and block for the outer world, but internally a) does nothing unless certain callback is called b) does not block mainloop Something like synchronous HTTP calls in libsoup - you do request, the execution if caller is stopped until it's

[Vala] Why valac is always called even if conditional automake clause is false?

2016-01-15 Thread mar...@saepia.net
Hello, I have the following makefile that is responsible for conditional compilation of one subdir of my project depending on the platform used: https://gist.github.com/mspanc/5b31758b966fa6eab959 I am using automake's AM_CONDITIONAL to pass information about operating system to further scripts.

Re: [Vala] How to connect to signal if there's a property with the same name?

2015-12-10 Thread mar...@saepia.net
Daemon] Closed connection $(get_dbus_connection_remote_address(connection)), remote peer vanished = $(remote_peer_vanished)"); connection.unref(); } m. 2015-12-10 21:07 GMT+01:00 Al Thomas <astav...@yahoo.co.uk>: > >From: "mar...@saepia.net" <mar...

[Vala] How to connect to signal if there's a property with the same name?

2015-12-10 Thread mar...@saepia.net
Hello, I need to connect to "closed" signal of GDBusConnection, but because there is a property with the same name, valac refuses to compile and throws the following error src/common/daemon/base.vala:63.11-63.35: error: The name `connect' does not exist in the context of `bool'

[Vala] Testing framework

2015-12-09 Thread mar...@saepia.net
Hello, I am coming back to vala development after a while and I wonder, are there any new/recommended testing frameworks besides one built-in into GLib? I dream about something like RSpec to Vala, can you recommend any projects like this? Marcin ___

[Vala] Problems with building app with GStreamer in MSYS2/Win64

2015-12-09 Thread mar...@saepia.net
Hello I am trying to build simple app written in Vala 0.30 and link them with windows 64-bit build of GStreamer 1.6.1. I also want to reuse GObject, GLib and Soup that ship with GStreamer so I don't introduce another dependencies. I apologize if this is not truly Vala related, but I cannot

Re: [Vala] Problems with building app with GStreamer in MSYS2/Win64

2015-12-09 Thread mar...@saepia.net
I found a solution - I had 32-bit version of compiller instaled, m. 2015-12-09 15:38 GMT+01:00 mar...@saepia.net <mar...@saepia.net>: > Hello > > I am trying to build simple app written in Vala 0.30 and link them with > windows 64-bit build of GStreamer 1.6.1. I also want to r

[Vala] Automake configuration for library other than one from the tutorial?

2015-12-08 Thread mar...@saepia.net
Hello, I want to develop a library with Vala. Can you please recommend any other automake sample configurations than mentioned in the tutorial? The one from tutorial is definitely not a "hello world" and while I am quite proficient with Vala etc. automake concepts still seem to be quite obscure

Re: [Vala] Automake configuration for library other than one from the tutorial?

2015-12-08 Thread mar...@saepia.net
Thank you! M. 8 gru 2015 4:40 PM "Luca Dionisi" napisał(a): > Following is my recipe for a lib. > > Enter a fresh new directory. > > $ mkdir m4 > $ touch README NEWS AUTHORS ChangeLog > > Create following (attached) files: >

Re: [Vala] viewport ADD

2013-01-20 Thread mar...@saepia.net
Hi, you ask on wrong mailing list, try on Gtk mailing list. m. 2013/1/12 Luis L. Rodríguez Oro lu...@uci.cu: How can I add object to the viewport?? //valac --pkg gtk+-3.0 viewport.vala public class Application : Gtk.Window { private Gtk.Viewport viewport; private

[Vala] Ownership/properties

2013-01-02 Thread mar...@saepia.net
Hi all, I have some questions related to ownership. If I write something like this: public string test { get { return xxx(); } } private unowned string xxx() { string a = XXX; return a; } I end with error: error: Local

[Vala] Nice wrapper around libxml2 for vala?

2012-12-29 Thread mar...@saepia.net
Hey, is there any nice library with vala bindings that wraps original ugly libxml2 interface into something nicer? Thank you Marcin ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Nice wrapper around libxml2 for vala?

2012-12-29 Thread mar...@saepia.net
29.12.2012, 14:36 +0100 schrieb mar...@saepia.net: Hey, is there any nice library with vala bindings that wraps original ugly libxml2 interface into something nicer? Thank you Marcin ___ vala-list mailing list vala-list@gnome.org https

Re: [Vala] Nice wrapper around libxml2 for vala?

2012-12-29 Thread mar...@saepia.net
something in http://git.gnome.org/browse/gxml/ ? Am Samstag, den 29.12.2012, 15:18 +0100 schrieb mar...@saepia.net: Hey, seems pretty interesting but I need something more mature. Thank you! Marcin 2012/12/29 JM interfl...@gmx.net: I know there is gxml, which is a vala wrapper around

[Vala] How to create functon that maps to D-Bus a{s(st)}?

2012-12-19 Thread mar...@saepia.net
Hi, I see that if I create function with signature like public void f(HashTablestring, Variant arg) and then export the object over D-Bus, Vala compiler automatically generates its DBus signature of a{sv}. Great. I need to achieve a{s(st)}, in other words, I need a hashmap with strings as keys

[Vala] Should I disconnect all signals?

2012-11-08 Thread mar...@saepia.net
Hi all, short question: should I manually disconnect all signals that I've connected during object construction or will they be automatically disconnected during object finalization? What is correct pattern? Thank you, Marcin ___ vala-list mailing

Re: [Vala] help with java to vala

2012-10-26 Thread mar...@saepia.net
What exactly do you want to achieve by making it const? m. 2012/10/26 Calvin Walton calvin.wal...@kepstin.ca: On Thu, 2012-10-25 at 13:00 -0700, bsquared wrote: I attempted a simple test using this: 8 private static const Setstring

Re: [Vala] help with java to vala

2012-10-25 Thread mar...@saepia.net
Have you tried static construct { ... } ? (see https://live.gnome.org/Vala/Tutorial) m. 2012/10/23 bsquared bwcod...@gmail.com: Hello, Is it possible to initialize a static const HashSet? Similar to this from Java? 8

Re: [Vala] FileStream not closed after going out of scope

2012-09-24 Thread mar...@saepia.net
try something like this (it is only a demonstration, not working code!) key to solve problem you've encountered are io_stdout = null; io_stderr = null; it unrefs io channel, and releases descriptors private IOChannel io_stderr; private IOChannel

Re: [Vala] How to access valac version during runtime?

2012-09-06 Thread mar...@saepia.net
Thank you! m. 2012/9/6 Eric Gregory e...@yorba.org: On Wed, Sep 5, 2012 at 3:03 PM, mar...@saepia.net mar...@saepia.net wrote: If not, could you recommend any tested solution for adding it to config.h during running ./configure? We've been using -d for this purpose. As long as your needs

[Vala] How to access valac version during runtime?

2012-09-05 Thread mar...@saepia.net
Hi, I want to add version of vala compiler used to build sources to debug log generated by my application. It will simplify debugging. Is there any preprocessor macro available? I know there's one VALA_X_Y but it is impossible to use it in this way. If not, could you recommend any tested

[Vala] Custom export / custom attributes / iterating over object's public methods/parameters/signals/properties

2012-08-24 Thread mar...@saepia.net
Hi, I want to implement in Vala mechanism for automatic exporting objects over some protocol. The concept is basically the same as usage of [DBus ...] Attributes, but I want to add support for one more protocol. So my questions are: a) is there any way to define custom annotations (let's say,

Re: [Vala] POSIX and Dova profiles

2012-08-03 Thread mar...@saepia.net
Vala is always marketed as being integrated with GObject, which I think is advantage - IMO to make product consistent team should focus on Vala/GObject. m. 2012/8/3 Jürg Billeter j...@bitron.ch: Hi, valac has had experimental support to build applications without GLib for a while now.

[Vala] Why some macros from GLib are missing in vapi?

2012-07-22 Thread mar...@saepia.net
Hi, why some macros from GLib, like GLIB_MAJOR_VERSION or GObject, like G_LIKELY/UNLIKELY are missing in vapi? Is this desired or they are just forgotten? m. ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] Is there any way to iterate over signal arguments?

2012-07-22 Thread mar...@saepia.net
Could you point this specific issue? I have to rely on default vala shipped with ubuntu 12.04, so I can create workaround that implements your patch, but I cannot force users to use git version. m. 2012/7/21 Evan Nemerson e...@coeus-group.com: On Sat, 2012-07-21 at 20:30 +0200, mar

[Vala] Is there any way to iterate over signal arguments?

2012-07-21 Thread mar...@saepia.net
Hi, I need to write an application that catches all signals emitted by certain GObjects and forwards it over HTTP. Is there any way to do that in vala without manually specyfying all of their arguments? m. ___ vala-list mailing list

[Vala] Contract programming and error messages

2012-07-10 Thread mar...@saepia.net
Hi, I use vala contract programming features to ensure that several functions are called from proper thread. I've created helper function for that to DRY, and the effect is that in case of failure I got error message like this: my_function: assertion `_tmp0_' failed out of

[Vala] How to check if current thread is main thread?

2012-07-06 Thread mar...@saepia.net
Hi I need to check (for debugging purposes) if current thread is main thread. How can I do that in Vala? I know that in GLib exists g_thread_self() and I can use result of that function for that purpose but in Vala's vapi it has strange syntax that I cannot truly understand. Thank you in

[Vala] How to append element to Variant array of tuples?

2012-05-17 Thread mar...@saepia.net
Hi! In my app I use Settings with key defined in schema as follows: a(sbsyssby) I am able to retreive it with Variant mykey = settings.get_value(mykey); The question is: how can I add an element to end of this array and store that value in the settings? It could be interpret as a much

[Vala] How to deal with target attribute in VAPI for C struct?

2012-03-26 Thread mar...@saepia.net
Hi, I have a part of C code that I need to include in my Vala project. It contains code +/- like that: typedef void (*computing_finished_cb) (void *self); typedef struct computer { computing_finished_cb on_finished; void* parent; } computer; size_t computer_compute(computer *c); I've

Re: [Vala] How to deal with target attribute in VAPI for C struct?

2012-03-26 Thread mar...@saepia.net
Ugh, sorry, obviously that code:  public delegate void ComputingFinishedCallback(); should be: public delegate void ComputingFinishedCallback(void* sender); m. ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] Is there any way to deserialize something into object in vala?

2012-03-22 Thread mar...@saepia.net
to a database. Check out samples/vala code. Vala extensions are available from git.gnome.org/libgda El mar 20, 2012 7:04 a.m., mar...@saepia.net mar...@saepia.net escribió: Hi, I need to create a sort of abstraction layer between the database and my vala app. It would be great if it was possible

[Vala] Is there any way to deserialize something into object in vala?

2012-03-20 Thread mar...@saepia.net
Hi, I need to create a sort of abstraction layer between the database and my vala app. It would be great if it was possible to interate over my class properties, read they type etc. and dynamically map fields from the DB to the properties. Is there any way to do that? I know that it is

[Vala] Why [].resize expects int?

2012-03-10 Thread mar...@saepia.net
Hi, Why [].resize expects int? Shouldn't it accept a) some unsigned type b) tyle that has greater range of possible values? M. ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list