[Vala] Private variable/function/class

2013-07-15 Thread Ulink
testclass_new -- Ulink ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Private variable/function/class

2013-07-16 Thread Ulink
Hi Jonas, This is in no way ideal, but I just wanted to tell you that it's possible. Yeah, its a little bit hacky, but it works and so its ok for me ;-) MANY thanks! Maybe one of the vala guys will fix it in a later valac release (I really think this is a bug). -- Bernhard

Re: [Vala] Private variable/function/class

2013-07-21 Thread Ulink
Hi Evan, In practice this really isn't an issue. Beyond the fact that I don't think non-instance variables are widely used (I certainly don't use many), they should be within your namespace anyways. I agree, but the basic problem is that even private declared variables are put into the .so as

[Vala] Spreading a class across files

2013-08-03 Thread Ulink
Hackers' Guide to Vala (http://rodney.id.au/dev/vala/hackers.html) says: Classes can be split across files, and this is often done for classes with a lot of methods, or very long methods. Seems I'm too dumb to make it, what is the syntax? -- Bernhard

[Vala] array memory leak?

2014-03-05 Thread Ulink
Consider the following (dummy) functions which shows memory leaks here (valac 0.20.1 on ubuntu saucy 64Bit). It seems the problem exists with Gee.ArrayList too. May someone confirm this? //memory leak if len120 (nfill ist NOT the problem) //NO memory leak if len=120 void Dummy1(int len) {

Re: [Vala] array memory leak?

2014-03-06 Thread Ulink
Am 06.03.2014 01:07, schrieb Nor Jaidi Tuah: Most probably it's the optimizing behaviour of the memory allocator and has got nothing to do with the vala compiler. I don't think this is the case. If you call Dummy2(20), after returning from this function there are approximately 60MB of RAM

Re: [Vala] array memory leak?

2014-03-06 Thread Ulink
Am 05.03.2014 23:01, schrieb Steven Oliver: What version libgee are you using? The one installed with Ubuntu saucy (13.10): 0.8.2 (dpkg says) Anyway, valac which saucy uses is not that old (0.20.1) and my Dummy() functions shows the memory leak with standard vala arrays (no gee involved here I

Re: [Vala] array memory leak?

2014-03-06 Thread Ulink
Hi Juerg, According to valgrind 3.9.0, there are no leaks with this test code on my system (up-to-date Linux on x86-64). I've tested with valac 0.20.1 and valac 0.22.1. Confirmed, valgrind shows no memory leak. I'm puzzled. void Dummy1(int len) { const int LOOPS=100; string[] dummy =

Re: [Vala] array memory leak?

2014-03-07 Thread Ulink
Anyone who can give a hint why test 1 eats up memory and test 2 do not? I was not able to find a explanation for this behaviour for myself. -- Bernhard ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] array memory leak?

2014-03-07 Thread Ulink
Are you sure it's not because optimizations? No I'm not sure :-) I simply don't understand the behaviour differences between test 1 and test 2. But I'm curious to understand what's the reason for this. Try to put Dummy1 method in external compile unit(i.e. different .vala and .c file) and

Re: [Vala] array memory leak?

2014-03-07 Thread Ulink
You have to provide more details. What's your method of testing whether memory used by Dummy1 has been freed or not? RSS is at 110 MB here during the loop in either case. I looked at RSS as you did. glibc does not and cannot immediately return every freed block back to the system. Some

Re: [Vala] array memory leak?

2014-03-07 Thread Ulink
'g_free' _is_ (normally) just a wrapper for 'free'. Please note that I'm talking about glibc, not GLib. There is also a memory allocator in GLib, GSlice, which can have its own share of internal fragmentation. However, that's not used for plain strings and arrays. Ok, but the fact that

[Vala] valadoc.org online again, but search not working

2016-06-06 Thread Ulink
Hi, valadoc.org seems online again, but if one type something into the search field, it shows: 'Query failed: (0)s' Is someone able to fix this? -- Bernhard ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] valadoc.org online again, but search not working

2016-06-06 Thread Ulink
Hi Jonathan, many thanks for your hints! -- Bernhard ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list

