Re: [Vala] foreach / Gee.Tree/HashMap

2012-08-20 Thread Luca Bruno
On Tue, Aug 21, 2012 at 5:34 AM, Dennis Möhlmann  wrote:

> Hello,
>
> I was running into an issue with Gee Maps and was wondering if this is
> intended behaviour. Here's a minimal sample:
>
> var map = new HashMap();
> map[1] = "first";
> map[2] = "second";
>
> foreach (var value in map) {
> stdout.printf((value ?? "null") + "\n");
> }
>


> [...]
>


> "Gaps" in the map-keys produce similar issues. Looks like a bug to me,
> but I thought I'd ask here first.
>
>
That's because HashMap has no iterator() method, then vala uses the
size()/get() iterator mode. It's intended to work like that but absolutely
counter intuitive.

-- 
www.debian.org - The Universal Operating System
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [ANNOUNCE] Libgee 0.7.4 - GObject collection library

2012-08-20 Thread Maciej Piechotka
We are very pleased to announce version 0.7.4 of Libgee, the GObject 
collection library.

Libgee 0.7.4 is now available for download at:
http://download.gnome.org/sources/libgee/0.7/


Also please note that now Libgee has its own mailing-list
http://mail.gnome.org/mailman/listinfo/libgee-list
and its own #gee IRC channel.


New in 0.7.4


  * Remove *_impl methods
  * Move virtual methods to interfaces
  * Future-proof the ABI by adding reserved v-table members
  * Add read_only to Map.Entry

Libgee is a collection library providing GObject-based interfaces and 
classes for commonly used data structures.

Libgee provides the following interfaces:

 * Traversable
   o Iterable
 + Collection
   # List
 * BidirList
   # Set
 * SortedSet
 o BidirSortedSet
   # MultiSet
   # Queue
 * Deque
 + Map
   # SortedMap
 * BidirSortedMap
   o Iterator
 + BidirIterator
   # BidirListIterator
 + ListIterator
   # BidirListIterator
 * MultiMap

The ArrayList, ArrauQueue, ConcurrentLinkedList HashSet, HashMap, HashMultiSet,
HashMultiMap, LinkedList, PriorityQueue, TreeSet, TreeMap,
TreeMultiSet, and TreeMultiMap classes provide a reasonable sample
implementation of those interfaces. In addition, a set of abstract
classes are provided to ease the implementation of new collections.

Around that, the API provide means to retrieve read-only views, 
efficient sort algorithms, simple, bi-directional or index-based mutable 
iterators depending on the collection type.

Libgee is written in Vala and can be used like any GObject-based C 
library. It's planned to provide bindings for further languages.


More information about Vala is available at

 http://live.gnome.org/Libgee

Maciej Marcin Piechotka











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


[Vala] foreach / Gee.Tree/HashMap

2012-08-20 Thread Dennis Möhlmann
Hello,

I was running into an issue with Gee Maps and was wondering if this is
intended behaviour. Here's a minimal sample:

var map = new HashMap();
map[1] = "first";
map[2] = "second";

foreach (var value in map) {
stdout.printf((value ?? "null") + "\n");
}

stdout.printf("--\n");

foreach (var entry in map.entries) {
stdout.printf((entry.value ?? "null") + "\n");
}

The resulting output is:

null
first
--
first
second

The first loop seems to start at the non-existing key 0. Adding map[0] =
"test" seems to confirm that:

test
first
second
--
test
first
second

"Gaps" in the map-keys produce similar issues. Looks like a bug to me,
but I thought I'd ask here first.

Regards,
  Dennis

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


[Vala] Bug 679876 - GObject Introspection has no support for Vala's classes and interfaces

2012-08-20 Thread Daniel Espinosa
Could any one check this bug?

I think this is a problems in GLib/GObjectIntrospection, but maybe a
problem in C code generated by Vala.

-- 
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (en trámite, pero para los
cuates: LIBRE)
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [ANNOUNCE] Vala 0.17.5 - Compiler for the GObject type system

2012-08-20 Thread Jürg Billeter
We are pleased to announce version 0.17.5 of Vala, a compiler for the
GObject type system.

Vala 0.17.5 is now available for download at:
   http://download.gnome.org/sources/vala/0.17/

Changes since 0.17.4
 * Support subclassing of GLib.Source.
 * Switch pango bindings to .gir.
 * Add gstreamer-1.0 core bindings.
 * Add gst-plugins-base-1.0 bindings.
 * Add gobject-introspection-1.0 bindings.
 * Bug fixes and binding updates.

Vala is a programming language that aims to bring modern programming
language features to GNOME developers without imposing any additional
runtime requirements and without using a different ABI compared to
applications and libraries written in C.

valac, the Vala compiler, is a self-hosting compiler that translates
Vala source code into C source and header files. It uses the GObject
type system to create classes and interfaces declared in the Vala source
code.

More information about Vala is available at

http://www.vala-project.org/


The Vala Team

---
Alexandre Rostovtsev (1):
  vapigen.m4: use $vapigen_pkg_name as the name of the vapigen package

Dmitry Vagin (1):
  posix: Fix in6_addr and in_addr bindings

Evan Nemerson (13):
  rest-0.7: add deps file with gio-2.0
  Add gobject-introspection-1.0 bindings
  libpeas-1.0: add deps file
  libnl-3.0: change format of some comments to avoid confusing valadoc
  bindings: update gir based bindings
  bindings: mark bindings for deprecated libraries as such
  pango: switch to GIR
  girparser: set CCode type_id for enumerations
  girparser: support symbol_type and instance_idx in metadata
  pango: set free_function on Attribute to pango_attribute_destroy
  girparser: support "experimental" in metadata
  Add gstreamer-1.0 core bindings.
  Add gst-plugins-base-1.0 bindings.

Florian Brosch (1):
  Test symbol resolution in closures

Heiher (1):
  x11: Add XImage bindings

Jürg Billeter (12):
  codewriter: Support fixed-length arrays
  girwriter: Fix index of length parameter for methods returning arrays
  Fix symbol resolution in closures
  Support virtual interface properties
  Support static methods in generic classes
  codegen: Fix double free of captured owned parameters in async methods
  codegen: Drop extra copy of captured unowned parameters in async methods
  gio-2.0: Fix g_dbus_connection_send_message_with_reply binding
  gio-2.0: Fix g_dbus_message_get_body binding
  Fix critical for static fields with initializers in compact classes
  Support subclassing of GLib.Source
  Release 0.17.5

Marcin Lewandowski (2):
  glib-2.0: Remove invalid get_name/set_name bindings from MainContext
  posix: Add getpwuid, getgrnam, and getgrgid bindings

Tristan Brindle (1):
  Ignore .h files passed to compiler

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