Re: [Vala] try/catch concepts

2011-11-14 Thread Jim Peters
warnings instead of errors. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru(_) /=\ ~/_ (_)uazu.net

Re: [Vala] Array resize

2011-09-28 Thread Jim Peters
98 99 99 100 100 Are you running an old version? Or a very new version with a regression? (If so, log a bug.) Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Vala logo symbol voting

2011-08-30 Thread Jim Peters
the ease and feeling of flying above complexity? Any other way we can represent this feeling? Or is there some other feeling we can associate with Vala? Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

[Vala] I'm missing Java's anonymous classes

2011-08-05 Thread Jim Peters
as delegates or as an anonymous class), but I really can't see a sensible and safe way of doing this in Vala. (In real life I have several methods that may need overriding, and several layers in the object hierarchy). Any thoughts on this? Jim -- Jim Peters

Re: [Vala] I'm missing Java's anonymous classes

2011-08-05 Thread Jim Peters
compiler can make this work, as far as I can see. A delegate which depends on 'self' can never be passed to a constructor. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] I'm missing Java's anonymous classes

2011-08-05 Thread Jim Peters
-- that would work. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru(_) /=\ ~/_ (_)uazu.net

Re: [Vala] Vala logo, take three?

2011-07-29 Thread Jim Peters
Luca Bruno wrote: I retry with another logo :) http://i.imgur.com/oFwpC.png (attached is a remix to make it spell the whole word) Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Ref parameters to async methods

2011-07-23 Thread Jim Peters
to, so (if it were allowed) you'd risk crashing your app due to corrupting the stack by using 'ref' with async. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Documenting 'async' / WAS: Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-16 Thread Jim Peters
with N items, and then iterator runs through emptying it, and then they switch again. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru

Re: [Vala] Documenting 'async' / WAS: Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-16 Thread Jim Peters
checking that everything it said was covered in the new text. The original GIO example has gone into the AsyncSamples page. The busy wait example seemed more confusing than helpful as the busy wait itself made no difference to the result. I hope this all looks okay -- Jim -- Jim Peters

Re: [Vala] Documenting 'async' / WAS: Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-15 Thread Jim Peters
the second phrase makes sense. The first phrase doesn't seem correct: The .callback call is used to implicitly register a _finish method for the async method. Who owns the Vala Tutorial? I could add more info to the Tutorial, but if that isn't okay I will create a new wiki page. Jim -- Jim

Re: [Vala] Documenting 'async' / WAS: Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-15 Thread Jim Peters
with the Tutorial if someone thinks that is a good idea. If there is anything incorrect, I'm happy to fix it -- Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

[Vala] Documenting 'async' / WAS: Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-14 Thread Jim Peters
of the points in this list I'd be happy to document this on the wiki somewhere. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru

Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-13 Thread Jim Peters
in gen_1) { if (i10) Posix.stdout.printf(%i\n, item); i++; } return 0; } / -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-12 Thread Jim Peters
of implementing algorithms unless someone puts in the work to make it efficient under the hood. If convenience matters more than efficiency, then no problem. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-12 Thread Jim Peters
this could be made more workable using 'Pth' instead of kernel threads, or by using the async stuff already in Vala. (Sorry, I'm not up to speed on that yet.) Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-12 Thread Jim Peters
style. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru(_) /=\ ~/_ (_)uazu.net

Re: [Vala] Further speculations on couroutines, generators and threads : Emulating Go's goroutines and channels in Vala

2011-07-12 Thread Jim Peters
class could be useful for something someday. Give me a moment ... Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru

Re: [Vala] Threads and closures problem

2011-07-10 Thread Jim Peters
and causes a segfault, which is why this code goes via 'tmp' within the closure. Hopefully I'm not breaking any rules. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Why the temporary variables in the C code are usefull ?

2011-07-07 Thread Jim Peters
function calls and stuff which modifies variables, e.g. p++. You don't want to do 'p++' twice or call the function twice. As the other poster said, C compilers are very good at optimising away temporary variables. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net

Re: [Vala] Why the temporary variables in the C code are usefull ?

2011-07-07 Thread Jim Peters
this: y = x++; z = y * y; into this: z = x++ * x++; But that would be a mistake. You need to hold that intermediate 'y' value somewhere to avoid doing x++ twice. So some temporary variables are always needed. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net

Re: [Vala] lexical analysis using libvala

2011-06-18 Thread Jim Peters
comments are stored in the AST would not create any significant overhead when turned off for compiling. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http

Re: [Vala] Problem creating a Source subclass with closures

2011-04-05 Thread Jim Peters
forgotten. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru(_) /=\ ~/_ (_)uazu.net

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

2011-04-04 Thread Jim Peters
character fetch, O(N*N) in a loop Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru

Re: [Vala] [PATCH] Implement alias functionality for 'using' directive

2011-04-04 Thread Jim Peters
-- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru(_) /=\ ~/_ (_)uazu.net

[Vala] [PATCH] Implement alias functionality for 'using' directive

2011-04-03 Thread Jim Peters
Required to disambiguate symbol references in case of matches from multiple 'using' statements. --- tests/namespaces/aliases.vala | 30 vala/valacodewriter.vala |6 ++- vala/valamemberaccess.vala| 26 +++ vala/valaparser.vala | 17 ++-

Re: [Vala] [PATCH] Implement alias functionality for 'using' directive

2011-04-03 Thread Jim Peters
Jim Peters wrote: Required to disambiguate symbol references in case of matches from multiple 'using' statements. I've implemented the alias functionality missing from 'using'. It took 3 tries before I found a way that worked and didn't upset the existing code too much. As Vala tries

[Vala] 'using' importing too many symbols

2011-04-02 Thread Jim Peters
overrides all other matches and resolves the ambiguity: e.g. would 'using Queue = Gee.Queue' solve my problem? Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

[Vala] Setting up a GLib main loop with custom Sources with Vala 0.11.7

2011-03-28 Thread Jim Peters
there isn't some trick to get this to work with the existing VAPI. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú (_)/=\~/_(_)http:// in Peru

[Vala] Problem creating a Source subclass with closures

2011-03-25 Thread Jim Peters
probably rewrite the code to run all my queues from a single Source, though, to avoid triggering this problem. Jim -- Jim Peters (_)/=\~/_(_) j...@uazu.net (_) /=\ ~/_ (_) Uazú

Re: [Vala] Immutable ref-counted objects?

2011-03-24 Thread Jim Peters
Jim Peters wrote: Java has partial support for immutable GC'd objects by marking all public variables in the class as 'final'. So long as all the referenced objects are also immutable objects, then everything works out. The objects can be freely passed around without fear that some caller