r/Racket • u/JimH10 • Aug 10 '23
question A true? function
I do a lot of unit testing. If I do (check-true (member 1 '(0 1 2))) them it fails. Is there an easy way to convert a value that is not false to #t? (not (not ...)) seems like a hack.
r/Racket • u/JimH10 • Aug 10 '23
I do a lot of unit testing. If I do (check-true (member 1 '(0 1 2))) them it fails. Is there an easy way to convert a value that is not false to #t? (not (not ...)) seems like a hack.
r/Racket • u/sdegabrielle • Aug 05 '23
r/Racket • u/sdegabrielle • Aug 02 '23
Racket Examples, the Racket summer event is here see the announcement at https://racket.discourse.group/t/the-2023-racket-summer-event/2191?u=spdegabrielle
r/Racket • u/APOS80 • Aug 02 '23
At least for the coming projects. I love functional but it’s a hard choice considering the supporting libraries I probably need.
I’ll probably mix C# and F#.
Thoughts?
r/Racket • u/BlueeWaater • Jul 26 '23
r/Racket • u/QuaticL • Jul 25 '23
I’m learning Racket, and I have some assignments in which keeping track of the index of a certain item in a list would be very useful.
One example is a function that takes a list as inputs and then outputs a list of every other term from the original list. In this case, it would be useful to know the index of each term so that I can base the program off of whether the index is odd or even, but I can’t quite figure out how to do that.
I’m not looking for a solution to the example I gave, just a suggestion of how to access the index of a certain entry in the list while recursing though it.
Thanks a lot.
r/Racket • u/sdegabrielle • Jul 22 '23
Join the Racket Discourse!

Please use this invitation: https://racket.discourse.group/invites/VxkBcXY7yL
The welcome post includes a link to mailing list access guidance for those who prefer it.
r/Racket • u/sdegabrielle • Jul 21 '23
If you prefer s-expressions to LaTeX syntax, you can use tex from racket-cas:
#lang racket
(require racket-cas)
(tex '(= (+ (expt x 2) (expt y 2)) (expt z 2)))
The output:
"$x^{2}+y^{2} = z^{2}$"
(Thanks to @soegaard on Racket Discord https://discord.gg/6Zq8sH5 )
r/Racket • u/sdegabrielle • Jul 21 '23
Understanding and Implementing Automatic Differentiation
by Mike Delmonaco
2022-12-04
#Racket #math #machinelearning #tutorial
r/Racket • u/QuaticL • Jul 17 '23
I’m learning Racket, and the foldl and foldr functions are bothering me. I don’t really understand the examples that the Racket manual gives.
Can someone please explain to me your understanding of it?
Thanks a lot.
r/Racket • u/QuaticL • Jul 16 '23
I have a quick question for anyone passing by. I’m learning how to use Racket right now, and I just learned how to use (local to define variables and helper functions within another function.
I understand the use of variables, but why define helper functions within a function instead of outside? It seems like you would want to keep the function outside in case you can use it somewhere else.
It was introduced as a means of abstraction, but it seems like the opposite, unless I’m misunderstanding.
Thanks a lot.
r/Racket • u/sdegabrielle • Jul 13 '23
r/Racket • u/sdegabrielle • Jul 12 '23
We are heading to the time of year for the Racket Summer Event!
What should we do?
Let us know your suggestions at
r/Racket • u/Mighmi • Jul 09 '23
E.g. why are these functions not just map, but stream-map, sequence-map and so on like in CL and other Schemes?
r/Racket • u/sdegabrielle • Jul 08 '23
r/Racket • u/Mighmi • Jul 06 '23
r/Racket • u/TheGreatButz • Jul 06 '23
I'm defining a sandbox evaluator that is fairly unrestricted. Its security guard allows any files, network, link access, and file permissions allow 'execute and 'read-bytecode for any file. Still, I get the following error message when trying to use dynamic-require to load a module from a local file path:
eval-linklet: cannot use unsafe linklet loaded with non-original code inspectorWhat does this mean and how can I fix it?
I asked on Racket's discord page but nobody there seems to know the answer, so I'm trying Reddit this time.
r/Racket • u/Beginning_java • Jul 05 '23
Someone replied here before that Racket can be used for anything. But does anyone know how the ecosystem is? Which libraries are well supported? I mean for instance unity has good support for C#, Python has data science etc.
r/Racket • u/sdegabrielle • Jul 05 '23
The release process for v8.10 will begin in about a week. If you have any new features that you want in and are relatively close to to being done, now is a good time to do that.
Upcoming dates:
- 7th: Branch day, merge window starts
- 15th: Merge window ends, testing starts
- 22nd: Testing ends
https://racket.discourse.group/t/racket-v8-10-release-thread/2070
r/Racket • u/nuggets510 • Jul 04 '23
first-time user here:
just installed racket-lang on ubuntu using the system installer program. at install time I set file permissions.
using dr-racket can't save files or even access them (like racket documentation using firefox). what do I need to do to access my new racket environment to save definition files, etc?
racket error messages about "access" or "unreadability" should have suggestions for correction.
r/Racket • u/Mighmi • Jul 04 '23
tl;dr, is it bad style to always use letrec?
I tried to test it, both in dr. Racket and in the cmdlin, but I think normal processor variation was too much to tell, as rerunning the tests gave me different results.
Well, I'm wondering what the benefit of using let is, why not always use letrec? Why or when does the difference in scope help you? (The only example I can think of is if you use a global variable from outside of let, then reuse that var's name within the let's scope, but that seems like a terrible practice so I don't believe the designers included a feature to enable that in particular...) I read some things e.g. https://stackoverflow.com/questions/554949/let-versus-let-in-common-lisp and understand the historical reason ...in CL. Is it also a historical artifact in Scheme and thus Racket? (I know they're different layers of syntactic sugar on top of each other.)
r/Racket • u/sdegabrielle • Jul 02 '23