Re: [Vala] Delegates thread-safe

2011-12-15 Thread Alexandre Rosenfeld
في خ، 15-12-2011 عند 15:42 -0200 ، كتب Alexandre Rosenfeld: > > Hey guys, > > > > I was recently creating a program where a delegate is passed around and > > then executed inside different threads. The delegate itself was > > thread-safe, I wasn't usin

[Vala] Delegates thread-safe

2011-12-15 Thread Alexandre Rosenfeld
emory violations which were caused by objects that were previously freed. So I came to the conclusion that using delegates in different threads are not safe, but I didn't read it anywhere. Is that really true? Is there any workaround to use the same delegate in separate threads? Regards

Re: [Vala] Looking for an example on how to get the data from a web form (when using a Soup-based server)

2011-11-21 Thread Alexandre Rosenfeld
COPY, 41. response_text.data); 42. } 43. 44. int main (string[] args) { 45. var port = 8088; 46. var server = new Soup.Server (Soup.SERVER_PORT, port); 47. server.add_handler ("/", default_handler); 48. stdout.printf("

Re: [Vala] Gstream Capture audio from microphone

2011-11-16 Thread Alexandre Rosenfeld
8. new MainLoop ().run (); 9. } 10. If you need more control, then you need to learn a bit more of GStreamer and then you can control the pipeline elements in your code. *Alexandre Rosenfeld* On Wed, Nov 16, 2011 at 15:03, Thijs Vermeir wrote: > On Wed, Nov 16, 2011 at 3:36 PM, Edwin

Re: [Vala] Looking for an example on how to get the data from a web form (when using a Soup-based server)

2011-11-12 Thread Alexandre Rosenfeld
response_text.data); 42. } 43. 44. int main (string[] args) { 45. var port = 8088; 46. var server = new Soup.Server (Soup.SERVER_PORT, port); 47. server.add_handler ("/", default_handler); 48. stdout.printf("Serving on http://localhost:%d\n&

Re: [Vala] play mp3 file

2011-11-11 Thread Alexandre Rosenfeld
= Gst.parse_launch("playbin uri=\"file://%s\"". printf(args[1])); 7. pipeline.set_state (State.PLAYING); 8. new MainLoop ().run (); 9. } 10. *Alexandre Rosenfeld* 2011/11/11 Tal Hadad > > It's not a single row, but it easy than it looks like: > http://l

Re: [Vala] Multiple Namespace problem

2011-11-07 Thread Alexandre Rosenfeld
I believe the problem you have there is that you have nested namespaces and there was a discussion sometime ago which said that GIR doesn't support it, although I don't know if specifying the gir namespace should avoid it. At that discussion (it's "Support for custom attribute introspection/reflect

Re: [Vala] Bug with Gtk3 and structs

2011-10-22 Thread Alexandre Rosenfeld
On Sat, Oct 22, 2011 at 15:35, Andrew Higginson wrote: > Thanks for the tip :) Problem is still there though :/ > Yeap, it seems the problem is with using structs to use inside the list store. I'm not sure how you could make it work with structs tough, my tests were all unsuccessful. However, wit

Re: [Vala] Bug with Gtk3 and structs

2011-10-22 Thread Alexandre Rosenfeld
mystruct); For *get* as well. Hope it helps. *Alexandre Rosenfeld* On Sat, Oct 22, 2011 at 14:40, Andrew Higginson wrote: > Hi, when I compile this code: > http://pastebin.com/EjdvB6RU > > (Which generates this C code): > http://pastebin.com/ziQrEDQd > > Instead of the cod

Re: [Vala] encrypt decrypt

2011-10-22 Thread Alexandre Rosenfeld
is mapped to the Vala code. Hope it works for you. *Alexandre Rosenfeld* ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Passing user_data in signals is supported, but could be better.

2011-10-10 Thread Alexandre Rosenfeld
o do it right. *Alexandre Rosenfeld* 2011/10/10 Tal Hadad > > Thanks for your answer Alexandre Rosenfeld, but you get me wrong. > > > Why not just use lambda? From the Gtk+ example: > Yes I know I can do this. I point this out in my post: > > 2. Variables outside the lambda expressio

Re: [Vala] Passing user_data in signals is supported, but could be better.

