Re: [racket-users] Why is get-impure-port* slower than a system call to curl?

2020-09-16 Thread Stephen Foster
768 real time: 35299 gc time: 0 > > $ racket -e '(require (submod "http-perf.rkt" http-easy))' > cpu time: 1810 real time: 17316 gc time: 70 > > On Mon, Sep 14, 2020 at 12:57 PM Stephen Foster > wrote: > > > > Finally circling back to this issue. I've disabled

Re: [racket-users] Why is get-impure-port* slower than a system call to curl?

2020-09-14 Thread Stephen Foster
usually affects performance. Have you made measurements > when running this code outside of DrRacket? > > - Jon > > > On Tue, Jul 7, 2020 at 2:13 PM Stephen Foster > wrote: > > > > I'm considering using Racket to remake my 3D game CodeSpells. I'm using > http re

[racket-users] Why is get-impure-port* slower than a system call to curl?

2020-07-07 Thread Stephen Foster
I'm considering using Racket to remake my 3D game CodeSpells. I'm using http requests to have Unreal Engine and Racket talk to each other. When I use the http/request library, Racket fires off its GET request much slower than if it were to do a system call to curl. (Same is true if I use

[racket-users] Why is get-pure-port* slower than a system call to curl?

2020-07-07 Thread Stephen Foster
Compared to using curl, the Racket function gives me unacceptably slow performance in the context of a 3D game I'm making (in which the Racket and Unreal Engine runtimes are communicating via HTTP requests). Below is a video to demonstrate the difference. Notice that when the spell lands,

Re: [racket-users] Sandbox + 2htdp/image

2020-05-28 Thread Stephen Foster
you want to use outside the > sandbox. > > Robby > > > On Thu, May 28, 2020 at 5:03 PM Stephen Foster > wrote: > >> I was using the image? predicate as an arbitrary example of something >> you might want to do with an image after extracting it from the sandbox. &

Re: [racket-users] Sandbox + 2htdp/image

2020-05-28 Thread Stephen Foster
1.0 #f) (object:font% #f 'aligned '#(12... On Tue, May 26, 2020 at 4:58 PM Robby Findler wrote: > It might be easiest to just use the `image?` predicate from inside the > sandbox. Get it out the same way you got the image itself out. > > Robby > > > On Tue, May 26, 2020 at 6:22

[racket-users] Sandbox + 2htdp/image

2020-05-26 Thread Stephen Foster
The following returns #f and #t. How can I get it to return #t and #t? Context: I want to allow students to run Racket code on my server. But when I sandbox their code, I am getting back something that doesn't behave like a 2htdp/image object. I'm not exactly sure what it is. #lang racket

Re: [racket-users] cover package?

2020-02-26 Thread Stephen Foster
On further investigation, cover just seems to be broken, older versions install without errors. I'll open a ticket on that repo. On Wed, Feb 26, 2020 at 1:14 PM Stephen Foster wrote: > I have a Dockerized racket app that has (today, I think) started failing > with errors related to the

[racket-users] cover package?

2020-02-26 Thread Stephen Foster
I have a Dockerized racket app that has (today, I think) started failing with errors related to the "cover" package. I don't use cover -- though I assume one of my dependencies does. Adding "cover" explicitly to my info.rkt file doesn't fix the issue. What might be going wrong here? And

[racket-users] My bug or Racket's? Macro + srcdoc = confusion

2020-01-23 Thread Stephen Foster
I ran into a series of confusing Racket things today. Although I've fixed my code, I'm looking for insight. Clearly there are things I don't understand about scribble/srcdoc, and maybe macros in general. I have a macro called define/contract/doc. It lets me do things like this:

Re: [racket-users] Web server + authentication

2020-01-23 Thread Stephen Foster
Philip -- My general thinking is: the more Racket examples in the world, the better. I'd certainly be interested to see how you used continuations to do your one-time-use links. Bogdan -- Lack of examples is also my main blocker when it comes to Koyo. The API docs are good, but I'm one of

[racket-users] Web server + authentication

2020-01-21 Thread Stephen Foster
Ruby on Rails has a nice package called Devise, which handles things like: letting users log into your webapp, letting them reset their passwords, etc. In the Racket ecosystem, I'm struggling even to find examples of managing users. I'm about to start digging here:

Re: [racket-users] Mysterious issue with pict/code

2019-10-08 Thread Stephen Foster
Thanks! On Mon, Oct 7, 2019 at 9:53 AM Matthew Flatt wrote: > Yes, that one (combined with the previous commit). > > At Mon, 7 Oct 2019 09:23:49 -0700, Stephen Foster wrote: > > Awesome! Thanks. :) > > > > Just for my own curiosity, is it this commit or a dif

