Re: [Vala] The future of Vala

2016-09-14 Thread jezra

> 
> Hi!
> 
> At first I didn't want to enter this discussion, because it targeted
> certain people, the Vala programmers, and I am not a programmer.
> 
>

I'm with you. Although I don't work on vala, I certainly work with
vala, and just yesterday I compiled one of my vala projects on the $9
CHIP computer and I couldn't be more pleased with the ease. 

For me as a vala user, the biggest frustration I have, and the
number 1 reason I would NOT consider vala for a future programming
project is the cumbersome documentation. For the future of vala, having
usable documentation is an necessity. 

In this regard, what can I do to help get the documentation to be
usable?

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


Re: [Vala] getting the valadoc.org documentation on a local server

2013-12-16 Thread jezra
If it allows me to take the documentation with me, the lack of search
isn't that big of an issue. Although I have downloaded a few
devhelp packages, I have not been able to find out how to access the
data in the the package with the devhelp application. Can you point me
to a tutorial or some sort of instruction that covers installing new
devhelp packages?


On Mon, 16 Dec 2013 12:45:33 -0800
Evan Nemerson e...@coeus-group.com wrote:

 Crawling valadoc.org isn't a very nice thing to do, and it yields a
 sub-optimal results (for example, no searching).
 
 If you want to access valadoc.org content offline the right way to do
 it is to download the devhelp books like Florian pointed out, then
 use the devhelp application to browse them.  This keeps the load on
 valadoc.org low and gives you something that is much more usable.
 
 
 -Evan
 
 
 On Mon, 2013-12-16 at 21:06 +0200, Tal Hadad wrote:
  You need the -p switch. From wget --help:
  
  -p,  --page-requisitesget all images, etc. needed to display
  HTML page.
  
  Tal
  
   Date: Mon, 16 Dec 2013 04:40:58 +0100
   From: flo.bro...@gmail.com
   To: je...@jezra.net
   CC: vala-list@gnome.org
   Subject: Re: [Vala] getting the valadoc.org documentation on a
   local server
   
   Hey Jezra,
   
   Please do not use wget. You wouldn't like the result.
   
   
   On Mon, Dec 16, 2013 at 3:46 AM, jezra je...@jezra.net wrote:
I have searched on valadoc.org and
https://wiki.gnome.org/Projects/Vala but can not find
'devhelp-package'. Can you please provide the URL for the main
page?
   
   http://api.valadoc.org/download.png
   
   valadoc.org might look different in your browser.
   
   
   With best regards
Flo
   
   On Mon, Dec 16, 2013 at 3:50 AM, jezra je...@jezra.net wrote:
My previous attempt to harvest the documentation included using
wget. Unfortunately I don't recall why it didn't work for me,
nor do I remember which flags I used with wget. I am currently
trying again with 'wget -rk http://valadoc.org'
   
jezra
   
On Sat, 14 Dec 2013 21:39:39 +0200
Tal Hadad tal...@hotmail.com wrote:
   
Wget can clone an entire HTTP website(even convert links and
images to off-line addresses). Read:
http://www.linuxjournal.com/content/downloading-entire-web-site-wget
   
The alternative is to build all packages with vapi-gen, doesn't
really recommended for you :-)
   
Tal
   
 Date: Sat, 14 Dec 2013 10:52:05 -0800
 From: je...@jezra.net
 To: vala-list@gnome.org
 Subject: [Vala] getting the valadoc.org documentation on a
 local server

 Hello,
 Quite often, I travel to an area with no internet and do a
 bit of code hacking and I would really like to be able to
 have the valadoc.org documentation available on my
 development machine. Is there an easy way to get the
 documentation?

 Jezra

 Web: http://www.jezra.net
 Status: http://status.jezra.net
 Coffee: http://coffee.jezra.net
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list
   
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list
   
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list
   ___
   vala-list mailing list
   vala-list@gnome.org
   https://mail.gnome.org/mailman/listinfo/vala-list

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



signature.asc
Description: PGP signature
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] getting the valadoc.org documentation on a local server

2013-12-15 Thread jezra
My previous attempt to harvest the documentation included using wget.
Unfortunately I don't recall why it didn't work for me, nor do I
remember which flags I used with wget. I am currently trying again with
'wget -rk http://valadoc.org'

jezra

