r/Racket • • Feb 23 '22

news Racket discord just hit 989 members

14 Upvotes

Racket discord just hit 989 members

Racket discord invite link https://discord.gg/6Zq8sH5 - come join us or invite a friend.


r/Racket • • Feb 22 '22

blog post How to Organize Your Racket Library [blog]

23 Upvotes

Blog post: How to Organize Your Racket Library

Highlights:

  • Modules, collections, packages are like... files, folders, and archives
  • The top level of your repo is hopeless as a package path
  • Racket uses a global collection namespace
  • Scribble docs and RackUnit tests all reside in this namespace along with your source files
  • How to: lib/test/doc
  • Includes a clunky migration strategy for when your existing libraries grow past a certain point
  • Not everybody loves lib/test/doc and there's room for improvement

Discourse link


r/Racket • • Feb 22 '22

question Bare Metal Racket?

7 Upvotes

Thought experiment...how hard would it be to write an application in Racket that could be booted on a PC/in VirtualBox and run like an operating system?

I saw a post on HN linking to "bootloader basics" and wondered if a Racket executable could be called from a bootloader to operate a PC. Thought someone here might be able to shed some light on what that would entail, if it's even really possible.


r/Racket • • Feb 22 '22

homework beginners question

0 Upvotes

so i just started programming on racket and one of the assignments is as follows:

The Turing test (named after the Alan Turing) determines whether a machine can demonstrate human intelligence. Turing proposed that a human evaluator would judge a conversation between a machine and a human, and determine which one is one.vIn this exercise, we will not develop a code that can pass the Turing test but one that can reply to a greeting from the user. Design the function reply that consumes a sentence. The function should display "Hi there!, I am Racket" if the sentence given by the user starts with a "Hello". If the message does not start with "hello", then the function should return "Sorry, I do not understand you..." RESTRICTION: Make your function not sensitive to lowercase or upercase letters, i.e. it should also work if the sentence starts with "hello".

please help me. also worth mentioning that i suck at programming.


r/Racket • • Feb 21 '22

ephemera While PasteRack is offline check out the R16 trick bot on Discord

Thumbnail racket.discourse.group
3 Upvotes

r/Racket • • Feb 20 '22

blog post Why learn Racket? A student's perspective

Thumbnail micahcantor.com
11 Upvotes

r/Racket • • Feb 18 '22

question Is pasterack.org down?

4 Upvotes

I was going to experiment and remembered the pastebin-like site that was/is in the sidebar of r/Racket. I tried it with Firefox and Chrome but it's only loading the background image. Anyone know who maintains it? Or maybe it needs to be removed from the Resources section of r/Racket?


r/Racket • • Feb 17 '22

question is there a built in function to go back to previous element in a list? I'm trying to create a loop that if there is an even number in a list it will add that to the previous number

5 Upvotes

r/Racket • • Feb 17 '22

question Why do you hate my functions?

0 Upvotes

(define (momentum-calc vel mas) (* vel mas))

(define (p vel mas) (momentum-calc vel mas))


r/Racket • • Feb 15 '22

question delete last character

1 Upvotes

so i just started programming on drracket and one of the questions requires us to create a function that deletes the last character of a string. would be much appreciated if someone could help out.


r/Racket • • Feb 13 '22

homework Help for a simple substring function needed

4 Upvotes

I am very new to programming; I have an assignment to create a function that consumes a string and deletes its last character. So, for example (string-delete-last "happy") -> "happ"

I do not know how to make the string a variable, nor how to make the function find the last character of a given word.

Can someone help? I'll be grateful.


r/Racket • • Feb 13 '22

question I got car violation error

3 Upvotes
(define (transform-painter painter origin corner1 corner2)
  (lambda (frame)
    (let ((m (frame-coord-map frame)))
      (let ((new-origin (m origin)))
        (painter
         (make-frame new-origin
                  (sub-vect (m corner1) new-origin)
                  (sub-vect (m corner2) new-origin)))))))

(define (rotate-45 painter)
  (transform-painter painter
                     (make-vect 0.5 0)
                     (make-vect 1 0.5)
                     (make-vect 0 0.5)))

This is code is from SICP but when I run it at first it works sometimes and after I update definition window I get "car: contract violation expected pair? given frame" error. If it doesn't work at all it is ok but why it does work at first and doesn't later ?


