Has anyone written a guide for someone familiar with Clojure to get up to
speed quickly with Racket?

If not, I'd be willing to collaborate on writing one, if you'd be willing to
spend a day or two showing me how to do things in Racket.

Here's why I'm asking. I wrote a bunch of code in Clojure for a project 
that's
heavy on graphs, expecting that the GUI would be easy because Clojure 
provides
access to the Java ecosystem without getting mired in Java. I ran into 
several
obstacles with Clojure, one of which was that the support for writing a GUI
is actually pretty sketchy. I just looked a bit at switching to Racket, and 
so
far it looks excellent: debugging (wow!), documentation (wow!), and what
appears to be a truly great GUI library. In particular, the pasteboard% 
class
looks like it might fulfill most of my needs very simply.

As excellent as the documentation is, there are a number of probably very
low-level, practical matters that I haven't been able to infer quickly. 
Here's
a sample of the sort of things that are puzzling me. Most could probably be
sorted out in a few minutes:

  In Clojure, the data structures of first resort are map and vector.
  What's the equivalent in Racket--the short list of bread-and-butter data
  structures that you reach for first when writing production code? How do
  you, say, accumulate a sequence of items, like conj'ing to a vector in
  Clojure? Do you usually do nested data structures in Racket, or do you
  normally keep them flat, as in Python?

  (Here's one that I figured out, but it took me a whole day.) What's the
  syntax for 'augment'? (The answer, I think: You're not supposed to
  explicitly write 'augment'. Instead, you invoke the 'mixin' macro and pass
  it 'define/augment'.)

  How do you print stuff in the REPL so you can see what's in it? For 
example,
  if I print a graph in DrRacket, all I see is this: #<unweighted-graph>

  How do you extract the graph held in a graph-pasteboard<%> object?

  How would you link the graphs in the Generic Graph Library to a
  graph-pasteboard<%>? And isn't there a pure-functional graph data 
structure?
  How do you attach data to the nodes and edges in a graph?

Just to clarify, I'm not looking for a point-by-point comparison of Clojure 
vs.
Racket, or a library like rackjure that provides Clojure-like syntax in
Racket, or anything "pedagogical", high-level, or theoretical. I just want 
to
find out some basics about how you actually get things done in Racket,
explained briefly for someone with prior experience with Clojure.
 
Ben


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

Reply via email to