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:

#391 Post by MU »

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

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

#392 Post by caleb72 »

That sorted things - to a degree.

I managed to compile NicoEdit with bk_compile - but the first time it complained about many things so I thought I probably needed the dev of glib as well. So I hunted that down and regressed all my runtime glib to 2.18 like the dev available at ibiblio.

I then got a successful build with only one warning:

Code: Select all

nicoedit.gs:877.32-877.35: warning: Argument 1: Cannot pass null to non-null parameter type
        buf = new SourceBuffer(null)
However, no syntax highlighting when running the application.

I still can't build either Valide or NicoEdit using waf. It's no longer complaining about my glib version (thank god). Now it's complaining about my gtk2 version.

Code: Select all

Checking for gtk+-2.0 >= 2.16.0             :
 error: the configuration failed (see '/root/my-documents/valide-0.5.0/_build_/config.log')
I don't see a version of gtk2 >= 2.16.0 in ibiblio. Is this something I'm going to have to find elsewhere?

Regards
Caleb

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

#393 Post by nikobordx »

Hi Caleb,

For the warning, it is not important.

You do not have syntax highlighting with all files you loaded with NicoEdit ?

Nicolas.

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

#394 Post by caleb72 »

nikobordx wrote:Hi Caleb,

For the warning, it is not important.

You do not have syntax highlighting with all files you loaded with NicoEdit ?

Nicolas.
So far I haven't had any syntax regardless of file loaded or just by specifying the highlighting I want in the view menu.

I also notice that sometimes NicoEdit recognises what syntax highlighting it should use - but still doesn't.

Eg. if I load C source, it recognises the file as C and selects that highlighting - but there actually is no highlighting.
However, .vala files are recognised as C and .gs files are recognised as Text.

So far I've tried syntax highlighting for .vala, .gs, .c, .h, .sh, .htm and .html files. No highlighting on any.

I've guessing this is a gtksourceview issue - just don't know what I'm supposed to do about it.

Regards
Caleb

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

#395 Post by caleb72 »