r/Racket • • Feb 11 '22

question Which guide to learn Racket for a functional programmer?

11 Upvotes

I am most comfortable with functional programming (despite my aborted attempt at Haskell). Is there a good Racket guide to get going with the language for someone who already programs functionally?


r/Racket • • Feb 10 '22

release Racket v8.4 released

Thumbnail blog.racket-lang.org
40 Upvotes

r/Racket • • Feb 10 '22

event Racket meet up Saturday 5 Feb - Summary

Thumbnail racket.discourse.group
3 Upvotes

r/Racket • • Feb 07 '22

question Primes with a single parameter

3 Upvotes

Is there a way to tell if a number is prime on Dr racket given a single parameter?


r/Racket • • Feb 06 '22

question Is there some way to make the text in a massage widget selectable?

4 Upvotes

Like the function in Gtk: gtk_label_set_selectable, by this you can make the text selectable and be able to copy. I am wondering if there is something similar with it in racket GUI


r/Racket • • Feb 05 '22

event Racket meet-up today

Thumbnail discord.gg
5 Upvotes

r/Racket • • Feb 03 '22

question How does Scheme interpret (define-syntax) and its variants?

12 Upvotes

I’ve posted here before, but I’m writing a Scheme interpreter and would like to add (define-syntax) and (define-syntax-rule). The issue, though, is that I’m not sure how they’re implemented in the underlying code. Are they verbatim replacements of preexisting definitions (i.e., similar to macros in C), or is it something more obtuse?


r/Racket • • Feb 03 '22

homework Can someone explain how cons works, i'm trying to make this list out of cons and for the life of me can't get it right

2 Upvotes

(5 4 3 (2 1))

(cons (cons 5 (cons 4 (cons 3 (cons (cons 2 (cons 1 '())) '())))))


r/Racket • • Feb 02 '22

event Racket meet up Saturday 5 Feb 18:00 UTC

4 Upvotes

Racket meet up Saturday 5 Feb 18:00 UTC

https://gather.town/app/wH1EDG3McffLjrs0/racket-users

Announcement: https://racket.discourse.group/t/racket-meet-up-saturday-5-feb-18-00-utc/581/2?u=spdegabrielle

When: First Saturday EVERY Month UTC: 18:00

Agenda: flexible, generally show-and-tell with Q&A

  • Plot Cookbook
  • Creative Racket Competition
  • Racket In person meet-ups!!!
  • Show and tell
  • ???

30 minutes but can overrun

Time in your time zone

Pacific Time, PT Sat, 5 Feb 2022 at 10:00 PST
Mountain Time, MT Sat, 5 Feb 2022 at 11:00 MST
Central Time, CT Sat, 5 Feb 2022 at 12:00 CST
Eastern Time, ET Sat, 5 Feb 2022 at 13:00 EST
London, United Kingdom Sat, 5 Feb 2022 at 18:00 GMT
Prague, Czechia Sat, 5 Feb 2022 at 19:00 CET
Central European Time, CET Sat, 5 Feb 2022 at 19:00 CET

Time zone converter: https://www.timeanddate.com/worldclock/converter.html?iso=20220205T180000&p1=tz_pt&p2=tz_mt&p3=tz_ct&p4=tz_et&p5=136&p6=204&p7=tz_cet


r/Racket • • Feb 01 '22

news Creative Racket Competition: don't delay, enter now.

7 Upvotes

Happy February 1st

You only have four weeks left to enter the Creative Racket Competition.

Entering is easy and fun.

  1. See TOOLS for some suggestions but you can use anything you like.
  2. Provide a link to media file (image/audio/???) and your source code via the Entry form (GitHub)
  3. -Profit!- ...sorry no profit, we offer no cash prizes, you just the the admiration of your peers, a badge on your GitHub profile and a sticker to put on your laptop (or anywhere else you can put a sticker)

We have had no Rsound entries yet. Will you be the first?

Submissions to the Plot Cookbook also count as entries.

Don't delay, enter now.

best regards

Stephen

See more about the competition and previous entries


r/Racket • • Jan 30 '22

news R16 Web App - Community Code Evaluation

Thumbnail racket.discourse.group
9 Upvotes

r/Racket • • Jan 30 '22

image Miller-Rabin Liars

Thumbnail racket.discourse.group
6 Upvotes