Showing posts with label Scheme. Show all posts
Showing posts with label Scheme. Show all posts

Friday, October 11, 2013

Beginning Scheme programing for Suiseiseki fans


(begin (define DESU
 (lambda ()
  (display "DESU ") (DESU)))
  (DESU))

by @rdsathene: run in any Scheme interpreter. Beats hello world by a long shot.

Tuesday, May 21, 2013

Jason Felice: gambit-objc v0.1.0 for Gambit Scheme released

On Sat, May 18, 2013 at 12:12 PM, Jason Felice <jason.m.felice <at> gmail.com> wrote: Hi!

I've just released gambit-objc 0.1.0.  This is the "it has the basics, and the implementation is complete enough for real projects" release.

* It gives you access to Objective-C class objects.  The easiest way is:

  (import-classes (NSString NSDictionary))

  after which, you can refer to them.

* It dynamically dispatches Objective-C methods:

  (: NSString stringWithUTF8String: "hello, world")

* It supports marshaling of native Scheme objects to C/Objective-C types for parameter and return values, including structures, selectors, all integral types, and UTF8 strings.  It wraps Objective-C objects with foreign.

* It has a objc-repl, an extended version of gsi which supports square-brace syntax, like so:

  [NSString stringWithUTF8String: "Hello, world!"]

You'll find a minimal sample Cocoa app in the distribution as well.

There are many cool things that can be added.  I'd love to collaborate, help people use it, and otherwise enable its adoption.

I'm really happy with how elegant it ended up (after a couple partial implementations were scrapped).  My next focus will be making it easy to boot on iOS and bring into iOS projects.

-Jason

Saturday, January 2, 2010

Paul Graham's "The Roots of Lisp"

Paul Graham's The Roots of Lisp, a cogent essay dealing with John McCarthy's astonishing 1960's paper which introduced the LISP language, and more importantly, the functional model of programing.

Graham stresses his essay is more important today than ever, given how more languages have moved (albeit in a piecemeal fashion) towards the LISP model. Working with seven primitive operators, the paper shows how the entire language is built. Most importantly, the paper shows the LISP trademark, how to write the language in itself.

An interesting aspect for Scheme programmers like myself is the discussion of dynamic versus lexical scoping.

Reading the paper reminds us of why functional languages, especially LISP based ones, aren't just the best for expressing algorithms, but are the most elegant models of programming since the are easily transcribed in mathematical notation.

I can't recommend The Roots of Lisp enough. The paper is available for free download on Paul Graham's site.

Monday, July 20, 2009

Why use Gambit Scheme for application development?

A discussion from jlongster on Gambit embedded in Objective-C. Some potentially cool stuff here. This discussion was a follow on to mikelevins Heresy article in which Scheme <-> Objective-C interface is also discussed. mikelevins' mention of prefix-dylan is a bonus as well.

Monday, October 6, 2008

Getting Gambit to respect prefix settings at configure

After posting a concern about Gambit inserting an additional "version" directory into the installation path, the following was suggested on the Gambit mailing list and works perfectly. When executing make install set the PACKAGE_SUBDIR="" to remove the version number from the installation path.

For me the configure, make, install routine works as follows:

$ ./configure --enable-single-host --enable-gcc-opts --prefix=/Users/Shared
$ make install prefix=/usr/local PACKAGE_SUBDIR=""

This places the Gambit files in the directories I expect them to be in.

Thursday, October 2, 2008

Kawa Implementation of Asymmetric Encryption Keys Via KeyPairGenerator

Recreation of Sun's Java example program to create RSA and DSA keys from the command line in Kawa Scheme. The code utilizes the following Kawa functionality: 6.4 Compiling Scheme to a standalone application, 10.4 Calling Java methods from Scheme.

Building Kawa on OpenBSD

Getting The Kawa language framework to build on OpenBSD is fairly straight forward. You just have to call gmake instead of make.