On Sat, 14 Dec 2013 21:39:39 +0200
Tal Hadad tal...@hotmail.com wrote:

 Wget can clone an entire HTTP website(even convert links and images
 to off-line addresses). Read:
 http://www.linuxjournal.com/content/downloading-entire-web-site-wget
 
 The alternative is to build all packages with vapi-gen, doesn't
 really recommended for you :-)
 
 Tal
 
  Date: Sat, 14 Dec 2013 10:52:05 -0800
  From: je...@jezra.net
  To: vala-list@gnome.org
  Subject: [Vala] getting the valadoc.org documentation on a local
  server
  
  Hello,
  Quite often, I travel to an area with no internet and do a bit of
  code hacking and I would really like to be able to have the
  valadoc.org documentation available on my development machine. Is
  there an easy way to get the documentation?
  
  Jezra
  
  Web: http://www.jezra.net
  Status: http://status.jezra.net
  Coffee: http://coffee.jezra.net
  ___
  vala-list mailing list
  vala-list@gnome.org
  https://mail.gnome.org/mailman/listinfo/vala-list
 
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

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


[Vala] getting the valadoc.org documentation on a local server

2013-12-14 Thread jezra
Hello,
Quite often, I travel to an area with no internet and do a bit of code
hacking and I would really like to be able to have the valadoc.org
documentation available on my development machine. Is there an easy way
to get the documentation?

Jezra

Web: http://www.jezra.net
Status: http://status.jezra.net
Coffee: http://coffee.jezra.net
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] printing int64 value to standard output

2012-05-14 Thread jezra
On Mon, 14 May 2012 14:14:47 -0400
D.H. Bahr db...@uci.cu wrote:

 Thanks!!
 El lun, 14-05-2012 a las 10:20 -0700, Abhijit Hoskeri escribió:
  On Mon, May 14, 2012 at 10:09 AM, D.H. Bahr db...@uci.cu wrote:
   Hello there, how can I print an int64 variable to stdout??
  
   int64 timestamp = 1234151912;
   stdout.printf(%?, timestamp);
  
  
  %lld is the format string you need.
  
  Regards,
  Abhijit
  
  10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS
  INFORMATICAS... CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
  
  http://www.uci.cu
  http://www.facebook.com/universidad.uci
  http://www.flickr.com/photos/universidad_uci
 

Another option is to use Vala string templates:
int64 timestamp = 1234151912;
stdout.printf(@$timestamp\n);

more examples of using string templates is available at:
http://live.gnome.org/Vala/StringSample
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] howto invoke an external process

2012-02-17 Thread jezra
On Fri, 17 Feb 2012 12:43:42 -0500
D.H. Bahr db...@uci.cu wrote:

 Hello everyone, this is my first email to the list.
 
 I've been looking at Vala for a while now, and I like all I see. I
 just a have a question right now:
 
 Is it possible to spawn an external process from Vala code in a manner
 similar to Python's SubProccess??
 
 Best regards,

Absolutely. GLib.Process will do what you need
http://valadoc.org/glib-2.0/GLib.Process.html
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Closure problem in Gtk.AccelGroup

2010-06-11 Thread jezra lickter
Hello,
basing my work on the documentation found at
http://valadoc.org/gtk+-2.0/Gtk.AccelGroup.connect.html
I am trying to connect an acclegroup to a Closure
code:
AccelGroup accel = new AccelGroup();
accel.connect('q', Gdk.ModifierType.CONTROL_MASK,
Gtk.AccelFlags.VISIBLE,
()= { 
stdout.printf(quit); 
} );

When I compile my application, I get the following error in regards to
the closure
error: lambda expression not allowed in this context

Can someone please tell me what I am doing wrong or point me to a
working example of using AccelGroup.connect()?

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


Re: [Vala] internalization

2010-02-04 Thread jezra lickter
On Thu, 4 Feb 2010 21:47:39 +0100
Tadej Borovšak tadeb...@gmail.com wrote:

 Hello.
 
  so..I ask u if exist a good and possibly simple guide about the
  gettext and vala.
  if u can link a guide:)))
 
 I started playing with Vala some time ago and in order to speed-up the
 learning process, I wrote simple application called sampala (SAMPle
 vALA application)[1]. It's main purpose was to learn how to integrate
 Vala and autotools, but along the way, I also added i18n support using
 gettext. It may also serve as a quick-and-dirty guide to cairo
 drawing;) Check it out, you may find it useful.
 
 Tadej
 
 
 [1] http://github.com/tadeboro/Sampala
 

