Re: [Vala] Parameter variables in async functions aren't preserved

2019-02-07 Thread Ben Iofel via vala-list
Is the string array allocated on the stack?

On Thu, Feb 7, 2019 at 3:56 PM rastersoft  wrote:
>
> Hi all:
>
> I did an async function and after a yield I tried to use one of the
> parameter variables, but they contain garbage after that call (at least
> in the case of an string array).
>
> An example:
>
> async void a_test(string[] a_list) {
>
>  // here a_list contains the right data
>
>  yield another_async_function();
>
>  // now a_list contains garbage
>
> }
>
> The documentation doesn't mention this. Is this something expected, or a
> bug?
>
> --
> Nos leemos
>  RASTER(Linux user #228804)
> ras...@rastersoft.com  http://www.rastersoft.com
>
> ___
> 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


Re: [Vala] Message's content type

2018-10-01 Thread Ben Iofel via vala-list
I would guess that GMail is sending HTML email and the list disallows it

On October 1, 2018 1:10:18 PM EDT, Wolfgang Mauer  
wrote:
>Hi list,
>
>if i send a message from outlook to the list everything is fine.
>
> 
>
>If I send it from my S7 with gmail or ubuntu with the webfrontend I get
>the
>message "The message's content type was explicitly disallowed"
>
>What am I doing wrong?
>
> 
>
>Wolfgang
>
>___
>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


Re: [Vala] Using databases with Vala

2018-03-09 Thread Ben
I believe there is a sqlite3.vapi somewhere

On March 8, 2018 9:03:17 PM EST, Steven Oliver  wrote:
>I want to begin working an application that would have a database,
>specifically SQLite, as a back-end. I know that at some point sqlheavy
>(https://github.com/nemequ/sqlheavy) was an option for using databases
>with Vala. It doesn't appear to be maintained anymore though. Are
>there other options out there? What do most people use? Are there any
>good open source vala projects using SQLite I could look to as an
>example? The only one I'm aware of is Geary, but ripping the database
>layer out of Geary would be quite the task and probably more than I
>would need.
>
>Steven N. Oliver
>___
>vala-list mailing list
>vala-list@gnome.org
>https://mail.gnome.org/mailman/listinfo/vala-list

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Help with dialogs

2017-08-23 Thread Ben
In the glade file you have

Balis*i*ticaPbrDialog

Just a typo

On August 23, 2017 4:53:48 PM EDT, Steven Oliver  
wrote:
>Hello,
>I've been trying to create a dialog in my application, and it only
>seems to
>half work for me (at best).
>
>At this point in my code:
>https://github.com/steveno/balistica/blob/master/src/DragBox.vala#L153
>
>I attempt to create a new dialog box using a custom glade file.
>
>Vala:
>https://github.com/steveno/balistica/blob/master/src/PbrDialog.vala
>Glade: https://github.com/steveno/balistica/blob/master/ui/pbr.glade
>
>It all compiles fine and even runs without crashing. I do however get
>the
>following messages and my dialog always comes up completely empty.
>
>(balistica:11354): Gtk-CRITICAL **: Error building template class
>'BalisticaPbrDialog' for an instance of type 'BalisticaPbrDialog':
>.:32:1
>Parsed template definition for type 'BalisiticaPbrDialog', expected
>type
>'BalisticaPbrDialog'
>
>Gtk-Message: GtkDialog mapped without a transient parent. This is
>discouraged.
>
>Can anyone help me figure out what I'm doing wrong?
>
>Steven N. Oliver
>___
>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


Re: [Vala] Vala on OpenIndiana Updated

2017-08-16 Thread Ben
You would probably use Posix.signal ()

On August 16, 2017 11:57:48 AM EDT, Jason Martin  wrote:
>GLib.Math.pow10.vala
>GLib.Math.pow10f.vala
>These functions are missing on some platforms:
>
>Some of the core dumps are truly meant to be core dumps.
>
>Maybe a good vala example (someone more qualified than me) of trapping
>signals would be handy?
>___
>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


Re: [Vala] Connecting callbacks with Glade

2017-06-13 Thread Ben Iofel
Composite template support is great in vala. Here's an example file:
https://github.com/vaccineapp/vaccine/blob/master/src/view/CatalogItem.vala
and the associated glade file:
https://github.com/VaccineApp/vaccine/blob/master/data/ui/catalog-item.ui

Also, if you upload your code to GitHub or something I can take a look

On Tue, Jun 13, 2017 at 10:06 PM Steven Oliver 
wrote:

> I have been on and off for a couple of days now trying to get this to work
> in my application, but I cannot. Does anyone have any working examples they
> could pass along? Here are some articles I've gone through, but none of
> them seem to cure my issue. All of the examples on these sites do not
> compile that I have found. A lot of them are pretty old. I'm using Vala
> 0.30.1.
>
>
>- https://coderblog.wordpress.com/2010/11/15/glade-gtk-builder-vala/
>-
>
> https://wiki.gnome.org/Projects/Vala/GTKSample#Loading_User_Interface_from_XML_File
>-
>
> https://blogs.gnome.org/tvb/2013/04/09/announcing-composite-widget-templates/
>-
>
> https://blogs.gnome.org/tvb/2013/05/29/composite-templates-lands-in-vala/
>
>
> Steven N. Oliver
> ___
> 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


Re: [Vala] .me cast resurrection on "Re: The future of Vala"

2017-03-04 Thread Ben Iofel
Here is an old Vala to JavaScript compiler

https://github.com/lethalman/maja

On Sat, Mar 4, 2017 at 7:34 PM Guillaume Poirier-Morency <
guillaumepoiriermore...@gmail.com> wrote:

> It would be quite a challenge in terms of implementation, but I like
> the idea.
>
> Maybe having a Web-based compiler for embedding and running snippets
> would be a good start. It could be integrated in valadoc.org :)
>
> Le samedi 04 mars 2017 à 15:43 +0100, Dev_NIX a écrit :
> > I would take a look to WebAssembly. The next few years could be
> > amazing for the concept of isomorphic web frameworks! (just imagine
> > Valum running in a web browser as on the server side).
> >
> > > Exactly, I thought Vala has good and strong asynchronous
> > > "mechanics" which made Vala a good choice for webapps. So we should
> > > keep an eye on frameworks which could be the key to success for
> > > Vala (or at least better recognition). Thanks for informations,
> > > pending march for the next release ;-) Regards
> >
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
> --
> Guillaume Poirier-Morency 
>
> Étudiant au baccalauréat en Informatique à l'Université de Montréal
> Chercheur boursier à 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
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Valadoc.org is fully operational again

