Re: [Vala] valasemanticanalyzer error

2010-08-20 Thread Martin DeMello
On Fri, Aug 20, 2010 at 2:55 PM, Abderrahim KITOUNI a.kito...@gmail.com wrote: shouldn't it be IterableG? Thanks, that got the basic proof of concept working. Now the issue is, I want to write a generic map function whose output type should not need to be encoded in the Enumerable type. using

Re: [Vala] valasemanticanalyzer error

2010-08-20 Thread Martin DeMello
On Fri, Aug 20, 2010 at 5:47 PM, Andrea Del Signore seje...@tin.it wrote: the only error I can spot is here:   public void map(DFunc fn, Gee.List acc) { should be: public void map(DFunc fn, Gee.ListG acc) No, it is a list of the target type, not the source type. I really don't

Re: [Vala] valasemanticanalyzer error

2010-08-20 Thread Martin DeMello
On Fri, Aug 20, 2010 at 7:26 PM, Andrea Del Signore seje...@tin.it wrote: Thanks for the explanation but I can't really imagine any other way of doing this without specializing the map method, because I don't see implemented any standard (non generic) IList interface in gee. So: public

Re: [Vala] valasemanticanalyzer error

2010-08-20 Thread Martin DeMello
On Fri, Aug 20, 2010 at 8:06 PM, Andrea Del Signore seje...@tin.it wrote: If you want to use a lambda this is what I came with (see the map function):  public void mapI, T(DFuncI, T fn, Gee.ListT acc) {    foreach (G i in this) {      acc.add(fn(i));    }  } Beautiful, thanks :) martin

Re: [Vala] valasemanticanalyzer error

2010-08-19 Thread Martin DeMello
); ^ Compilation failed: 1 error(s), 0 warning(s) martin On Tue, Aug 17, 2010 at 6:09 PM, Martin DeMello martindeme...@gmail.com wrote: What do I need to do to get the following code to compile? It dies with $ valac --pkg gee-1.0 test.vala

Re: [Vala] valasemanticanalyzer error

2010-08-19 Thread Martin DeMello
On Thu, Aug 19, 2010 at 6:39 PM, Jürg Billeter j...@bitron.ch wrote: On Tue, 2010-08-17 at 18:09 +0530, Martin DeMello wrote: public interface EnumerableG, T : Iterable {       public delegate T DFunc(G elem);       public void map(DFunc fn, Gee.ListT acc) {               foreach (G i

[Vala] valasemanticanalyzer error

2010-08-17 Thread Martin DeMello
What do I need to do to get the following code to compile? It dies with $ valac --pkg gee-1.0 test.vala ** ERROR:valasemanticanalyzer.c:2948:vala_semantic_analyzer_get_actual_type: assertion failed: (instance_type != NULL) Aborted # --- using

Re: [Vala] information on dova

2010-07-22 Thread Martin DeMello
On Wed, Jul 21, 2010 at 7:21 PM, Abderrahim Kitouni a.kito...@gmail.com wrote: Hi, في ر، 21-07-2010 عند 14:51 +0200 ، كتب andi: Hi list, I was wondering if anyone could give me or point me at some information on dova and its aims. I've been googling for quite some time now and read a bit of

[Vala] Why no functions returning lists in libgee?

2010-07-12 Thread Martin DeMello
How come libgee doesn't have any functions that return new lists (in particular list.map() and list.filter())? Is it to avoid allocation? I've been looking at porting ruby's Enumerable module to vala, but I thought I'd check first as to why it isn't there already, and if this sort of thing is for

Re: [Vala] Graphic toolkits for Vala?

2010-07-06 Thread Martin DeMello
On Sat, Jul 3, 2010 at 2:32 AM, CaStarCo casta...@gmail.com wrote: Thanks to all :) , now i'm trying to decide if is better to use some web system such as webkit or to use something like clutter because it's more orientated to graphics than webkit... probably i'll take the webkit option

Re: [Vala] Graphic toolkits for Vala?

2010-07-06 Thread Martin DeMello
On Sat, Jul 3, 2010 at 2:14 AM, Martin Olsson mn...@minimum.se wrote: Checkout all the ones listed on this page: http://live.gnome.org/ProjectRidley/CanvasOverview Also take a moment a serious consider doing it using open web standards rendered via a WebKit webview or similar (inside you can

Re: [Vala] An elegant way to concatenate integers into a string.

2010-06-24 Thread Martin DeMello
On Tue, Jun 15, 2010 at 6:17 AM, Celil celil...@gmail.com wrote: I would like to translate the following python code snippet to vala:        x = [1,2,3]        print ,.join(map(str, x)) So far I have this:        int[] x = {1,2,3};        string[] y = {};        foreach (var e in x) { y

Re: [Vala] sorted keys from a hash

2010-02-13 Thread Martin DeMello
On Sat, Feb 13, 2010 at 3:39 AM, Jan Hudec b...@ucw.cz wrote: On Sat, Feb 13, 2010 at 02:54:21 +0530, Martin DeMello wrote: What's the most efficient (in terms of speed) way to iterate over a hash in sorted order of the keys? The keys are strings. To use a balanced tree. Hash can only ever

[Vala] using libgee from c

2010-02-12 Thread Martin DeMello
Other than reading gee.h directly, is there any documentation on the C api to libgee? martin ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] sorted keys from a hash

2010-02-12 Thread Martin DeMello
What's the most efficient (in terms of speed) way to iterate over a hash in sorted order of the keys? The keys are strings. martin ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] maemo5 hildon input mode

2010-02-08 Thread Martin DeMello
2010/2/8 Jiří Zárevúcky zarevucky.j...@gmail.com: Martin DeMello píše v Po 08. 02. 2010 v 22:26 +0530: I'm trying to disable Maemo's autocapitalisation in a Gtk.Entry field. Maemo 5 adds a hildon-input-mode property to Gtk.Entry [ http://maemo.org/api_refs/5.0/5.0-final/gtk/GtkEntry.html