Questions tagged [racket]

Racket is an extensible multi-paradigm programming language in the Lisp/Scheme family.

Racket is a general purpose, multi-paradigm programming language in the Lisp/Scheme family. One of its design goals is to serve as a platform for language creation, design, and implementation. The language is used in a variety of contexts such as scripting, general-purpose programming, computer science education, and research.

Racket Programming Books

Racket documentation is well written and directly accessible from within the DrRacket IDE. It has two great tutorials: one on web applications and one about systems programming.

A great tutorial on macros.

History: Racket was initially called PLT Scheme.

Questions about BSL, HTDP, and other student languages should go into the racket-student-languages tag instead.

5811 questions
11
votes
4 answers

Clojure or Scheme bayesian classification libraries?

Any pointers to scheme/racket or clojure bayesian classification libraries? I need one for a toy/learning project that I'm going to do.
Sean T Allen
  • 446
  • 4
  • 12
11
votes
1 answer

Emacs key bindings in DrRacket?

How are we supposed to configure DrRacket so that it does not use Emacs key bindings? Like I type C-s and it just saves the code instead of bringing up the search line. Or I use C-x C-f and it won't open another file. The DrRacket documentation…
randomusername
  • 7,927
  • 23
  • 50
11
votes
1 answer

How do I parse JSON in Racket?

I can't seem to figure out the {documentation}, there aren't really any examples of parsing some simple JSON data, so I was wondering if anyone here could give me some examples to get started.
Electric Coffee
  • 11,733
  • 9
  • 70
  • 131
11
votes
3 answers

Reduce function in Racket?

I'm stuck 5 days with this task in Racket, does anybody know how can I approach it? Given a function of arity 2 and a list of n elements, return the evaluation of the string function of all the elements, for example: >(reduce + '(1 2 3 4 5 6 7 8 9…
user3294726
  • 201
  • 1
  • 3
  • 4
11
votes
1 answer

Overlapping module imports in Racket

I want to load an image and animate it in Racket. I can do it easily in the Dr. Racket, but I am using Emacs with Geiser. To load the image I need to: (require racket/draw) Next, to draw this image onto the screen, I'm planning to use the big-bang…
Roald
  • 231
  • 1
  • 12
11
votes
4 answers

How to download and parse a csv file in Racket?

How do I download and parse a csv file in Racket?
soegaard
  • 30,661
  • 4
  • 57
  • 106
11
votes
5 answers

Partitioning a list in Racket

In an application I'm working on in Racket I need to take a list of numbers and partition the list into sub-lists of consecutive numbers: (In the actual application, I'll actually be partitioning pairs consisting of a number and some data, but the…
Harry Spier
  • 1,395
  • 16
  • 30
11
votes
2 answers

Are Scheme and Racket different? If so, how?

I have noticed that people often act as though Scheme and Racket are the same thing here on Stack Overflow (and also elsewhere on the web. For example, questions about Scheme often generate solutions in Racket. If you take a look at the questions…
Aslan986
  • 9,984
  • 11
  • 44
  • 75
10
votes
3 answers

Scheme / Racket Best Practice - Recursion vs Variable Accumulation

I'm new to Scheme (via Racket) and (to a lesser extent) functional programming, and could use some advise on the pros and cons of accumulation via variables vs recursion. For the purposes of this example, I'm trying to calculate a moving average. …
Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91
10
votes
2 answers

Racket Source and / or Cookbook Examples

How much of Racket is written in Racket? For example, is the argmax function implemented in Racket or in C? What about take and drop? I couldn't find it in the source on github. The reason I ask is that as a Scheme / Racket newbie it would be…
Scott Klarenbach
  • 37,171
  • 15
  • 62
  • 91
10
votes
2 answers

What happens in a Scheme 'cond' clause when the 'else' is omitted?

I'm in the process of learning Scheme. I recently spent (too much!) time trying to find a bug in a program before I realized I was missing the 'else' word in a cond clause. But the behavior in such circumstances appears to be a little weird.…
Leonard
  • 13,269
  • 9
  • 45
  • 72
10
votes
3 answers

String split function

I am just wondering if there is the string split function? Something like: > (string-split "19 2.14 + 4.5 2 4.3 / - *") '("19" "2.14" "+" "4.5" "2" "4.3" "/" "-" "*") I haven't found it and created my own. I use Scheme from time to time so I'll…
ceth
  • 44,198
  • 62
  • 180
  • 289
10
votes
1 answer

Timing in Scheme

I'm currently going through the Project Euler's problems and I'm solving them both in C# and Scheme (the Racket implementation). I know C# but I'm learning Scheme as I go along. Now, on top of having the correct results for the problems, I like to…
joce
  • 9,624
  • 19
  • 56
  • 74
10
votes
1 answer

How to check type in Racket?

I define a function (define 1-9 (list->set (range 1 10))) I want to see if 1-9 is really a set. How can I get the type of 1-9? I tried to google racket check type, but I can't find any useful information.
user8314628
  • 1,952
  • 2
  • 22
  • 46
10
votes
3 answers

Correct syntax for a lambda expression which gets any number of arguments in Scheme

In Scheme you can define the following procedure: (define (proc . vars) (display (length vars))) This will allow you to send any amount of args to proc. But when I try to do it this way: (define proc (lambda (. vars) (display…
Hila
  • 1,080
  • 1
  • 9
  • 22