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

2011-06-20 Thread tecywiz121
On Mon, 2011-06-20 at 21:39 +0200, Serge Hulne wrote: > What is the Vala syntax to express that : > > b is a alias of a (or b points to the same address that a or b is a > reference to a). > > Is there a way to express this in vala or does *assignment always mean > memory allocation* in Vala. I

Re: [Vala] Vala 0.11.6 glib bindings bug

2011-02-25 Thread tecywiz121
On Fri, 2011-02-25 at 19:45 +, Aleksander Wabik wrote: > Hi, > > I just noticed that valac fails to compile anything if > --enable-experimental-non-null is used. Just create empty file > (test.vala) and try to compile it: > That bug has been around since at least 0.9.3 I posted a patch for

Re: [Vala] functions and null

2011-01-19 Thread tecywiz121
On Wed, 2011-01-19 at 22:11 +0100, Pavol Klačanský wrote: > Hi, why this code doesn't work > > Item item = null; > > parse_content(item); > > parse_content(Item item) { > stderr.printf("argh"); > } > > reports > ** (process:674): CRITICAL **: xml_parser_parse_content: assertion > `item !

Re: [Vala] "using" aliases?

2011-01-10 Thread tecywiz121
On Mon, 2011-01-10 at 17:27 +0100, Jiří Zárevúcky wrote: > 2011/1/10 Sandino Flores Moreno : > > I may be wrong, but I think it's preferable not to use 'using', > > because it makes difficult to read the code. > > > > Are you talking about aliases or 'using' in general? > > For aliases, that real

[Vala] Invalid C code in Interfaces

2010-10-03 Thread tecywiz121
Hello again! I seem to have run into a case where valac generates incorrect C code. I'm sure what I am doing is wrong, but I assume that valac should emit the error and not gcc. When I try to compile this snippet, public interface IFace : Object { public G[] foobar() { G[] storage = new

[Vala] Generics, Integers and 64 bits

2010-10-01 Thread tecywiz121
Hey! I think I have run in to a strange bug, with either vala or glib, and I'd like to check if I'm doing something wrong. My library versions: valac --version: Vala 0.9.7.143 dpkg -l 'libglib2.0-0': 2.24.1-0ubuntu Attached is a test case that illustrates the problem I am havi

Re: [Vala] non-null broken in vala 0.9.3

2010-07-15 Thread tecywiz121
Hey! On Fri, 2010-07-16 at 00:38 +0200, Aleksander Wabik wrote: > Hi all, > > to my surprise, I've observed today a bug in vala 0.9.3 bindings: > compilation of anything fails when using > --enable-experimental-non-null. The error that I'm observing is: > > glib-2.0.vapi:1134.15-1134.22: error:

Re: [Vala] [ANNOUNCEMENT] Chipmunk Bindings

2010-07-13 Thread tecywiz121
On Wed, 2010-07-14 at 03:31 +0200, Jiří Zárevúcky wrote: > tecywiz121 píše v Út 13. 07. 2010 v 20:32 -0400: > > Hello vala people, > > > > I am rather proud to announce my first slightly useful project: Chipmunk > > Bindings! [0] > > > > Hello. > Fr

[Vala] [ANNOUNCEMENT] Chipmunk Bindings

2010-07-13 Thread tecywiz121
Hello vala people, I am rather proud to announce my first slightly useful project: Chipmunk Bindings! [0] Chipmunk [1] is a "Fast and lightweight 2D rigid body physics library in C" with bindings to many languages like ruby and Objective-C. Chipmunk-vapi Features: * Object Oriented Bindi

Re: [Vala] metadata file format

2010-07-13 Thread tecywiz121
On Tue, 2010-07-13 at 21:45 +0200, Frederik wrote: > Jim Nelson wrote: > > THANK YOU. This is invaluable. > > > > I second Frederick, it would be great to get this on a Wiki. > > > > -- Jim > > Done: > http://live.gnome.org/Vala/Bindings/MetadataFormat > > With a call to everyone to help keepi

[Vala] [PATCH] Moving functions between Classes in Metadata files

2010-07-11 Thread tecywiz121
Hey! I've been working on binding chipmunk, a physics engine, for the past week and I've run into a bunch of snags. Chipmunk is not a glib library, and it doesn't exactly get parsed well by gen-introspect but it does a enough of a good job to get to generating a vapi file. The naming convention

[Vala] metadata file format

2010-07-10 Thread tecywiz121
So, I'm a little sick and tired of not being able to find a reference on the metadata file format used when binding a library, so I'm going to list what I know about it so far. Please amend/comment at will :) Just note that this list is very incomplete and only lists what I have used and/or found

[Vala] Introspecting and typedefs

2010-07-10 Thread tecywiz121
Hello again! I have been working on improving the libseed bindings [0] and one of the things I came across is that in the seed.h file, types are defined like this: typedef gpointer SeedString; typedef gpointer SeedValue; typedef gpointer SeedObject; typedef gpointer SeedClass; typedef gpointer Se