[Vala] xcb.vapi bugs

2016-06-10 Thread Ulink
Hi, don't know where to send vapi bug reports, so I send it to this mailing list, please don't punish me :-) Although xcb.vapi is deprecated and these are minor bugs, it should be corrected I think: Bug #1: xcb_format_t : replace [Simple] by [SimpleType] Bug #2: xcb_visualtype_t: remove

Re: [Vala] Just a news I've read about popularity langage

2016-07-22 Thread Ulink
Am 2016-07-21 um 21:52 schrieb Adam Tauno Williams: > That is my greatest fear in picking up Vala. My fears are not that big because of the nature of the "binding": VAPI. Im using Vala now for two years for several projects and did not encountered any real LANGUAGE bugs. And creating or fixing

Re: [Vala] Just a news I've read about popularity langage

2016-07-22 Thread Ulink
Am 2016-07-21 um 23:56 schrieb Dev_NIX: > One question: is there a "standard" Vala library/classes? Of course: GLib (and others), simply look at http://www.valadoc.org/#!wiki=index -- Bernhard ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] Just a news I've read about popularity langage

2016-07-22 Thread Ulink
Am 2016-07-22 um 11:07 schrieb mar...@saepia.net: > I think Vala needs a bit of "marketing" (quotes intentional). Yeah, I agree ultimately! Without quotes! Exaggerated: Vala is used widely, but no one knows about. For example, some month ago, I took a look at the gnome-calculator C source. And

Re: [Vala] How to check if string is empty

2017-01-17 Thread Ulink
As Guillaume wrote, you have to use string? str and check string==null FIRST. But I think str.length==0 and str=="" are no high performance solutions, especially for big/long strings. Maybe this is better? bool is_null_or_empty (string? str) { return str == null || str[0] == '\0'; }

Re: [Vala] How to check if string is empty

2017-01-17 Thread Ulink
Am 2017-01-17 um 12:09 schrieb rastersoft: > That's true for the first one, but the second is as fast as str[0] == 0, > because as soon as one byte doesn't fit, the function ends. You are right, because str=="" indeed calls g_strcmp0(), but str[0]=='\0' calls string_get() which seems not faster

Re: [Vala] Array as big as an enum

2016-09-01 Thread Ulink
Hi, and last but not least one may overwrite the to_string method to get own strings like this: enum Test { ONE, TWO; public string to_string() { switch(this) { case ONE: return "enum number one"; case TWO: return "enum number two"; default:

Re: [Vala] The future of Vala

2016-09-13 Thread Ulink
Am 2016-09-13 um 02:10 schrieb Michael Gratton: > It really sounds like Vala needs some maintainers. I think there are some Vala USERS out there, which are able and willing to help with some minor and/or simple tasks and don't know how. So the "heavy weights" like Jürg, Luca, Evan and the like

Re: [Vala] Vala++

2017-04-04 Thread Ulink
Am 2017-04-03 um 02:16 schrieb Nor Jaidi Tuah: > It looks like Vala is going to have > a parallel life: > > https://blogs.gnome.org/chergert/2017/03/31/rustic-gnome-day-3/ > > I hope the gnome+rust people succeed in > recreating the Vala awesomeness in Rust > (even if they don't name it after

Re: [Vala] Vala++

2017-04-04 Thread Ulink
Hi Christian, > Some of us in GNOME have spent many years writing programming languages > and runtimes. Therefore our view is somewhat nuanced and opinionated. As mine is ;-) But I don't understand why the Gnome guys effectively ditch vala (as it appears to me, maybe I'm wrong?). I simply can't

Re: [Vala] State of the Vala union

2017-04-06 Thread Ulink
>> they have been part of a 200K lines of code project. They must have thought >> it was >> production ready. We are SURE that it was and it IS production ready. We started the project approx. 2-3 years ago (vala 0.22 on Ubuntu 14.04 I think) and it is constantly growing while implementing new

Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Ulink
Damit, too late ;-) ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Ulink
Hi Sascha, > doctype = cboDocType.get_active_text; You are assigning a function (a delegate, means a pointer to a function) to an string, thats not possible, use doctype = cboDocType.get_active_text(); instead (parantheses on right side) to CALL the get_active_text() function, which returns

