Re: [Vala] How to use Game loop style with Glib main loop(for events)?

2011-08-05 Thread Levi Bard
Thank you. If I get you right, this will block events until I finish drawing, but that is the purpose. And is it possible to do it multi-threaded? In a way that input thread is different than drawing thread? Well, the glib mainloop always needs to be on the thread where glib is initialized.

Re: [Vala] Vala Logo Showcase

2011-08-04 Thread Levi Bard
My favorite is #4. ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] How to use Game loop style with Glib main loop(for events)?

2011-08-04 Thread Levi Bard
I'm asking this because logically it is possible to process a game Loop with glib main loop. Does this solution involves running the game loop different thread of the main loop? I do it by manually iterating the glib mainloop within my gameloop.

Re: [Vala] How to use Game loop style with Glib main loop(for events)?

2011-08-04 Thread Levi Bard
I'm glad it's possible. Can you please explain how do you integrate this? I'm new(half year) for the glib concepts, so the only integration I know with Glib main loop is Idle.add ()... Does you do this single threaded, or dual? Just using the main thread, with MainContext.iteration()

Re: [Vala] Text-processing performance test : Vala vs Go

2011-06-08 Thread Levi Bard
IMHO there isn't a significant difference. [...] 1) Vala : real    0m1.756s [...] 2 ) Go: real    0m3.708s 2x isn't a significant difference? ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] IDE ?

2010-03-16 Thread Levi Bard
- monodevelop + libafrodite : it works ! Hooray! Feedback and bug reports are welcome, either here, on monodevelop-list, or at http://bugzilla.novell.com -- http://theoatmeal.com/comics/apostrophe http://homes.eff.org/~barlow/EconomyOfIdeas.html http://www.gnu.org/philosophy/shouldbefree.html

Re: [Vala] Dereferencing a pointer

2010-03-11 Thread Levi Bard
/** * Sets a pixel to a given color * @param p The position of the desired pixel * @param color The color to use */ [CCode(array_length=false)] public void setPixel(Point p, Color

Re: [Vala] maemo5 hildon input mode

2010-02-09 Thread Levi Bard
While this is indeed correct workaround, the Hildon binding should probably be updated (so you get type-checking from the compiler). In that case, can that be a different vapi so that we can still use hildon-1 with diablo (maemo 4.x)? Or at least keep the legacy version as hildon-1-diablo.vapi

Re: [Vala] Vala concerned issues !!

2009-11-15 Thread Levi Bard
I have added the Vala for Java Programmers tutorial to the Wiki: http://live.gnome.org/Vala/ValaForJavaProgrammers I encourage every Java programmer on this list to try it out and fix technical, grammar and spelling mistakes. Wow, that's a great writeup!

Re: [Vala] SDL error: SDL_gfxPrimitive.h not found

2009-10-22 Thread Levi Bard
Did you have  --Xcc=-I/usr/include/SDL as part of your compile line? Just out of curiosity...  Why is that necessary? It's because SDL, unlike a lot of libraries bound for Vala, doesn't have a pkg-config file defining include paths and the like. --

Re: [Vala] SDL error: SDL_gfxPrimitive.h not found

2009-10-21 Thread Levi Bard
I followed the instructions indicated here http://live.gnome.org/Vala/SDLSample and got the following error: /sdl-sample.vala.c:9:31: error: SDL_gfxPrimitives.h: No such file or directory error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) Did you have

Re: [Vala] Icon for Vala

2009-10-09 Thread Levi Bard
Here I attach an icon for you to see. What about turning the bullet upside down and accentuating the V-shape in the tip? -- http://homes.eff.org/~barlow/EconomyOfIdeas.html http://www.dreamsongs.com/MobSoftware.html http://www.gnu.org/philosophy/shouldbefree.html

Re: [Vala] Icon for Vala

2009-10-09 Thread Levi Bard
attached is a 128x128 icon of a viking ship, it's almost finished but wanted to get some feedback now as you're all bleating on about it. :) What about making the red portion of the sail more explicitly V-shaped? -- http://homes.eff.org/~barlow/EconomyOfIdeas.html

Re: [Vala] Hi, Is Vala what I am looking for?

