The time now is Wed 19 Jun 2013, 13:23
All times are UTC - 4 |
| Author |
Message |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sat 21 Mar 2009, 02:08 Post subject:
|
|
Maybe just this once . . .
Will be gardening today
Good news from gege2061
Looking forward to your efforts Mark
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sat 21 Mar 2009, 03:17 Post subject:
|
|
Uploaded the new SVN version of ValaIDE.
Deleted the outdated Pets.
This is really great.
I included the syntaxfile for Genie mentioned in the blog.
This release also fixes crashes I had encountered, e.g. when opening the options dialog.
I hope I forgot no file (it uses "waf", not "make", so new2dir cannot track the installationprocess, and I must copy the files by hand).
http://dotpups.de/puppy4/dotpups/Programming/Vala/
Oh, there is a bug, when I click on "new project":
| Code: | | ** (valide:5873): DEBUG: Couldn't open this document |
| Code: | Program received signal SIGSEGV, Segmentation fault.
0xb7d14bd4 in gtk_tree_model_get_iter () from /usr/lib/libgtk-x11-2.0.so.0
Program received signal SIGSEGV, Segmentation fault. |
I also get it, when I try to use the old binary, that worked before.
Details from "gdb" - "run" - "backtrace":
0xb7d14bd4 in gtk_tree_model_get_iter () from /usr/lib/libgtk-x11-2.0.so.0
| Code: | (gdb) backtrace
#0 0xb7d14bd4 in gtk_tree_model_get_iter () from /usr/lib/libgtk-x11-2.0.so.0
#1 0xb7d14c39 in gtk_tree_row_reference_new_proxy ()
from /usr/lib/libgtk-x11-2.0.so.0
#2 0xb7d14db4 in gtk_tree_row_reference_new ()
from /usr/lib/libgtk-x11-2.0.so.0
#3 0xb7c01e62 in gtk_combo_box_set_active_internal ()
from /usr/lib/libgtk-x11-2.0.so.0
#4 0xb7c02286 in gtk_combo_box_set_active () from /usr/lib/libgtk-x11-2.0.so.0
#5 0xb7806da9 in IA__g_object_set_property (object=0x82e0020,
property_name=0x82db890 "active", value=0x82ded14) at gobject.c:938
#6 0xb7d4dd00 in gtk_widget_buildable_set_buildable_property ()
from /usr/lib/libgtk-x11-2.0.so.0
#7 0xb7be17a5 in _gtk_builder_construct () from /usr/lib/libgtk-x11-2.0.so.0
#8 0xb7be208b in builder_construct () from /usr/lib/libgtk-x11-2.0.so.0
#9 0xb7be34be in start_element () from /usr/lib/libgtk-x11-2.0.so.0
#10 0xb7ecb075 in g_markup_parse_context_parse ()
from /usr/lib/libglib-2.0.so.0
#11 0xb7be1efb in _gtk_builder_parser_parse_buffer ()
from /usr/lib/libgtk-x11-2.0.so.0
#12 0xb7be067c in gtk_builder_add_from_string ()
from /usr/lib/libgtk-x11-2.0.so.0
#13 0xb7fadb73 in ?? () from /usr/lib/libvalide-0.0.so
#14 0x082819b8 in ?? ()
---Type <return> to continue, or q <return> to quit---
#15 0xb7fc9e44 in ?? () from /usr/lib/libvalide-0.0.so
#16 0x00003341 in ?? ()
#17 0xbf8e8ac0 in ?? ()
#18 0x00000000 in ?? () |
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6874 Location: Perth, Western Australia
|
Posted: Sat 21 Mar 2009, 04:16 Post subject:
|
|
Genie support is now in Gtksourceview:
http://puppylinux.com/blog/?viewDetailed=00609
My Genie strings page has been expanded slightly:
http://puppylinux.com/blog/?viewDetailed=00608
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sat 21 Mar 2009, 04:24 Post subject:
|
|
Thanks Mark
Just to remind to install the gtksourcefile pet as well as the Valide one
Mark has kindly prepared
http://dotpups.de/puppy4/dotpups/Programming/Vala/
Thanks Barry for the extra string handling info
- normally I stick to string theory which I find easier . . .
Mark seems very enthusiastic about genie and as an amateur programmer I like Genie a lot.
Barry is Genie living up to your expectations so far?
_________________ Puppy WIKI
Last edited by Lobster on Sat 21 Mar 2009, 04:35; edited 1 time in total
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sat 21 Mar 2009, 04:25 Post subject:
|
|
ok, worked around this bug, uploaded a new version.
Changes:
svn/valide-read-only/libvalide/ui/
abstract-project-dialog.ui
abstract-project-dialog.glade
abstract-project-dialog.vala
In all 3 files I removed 1 occurence of:
| Code: | | <property name="active">0</property> |
It is in the combobox to choose one of the languages Vala or Genie.
So none of the 2 is selected by default.
No more crash.
This might be a bug in our outdated libglade, I think I had similar issues in Gtkbasic. Libglade crashes, if a combo has a defaultvalue in the *.glade file.
There also was similar in the WineColorSetter I just had written.
There I then have set it active after the *.glade was loaded.
| Code: | | get_combobox(get_widget("combobox1")).set_active(0) |
Maybe it can be solved in the IDE, by setting it active somewhere in the vala code, but I found not yet out, where I could insert that.
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sat 21 Mar 2009, 04:46 Post subject:
|
|
Mark noticed the crashing - updated the newer version
Love the choice of language
and 'new project' now working
Not much more time for testing until later
A Genie IDE for Puppy - Hooray!
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sat 21 Mar 2009, 05:01 Post subject:
|
|
current summary
I attach 3 screenshots, they show, how easily you now can create a new Genie project
Download the required files here:
http://dotpups.de/puppy4/dotpups/Programming/Vala/
gtksourceview-2.0.2-i486.pet
vala-0.5.7.pet
valide-0.4-1-i686-svn-2009-03-27.pet
Puppy may already have vala-0.5.7 or gtksourceview, so you just need to install them, if the IDE does not start without them.
You can find example code in the former messages of this thread.
My first program can be downloaded here:
http://www.murga-linux.com/puppy/viewtopic.php?t=40193
It has a window created with the grafical designer "Glade", and may be a good start, to create own programs using libglade.
A good introduction is Barrys page:
http://puppylinux.com/genie/
He references this page of the Genie developer, that gives further insight:
http://live.gnome.org/Genie
Both pages are important to read, as they deal with different topics.
A further "must" is:
http://valadoc.org/?
It is the "reference" showing you all commands you can use by using the supported libraries.
Especially Glib is important.
For example the string functions in Genie are the GLib functions:
http://valadoc.org/?pkg=glib-2.0&element=string
A bit difficult to find when you are new, but very essential!
Mark
 |