Re: [racket-users] Mysterious issue with pict/code

2019-10-07 Thread Stephen Foster
air. > > At Sat, 5 Oct 2019 15:33:31 -0400, Sam Tobin-Hochstadt wrote: > > This definitely seems like a bug. Here's a smaller program that shows it: > > > > #lang racket > > (begin-for-syntax > > (dynamic-require 'pict/code #f)) > > > > Sam > > &g

[racket-users] Mysterious issue with pict/code

2019-10-05 Thread Stephen Foster
I spent a few hours tracking down a mysterious bug. Although I've fixed it, I still don't understand it. I would appreciate some insight from those who understand these things better. Here's the simple reproduction: *main.rkt*: #lang racket (define-syntax (test stx) (dynamic-require

[racket-users] Re: Amazon Mechanical Turk library/package in racket

2019-09-12 Thread Stephen Foster
+1 This has been on my Racket wish-list for a while. I just haven't had a chance to put something together. But I've done a lot of work with Turk and its APIs in the past, so if someone were to start a project, I'd be happy to help out with it... On Wednesday, September 11, 2019 at 12:32:53

Re: [racket-users] Racket News - Issue 14

2019-08-22 Thread Stephen Foster
-driven initiatives like this newsletter? For example: certs and hosting costs. Or does it just come out of individual pockets? On Wed, Aug 21, 2019 at 11:43 AM Annaia Berry wrote: > the SSL cert seems to have expired the other day. > > On Wed, Aug 21, 2019 at 8:37 PM Stephen Foster

Re: [racket-users] Racket News - Issue 14

2019-08-21 Thread Stephen Foster
My browser is telling me that the SSL certificate for racket-news.com is invalid. Is it just me? On Monday, August 19, 2019 at 7:54:54 AM UTC-7, Stephen De Gabrielle wrote: > > Thank you Paulo! > Another awesome issue of Racket News. > > S. > > > > > On Fri, Aug 16, 2019 at 9:49 PM Paulo

[racket-users] Re: on-boarding new racketeers

2019-08-13 Thread Stephen Foster
+1 Thanks for thinking about this. I'll start moving some of my repos in this direction. On Monday, August 12, 2019 at 7:52:37 AM UTC-7, Stephen De Gabrielle wrote: > > Hi, > > I've been thinking about small things that can be done to lower the > barriers to entry to the racket community, and

[racket-users] Re: [standard-fish] Lightsabers!

2019-07-31 Thread Stephen Foster
Wow! Nice. I'll show this to the students taking my "Coding for Star Wars Fans" summer camp :) Thanks for doing this! On Tuesday, July 30, 2019 at 1:06:25 PM UTC-7, Justin Zamora wrote: > > Stephen De Gabrielle announced this a few days ago on racket-dev, so I > spent my weekend embracing my

Re: [racket-users] FFI bug?

2019-05-28 Thread Stephen Foster
Matthew Flatt, thanks for popping in and saving the day. :) On Mon, May 27, 2019 at 4:34 PM Stephen Foster wrote: > In putting together the Racket bindings for the latest Chipmunk 7 physics > engine, I think I may have found a bug in the FFI libs. > > I had originally thought it w

[racket-users] FFI bug?

2019-05-27 Thread Stephen Foster
In putting together the Racket bindings for the latest Chipmunk 7 physics engine, I think I may have found a bug in the FFI libs. I had originally thought it was a problem with Chipmunk, so I posted about it over there: https://github.com/slembcke/Chipmunk2D/issues/183 But as I did more

