Re: [Vala] custom widget and File observer
D.H. Bahr db...@uci.cu writes: The application would consist solely on a Stream Browser providing access to (and only to) user own files, that is: all files within the user dirs (e.g: Documents, Pictures, Videos, Music, Public, Download and Home directories, recursively off course). Since I don't intent to create a full working environment (yet), but only a stream browser I have come to an issue: how to ensure files not processed within the application (that is files copied/created using other file browsers or the command line shell) are included effectively on the stream data structure. My current bet is placed on the idea I can create an Observer daemon which is somehow notified that any file on the specific 'observed' directories has been accessed. Is this even possible?? I think that gio has what are you looking for. Read here: http://www.valadoc.org/#!api=gio-2.0/GLib.FileMonitor Yes, I took a look at that, but It doesn't seem to notify when simple file access occurs; that is: no modification but just open a PDF document and read, that action won't be notified. Would it?? You can just pull data from zeitgeist daemon: http://zeitgeist-project.com/ Its written in vala and i belive it will fit your needs. Also, gnome-activity-journal provides something similar for different types of activities. https://live.gnome.org/GnomeActivityJournal -- http://shelr.tv - screencasting for terminal ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Unified Server Gateway Interface (RFC)
On 01/18/2012 11:51 PM, Denis Kuzmenok wrote: Can you show some helpful example of use? The code is not yet written so no examples yet. The goal of this standartization is stackable apps/middleware: Request Response | | (App1) (App1) | | ... ... | | (AppN) (AppN) \/ First column is Request processing and second is Resposne processing. In this scheme App #1 may perform Etag generation, App #2 may handle HTTP authentication App #3 may perform request logging and so on. App = Middleware in this case. Each app may stop the chain and return response if needed. This way each VSGI conforming App may be dropped in your VSGI app and reused consistently. This allows us to mount modules on different urls as (pseudocode): app.mount('/login', AuthenticationApp) app.mount('/forum', ForumApp) app.use(CookieSessionStore) app.use(HttpCaching) Also. It should be possible to mout VSGI middleware/apps into existing python/ruby/javascript apps with thin integration for JSGI, Rack and WSGI. As initial proposal (different from README) think the VSGI app should look like this: interface VSGI.App { public virtual void process_request(Request req) public virtual void process_response(Response res) } var apps = new ArrayListVSGI.App(); var req = new VSGI.Request() foreach (app in apps) { app.process_request (req); } var res = new VSGI.Response() foreach (app in apps.reverse()) { app.process_response(res) } In each case Request and Response are adapter specific but work consistently for CGI, FastCGI, uWSGI, SCGI and Soup. signature.asc Description: OpenPGP digital signature ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] GNet bug?
Hello all. I cannot find good URI parsing library for GLib so i stuck with GURI from legacy GNet. Nut sure what I'm doing wrong but even this small example sefaults: // uri.vala // // valac --pkg gnet-2.0 uri.vala ./uri void main (string[] args) { var uri = new GNet.URI(http://antono.info:80/;); debug(HOST: %s, uri.hostname); debug(PORT: %d, uri.port); } // valac --pkg gnet-2.0 uri.vala ./uri // ** (process:16111): DEBUG: uri.vala:7: HOST: antono.info // ** (process:16111): DEBUG: uri.vala:8: PORT: 80 // Segmentation fault (core dumped) Any advise? // uri.vala // // valac --pkg gnet-2.0 uri.vala ./uri void main (string[] args) { var uri = new GNet.URI(http://antono.info:80/;); debug(HOST: %s, uri.hostname); debug(PORT: %d, uri.port); } // valac --pkg gnet-2.0 uri.vala ./uri // ** (process:16111): DEBUG: uri.vala:7: HOST: antono.info // ** (process:16111): DEBUG: uri.vala:8: PORT: 80 // Segmentation fault (core dumped) ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala logo
On Sun, 2012-01-01 at 02:03 +0100, Tobias Bernard wrote: In case someone hasn't seen the proposals, here's the most recent versionhttp://ubuntuone.com/p/1DBL/ I like version 05 :) ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] LuaJIT vapi
Hello, all. I've updated lua.vapi to use luajit headers[1]. Maybe this vapi should also be available as luajit.vapi from vala distribution (or somehow autogenerated from lua.vapi). LuaJIT intented as (faster) drop-in replacement for Lua. [1]: https://github.com/antono/valum/blob/master/vapi/luajit.vapi -- http://antono.info/ http://github.com/antono ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Valum and ctpl update
On 12/11/2011 07:02 PM, Denis Kuzmenok wrote: Think of looking for modify date of templates and save them to exclude repeated template parsing. That would speed up template work for a little bit :) As for me template file should be accessed only during template engine initialization. All other checks not needed at all. In case of CTPL template should be loaded into memory and lexed only one time and only at startup. ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] GValue get type
Replying to myself :) On 12/11/2011 10:32 PM, Antono Vasiljev wrote: foreach (var e in hash.entries) { // THIS IS PSEUDOCODE if (e.value.type == typeof(int)) { counter += e.value; } } if (e.value.holds(typeof(string))) http://www.valadoc.org/gobject-2.0/GLib.Value.html ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Web framework in Vala
On 12/08/2011 06:17 PM, Denis Kuzmenok wrote: Did you try compiling it with vala-0.15 ? No, i have no vala-0.15 yet. Maybe there's a need in latest packages? I've used ones from yum. Oh. If you use rpm based distro coul'd you please make installation instructions for Valum for vala-0.14? I'm getting many errors: [ava@elgato valum]$ make run rm -f ./bin/app.valum valac --enable-experimental --thread --vapidir=./vapi/ --cc=gcc --gir Valum-1.0.gir -D BENCHMARK --pkg gio-2.0 --pkg json-glib-1.0 --pkg gee-1.0 --pkg libsoup-2.4 --pkg libmemcached --pkg luajit valum/request.vala valum/nosql/memcached.vala valum/app.vala valum/route.vala valum/script/lua.vala valum/tools/cli.vala valum/tools/dbus.vala valum/response.vala app/app.vala -o ./bin/app.valum /home/ava/develop/vala/valum/valum/request.vala.c: In function ‘valum_request_construct’: /home/ava/develop/vala/valum/valum/request.vala.c:92: warning: assignment makes pointer from integer without a cast ... /home/ava/develop/vala/valum/app/app.vala.c:382: error: ‘_tmp2_’ undeclared (first use in this function) /home/ava/develop/vala/valum/app/app.vala.c:396: warning: assignment makes pointer from integer without a cast /home/ava/develop/vala/valum/app/app.vala.c:400: error: lvalue required as left operand of assignment error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) make: *** [bin/app.valum] Error 1 Hmm. I only can ask you to remove --enable-experimental from Makefile. Totally not sure what's going on here :) ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Web framework in Vala
On 12/09/2011 05:53 PM, Denis Kuzmenok wrote: I've installed all g-based libs from source, also added to makefile -X -llua-5.1 -X -lmemcached to include libraries, If you use --pkg luajit you should add -X -lluajit or something like this. Or just pass --pkg lua to vala compiler. Not sure why you should instruct gcc about lua and memcached. I belive vala knows how instruct compiler via vapi. also removed --enable-experimental, and now it compiles without errors, just much warnings. But the's no post listening, and i can't get it working, for now.. [ava@elgato valum]$ make run rm -f ./bin/app.valum valac --thread --vapidir=./vapi/ -X -llua-5.1 -X -lmemcached --cc=gcc --gir Valum-1.0.gir --pkg gio-2.0 --pkg json-glib-1.0 --pkg gee-1.0 --pkg libsoup-2.4 --pkg libmemcached --pkg luajit valum/request.vala valum/nosql/memcached.vala valum/app.vala valum/route.vala valum/script/lua.vala valum/tools/cli.vala valum/tools/dbus.vala valum/response.vala app/app.vala -o ./bin/app.valum app/app.vala:1.1-34.8: warning: main blocks are experimental /home/ava/develop/vala/valum/valum/request.vala.c: In function ‘valum_request_construct’: /home/ava/develop/vala/valum/valum/request.vala.c:92: warning: assignment makes pointer from integer without a cast /home/ava/develop/vala/valum/valum/nosql/memcached.vala.c: In function ‘valum_no_sql_mcached_get’: /home/ava/develop/vala/valum/valum/nosql/memcached.vala.c:187: warning: passing argument 4 of ‘memcached_get’ from incompatible pointer type /usr/include/libmemcached-1.0/get.h:47: note: expected ‘size_t *’ but argument is of type ‘guint32 *’ /home/ava/develop/vala/valum/valum/response.vala.c: In function ‘valum_response_get_mime’: /home/ava/develop/vala/valum/valum/response.vala.c:229: warning: assignment makes pointer from integer without a cast /home/ava/develop/vala/valum/app/app.vala.c: In function ‘main’: /home/ava/develop/vala/valum/app/app.vala.c:153: warning: ‘g_thread_init’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:259) Compilation succeeded - 1 warning(s) ./bin/app.valum I'd recommend to use valac-0.14 for now :) -- antono ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Valum - web framework in Vala
On 12/09/2011 10:50 PM, Denis Kuzmenok wrote: Recompiled many time glib2/dbus/libsoup, and at last it's working. Cool! Can you add Your steps to README.md or Wiki on github? Btw, if you test it on concurrent benchmark then you'll see that it's using only one CPU core, i don't remember if it's vala limitation or soup's... Yep, i saw. We can make master/worker process separation later. Anyway Soup is not intented to work in production. HTTP should be parsed one time and by nginx cherokee or lighty... and passed to Valum app via fcgi or uwsgi. fcgi adapter for vala is ready, we only should reimplement current Request and Response classes as interfaces and make Soup and FCGI adapters. It's in TODO list already: https://github.com/antono/valum/blob/master/TODO.md -- antono ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Web framework in Vala
Yo, Matias! On 12/08/2011 01:21 PM, Matias De la Puente wrote: Great job Antono! Thanks :) It was easy. Now it's time to make something production ready and fun. Last year i was trying to build the vapi files of ctpl. I attach the vapi files I build. Oh. If i only know :) I spent so much time trying to make gir and it's still not usable. Anyway time was spent for learning how things work. I don't remember how I build it but i'm sure that i follow this steps[0] It's a little updated but i think that it's useful. From archive i see that You made them with vala-gen-introspect In wiki i saw this note: The traditionnal approach is to use vala-gen-introspect to generate GI files. Bindings are moving away from that method. So i decided to go 'right way' and make .gir and .typelib. I've contacted author of ctpl and i hope to see GObject Introspection support in upstream. And now it's time to play with first templating engine for Valum :) Thank You for your vapi! -- antono ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Web framework in Vala
On 12/08/2011 08:47 AM, Evan Nemerson wrote: AFAIK GPL restrictions is irrelevant in server side context. GPL not forces You to share unless you distribute your program. AGPL do if I understand correctly. However GPL3 restrictions may become true for embedded devices... It would be a problem for pretty much any reusable software, not just embedded devices. Shopping carts, CMS, CRM, blogs, photo galleries, project management, wikis, issue trackers, forums, etc. Well, the way is simple: do not use GPL if you want to make some proprietary software from opensource. And also i do not going to hardly nail some templating engine to Valum. We can use any engine. But till now ctpl looks like best option in terms of interoperability with GObject and Vala. ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Looking for vapi for gimp
On Thu, 2011-03-17 at 12:02 +0800, Nor Jaidi Tuah wrote: Anybody working on vala binding for gimp? I only know about gegl-vala: http://gegl.org/gegl-vala/ ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] Vala syntax support in highlight.js
Hello, All. I implemented Vala syntax highlighting for hightlight.js[1] and it was merged to master. Tools[2] page in Vala wiki is also updated. Best regards! [1]: https://github.com/isagalaev/highlight.js [2]: http://live.gnome.org/Vala/Tools -- xmpp:s...@antono.info gopher://antono.info/ http://antono.info/ ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Genie
Hello, Nicolas. On Wed, 2011-02-23 at 11:55 +0100, Nicolas wrote: What happens if you simple declare the class like this: class GenieItem : Match And let all properties untouched. No success: genie-test-plugin.gs:37.5-37.28: error: Synapse.GeniePlugin.GenieItem: some prerequisites (`GLib.Object') are not met class GenieItem : Match -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Genie
On Mon, 2011-02-21 at 11:42 -0500, Jamie McCracken wrote: Also need to translate following: private class Connect : Object, Match { // from Match interface public string title { get; construct set; } public string description { get; set; } public string icon_name { get; construct set; } public bool has_thumbnail { get; construct set; } public string thumbnail_path{ get; construct set; } public intdefault_relevancy { get; set; default = 0; } public MatchType match_type { get; construct set; } I made something like this: class Connect : Object implements Match prop title : string prop description : string prop icon_name : string prop has_thumbnail : bool prop thumbnail_path : bool prop match_type : MatchType Valac complains here: genie-test-plugin.gs:44.7-44.25: error: Type and/or accessors of overriding property `Synapse.GeniePlugin.GenieItem.title' do not match overridden property `Synapse.Match.title'. prop title : string ^^^ genie-test-plugin.gs:46.7-46.29: error: Type and/or accessors of overriding property `Synapse.GeniePlugin.GenieItem.icon_name' do not match overridden property `Synapse.Match.icon_name'. prop icon_name : string ^^^ your properties need to match the interface correctly use readonly when there is only a get and no set and likewise use construct for constructor properties try prop construct title prop readonly description etc... jamie No success: genie-test-plugin.gs:41.12-41.20: error: syntax error, expected identifier prop construct title : string ^ Compilation failed: 1 error(s), 1 warning(s) -- xmpp:s...@antono.info gopher://antono.info/ http://antono.info/ ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Genie async methods
On Mon, 2011-02-21 at 11:48 +0100, Nicolas wrote: I don't test this code but i suppose is: def search (query : Query) : async ResultSet? raises SearchError Nope, neither when swapped async and ResultSet. Compilation failed: 1 error(s), 1 warning(s) def search (query : Query) : async ResultSet? raises SearchError ^ -- xmpp:s...@antono.info gopher://antono.info/ http://antono.info/ ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala to Genie
On Mon, 2011-02-21 at 12:42 +0100, Nicolas wrote: def async search (query : Query) : ResultSet? raises SearchError Don't forget to build with --pkg gio-2.0 Nicolas. Nope, neither when swapped async and ResultSet. Compilation failed: 1 error(s), 1 warning(s) def search (query : Query) : async ResultSet? raises SearchError Yeah! It works. Probably need to move this to Genie wiki. But I fall into another issues so need some more help :) def register_plugin() DataSink.PluginRegistry.get_default().register_plugin( typeof (GeniePlugin), Genie Example, // Plugin title _ (Synapse plugin example wiritten in Genie language), terminal, // icon name register_plugin, // reference to this function ... ); valac complains: genie-test-plugin.gs:25.206-25.220: error: Cannot create delegate without target for instance method or closure register_plugin, // reference to this function Also need to translate following: private class Connect : Object, Match { // from Match interface public string title { get; construct set; } public string description { get; set; } public string icon_name { get; construct set; } public bool has_thumbnail { get; construct set; } public string thumbnail_path{ get; construct set; } public intdefault_relevancy { get; set; default = 0; } public MatchType match_type { get; construct set; } I made something like this: class Connect : Object implements Match prop title : string prop description : string prop icon_name : string prop has_thumbnail : bool prop thumbnail_path : bool prop match_type : MatchType Valac complains here: genie-test-plugin.gs:44.7-44.25: error: Type and/or accessors of overriding property `Synapse.GeniePlugin.GenieItem.title' do not match overridden property `Synapse.Match.title'. prop title : string ^^^ genie-test-plugin.gs:46.7-46.29: error: Type and/or accessors of overriding property `Synapse.GeniePlugin.GenieItem.icon_name' do not match overridden property `Synapse.Match.icon_name'. prop icon_name : string ^^^ etc. I'am begginer in Vala and Genie so dont ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list
[Vala] Genie async methods
Hello, All. I trying to implement plugin for synapse launcher[1] in Genie. How can i translate following vala code to genie: public async ResultSet? search (Query query) throws SearchError { ... } [1]: https://launchpad.net/synapse-project -- xmpp:s...@antono.info gopher://antono.info/ http://antono.info/ ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list