Re: [Vala] how can I get the number of unicode points in a string?

2011-04-03 Thread Adam Dingle
> > 于 2011/4/3 21:30, Adam Dingle 写道: > > >>> On Sun, Apr 03, 2011 at 03:59:23PM +0800, 琉璃井 wrote: > >> At 2011-04-03 16:06:32,"Luca Bruno" wrote: > >> > >>> On Sun, Apr 03, 2011 at 03:59:23PM +0800, 琉璃井 wrote: > >>

Re: [Vala] how can I get the number of unicode points in a string?

2011-04-03 Thread Adam Dingle
On 04/03/2011 06:08 AM, ?? wrote: From: "??" Date: 2011-04-03 18:15:12 To: "Luca Bruno" Subject: Re:Re: [Vala] how can I get the number of unicode points in a string? At 2011-04-03 16:06:32??"Luca Bruno" wrote: On Sun, Apr 03, 2011 at 03:59:23PM +0800, ?? wrote: I see that since

Re: [Vala] valac can read a typelib in place of a vapi binding

2011-04-02 Thread Adam Dingle
On 04/02/2011 07:21 AM, Jürg Billeter wrote: Hi Adam, ... 2. Is there a long-term plan to deprecate .vapi files in favor of type libraries? Can type libraries express everything that .vapi files can? GIR files (vala doesn't read typelibs, it reads the xml versions) cannot express everything t

[Vala] valac can read a typelib in place of a vapi binding

2011-04-01 Thread Adam Dingle
I realized to my surprise today that valac (0.11.7) can read a GObject introspection type library in place of a VAPI file! For example, I can specify '--pkg PeasGtk-1.0' on the command line and valac will read types from /usr/lib/girepository-1.0/PeasGtk-1.0.typelib, which lets me use libpeas

[Vala] When is 0.12 coming?

2011-02-03 Thread Adam Dingle
Is there a plan to release Vala 0.12 along with GNOME 3 in early April? Or will 0.12 arrive later, or is the expected release timeframe simply unknown? adam ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-l

Re: [Vala] What's in the name Vala?

2011-02-03 Thread Adam Dingle
El mar, 01-02-2011 a las 11:53 +0100, Sylvain Leroux escribió: > Hi Vala Team! > > ... > > Anyway, I have a trivia question on my mind: where did the name "Vala" > come from? > Some time ago someone ask that question[0], the answer... nobody knows... :) Matias [0] http://mail.gnome.org/archive

Re: [Vala] plans to speed up compilation

2010-05-21 Thread Adam Dingle
On 05/21/2010 12:06 PM, Martin Olsson wrote: On 05/21/2010 06:43 PM, Adam Dingle wrote: Our project (Shotwell) does not use autotools, but it has a hand-crafted Makefile that achieves exactly what you described: if a .vala files does not change then a .c file is not regenerated Well yes and

Re: [Vala] plans to speed up compilation

2010-05-21 Thread Adam Dingle
On 05/21/2010 07:50 AM, Sandino Flores Moreno wrote: Something you could try, is separating logically related modules, and generate .vapi file with its corresponding .a file (static library). That way, if you modify one of those modules, only the vala files in that logical group would be recompi

Re: [Vala] plans to speed up compilation

2010-05-21 Thread Adam Dingle
On 05/21/2010 09:38 AM, Martin Olsson wrote: Via valac's autotools support I'd assume you'd get makefiles that make sure a.c isn't regenerated if a.vala didn't change and then also "make -j" on top of that to solve the CPU utilization issue? To speed things up further you can use ccache or simila

[Vala] plans to speed up compilation

2010-05-21 Thread Adam Dingle
I work at Yorba where we develop Shotwell, a photo manager currently consisting of 45,000 lines of Vala code. Each time I build on my machine (an 2.4 GHz Intel Core 2 Quad) 'valac --ccode' takes 10 seconds to run, even if I've changed just 1 line of Vala source. (I'm talking *only* about the

Re: [Vala] nullable generic types

2010-04-06 Thread Adam Dingle
Jürg resolved it as NOTABUG: https://bugzilla.gnome.org/show_bug.cgi?id=605490 Aha - I hadn't seen that bug, in which Jürg wrote that dropping the nullable modifier is intentional for now. It seems, then, that for any generic type T, writing 'T?' is always exactly equivalent to

Re: [Vala] nullable generic types

2010-04-05 Thread Adam Dingle
a bug? adam Jan Hudec wrote: On Mon, Apr 05, 2010 at 14:10:23 -0700, Adam Dingle wrote: I've noticed that Vala forces generic types to be non-nullable when instantiated with a primitive type. Quite the opposite. Generic types in Vala can only contain reference types or int, so a

[Vala] nullable generic types

