Vala and Genie programming

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#361 Post by MU »

Lobster wrote:I am trying to get genie to generate some sound.
Is this possible? Rather than play a wav I was wondering about generating a beep?

Not sure where to start?
I have no speaker attached, so cannot test it.
Try:

Code: Select all

stdout.printf("\7")
stdout.flush()
This should do the same as typing this in a console:
echo -en "\7"
According to google "beep linux shell", this is the code to generate a beep.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#362 Post by MU »

For wav, yes, gstreamer, but it is not in Puppy by default.
You might use one of Puppys tools.

Code: Select all

[indent=4]

def exec(thecmd : string)
    try
        Process.spawn_command_line_async(thecmd)
    except ex : GLib.Error
        print("%s", "exec failed!")

init

  
    exec("wavplay /usr/share/audio/2barks.wav")

//end
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#363 Post by Lobster »

You might use one of Puppys tools
works!
many thanks guys 8)

I am trying to put some building blocks together for a project, that I hope to begin this weekend.
(fear not - I will not be doing the coding
- have a real coder for that)

A simple Puppy game.
The next piece of code is to open a 'window'
and draw a circle in it.
Any clues? (remember I am clueless)

PS.
I am using the latest genie text editor compiled by Ttuuxxx to compile and build the code - very nice.

Is NicoEdit heading towards this option to
compile and build code?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#364 Post by MU »

for grafics, you might use the Cairo library.

It also is possible using Gtk/Gdk itself, for example the Gtkbasic Analogclock was written like that.

But for Genie/Vala, I actually just know one example, that is based on Cairo.
http://www.murga-linux.com/puppy/viewto ... 901#292901

See the example from Mymas and my reply.

Circle: Instead of
ctx.show_text ('Hello, World')
you could look at the
http://valadoc.org/?pkg=cairo
http://valadoc.org/?pkg=cairo&element=Cairo.Context
http://valadoc.org/?pkg=cairo&element=Cairo.Context.arc

So something like
ctx.arc(100,100, ... )

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

nikobordx
Posts: 84
Joined: Sat 23 May 2009, 09:08
Location: Bordeaux, France

#365 Post by nikobordx »

[See newer message]

Nicolas.
Last edited by nikobordx on Thu 02 Jul 2009, 17:38, edited 2 times in total.

caleb72
Posts: 57
Joined: Fri 15 May 2009, 12:44

#366 Post by caleb72 »

Is it challenging to compile Vala 0.7.4?

I notice that NicoEdit has that as a requirement but I'm yet to find a .deb distribution of it anywhere.

Regards
Caleb

User avatar
Schism
Posts: 78
Joined: Fri 12 Dec 2008, 15:50

Upup

#367 Post by Schism »

I have vala0.7.1 on upup476. I love upup. Where do i get a pet of the newer Vala?

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#368 Post by Pizzasgood »

nikobordx wrote:Hi,

Version 2 beta 3 !

News:
Search in text is now fully working
Added "signal for search and gotoline, when you type text to search or line to go, just press enter ! "
Added "F11 shortcut for fullscreen/unfullscreen"
Added "Auto-indent, Indent-on-Tab, Indent-Width"
Added "When you click on change font, the font dialog remember the last selection
"
Deleted the "big" search box !

Nicolas.
Cool.

Bugs:
  • Pressing Control-f does not work when in full-screen
    Using undo when there is nothing to undo clears the file (or is this a feature?)
    The line/column display in the statusbar doesn't update when the cursor is moved around, only when you type something
Suggestions:
  • Have the find box automatically jump back to the top when the bottom has been reached (maybe make this optional for the people who dislike it)
    Add a keyboard shortcut for 'find-next' to be used when the cursor is not in the find-box (like F3 in Firefox or Control-g in Geany)
    Close the find-bar if the user presses Esc while the cursor is inside it
    Have Control-f put the cursor into the find-bar's box
    Add a feature like "softtabs" in Vim, where if you use spaces for tabs and the cursor is at a tabstop, pressing backspace will delete the number of spaces that you use for tabs (assuming there are that many spaces behind it to delete - if there is text in the way, function normally instead). This would probably need to be optional.
