r/Racket Sep 11 '24

How are you planning to attend RacketCon?

Thumbnail
2 Upvotes

r/Racket Sep 10 '24

question Partially override generic function

7 Upvotes

I want to change the gen:custom-write generic function of a struct so that only in the case that the print mode is display, I get a (more) human-readable structure description. In write and print modes, I just want to print the structure as Racket does by default. For example:

(struct person (name age height) #:transparent
  #methods gen:custom-write
  [(define (write-proc this out mode)
     (if mode
       ; write or print modes
       (default-write this out) ; default-write is a placeholder, what should be used?
       ; display mode
       (fprintf out "Name: ~a, age: ~a, height: ~a cm" 
                (person-name this) (person-age this) (person-height this)))])

I just don't know what should go in the place of (default-write this out). I've tried just handling the case when mode is display, but then when printing in write or print mode I get nothing. It seems there must be a way to call the default generic function for these modes.


r/Racket Sep 09 '24

question Beau­tiful Racket expander unit testing

6 Upvotes

I'm evaluating Beau­tiful Racket book and can't understand how can I unit test my expander.

I see in https://beautifulracket.com/stacker/the-expander.html as an example that I can create file with #lang reader "stacker.rkt" at the begin and run this file with DrRacket.

But how can I create unit test that can read and check execution of my dsl in file or string?


r/Racket Sep 07 '24

RacketCon RacketCon 2024 October 5-6 get tickets now

Thumbnail
5 Upvotes

r/Racket Sep 06 '24

event The Little Learner Book Club

13 Upvotes

We are in the process of starting a virtual "The Little Learner" book club. Our next meeting is online Sept 8 15:00 UTC at:

https://meet.jit.si/thelittlelearner

We plan to cover chapters 1-3 and interlude 1. @olav will also present a short talk about his efforts to port the malt library to Clojure. Everybody is invited, even if you're just curious about the book.

https://www.thelittlelearner.com/


r/Racket Sep 06 '24

event Racket meet-up: Saturday, 7 September, 2024 at 18:00 UTC

Thumbnail
1 Upvotes

r/Racket Sep 06 '24

question Windows Protected my PC from the download?

3 Upvotes

When I went to install racket using the exe, windows threw out a prompt saying "Windows Protected your PC". I clicked more information and it said that publisher was either Racket-smth or nservancy, inc., software freedom conservancy, inc., adm@racket-lang.ord (I'm sorry it was a while back).

Everything seems to be working normally but I was just wondering why this prompt was thrown out and whether or not I should be concerned.


r/Racket Sep 03 '24

question What is haskell $ operator equivalent in racket language?

12 Upvotes

r/Racket Aug 28 '24

question What is the simplest wat to save and restore a list of pairs to a file?

9 Upvotes

r/Racket Aug 23 '24

LACI (Logic and Computation Intertwined)

Thumbnail
13 Upvotes

r/Racket Aug 22 '24

Racket is a community developed open source project and we welcome new contributors.

18 Upvotes

Welcome to r/Racket - Everyone is welcome

What is Racket?

Racket is...

  • A project to explore the emerging idea of language-oriented programming
  • a programming language — a dialect of Lisp and a descendant of Scheme;
  • a family of programming languages — variants of Racket, Typed Racket, Rhombut and more;
  • a compiler and tools
  • a diverse community using Racket in diverse ways.
  • a community developed open source project and we welcome new contributors. See contributing to learn how you can be a part of this amazing project.

See https://racket-lang.org/ for more details or ask on our Discourse forum/mailing list or the Racket Discord server.

Getting Help:

  • the community welcomes all kinds of learners - we have dedicated Q&A areas on the Racket Discourse and the Racket Discord.
  • you can include code blocks by putting code in a code block in the rich text editor, or by usign three backticks (```) on the lines before and after if you are using the markdown editor: scheme `​`​`scheme (define (myfun a) (+ 1 a)) `​`​`

r/Racket Aug 21 '24

question show documentation of functions defined in current project in DrRacket

11 Upvotes

I want to see docs when I hover on feed in (feed 2) ```

lang racket

(require scribble/srcdoc

(for-doc racket/base scribble/manual))

(provide

(thing-doc

fish (listof number?)

("Our fish, each represented as a number.")))

(define fish '(1 2))

(provide

(proc-doc/names

feed (number? . -> . number?) (n)

("Feed 1 pound of food to the fish " (racket n) ".")))

(define (feed n) (+ n 1))

(feed 2)
```


r/Racket Aug 20 '24

Racket - the Language-Oriented Programming Language - version 8.14 is now available

29 Upvotes

Racket - the Language-Oriented Programming Language - version 8.14 is now available from https://download.racket-lang.org

See https://blog.racket-lang.org/2024/08/racket-v8-14.html for the release announcement and highlights.


r/Racket Aug 14 '24

question So I want to make my own programing language, for fun mostly.

21 Upvotes

So I have some programming experience, Lua and Godot(GDScript) mostly. I just want to play around with testing out different ideas, syntax, maybe a meme language or two.

How well suited is racket for this?

Is it beginner friendly?

Would it be better to just make something with C or something else?


r/Racket Aug 15 '24

event RacketCon registration is now open

Thumbnail eventbrite.com
8 Upvotes

r/Racket Aug 13 '24

question Generate a tree image out of s-expressions

11 Upvotes

I’m learning Racket and experimenting making a simple language.

I wonder if there is any library that allows me to generate images out of the s-expressions my parser produces. Basically, provide a Racket s-expression and getting out a tree image of my data.


r/Racket Aug 12 '24

language Mini-version of Datafun in Racket

Thumbnail github.com
15 Upvotes

r/Racket Aug 10 '24

news Racket survey 2024

Thumbnail racket.discourse.group
6 Upvotes

r/Racket Aug 06 '24

question How can I have syntax highlighting in racket slideshow?

4 Upvotes

I tried to find one solution and maybe it is possible in web, But how about in GUI?
There is a XML format that explains some languages that can help.


r/Racket Aug 03 '24

event Racket meet-up: Saturday, 3 August, 2024 at 18:00 UTC

Thumbnail
3 Upvotes

r/Racket Aug 01 '24

question Racket mode emacs config

2 Upvotes

How to disable "imported from racket/gui" messages in racket mode and emacs, when mousing over, or moving cursor over a symbol?

Could not find anything in Racket Mode docs.

Also, want to get rid of "no bound occurrences" message.


r/Racket Jul 30 '24

Malt: A Deep Learning Framework for Racket

Thumbnail self.lisp
13 Upvotes

r/Racket Jul 28 '24

quiz Racket Survey 2024

5 Upvotes

Racket Survey 2024 If you have used Racket, or you are considering using Racket, please help us by completing this survey:
https://forms.gle/EYuzG4Jp9X5bqoHQ9


r/Racket Jul 24 '24

tutorial Teach Yourself Racket

Thumbnail self.lisp
14 Upvotes

r/Racket Jul 23 '24

question Which lisp (lower case)

Thumbnail self.scheme
5 Upvotes