On 06/23/2015 08:32 PM, John Carmack wrote:
Here is the overview of the work that I recently sent out internally.
I started out with a pure-functional scripting interface, but it very rapidly became
imperative, and it is in heavy flux. The sample scripts do capture the general
"flavor" that I want this to have -- I think it will be easy enough to get
interesting things happening that it will still tempt people who might be a little
hostile to working in a Lisp.
Cool. Maybe keeping things more familiarly imperative will help reduce
grumbling at first.
What are the motivating factors besides sending commands to the hardware?
An imperative API makes functional abstraction harder. What are the main
selling points for Scheme/Racket now?
[...]
“Remote development”, where the script is actually executed in an IDE on a PC,
communicating with NetHMD over a TCP connection. This allows sub-second
code-change to VR change iteration cycles, and the use of a debugger. There
might also be a use for a related mode where a central server directly drives
one or more clients.
Remote development mode sounds very cool. (I didn't even have to squint
hard to see that.) Is the latency low enough?
[...]
The sample scripts are at:
http://s3.amazonaws.com/o.oculuscdn.com/netasset/home.rkt
http://s3.amazonaws.com/o.oculuscdn.com/netasset/office.rkt
http://s3.amazonaws.com/o.oculuscdn.com/netasset/shader.rkt
http://s3.amazonaws.com/o.oculuscdn.com/netasset/spin.rkt
http://s3.amazonaws.com/o.oculuscdn.com/netasset/text-panels.rkt
http://s3.amazonaws.com/o.oculuscdn.com/netasset/reversi.rkt
[...]
https://s3.amazonaws.com/o.oculuscdn.com/netasset/vr.rkt
https://s3.amazonaws.com/o.oculuscdn.com/netasset/remote.rkt
Starting to look over these now. Some random comments follow.
Initial impression: 7 years after starting to program in Racket, it
still surprises me how easy it is to do something useful in just a few
lines of code.
Seems like the first thing anyone does when using the OpenGL API is
write something like `cmd-quad!`.
The `opengl` package defines all the OpenGL constants. I know you can't
use it directly, but cut-and-paste should give you everything you'd ever
need. Also, looking at the way it generates definitions from the OpenGL
spec could be useful.
In case the problems importing SRFI 1 were just finding the proper
incantation, it should be this:
(import (srfi :1))
If you're at all interested in a matrix/vector library whose operations
have < 4 ulps error (provided floating-point arithmetic is correctly
rounded) and transforming normals even when the affine matrix is
noninvertible, check out
https://github.com/ntoronto/pict3d/tree/master/pict3d/private/math
particularly the files "fl3.rkt", "fl4.rkt" and "flt3-unboxed-ops.rkt".
(Warnings: it's rather undocumented, there's a prevalent
`call/data-type-values` pattern that I haven't taken the time to get rid
of yet, and it relies on some (easily copied) math/flonum macros.)
This is really nifty. Thanks for sharing.
Neil ⊥
--
You received this message because you are subscribed to the Google Groups "Racket
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.