2010-04-05 Thread Adam Dingle
I've noticed that Vala forces generic types to be non-nullable when instantiated with a primitive type. For example: public class List { public T? abc() { return null; } public bool def(T? t) { return t == null; } } void main() { List list = new List(); int? i = list.abc(); // i receive

[Vala] discarded qualifiers warnings

2009-09-01 Thread Adam Dingle
When building any substantial Vala program, gcc outputs lots of warnings like these as it processes the C code generated by valac: warning: assignment discards qualifiers from pointer target type warning: passing argument 1 of ‘foo’ discards qualifiers from pointer target type These warnings

[Vala] multiple fields in a single declaration

2009-08-31 Thread Adam Dingle
Vala lets me declare multiple local variables in a single declaration: void foo() { int a, b;// OK } But if I attempt to declare multiple fields in a single declaration I get a syntax error: class Foo { int a, b; // syntax error } Is this by design? Or are multiple fields per de

Re: [Vala] Valencia 0.1.0 - gedit plugin for Vala

2009-06-30 Thread Adam Dingle
t a nice tool. I hope it soon to be included with every gedit. Can it do sintax-error highlighting? 2009/7/1 Adam Dingle : I'm pleased to announce release 0.1.0 of Valencia, a free plugin that turns gedit into a lightweight development environment for Vala.  Current features i

[Vala] Valencia 0.1.0 - gedit plugin for Vala

2009-06-30 Thread Adam Dingle
Vala IDEs and plugins available today. I believe that Valencia's particular strengths are its ease of use and its symbol browser; Valencia was designed to make it effortless to jump between symbols even in a large Vala program. Feedback, patches or code contributions are welcome! adam

[Vala] new signal syntax

2009-04-23 Thread Adam Dingle
operator was originally conceived for numeric addition. In almost every other way I'm very happy with Vala and the direction of its development. Keep up the great work! adam Adam Dingle Yorba ___ Vala-list mailing list Vala-list@gnome.org

[Vala] how to view Valadoc in Devhelp?

2009-01-24 Thread Adam Dingle
According to the Valadoc wiki page (http://live.gnome.org/Valadoc), Devhelp integration is "done", and the page contains a link to a file devhelp-books.tar.gz, which presumably holds the Valadoc documentation in Devhelp format. I downloaded and unzipped this file, but it's not obvious what I n

[Vala] integrate Vala and GTK doc?

2009-01-24 Thread Adam Dingle
When I write GTK code with Vala, I find myself constantly switching back between the C-based GTK documentation (which has C prototypes and lots of helpful explanations) and the Vala binding reference at valadoc.org (which has Vala prototypes but no explanations at all). I'd really like to see

[Vala] warning: Foo.new never used

2009-01-15 Thread Adam Dingle
On a tiny program, Vala warns that a constructor is unused when in fact it gets called: == hello.vala == class Foo { Foo() { stdout.puts("construct\n"); } void hello() { stdout.puts("hello\n"); } static int main(string[] args) { Foo f = new Foo();

[Vala] warning calling extern function

2008-12-09 Thread Adam Dingle
I'm trying to write a trivial program that calls an extern program. I have the following: == foo.vala == extern int add(int a, int b); void main() { stdout.printf("%d\n", add(3, 4)); } == lib.c == int add(int a, int b) { return a + b; } === When I build, I get a warning: $ valac foo.v

Re: [Vala] how to call extern function expecting function pointer?

2008-12-09 Thread Adam Dingle
edef int (*__compar_fn_t) (__const void *, __const void *); So, then: is there an attribute I can apply so that Vala will generate a function prototype with const? Or must I fall back on wrapping qsort() in a C function that's easier to call from Vala? thanks! adam Thomas Chust wrote: Adam D

[Vala] how to call extern function expecting function pointer?

2008-12-09 Thread Adam Dingle
I'm trying to call the C library function qsort() from Vala. I tried this: delegate int CompareFunc (void* a, void* b); extern void qsort(void *base, size_t count, size_t size, CompareFunc f); Vala accepts that, but then C compilation fails with the following: top.c:41: error: conflicting types

Re: [Vala] undefined symbol: vala_code_context_set_dbus_transformation

2008-12-09 Thread Adam Dingle
Aha - yes, I still had libvala 0.3.5 installed as an Ubuntu package. I removed that package, ran ldconfig and now everything works fine. Thanks! adam Jürg Billeter wrote: On Tue, 2008-12-09 at 07:34 -0800, Adam Dingle wrote: I just downloaded, built and installed Vala 0.5.2. When I try

[Vala] undefined symbol: vala_code_context_set_dbus_transformation

2008-12-09 Thread Adam Dingle
I just downloaded, built and installed Vala 0.5.2. When I try to build the helloworld program from the Vala tutorial, I get the following error: $ valac -o top top.vala valac: symbol lookup error: valac: undefined symbol: vala_code_context_set_dbus_transformation $ I'm running Ubuntu 8.10.