News for hackers. Stuff that matters.
Re:Racket Language by shawn_w on Sunday April 21, 2024 @05:33PM (#40109432)
> I use my editor to write the code and I run it from my shell

That's a perfectly valid workflow for Racket too. Startup time is pretty comparable to Python in my experience. Slow but not cripplingly so, especially if you compile it ahead of time (useful when you're done working on a file for the moment). Using the racket/base #lang instead of racket makes a big difference too. https://docs.racket-lang.org/style/Language_and_Performance.... has more on that.

>But that means the code you are working on doesn't start with a "clean slate" and instead starts with whatever state the vm is in at the moment.

That sounds more like a Common Lisp style repl than Racket's, where you typically do have to restart Racket when reloading files/modules and thus have a fresh environment. People complain about it but I prefer the clean slate style of Racket over CL.

Re:Racket Language by bjourne on Monday April 22, 2024 @12:13PM (#40115738)
Hmm... perhaps. Last I tried Racket using it as I'm using Python didn't work well. It wasn't just the startup time of Racket, it was also all the libraries I used. Like loading most libraries is almost instant in Python but they weren't in Racket. Sure I could perhaps solve those issues (caching?), but it would be working against the grain of the language's ethos and that just doesn't work out well in my experience. For example, there are excellent REPLs for, say, Rust, but using them is not the same as using a REPL for a language (runtime) intended for interactive use.
Re:Racket Language by evdubs on Monday April 22, 2024 @04:46PM (#40120073)
I run a Racket program [1] that uses `racket/gui`, `plot`, `db`, etc. and I don't have long startup times when running the main program in a terminal. Maybe you have an example?

[1] https://github.com/evdubs/renegade-way

Re:Racket Language by bjourne on Tuesday April 23, 2024 @06:43PM (#40138206)
Arch Linux with Racket v8.11.1. Starting a REPL takes almost a second and a simple hello world 300 ms. (No use telling me I should do x, y, z. A language that doesn't get it right by default is not for me.)
Re:Racket Language by soegaard on Wednesday April 24, 2024 @04:03PM (#40148900)
A second indicates something is wrong. Most likely the `raco setup` part of the installation was skipped. Try `raco setup` and see if it helps.

[I think, there were a snap at some point that had problems.]

Re:Racket Language by sschwarzer on Saturday April 27, 2024 @12:57PM (#40181500)
> Startup time is pretty comparable to Python in my experience.

In my experience a "Hello world" program with `#lang racket/base` (precompiled) takes around 150 ms on my computer whereas Python takes about 50 ms.

> Using the racket/base #lang instead of racket makes a big difference too.

My experience has been: As soon as I use `#lang racket/base` with `(require racket/match)` for pattern matching, the startup times are as when using `#lang racket`.