[Vala] Assertion Fails in valasemanticanalyzer.c

2010-07-07 Thread tecywiz121
Hello again! When I compile my project with git head I get the following assertion: ERROR:valasemanticanalyzer.c:2939:vala_semantic_analyzer_get_actual_type: assertion failed: (instance_type != NULL) I tracked it with "git bisect" to commit ac780b92d6b561f422e7935a8a9735464dc1540a Author: Jürg

[Vala] [PATCH] GLib vapi with non-null

2010-07-07 Thread tecywiz121
Hey! I was having some trouble compiling with --enable-experimental-non-null and the glib vapi. Attached is a VERY small patch that fixes the problems I've run into. Sam diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 596570a..ab680a9 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.

Re: [Vala] Interfaces and Mixins

2010-06-15 Thread tecywiz121
On Tue, 2010-06-15 at 14:50 -0700, Robert Powell wrote: > On Sat, Jun 12, 2010 at 7:03 AM, tecywiz121 > wrote: > Hey, > > Hey! > > > > The following code won't compile unless I create a flush() in > Concrete, > b

[Vala] Interfaces and Mixins

2010-06-12 Thread tecywiz121
Hey, The following code won't compile unless I create a flush() in Concrete, but I can't seem to access Entity.flush() at all, any way around this that doesn't involve making Entity a class? public interface Flushable : Object { public abstract void flush(); } public interface Entity : Objec

Re: [Vala] Problems with "exceptions"

2010-06-09 Thread tecywiz121
On Thu, 2010-06-10 at 02:14 +0200, CaStarCo wrote: > Hello, i have a little problem playing with "exceptions" in vala, > > i have something like this: > > errordomain SeldonTypeError { > BAD_VERIFIER > } > > And runs ok, but.. how can i put inside the errordomain SeldonTypeError > another type o

[Vala] Abstract properties in Concrete Class

2010-06-09 Thread tecywiz121
Hello again, This is the second snippet I was curious about. Basically, valac should not allow the following code to compile since IMHO, its completely wrong. Just checking whether I should file a bug report or not. public class TestClass { public a

[Vala] Interface order

2010-06-09 Thread tecywiz121
Hello again, I have a few snippets of code that I want to make sure are bugs before I post them to bugzilla. First off is interface order. The following code compiles fine, and produces an executable, but upon running it, I get a warning from gobject: (process:13513): GLib-GObject-WARNING **: c

Re: [Vala] what is the dova profile

2010-06-08 Thread tecywiz121
On Tue, 2010-06-08 at 12:40 -0600, Shawn Ferris wrote: > On Tue, 2010-06-08 at 10:01 +0200, pancake wrote: > > It's a glib/gobject replacement written in vala. Google for dova-core > > git repo and compile with --profile=dova to make vala generate code > > for it. > > Interesting... > > Is t

Re: [Vala] Generic GPtrArray name

2010-06-08 Thread tecywiz121
On Tue, 2010-06-08 at 13:35 -0700, Evan Nemerson wrote: > With the improvements made to GPtrArray in GLib 2.22 (reference counting > and the ability to specify a free function), it would be very useful to > have a generic implementation available from Vala. > > In order to preserve backwards compa

[Vala] Default Arguments to Functions

2010-06-07 Thread tecywiz121
Hi there, I think I may have found a bug in valac concerning default arguments to functions. I'm wondering if what I am doing is wrong, or whether its allowed. Thanks, Sam The following code compiles into incorrect C: void do_something(uint8[] array1, uint8[] array2,

Re: [Vala] GCC error with markup parser

2010-01-26 Thread tecywiz121
Hi Jiri, > > I think it is a bug in glib-2.0.vapi. > > Although it looks irrelevant, this patch solves your problem. > > - Yu > On Sun, 2009-06-07 at 02:26 +0200, Jiří Zárevúcky wrote: > > Hi, > > > > I'm trying to use GLib's markup parser, but I'm getting the following > > error. Is that a bug

[Vala] HashTable.lookup should return "V?"

2010-01-26 Thread tecywiz121
If I understand the entire "non-nullable" type concept of vala, then only variables with a "?" should be nullable at least in theory, correct? If that is the case, then I believe that HashTable.lookup should in fact return a "weak Texture?" as opposed to a "weak Texture" since if it can't find a k

[Vala] Proper Syntax for Array of Nullable Strings

2010-01-20 Thread tecywiz121
I am just wondering if it is possible to have an array of nullable strings, and if so, what is the proper syntax? Sam ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Array Property Length Not Matching What I Expect ‏

2010-01-19 Thread tecywiz121
Sorry, this is my last attempt at using hotmail before I switch to my gmail account. and the code snippet: public int main() { string[] test_array, test2; TestClass tc; ulong len1, len2; test_array = new string[100]; test_array[0] = "hello world";