Re: [racket-users] Re: Online IDE’s for Racket ?

2019-05-24 Thread Stephen Foster
>> Yes - WeScheme is awesome - and so is > >>> http://pasterack.org > >>> > >>> Suggestion: upvote racket on repl.it so you can run it from > everywhere: > >>> > >>> https://repl.it/language-requests/p/racke

[racket-users] Re: Racket News - Issue 7

2019-05-02 Thread Stephen Foster
Yes! Years ago, "Automata via Macros" was the paper that helped me see that macros are cool. :) Thanks for including that. I've been enjoying these Racket News issues! On Wednesday, May 1, 2019 at 7:21:56 AM UTC-7, Paulo Matos wrote: > > Issue 7 is here. > >

[racket-users] Re: Online IDE’s for Racket ?

2019-04-24 Thread Stephen Foster
Wow! This is is cool. Also +1 -- since I'm interested in this very topic and curious to know what's out there. P.S. You probably already know about wescheme.org, right? On Tuesday, April 23, 2019 at 5:17:40 AM UTC-7, Stephen De Gabrielle wrote: > > Hi > > I found that you can run DrRacket on

Re: [racket-users] Re: raco setup conflicting with slideshow

2019-04-09 Thread Stephen Foster
P.S. I guess it's mainly just the para, item, and subitem functions. The rest of the text functions (e.g. (tt ...)) seem pretty straightforward to get pict to do -- and in many cases the pict translation is specified in the docs. On Tue, Apr 9, 2019 at 2:57 PM Stephen Foster wrote: > Tha

Re: [racket-users] Re: raco setup conflicting with slideshow

2019-04-09 Thread Stephen Foster
/slideshow/Primary_Slide_Functions.html None of them seem to be provided by pict. On Tue, Apr 9, 2019 at 12:55 PM Matthew Flatt wrote: > At Tue, 9 Apr 2019 14:50:15 -0400, Matt Jadud wrote: > > On Tue, Apr 9, 2019 at 2:44 PM Stephen Foster > > wrote: > > > > > >

Re: [racket-users] Re: raco setup conflicting with slideshow

2019-04-09 Thread Stephen Foster
Thanks, Ben. The weird thing is that (require slideshow) doesn't cause problems when I run that file in Racket, or when I the docs with scribble. It's only a problem when I use raco setup. My assumption is that raco setup is supposed to build my docs in the same way I could have done myself

[racket-users] Re: raco setup conflicting with slideshow

2019-04-08 Thread Stephen Foster
P.S. Sorry about the formatting there. Part of my brain must have thought I was writing markdown. On Monday, April 8, 2019 at 3:49:55 PM UTC-7, Stephen Foster wrote: > > I ran into the following bewildering error from `raco setup` and I was > wondering if anyone knows what's going. &

[racket-users] raco setup conflicting with slideshow

2019-04-08 Thread Stephen Foster
I ran into the following bewildering error from `raco setup` and I was wondering if anyone knows what's going. Here's a simple way to reproduce: ``` my-project scribblings/my-project.scrbl util.rkt ``` In the scribble file: ``` #lang scribble/manual @require["../util.rkt"] ``` And in

Re: [racket-users] Help with pretty printing

2019-04-04 Thread Stephen Foster
8def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29 > > ? > > I’m pretty sure that what you want is not in there, but you should take a > look anyway. > > John > > > > On Apr 2, 2019, at 3:47 PM, Stephen Foster > wrote: > > > > Hi all, > &g

[racket-users] Help with pretty printing