2009-09-21 Thread Levi Bard
Would patches to create this C#-compat mode be accepted in Vala? If we must have this discussion yet again[0], can we at least not hijack Kratos's introduction thread? 0. http://markmail.org/message/5ckczur2yox4kjan -- http://homes.eff.org/~barlow/EconomyOfIdeas.html

Re: [Vala] Hi, Is Vala what I am looking for?

2009-09-18 Thread Levi Bard
It almost sounds to me like you want a C# compiler that targets real CPUs instead of targeting the CLI?  You won't find that in Vala. Fortunately, mono already has this feature: http://www.mono-project.com/AOT -- http://homes.eff.org/~barlow/EconomyOfIdeas.html

Re: [Vala] Just heard of Vala

2009-06-29 Thread Levi Bard
Just came across vala. What ide do most of you use with Vala, if any? http://live.gnome.org/Vala#head-6c397c4077ef096e78ea90d62f6d511a82e1e9ea may be helpful. I primarily use MonoDevelop, which requires vsc-shell from vtg for Vala code completion. ___

Re: [Vala] Port Tomboy?

2009-06-29 Thread Levi Bard
What is the current state of interaction between Vala and Mono? I mean, would it be possible to take a useful Mono library, rewrite it in Vala, and make the Mono programs pretty much transparently use the rewrite instead of the original library? Since Vala libraries provide a C api, they

Re: [Vala] Removal of Mono

2009-06-29 Thread Levi Bard
The on topic results of the thread so far are: ...pretty worthless. automatic language conversion of C# The code won't compile but the syntax would be valid. Maybe Vala's parser could parse C# into a Vala AST which it could re-emit as vala code Maybe some perl/python tool to fix up or

Re: [Vala] Removal of Mono

2009-06-26 Thread Levi Bard
I see that some-one is re-writing tomboy in C++ as gnote - why they aren't using Vala is puzzling - probably they never heard of vala. Actually, the person in question is a fervent c++ proponent who has stated that vala is a gimmick. -- http://homes.eff.org/~barlow/EconomyOfIdeas.html

Re: [Vala] DBUS : Must add the signal with dbus_g_proxy_add_signal()