Tadej, I can't thank you enough for this.
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] removing an element from a list

2009-08-31 Thread jezra lickter
On Mon, 31 Aug 2009 03:07:57 +0200
Jiří Zárevúcky zarevucky.j...@gmail.com wrote:

 On 08/31/2009 03:05 AM, Jiří Zárevúcky wrote:
  On 08/31/2009 02:10 AM, jezra lickter wrote:
  The word test is not removed from the list. Am I doing something
  wrong, and is there a better way to do what I need?
 
 
  The problem is that GLib.List searches for items based on pointer 
  value, not the actual data. You have to either use remove_custom or
  (a much better possibility) use the Gee collection library. It is
  much easier to use from Vala then GLib collection classes, which
  were never intended for use in such high-level language.
 
 
 I meant find_custom()  :) Anyway, Gee is the way to go.
 ___
 Vala-list mailing list
 Vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list

Thanks, the Gee library worked like a charm although I would prefer to
not require another library for the application. If anyone is
interested, the updated code that uses Gee is 

using Gee;
public static void main(string[] args)
{
ArrayListstring? al= new ArrayListstring(str_equal);
al.add(this);
al.add(is);
al.add(a);
al.add(test);
//remove the test
al.remove(test);
foreach(string word in al)
{
stdout.printf(%s , word );
}
stdout.printf(\n);
}
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] removing an element from a list

2009-08-30 Thread jezra lickter
Hello,
For an application that I am working on, I need to keep a collection of
strings and possibly remove a string from the collection. A list seems
to be a good way to manage the strings but when I try to remove() or
remove_all(), the list doesn't change. for example:

public static void main(string[] args)
{
Liststring list = new Liststring();
list.append(this);
list.append(is);
list.append(a);
list.append(test);
//remove test
list.remove_all(test);

foreach(string word in list)
{
stdout.printf(%s , word );
}
stdout.printf(\n);
}

The word test is not removed from the list. Am I doing something
wrong, and is there a better way to do what I need?

jezra
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] reading and writing binary data

2009-01-26 Thread jezra lickter
Hello,
I am using GNet to read data from a file over http and then write the
data to a local file. Everything works fine when I am reading a text
file but when I read some sort of binary file the data gets corrupted.

I believe the problem is caused by Vala converting the data
that I read into a UTF8 string. One way to fix this problem is to read
the data as a GLib.ByteArray but I couldn't find a way to iterate over
ByteArray and extract a single byte. It may also be possible to pull
the raw string data from the Vala string. Unfortunately I don't know
how to do this. Any advice regarding reading and writing binary data
would be greatly appreciated.

jezra
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] problem with GNet Connhttpeventresponse

2009-01-23 Thread jezra
On Thu, Jan 22, 2009 at 11:20 PM, lariamat interfl...@gmx.net wrote:
 Hi Jezra
 Also foreach is now working with recent vala for null-terminated arrays.
 As you are just using and approving the gnet bindings you could post the
 working vapi to the mailing list or attach it to a bugzilla report as
 soon as everything is working.
 Regards
 lariamat

 Am Donnerstag, den 22.01.2009, 13:45 -0800 schrieb jezra:
 On Wed, Jan 21, 2009 at 3:32 PM, lariamat interfl...@gmx.net wrote:
  [NoArrayLength] is outdated with current versions of vala.
  It's [CCode (array_length = false)] now.
  Regards,
  Jörn
  Am Mittwoch, den 21.01.2009, 23:52 +0100 schrieb Frederik:
 
  Ok, then try putting [NoArrayLength] before each one of those array
  fields in the vapi file. Since these are null terminated, they provide
  no length information.
 
  Regards,
 
  Frederik
 
 

 Having used lariamat's suggestion, my gnet-vapi was update to include
 [CCode (array_length = false)]
   public string[] header_fields;

 I can now compile without error, but when I try to read the length of
 the header_fields variable, I get a -1.
 the code to read the length is
 private void get_response_data(ConnHttpEventResponse resp)
 {
 weak string[] header_fields;
   header_fields = resp.header_fields;
   //how many header fields are there?
   stdout.printf(%d header fields\n,header_fields.length);
 }
 curl -D confirms that the URL I'm using for testing is returning
 headers, so  I'm presuming that this is either a problem with the gnet
 library not getting the headers or a problem with copying string
 arrays of unkown length or some sort of programmer error that I'm
 overlooking. Any suggestions would be greatly appreciated.

 jezra
 ___
 Vala-list mailing list
 Vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list

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


