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

2009-06-30 Thread Diego Jacobi
What a nice tool.
I hope it soon to be included with every gedit.

Can it do sintax-error highlighting?



2009/7/1 Adam Dingle a...@yorba.org:
 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
 include:

 * no configuration needed: simply open a .vala file and browse its symbols
 immediately
 * jump to definitions of classes, methods, fields, and variables
 * build your project within gedit, with build output in a gedit pane
 * double-click any build error to jump to the line where it occurred
 * use the Run command to run your program, with output appearing in an gedit
 pane

 Valencia is under active development. Soon, we plan to extend Valencia to be
 able to autocomplete symbols and display tooltips showing method prototypes.

 You can download Valencia at http://yorba.org/valencia/ .  Our wiki page
 with complete documentation is at http://trac.yorba.org/wiki/Valencia .

 I know that there are a growing number of 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

 
 Adam Dingle
 Yorba
 San Francisco, CA

 ___
 Vala-list mailing list
 Vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] why this new and innovative programming language called Vala?

2009-05-04 Thread Diego Jacobi
Or an intentionally wrong written Bala, which means Bullet in spanish.
That would put enfasis on speed, i think.

Cheers.
Diego



2009/5/5 David Zeuthen da...@fubar.dk:
 On Mon, 2009-05-04 at 18:30 -0400, Jamie McCracken wrote:
 you would have to ask juerg but I always thought it was because it
 sounds like java

 I've always assumed it was a reference to

  http://en.wikipedia.org/wiki/Vala_Mal_Doran

    David


 ___
 Vala-list mailing list
 Vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list


divbr/div
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] How to use Posix namespace

2009-05-03 Thread Diego Jacobi
 Like the import and require of python.

 Python doesn't have a require directive! :P

 Is this because of the C# like language limitation?


Yeah, sorry. I realised that in another post ^^
I just find it a usefull distinction. import and require

So, you are saying that not being able to use import-alike to avoid
--pkg is just to be able to use testing versions of a vapi?
Sorry for re-questioning.

As with vala tries to help people to use glib and C, glib tries to
help people to make good software which can work on multiple
platforms. I dont understand why do you say This is a common sort of
complaint from people in the MSWindows camp. ¿Does it have anything
to do with it? But yes, i often try to make my software work on
windows, and if possible, on MAC too, which i dont have one.
In the windows case, with no good ide support for vala, you know that
it is tricky to get and setup the command line to finally get
something compiled. Vala could easily help in that scenario, and can
help people to compile software with double clic if posible.
Testing-vapis are for vala programmers, and there wont be any
difference for them.
if an import-alike imports the default pkg, but an --pkg command line
is issued, then the command-line should have preference.
Like if i import gee and default in path is 1.0, but i want to test
this with gee2.0 then valac --pkg gee2.0 ...

Also it could make easier things and standard to know what
vala-dependencies does it haves without reading the code.


But, of course, i am just starting to experiment with vala and genie
and i know that there are very good programmers behind it, and i
should trust them.

Cheers.
Diego
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [Genie] bash execution.

2009-05-02 Thread Diego Jacobi
Hey, i dont know if this is the correct list for Genie, i havent found
much on gnomedocs, but the same applies for vala:

It could be a very good feature to be able to run bash commands with
the normal form:

Example for file named main.gs:

#!/usr/bin/env valac main.gs
[indent=2]
init
  print Hello World


Then just executing the file could produce the compiled output file.
This can be just done by interpretting #!... as comments.

It would be very nice too, if dependencies are handled by each .gs
file. Maybe with the inclusion of import and/or require as in
python and php, and others.

Then a distributed vala/genie code could easily autocompile just
asking the user to install the dependencies.

Is any of this planned for vala and/or genie?


Cheers.
Diego
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [Genie] simple Hello world.

2009-05-02 Thread Diego Jacobi
Hi. I find Genie, perfect for me, but i ask my self sometimes about
certain stuff that i can not answer, like for this simple hello world:

