Re: [sawfish] Re: Sawfish in python??? scheme?



10 hours ago, Teika Kazura wrote:
> Thanks, Eli and Mario for kind and really helpful reply.
> 
> Let me first give a summary of the situation.
> [...]
>   Me (Teika): Don't know Scheme at all, neither python, (most of)
>   gtk.

A quick related note: Racket comes with extensive documentation, and
specifically, we have an entry page for newbies:

  http://docs.racket-lang.org/getting-started/


> On Tue, 1 Mar 2011 01:49:05 -0500, Eli Barzilay wrote:
> > But one note [in Racket] is that the GTK level is aimed at gui
> > applications
> 
> Sawfish needs low-level X (xlib), but gtk is only used for popup
> menus and the configurator. If Racket provides its own modern, good
> set of API for the gui like Java, then it may be better somehow;
> coders don't have to mind the precise platform, gtk or
> whichever. And that kind of APIs tend to be easier than the bare
> ones.

In this case it seems like a good approach would be to have the
necessary X bindings somehow, and use the gtk code when gui is needed.
By "somehow", I mean that there are several ways to write glue, one
way is to do it all in racket -- wrapping the X interface, another way
(which might be easier since the X api can be pretty complicated) is
to have some minimal C code that interacts with X and this C code
itself exposes an easy to glue api for the racket side.

BTW, if anyone has experience with writing Python glue using ctypes,
the racket ffi is very similar -- since both are based on libffi.
(It's also a reason for it to be good for a WM situation -- dynamic
ffis make it easy to play with things dynamically.)

And one more note: since there's at least one core developer who is
very interested in using sawfish (and has stuck with it ever since
scwm died), then I'll be happy to help with anything (and we do have
other linux users who would probably love to use a racket based WM,
including the usual flow of hungry-for-project students).

> > I wrote most of [Racket's FFI]
> > [...]
> > any lisp (including librep) would be better than python, IMO.
> 
> (Scheme situation rant) One thing I liked about Python is there's
> only (almost) one python, which also means libraries are (quite)
> common, etc. [1] On the other hand, there're too many Scheme
> implementations, and I think it weakens Scheme.  It was hard for me
> to see which are good. (It's always so, but it's best to ask. Web
> pages are too biased or the opposite. It's rare in Wikipedia to say
> "this is old.")

As a long-time schemer, I completely agree with this.  The
specification of the "Scheme" language is so minimal that it's useless
to view it *as a language*.  It's better seen as a specification for
closely related languages -- but they are *separate* languages.  Under
this view (which has become somewhat popular since the early 2000s),
your rant is justified when applied to Scheme, but inapplicable when
you apply it to a specific implementation like Racket or Chicken.


> It's good that things are converging to racket and chicken.

For completeness, I'll point out additional alternatives:

* There's Gambit, which is also very actively maintained, and pretty
  fast.  (However, IIRC, it's similar to chicken in having a fast ->C
  compiler and a slower interactive mode.)

* A new dialect that is aimed at easily embedding it in other
  applications is Chibi, which started as a better thing where
  tiny-scheme or SIOD are traditionally used (both of these are pretty
  bad).

* There's also a project to write a WM in SCSH or Scheme48 that Olin
  Shivers has a few students working on.  I don't know where they
  stand ATM, but I can ask.

And while I'm at it:

* One important aspect of making such a migration easy is the ability
  to create a compatibility language -- so you can implement rep
  semantics for legacy code.  For this, I think that it's crucial to
  have a good (hygienic) syntax system that plays well with a module
  system -- for example, to be able to implement a rep-like `let' that
  deals with its scope peculiarities.  I'm sure that many people who
  are not deep enough into Scheme twitch when they hear "hygiene", but
  I can promise you that it's not something to be scared of -- roughly
  speaking, "hygiene" translates to the ability to do such games
  *safely*, without worrying about breaking parts of the actual
  language that you're implementing things in.  (As for the work that
  is needed to use hygienic macros: it's easy enough that I can
  definitely volunteer to do the necessary conversios.)


> Racket (= plt-Scheme 5) hasn't arrived to Gentoo linux official tree
> yet, but it's not a problem. You can easily install it if you like.

(To try it out quickly, you can use our .sh installers -- in the
normal non-unix-style installation mode you get a single directory
that you can try out, and then remove the whole thing when you're done
with it.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]