| Description |
|
| Filesize |
65.08 KB |
| Viewed |
647 Time(s) |

|
| Description |
|
| Filesize |
34.28 KB |
| Viewed |
1640 Time(s) |

|
| Description |
|
| Filesize |
63.19 KB |
| Viewed |
624 Time(s) |

|
_________________ my recommended links
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sat 21 Mar 2009, 05:22 Post subject:
|
|
Thanks Mark
Val(a)IDE is written in Vala - that's good
Nicolas Joseph has done good
Many years ago I helped in the development of an IDE
for the Curl programming language (still largely proprietary)
http://www.curl.com/products/ide/
One of the neat features was an integrated
online central repository and local repository synchronizing of code
that does not seem there at the official site . . .
Even those on dial up could go on line and upload and download and lock/unlock code they were working on at their local machine
Obviously programmers would only have on their local machines code they were interested in.
Might be a useful - might not be a priority/possibility.
However at this early stage, would be a good time . . .
Another great feature was compiling sample code that was in Help
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6874 Location: Perth, Western Australia
|
Posted: Sat 21 Mar 2009, 08:40 Post subject:
|
|
| Lobster wrote: | | Barry is Genie living up to your expectations so far? |
Yes. The main problem has been lack of beginner's documentation. There is documentation out there, but very terse, really written for people who already know how to code in Vala/Genie.
For sometime I have just been blundering along, but yesterday when I wrote a program in Genie to replace a slow Bash script, I suddenly realised that I had crossed a threshold and was happily coding in Genie.
Genie really is inherently easy to code in. It is a matter of adequate introductory documentation. Some of my documentation needs more work, much more work ...and I do intend to keep working on it.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
big_bass

