[racket-users] Racket open a terminal/command window
You've probably launched racket, the command line interface, instead of DrRacket. Search for the latter on your OS. -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] Racket open a terminal/command window
You probably launch racket, the command line interface, instead of DrRacke. Search for the latter on your OS. -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] Racket open a terminal/command window
Hi Everyone, I am new in programming and i started here with Racket after got recommendation from edx. I have done the installation of DrRacket but everytime when i open it open a command typr winodw i am not able to see program GUI. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Microworlds
Hi all, While avoiding other work this holiday season, I decided to explore this further. I very intentionally have modeled the work so far on NetLogo, given its long history in this space. And, in exploring this project, I'm also learning a number of things myself. For example, the project involved some new learning in terms of macros as well as optimization, and I'm still wrestling with the way the microworld is designed/implemented in the face of that ongoing learning. (Similarly, I'm also still learning about packaging, how the package server does or possibly does not work with various git hosting solutions, and am learning Scribble.) At this point, I have done no testing on Windows, am confident there's a more performant (and maintainable/safe/etc.) way to represent the underlying grid/world, and know there's a lot of testing and safety/error handling to be be implemented. So, release early, release often and all that. I thought I'd mention it here in case anyone else wanted to explore along. I also recorded a few of the microworlds in action, just because. https://youtu.be/FpMy9QxWnhE This seems to be available via a package install of "paddle." I have code in my "examples" directory that fails to build, and I have to figure out how to 1) leave it in the repository but 2) ask the package server to ignore it at build time... Happy new year, Matt On Thu, Dec 6, 2018 at 12:45 PM John Clements wrote: > Sounds fascinating. As an instructor for first-quarter CS+X, I’ve been > looking at alternatives to sound as a setting. I’m interested in the > Fisler/Krishnamurthi/Politz/Lerner Big Data curriculum, but yours also > sounds good! > > John > > -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] Programatically highlighting portions of DrRacket definitions window
I'm working on a #lang with unusual syntax that's meant to be run only in DrRacket. Users will have a "program" in the definitions window and enter commands in the REPL. I'd like to be able to make certain commands temporarily highlight syntax in the definitions window, somewhat like raise-syntax-error can, but without actually raising an error. Is there a way to do this? I've done some Googling and code-diving, but can't seem to figure it out. 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Escaping strings for the shell
I agree with all of that -- it's definitely not a desirable thing on a general basis. For this single use, with a well-defined use case and known parameters, it would have been useful, but it's not critical. Thanks for clarifying about the system* thing with putting -O in a separate argument. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] malloc + structs = ???
Thanks Matthew! That clears things up. Indeed, I'll steer clear of 'interior until next release. Cheers! Ron On Tuesday, January 1, 2019 at 10:27:00 AM UTC-8, Matthew Flatt wrote: > > Oh, right --- I was confusing 'interior with 'atomic-interior... and so > does the implementation! The `malloc` implementation uses the > 'atomic-interior allocator for 'interior. > > That's easy to fix, and I'll push a repair. Meanwhile, I guess the > answer is to avoid 'interior. > > At Tue, 1 Jan 2019 10:10:33 -0800 (PST), Ronald Garcia wrote: > > Hi Matthew, > > > > Thanks for the reply. However, I see I mis-wrote: I meant to say that > > 'interior is supposed to be like 'non-atomic, (whereas 'atomic-interior > is > > like 'atomic). > > Does that not make a difference? > > > > Thanks! > > Ron > > > > > > On Tuesday, January 1, 2019 at 10:06:56 AM UTC-8, Matthew Flatt wrote: > > > > > > Hi Ron, > > > > > > You can't install a Racket value into memory allocated with 'atomic or > > > 'interior. (That is, 'interior is like 'atomic, just as you write, and > > > not like 'nonatomic.) > > > > > > If you need a value that doesn't move and can reference a Racket > value, > > > try `malloc-immobile-cell`. > > > > > > Matthew > > > > > > At Tue, 1 Jan 2019 10:00:42 -0800 (PST), Ronald Garcia wrote: > > > > Hello, > > > > > > > > I'm trying to better understand how ffi/unsafe works, and I've run > into > > > > something I'm failing to understand. Consider the following code: > > > > > > > > #lang racket > > > > (require ffi/unsafe) > > > > > > > > ;; > > > > ;; cbox-struct.rkt > > > > ;; > > > > > > > > (define-struct data (a b)) > > > > > > > > (define (cbox s) > > > > (define ptr (malloc _racket 'interior)) > > > > (ptr-set! ptr _racket s) > > > > ptr) > > > > > > > > (define (cunbox cb) > > > > (ptr-ref cb _racket 0)) > > > > > > > > (define cb1 (cbox (make-data 1 2))) > > > > > > > > (collect-garbage 'major) > > > > > > > > (data-a (cunbox cb1)) > > > > > > > > > > > > If I run this in Dr. Racket 7.1, I get the following error: > > > > data-a: contract violation; > > > > given value instantiates a different structure type with the same > name > > > > expected: data? > > > > given: # > > > > > > > > - If I replace 'interior with 'nonatomic, the program successfully > > > produces > > > > 1. > > > > This difference in behaviour surprises me, since the docs for malloc > > > seem > > > > to suggest > > > > (by appeal to the "scheme_malloc" C functions) that interior and > atomic > > > > only differ in > > > > whether interior pointers are allowed and whether the object is ever > > > moved. > > > > > > > > Any ideas about what's happening here? > > > > > > > > Thanks! > > > > Ron > > > > > > > > > > -- > > 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...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] malloc + structs = ???
Oh, right --- I was confusing 'interior with 'atomic-interior... and so does the implementation! The `malloc` implementation uses the 'atomic-interior allocator for 'interior. That's easy to fix, and I'll push a repair. Meanwhile, I guess the answer is to avoid 'interior. At Tue, 1 Jan 2019 10:10:33 -0800 (PST), Ronald Garcia wrote: > Hi Matthew, > > Thanks for the reply. However, I see I mis-wrote: I meant to say that > 'interior is supposed to be like 'non-atomic, (whereas 'atomic-interior is > like 'atomic). > Does that not make a difference? > > Thanks! > Ron > > > On Tuesday, January 1, 2019 at 10:06:56 AM UTC-8, Matthew Flatt wrote: > > > > Hi Ron, > > > > You can't install a Racket value into memory allocated with 'atomic or > > 'interior. (That is, 'interior is like 'atomic, just as you write, and > > not like 'nonatomic.) > > > > If you need a value that doesn't move and can reference a Racket value, > > try `malloc-immobile-cell`. > > > > Matthew > > > > At Tue, 1 Jan 2019 10:00:42 -0800 (PST), Ronald Garcia wrote: > > > Hello, > > > > > > I'm trying to better understand how ffi/unsafe works, and I've run into > > > something I'm failing to understand. Consider the following code: > > > > > > #lang racket > > > (require ffi/unsafe) > > > > > > ;; > > > ;; cbox-struct.rkt > > > ;; > > > > > > (define-struct data (a b)) > > > > > > (define (cbox s) > > > (define ptr (malloc _racket 'interior)) > > > (ptr-set! ptr _racket s) > > > ptr) > > > > > > (define (cunbox cb) > > > (ptr-ref cb _racket 0)) > > > > > > (define cb1 (cbox (make-data 1 2))) > > > > > > (collect-garbage 'major) > > > > > > (data-a (cunbox cb1)) > > > > > > > > > If I run this in Dr. Racket 7.1, I get the following error: > > > data-a: contract violation; > > > given value instantiates a different structure type with the same name > > > expected: data? > > > given: # > > > > > > - If I replace 'interior with 'nonatomic, the program successfully > > produces > > > 1. > > > This difference in behaviour surprises me, since the docs for malloc > > seem > > > to suggest > > > (by appeal to the "scheme_malloc" C functions) that interior and atomic > > > only differ in > > > whether interior pointers are allowed and whether the object is ever > > moved. > > > > > > Any ideas about what's happening here? > > > > > > Thanks! > > > Ron > > > > > > -- > 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. > For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] malloc + structs = ???
Hi Matthew, Thanks for the reply. However, I see I mis-wrote: I meant to say that 'interior is supposed to be like 'non-atomic, (whereas 'atomic-interior is like 'atomic). Does that not make a difference? Thanks! Ron On Tuesday, January 1, 2019 at 10:06:56 AM UTC-8, Matthew Flatt wrote: > > Hi Ron, > > You can't install a Racket value into memory allocated with 'atomic or > 'interior. (That is, 'interior is like 'atomic, just as you write, and > not like 'nonatomic.) > > If you need a value that doesn't move and can reference a Racket value, > try `malloc-immobile-cell`. > > Matthew > > At Tue, 1 Jan 2019 10:00:42 -0800 (PST), Ronald Garcia wrote: > > Hello, > > > > I'm trying to better understand how ffi/unsafe works, and I've run into > > something I'm failing to understand. Consider the following code: > > > > #lang racket > > (require ffi/unsafe) > > > > ;; > > ;; cbox-struct.rkt > > ;; > > > > (define-struct data (a b)) > > > > (define (cbox s) > > (define ptr (malloc _racket 'interior)) > > (ptr-set! ptr _racket s) > > ptr) > > > > (define (cunbox cb) > > (ptr-ref cb _racket 0)) > > > > (define cb1 (cbox (make-data 1 2))) > > > > (collect-garbage 'major) > > > > (data-a (cunbox cb1)) > > > > > > If I run this in Dr. Racket 7.1, I get the following error: > > data-a: contract violation; > > given value instantiates a different structure type with the same name > > expected: data? > > given: # > > > > - If I replace 'interior with 'nonatomic, the program successfully > produces > > 1. > > This difference in behaviour surprises me, since the docs for malloc > seem > > to suggest > > (by appeal to the "scheme_malloc" C functions) that interior and atomic > > only differ in > > whether interior pointers are allowed and whether the object is ever > moved. > > > > Any ideas about what's happening here? > > > > Thanks! > > Ron > > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] malloc + structs = ???
Hi Ron, You can't install a Racket value into memory allocated with 'atomic or 'interior. (That is, 'interior is like 'atomic, just as you write, and not like 'nonatomic.) If you need a value that doesn't move and can reference a Racket value, try `malloc-immobile-cell`. Matthew At Tue, 1 Jan 2019 10:00:42 -0800 (PST), Ronald Garcia wrote: > Hello, > > I'm trying to better understand how ffi/unsafe works, and I've run into > something I'm failing to understand. Consider the following code: > > #lang racket > (require ffi/unsafe) > > ;; > ;; cbox-struct.rkt > ;; > > (define-struct data (a b)) > > (define (cbox s) > (define ptr (malloc _racket 'interior)) > (ptr-set! ptr _racket s) > ptr) > > (define (cunbox cb) > (ptr-ref cb _racket 0)) > > (define cb1 (cbox (make-data 1 2))) > > (collect-garbage 'major) > > (data-a (cunbox cb1)) > > > If I run this in Dr. Racket 7.1, I get the following error: > data-a: contract violation; > given value instantiates a different structure type with the same name > expected: data? > given: # > > - If I replace 'interior with 'nonatomic, the program successfully produces > 1. > This difference in behaviour surprises me, since the docs for malloc seem > to suggest > (by appeal to the "scheme_malloc" C functions) that interior and atomic > only differ in > whether interior pointers are allowed and whether the object is ever moved. > > Any ideas about what's happening here? > > Thanks! > Ron -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] malloc + structs = ???
Hello, I'm trying to better understand how ffi/unsafe works, and I've run into something I'm failing to understand. Consider the following code: #lang racket (require ffi/unsafe) ;; ;; cbox-struct.rkt ;; (define-struct data (a b)) (define (cbox s) (define ptr (malloc _racket 'interior)) (ptr-set! ptr _racket s) ptr) (define (cunbox cb) (ptr-ref cb _racket 0)) (define cb1 (cbox (make-data 1 2))) (collect-garbage 'major) (data-a (cunbox cb1)) If I run this in Dr. Racket 7.1, I get the following error: data-a: contract violation; given value instantiates a different structure type with the same name expected: data? given: # - If I replace 'interior with 'nonatomic, the program successfully produces 1. This difference in behaviour surprises me, since the docs for malloc seem to suggest (by appeal to the "scheme_malloc" C functions) that interior and atomic only differ in whether interior pointers are allowed and whether the object is ever moved. Any ideas about what's happening here? Thanks! Ron -- 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. For more options, visit https://groups.google.com/d/optout.