I hope the name’s a coincidence …

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.

MetaC

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).

Thursday

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).

GTK from Lisp with CFFI

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:
  1. (require 'cffi)
  2. (use-package :cffi)
  3.  
  4. ;; GTK2 interface definitions
  5.  
  6. (load-foreign-library "libgtk-x11-2.0.so")
  7.  
  8. (defcfun ("gtk_init" gtk-init)
  9.     :void
  10.   (argc :pointer)
  11.   (argv :pointer))
  12.  
  13. (defcfun ("gtk_window_new" gtk-window-new)
  14.     :pointer
  15.   (wtype :int))
  16.  
  17. (defcfun ("gtk_widget_show" gtk-widget-show)
  18.     :void
  19.   (widget :pointer))
  20.  
  21. (defcfun ("gtk_widget_show_all" gtk-widget-show-all)
  22.     :void
  23.   (widget :pointer))
  24.  
  25. (defcfun ("gtk_main" gtk-main)
  26.     :void)
  27.  
  28. (defcfun ("gtk_main_quit" gtk-main-quit)
  29.     :void)
  30.  
  31. (defcfun ("gtk_container_set_border_width" gtk-container-set-border-width)
  32.     :void
  33.   (widget :pointer)
  34.   (width :int))
  35.  
  36. (defcfun ("gtk_button_new_with_label" gtk-button-new-with-label)
  37.     :pointer
  38.   (label :string))
  39.  
  40. (defcfun ("gtk_container_add" gtk-container-add)
  41.     :void
  42.   (container :pointer)
  43.   (button :pointer))
  44.  
  45. (defcfun ("g_signal_connect_data" g-signal-connect-data)
  46.     :void
  47.   (instance :pointer)
  48.   (sig :string)
  49.   (callback :pointer)
  50.   (data :pointer)
  51.   (gclosurenotify :pointer)
  52.   (gconnectflags :int))
  53.  
  54. ; This is a macro in gobject/gsignal.h
  55. (defun g-signal-connect (instance sig callback data)
  56.   (g-signal-connect-data instance sig callback data (null-pointer) 0))
  57.  
  58.  
  59. ;; GTK tests
  60.  
  61. (defcallback delete-event :int
  62.     ((widget :pointer)
  63.      (event :pointer)
  64.      (data :pointer))
  65.   (format t "Got delete event, quitting~%")
  66.   (gtk-main-quit)
  67.   0)
  68.  
  69. (defcallback click-event :void
  70.     ((widget :pointer)
  71.      (event :pointer)
  72.      (data :pointer))
  73.   (format t "Got click!~%"))
  74.  
  75. (defun gtk-button-test ()
  76.   (with-foreign-object (win :pointer)
  77.       (gtk-init (make-pointer 0) (make-pointer 0))
  78.  
  79.       (setf win (gtk-window-new 0)) ; FIXME: 0 -> GTK_WINDOW_TOPLEVEL
  80.       (g-signal-connect win "delete_event"
  81.                         (callback delete-event) (null-pointer))
  82.  
  83.       (gtk-container-set-border-width win 10)
  84.  
  85.       (with-foreign-object (button :pointer)
  86.         (setf button (gtk-button-new-with-label "Press Me"))
  87.         (g-signal-connect button "clicked"
  88.                           (callback click-event) (null-pointer))
  89.         (gtk-container-add win button))
  90.  
  91.       (gtk-widget-show-all win)
  92.       (gtk-main)))

Synfig

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.

  1. Archives

  2. Categories

  3. Twitter

    • Just got pictures of the earthquake damage from my sister in Kaiapoi. Real "the ground opened up" stuff. 35 minutes ago
    • Ooo, the beta of Angry Birds is out on Android. 18 hours ago
    • Released a new version of my Android Internode widget; fixes the problem with Internode's new SSL cert. 23 hours ago
    • @wangjammer5: Cool, here's something to get you started: http://is.gd/eT33b :) 1 day ago
    • So, if iTune Ping is Apple's social network will the perpetual Apple tweet circle-jerk move there now? 1 day ago
  4. RSS Google Reader Shared Items