r. This
would also make it easier for refactoring tools. Worth experimenting
with.)
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /=\ ~/_ (_)
Uazú (_)/=\~/_(
code, little
discipline, few checks), I think that is supported because uncaught
exceptions generate compiler warnings instead of errors.
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /
function could be written
that doesn't generate an exception, if the exception is never useful.
So there could be two calls: do_something() and
do_something_ignore_error().
Jim
--
Jim Peters (_)/=\~/_(_) j...@uaz
same for me:
1 1
2 2
3 3
4 4
:::
98 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
o maybe
Aladdin's flying carpet? Or something else to represent 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
can never be passed to a
> > constructor.
>
> I think this can be fixed a using a separate alloc step
> (like in objective-c?).
Yes, good point -- that would work.
Jim
--
Jim Peters (_)/=\~/_(_)
part. But 'self' hasn't yet been initialised, because the
widget constructor call hasn't yet been made, so NULL is passed.
There is no way that the Vala compiler can make this work, as far as I
can see. A delegate which depends on 'self' can ne
a lot more readable when the callbacks are inline (either
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
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
(_) /=\ ~/_
ntaining the variable you 'ref'
in the call will probably have completely gone by the time it is
written to, so (if it were allowed) you'd risk crashing your app due
to corrupting the stack by using 'ref' with async.
Jim
--
Jim Pe
ation page.
I replaced the old "Asynchronous Methods" section in the tutorial
after 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
all day optimising the Generator, you could also
try implementing 'fast iterators' like in Apple Objective-C, where the
generator code fills a buffer with N items, and then iterator runs
through emptying it, and then they switch again.
J
re is for documentation, or who owns
what. This page could be merged 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 (_)/=\~/_(_)
ed to implicitly register a
> > _finish method for the async method". What does this mean? Also:
> > "end() is a syntax for the *_finish method". I'm confused.
>
> Try looking at the generated C code.
I think the second phrase m
for example, seems
to run through fine without a main loop.
- The docs say "The .callback call is used to implicitly register a
_finish method for the async method". What does this mean? Also:
"end() is a syntax for the *_finish method". I'm confused.
If some
) {
if (i<10) Posix.stdout.printf("%i\n", item);
i++;
}
print("\n\nResults computed in the second generator\n\n");
i=0;
foreach (var item in gen_1) {
if (i<10) Posix.stdout.printf("%i\n", item);
i++;
Jim Peters wrote:
> > Threads are allocated on multiple cores nowadays and you can use
> > lock-free data structures when possible. Still you didn't provide
> > any benchmark, only thoughts.
>
> We are both putting forward "only thoughts".
>
> To p
plement simple coroutines in Vala
using low-level C stuff, i.e. setcontext/makecontext/etc. I guess a
Coroutine class could be useful for something someday. Give me a
moment ...
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /=\ ~/
th a coroutine style.
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /=\ ~/_ (_)
Uazú (_)/=\~/_(_)http://
in Peru(_) /=\ ~/_ (_)
e the kernel
to schedule a context switch. This HAS to be slower -- at least
that's how it seems to me.
Maybe this could be made more workable using 'Pth' instead of kernel
threads, or by using the async stuff already in Vala. (Sorry, I
ertainly you can emulate them but it's not
going to be an efficient way 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 (_)/=\~/_(_)
ence through the now-destroyed closure 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
(_) /=\ ~/_ (_)
bly come up with a better example, but the compiler could
in theory transform 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
ude 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 (_)/=\~/_(_)
k that a flag that controls whether or not all comments are
stored in the AST would not create any significant overhead when
turned off for compiling.
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
ork very well for you.
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /=\ ~/_ (_)
Uazú (_)/=\~/_(_)http://
in Peru(_) /=\ ~/_ _
41, so it won't get forgotten.
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /=\ ~/_ (_)
Uazú (_)/=\~/_(_)http://
in Peru(_) /=\ ~/_
s. It is bug #646713.
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /=\ ~/_ (_)
Uazú (_)/=\~/_(_)http://
in Peru(_) /=\ ~/_ _
asured in unichars: O(N) for each character
fetch, O(N*N) in a loop
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
(_) /=\ ~/_ (_)
Uazú (_)/=\~/_(_)
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
exist
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 ++-
vala/vala
ut 'aliases'. Would this solve the
problem? I'm not sure it would, unless the alias overrides all other
matches and resolves the ambiguity: e.g. would 'using Queue =
Gee.Queue' solve my problem?
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
seem possible
> > to get this value in Vala. So I pass 256 for now which is more than
> > enough.
>
> A workaround I see here (but that would still be a hack), is to have a
> new constant named SIZE in GLib.Source defined as (untested):
>
> [CCode (cn
enough about
that. I haven't added a bug for this because I can't be 100% sure
there isn't some trick to get this to work with the existing VAPI.
Jim
--
Jim Peters (_)/=\~/_(_) j...@uazu.net
like valid bugs.
I think I can 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ú (_)/=\
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 ar
Properties with get; private set;: seemed a little heavy for this,
but maybe all the extra calls would optimise away? Is this the best
approach?
I'm sure I just have to find the right idiom.
Thanks --
Jim
P.S. I'm pleased to have found Vala. You've implemented a
37 matches
Mail list logo