OK - not sure if this helps - but I ran from the command line so that I could see what was being output when I changed syntax highlighting (incidentally this happens with Medit as well so it's not specific to NicoEdit).

When I select genie as a language in either app I get this:

(medit:24664): Moo-WARNING **: Failed to load '/usr/share/moo/language-specs/genie.lang': style override used with wildcard context reference in language 'genie' in ref 'def:line-continue'

NicoEdit makes exactly the same complaint but for language files loaded in a different location. Also the complaint is the same whether you select any of the languages in the list or if you load a file of a particular language.

Perhaps this brings the answer closer to the surface?

Regards
Caleb

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

#396 Post by nikobordx »

Hi Caleb,

Does the .lang correctly installed ?
If not, try to reinstall gtksourceview !

Nicolas.

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

#397 Post by caleb72 »

OK - some more info:

When I run Medit from the command line I get the following critical failures on start-up.

Code: Select all

(medit:20487): Moo-WARNING **: moooutputfilterregex.c:647: PCRE library is compiled without UTF8 properties support

(medit:20487): GLib-CRITICAL **: PCRE library is compiled without UTF8 properties support

(medit:20487): GLib-CRITICAL **: g_regex_match_full: assertion `regex != NULL' failed
I see that PCRE is for regular expressions. I'm not sure if this can explain problems with syntax highlighting because I'm guessing at its core that a syntax highlighter would make extensive use of regular expressions.

However, when I run NicoEdit, I'm not getting these errors in start-up - although I am getting the following:

Code: Select all

** (nicoedit:22558): CRITICAL **: nico_edit_open_file: assertion `filename != NULL' failed

(nicoedit:22558): GtkSourceView-CRITICAL **: gtk_source_language_manager_get_language: assertion `id != NULL' failed
The .lang files seem to be there where it's trying to source both for nicoedit and for medit - but neither can seem to understand them properly or something.

I might try to do all of this on another 4.2 puppy I have set up and see if there's just something weird in my setup somewhere.

Regards
Caleb

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

#398 Post by nikobordx »

Hi Caleb,

For:

Code: Select all

** (nicoedit:22558): CRITICAL **: nico_edit_open_file: assertion `filename != NULL' failed
It is not important, i have also this error, it's because no file are loaded when you load NicoEdit, if you use NicoEdit via command line (eg: nicoedit yourfile.txt) the message disappear.

For:

Code: Select all

(nicoedit:22558): GtkSourceView-CRITICAL **: gtk_source_language_manager_get_language: assertion `id != NULL' failed
It is not normal !
You must reinstall gtksourceview or use a newer version.

Nicolas.

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

#399 Post by nikobordx »

[Message deleted]

See newer message !
Last edited by nikobordx on Sun 13 Sep 2009, 17:08, edited 1 time in total.

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

#400 Post by nikobordx »

[Message deleted]

See newer message !
Last edited by nikobordx on Fri 04 Sep 2009, 21:42, edited 1 time in total.

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

#401 Post by nikobordx »

[Message deleted]

See newer message !
Last edited by nikobordx on Sun 13 Sep 2009, 17:09, edited 2 times in total.

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

#402 Post by Lobster »

Nico am starting a new thread for your Geany (text editor) Vala-Genie (programming language) program here :
http://www.murga-linux.com/puppy/viewto ... 260#339260
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

#403 Post by nikobordx »

[Message deleted]

See newer message !
Last edited by nikobordx on Tue 15 Sep 2009, 09:12, edited 1 time in total.

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

#404 Post by MU »

removed, forum works again.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#405 Post by technosaurus »

I edited the bk_scripts a bit and got a 75 kb nicoedit binary and 35kb pet. Working great so far, but haven't tried it with genie yet. Uploaded for your pleasure. (without the french it is only 32k)

you can get the same results by not deleting the .c file in bk_compile and using:

gcc -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -mpreferred-stack-boundary=2 -fmerge-all-constants -march=i386 -mtune=i386 -Wl,-O,-Os,--gc-sections,-s `pkg-config --cflags gtk+-2.0 --libs gtk+-2.0` `pkg-config --cflags cairo --libs cairo` `pkg-config --cflags glib-2.0 --libs glib-2.0` `pkg-config --cflags pango --libs pango` `pkg-config --cflags gtksourceview-2.0 --libs gtksourceview-2.0` -I/usr/include/gee-1.0 -I/usr/include -I. -lgee -w -std=c99 nicoedit.c -o nicoedit
Attachments
nicoedit.pet
(34.73 KiB) Downloaded 800 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#406 Post by BarryK »

technosaurus,
Hey, my PET is 40KB! :)

I didn't use the scripts, did it the other way:

# ./waf configure
# ./waf build

...worked fine.
[url]https://bkhome.org/news/[/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#407 Post by ttuuxxx »

Wow just tried the latest nico edit and boy its came a long way.
One thing I would like to see in it is tabs, and when drag a new document to the gui it opens the file in a new tab, eg drag 5 files and have 5 tabs.
after that it could be a geany replacement and not just a leafpad replacement, very close, nice size also :) right now I'm using teagtk the pet is around 140kb and has highlight, line numbers, and drag and drop for tabs. Really thats all I use, I don't need fancy compiling in a editor etc. Geany just getting too bloated.
Oh I see you can export as pdf, hmmm maybe consider images? If you could add images and move them around, It would make a perfect pdf ebook creator. Just some ideas :)

Anyways keep up the excellent work:) very impressive.
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#408 Post by BarryK »

Ttuuxxx,
Regarding tabs, I was thinking that too, but then I started playing with the History menu, and that works surprisingly well.

The problem with tabs is I often have several documents open, so have to scroll the tabs, which makes the whole thing somewhat inefficient.

However with the History menu I can flip between documents. However, what spoils that is it doesn't remember the last position. If it did, that would make it very easy to work with a large number of documents.

So, Nicolas, if you read this, my number one request is for the History menu to remember the last position of the window and the cursor position of each previously-opened file!
[url]https://bkhome.org/news/[/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#409 Post by ttuuxxx »

Hi Barry I don't know if you ever tried Teagtk, but it does have a nice menu under file, Like recent documents, bookmarks, sessions, templates, etc and like I mentioned its really small compared to Geany about 1/4 the size. and once you setup the basic configures like I did in my last package its pretty good.

The sources 468kb
http://sourceforge.net/projects/tea-edi ... 2/download

The last package I made up, its good if you want to custom configs in root/choices
http://www.murga-linux.com/puppy/viewto ... h&id=21761

Playing around with the history is a good alternative way of getting around the tab issue, but for a person like myself I think the most tabs I ever need open at once is about 4, Firefox is different sometimes I have like 50 tabs open at once, lol
I would be happy to replace Geany with nicoedit if it had tabs.

ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

ITAmember
Posts: 167
Joined: Sun 13 Sep 2009, 18:50
Location: The middle of a cornfield

#410 Post by ITAmember »

I would like to use id3lib (http://id3lib.sourceforge.net/) in a vala program I'm planing to make. It's a c++ library that can be called from plain old C so it should work without much trouble. The problem is, I have no idea how to make the vapi file. Everything I found via google (which wasn't much) was for glib libraries and used glib only autogeneration. Any hints?

Post Reply