2019-04-02 Thread Stephen Foster
Hi all, Suppose, I have a datum that represents valid racket code, like '(test #:a a #:b b #: c). I'd love to render (arbitrarily deeply nested) datums like this to a string that displays like this: (test #:a a #:b b #:c c) Pretty printing almost works: (displayln (pretty-format

Re: [racket-users] Can someone help me solve a raco mystery?

2019-03-25 Thread Stephen Foster
/racket/racket/blob/master/racket/collects/pkg/private/install.rkt#L128 > so it shows all the fields of the pkg-desc instead of showing only the name. > > The definition is > (struct pkg-desc (source type name checksum auto? extra-path)) > > Gustavo > > > -- Stephen Fost

[racket-users] Can someone help me solve a raco mystery?

2019-03-21 Thread Stephen Foster
Hi, I'm running into weird, intermittent behavior with raco update. Occasionally, I will run: raco pkg update --deps search-auto --update-deps PACKAGE-A Near the beginning of the log, I see something like this: The following out-of-date packages are listed as dependencies of PACKAGE-A and

Re: [racket-users] Cannot instantiate `racket/gui/base' a second time in the same process

2019-02-11 Thread Stephen Foster
ike this one. > > Robby > > > On Mon, Feb 11, 2019 at 4:43 PM Stephen Foster > wrote: > > > > I've gotten this error many times when building docs. Some google > searching gives me the impression that it's a known issue. Usually, I just > refactor my code so that

[racket-users] Cannot instantiate `racket/gui/base' a second time in the same process

2019-02-11 Thread Stephen Foster
I've gotten this error many times when building docs. Some google searching gives me the impression that it's a known issue. Usually, I just refactor my code so that racket/gui doesn't get required, and everything is fine. Is there another workaround, though? There was some functionality

[racket-users] Need Help with "Poisonous Chipmunks"

2018-12-06 Thread Stephen Foster
Dear Racket community, I need your help. Once upon a time, I was looking for a Racket physics engine. I looked around and found a few different bindings from Racket to the Chipmunk physics engine. However, none of these repositories appeared to be maintained. None of them used the latest

Re: [racket-users] Fun with Physics: Racket FFI Question (Bug?)

2018-09-18 Thread Stephen Foster
Thanks, this is super helpful. :) On Monday, September 17, 2018 at 9:58:06 AM UTC-7, Matthew Flatt wrote: > > At Mon, 17 Sep 2018 09:34:46 -0700 (PDT), Stephen Foster wrote: > > But when I have two bodies that share the same velocity_func, I get a > > segfault

[racket-users] Fun with Physics: Racket FFI Question (Bug?)

2018-09-17 Thread Stephen Foster
I'm trying to get the Chipmunk Physics library integrated with Racket. I've made some progress (https://www.youtube.com/watch?v=GjvLaP7I0gg), but I need to ask for some input on an issue. The Chipmunk C library provides a primitive called a "cpBody" (i.e. a moving thing). A cpBody struct has

[racket-users] Chipmunk physics

2018-09-10 Thread Stephen Foster
Physics engines are cool! ...which is why I'm super excited about the fact that there are (or were) bindings for the Chipmunk physics library. The only issues are: 1) I can't get it to work, 2) I don't know a lot about C, 3) I don't know a lot about Racket's FFI. I've posted an issue on the

[racket-users] Redex: custom rendering of metafunctions

2018-08-05 Thread Stephen Foster
I see metafunction->pict. It's basically what I want for a game I'm designing. It renders metafunction like this: However, I was wondering if there's a way

Re: [racket-users] DrRacket prefs?

2018-05-24 Thread Stephen Foster
preferences:set-default 'drracket:show-line-numbers? #t boolean?) > (preferences:set 'drracket:show-line-numbers? #t) > > Robby > > > On Thu, May 24, 2018 at 1:35 PM, Stephen Foster <step...@thoughtstem.com> > wrote: > > Nice! I'll try that! > > > > On Thu

Re: [racket-users] DrRacket prefs?

2018-05-24 Thread Stephen Foster
> > (plt:framework-pref:framework:display-line-numbers #t) > > I don't know if directly copying the pref file to another computer > would work but perhaps worth a try. > > > On Thu, May 24, 2018 at 12:28 PM, Stephen Foster > <step...@thoughtstem.com> wrote: > > Hi, > >

[racket-users] DrRacket prefs?

2018-05-24 Thread Stephen Foster
Hi, I know how to hide/show line numbers from within DrRacket's GUI. But is there a way to toggle this from the command line? I have a few hundred computers with DrRacket installed, and I want to make them all show line numbers by default. (I'd rather not do it by hand.) Is there a command