2009-05-18 Thread Levi Bard
WARNING **: Must add the signal 'net-sf-Cameleon-Service-conversion_completed' with dbus_g_proxy_add_signal() prior to connecting to it ...     dbus_g_proxy_add_signal (obj, ConversionCompleted, G_TYPE_INT, It looks like the signal ConversionCompleted is being added, but it's trying to

Re: [Vala] Listing directory content with GIO

2009-05-06 Thread Levi Bard
On Wed, May 6, 2009 at 2:42 PM, Sam Liddicott s...@liddicott.com wrote: I prefer: while ((FileInfo fileinfo = enumerator.next_file(null)) != null) {  stdout.printf(%s\n, fileinfo.get_name()); } Which allows you to have a fake scope surrounding the loop to keep the loop variable temporary

Re: [Vala] What is correct solution to warning: 'null' incompatible with 'SomeType'?

2009-04-17 Thread Levi Bard
   Shell.vala:112.13-112.24: warning: `null' incompatible with return type    `Guitcore.Task`            return null;             Try making the return type of the method Guitcore.Task? (the ? signifies that the type is nullable).

Re: [Vala] How to initialize a Glib.Pid?

2009-04-17 Thread Levi Bard
 * The variable is actually initialized in the resulting C code, by means of   [CCode (default_value = 0)] attribute applied to Glib.Pid type in vapi.   However, valac insists that I have to initialize it nevertheless. I think this is related to http://bugzilla.gnome.org/show_bug.cgi?id=578968

Re: [Vala] Gdir - newbie problem

2009-04-08 Thread Levi Bard
Can someone give me an example how to get a list of files in a directory? I'm doing something like: Gee.ArrayList files = new Gee.ArrayListstring(); Dir? d =

Re: [Vala] Conditionally compiling from FAQ

2009-03-26 Thread Levi Bard
The FAQ says I should add '-D COND' to the valac command line but doing so just tells me 'unknown option -D', has the syntax changed or am I reading the example wrong? I believe that valac no longer supports the -D option. You can pass defines through to the C compiler with -X or -Xcc=, but I

Re: [Vala] Operator overloading

2009-03-24 Thread Levi Bard
Sure, but it's equally easy to use one of: Vertex a = Vertex.add(b,c); Vertex a = new Vertex.add(b,c); That is not true. Imagine what would happen if Vala lost support for operators on the built-in types like int or float. Would anybody say Vala was equally easy to use when even a simple

Re: [Vala] Conditional compilation: Passing #ifdefs through to generated C code

2009-03-24 Thread Levi Bard
I'd like to know more about how to use C preprocessor commands in Vala.  I know that Vala allows some sort of conditional compilation via [Conditional], but I'm interested in a particular use case that it doesn't seem to really help with. Specifically, I have a GTK+ app, and I want to use a

Re: [Vala] Operator overloading

2009-03-24 Thread Levi Bard
Which is the definition between a concatenation and an addition of two vectors? i see no difference. What you get at the end is the resulting vector of the sum of both ones. Oops, that was a mental conflation of geometric vectors and matrix vectors on my part. --

Re: [Vala] Operator overloading

2009-03-23 Thread Levi Bard
At the same time, by having operator overloading we can have our own implementation for any arithmetic operation over any kind of object which will make Vala a more flexible language and this will open lot of possibilities in video game programming. This is, at best, syntax sugar. It doesn't

Re: [Vala] Operator overloading

2009-03-23 Thread Levi Bard
How this relates to video game programming is beyond me. A typical thing i used to see when modding Half-Life is the Vector class which allows you to do vector math as though you were dealing with simple types. vector.x *= 5; vector.y *= 5; vector.z *= 5; becomes vector *= 5; You can

Re: [Vala] Operator overloading

2009-03-23 Thread Levi Bard
In game programming it's very common to use Vertex classes to store X,Y,Z values and sum them in a single with Vertex a = b + c; for example (this is probably the only thing i find useful and clear in C++). This is very used in OpenGL programming f.ex. Sure, but it's equally easy to use one

Re: [Vala] inline C

2008-12-15 Thread Levi Bard
You can currently get the same effect by using extern keyword for c functions in an included c file (you can pass a .c file to valac for this purpose) [...] Vala is not a preprocessor for gcc, although I'm sure many people look at it this way. [...] Personally, I rather have limited

Re: [Vala] inline C

2008-12-15 Thread Levi Bard
Hmmm, I would love to be able to use C++ libraries from Vala (or Genie, since it's a natural jump from Numeric Python which I currently use). Any ideas on how to do that? Compile the vala/genie-produced C code with a C++ compiler? You could use a C wrapper library ala taglib_c...

Re: [Vala] Proposal for asynchronous DBus calls.

2008-10-16 Thread Levi Bard
What if vala can also embed async DBus calls the same way as sync DBus calls? What if one could pass a callback to a DBus method invocation to automagically make it asynchronous? http://live.gnome.org/Vala/DBusSample -- http://homes.eff.org/~barlow/EconomyOfIdeas.html

Re: [Vala] writing a vapi

2008-10-01 Thread Levi Bard
The main source of knowledge remains the available bindings, but without a reference of the tags and code decorations they are of limited help also :( Hopefully, http://rodney.id.au/dev/vala/hackers.html#id2533228 should be helpful. It's linked from http://live.gnome.org/Vala as Hacker's Guide

Re: [Vala] writing a vapi

2008-10-01 Thread Levi Bard
Most of them a self-explanatory like cheader_filename and lower_case_cprefix but for type_signature My wild guess is that this one is for DBus signatures. IntegerType (rank = 6) This is for types that are wrappers of integral types (int, byte, ...) I believe the rank is to help vala

Re: [Vala] patch to add read/write to FileStream

2008-09-11 Thread Levi Bard
fread(void *ptr, size_t size, size_t nmemb, FILE *stream) from what I can tell, Vala automatically fills in the size parameter with the length of buf, so it will always try to read up to the length of the buffer elements. nmemb should always be one in this case because we do not have

Re: [Vala] using IOChannel.add_watch in a class

2008-08-06 Thread Levi Bard
Hi everyone, I am having a peculiar problem. In python, we add a watch using gobject.io_add_watch (..., ..., self.callbackFunc) and the callback would be defined as follows def callbackFunc (*self*, ..., ): The IOFunc? callback takes a reference to the current object as part of its