Re: [Vala] Cannot convert from `Gtk.ComboBoxText.get_active_text' to `string'

2017-04-10 Thread Ulink
Note 1: If get_active_text is a PROPERTY instead of a FUNCTION, your code would have been ok. Note 2: Much often, getter/setter functions also have a corresponding property doing the same job. Use whatever you like. ___ vala-list mailing list

Re: [Vala] Button not visible

2017-04-05 Thread Ulink
> To work with signals i like to use *.clicked.connect. So i tried > box_pack_start (Gtk.Button revision = new Gtk.Button.with_label ("Add > new Revision")); > It looks like this isn't possible. What can i do? Move revision outside from the box_pack_start() to access it from outside, e.g. (not

Re: [Vala] Null Coalescing Assignment Operator

2017-05-28 Thread Ulink
> thing = thing ? create (); I think you meant thing = thing ?? create (); Edward seems lazy and don't want to write "thing" two times ;-) ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Roadmap for extending Vala's reach

2017-05-08 Thread Ulink
Am 2017-05-07 um 12:17 schrieb Dr. Michael Lauer: > I was pretty disappointed with the removal of the Posix profile, > since there is quite some potential usage in embedded, kernel-space, and > firmware niches. ME, TOO! ;-) Im actually using Vala for embedded purposes too (actually a Cortex

Re: [Vala] Books and Guides for VALA-GTK-Networking Development

2018-01-22 Thread Ulink
Hi Hans, try https://wiki.gnome.org/Projects/Vala/GIONetworkingSample or basically https://wiki.gnome.org/Projects/Vala/Documentation (below "Sample Code") and of course Valadoc https://valadoc.org/gio-2.0/GLib.SocketClient.html https://valadoc.org/gio-2.0/GLib.SocketService.html

Re: [Vala] Package `Gee-0.8' not found

2018-01-26 Thread Ulink
Hi Ralf, > $ valac --pkg Gee-0.8 list.vala use "valac --pkg gee-0.8 list.vala" (case sensitive). Additionally, install Gee for ubuntu this way: sudo apt install libgee-0.8-dev ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] What is the internal access specification (Re: A couple of Vala questions)

2018-01-29 Thread Ulink
> Does 'internal' hook into the Vala package system, meaning internal > members cannot be accessed from a different package ? See Vala tutorial (https://wiki.gnome.org/Projects/Vala/Tutorial): internal: Access is limited exclusively to classes defined within the same package

Re: [Vala] Vala book done (it's been only 10 years…)

2018-06-19 Thread Ulink
Cool stuff! You absolutely should add a link to the book at https://en.wikipedia.org/wiki/Vala_(programming_language) https://de.wikipedia.org/wiki/Vala_(Programmiersprache) ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] [vala] problem with sorting an array

2018-08-29 Thread Ulink
Hi, > I don't understand why I can't sort my array... :-/ (glib.array) seems this is a GLib.Array compare function binding (vapi) error or something like this. On C level, the compare objects are putted into your compare function as pointers to pointers and not as pointers. For a quick and

Re: [Vala] Using databases with Vala

2018-03-09 Thread Ulink
Hi Oliver, I'm using a VERY thin (2-3 pages of code) self-written vala wrapper which hides open/close and query (returning a 2 dimensional string array as the result) using the Mysql and Sqlite Namespaces. Then, I only send SQL queries and process the result. Of course I only use basic SQL

Re: [Vala] Newbie need help

2018-10-23 Thread Ulink
Or try this: First, install packages: sudo apt install tcc libgtk-vnc-2.0-dev Second, try this VNC client script: #!/usr/bin/vala --Xcc=-w --cc=tcc --pkg gtk+-3.0 --pkg gtk-vnc-2.0 int main (string[] args) { Gtk.init (ref args); var window = new Gtk.Window ();

Re: [Vala] Newbie need help

2018-10-23 Thread Ulink
> valac -> compiler(ok) > vala -> interpreter what/how/usage As others said before, /usr/bin/vala is a command for using in Vala scripts. It compiles the embedded script code on the fly to a temporary binary and runs it afterwards. Additionally, I'm using tcc (Ubuntu: sudo apt install tcc)

Re: [Vala] Newbie need help

2018-10-03 Thread Ulink
> You can use mono without recompile anything on other cpu's, including > ARM/MIPS !!! > I have a project for SetTopBoxes witch runs on Arm32/Mips32 with the same > dll's (AnyCPU) Of course, because it's managed (byte) code, something like java vm code. Does it run on any OS (Windows,

Re: [Vala] printf question

2018-10-09 Thread Ulink
> cellRendererText.text = ("%"+int64.FORMAT).printf((int64)obj); << > int64.FORMAT = "li" > > this works, > > but when i try this, witch is the same > cellRendererText.text = ("%li").printf((int64)obj); > > i get thiss error > > application.vala:192.45-192.54: error: Argument 1: Cannot

Re: [Vala] printf question

2018-10-09 Thread Ulink
> /home/wolfgang/Projekte/TestSqlite/application.vala:192:33: warning: format > ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type > ‘gint64 {aka long int}’ [-Wformat=] > But still the question is not answered ;-) No warning with valac 0.30 (Ubuntu 16.04), so can't help

Re: [Vala] Newbie need help

2018-10-02 Thread Ulink
Hi, > I used geany/geany-plugins from git, now debugger works fine ;-) Perfect. > So maybe last problem/question ;-) NP, ask as much as you want. We need new Vala warriors ;-) > "autocompletion" works with vala? If, i can't get it work Primary, geany does autocompletion based on opened

Re: [Vala] Newbie need help

2018-10-01 Thread Ulink
Hi Wolfgang, I'm using Geany and the "Debugger" and the "GeanyHighlightSelectedWord" plugins. ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Newbie need help

2018-10-02 Thread Ulink
> I wanted to try porting a bigger C# project to vala (performance/etc.) but i > think this is not a good idea. Indeed, it is. > As long as I have to deal with > buildsystem/ctags/plugins/autocomplete/whatever and not with my actual > work > It just wastes my time. But you have already

[Vala] Newbie need help

2018-10-02 Thread Ulink
> I tried, but ubuntu has no debugger plugin ☹ sudo apt-get install geany geany-plugins geany-plugin-addons devhelp Restart Geany and activate it via "Tools - Plugin Manager - Debugger". For the "HighlightSelectedPlugin", which is very convenient, try this: * Download

Re: [Vala] Newbie need help

2018-10-02 Thread Ulink
> THERE IS NO DEBUGGER -> Ubuntu 18.04 Calm down man, we will survive it ;-) > Witch distri do you use? Mine is Ubuntu 16.04. Tried on 18.04 recently and unfortunately you are right: there is no package geany-plugin-debugger :-( Take a look at

Re: [Vala] C# Developer

2018-10-09 Thread Ulink
> If a C# developer really (not only for fun) to change to Vala, then must > necessarily be a valadevelop available! > With completion and tooltips and and and. Agreed, we need a good Vala IDE. > I have already tried a few, but all do not meet the expectations > (Geany/Anjuta/builder) > The

Re: [Vala] any latest vala binary for windows?

2018-09-21 Thread Ulink
Hi Daniel, Im compiling Vala on Windows since years without any problems. Maybe the following "receipe" will help: Note: Use Win7 and above Note: I'm using the 32 Bit MSYS2 version for some reason Note: I'm using the same versions of Vala and Gee as on my Ubuntu 16.04 * Get MSYS2:

Re: [Vala] Launched version 1.14 of Autovala

2019-04-08 Thread Ulink
> I just tried autovala(Ubuntu 18.04), but getting an error. Witch packet > is missing? > /usr/include/readline/readline.h must exist to compile this project. libreadline-dev ? ___ vala-list mailing list vala-list@gnome.org

Re: [Vala] Vala syntax file for Midnight Commander editor

2019-06-20 Thread Ulink
MANY thanks for this! ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list