Re: [Vala] Preprocessor defines via Meson or valac

2019-12-06 Thread Guillaume Poirier-Morency via vala-list
Those arguments are passed straight to the C compiler.

Le ven. 6 déc. 2019, à 18 h 10, xydarc...@163.com  a
écrit :

> Is that means the args passed to compile_args in dependency would be
> treated as vala_args when vala language is used?
>
> --
> xydarc...@163.com
>
>
> *From:* Guillaume Poirier-Morency via vala-list 
> *Date:* 2019-12-07 01:32
> *To:* Ken Gilmer 
> *CC:* vala-list 
> *Subject:* Re: [Vala] Preprocessor defines via Meson or valac
> If I can suggest a small improvement, you could use the
> declare_dependency mechanism to add the definition only to the targets
> that link against libfuse:
>
>libfuse_dep = dependency('libfuse')
>libfuse26_dep = declare_dependency(dependencies: [libfuse_dep].
>   compile_args: '-
>DFUSE_USE_VERSION=26')
>
>executable('mount', 'mount.c', dependencies: [libfuse26_dep])
>
> Le vendredi 06 décembre 2019 à 07:37 -0800, Ken Gilmer a écrit :
> > Thank you Guillaume!  For reference this line in my meson.build file
> > allowed me to define a preprocessor symbol as desired:
> >
> > add_project_arguments('-DFUSE_USE_VERSION=26', language: 'c')
> >
> >
> > On Thu, Dec 5, 2019 at 11:45 PM Guillaume Poirier-Morency via vala-
> > list  wrote:
> > > Le jeudi 05 décembre 2019 à 22:13 -0800, Ken Gilmer via vala-list a
> > > écrit :
> > > > Hello!
> > > >
> > > > I am trying to bind to libfuse from a Vala program.  I see that
> > > in
> > > > libfuse
> > > > I must specify a define to the version of the API I want to
> > > > use[4].  I read
> > > > the Vala documentation as to how to define a symbol[3].  I see
> > > that
> > > > there
> > > > is documentation in meson for how to add arguments to valac[1]
> > > but
> > > > when I
> > > > set my flag, add_project_arguments('-D FUSE_USE_VERSION=26',
> > > > language:
> > >
> > > Try to split the arguments in two or remove the space between '-D'
> > > and
> > > 'FUSE_USE_VERSION=26'.
> > >
> > > Like mentioned elsewhere, you will have to set language: 'c' for
> > > this
> > > case to work.
> > >
> > > > 'vala'), valac complains that it doesn't recognize the option and
> > > in
> > > > the
> > > > build output panel in Gnome Builder it appears to wrap the
> > > expression
> > > > in
> > > > single quotes.  When run valac directly from the command line and
> > > > sidestep
> > > > meson, it seems that the define is ignored[2]. As a sanity test,
> > > if I
> > > > modify the header to define the value, I get the behavior I want.
> > > >
> > > > My question is, how can I set a preprocessor symbol to a specific
> > > > value via
> > > > Meson or valac?
> > > >
> > > > TIA!
> > > > ken
> > > >
> > > > 1: https://mesonbuild.com/Vala.html <
> > > > https://mesonbuild.com/Vala.html#>
> > > > 2: valac -D FUSE_USE_VERSION=26 --pkg fuse --pkg gobject-2.0 --
> > > pkg
> > > > glib-2.0
> > > > main.vala
> > > > 3: https://wiki.gnome.org/Projects/Vala/Manual/Preprocessor
> > > > 4:
> > > >
> > >
> https://github.com/libfuse/libfuse/blob/fuse_2_9_bugfix/include/fuse.h#L16
> > > > ___
> > > > vala-list mailing list
> > > > vala-list@gnome.org
> > > > https://mail.gnome.org/mailman/listinfo/vala-list
> --
> Guillaume Poirier-Morency 
>
> Programmeur analyste en bioinformatique au laboratoire Michael Smith
> Étudiant à la maîtrise en informatique à l'Université de Montréal
>
> Mon blog: https://arteymix.github.io/
> Clé PGP: B1AD6EA5
>
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
>

-- 
Guillaume Poirier-Morency 

Étudiant à la maîtrise en informatique à l'Université de Montréal
Chercheur à l'Institut de recherche en immunologie et en cancérologie

*Page Web:* arteymix.github.io
*Clé PGP:* B1AD6EA5
<https://pgp.mit.edu/pks/lookup?op=vindex&search=0x1CCFC3A2B1AD6EA5>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Preprocessor defines via Meson or valac

2019-12-06 Thread Guillaume Poirier-Morency via vala-list
If I can suggest a small improvement, you could use the
declare_dependency mechanism to add the definition only to the targets
that link against libfuse:

   libfuse_dep = dependency('libfuse')
   libfuse26_dep = declare_dependency(dependencies: [libfuse_dep]. 
  compile_args: '-
   DFUSE_USE_VERSION=26')

   executable('mount', 'mount.c', dependencies: [libfuse26_dep])

Le vendredi 06 décembre 2019 à 07:37 -0800, Ken Gilmer a écrit :
> Thank you Guillaume!  For reference this line in my meson.build file
> allowed me to define a preprocessor symbol as desired:
> 
> add_project_arguments('-DFUSE_USE_VERSION=26', language: 'c')
> 
> 
> On Thu, Dec 5, 2019 at 11:45 PM Guillaume Poirier-Morency via vala-
> list  wrote:
> > Le jeudi 05 décembre 2019 à 22:13 -0800, Ken Gilmer via vala-list a
> > écrit :
> > > Hello!
> > > 
> > > I am trying to bind to libfuse from a Vala program.  I see that
> > in
> > > libfuse
> > > I must specify a define to the version of the API I want to
> > > use[4].  I read
> > > the Vala documentation as to how to define a symbol[3].  I see
> > that
> > > there
> > > is documentation in meson for how to add arguments to valac[1]
> > but
> > > when I
> > > set my flag, add_project_arguments('-D FUSE_USE_VERSION=26',
> > > language:
> > 
> > Try to split the arguments in two or remove the space between '-D'
> > and
> > 'FUSE_USE_VERSION=26'.
> > 
> > Like mentioned elsewhere, you will have to set language: 'c' for
> > this
> > case to work.
> > 
> > > 'vala'), valac complains that it doesn't recognize the option and
> > in
> > > the
> > > build output panel in Gnome Builder it appears to wrap the
> > expression
> > > in
> > > single quotes.  When run valac directly from the command line and
> > > sidestep
> > > meson, it seems that the define is ignored[2]. As a sanity test,
> > if I
> > > modify the header to define the value, I get the behavior I want.
> > > 
> > > My question is, how can I set a preprocessor symbol to a specific
> > > value via
> > > Meson or valac?
> > > 
> > > TIA!
> > > ken
> > > 
> > > 1: https://mesonbuild.com/Vala.html <
> > > https://mesonbuild.com/Vala.html#>
> > > 2: valac -D FUSE_USE_VERSION=26 --pkg fuse --pkg gobject-2.0 --
> > pkg
> > > glib-2.0
> > > main.vala
> > > 3: https://wiki.gnome.org/Projects/Vala/Manual/Preprocessor
> > > 4:
> > > 
> > https://github.com/libfuse/libfuse/blob/fuse_2_9_bugfix/include/fuse.h#L16
> > > ___
> > > vala-list mailing list
> > > vala-list@gnome.org
> > > https://mail.gnome.org/mailman/listinfo/vala-list
-- 
Guillaume Poirier-Morency 

Programmeur analyste en bioinformatique au laboratoire Michael Smith
Étudiant à la maîtrise en informatique à l'Université de Montréal

Mon blog: https://arteymix.github.io/
Clé PGP: B1AD6EA5


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Preprocessor defines via Meson or valac

2019-12-05 Thread Guillaume Poirier-Morency via vala-list
Le jeudi 05 décembre 2019 à 22:13 -0800, Ken Gilmer via vala-list a
écrit :
> Hello!
> 
> I am trying to bind to libfuse from a Vala program.  I see that in
> libfuse
> I must specify a define to the version of the API I want to
> use[4].  I read
> the Vala documentation as to how to define a symbol[3].  I see that
> there
> is documentation in meson for how to add arguments to valac[1] but
> when I
> set my flag, add_project_arguments('-D FUSE_USE_VERSION=26',
> language:

Try to split the arguments in two or remove the space between '-D' and
'FUSE_USE_VERSION=26'.

Like mentioned elsewhere, you will have to set language: 'c' for this
case to work.

> 'vala'), valac complains that it doesn't recognize the option and in
> the
> build output panel in Gnome Builder it appears to wrap the expression
> in
> single quotes.  When run valac directly from the command line and
> sidestep
> meson, it seems that the define is ignored[2]. As a sanity test, if I
> modify the header to define the value, I get the behavior I want.
> 
> My question is, how can I set a preprocessor symbol to a specific
> value via
> Meson or valac?
> 
> TIA!
> ken
> 
> 1: https://mesonbuild.com/Vala.html <
> https://mesonbuild.com/Vala.html#>
> 2: valac -D FUSE_USE_VERSION=26 --pkg fuse --pkg gobject-2.0 --pkg
> glib-2.0
> main.vala
> 3: https://wiki.gnome.org/Projects/Vala/Manual/Preprocessor
> 4:
> https://github.com/libfuse/libfuse/blob/fuse_2_9_bugfix/include/fuse.h#L16
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
-- 
Guillaume Poirier-Morency 

Programmeur analyste en bioinformatique au laboratoire Michael Smith
Étudiant à la maîtrise en informatique à l'Université de Montréal

Mon blog: https://arteymix.github.io/
Clé PGP: B1AD6EA5


signature.asc
Description: This is a digitally signed message part
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Downloading only a portion in the latter part of a file from internet

2019-08-28 Thread Guillaume Poirier-Morency via vala-list
Your code is problematic: skipping the DataInputStream does not guarantee
you that the underlying FileInputStream will be positioned at the desired
byte offset when skipped. This is due to the buffering.

If you are to operate on your stream via a DataInputStream, use it
exclusively:

var dis = DataInputStream(file_stream)
dis.skip(80);

uint8 buffer[160];

size_t buffer_len;

dis.read_all(buffer, out buffer_len);


Alternatively, you should consider an HTTP range query, which will allow
you to do the skip operation at zero-cost. It's a bit more boilerplate to
set up the session and the HTTP message, but might be worth it if you skip
numerous bytes.

Le mer. 28 août 2019, à 04 h 54, Arvind Arvind Pro 
a écrit :

> Hi
>
> I want to use Vala code to download only a portion in the latter part of a
> file from internet-
>
> This is the code I have worked on so far-
>
> var file = File.new_for_uri (url);
> var file_stream = file.read ();
> var data_stream = new DataInputStream (file_stream);
> data_stream.skip (offset);
> singlelineofdata = file_stream.read ( offset, 80, 1);
>
> What I want to know is this- offset is the number of bytes within the
> file, after which I want to download the remaining content.
> Is the above code correct? Because skip should either mean that the
> content being skipped has already being downloaded, whereas I wish to
> download the portion after the offset. (A random number of bytes for this
> example). If the above is not correct then what is the correct way of doing
> this.
>
>
> Yours sincerely,
> Arvind.
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>


-- 
Guillaume Poirier-Morency 

Étudiant à la maîtrise en informatique à l'Université de Montréal
Chercheur à l'Institut de recherche en immunologie et en cancérologie

*Page Web:* arteymix.github.io
*Clé PGP:* B1AD6EA5

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


Re: [Vala] valaDevelop

2019-03-20 Thread Guillaume Poirier-Morency via vala-list
I'm curious. Are you using libvala for providing these features?

Le mar. 19 mars 2019, à 19 h 17, Wolfgang Mauer 
a écrit :

> It would be nice if you can update the Wiki.
>
> The feature "*Jump to Definition*" is now available with valaDevelop
>
>
> Thanks a lot
>
> Wolfgang
>
>
> Am 11.03.19 um 04:30 schrieb Guillaume Poirier-Morency:
>
> I just added the entry in the Wiki.
>
> Le dim. 10 mars 2019, à 10 h 17, Wolfgang Mauer <
> wolfgang.ma...@kabelmail.de> a écrit :
>
>> Implemented so far...
>>
>> Solution/Project-management (including resources/packages)
>> Syntax-Highlight (GtkSourceView-3) search/replace/etc.)
>> Integrated Build, Test and Debug
>> -> Integrated Debugging with full symbol resolving support (only vala
>> source, no .c files necessary, no --save-temps)
>> -> Integrated Build (raw output available)
>>
>>
>> Greetings
>>
>> Wolfgang
>>
>> PS: Please, please, please... Don't call it Editor ;-)
>>
>>
>> Am 05.03.19 um 15:30 schrieb Guillaume Poirier-Morency:
>>
>> Just a suggestion: you should setup a simple GitHub page from the
>> repository and ship sources as assets in empty releases if you don't
>> intend to distribute the source code.
>>
>> I'm not a big fan of freeware, but since we already display IDE like
>> IntelliJ and TextMate, I think it's fine to put your work as well.
>>
>> What features are implemented so far?
>>
>> Le lundi 04 mars 2019 à 19:28 +0100, Wolfgang Mauer a écrit :
>>
>> Thanks for the attention!
>>
>> I hope I can answer correctly to your satisfaction.
>>
>> Some of the features are not fully implemented yet.
>>
>> Well, as the name suggests, everything is integrated.
>> Solution/Project-management (one solution, many projects)
>> Syntax-Highlight
>> Jump to Declaration (sourcecode/valadoc)
>> Debugging (only vala source, no .c files necessary, no --save-temps)
>> Building
>> Auto-Completion
>> Symbol Resolving, debug and edit mode by Tool tip
>> Git integration
>> There are no additional tools such as make/meson/ninja/etc. required.
>> The only one is the vala-compiler (valac).
>>
>> Upon completion, all features that comprise each tool should be
>> available in one.
>>
>> You can see some of the early screenshots here 
>> https://github.com/wolfgangmauer/valaDevelop
>>
>> Greetings
>> Wolfgang
>> PS. Also a macOS - Version will be available
>>
>>
>> Am 04.03.19 um 18:40 schrieb Guillaume Poirier-Morency:
>>
>> What features are supported by your IDE?
>>
>> Le dim. 3 mars 2019, à 05 h 47, Wolfgang Mauer  
>> a écrit :
>>
>> Hi,
>>
>> it would be nice if you update the 
>> "https://wiki.gnome.org/Projects/Vala/Tools"; 
>>  / 
>> "https://wiki.gnome.org/Projects/Vala/ValaForCSharpProgrammers"; 
>> 
>> and add
>> my IDE (https://github.com/wolfgangmauer/valaDevelop)
>>
>>
>> Greetings
>>
>> Wolfgang
>>
>>
>> ___
>> vala-list mailing 
>> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>>
>> --
>> Guillaume Poirier-Morency  
>> 
>>
>> Étudiant à la maîtrise en informatique à l'Université de Montréal
>> Chercheur à l'Institut de recherche en immunologie et en
>> cancérologie
>>
>> Page Web: arteymix.github.io
>> Clé PGP: B1AD6EA5
>>
>>
>
> --
> Guillaume Poirier-Morency 
>
> Étudiant à la maîtrise en informatique à l'Université de Montréal
> Chercheur à l'Institut de recherche en immunologie et en cancérologie
>
> *Page Web:* arteymix.github.io
> *Clé PGP:* B1AD6EA5
> 
>
>

-- 
Guillaume Poirier-Morency 

Étudiant à la maîtrise en informatique à l'Université de Montréal
Chercheur à l'Institut de recherche en immunologie et en cancérologie

*Page Web:* arteymix.github.io
*Clé PGP:* B1AD6EA5

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


Re: [Vala] valaDevelop

2019-03-10 Thread Guillaume Poirier-Morency via vala-list
I just added the entry in the Wiki.

Le dim. 10 mars 2019, à 10 h 17, Wolfgang Mauer 
a écrit :

> Implemented so far...
>
> Solution/Project-management (including resources/packages)
> Syntax-Highlight (GtkSourceView-3) search/replace/etc.)
> Integrated Build, Test and Debug
> -> Integrated Debugging with full symbol resolving support (only vala
> source, no .c files necessary, no --save-temps)
> -> Integrated Build (raw output available)
>
>
> Greetings
>
> Wolfgang
>
> PS: Please, please, please... Don't call it Editor ;-)
>
>
> Am 05.03.19 um 15:30 schrieb Guillaume Poirier-Morency:
>
> Just a suggestion: you should setup a simple GitHub page from the
> repository and ship sources as assets in empty releases if you don't
> intend to distribute the source code.
>
> I'm not a big fan of freeware, but since we already display IDE like
> IntelliJ and TextMate, I think it's fine to put your work as well.
>
> What features are implemented so far?
>
> Le lundi 04 mars 2019 à 19:28 +0100, Wolfgang Mauer a écrit :
>
> Thanks for the attention!
>
> I hope I can answer correctly to your satisfaction.
>
> Some of the features are not fully implemented yet.
>
> Well, as the name suggests, everything is integrated.
> Solution/Project-management (one solution, many projects)
> Syntax-Highlight
> Jump to Declaration (sourcecode/valadoc)
> Debugging (only vala source, no .c files necessary, no --save-temps)
> Building
> Auto-Completion
> Symbol Resolving, debug and edit mode by Tool tip
> Git integration
> There are no additional tools such as make/meson/ninja/etc. required.
> The only one is the vala-compiler (valac).
>
> Upon completion, all features that comprise each tool should be
> available in one.
>
> You can see some of the early screenshots here 
> https://github.com/wolfgangmauer/valaDevelop
>
> Greetings
> Wolfgang
> PS. Also a macOS - Version will be available
>
>
> Am 04.03.19 um 18:40 schrieb Guillaume Poirier-Morency:
>
> What features are supported by your IDE?
>
> Le dim. 3 mars 2019, à 05 h 47, Wolfgang Mauer  
> a écrit :
>
> Hi,
>
> it would be nice if you update the 
> "https://wiki.gnome.org/Projects/Vala/Tools"; 
>  / 
> "https://wiki.gnome.org/Projects/Vala/ValaForCSharpProgrammers"; 
> 
> and add
> my IDE (https://github.com/wolfgangmauer/valaDevelop)
>
>
> Greetings
>
> Wolfgang
>
>
> ___
> vala-list mailing 
> listvala-list@gnome.orghttps://mail.gnome.org/mailman/listinfo/vala-list
>
> --
> Guillaume Poirier-Morency  
> 
>
> Étudiant à la maîtrise en informatique à l'Université de Montréal
> Chercheur à l'Institut de recherche en immunologie et en
> cancérologie
>
> Page Web: arteymix.github.io
> Clé PGP: B1AD6EA5
>
>

-- 
Guillaume Poirier-Morency 

Étudiant à la maîtrise en informatique à l'Université de Montréal
Chercheur à l'Institut de recherche en immunologie et en cancérologie

*Page Web:* arteymix.github.io
*Clé PGP:* B1AD6EA5

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


Re: [Vala] valaDevelop

2019-03-05 Thread Guillaume Poirier-Morency via vala-list
Just a suggestion: you should setup a simple GitHub page from the
repository and ship sources as assets in empty releases if you don't
intend to distribute the source code. 

I'm not a big fan of freeware, but since we already display IDE like
IntelliJ and TextMate, I think it's fine to put your work as well.

What features are implemented so far?

Le lundi 04 mars 2019 à 19:28 +0100, Wolfgang Mauer a écrit :
> Thanks for the attention!
> 
> I hope I can answer correctly to your satisfaction.
> 
> Some of the features are not fully implemented yet.
> 
> Well, as the name suggests, everything is integrated.
> Solution/Project-management (one solution, many projects)
> Syntax-Highlight
> Jump to Declaration (sourcecode/valadoc)
> Debugging (only vala source, no .c files necessary, no --save-temps)
> Building
> Auto-Completion
> Symbol Resolving, debug and edit mode by Tool tip
> Git integration
> There are no additional tools such as make/meson/ninja/etc. required.
> The only one is the vala-compiler (valac).
> 
> Upon completion, all features that comprise each tool should be
> available in one.
> 
> You can see some of the early screenshots here 
> https://github.com/wolfgangmauer/valaDevelop
> 
> Greetings
> Wolfgang
> PS. Also a macOS - Version will be available
> 
> 
> Am 04.03.19 um 18:40 schrieb Guillaume Poirier-Morency:
> > What features are supported by your IDE?
> > 
> > Le dim. 3 mars 2019, à 05 h 47, Wolfgang Mauer <
> > wolfgang.ma...@kabelmail.de> a écrit :
> > > Hi,
> > > 
> > > it would be nice if you update the 
> > > "https://wiki.gnome.org/Projects/Vala/Tools"; / 
> > > "https://wiki.gnome.org/Projects/Vala/ValaForCSharpProgrammers";
> > > and add 
> > > my IDE (https://github.com/wolfgangmauer/valaDevelop)
> > > 
> > > 
> > > Greetings
> > > 
> > > Wolfgang
> > > 
> > > 
> > > ___
> > > vala-list mailing list
> > > vala-list@gnome.org
> > > https://mail.gnome.org/mailman/listinfo/vala-list
> > > 
> > 
> > 
> > -- 
> > Guillaume Poirier-Morency 
> > 
> > Étudiant à la maîtrise en informatique à l'Université de Montréal
> > Chercheur à l'Institut de recherche en immunologie et en
> > cancérologie
> > 
> > Page Web: arteymix.github.io
> > Clé PGP: B1AD6EA5
-- 
Guillaume Poirier-Morency 

Étudiant à la maîtrise en informatique à l'Université de Montréal
Chercheur à l'IRIC

Mon blog: https://arteymix.github.io/
Clé PGP: B1AD6EA5

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


Re: [Vala] valadoc

2018-12-14 Thread Guillaume Poirier-Morency via vala-list
I don't think so. The search functionality is using a POST request to
retrieve a partial HTML template containing the search result.

Le ven. 14 déc. 2018, à 06 h 55, Wolfgang Mauer 
a écrit :

> Hi all,
>
> is there a way to include a "search" i the valadoc url?
>
> Something like "https://valadoc.org/search?=Gtk.Label"; ?
>
>
> Thanks for help
>
> Wolfgang
>
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>


-- 
Guillaume Poirier-Morency 

Étudiant à la maîtrise en informatique à l'Université de Montréal
Chercheur à l'Institut de recherche en immunologie et en cancérologie

*Page Web:* arteymix.github.io
*Clé PGP:* B1AD6EA5

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