attached is my working gnet-2.0.vapi that resolved the problem with
null terminating string array


gnet-2.0.vapi
Description: Binary data
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] problem with GNet Connhttpeventresponse

2009-01-22 Thread jezra
On Wed, Jan 21, 2009 at 3:32 PM, lariamat interfl...@gmx.net wrote:
 [NoArrayLength] is outdated with current versions of vala.
 It's [CCode (array_length = false)] now.
 Regards,
 Jörn
 Am Mittwoch, den 21.01.2009, 23:52 +0100 schrieb Frederik:

 Ok, then try putting [NoArrayLength] before each one of those array
 fields in the vapi file. Since these are null terminated, they provide
 no length information.

 Regards,

 Frederik



Having used lariamat's suggestion, my gnet-vapi was update to include
[CCode (array_length = false)]
public string[] header_fields;

I can now compile without error, but when I try to read the length of
the header_fields variable, I get a -1.
the code to read the length is
private void get_response_data(ConnHttpEventResponse resp)
{
weak string[] header_fields;
header_fields = resp.header_fields;
//how many header fields are there?
stdout.printf(%d header fields\n,header_fields.length);
}
curl -D confirms that the URL I'm using for testing is returning
headers, so  I'm presuming that this is either a problem with the gnet
library not getting the headers or a problem with copying string
arrays of unkown length or some sort of programmer error that I'm
overlooking. Any suggestions would be greatly appreciated.

jezra
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] problem with GNet Connhttpeventresponse

2009-01-22 Thread jezra
On Thu, Jan 22, 2009 at 1:59 PM, Frederik scumm_fr...@gmx.net wrote:
 jezra wrote:
 I can now compile without error, but when I try to read the length of
 the header_fields variable, I get a -1.

 Yes, that's because it's a null terminated array and has no length
 information. But just recently Vala has a solution for that problem:
 http://bugzilla.gnome.org/show_bug.cgi?id=514186

 Try

  [CCode (array_length = false, array_null_terminated = true)]

 Regards,

 Frederik
 ___
 Vala-list mailing list
 Vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list


Thank you, that works perfectly!
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] problem with GNet Connhttpeventresponse

2009-01-21 Thread jezra
hello,
I am trying to retrieve the header_fields and header_values fields
from a GNet.ConnHttpEventResponse and I don't know how to extract the
data. The valdoc page
http://valadoc.org/?path=gnet-2.0::GNet::ConnHttpEventResponse states
that header_fields and header_values are weak string, but the GNet
documentation http://www.gnetlibrary.org/docs/gnet-conn-http.html
states that the fields are null terminating arrays of strings.

Using the function:
   private void get_response_data(ConnHttpEventResponse resp)
   {
   uint response_code;
   weak string header_fields;
   weak string header_values;

   //get the data from the structure
   response_code = resp.response_code;
   header_fields = resp.header_fields;
   header_values = resp.header_values;
   stdout.printf(response code:%.0f\n,response_code);
   //how does the data in the header_fields get iterated?
   }
I can get the data from the fields as a string but I want to get the
data as a string[] so that I can iterate over the data. Does anyone
have any suggestions?

Thanks for your time,
Jezra
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] problem with GNet Connhttpeventresponse

2009-01-21 Thread jezra
On Wed, Jan 21, 2009 at 1:05 PM, Frederik scumm_fr...@gmx.net wrote:
 jezra wrote:
 I can get the data from the fields as a string but I want to get the
 data as a string[] so that I can iterate over the data. Does anyone
 have any suggestions?

 Thanks for your time,
 Jezra

 Hi,

 it's a bug in the bindings. Edit 'gnet-2.0.vapi' and modify their type
 to string[]. Then it should work.


 Regards,

 Frederik
 ___
 Vala-list mailing list
 Vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list


Unfortunately, it did not work.
In the gnet-2.0 vapi, I changed the type from public weak string to
public string[] and upon complation of my vala code, I get the
following error:
error: 'GConnHttpEventResponse' has no member named 'header_fields_length1'

The code in my vala project is

string[] header_fields;
header_fields = resp.header_fields;

I have tried various combinations of string[] and weak string[] to no
avail, but I would like confirmation that
 gchar **header_fields; in the gnet header should be refered to in
vala as a string[].
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list