2011-10-10 Thread Alexandre Rosenfeld
that my_data be anything you want, an instance member or a property in any other instance (doesnt have to be from *this*). *Alexandre Rosenfeld* 2011/10/10 Tal Hadad > > Vala does support passing a "context" argument, calling user_data to > callbacks, > by this two methods(

Re: [Vala] libsoup-2.4.vapi missing SOUP_URI_VALID_FOR_HTTP()

2011-09-20 Thread Alexandre Rosenfeld
SOUP_URI_VALID_FOR_HTTP is just a macro, you can do it yourself. You can check the definition here http://developer.gnome.org/libsoup/2.34/libsoup-2.4-SoupURI.html#SOUP-URI-VALID-FOR-HTTP:CAPS *Alexandre Rosenfeld* On Sun, Sep 18, 2011 at 13:17, bsquared wrote: > Hello, >

[Vala] Compilation error: Soup.Server does not have a default constructor

2011-08-29 Thread Alexandre Rosenfeld
t only has one constructor. And I'm pretty sure this code compiled without problems before. Any idea of what is the problem? My Vala version is: valac --version = Vala 0.12.1 *Alexandre Rosenfeld* ___ vala-list mailing list vala-list@gnome.org http:/

Re: [Vala] vala IDE on OSX

2011-08-22 Thread Alexandre Rosenfeld
yourself. * * *Alexandre Rosenfeld* On Mon, Aug 22, 2011 at 02:00, Serge Hulne wrote: > I haven't managed to make a single graphical IDE for Vala work under Mac OS > X. > > - Under Linux, I use a deprecated (*) version of vtg and valencia (two > plugins for gedit) > - Under Mac,

Re: [Vala] Is goocanvas best for scrapbook type app?

2011-07-22 Thread Alexandre Rosenfeld
. However, it does require support for 3D graphics. * * *Alexandre Rosenfeld* On Fri, Jul 22, 2011 at 08:14, Fred van Zwieten wrote: > Hello all, > > I am getting into vala development and want to make a scrapbook like app > where one can put all kind of photo's, pictures, graphics and

Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-14 Thread Alexandre Rosenfeld
On Wed, Jul 13, 2011 at 15:17, august wrote: >"With asynchronous methods it is possible to do programming without >any blocking." > > The following examples in the tutorial are much more enlightening...so > it's not that bad. But, maybe it could be improved. > Async methods we

Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-12 Thread Alexandre Rosenfeld
to free some resource, then you are just doing sequential processing anyway. *Alexandre Rosenfeld* ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Vala 0.13 on Ubuntu

2011-06-30 Thread Alexandre Rosenfeld
On Thu, Jun 30, 2011 at 09:33, Christian Siefkes wrote: > Hi Stefan and all, > > On 06/29/2011 08:46 PM, Stefan Risberg wrote: > >> Vala 0.13 has been released about 10 days ago, but the version in the > >> Ubuntu > >> PPA is still stuck at 0.12. Any change that it will be updated soon? > ... > >

Re: [Vala] Problems retrieving binary data from a sqlite3 database BLOB column

2011-06-26 Thread Alexandre Rosenfeld
o do a bit more work then you usually need with Vala. *Alexandre Rosenfeld* ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Problems retrieving binary data from a sqlite3 database BLOB column

2011-06-26 Thread Alexandre Rosenfeld
this array has -1 items. You can use stmt.column_bytes to retrieve the number of items in the array (at this case, the number of bytes) and assign it to the array length such as: data.length = stmt.column_bytes(3); So now Vala knows the size of the array and you can use it anyway yo

Re: [Vala] What is the right syntax for defining pointers or references or "aliases" in Vala ?

2011-06-20 Thread Alexandre Rosenfeld
at Vala no longer does a strdup, thus actually keeping the same pointer values, not actually "copying" the strings. *Alexandre Rosenfeld* ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] install vala + valide to ubuntu 10.10

2011-06-08 Thread Alexandre Rosenfeld
On Wed, Jun 8, 2011 at 09:44, Victor D. wrote: > monodevelop is out of question for me, i just quit using m$ related stuff > for about 2 years now, and it seems quite enjoyable. > MonoDevelop is not related to Microsoft at all and it is a quite capable IDE for Vala. I personally just use Gedit

Re: [Vala] Fwd: Why is Vala 10 times slower than C ?

2011-06-06 Thread Alexandre Rosenfeld
C, then compare to the raw speed of Vala and not the speed of the GLib type initialization with the overhead that using objects will have. A benchmark never compares the maintability of the code or the other thousand things that are important in a

Re: [Vala] Fwd: Why is Vala 10 times slower than C ?

2011-06-06 Thread Alexandre Rosenfeld
if you don't need to use objects and you don't want the Vala syntax, just use plain C and you won't have any overhead. Otherwise you need to live with some kind of overhead and I can tell you, Vala's overhead for what it provides is minimal. *Alexandre Rosenfeld* On Mon,

Re: [Vala] An array of Delegations?

2011-06-01 Thread Alexandre Rosenfeld
I know it's not exactly what you want, but you can use signals to obtain something similar. Since signals can contain parameters and return values, they function more or less like delegates when connected to. And any number of functions can be connected to a single signal at any time. *Alex

Re: [Vala] Support for custom attribute introspection/reflection?

2011-05-05 Thread Alexandre Rosenfeld
<http://developer.gnome.org/gobject/stable/gobject-Type-Information.html> . If you want I can post some code I used, not sure it will help you. Me too would like to have true introspection support at runtime, not only the ones provided by GObject, since that is only partially what is supported in Vala.

Re: [Vala] Life time of args passsed to async methods

2011-04-15 Thread Alexandre Rosenfeld
re is no other reference for this object somewhere else). *Alexandre Rosenfeld* On Fri, Apr 15, 2011 at 20:00, Nor Jaidi Tuah wrote: > Is the following safe? Will the argument be > freed when xx returns, but async_method is still > in the background? > > void xx () { >

Re: [Vala] error with arraylist and class

2011-03-23 Thread Alexandre Rosenfeld
What type Feed is? I think DBus can only serialize simple types or other objects that are exposed by DBus as well, so Feed must be a DBus object. *Alexandre Rosenfeld* 2011/3/23 Pavol Klačanský > Thanks, > > yes it is in dbus object, but if I change it to array of feed, I get >