Questions tagged [genie]

Genie is a programming language allowing one to program in Vala with a Python-like syntax.

Genie is a programming language allowing one to program in Vala with a Python-like syntax.

93 questions
10
votes
1 answer

Gtk.stock is deprecated, what's the alternative?

I've been learning to develop to Gtk and most of the examples online suggests the use of Gtk.stock icons. However, its use produces warnings that it has been deprecated and I can't find the alternative to these icons. Code examples are: …
lf_araujo
  • 1,991
  • 2
  • 16
  • 39
9
votes
1 answer

Are Vala and Genie production ready?

I am working with some legacy C code which I need to refactor and generally clean up, to remove spaghetti type programming, adhere to the DRY principle etc. I was thinking of rewriting using C++, but I don't want to go that far, and would like to…
Homunculus Reticulli
  • 65,167
  • 81
  • 216
  • 341
8
votes
4 answers

Gtk HeaderBar ActionBar pack_start pack_end within UI xml file

We are trialing Gtk3/Vala/Genie for the development of application user interfaces using Gnome-Builder/Meson/Glade/Flatpak. While there are many examples of Gtk.HeaderBar.pack_start( ... ) and Gtk.ActionBar.pack_start( ... ) within the Vala and…
AsymLabs
  • 933
  • 9
  • 15
7
votes
1 answer

Relationship Between Vala and Genie

From what I have read, core Gnome development began with C and this was extended by Vala (2006) and Genie (2008). Vala syntax appears to have been aimed at the Java/C# syntax/developer, whereas Genie appears to be aimed at Python (and a handful of…
AsymLabs
  • 933
  • 9
  • 15
7
votes
1 answer

Alternative syntax for C++, a la Genie for Vala?

The Vala language compiler can handle a very different looking syntax, Genie, which arguably could be considered a different language or an alternative syntax for one language. AFIK, anything you can do in Vala, you can write in Genie (ignoring…
DarenW
  • 16,549
  • 7
  • 63
  • 102
6
votes
2 answers

Gee HashMap containing methods as values

I'm trying to fill a Libgee HashMap where each entry has a string as key, and a function as value. Is this possible? I want this sort of thing: var keybindings = new Gee.HashMap (); keybindings.set ("h", this.show_help…
Riazm
  • 365
  • 2
  • 4
  • 10
6
votes
2 answers

How do Valas closures map to Genie?

The Vala Tutorial has an example about DBus using anonymous methods. Bus.own_name (BusType.SESSION, "org.example.DemoService", /* name to register */ BusNameOwnerFlags.NONE, /* flags */ on_bus_aquired, /* callback…
XZS
  • 2,374
  • 2
  • 19
  • 38
5
votes
2 answers

Gtk.Application in Genie

I can not find information or examples about "Gtk.Application" in Genie. What is the correct way of using the Gtk.Application class in Genie? Good day and thank you EDIT: I do not know if this is the best way to do it, but my code is this: //…
Webierta
  • 347
  • 1
  • 11
4
votes
2 answers

Flatpak Meson Not Finding Vala Libraries From Gnome Builder

From Linux, I'm using Meson (0.44.0) within Gnome Builder (3.26.4) for a console program that will use Gee and GXml. My intent is to write this in Genie. When I use Meson within Gnome Builder it fails but the same succeeds when invoked from the…
AsymLabs
  • 933
  • 9
  • 15
4
votes
1 answer

How does string interpolation / string templates work?

@lf_araujo asked in this question: var dic = new dict of string, string dic["z"] = "23" dic["abc"] = "42" dic["pi"] = "3.141" for k in sorted_string_collection (dic.keys) print (@"$k: $(dic[k])") What is the function of @ in print(@ ... ) and…
Jens Mühlenhoff
  • 14,565
  • 6
  • 56
  • 113
4
votes
2 answers

'genie' programming language usage outside Puppy Linux

I would like to try programming genie, but I can't find neither source code for it nor any version control repository. Does anybody know where can it be found?
Alex Bolotov
  • 8,781
  • 9
  • 53
  • 57
3
votes
1 answer

Is there any way to compile between Vala and Genie?

The relationship between Vala and Genie are much like that between js and CoffeeScript. js and cs can compile from each other with $ coffee -bc and $ js2coffee. How about Genie and Vala here?
jiyinyiyong
  • 4,586
  • 7
  • 45
  • 88
3
votes
1 answer

Genie syntax for extern declarations

Can anyone point me towards the syntax for extern declarations in Genie. Extern decls are supported in Vala, therefore they should also be available in Genie but I cannot seem to hit on the correct syntax. I'm trying to expose the C "exit" function…
Gearoid Murphy
  • 11,834
  • 17
  • 68
  • 86
3
votes
1 answer

Read entire file contents as a string

How do you read the entire file contents into a string variable in Genie? (I cannot find anything in docs. The docs also seem scattered and incomplete.)
exebook
  • 32,014
  • 33
  • 141
  • 226
3
votes
1 answer

Alternatives to vala lambdas in Genie

The lack of lambdas in Genie poses some problems to the workflow. There is a particular circumstance that I am unable to circumvent. My aim in this particular exercise is to create a Notebook in which there is a Button that upon click will take the…
lf_araujo
  • 1,991
  • 2
  • 16
  • 39
1
2 3 4 5 6 7