r/scheme • • Jul 27 '14

Not that I don't like Racket...

0 Upvotes

But isn't it kinda bloated? R6RS as a whole was a catastrophe, and it's the same exact people behind Racket, obviously. It's big, bloated, and it goes against the grain of what I think scheme oughtta be about. I think I speak for a lot of you when I say that SICP is the major educational backbone of the typical schemer, yet HtDP is often touted as modernistic and updated, whereas SICP is still taught in classrooms to this day.

Racket has a nice community I suppose, I've never liked the attitude of just tacking on things the way that Racketeers like. I mean, the idea of dialects is a good one, but it seems like it's been abstracted out of the way to a significant degree.

I'm just curious what most people think about Racket. Good, bad, ugly?


r/scheme • • Feb 23 '19

What practical uses are there for scheme?

0 Upvotes

Idk I'm finding it hard to (define (λ (how (the (fuck (this (is (worth (it (for (literally anything)))))))))))


r/scheme • • May 09 '11

Do you pronounce Scheme as SKEEM or SKEEM-a?

0 Upvotes

Stupid question, but I've been reading about scheme over the weekend and it bugs me that I can't talk about it without saying "SKEEM or SKEEM-a, I don't know which..."


r/scheme • • 25d ago

New scheme compiler in rust

Thumbnail reddit.com
0 Upvotes

r/scheme • • Jan 20 '17

Where can I find a complete list of Scheme keywords?

0 Upvotes

I need a list of Scheme keywords for syntax highlighting. Currently I'm using [this one] (https://gist.githubusercontent.com/bobbyno/3325982/raw/fc0208d287e56adc12b4c76114fcd21a107082ad/mit_scheme_bindings.txt), which is incomplete. For example, the primary procedure square isn't in that list.

Maybe the index of R7RS would be a good place to find such a list, but I don't know how to extract text from a pdf file. Can someone help me?


r/scheme • • Dec 27 '23

Hi can somebody explain to me what this subreddit is.a

1 Upvotes

Hi I just thought it was interesting ir saw something about machine learning which is something that very much interests me Thank you for your time!


r/scheme • • Dec 16 '22

How to modify this little program to use only hygienic macros?

2 Upvotes

FUCK YOU, YOU SCHEME SUBREDDIT MORONS!!!

You have constantly downvoted everything I've ever written, even though I've written more useful and beautiful posts in one month on r/RacketHomeworks than most of you have ever written in your entire miserable life, you idiots!

So, shame on you, you heartless wretches! And for whoever retard gave me that last downvote that spilled the beans: may God give him the whole subreddit to fuck up his leper's mouth as many times as he downvoted my posts! You really are a piece of shit and a human amoeba!

Shame on you poor moderators, shame on you, poor "regular" users. Here is your "magnificent" sub on which even Gleckler won't write anymore (I guess he also realized how stupid he was before, so he finally came to his senses!)

You finally got what you always wanted: a fucking "Sound of SILENCE" that drowns out every voice that even slightly protrudes from your narrow, pre-packaged beliefs! Fuck you, stinkers!

Special note for /u/servingwater :

Shit of a man, that certain "servingwater" character supposedly asks: "Why is this troll still allowed to post his hatred here?"

Yes indeed. And I wonder: why does it bother you so much??? Mind your own business, poor leper! Why do you want to control so much, why do you want to censor? Why are you so pathetic and stupid that you don't see how low and vile what you wrote is???

And your nick "servingwater" is very well chosen: you'll be serving water to Jesse Alama at the so-called "Racketfest" so that Alama can make a fucking €105 per glass on that water! Shame on you, stinkers!

Hi, dear schemers!

On my subreddit /r/RacketHomeworks I wrote a "general" program to solve cryptarithmetic puzzles. It is written in Racket, but uses old-fashioned non-hygienic macros.

I wrote it like that, because I don't know hygiene macros very well. I never learned it well because I didn't really like them.

But I'd be interested to see how someone skilled with hygienic macros would refactor my solution to use only hygienic macros. That way, I would learn something, and I believe it would be useful for others as well. So, is there anyone who would like to modify my code to use only hygienic macros? I'd be very grateful!


r/scheme • • Nov 06 '22

Almost 25% of the published content on this group consists of SRFI posts

0 Upvotes

If you look a little closer, you will see that out of 25 posts from the front page of this group, a total of 7 of them are Gleckler's posts about various SRFIs.

So, more than 25% of the published content on this group consists of those SRFI posts, which mostly nobody ever reads or comments on!