Joined: 13 Aug 2007 Posts: 1736
|
Posted: Sat 21 Mar 2009, 11:04 Post subject:
|
|
| Quote: | BarryK
Yes. The main problem has been lack of beginner's documentation. There is documentation out there, but very terse, really written for people who already know how to code in Vala/Genie.
For sometime I have just been blundering along, but yesterday when I wrote a program in Genie to replace a slow Bash script, I suddenly realised that I had crossed a threshold and was happily coding in Genie.
Genie really is inherently easy to code in |
Yes, most developers are quick to impress with complex
coding I guess for status so other programmers take them seriously
forgetting that the real power of any language really just takes advantage of some simple commands with real world practical examples
I suggest any "puppy programs" that use vala are very heavily commented so that even if one does not desire to take up the profession as a programmer they would still be able though to make minor modifications and help also to edit code (just on a much smaller scale)
speaking for myself I can figure out code if I know what the program does and something isn't working correctly in one small part
it takes me awhile to jump in and make any changes
this is where comments are more valuable than gold because
of the time needed to figure out what should happen
most man pages really stink
they give options NOT examples
thus hindering the advancement and usability
but that is still better than no documentation at all
I welcome any new small apps for puppy
please be kind and use many comments and some easy examples for the non gurus too (they would like to learn too)
thanks MU for the examples
thanks BarryK for taking a swing at it with vala
we all will learn from it
big_bass
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sun 22 Mar 2009, 06:53 Post subject:
|
|
Guys
Run Valide from Puppy 4.12 for now
I was using 4.2 rc4 and had renamed the devxx from dev4.12 to dev420
(you need the gcc compiler) and was running into problems.
Things seem better now - will report back how I get on.
Maybe even some working code samples (that is the plan)
A good place to start is with Geany (the editor) to edit
and Barrys excellent help pages.
Barry will be providing Valide in Woof alpha3 (available soon)
The sooner you get involved, the sooner I can learn something useful
- yep my motives are completely mercenary . . .
Big Bass and others please provide any sample code and new discoveries (do not be embarrassed)
We are at programming cutting edge.
How exciting!
Let's stay sharp.
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6874 Location: Perth, Western Australia
|
Posted: Sun 22 Mar 2009, 19:56 Post subject:
|
|
Any editor that uses Gtksourceview has has color syntax highlighting for both Vala and Genie.
That includes TEA, Medit and Gedit.
For Puppy4 uses, MU has posted packages to go with my Gedit package, that works in Newyearspup, probably should work in 4.1.2 and 4.2:
http://puppylinux.com/blog/?viewDetailed=00619
My TEA pet package was compiled in 4.1.2 so will definitely work in it. But see my blog posts about annoyances with TEA.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sun 22 Mar 2009, 21:27 Post subject:
|
|
Hi guys here is the imt sample code
(Shadow did all the work - I made tea)
once run and compiled
run from the command line
like so
imt "in"
where "in" is the text you want your monkeys to try and type
Please be aware that adding a piece of text like 'in the beg"
may mean the IMT program may have to run for days . . .
| Code: | // Infinite Monkey Theorem
// Lobster and Shadow, March 2009 LGPL
// use from command line
// imt ["search text"]
// generates random characters and searches for a given pattern eg 'in the beginning was the world'
// warning strings longer than "in the" may take minutes or hours to find
// program demonstrates:
// basic functions
// passing parameters in command line
// random character generation
// constant
def getRandomNumber(RangeFrom:int, RangeTo:int) : int /* function to create random number between range */
return GLib.Random.int_range(RangeFrom,RangeTo)
def getRandomChar() : char /* function to generate ascii codes from a-z and space (32) */
num:int = getRandomNumber(0,27)
if num == 0
num = 32
else num = num + 96
return (char) num
def addRandomChar(myText:string) : string /* function add text from command line */
var retText = new StringBuilder
retText.append(myText)
retText.append_c(getRandomChar())
return retText.str
init
USAGE:string = "Usage:\n\t ./imt \"some text for monkeys to generate\" "
theText:string = args[1]
if theText == null
theText = ""
theText = theText.down() /* change any text input to lower case */
myText:string = ""
if theText != ""
do
do
myText = addRandomChar(myText)
while theText.len() != myText.len()
print(myText)
if theText != myText
stdout.printf("\n")
myText = ""
while theText != myText
stdout.printf("\n")
else print(USAGE) /* this appears if program run without text */ |
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
big_bass

Joined: 13 Aug 2007 Posts: 1736
|
Posted: Sun 22 Mar 2009, 22:43 Post subject:
|
|
Hey Lobster
| Quote: |
The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare |
ah ha!! now there is a name for what I've been trying to do for the last couple days tying to build a new iso
mmm uh ... maybe I should go about this the old fashioned way
take a break from the computer and ..........
yes ! tomorrow I'll go out and buy a monkey!!
well, on second thought I'm sure the monkey will figure it out before I do but that still won't help me if he can't explain how he did it
so here I go again with another try
big_bass
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Mon 23 Mar 2009, 11:56 Post subject:
|
|
Anybody tried adding time?
Is this the right place to look?
http://valadoc.org/?pkg=glib-2.0&element=GLib.Time
. . . is something like this right?
| Code: | def startTimer() : int /* function to create timer */
return GLib.Time.local()
init
print startTimer() |
Is Genie multi-threaded?
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|