Posted: Fri 06 Nov 2009, 10:49
Double post
READ-ONLY Archive
https://oldforum.puppylinux.com/
Yep, it was me. I'm scratching already.BarryK wrote:"anything with Basic in the name"
here try thisgyro wrote:Hi,
Is there a .pet of vala 0.7.8 anywhere?
I wish to install it on pup-431.
There seems to be omissions in Xlib.vapi in vala 0.7.4.
gyro
Thanksttuuxxx wrote:here try this
ttuuxxx
Hmm. It's a whole lot easier, but I wouldn't say there's no comparison. It has its similarities, but at least you don't have to deal with header files, having to put functions in certain places, funky less-readable syntax and all that other stuff. Plus you get some nice string functions, such as up(), down(), strip() and split() out of the box. Making a GUI in Vala is easy, too, and although there's not a whole lot of extensively commented-on documentation, you can always look at Gtk documentation for other languages and often figure out the Vala method with ease.disciple wrote:Hi guys, I haven't really looked at Vala yet, but I'm wondering - does anyone have any idea how hard it would be to convert a simple-ish gtk program from c to vala? And how much easier do you think it would be to learn vala than C? Is Vala:
0. No easier than C
1. A little easier than C
2. Quite a bit easier than C
3. A lot easier than C
4. So much easier than C that there's no comparison.
Any thoughts?
Code: Select all
valac -X -Os --pkg libxml-2.0 --pkg gtk+-2.0 jwmshortcut.vala
strip --strip-unneeded jwmshortcut
./jwmshortcut
It is always how the code is written.Lobster wrote: Is Vala more secure than C?
Or is it how the code is written?
And your vast knowledge of how insecure JavaScript is comes from where, exactly?As you know some languages such as javascript are very useful but insecure (so let's base the whole Cloud thing on them )
I think Lobster may have security issues with web-based client-side and server-side scripting mixed up with general programming security. That's only an issue for browser-oriented client-side scripting, really (I don't know of anything besides JavaScript that would have this issue).DMcCunney wrote:(And while you're at it, define just what you mean by "security".)
I do too, which is why I asked.tsura wrote:I think Lobster may have security issues with web-based client-side and server-side scripting mixed up with general programming security.DMcCunney wrote:(And while you're at it, define just what you mean by "security".)
Microsoft Active-X controls, which are fortunately confined to Internet Explorer under Windows. (Microsoft was pushing VBSript as well back when, but it thankfully remained a client side product, and never gained traction as an alternative to JavaScript on web sites.That's only an issue for browser-oriented client-side scripting, really (I don't know of anything besides JavaScript that would have this issue).
The usual security problems with compiled languages exploit things like buffer overflow, and are more examples of "how the code is written".The client can see the JavaScript code, since it's mostly a client-side thing. If that's what you're thinking, no you won't have that problem with Vala or C. In fact, you probably don't need to worry about it at all, unless you want people to type in a password for something (on the Internet) and you don't have access to the server. You could try using encryption keys in that case.
Vala Releases
Vala 0.7.10
source tarball
released on February 4, 2010
Changes
Support coalescing operator ??.
Support to_string and bitwise complement with enums.
Return handler id when connecting signal handlers.
Support struct comparison.
Support constructor chaining in structs.
Enforce protected member restrictions.
Improve performance of flow analysis.
Support automatic line continuations in Genie.
Improvements to the .gir reader and writer.
Add --enable-mem-profiler commandline option.
Many bug fixes and binding updates.
Someone responded with "Define security". But based on your question it seems to me that you meant "Safety". Quite similar words, used as synonyms in regular English but in coding terms a bit different.Lobster wrote:Hi rarsa Is Vala more secure than C?
Or is it how the code is written?
That makes sense - being forced to write better code.C mainly because Vala does the work of writing safer C.
Expanding a bit on what Rarsa said, it might help to talk a little about C.rarsa wrote:So responding to the question: I think Vala is safer than C mainly because Vala does the work of writing safer C.
Code: Select all
/*
* compilation:
* valac --pkg gtk+-2.0 --pkg gmodule-2.0 sample.vala
*/
using Gtk;
public static void on_button1_clicked (Button source) {
source.label = "Thank you!";
}
public static void on_button2_clicked (Button source) {
source.label = "Thanks!";
}
static int main (string[] args) {
Gtk.init (ref args);
try {
var builder = new Builder ();
builder.add_from_file ("sample.ui");
builder.connect_signals (null);
var window = builder.get_object ("window") as Window;
window.show_all ();
window.destroy.connect (Gtk.main_quit);
Gtk.main ();
} catch (Error e) {
stderr.printf ("Could not load UI: %s\n", e.message);
return 1;
}
return 0;
}
Let me make sure I understand this.technosaurus wrote:Obvious first questions:
1. need to set it up to have a variable filename (from script/command line)???
2. if variables get changed via the UI can they be accessible from the script that calls it - if so how?
There are plenty of gtkbuilder ui examples - abiword 2.8.X has quite a few
Any ideas? Or is gtkdialog fast enough if we throw enough hardware at it?