I believe that this harms the group, because it dulls it and deadens the discussions. Really, what is there to discuss here if content that is of no interest to the vast majority is constantly appearing in such large numbers?

What do you think about it? You like it: a) very much; b) you don't like it at all or c) you give a damn about everything!

Come on, people, speak up!


r/scheme • • Nov 01 '22

Adding the element at the end of the list efficiently

0 Upvotes

It has always annoyed me that the operation of adding an element to the end of a list in Scheme is an "expensive" one, (unlike the operation of adding to the beginning of a list).

Of course, in standard Scheme, there is always a way to get over it, like this:

(define (list-builder)
  (let ((mylist '())
        (lastcell '()))
    (lambda (m)
      (case m
        ((append) (lambda (x)
                    (cond
                      ((null? mylist)
                       (set! mylist (cons x '()))
                       (set! lastcell mylist))
                      (else
                       (let ((newcell (cons x '())))
                         (set-cdr! lastcell newcell)
                         (set! lastcell newcell))))))
        ((get) (lambda () mylist))))))

Now we can do this:

> (define mylist (list-builder))
> ((mylist 'append) 1)
> ((mylist 'append) 2)
> ((mylist 'append) 3)
> ((mylist 'get))
> (1 2 3)

But when we try to do the same in Racket, we can't because Racket doesn't support mutable lists.

Ok: truth be told, racket has mcons, mcar set-mcar!, set-mcdr!, etc, but in Racket those mutable lists are completely separate from regular lists and cannot be interchanged. This means that none of the functions for working with "classic" lists can be used over mutable lists, which really sucks!

I don't know about you, but to me this is a totally strange decision by the creators of Racket, because, as far as I know, the idea of Scheme is not only to be a functional language, but also to have its imperative side, too. I don't understand why Racket gets away with it and discourages the use of mutable list wherever it can?


r/scheme • • Jun 07 '16

fuck 'let' why do we even have that, any good arguments to ever use let over lambda?

0 Upvotes

r/scheme • • Feb 13 '18

really confused

0 Upvotes

why plt paper contains so many formula.I dont see the point


r/scheme • • Sep 13 '13

Seems like this compiler actually makes code 2~100 faster than C. Why isn't anyone using it!?

Thumbnail
justindomke.wordpress.com
6 Upvotes

r/scheme • • Jun 11 '15

Roadsend PHP: A PHP to native binary compiler written largely in Scheme (Bigloo)

Thumbnail
github.com
0 Upvotes

r/scheme • • Sep 25 '17

would anyone be willing to help me with an assignment?

0 Upvotes

Im just learning scheme and my first assignment I dont even know where to start. Would anyone be willing to discuss this with me in discord or something? i dont expect you to do the work for me but it helps if I have someone who can tell me if im going in the right direction or not


r/scheme • • Nov 09 '13

Pyret

Thumbnail
pyret.org
0 Upvotes

r/scheme • • Jun 05 '09

The Adventures of a Pythonista in Schemeland/25

Thumbnail
artima.com
0 Upvotes

r/scheme • • Jun 19 '13

Need an explain like I am 5 for scope in Scheme.

0 Upvotes

I have this example of code:

(define m 4)  
(define n 4)

(define (p m)     
	(define (q n) (pp 3))
	
	(define (qq x) 
   		(define (pp x) (+ x n))
      	(+ x m)
	)
	(qq 3)
)

(p 10) happens to be 13 but I can't figure out why.


r/scheme • • Jul 11 '22

Scheme and ... outputs!

0 Upvotes

Hello to all,

I am a newly baptised into the realm of Lisp/Scheme. My main objective -besides the beauty and mathematical simplicity of the language per se- is to deal (in the far... future) with problems in symbolic mathematics (like e.g., the symbolic differentiation of functions, etc).

To my question now:

is there any way to have a nice output (perhaps LaTeX or any other Markdown language based) for my programs? I have something like sicmutils in mind.

My only constraint is that I do NOT want to use neither DrRacket nor Clojure (simply because, I prefer Chez-Scheme and in the long run Otus Lisp -due to its purely functional character).

Any suggestion, or idea is very welcome.

NOTE: PLEASE, consider my constraints (e.g. regarding the language implementations) and do not suggest something irrelevant.

THANK you!


r/scheme • • Mar 04 '18

metaprogramming

0 Upvotes

Metaprogramming is considered most significant feature of scheme.But I think it also make it difficult to debug and understand other's code .


r/scheme • • Oct 13 '26

SonicBoom: a Guile-first AI runtime that traces tensor programs with hygienic macros and multi-shot continuations

Thumbnail
github.com
2 Upvotes

r/scheme • • Mar 21 '16

"Student-advisor" match program in Scheme

0 Upvotes

I'm currently in a college course that involves scheme programming. We are working on an assignment where the instructions are...

"This assignment will be to write a Scheme program that the user can have a conversation with. It is expected that the program will give sensible replies some of the time and silly replies some of the time. In otherwords, the program must handle some range of user input reasonably, but may give nonsense replies – or something like “I don’t understand you.” – if the user input doesn’t match anything it expects."

We are given a decent amount of code to work off of, but I'm still feeling lost on how to progress any further. So far I have this for some of my functions...

;----------------------------------------------------- (define response-rules ’((() (Please enter your response.)) ((* hello ) (Nice to meet you.) (What is your name?)) (( computer science ) (Have you taken the necessary math courses?) (When are you planning to graduate?) (Are you more interested in software or hardware?)) (( engineering ) (What are your plans for your senior design project?) (What about engineering interests you?) (What type of engineering work would you like to do?)) (( computers ) (Is that based on your own interest or because you feel required to?) (What interests you about computers?)) (( i don’t know ) (Do you think there’s some way to find out?)) (( you don’t know ) (That is probably true.) (Please tell me about %2.)) (( if ) (Do you think its likely that %2?) (Do you wish that %2?) (What do you think about %2?)) (( can you help ) (I may have some ideas if you can give me more details about your question.) (I will try to think of some ideas.)) (( i want *) (Do you think %2 will help?) (How will that help you?))))

;---------------------------------------------------

(define respond-to-input (match input response-rules) (cond ((and (null? input) (null? response-rules)) #t) ((equal? input '()) #t) ((or (null? input) (null? response-rules)) #f) ((or (equal? (car input) '?) (equal? (car input) (car response-rules))) (match (cdr input) (cdr response-rules))) ((equal? (car input) ') (cond ((match (cdr input) (cdr response-rules)) #t) ((match (cdr input) response-rules) #t) ((match input (cdr response-rules)) #t) (else #f))) (else#f))))

;---------------------------------------------------

(define student-advisor (lambda () (define repeat (lambda () (let ((input (read-list))) (if (not (equal? input ’(exit))) (begin (displayln (respond-to-input input)) (repeat)) (display "Thanks for using the student advisor. Goodbye!\n\n"))))) (set! random-state (random-state-from-platform)) (display "\nWelcome to the student advisor!\n") (display "(To leave the conversation at any time, enter EXIT)\n\n") (displayln "Have you selected a major yet?") (let ((input (read-list))) (cond ((equal? ’() input) (displayln "Please enter your response.")) ((not (equal? input ’(exit))) (displayln (respond-to-input input))) (else (display "Hope you can reschedule your appointment soon. Goodbye!.\n\n"))) (cond ((not (equal? input ’(exit))) (repeat)))))) ;------------------------------------

The "student-advisor" function is my main function. And it calls the "respond-to-input" function to try and match from the "response-rules" list. I know there are other things wrong with the code thus far because I don't have some of the functions written. But my main concern is just getting a simple working program that at least functions some what as far as being able to talk to it and it give me proper responses to the inputs. Any help would be GREATLY appreciated!


r/scheme • • Feb 14 '22

Here are some mathematical definitions in the prefix style of Scheme syntax related to model theory and logic

Thumbnail reddit.com
0 Upvotes

r/scheme • • Feb 23 '16

Taking Averages

0 Upvotes

I would like to take averages of a list of numbers. Ex: (define speed '(("Person1" (65 60 65 67 62)) ("Person2" (67 62 67 74 57))). How would I find the average speed of each person in scheme?


r/scheme • • May 05 '14

Understanding syntactic closures and environments during macro expansion.

1 Upvotes

I have an intuitive understanding of how hygiene can be achieved using syntactic closures, but I'd like to implement it myself - that's where my problems start. As far as I understand it (please feel free to correct my mistakes):

  • Syntactic Environments allow identifiers to be mapped, according to the forms that reside in that environment.

  • Syntactic Closures close over these environments so that expressions are resolved safely at expansion time.

My questions are:

  • how are syntactic environments maintained? During what phase of the lifecycle of a scheme program are they created: http://www.bcl.hamilton.ie/~barak/teach/F97/CS257/stages.gif

  • when exactly is the following expansion fully completed, when is the final form replaced? Is it complete at macro-expansion time or is there a bit of runtime action to grab details from the syntactic environments?

https://gist.github.com/bobjflong/c82327e54bcb753de7b4