Observation for those who don't know this:
  • When the cursor is inside the find-bar, it can be put back into the main area by pressing the up key

Those are just suggestions. Please don't feel obligated to implement them. I already have Vim and don't intend to use much else anytime soon. I just thought I'd mention some ideas. :)
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#369 Post by Lobster »

for grafics, you might use the Cairo library.
:shock:
Will I have to go all that way and 'Walk like an Egyptian'?
http://www.youtube.com/watch?v=BWP-AsG5DRk

:oops: Thanks Mark. I'll get it :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

nikobordx
Posts: 84
Joined: Sat 23 May 2009, 09:08
Location: Bordeaux, France

#370 Post by nikobordx »

[See newer message]

Nicolas.
Last edited by nikobordx on Mon 06 Jul 2009, 09:49, edited 2 times in total.

nikobordx
Posts: 84
Joined: Sat 23 May 2009, 09:08
Location: Bordeaux, France

#371 Post by nikobordx »

[See newer message]

Nicolas.
Last edited by nikobordx on Mon 06 Jul 2009, 09:48, edited 1 time in total.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#372 Post by big_bass »

Hey nikobordx

I would like to test your editor

I opened the readme which states

Requires:
Vala-0.7.4
Gtk
Glib
Gtksourceview
Pango
Cairo
Gee


I dont want to mix and match versions #'s
could you list what versions of the above Requires
you are using so I start on the right foot

and if there were links already posted
could someone link me to what's needed
sorry to be coming in late

looking forward to testing

thanks for sharing your work
I like small and powerful apps

Joe

nikobordx
Posts: 84
Joined: Sat 23 May 2009, 09:08
Location: Bordeaux, France

#373 Post by nikobordx »

big_bass wrote:Hey nikobordx

I would like to test your editor

I opened the readme which states

Requires:
Vala-0.7.4
Gtk
Glib
Gtksourceview
Pango
Cairo
Gee


I dont want to mix and match versions #'s
could you list what versions of the above Requires
you are using so I start on the right foot

Joe
Hi Joe,

I'm using:
Gtk 2.16.1
Glib 2.20.1
Gtksourceview2 2.6.2 (but i think a newer version is better for genie syntax hilighting)
Pango 1.24.0
Cairo 1.8.6

Nicolas.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#374 Post by MU »

Here is Vala 0.7.4, compiled in Puppy 4.12:
http://dotpups.de/puppy4/dotpups/Progra ... 4-i486.pet
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#375 Post by big_bass »

Nicolas (nikobordx)

Thanks for clearing the dependencies
posting the correct versions that
you are using
that will save me a lot of time

Joe

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#376 Post by big_bass »

Mark (MU)

thanks for the vala link I'll take it "to go" :D

Joe

nikobordx
Posts: 84
Joined: Sat 23 May 2009, 09:08
Location: Bordeaux, France

#377 Post by nikobordx »

[See newer message]

Nicolas.
Last edited by nikobordx on Tue 07 Jul 2009, 16:31, edited 2 times in total.

nikobordx
Posts: 84
Joined: Sat 23 May 2009, 09:08
Location: Bordeaux, France

#378 Post by nikobordx »

[See newer message]

Nicolas.
Last edited by nikobordx on Thu 09 Jul 2009, 10:32, edited 1 time in total.

nikobordx
Posts: 84
Joined: Sat 23 May 2009, 09:08
Location: Bordeaux, France

#379 Post by nikobordx »

[See newer message]

Nicolas.
Last edited by nikobordx on Sat 11 Jul 2009, 10:27, edited 1 time in total.

caleb72
Posts: 57
Joined: Fri 15 May 2009, 12:44

#380 Post by caleb72 »

I'm having trouble compiling Valide 0.5 and NicoEdit.

For both, it gets to this:

Checking for glib-2.0 >= 2.16.0 :
error: the configuration failed (see '/root/my-documents/valide-0.5.0/_build_/config.log')

It's complaining about my version of glib it seems - but I don't know exactly what I need to do to fix it.

I've tried installing libglib libraries etc.. but it must be more than that. Can anyone give me any guidance on how to troubleshoot this and fix it?

Regards
Caleb

Post Reply