Getting interactive "help" on functions in Scheme

In Python's interactive shell you can get a list of built-in functions (if you know where to look) using the dir command. >>> dir(__builtins__) ['ArithmeticError', 'AssertionError',...

Generating require-clauses with Racket macros

Okay, I must be really daft. I'm trying to create a macro (part of a larger undertaking) that given a function, wraps it in its own submodule, then requires it, so that functions defined thusly...

Avoiding mutable state when I need to store (current-seconds) multiple times

I've put together the following rudimentary stopwatch in Racket (just learning now, the final aim is a pomodoro-timer). #lang racket (define start-time 0) (define end-times '()) (define...

The little schemer - semantic

I have just started reading The Little schemer. I have some problem understanding some words. In page 27 it says, The Law of Eq? The primitive eq? takes two arguments. Each must be a non-numeric...

How to write the equals predicate in Racket (or Scheme) using just lambda expressions

I can see how to write cons, cdr, car and other expressions in Racket using only lambda expressions (from SICP): (define (cons x y) (lambda (m) (m x y))) (define (car z) (z (lambda (p q)...

Yacc derivations failing to be recognized

This is a class project of sorts, and I've worked out 99% of all kinks, but now I'm stuck. The grammar is for MiniJava. I have the following lex file which works as intended: %{ #include...

How to manually install a package in racket?

How can I manually install a package in racket (that is without relying on raco)? Is that possible? I installed the minimal racket distribution and want to manually add the packages in question...

Racket macro to define functions given a repeated pattern

The problem is quite difficult to explain because I need to collect my thoughts, so bear with me. I've been able to reduce the problem to a minimal example for illustrative purposes. The example...

Why are the names of predicates in scheme in the form of questions?

Racket is the first dialect of scheme I am learning, and I’m not that far in, however due to scheme’s minimal syntax, I believe it’s safe to assume that a question mark in variable names is...

FFmpeg filtergraph memory leak

I have an FFmpeg program that: Demuxes and decodes a video file. Passes it through a filtergraph encodes and muxes the new video. The filtergraph itself is rather complex, and can be run...

Upgrading Minimal Racket and DrRacket

I'm on Mac OS X Sierra and I've been using homebrew to get hold of minimal racket and then adding the things I want on top via raco. One of those things being drracket. However after upgrading...

QML performance problems when moving widgets affect each other's movements

Here is a minimal version of a code revealing the problem which is: Moving the racket when playing the game on the Desktop kit (Windows) doesn't affect the speed of ball's movement but when run on...

SICP Ch5 eceval compiler in Racket: set-cdr! into quoted list (not a dup)

This is not a duplicate of https://stackoverflow.com/questions/9475366/set-car-set-cdr-unbound-in-racket or of https://stackoverflow.com/questions/32613416/implement-sicp-evaluator-using-racket or...

"Docstrings" in Racket?

I know Racket doesn't have "docstrings" in the same way that many other languages do, but given how convenient documenting things at the source is, I'd like to approximate something like it in...

Racket: How do you use the value of an argument as a symbol?

I'm new to Racket, and am struggling to find the right words to explain what I'm trying to do. The best I can come up with is this: How do I use the value of an argument as a symbol, without...

Installing Racket Packages without installing Dr Racket

I am running a minimal install of Racket and wish to install the sql package. If I try the command: raco pkg install sql I am prompted to install racket-doc, which has a dependency on drracket....