Advice for beginner

130 views
Skip to first unread message

Denis Maier

unread,
Sep 7, 2020, 5:04:37 AM9/7/20
to Racket Users

Hi,

I've started working with the Htdp textbook as I'd like to acquire a solid foundation in (functional) programming. The approach to teaching programming looks very promising. Having this ressource available online for free is absolutely amazing. Thank you.

One slight annoyance I came across: I've found running code snippets with the beginning languages rather slow, much slower than with `#lang racket`. Why is that? Anything I could do to make that more performant? (Actually, running simple racket snippets is much faster in the REPL than with DrRacket. Is there a way to use the BSLs on the command line?)

Or: Could I just use work through the textbook with `#lang racket`? How different is racket from the student languages? Are they subsets, i.e. will everything that works in those languages also work with racket proper?


All the best,
Denis Maier

Ben Greenman

unread,
Sep 8, 2020, 1:33:38 PM9/8/20
to Denis Maier, Racket Users
The student languages are not subsets of Racket.
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/ec53a53a-bc4e-4fb1-a92a-87682cb8f731n%40googlegroups.com.
>

John Clements

unread,
Sep 8, 2020, 4:08:53 PM9/8/20
to Denis Maier, Racket Users
Can you be more specific? Are there particular programs that you can point to? I think the solution to your problem is going to depend a bit on the kind of slowdowns that you’re seeing.

Best,

John Clements

Denis Maier

unread,
Nov 2, 2020, 3:52:54 AM11/2/20
to Racket Users
Thanks John for your answer, and sorry for not answering for so long... I've been occupied by other things, and I've had to postpone my "learn Racket" ambitions a bit...
Anyway, time for a fresh start...

Am 08.09.2020 um 22:08 schrieb John Clements:
Can you be more specific? Are there particular programs that you can point to? I think the solution to your problem is going to depend a bit on the kind of slowdowns that you’re seeing.

I was just referring to how long it takes in DrRacket to evaluate an apparently simple program. Something like

```
(+ 1 1)
```

It takes about 3-4 seconds to run that.

Simply adding a the #lang declaration makes the whole thing much faster...

```
#lang racket
(+ 1 1)
```

Actually, it looks really similar to the problems described here (https://stackoverflow.com/questions/37508535/excruciatingly-slow-over-ten-seconds-for-1-1-with-language-how-to-des) and here (https://github.com/racket/drracket/issues/281).

Best,
Denis
Reply all
Reply to author
Forward
0 new messages