Re: [racket-users] Differences running HtDP programs from DrRacket IDE vs racket command line
Thank you very much Robby for the quick reply! I should have mentioned that our students are using Beginning Student by setting the Language to that, rather than adding #lang htdp/bsl. It appears this makes a difference. So the whole file looks like: ;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname file) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (quasiquote x) x) (define (f x) 123) `(f 888) Running this file in command line with "racket file.rkt" doesn't show any errors for me. I'm using DrRacket 7.8 if it matters. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/2b067e72-f364-4f20-a3b7-b0f2e5cc6513n%40googlegroups.com.
[racket-users] Racket News - Issue 39
Hi all, Racket News Issue 39 is now here! https://racket-news.com/2020/10/racket-news-issue-39.html Go grab a cuppa and enjoy! -- Paulo Matos -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/9b1598aa-3df5-4b4e-a492-5d6171108e8cn%40googlegroups.com.
Re: [racket-users] Differences running HtDP programs from DrRacket IDE vs racket command line
On Mon, Oct 5, 2020 at 4:32 PM Nick Lee wrote: > > Hello, > I noticed there are differences when I run HtDP programs in DrRacket IDE > vs the "racket" command line. > > For example, the following program's test passes in DrRacket IDE: > > ;; file.rkt - Set to Beginning Student > (check-expect (exact? (string->number "1.0")) true) > > But when I run "raco test file.rkt", the test fails. > > This looks like a bug to me. Probably related is that this program prints #false and not #true. #lang htdp/bsl (exact? (string->number "1.0")) > As another example, the follow Beginning Student program generates an > error when run in DrRacket IDE (the error being read-syntax: illegal use of > ```): > > ;; file.rkt - Set to Beginning Student > (define (quasiquote x) x) > (define (f x) 123) > `(f 888) > > But when I run "racket file.rkt", no error is generated, and 123 is > printed. > > This one behaves the same for me. It says "quasiquote: this name was defined in the language or a required library and cannot be re-defined". > Is there a way I can run HtDP programs from the command-line and get > behavior that's the same as when I click "Run" button in the IDE? > > This is supposed to work. Sorry for the bugs! Robby -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAL3TdOP7rCUuDTUCtd5iF%3D3-eci3CSvggo47xEcu1V-B0bbRnw%40mail.gmail.com.
[racket-users] Differences running HtDP programs from DrRacket IDE vs racket command line
Hello, I noticed there are differences when I run HtDP programs in DrRacket IDE vs the "racket" command line. For example, the following program's test passes in DrRacket IDE: ;; file.rkt - Set to Beginning Student (check-expect (exact? (string->number "1.0")) true) But when I run "raco test file.rkt", the test fails. As another example, the follow Beginning Student program generates an error when run in DrRacket IDE (the error being read-syntax: illegal use of ```): ;; file.rkt - Set to Beginning Student (define (quasiquote x) x) (define (f x) 123) `(f 888) But when I run "racket file.rkt", no error is generated, and 123 is printed. Is there a way I can run HtDP programs from the command-line and get behavior that's the same as when I click "Run" button in the IDE? Thanks -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/21fffb90-1fb8-46bc-a772-121cb92da5cdn%40googlegroups.com.
[racket-users] Re: access a `#` from c code
I have a temporary workaround where i have created an ffi function racket-side to call into c, so that i can automatically use the _cptr's racket-to-c function. I wonder if there is a way to manually extract the c value for the case where i want it in a return value of racket_apply. Nate On Mon, Oct 5, 2020 at 3:26 AM Nate Griswold wrote: > Note this is from a return value of racket_apply; i called a racket > function from c code and want to store the cptr it has returned. > > Nate > > > On Mon, Oct 5, 2020 at 3:25 AM Nate Griswold > wrote: > >> What is the best way to access a value that is a cpointer from c code? >> Should i convert it to an integer? I have been looking at this for a while, >> about an hour, and will continue to look but just thought the list might be >> able to answer faster. I know there are chez functions to convert `ptr`s to >> integers but those aren't working for me (not an integer error). >> >> Nate >> > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAM-xLPrLiyjzqZvuKd-fK57%2BE6nfJXxz8YF7vpTkZTpsa%3D80SA%40mail.gmail.com.
[racket-users] Re: access a `#` from c code
Note this is from a return value of racket_apply; i called a racket function from c code and want to store the cptr it has returned. Nate On Mon, Oct 5, 2020 at 3:25 AM Nate Griswold wrote: > What is the best way to access a value that is a cpointer from c code? > Should i convert it to an integer? I have been looking at this for a while, > about an hour, and will continue to look but just thought the list might be > able to answer faster. I know there are chez functions to convert `ptr`s to > integers but those aren't working for me (not an integer error). > > Nate > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAM-xLPpcyOPQuX-pHa-2QjDStbT3uDB73qr3-OtL7SyYT32%3DMQ%40mail.gmail.com.
[racket-users] access a `#` from c code
What is the best way to access a value that is a cpointer from c code? Should i convert it to an integer? I have been looking at this for a while, about an hour, and will continue to look but just thought the list might be able to answer faster. I know there are chez functions to convert `ptr`s to integers but those aren't working for me (not an integer error). Nate -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAM-xLPoxm_%2BqwFiOMRN%2Bb-ybAb97HThOoTXh7sk5kgxewiAVjg%40mail.gmail.com.