Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Racket or Clojure?

Name: Anonymous 2010-11-16 15:45

I'm going to invest a decent amount on time on further learning a Lisp dialect. I'm not learning it just to achieve Satori which I more or less already did, but I want an actual development platform to write my shit in, one that is library-rich, useful for a lot of things, multi-platform, and a state-of-the-art Lisp with support for functional programming, macros and decent programming. Furthermore, I wanted something clean, nice, modern, and a Lisp-1 above all else because of spiritual equilibrium and peace of mind. Considering these requirements, I'm left with Racket or Clojure (did I overlook anything else?). Now, /prog/, which should I invest time on?

Name: Anonymous 2010-11-17 0:55

Clojure has better multi-core possibilities, BUT, it's built to run in Java AND a specific module from the .Net series (check wikipedia).

Racket is all systems, has lots of cool features, and can compile to Java bytecode anyways, as well as it can incorporate c headers at least, if not C++ stuff.

I don't think Clojure has an interpreter, but Racket does, and includes it's own gui system.

Ironically, here's a site on your two things exactly:

http://programming-puzzler.blogspot.com/2010/08/racket-vs-clojure.html

P.s. Here's a sample using OpenGL, 1.3 I think:

#lang racket/gui

(require (lib "gl.ss" "sgl")
         (lib "gl-vectors.ss" "sgl")
)

(define (resize w h)
  (glViewport 0 0 w h)
  #t
)

(define (draw-opengl)
  (glClearColor 0.0 0.0 0.0 0.0)
  (glClear GL_COLOR_BUFFER_BIT)
  (glColor3d 1.0 1.0 1.0)

  (glMatrixMode GL_PROJECTION)
  (glLoadIdentity)
  (glOrtho 0.0 1.0 0.0 1.0 -1.0 1.0)
  (glMatrixMode GL_MODELVIEW)
  (glLoadIdentity)

  (glBegin GL_QUADS)
  (glVertex3d 0.25 0.25 0.0)
  (glVertex3d 0.75 0.25 0.0)
  (glVertex3d 0.75 0.75 0.0)
  (glVertex3d 0.25 0.75 0.0)
  (glEnd)
)

(define my-canvas%
  (class* canvas% ()
    (inherit with-gl-context swap-gl-buffers)

   (define/override (on-paint)
      (with-gl-context
        (lambda ()
          (draw-opengl)
          (swap-gl-buffers)
        )
      )
    )

    (define/override (on-size width height)
      (with-gl-context
        (lambda ()
          (resize width height)
        )
      )
    )

    (super-instantiate () (style '(gl)))
  )
)

(define win (new frame% (label "OpenGl Test2") (min-width 200) (min-height
200)))
(define gl  (new my-canvas% (parent win)))

(send win show #t)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List