[indent=2]
init
  print Hello World

This produces the next main.c:

#include glib.h
#include glib-object.h
#include stdlib.h
#include string.h




void _main (char** args, int args_length1);



void _main (char** args, int args_length1) {
g_print (Hello World\n);
}


int main (int argc, char ** argv) {
g_type_init ();
_main (argv, argc);
return 0;
}





Can i ask why string.h and stdlib.h are included?
Arent all of thoose wrapped by glib to make glib based applications
more uniform in different arquitectures?

Cheers.
Diego
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Starting with Vala, problems with strings

2009-04-20 Thread Diego Jacobi
Hi again.
I am still having troubles with things that i should easily do in C.
Maybe because i have never programmed in C#, or mono or anything like
it.

In my test code i want to split a math sentence in terms, like the
next string example:
(2+a)*d+(a*b-3)-4-q/2

My function split_in_terms, is a very bad implementation (i know) that
should split the string into 4 terms, and if not possible, return
NULL.
For that i have tryed with a List, but when using nth_data it prints
this string: g_list_nth_data, only once. So i think that Lists are
not yet fully implemented so i switched to Array.
Where now i cant compile it.
ERROR:arraylist.c:322:gee_array_list_real_get: assertion failed: (_tmp0)

And i dont have any clue where the problem is.

Also i dont know when should i use pointers in Vala.
I know from C that every object must be defined as a pointer, but the
Vala bindings, doesnt defines them as pointer, so, why should i add an
*
If i dont add it, i cant change the value of the parameter.
supouse a function like next:
private static void split_in_terms(string strmath, string* term_left,
string* term_right)
This also gives a lot of warnings  for term_left and right.

Please note too the casting in:  new Arraystring(false, true,
(uint)sizeof(string));
Seems like the new array requires an ulong instead of uint which is
returned by sizeof. I dont know if this is the correct behavior or
not, but it seems strange.



private static Arraystring* split_in_terms(string strmath)
{
int x = 0;
int parentesis=0;
Arraystring list = new Arraystring(false, true, (uint)sizeof(string));
string str = strmath;
StringBuilder term = new StringBuilder();
int p = 0;

stdout.printf(str = %s\n, str);

for(weak string s = str; s.get_char()!=0 ; s = s.next_char())
{
unichar c = s.get_char();
if ( c == '(')
{
parentesis++;
term.append_unichar(c);
}
else if ( c == ')')
{
parentesis--;
term.append_unichar(c);
}
else if ( c == '+')
{
if ( parentesis == 0)
{
list.append_val( term.str );

print(%s\n,term.str);
term = new StringBuilder();
p = x+1;
if ( str.len() = p )
list.append_val( + );
}
}
else
{
term.append_unichar(c);
}
x++;
}
list.append_val( term.str );

if (parentesis != 0)
{
stdout.printf(SintaxERROR: Los parentesis no cierran
adecuadamente: %s\n, str);
return null;
}
return list;
}

public void calculate ()
{
double mean, max, min;
string str = holaaa+world;

print (1);
Arraystring* list = split_in_terms( str );

print (2);
for (int i = 0; i  list-length; i++)
stdout.printf (term%d = %s\n, i, list-index(i));
/*for (int i = 0; i  list-length(); i++)
stdout.printf (term%d = %s\n, i, list-nth_data 
(i)*/);*/
print (3);
.




Cheers.
Diego
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Starting with Vala, problems with strings

2009-04-19 Thread Diego Jacobi
Hi.
This may be a too much newbie question, but:
How do you access a character in a string?

private static int my_string_handler(string *str)
{
string s;
for (x = 0 ; x  str-len() ; x++)
{
if (str[x]=='+')
 {
 s = str-substring(0,x);
 stdout.printf(plus finded at = %d,   left string ist %s\n, x, s);
 return 0;
  }
}
return -1;
}

This prints an error saying that str is not an array.
I cant find anything on the docs an example on how to manipulate
strings char by char.

Cheers.
Diego
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list