[racket-users] Edmond's Blossom Algorithm

2018-05-24 Thread Stephen Foster
Sounds like a variation on the Stable Roommate problem? https://en.m.wikipedia.org/wiki/Stable_roommates_problem?wprov=sfla1 -- 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

[racket-users] Student code metrics

2018-05-13 Thread Stephen Foster
Hi! I was about to start building a tool for statically analyzing student code. But I first want to ask if there's related work out there. I'm interested in relatively simple stuff -- e.g. How many functions did the student write? How many expressions? What's the average nesting depth of

Re: [racket-users] Re: Blockly-Like Interface in DrRacket

2018-05-01 Thread Stephen Foster
only really doable by > scraping and replacing raw text. > > ~Leif Andersen > > > On Fri, Apr 27, 2018 at 3:03 PM, Stephen Foster <step...@thoughtstem.com> > wrote: > > Actually, I figured it out myself. For the curious: > > > > What I ended up doing was i

[racket-users] Re: Blockly-Like Interface in DrRacket

2018-04-27 Thread Stephen Foster
GAs/s1600/Screen%2BShot%2B2018-04-27%2Bat%2B11.52.09%2BAM.png> I'm planning to use this at ThoughtSTEM to help transition novices smoothly from block-based coding to traditional coding. On Thursday, April 26, 2018 at 2:33:35 PM UTC-7, Stephen Foster wrote: > > I finally had some time to

[racket-users] Re: Blockly-Like Interface in DrRacket

2018-04-26 Thread Stephen Foster
nd swaps all B-expressions for their associated S-expressions. Any ideas, pointers, references, etc. would all be appreciated. Thanks in advance! On Wednesday, December 27, 2017 at 8:30:16 PM UTC-8, Stephen Foster wrote: > > If I wanted to build a drag-and-drop, visual programming interfac

Re: [racket-users] big-bang + right click?

2018-02-18 Thread Stephen Foster
Cool! I was able to get it working with Lux. Thanks! On Saturday, February 17, 2018 at 9:34:19 AM UTC-8, Jay McCarthy wrote: > > FWIW Stephen, I have another package called `lux` that tries to be a > "professional" big-bang and it supports stuff like this. > > The documentation is here:

Re: [racket-users] big-bang + right click?

2018-02-16 Thread Stephen Foster
ivers the mouse event > as an fourth argument. > > If you need this today, you will need to use Racket’s GUI toolbox > directly. > > > > On Feb 15, 2018, at 6:54 PM, Stephen Foster <ste...@thoughtstem.com > > wrote: > > Is there a way to differentiate betw

[racket-users] big-bang + right click?

2018-02-15 Thread Stephen Foster
Is there a way to differentiate between left and right click with a big-bang on-mouse handler? Or if not, is there some workaround I can use to detect right clicks? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this

Re: [racket-users] Blockly-Like Interface in DrRacket

2018-01-03 Thread Stephen Foster
ing me if you have any questions. > > [1]: https://docs.racket-lang.org/embedded-gui/index.html > [2]: https://github.com/videolang/idmt > [3]: https://lang.video > [4]: > https://github.com/videolang/video/blob/master/video/private/editor.rkt > > ~Leif Andersen > > On

Re: [racket-users] Blockly-Like Interface in DrRacket

2018-01-01 Thread Stephen Foster
* Pasteboard(editor): http://docs.racket-lang.org/gui/pasteboard_.html > > > On Thu, 28 Dec 2017 at 04:30, Stephen Foster <ste...@thoughtstem.com > > wrote: > >> If I wanted to build a drag-and-drop, visual programming interface for >> programming in DrRacket, is

[racket-users] Blockly-Like Interface in DrRacket

2017-12-27 Thread Stephen Foster
If I wanted to build a drag-and-drop, visual programming interface for programming in DrRacket, is there any prior work I can build on? Ideally, I'd like to implement this as a DrRacket "snip", so that my students can make programs that are partially text-based and partially visual. Any