2016-11-24 Thread Ben Iofel
On Thu, Nov 24, 2016, 1:21 PM Dmitry Golovin <d...@golovin.in> wrote:

> 24.11.2016, 18:33, "Ben Iofel" <iofel...@gmail.com>:
> > I'm working on a brand new valadoc by generating XML at
> > https://github.com/eustasy/vala-docs.org/tree/generator . Currently
> > valadoc.org generates html pages then extracts the parts it wants
> >
> > On Nov 24, 2016 9:16 AM, "Guillaume Poirier-Morency" <
> > guillaumepoiriermore...@gmail.com> wrote:
> >
> >>  Le mercredi 23 novembre 2016 à 10:56 +, Al Thomas via vala-list a
> >>  écrit :
> >>  > In case anyone hadn't noticed valadoc.org is fully working again.
> >>  >
> >>  > Thanks to Elementary OS [1] who are hosting the site [2].
> >>  >
> >>  > Development is now being done at https://github.com/valadoc and
> >>  > includes a number of recent updates, including better URIs for
> >>  > bookmarking and external linking. There is also work started on
> >>  > changing valadoc.org to use Valum [3].
> >>
> >>  The docs and static assets are served so far and I still have to
> >>  reimplement the tooltip and search feature (which only require
> >>  accessing a MySQL database with Gda).
> >>
> >>  If anyone would like to test it, I also provided a Vagrantfile to
> >>  provision a VM and run the site.
> >>
> >>  vagrant up
> >>  vagrant provision
> >>  vagrant ssh
> >>  cd valadoc-org
> >>  make serve # or make serve-mini
> >>
> >>  It should be noticeably faster due to use of proactive caching with
> >>  ETag headers.
> >>
> >>  The first transition will be drop-in, then we shall look into the
> >>  possibility of serving and searching docs as a service.
> >>
> >>  >
> >>  > The content is up to date. With Valum 0.3 [4] and libcolumbus [5]
> >>  > recently being added.
> >>  >
> >>  > Thanks should also go out to Chris Daley of Valadate project for
> >>  > hosting a mirror ( http://valadoc.valadate.org ) and the company
> >>  > RooJSolutions ( http://valadoc.roojs.com ) for also hosting a mirror
> >>  > while things got back to normal.
> >>  >
> >>  > [1] - https://elementary.io/
> >>  > [2] -
> http://blog.elementary.io/post/152967321211/were-now-hosting-va
> >>  > ladocorg
> >>  > [3] - https://github.com/Valadoc/valadoc-org/pull/40
> >>  > [4] -
> https://arteymix.github.io/valum/2016/11/11/announcing-valum-0-
> >>  > 3.html
> >>  > [5] -
> http://voices.canonical.com/jussi.pakkanen/2012/12/03/introduci
> >>  > ng-libcolumbus-a-fast-online-approximate-matching-library/
> >>  > ___
> >>  > vala-list mailing list
> >>  > vala-list@gnome.org
> >>  > https://mail.gnome.org/mailman/listinfo/vala-list
> >>  --
> >>  Guillaume Poirier-Morency <guillaumepoiriermore...@gmail.com>
> >>
> >>  Étudiant au baccalauréat en Informatique à l'Université de Montréal
> >>  Chercheur boursier à l'IRIC
> >>
> >>  Mon blog: https://arteymix.github.io/
> >>  Clé PGP: B1AD6EA5
>
> That is a great idea! Possibly later it would be possible to use generated
> XML in GNOME Builder to show documentation for every used function (like it
> is done in most Java IDEs).
>
> I think it is possible to add XML as an output format for valadoc utility.
>

That's essentially what I'm doing. Also, it would not be to hard to
eventually get it merged into valadoc


> Regards,
> Dmitry
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Valadoc.org is fully operational again

2016-11-24 Thread Ben Iofel
I'm working on a brand new valadoc by generating XML at
https://github.com/eustasy/vala-docs.org/tree/generator . Currently
valadoc.org generates html pages then extracts the parts it wants

On Nov 24, 2016 9:16 AM, "Guillaume Poirier-Morency" <
guillaumepoiriermore...@gmail.com> wrote:

> Le mercredi 23 novembre 2016 à 10:56 +, Al Thomas via vala-list a
> écrit :
> > In case anyone hadn't noticed valadoc.org is fully working again.
> >
> > Thanks to Elementary OS [1] who are hosting the site [2].
> >
> > Development is now being done at https://github.com/valadoc and
> > includes a number of recent updates, including better URIs for
> > bookmarking and external linking. There is also work started on
> > changing valadoc.org to use Valum [3].
>
> The docs and static assets are served so far and I still have to
> reimplement the tooltip and search feature (which only require
> accessing a MySQL database with Gda).
>
> If anyone would like to test it, I also provided a Vagrantfile to
> provision a VM and run the site.
>
> vagrant up
> vagrant provision
> vagrant ssh
> cd valadoc-org
> make serve # or make serve-mini
>
> It should be noticeably faster due to use of proactive caching with
> ETag headers.
>
> The first transition will be drop-in, then we shall look into the
> possibility of serving and searching docs as a service.
>
> >
> > The content is up to date. With Valum 0.3 [4] and libcolumbus [5]
> > recently being added.
> >
> > Thanks should also go out to Chris Daley of Valadate project for
> > hosting a mirror ( http://valadoc.valadate.org ) and the company
> > RooJSolutions ( http://valadoc.roojs.com ) for also hosting a mirror
> > while things got back to normal.
> >
> > [1] - https://elementary.io/
> > [2] - http://blog.elementary.io/post/152967321211/were-now-hosting-va
> > ladocorg
> > [3] - https://github.com/Valadoc/valadoc-org/pull/40
> > [4] - https://arteymix.github.io/valum/2016/11/11/announcing-valum-0-
> > 3.html
> > [5] - http://voices.canonical.com/jussi.pakkanen/2012/12/03/introduci
> > ng-libcolumbus-a-fast-online-approximate-matching-library/
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
> --
> Guillaume Poirier-Morency 
>
> Étudiant au baccalauréat en Informatique à l'Université de Montréal
> Chercheur boursier à 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
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Difference between setting "vapidir" and adding a .vapi file (was "Global key shortcuts")

2016-08-20 Thread Ben Iofel
I'm pretty sure that --pkg checks for a pkg-config file, where as passing
the vapi doesn't

On Sat, Aug 20, 2016 at 5:10 AM rastersoft  wrote:

> Hi:
>
> Finally I found the library "keybinder". It doesn't work no wayland, but
> at least allows me to do what I need in X.
>
> But now I have a problem: the VAPI file isn't available in my system, so
> I'm adding it manually. But here comes the odd thing: if I specify the
> VAPI file in the command line, it doesn't compile:
>
> valac -C captura.vala --pkg=gtk+-3.0 --pkg=keybinder-3.0
> keybinder-3.0.vapi
> error: Package `keybinder-3.0' not found in specified Vala API
> directories or GObject-Introspection GIR directories
> Compilation failed: 1 error(s), 0 warning(s)
>
> But if I just set a "vapidir" with the folder that contains the .vapi
> file, everything works fine.
>
> valac -C captura.vala --pkg=gtk+-3.0 --pkg=keybinder-3.0 --vapidir=.
>
> But with other projects, just adding the .vapi files worked fine (like
> the Autovala plugin for Gedit or Scratch, or a plugin for GnomeBuilder
> that I'm writing). In both cases the libraries are available system-wide.
>
> So... why does this happen? And what is the difference between just
> specifying a .vapi file or putting a --vapidir parameter?
>
> Thanks.
>
> El 20/08/16 a las 04:43, Michael Gratton escribió:
> > On Sat, Aug 20, 2016 at 4:33 AM, rastersoft 
> > wrote:
> >> I'm working on a program that needs to respond to an specific key
> >> always, so when I press it, it will show its window. How can I do it
> >> from Vala? Is it possible to do that in a way compatible with wayland?
> >> (let's say: register a DBus method to be called when that key is
> >> pressed, or something like that...)
> >
> > So even when the window is hidden or not focused or whatnot? That's
> > more of a desktop integration issue, isn't it? Maybe there is a
> > FDO/XDG method for registering them.
> >
> > In any case, I imagine you'll probably want to implement
> > GApplication/GtkApplication and have you app raise/focus/etc the
> > window in response to the activate signal. The desktop then just needs
> > to activate the app in response to the global shortcut, by invoking
> > that signal via DBus or by executing a new instance of the app, which
> > would also send the signal to the already running instance.
> >
> > //Mike
> >
>
> --
> Nos leemos
>  RASTER(Linux user #228804)
> ras...@rastersoft.com  http://www.rastersoft.com
>
>
> ___
> 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


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

2016-07-28 Thread Ben Iofel
If you want to write it, make a pull request

On Thu, Jul 28, 2016, 4:13 PM mar...@saepia.net <mar...@saepia.net> wrote:

> Hm I don't think it's really alligned with what I meant.
>
> For example that introduction
>
> https://github.com/eustasy/vala-lang.org/blob/master/vwiki/vala.wiki
>
> is not-marketing driven. And so on.
>
> None of these features give any profit to the developer alone. Even their
> combination. There's no single word about strongest point - easiness of
> creating multiplatform apps using fairly-high level language, requiring no
> interpreter/VM, with low overhead and small enough to handle embedded
> devices.
>
> This is what I would like to see on vala's page if we are talking about
> increasing interest.
>
> I also agree that nice application framework would be something that can
> give a boost. But it's a huge effort. Vala gives a lot of profits to the
> developers right now, even without one, so I think first thing should be
> trying to get the most of what is available by "selling" this in a right
> way.
>
> m.
>
>
>
> 2016-07-26 22:36 GMT+02:00 Ben Iofel <iofel...@gmail.com>:
>
>> You should contribute to https://github.com/eustasy/vala-lang.org
>>
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


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

2016-07-26 Thread Ben Iofel
You should contribute to https://github.com/eustasy/vala-lang.org
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


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

2016-07-22 Thread Ben Iofel
I'm sure the guys at elementary.io would love to help with marketing. They
started a new vala site and new vala documentation page

On Fri, Jul 22, 2016, 7:47 AM Felipe Lavratti  wrote:

> As an embedded system engineer I see huge potential using Vala in embedded
> Linux, it has not the runtime drawback of python and java, and is way
> simpler to use than C++, while C# has no porting to ARM.
> On Fri, Jul 22, 2016 at 08:25 Adam Tauno Williams 
> wrote:
>
> > On Fri, 2016-07-22 at 09:58 +0200, Ulink wrote:
> > > 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
> >
> > Agree.  This is one of the appealing aspects.  GNOME already provides a
> > rich set of proven libraries.
> >
> > Downside is the documentation can be thin - and assume a *lot* of
> > prerequisite knowledge.  It seems to have the attitude: here is the
> > method signature, all else is obvious... Duh!
> >
> > --
> > Meetings Coordinator, Michigan Association of Railroad Passengers
> > 537 Shirley St NE Grand Rapids, MI 49503-1754 Phone: 616.581.8010
> > E-mail: awill...@whitemice.org GPG#D95ED383 Web: http://www.marp.org
> >
> >
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
> >
> --
> Skype: felipeanl
> ___
> 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


Re: [Vala] getting started with vala and glade

2016-06-26 Thread Ben Iofel
As OP said, if you run the commented out code it works fine.

On Sun, Jun 26, 2016 at 6:24 PM, Ben Iofel <iofel...@gmail.com> wrote:

> The run method blocks, so it works fine. I've used this line in my own
> programs
>
> On Sun, Jun 26, 2016 at 6:23 PM, Luca Bruno <lethalma...@gmail.com> wrote:
>
>> It does, it's reference counting. The main there is freeing the Thelma
>> object right after run method is called.
>>
>>
>> Il lunedì 27 giugno 2016, Ben Iofel <iofel...@gmail.com> ha scritto:
>>
>>> Vala does not have garbage collection, and the main() in the code
>>> example is fine
>>>
>>>
>>
>> --
>> NixOS Linux <http://nixos.org>
>>
>>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] getting started with vala and glade

2016-06-26 Thread Ben Iofel
Vala does not have garbage collection, and the main() in the code example
is fine

On Sun, Jun 26, 2016 at 3:10 PM, Luca Bruno  wrote:

> Il venerdì 27 maggio 2016, Chris Bare  ha scritto:
>
> > I have a very simple vala program that is trying to load a glade ui file.
> > The window appears briefly, but then the program exits without error.
> > What am I missing?
>
>
> Save the new Thelma() to a variable, otherwise it gets garbaeg collected.
>
>
> --
> NixOS Linux 
> ___
> 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


Re: [Vala] why valac says "error: Failed to execute child process (Exec format error)"

2016-06-21 Thread ben
What does
$ echo $CC
show?

Does 
$ valac --cc=gcc ./hello.vala
work?

On Tue, 2016-06-21 at 22:56 +0800, oyster wrote:
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:
> /c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:
> /mingw64/bin
> 
> to delete all possible things in old Msys, I run
> $ export PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/mingw64/bin
> 
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/opt/bin:/mingw64/bin
> 
> $ vala ./hello.vala
> Compilation failed: 3 error(s), 0 warning(s)
> error: Failed to execute child process (No such file or directory)
> error: Failed to execute child process (No such file or directory)
> error: Failed to execute child process (No such file or directory)
> 
> 2016-06-21 22:44 GMT+08:00 Al Thomas :
> > 
> > 
> > 
> > From: oyster 
> > Sent: Tuesday, 21 June 2016, 15:38
> > Subject: Re: [Vala] why valac says "error: Failed to execute child
> > process
> > (Exec format error)"
> > 
> > Msys2 (msys2-x86_64-20160205.exe) has been installed, and I have
> > used
> > $  pacman -Sy pacman
> > $  pacman -Syu
> > $  pacman -Su
> > which all say " there is nothing to do" now
> > 
> > 
> > I use this line to install Vala in msys2.exe
> > $  pacman -S mingw-w64-x86_64-vala
> > 
> > then
> > $ export LANG=en
> > $ export PATH=$PATH:/mingw64/bin
> > 
> > What does
> > echo $PATH
> > show? Does it still include your old MSYS path so those
> > binaries/libraries
> > are being picked up first?
> > 
> > 
> > $ vala ./hello.vala
> > Compilation failed: 3 error(s), 0 warning(s)
> > error: Failed to execute child process (No such file or directory)
> > error: Failed to execute child process (No such file or directory)
> > error: Failed to execute child process (No such file or directory)
> > 
> > 
> ___
> 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


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

2016-06-06 Thread Ben Iofel
For now you may use this mirror with working search:
http://valadoc.valadate.org

On Mon, Jun 6, 2016 at 6:08 AM Ulink  wrote:

> 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
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Extended floating types

2016-05-24 Thread Ben Iofel
error: structs cannot be empty: float128_t

On Tue, May 24, 2016 at 11:16 AM Al Thomas <astav...@yahoo.co.uk> wrote:

>
>
>
> ------
> *From:* ben <iofel...@gmail.com>
> *Sent:* Tuesday, 24 May 2016, 16:01
> *Subject:* Re: [Vala] Extended floating types
>
>
> This does not work. The C code has: typedef float float128_t;
>
> Try:
>
> [SimpleType]
> [CCode(has_type_id = false, default_value = "0")]
> public struct float128_t {}
>
> The SimplyType makes it be passed by value rather than by reference when
> used
> as an argument in a function call.
> I think the FloatingType, IntegerType, etc. does casting. As there is no
> rank 12 it just casts to the default, i.e. float.
>
> On the subject of binding exotic types. Bindings for C decimal types
> would be useful for financial data and transactions.
>
>
> On Mon, 2016-05-23 at 21:26 -0500, Guillaume Poirier-Morency wrote:
> > It's possible to declare these types if you need to use them.
> >
> > https://wiki.gnome.org/Projects/Vala/Manual/Attributes#FloatingType_A
> > tt
> > ribute
> >
> > [CCode (has_type_id = false)]
> > [FloatingType (decimal = false, rank = 12, width = 128]
> > struct float128_t {}
> >
>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Extended floating types

2016-05-24 Thread ben
This does not work. The C code has: typedef float float128_t;

You could map it to gcc's 128 bit floating point type (https://gcc.gnu.
org/onlinedocs/gcc/Floating-Types.html) or use the 80-bit long double
type (https://stackoverflow.com/questions/13516476/long-double-gcc-spec
ific-and-float128)

Neither of these options are standard. For arbitrary precision math in
C I like to use https://gmplib.org/.



On Mon, 2016-05-23 at 21:26 -0500, Guillaume Poirier-Morency wrote:
> It's possible to declare these types if you need to use them.
> 
> https://wiki.gnome.org/Projects/Vala/Manual/Attributes#FloatingType_A
> tt
> ribute
> 
> [CCode (has_type_id = false)]
> [FloatingType (decimal = false, rank = 12, width = 128]
> struct float128_t {}
> 
> Like Daniel said, Vala primitive types are mapped to GLib's type with
> the GType system, so it's not really the language's fault if there is
> no support for 128 bit floating points. It's not a common use case
> either way.
> 
> With 'has_type_id = false', the compiler knows that there's no type
> information to retreive.
> 
> Rank 12 does not really exist, but that would be the appropriate
> value
> since 10 and 11 are for signed and unsigned 64 bit types.
> 
> It might be handy to have a VAPI for that in 'vala-extra-vapis'.
> 
> Cheers and best luck,
> 
> Le lundi 23 mai 2016 à 09:59 +0300, Vitaly V. Ch a écrit :
> > Ok, Thanks.
> > 
> > It clarifies the situation.
> > 
> > With best regards,
> > 
> > Vitaly Chernooky
> > 
> > On Mon, May 23, 2016 at 4:51 AM, Daniel Espinosa 
> > wrote:
> > 
> > > May you should be able to create your own basic type.
> > > 
> > > May should be a guide to do so.
> > > 
> > > GLib should have this types too, before you are able to create
> > > your
> > > basic
> > > types. This means you should define a GType for a basic type, in
> > > this case
> > > your long double.
> > > 
> > > May we can create a library to define this math basic types, to
> > > be
> > > used in
> > > other libraries. This is not a GLib interest, I think, because is
> > > not a
> > > primary Math library.
> > > 
> > > I was working a little in that, but may you should ask to gtk-
> > > list
> > > for
> > > help on defining this new types.
> > > 
> > > In other ideas, is required to use that types or is possible to
> > > use
> > > some
> > > structs holding your information in a way to be used in other
> > > methods, that
> > > may take that structs an do calculations using that types
> > > internally,
> > > written in C with Vala bindings [1], then return again that
> > > structs.
> > > 
> > > [] See git.gnome.org/browse/gxml it uses simple C methods and
> > > Vala
> > > bindings to be used in Vala code for xlibxml
> > > El may. 22, 2016 3:23 PM, "Vitaly V. Ch" 
> > > escribió:
> > > 
> > > Hi All!
> > > 
> > > Some time ago Vala has pulled my attention as a way to solve some
> > > kind of
> > > math problems. But some time later I realized that this cozy and
> > > beautiful
> > > staff does not have extended floating datatypes such as long
> > > double
> > > or
> > > float128_t. This fact disappointed me and I'm interested in some
> > > comments.
> > > 
> > > With best regards,
> > > 
> > > Vitaly Chernooky
> > > ___
> > > 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


Re: [Vala] Autocomplete server

2016-04-21 Thread Ben Iofel
libvala is probably the only way to do this
I have generated valadoc for libvala on my website
https://iofel.me/libvala/libvala/index.htm

On Thu, Apr 21, 2016 at 3:53 PM Thiago Jedi  wrote:

> Hey guys.
>
> First of all, Vala is awesome. I'm kinda new in the Vala world, but as
> a C# developer, I found myself willing to invest my time learning the
> language. I like the idea of a familiar syntax with powerfull
> performance.
>
> I use the new Visual Studio Code IDE/Editor and decide to develope the
> plugin for Vala [0]. I already have syntax highlight, I'm writing the
> snippets, and I was wondering how much work it would take to bring
> autocompletion to that editor.
> I mean, I searched a little and found a lot of discontinued projects
> (like libafrodite) and others tightly integrated with host editor.
>
> I think it'd be nice to have a language server which is independent
> from editors. Something like the OmniSharp project for the C# language
> [1].
>
> After my little research this last couple weeks, here's what I got:
>
> 1. The best autocomplete behavior I found (imho) was the Valencia
> plugin for Gedit. But it had to rewrite all of the tokens that is
> already on the libvala.
>
> 2. The autocomplete with the cleanest code was in Anjuta's Vala plugin,
> which uses libvala extensivelly.
>
> I didn't want to reinvent the wheel, libvala seems to do all the
> heavylifting, so I tried to mimic the Anjuta's behavior, but I got
> stuck in some issues like the class base types returning null.
>
> Then I came here for help. Am I in the right track? Where can I find
> documentation about libvala? Or is it just not worth it and I should
> use another (existing) tool?
>
> Thank you for your attention.
>
> Thiago Abreu
>
> [0] - https://github.com/thiagoabreu/vala-code
> [1] - http://www.omnisharp.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


Re: [Vala] Vala wishlist

2016-03-30 Thread Ben
On Tue, 2016-01-12 at 21:54 +, Afonso wrote:
> My thoughs about Vala
> =
> 
> I just started coding in Vala, and i found it's a quite fun language
> to learn, very simillar to Java and C#. The integration with GLib and
> GObject is simply amazing, and the possibilty to generate C code is
> also very pleasant.
> 
> As `Vala` is still in a development phase, I would like to suggest
> a few features that could help `Vala` reach the next big step.
> 
> 
> # More functional support
> 
> Altough `Vala` has support for closures, it would be good to hava
> even
> more functional power.
> 
> For example, `Vala` could ship with a `filter` function that supports
> every Gee Collection, something like:
> 
>  var books = new TreeSet ();
>  books_from_year = books.filter ( (b) => { return year == 1952; });

Gee collections have .filter, but they return a Gee.Iterator

> 
> Other functions could behave the same way, like `map`, `reverse`,
> `folds`, `all`, `any`, `or`, `all`, `takeWhile`, `dropWhile` just to
> mention a few (i know, i know, Vala != Haskell xD).
> 
> Also, most closures end with a return statement. It would be a lot
> cleaner if one could skip the `return` statement, for example:
> 
>  var f = (a) => { a == 2; }; // Instead of { return a == 2; }
> 
> It does much more sense in a closure context not to have a return
> statement. 
You can do
   var f = (a) => a == 2;

> Also with mutliple statements closures, `Vala` could behave
> a little bit like `Ruby`, and automatically infer what does the
> closure returns:
> 
>  var f = ( a, b ) => {
>   a = b - 1;
>   if ( a > b )
>    "ok"; // return "ok";
>   else
>    "not ok"; // return "not ok";
>  };
> 
> 
> # More syntatic sugar for print
> 
> Whenever `stdout.printf` or `print` are invoked with an object,
> automatically use `to_string ()` method (like `Java`).
> For example, suppose we have the following class definition:
> 
>  public class Book : Object {
>   public string title { get; set; }
>   public int year { get; set; }
> 
>   public string to_string () {
>    return "Title: %s, Year: %d".printf(this.title, this.year);
>   }
>  }
> 
> It would be nice if we could simply print an object like this:
> 
>  void main (string[] args) {
>   Book b = new Book ("The Old Man and the Sea", 1952);
>   print (b); // <=> print (b.to_string());
> 
>   /* Output:
>   >> Title: The Old Man and the Sea, Year: 1952
>   */
>  }
> 
> 
> Automatic array printing for basic types (and objects - using
> `to_string ()` method), like so:
> 
>   void main (string[] args) {
>    string[] authors = { "George Orwell", "John Steinbeck" };
>    int[] years = { 1999, 2000, 2001 };
> 
>   Book b1 = new Book ("The Old Man and the Sea", 1952);
>   Book b2 = new Book ("The Pearl", 1973);
> 
>   Book[] books = { b1, b2 };
> 
>    print (authors);
>    print (years);
>    print (books);
> 
>    /* Output:
>    >> ["George Orwell", "John Steinbeck"]
>    >> [1999, 2000, 2001]
>    >> [Title: The Old Man and the Sea, Year: 1952,
>    Title: The Pearl, Year: 1973]
>    */
> 
>   }

Vala will automatically call to_string() in template strings: 
print (@"$authors\n$years\n);

> 
> Wish you all the best regards
> 
> 3º ano, Mestrado Integrado em Engenharia Informática,
> Universidade do Minho
> 
> ___
> 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


Re: [Vala] How to properly define struct in manually written VAPI?

2016-03-02 Thread Ben Iofel
If you can make it segfault, please file a bug or at least post the code
here

On Wed, Mar 2, 2016, 11:09 AM mar...@saepia.net <mar...@saepia.net> wrote:

> Hello,
>
> thank you for suggestions. I'll try to implement them.
>
> But should I keep it as struct or rather compact class?
>
> Regarding json-glib: I intentionally try to avoid it. I was able to make
> segfault even with a few simple attempts that should be tested in properly
> written library, I don't need mapping for GObject properties, and I think I
> encountered also some issues with big integers, I don't remember now. In my
> use case more low level, better-tested library will a be better choice.
>
> m.
>
> 2016-03-02 15:28 GMT+01:00 Ben <iofel...@gmail.com>:
>
>> FYI, Vala already has binding for json-glib
>> http://valadoc.org/#!api=json-glib-1.0/Json
>> It has nice features like deserialization with GObject properties
>>
>> On Wed, Mar 2, 2016 at 5:19 AM, mar...@saepia.net <mar...@saepia.net>
>> wrote:
>>
>> Hello, I need to write VAPI for jansson JSON library. I have already
>> started ( https://github.com/akheron/jansson/pull/273) and generally
>> speaking it works fine but I have an issue with covering one struct. In C
>> code there's the following struct: #define JSON_ERROR_TEXT_LENGTH 160
>> #define JSON_ERROR_SOURCE_LENGTH 80 typedef struct { int line; int column;
>> int position; char source[JSON_ERROR_SOURCE_LENGTH]; char
>> text[JSON_ERROR_TEXT_LENGTH]; } json_error_t; it is an output parameter to
>> function that should have the following syntax in Vala: loads(string input,
>> LoadFlags flags, out Error error) I struggle to properly define it in VAPI.
>> When I define it like this: [CCode (cname = "json_error_t", has_type_id =
>> false)] public struct Error { public string text; public string source;
>> public int line; public int column; public size_t position; } it complains
>> about missing copy function during C compilation phase when I add [CCode
>> (cname = "json_error_t", has_copy_function = false, has_type_id = false)]
>> public struct Error { public string text; public string source; public int
>> line; public int column; public size_t position; } it then throws
>> api/auth/oauth2.c:939:2: error: array type 'char [160]' is not assignable
>> _g_free0 ((*dest).text); ^  api/auth/oauth2.c:51:28: note:
>> expanded from macro '_g_free0' api/auth/oauth2.c:940:15: error: array type
>> 'char [160]' is not assignable (*dest).text = _tmp1_;  ^
>> api/auth/oauth2.c:943:2: error: array type 'char [80]' is not assignable
>> _g_free0 ((*dest).source); ^ ~~ How to define it properly?
>> Underlying API does not provide any destroy/copy functions. I also tried to
>> convert it to the compact class but then Vala Compiler creates
>> pointer-to-pointer for underlying C code for the parameter which is
>> improper. Thanks, Marcin ___
>> 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


Re: [Vala] How to properly define struct in manually written VAPI?

2016-03-02 Thread Ben
FYI, Vala already has binding for json-glib 
http://valadoc.org/#!api=json-glib-1.0/Json

It has nice features like deserialization with GObject properties

On Wed, Mar 2, 2016 at 5:19 AM, mar...@saepia.net  
wrote:

Hello,

I need to write VAPI for jansson JSON library. I have already started 
(

https://github.com/akheron/jansson/pull/273) and generally speaking it
works fine but I have an issue with covering one struct.

In C code there's the following struct:


#define JSON_ERROR_TEXT_LENGTH160
#define JSON_ERROR_SOURCE_LENGTH   80

typedef struct {
int line;
int column;
int position;
char source[JSON_ERROR_SOURCE_LENGTH];
char text[JSON_ERROR_TEXT_LENGTH];
} json_error_t;


it is an output parameter to function that should have the following 
syntax

in Vala:

loads(string input, LoadFlags flags, out Error error)

I struggle to properly define it in VAPI. When I define it like this:

  [CCode (cname = "json_error_t",  has_type_id = false)]
  public struct Error {
public string text;
public string source;
public int line;
public int column;
public size_t position;
  }

it complains about missing copy function during C compilation phase

when I add

  [CCode (cname = "json_error_t", has_copy_function = false, 
has_type_id =

false)]
  public struct Error {
public string text;
public string source;
public int line;
public int column;
public size_t position;
  }

it then throws

api/auth/oauth2.c:939:2: error: array type 'char [160]' is not 
assignable

_g_free0 ((*dest).text);
^ 
api/auth/oauth2.c:51:28: note: expanded from macro '_g_free0'
api/auth/oauth2.c:940:15: error: array type 'char [160]' is not 
assignable

(*dest).text = _tmp1_;
 ^
api/auth/oauth2.c:943:2: error: array type 'char [80]' is not 
assignable

_g_free0 ((*dest).source);
^ ~~


How to define it properly? Underlying API does not provide any 
destroy/copy

functions.

I also tried to convert it to the compact class but then Vala Compiler
creates pointer-to-pointer for underlying C code for the parameter 
which is

improper.

Thanks,

Marcin
___
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


Re: [Vala] How to test async methods?

2016-02-17 Thread Ben Iofel
You need a MainLoop to run async methods in vala

On Tue, Feb 16, 2016, 8:19 AM mar...@saepia.net  wrote:

> Hello,
>
> I need some advice on testing async methods.
>
> When I run .begin() in the isolated test suite (where mainloop is not
> running) it seems that .end() callback never gets called.
>
> What is the best way to trigger running async methods? Should I just spawn
> mainloop on purpose or is there any clearer way to do this?
>
> Thank you in advance,
>
> Marcin
> ___
> 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


Re: [Vala] Is there any usable editor for Vala?

2016-02-15 Thread Ben Iofel
If you see a crash in builder, I could look into it with a stack trace

On Sun, Feb 14, 2016, 6:32 AM Matthias Berndt 
wrote:

> Hi,
>
> I wonder if you have any recommendation regarding a decent editor for Vala.
> I don't need much, just code completion and "go to declaration", but I
> can't seem to find anything that works. Here's the one's I've looked at:
>
> Anjuta: Imported the vala compiler as an autotools project, but neither
> code completion nor go to declaration works.
> Gnome Builder: crashes as soon as I open a .vala file.
> Geany: completion only suggests bogus (i. e. it offers methods that don't
> exist, doesn't offer the ones that do etc.).
> vala tools for gedit: not tried, but seems dead (last release was five
> years ago)
> valencia: also seems dead, couldn't get it to compile
> MonoDevelop: Vala support seems to have been removed
> Valama: Completion works! It also has 100% CPU usage at all times,
> millions of "self != NULL" assertion failures, no way to import existing
> code, it is slow and if a "go to declaration" feature exists, I couldn't
> find it. So it's also not really usable.
>
> What do you guys use to hack the vala compiler?
> ___
> 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


Re: [Vala] pass signal to covered window

2016-02-05 Thread Ben Iofel
To emit signals in Vala, you just call them like methods

textView.button_press_event ();

On Fri, Feb 5, 2016 at 9:06 AM Gilzad Hamuni  wrote:

> Just for the integrity of this topic.
>
> One solution to pass/fire an event programmatically is to use
> GLib.Signal.emit_by_name(), e.g.:
>
> drawingArea.button_press_event.connect( (event) => {
> GLib.Signal.emit_by_name(textView, "button-press-event", event); } );
>
> However, if the signal of interest expects a callback with a boolean
> return value (button-press-event does), you'll get the warning "value
> location for 'gboolean' passed as NULL".
> If I try to provide the value 5 (that is G_TYPE_BOOLEAN) as the fourth
> parameter for emit_by_name(), then the application crashes right after
> emitting the signal.
> I don't quite know how to translate/use GLib's signal_emitv() to/in Vala
> either. But for now I got my problem solved without passing signals at all.
>
> Best,
>
> gilzad
>
>
>
> > Gesendet: Montag, 01. Februar 2016 um 18:22 Uhr
> > Von: "Gilzad Hamuni" 
> > An: Vala-list 
> > Betreff: [Vala] pass signal to covered window
> >
> > Hi list,
> >
> > if I have two windows layered on top of each other, the lower window
> can't fetch the mouse signals as these will go to the upper one. How can I
> pass the e.g. a button_pressed event on to the lower layer?
> >
> >
> >
> > TextView textView = new TextView();
> >
> > DrawingArea drawingArea = new DrawingArea();
> >
> > fixedWindow = new Gtk.Fixed();
> > fixedWindow.put(textView, 0, 0);
> > fixedWindow.put(drawingArea, 0, 0);//putting drawing area on top of text
> view
> >
> > drawingArea.button_press_event.connect( ... );// How can I fire a
> button_press event to the textView?
> >
> >
> > Thanks in advance,
> >
> > gilzad
> > ___
> > 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


Re: [Vala] GLib.Object.get_type() static?

2016-01-23 Thread Ben
Object.get_type () gets the type of an instance. It doesn't make sense 
to make it static.


On Sat, Jan 23, 2016 at 6:59 AM, Daniel Espinosa  
wrote:

Why in gobject-2.0.vapi GLib.Object.get_type () is an instant method?

This method should be declared as static, because some times a library
requires to register a type on initialization to aviod errors at 
runtime.

___
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


Re: [Vala] Vala API causing double definition

2015-10-09 Thread Ben Iofel
Just put the cheader at the top

On Fri, Oct 9, 2015, 9:48 AM Victor Aurélio Santos <
victoraur.san...@gmail.com> wrote:

> PS: keep in mind that this isn't a GLib-based library, it's plain C
> functions! i.e. Legacy Binds
>
> --
> Victor Aurélio Santos
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala API causing double definition

2015-10-09 Thread Ben
the cheader_filename attribute of [CCode] should go on the top 
namespace.


so [CCode (cheader_filename="io.h", cprefix="Ajami_")] namespace CAjami 
{ ... }


On Fri, Oct 9, 2015 at 9:55 AM, Victor Aurélio Santos 
<victoraur.san...@gmail.com> wrote:

Ben, can you provide more details ?

Thanks.

2015-10-09 10:49 GMT-03:00 Ben Iofel <iofel...@gmail.com>:

 Just put the cheader at the top


 On Fri, Oct 9, 2015, 9:48 AM Victor Aurélio Santos
 <victoraur.san...@gmail.com> wrote:


 PS: keep in mind that this isn't a GLib-based library, it's plain C
 functions! i.e. Legacy Binds

 --
 Victor Aurélio Santos




--
Victor Aurélio Santos

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


Re: [Vala] Reading last n lines from file

2015-10-07 Thread Ben Iofel
If it's a small file, you could read the whole thing into a string using
GLib.FileUtils.get_contents and then just grab the part you want

On Wed, Oct 7, 2015 at 11:02 AM Guillaume Poirier-Morency <
guillaumepoiriermore...@gmail.com> wrote:

> Le mercredi 07 octobre 2015 à 10:16 -0400, Serge Hooge a écrit :
> > Hello, folks.
> >
> > I am currently writing a small program with Vala/ncurses and I have
> > suddenly found the need to read last n lines of a constantly changing
> > file for display in an ncurses window.
> >
> > What would be the easiest way to go about it in Vala?
> > It doesn't look like GIO is an option without a giant data stream
> > kludge, but I kind of need it to create and delete some files along
> > the
> > way.
>
> You can use a DataInputStream http://valadoc.org/#!api=gio-2.0/GLib.Dat
> aInputStream and seek approximately to n * average bytes per line from
> the end and read the following data with read_line. It should read
> approximately n lines quite efficiently.
>
> You can trigger the operation with a FileMonitor http://valadoc.org/#!a
> pi=gio-2.0/GLib.FileMonitor
> 
>
> The other approach involve a subprocess that calls tail.
>
> >
> > Cheers,
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
> --
> Guillaume Poirier-Morency 
>
> Étudiant au baccalauréat en Informatique à l'Université de Montréal
> Développeur d'application web
>
> Mon blog: https://arteymix.github.io
> Mon projet de coopérative: https://pittoresque.github.io
> Clé PGP: B1AD6EA5
> ___
> 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] Vala OpenSSL bindings?

2010-10-05 Thread Ben Lafreniere
Hi all,

Has anyone out there created Vala bindings for libssl? Or,
alternately, does anyone know of an alternative library for doing
basic public-key crypto in Vala?

I'm working on a client-server application using Vala for the client
and PHP for the server. Right now, we're using openssl on the server
side, so the best case would be Vala libssl bindings.

Thanks!
Ben
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Vala command completion in MonoDevelop 2.4

2010-06-24 Thread Ben Lafreniere
Has anyone managed to successfully get Vala command completion working
in MonoDevelop 2.4?

Some background: I'm running Ubuntu, and using the Vala Team PPA to
keep up to date with vala (as of this post, I have valac 0.9.1
installed).

Also, I've installed the recently-released MonoDevelop 2.4 using
Badgerports (http://badgerports.org/)

The problem is, the monodevelop-vala package maintained by Badgerports
doesn't include libafrodite, which is required for command completion
to work.

So I've tried compiling and installing libafrodite using the code
from: http://code.google.com/p/vtg/ I've tried both the latest stable
release, and an svn checkout of the latest code. In both cases, once
libafrodite has been installed MonoDevelop becomes almost completely
unresponsive or crashes whenever I open a .vala file.

Has anyone else encountered these issues or found a fix?

Thanks!
Ben
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala command completion in MonoDevelop 2.4

2010-06-24 Thread Ben Lafreniere
I've tried running it in the terminal, but there's no indication of
why it's becoming unresponsive, and when it crashes there's no error
message beforehand to indicate why.

Which version of valac are you using, and which version of vtg did you
compile to get libafrodite?

Thanks!
Ben


On Fri, Jun 25, 2010 at 12:58 AM, Kamen Bundev bun...@gmail.com wrote:
 My libafrodite works. My advice is - run MonoDevelop through terminal and
 check the output to see if there is any problem running it.

 Regards:
 Bundyo

 On Fri, Jun 25, 2010 at 7:52 AM, celil celil...@gmail.com wrote:

 I am using valencia with gedit, and that works quite well.
 http://www.yorba.org/valencia/



 ___
 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


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


[Vala] hello world, symbol lookup error ...

2009-11-07 Thread ben nukel
hi
I'd like to play with vala a little bit, but I guess there is a fundamental
problem with my really boring example.

$ cat hello.vala  # taken from valas website

   using GLib;
   public class Test.HelloObject : GLib.Object {
   public static int main(string[] args) {
   stdout.printf(Hello, World\n);
return 0;
} }

$ valac --version
Vala 0.7.8

$ cat /etc/issue
Ubuntu 9.04

 $ valac hello.vala
valac: symbol lookup error: valac: undefined symbol:
vala_code_context_set_experimental_non_null


any ideas what's wrong here?

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


Re: [Vala] hello world, symbol lookup error ...

2009-11-07 Thread ben nukel
you right. I forgot that I've installed vala via apt-get first; before
installing from sources (0.7.8).

But the problem is, even after

  $ sudo apt-get remove valac
  $ sudo apt-get autoremove

and
  $ cd ~/install/vala-0.7.8  sudo make uninstall

and finally ...
  $ sudo find /usr -iname 'vala' -exec rm -rf {} \;
  $ sudo find /usr -iname 'valac' -exec rm -rf {} \;
  $ sudo find /usr -iname 'libvala.*' -exec rm -rf {} \;

it still doesn't work, after the reinstall from sources

$ valac
valac: error while loading shared libraries: libvala.so.0: cannot open
shared object file: No such file or directory

although the library is here:

$ ls -al /usr/local/lib/libvala.so.0
lrwxrwxrwx 1 root root 16 2009-11-07 08:03 /usr/local/lib/libvala.so.0 -
libvala.so.0.0.0
lekuin:~/install/vala-0.7.8
$ ls -al /usr/local/lib/libvala.so.0.0.0
-rwxr-xr-x 1 root root 7292173 2009-11-07 08:03
/usr/local/lib/libvala.so.0.0.0

2009/11/7 Frederik scumm_fr...@gmx.net

 ben nukel wrote:
   $ valac hello.vala
  valac: symbol lookup error: valac: undefined symbol:
  vala_code_context_set_experimental_non_null
 
 
  any ideas what's wrong here?

 Do you have two different Vala versions installed, e.g. one from
 a repository and one built from source? It seems to use the wrong
 libvala.


 Best regards,

 Frederik
 ___
 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


Re: [Vala] hello world, symbol lookup error ...

2009-11-07 Thread ben nukel
aargh ;-)
thanks


2009/11/7 Frederik scumm_fr...@gmx.net

 ben nukel wrote:
  $ valac
  valac: error while loading shared libraries: libvala.so.0: cannot open
  shared object file: No such file or directory
 
  although the library is here:
 
 $ ls -al /usr/local/lib/libvala.so.0
  lrwxrwxrwx 1 root root 16 2009-11-07 08:03 /usr/local/lib/libvala.so.0

 Maybe you must update your shared library cache with 'sudo ldconfig'.


 Best regards,

 Frederik
 ___
 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