December 16th, 2005
| Filed under Jabber
|
The Jabber Foundation have released Jingle, a set of extensions for audio and voice session negotiation. This is semi-related to what I’ve been doing, although it targets 1-to-1 sessions. Future versions of Shutup may target it. I certainly duplicates my work on the XMLised SDP.
December 16th, 2005
| Filed under Misc
|
MetaC
The MetaC language extends C in a 100% backward compatible way with reflective features and techniques for refactoring, reconfiguring and modifying arbitrary C source code.
I’m not sure if this is a good thing or not. May be useful for projects like Samba which now generate about 50% of their code (with a perl script in their case). I wouldn’t want to see it in the hands of a mediocre programmer though.
There’s also `C (AKA TickC).
December 15th, 2005
| Filed under Lisp
|
More admin stuff today.
One thing interesting diversion was that a researcher at CMU asked to use some SBCL Lisp code I posted a while ago. I found this particularly cool as SBCL originated at CMU via CMUCL (”Steel” and “Bank” in “Steel Bank Common Lisp” refer to the source of Carnegie and Mellon’s individual fortunes).
December 11th, 2005
| Filed under Lisp
|
I did a bit of Lisp experimentation this weekend with CFFI and GTK+2. CFFI is an abstraction over the Foreign Function Interfaces (basically C calls and callbacks) of various lisp implementations, and a replacement for UFFI. Anyway, interfacing to the basic GTK calls is pretty easy:
Lisp:
-
(require 'cffi)
-
(use-package :cffi)
-
-
;; GTK2 interface definitions
-
-
(load-foreign-library "libgtk-x11-2.0.so")
-
-
(defcfun ("gtk_init" gtk-init)
-
:void
-
(argc :pointer)
-
(argv :pointer))
-
-
(defcfun ("gtk_window_new" gtk-window-new)
-
:pointer
-
(wtype :int))
-
-
(defcfun ("gtk_widget_show" gtk-widget-show)
-
:void
-
(widget :pointer))
-
-
(defcfun ("gtk_widget_show_all" gtk-widget-show-all)
-
:void
-
(widget :pointer))
-
-
(defcfun ("gtk_main" gtk-main)
-
:void)
-
-
(defcfun ("gtk_main_quit" gtk-main-quit)
-
:void)
-
-
(defcfun ("gtk_container_set_border_width" gtk-container-set-border-width)
-
:void
-
(widget :pointer)
-
(width :int))
-
-
(defcfun ("gtk_button_new_with_label" gtk-button-new-with-label)
-
:pointer
-
(label :string))
-
-
(defcfun ("gtk_container_add" gtk-container-add)
-
:void
-
(container :pointer)
-
(button :pointer))
-
-
(defcfun ("g_signal_connect_data" g-signal-connect-data)
-
:void
-
(instance :pointer)
-
(sig :string)
-
(callback :pointer)
-
(data :pointer)
-
(gclosurenotify :pointer)
-
(gconnectflags :int))
-
-
; This is a macro in gobject/gsignal.h
-
(defun g-signal-connect (instance sig callback data)
-
(g-signal-connect-data instance sig callback data (null-pointer) 0))
-
-
-
;; GTK tests
-
-
(defcallback delete-event :int
-
((widget :pointer)
-
(event :pointer)
-
(data :pointer))
-
(format t "Got delete event, quitting~%")
-
(gtk-main-quit)
-
0)
-
-
(defcallback click-event :void
-
((widget :pointer)
-
(event :pointer)
-
(data :pointer))
-
(format t "Got click!~%"))
-
-
(defun gtk-button-test ()
-
(with-foreign-object (win :pointer)
-
(gtk-init (make-pointer 0) (make-pointer 0))
-
-
(setf win (gtk-window-new 0)) ; FIXME: 0 -> GTK_WINDOW_TOPLEVEL
-
(g-signal-connect win "delete_event"
-
(callback delete-event) (null-pointer))
-
-
(gtk-container-set-border-width win 10)
-
-
(with-foreign-object (button :pointer)
-
(setf button (gtk-button-new-with-label "Press Me"))
-
(g-signal-connect button "clicked"
-
(callback click-event) (null-pointer))
-
(gtk-container-add win button))
-
-
(gtk-widget-show-all win)
-
(gtk-main)))
December 11th, 2005
| Filed under Misc
|
Another commercial art package gets released as open-source. This time it's 2D animation software:
http://www.synfig.com/overview/
Random thought: Is there any commercially available animation package available to consumer/hobbyists? There's a really big fan-art subculture around manga (partly due to it being encouraged by the artists and publishers), but I don't know if there's something similar for anime. This package could enable that.