Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-30 Thread Brian Beckman
Here are some of my latest (failed) experiments: #lang racket (require (for-syntax racket/struct-info)) (require racket/pretty) (struct foo (a b) #:transparent) (displayln `("a foo object is transparent: I can see inside: \n (struct->vector (foo 1 2)) ~~> " ,(struct->vector (foo

Re: [racket-users] Adding keybindings to debug

2021-10-30 Thread David Storrs
The menu strings get very fussy, so check that you entered it exactly right, and do a very simple one to start. That's the usual cause in my experience. On Sat, Oct 30, 2021, 7:25 AM Mike Engelhart wrote: > On Mac OS I tried adding keyboard shortcuts using the linked Apple support > document to

Re: [racket-users] Adding keybindings to debug

2021-10-30 Thread Mike Engelhart
On Mac OS I tried adding keyboard shortcuts using the linked Apple support document to allow for comment/uncomment bindings in DrRacket and it doesn't work (at least on Mac OS Monterey). One thing I noticed is that if you go back to System Preferences->Keyboard->Shortcuts->App Shortcuts and look

Re: [racket-users] Adding keybindings to debug

2021-10-30 Thread Laurent
On Fri, Oct 29, 2021 at 10:47 PM James Zollinger wrote: > Thank you both for the thoughtful answers. I will take a look at the > quickscript you sent, Laurent. The mac keyboard shortcut is a great > feature. Makes me wonder about buying a mac again after quite a few years. > (I use debian as my

Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-29 Thread Siddhartha Kasivajhula
I was able to find this interface , but it doesn't quite provide the same information. E.g. (struct-type-info struct:foo) The ability to "introspect" values in a shell (or in the

Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-29 Thread Brian Beckman
Well, as I understand it, a struct (usually? always?), #:transparent or not, when declared, defines symbols that are meant to be visible in the current scope, so (struct foo (a b)) defines foo #|constructor|#, foo? #|instance-predicate|# foo-a and foo-b #|data accessors|# , that I can call on

Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-29 Thread 'John Clements' via Racket Users
In the text below, you refer to the “public” interface. Can I ask what you mean by “public” in this context? John > On Oct 29, 2021, at 11:16 AM, Brian Beckman wrote: > > I believe that run time will be the most plausible use case. I may write > macros that refer to struct-procedure names at

Re: [racket-users] Adding keybindings to debug

2021-10-28 Thread David Storrs
I don't know if this fills the need but it's a useful thing to know regardless: macOS will allow you to add a keyboard shortcut for any menu item in any application. https://support.apple.com/guide/mac-help/create-keyboard-shortcuts-for-apps-mchlp2271/mac On Thu, Oct 28, 2021 at 1:10 PM James

Re: [racket-users] Adding keybindings to debug

2021-10-28 Thread Laurent
There may be a better way to do it, but here's at least a working solution: https://gist.github.com/Metaxal/5c91eddafb86bb0c06b4d8322ad53045 It's a quickscript (https://docs.racket-lang.org/quickscript/index.html) so it gives you a new submenu in the Scripts menu, with associated keybindings:

Re: [racket-users] Re: Typing lag with DrRacket on Linux

2021-10-28 Thread evdubs
Resurrecting this old thread. This issue should now be resolved with this commit: https://github.com/racket/gui/commit/20e589c091998b0121505e25c7ff2f95e8116dcb No need to use PLT_DISPLAY_BACKING_SCALE with this fix. Evan On Thursday, May 28, 2020 at 4:18:44 AM UTC-10 evdubs wrote: > I

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-27 Thread Jon Zeppieri
https://github.com/97jaz/datetime-lib On Wed, Oct 27, 2021 at 10:05 AM 'Joel Dueck' via Racket Users wrote: > > On Tuesday, October 26, 2021 at 1:39:21 PM UTC-5 zepp...@gmail.com wrote: >> >> To the extent that validation is a concern, gregor is (despite the >> `tz/c` issue) much better, on the

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-27 Thread 'Joel Dueck' via Racket Users
On Tuesday, October 26, 2021 at 1:39:21 PM UTC-5 zepp...@gmail.com wrote: > To the extent that validation is a concern, gregor is (despite the > `tz/c` issue) much better, on the whole, than racket/base's `date` and > `date*` structs, which will happily let you construct things like "the >

Re: [racket-users] Typesetting Redex definitions

2021-10-26 Thread Mallku Ernesto Soldevila Raffa
Thank you very much for the information provided! We have a lot to experiment with. Regards, Mallku El martes, 26 de octubre de 2021 a las 18:40:49 UTC-3, Robby Findler escribió: > The only way to do that currently is to use the compound rewriters (they > rewrite anything with parens) and the

Re: [racket-users] Typesetting Redex definitions

2021-10-26 Thread Robby Findler
The only way to do that currently is to use the compound rewriters (they rewrite anything with parens) and the atomic rewriters (they rewrite anything without parens). The interface that redex provides is pretty low-level and I'd like to find time to improve it, but in the meantime there are some

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread Jon Zeppieri
On Tue, Oct 26, 2021 at 2:18 PM 'Joel Dueck' via Racket Users wrote: > > > > On Tuesday, October 26, 2021 at 12:30:59 PM UTC-5 Sage Gerard wrote: >> >> Yes, but I'm talking about code we were asked to give feedback on. I focus >> on `tz/c` because it is documented as a flat contract that checks

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread 'Joel Dueck' via Racket Users
On Tuesday, October 26, 2021 at 12:30:59 PM UTC-5 Sage Gerard wrote: > Yes, but I'm talking about code we were asked to give feedback on. I focus > on `tz/c` because it is documented as a flat contract that checks for "an > identifier from the IANA tz database

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread Philip McGrath
On Tue, Oct 26, 2021 at 1:30 PM Sage Gerard wrote: > > Jon: I'm guessing you haven't actually tried this > > Phillip: I guess the check doesn't happen as part of `tz/c`, but I can > tell you that this program > > Yes, but I'm talking about code we were asked to give feedback on. I focus > on

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread Sage Gerard
> The timezone database lookup logic is in the `tzinfo` package > (https://docs.racket-lang.org/tzinfo/index.html) Thanks. > Jon: I'm guessing you haven't actually tried this > Phillip: I guess the check doesn't happen as part of `tz/c`, but I can tell > you that this program Yes, but I'm

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread 'Joel Dueck' via Racket Users
On Tuesday, October 26, 2021 at 11:01:38 AM UTC-5 Sage Gerard wrote: > >- Assuming I have the right repository link, gregor's tz/c contract is >only (or/c string? (integer-in -64800 64800)) [1]. I can set the >feed-timezone parameter in Splitflap to an arbitrary string and the guard

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread Jon Zeppieri
On Tue, Oct 26, 2021 at 12:01 PM Sage Gerard wrote: > > I can understand wanting gregor for timezone offsets when constructing > moments, but... > > Assuming I have the right repository link, gregor's tz/c contract is only > (or/c string? (integer-in -64800 64800)) [1]. I can set the

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread Philip McGrath
On Tue, Oct 26, 2021 at 12:01 PM Sage Gerard wrote: > >- The IANA's timezone database changed this month, and gregor's last >commit was 2 years ago. > > My comment was not meant to say that timezone math is easy to replace, or > even that gregor isn't a fit. It's to say that I'm not

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread Sage Gerard
I can understand wanting gregor for timezone offsets when constructing moments, but... - Assuming I have the right repository link, gregor's tz/c contract is only (or/c string? (integer-in -64800 64800)) [1]. I can set the feed-timezone parameter in Splitflap to an arbitrary string and the

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread David Storrs
On Mon, Oct 25, 2021 at 10:25 PM 'Joel Dueck' via Racket Users < racket-users@googlegroups.com> wrote: > > >- Removing dependencies: yes, I see the appeal. I’m really not eager >to reimplement all the timezone handling and temporal comparison stuff in >gregor, though. > > Joel >

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread 'Joel Dueck' via Racket Users
On Tuesday, October 26, 2021 at 6:51:56 AM UTC-5 Philip McGrath wrote: > I'm not totally clear about all of the different sets of requirements > (RSS, Atom, and, de facto, Apple), but I thought there were more language > codes permitted than ISO 639-1 (e.g. >

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-26 Thread Philip McGrath
Excited to try this! Generating Atom and RSS feeds is on the to-do list for one of my current projects. On Mon, Oct 25, 2021 at 10:25 PM 'Joel Dueck' wrote: > >- MIME types: Yes, I should use/add a more complete extension→type >mapping, though I probably will continue not to validate

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-25 Thread 'Joel Dueck' via Racket Users
Great feedback, thank you. I like all your suggestions. - Boolean arguments: great point, will do - MIME types: Yes, I should use/add a more complete extension→type mapping, though I probably will continue not to validate MIME types against the IANA list. (My somewhat erroneous note

Re: [racket-users] [ANN] Splitflap: generating valid Atom and RSS feeds

2021-10-25 Thread Sage Gerard
Thank you for this!! Feedback - I like your podcast-specific entries - The validation logic is refreshing to see - Re: boolean arguments, I'd stick to keyword arguments and ask for any/c, not boolean?, in contracts. That way forms like (and ... (member ...)) won't bug users about a

Re: [racket-users] Weird test failures

2021-10-24 Thread 'Joel Dueck' via Racket Users
Dang it, I think you’re right. Known gotcha it is, and a rookie one at that. Thanks for taking time to look at it! On Sunday, October 24, 2021 at 1:04:03 PM UTC-5 Sage Gerard wrote: > I got all tests to pass by updating the first clause of pre-escape to use > equal? > > > (and (txexpr? x)

Re: [racket-users] Weird test failures

2021-10-24 Thread Sage Gerard
I got all tests to pass by updating the first clause of pre-escape to use equal? > (and (txexpr? x) (equal? "text" (attr-ref x 'type #f))) My hypothesis is that when you didn't have bytecode, the reference to the literal string "text" just happened to be eq?. I couldn't say why. On 10/24/21

Re: [racket-users] How to require untrusted module?

2021-10-23 Thread Matthew Flatt
Yes, ou can use `dynamic-require` with a limited code inspector like this: (parameterize ([current-code-inspector (make-inspector)]) (dynamic-require 'untrusted-foo 'foo-provided-name)) At Fri, 22 Oct 2021 12:42:58 -0700 (PDT), "kalime...@gmail.com" wrote: > Thank you! > > Is it possible

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-23 Thread unlimitedscolobb
On Friday, October 22, 2021 at 6:45:18 PM UTC+2 david@gmail.com wrote: > On Thu, Oct 21, 2021 at 5:26 AM George Neuner wrote: > >> >> On 10/20/2021 5:53 PM, unlimitedscolobb wrote: >> >> >> > You can get a lot of mileage out of the 'set' datatype, which removes > ordering from the equation,

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-23 Thread unlimitedscolobb
On Thursday, October 21, 2021 at 11:26:16 AM UTC+2 gneuner2 wrote: > > On 10/20/2021 5:53 PM, unlimitedscolobb wrote: > > I have two main use cases for producing an ordered list from a hash table: > > 1. A canonical way to pretty print a hash table: In my projects, I carry > around and print

Re: [racket-users] M1 Mac exe SSL error

2021-10-22 Thread Mike Engelhart
Hi Matthew Thanks for the fast reply! Well I have to apologize - I had skipped the "dist" step. For some reason I assumed incorrectly the dist was if you were building for another OS vs hardware architecture. I ran your test as well and it worked perfectly. Thanks again! Mike On Fri,

Re: [racket-users] M1 Mac exe SSL error

2021-10-22 Thread Matthew Flatt
At Fri, 22 Oct 2021 17:24:30 -0400, Mike Engelhart wrote: > I wanted to build a binary to send to a colleague to test it (who > isn't a programmer and doesn't have Racket installed) but when I > build it on my intel Macbook Pro and then send it to my M1 iMac That should work. I tried this small

Re: [racket-users] How to require untrusted module?

2021-10-22 Thread kalime...@gmail.com
Thank you! Is it possible to safely load untrusted module with dynamic-require? пятница, 22 октября 2021 г. в 22:59:57 UTC+5, Robby Findler: > On Fri, Oct 22, 2021 at 12:43 PM Matthew Flatt wrote: > >> At Thu, 21 Oct 2021 07:37:12 -0700 (PDT), "kalime...@gmail.com" wrote: >> > I've read about

Re: [racket-users] How to require untrusted module?

2021-10-22 Thread Robby Findler
On Fri, Oct 22, 2021 at 12:43 PM Matthew Flatt wrote: > At Thu, 21 Oct 2021 07:37:12 -0700 (PDT), "kalime...@gmail.com" wrote: > > I've read about protect-out and current-code-inspector, but I still > cannot > > understand, how to require a module and forbid it to run protected > modules. > > >

Re: [racket-users] How to require untrusted module?

2021-10-22 Thread Matthew Flatt
At Thu, 21 Oct 2021 07:37:12 -0700 (PDT), "kalime...@gmail.com" wrote: > I've read about protect-out and current-code-inspector, but I still cannot > understand, how to require a module and forbid it to run protected modules. > > Something like (require untrusted-foo) (foo-proc) but to forbid

Re: [racket-users] How to require untrusted module?

2021-10-22 Thread David Storrs
I'd be interested to know this as well. It sounds like something that isn't possible in Racket, since it's essentially specifying how a module can do its job and that requires a level of introspection that I think is excluded by design. On Thu, Oct 21, 2021 at 10:37 AM kalime...@gmail.com

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-22 Thread David Storrs
On Thu, Oct 21, 2021 at 5:26 AM George Neuner wrote: > > On 10/20/2021 5:53 PM, unlimitedscolobb wrote: > > > You can get a lot of mileage out of the 'set' datatype, which removes ordering from the equation, especially since lists will act as sets in a pinch. (When you want to improve

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-21 Thread George Neuner
On 10/20/2021 5:53 PM, unlimitedscolobb wrote: I have two main use cases for producing an ordered list from a hash table: 1. A canonical way to pretty print a hash table: In my projects, I carry around and print out hash tables a lot, so I like the elements to appear in the same order all

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-20 Thread unlimitedscolobb
Hi, Thank you George for your answer. On Wednesday, October 13, 2021 at 5:37:39 PM UTC+2 gneuner2 wrote: > > On 10/12/2021 7:01 PM, unlimitedscolobb wrote: > > I wrote myself this little function: > > > > (define (hash->ordered-list h) > > (hash-map h cons #t)) > > > > which uses the

Re: [racket-users] Re: Escape continuations for fussy code

2021-10-20 Thread Ryan Kramer
I guess I'll pile on too. My approach was `let++` which I rename to `let*` because (I think) it is backwards compatible. The pattern for early exit is `#:break (when test-expr result-expr)` so the previous example would look like this: (let* (#:break (when (not (foo? x)) #f)

Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Hendrik Boom
On Tue, Oct 19, 2021 at 11:07:58AM -0700, Sorawee Porncharoenwase wrote: > On Tue, Oct 19, 2021 at 7:01 AM Diego Crespo > mycontributiontothewo...@gmail.com > wrote: > > If you are curious about what the output looked like before, here is the > >

Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Sorawee Porncharoenwase
On Tue, Oct 19, 2021 at 7:01 AM Diego Crespo mycontributiontothewo...@gmail.com wrote: If you are curious about what the output looked like before, here is the > pasterack link of some of my code http://pasterack.org/pastes/23639. > Racket

Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Diego Crespo
If you are curious about what the output looked like before, here is the pasterack link of some of my code http://pasterack.org/pastes/23639. Racket supports using brackets instead of parenthesis, but you typically only see it used in things like cond and let expressions. This was adding them

Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-19 Thread Hendrik Boom
When I read this: > On Mon, Oct 18, 2021 at 6:14 PM Diego Crespo < > mycontributiontothewo...@gmail.com> wrote: > > > This is really cool. Between this, a Racket linter, and an LSP, Racket is > > seriously looking a lot better for larger teams. I ran it through some of > > my code and I'm

Re: [racket-users] Rationale for package structure

2021-10-19 Thread schle...@gmail.com
But you can also define two single collection packages that use the same `(define collection "...")` within the info.rkt. And that allows you to add modules with single collection packages. Only tested locally but seems to work. ded...@gmail.com schrieb am Donnerstag, 14. Oktober 2021 um

Re: [racket-users] Re: [ANN] fmt: a Racket code formatter

2021-10-18 Thread Sorawee Porncharoenwase
Don't get used to it. It's a bug! Fixed in https://github.com/sorawee/fmt/commit/e056aee1e9a3ea0a72a4c85075426fa76f037852. Thanks for the report! On Mon, Oct 18, 2021 at 6:14 PM Diego Crespo < mycontributiontothewo...@gmail.com> wrote: > This is really cool. Between this, a Racket linter, and

Re: [racket-users] Rationale for package structure

2021-10-14 Thread Eric Griffis
It's been a while since I created a new package, but as of ~1 year ago, another advantage (or perhaps the same, from a different angle) of the multi-collection format was that it allowed third parties to add modules to the collections I defined. Eric On Sat, Oct 9, 2021, 1:58 PM 'Joel Dueck'

Re: [racket-users] rename-out not working as expected

2021-10-14 Thread jackh...@gmail.com
static-rename compiles down to something totally different, actually. It uses the 'inferred-name syntax property to get the Racket compiler to choose a

Re: [racket-users] Rationale for package structure

2021-10-14 Thread jackh...@gmail.com
I don't bother with the splitting because it's a *lot* of maintenance headache for little gain. My opinion is that we should take the collective effort we've poured into splitting packages and instead direct it at improving the compiler and package system to do a better job of automating this

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-13 Thread George Neuner
On 10/12/2021 7:01 PM, unlimitedscolobb wrote: I wrote myself this little function: (define (hash->ordered-list h)   (hash-map h cons #t)) which uses the try-order? argument of hash-map. Is there a reason for hash->list not have an optional argument try-order?  Or perhaps having such a

Re: [racket-users] hash->list with try-order? (like hash-map)

2021-10-13 Thread George Neuner
On 10/12/2021 7:01 PM, unlimitedscolobb wrote: I wrote myself this little function: (define (hash->ordered-list h)   (hash-map h cons #t)) which uses the try-order? argument of hash-map. Is there a reason for hash->list not have an optional argument try-order?  Or perhaps having such a

Re: [racket-users] rename-out not working as expected

2021-10-12 Thread David Storrs
Okay, good. Thanks for the library recommendation; I'll probably use that in the future where I need to rename/provide multiple things, but given that there's only one I did this instead in order to avoid having another dependency: (provide do-it) (define do-it (procedure-rename do-something

Re: [racket-users] rename-out not working as expected

2021-10-12 Thread 'William J. Bowman' via Racket Users
I think this is the expected behaviour of `rename-out`; you might want this library to change the dynamic displayed name: https://docs.racket-lang.org/static-rename/index.html -- William J. Bowman On Tue, Oct 12, 2021 at 03:07:13PM -0400, David Storrs wrote: > --- > ; test.rkt >

Re: [racket-users] Rationale for package structure

2021-10-10 Thread Sam Phillips
The --binary flag only works for the current release with the default catalog iirc. Cheers, Sam On Sat, Oct 9, 2021, 11:58 Sorawee Porncharoenwase wrote: > I think it's so that `raco pkg install mypkg-lib` won't install > `racket-doc` if you use Minimal Racket? > > If you don't split `mypkg`

Re: [racket-users] Rationale for package structure

2021-10-09 Thread 'Joel Dueck' via Racket Users
Ah I see! So is there some heuristic for when you should try to play nice with Minimal Racket? Is it, ideally, “always”? Or is it mainly if you’re likely to be using the package on a server, CI, etc? On Saturday, October 9, 2021 at 1:58:33 PM UTC-5 sorawe...@gmail.com wrote: > I think it's so

Re: [racket-users] Rationale for package structure

2021-10-09 Thread Sorawee Porncharoenwase
I think it's so that `raco pkg install mypkg-lib` won't install `racket-doc` if you use Minimal Racket? If you don't split `mypkg` to `mypkg-lib` and `mypkg-doc`, but specify `deps` and `build-deps` correctly, `raco pkg install --binary mypkg` won't pull in `racket-doc` either. I don't know when

Re: [racket-users] Having trouble getting documentation to generate

2021-10-08 Thread Matthew Flatt
I've adjusted pkgs.racket-lang.org to fix a problem with fetching the pkg-build status from pkg-build.racket-lang.org. That is, packages were being built and documentation was incorporated into docs.racket-lang.org, but pkgs.racket-lang.org wasn't reflecting that. (I didn't do more than try to

Re: [racket-users] Having trouble getting documentation to generate

2021-10-08 Thread Sorawee Porncharoenwase
And while we are at the package website issue, can someone please take a look at my PR to fix the blank package bug ( https://github.com/racket/pkg-index/pull/29)? On Fri, Oct 8, 2021 at 11:00 AM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Here’s additional information: I

Re: [racket-users] Having trouble getting documentation to generate

2021-10-08 Thread Sorawee Porncharoenwase
Here’s additional information: I uploaded pprint-compact on September 22. https://pkgs.racket-lang.org/ briefly shows the documentation for a few days. But after a package update around September 26, the website no longer lists the documentation. The doc is still actually available at

Re: [racket-users] Having trouble getting documentation to generate

2021-10-08 Thread Siddhartha Kasivajhula
Looks like the try-catch package docs still aren't showing up . This might be a broader issue with the package index and docs, since I just renamed one of my packages that already had docs, and the docs now no longer exist on the package index

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

2021-10-08 Thread Paulo Matos
Stephen De Gabrielle writes: > Thank you Paulo for another great issue. > > I must put it *on the record* that the contributor of the 'run guile in Dr > Racket' is actually Laurent Orseau. Thanks for clearing that up. In any case, Laurent has also suggested the example to use with the

Re: [racket-users] Restarting loop from exception handler breaks with-handlers, Ctrl+C?

2021-10-07 Thread 'William J. Bowman' via Racket Users
Ah of course, thanks! On Thu, Oct 07, 2021 at 05:52:55PM -0700, Sorawee Porncharoenwase wrote: > Typo: with-handlers* > > On Thu, Oct 7, 2021 at 5:52 PM Sorawee Porncharoenwase < > sorawee.pw...@gmail.com> wrote: > > > I think you want with-handler*? According to the docs: > > > >

Re: [racket-users] Restarting loop from exception handler breaks with-handlers, Ctrl+C?

2021-10-07 Thread Sorawee Porncharoenwase
Typo: with-handlers* On Thu, Oct 7, 2021 at 5:52 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > I think you want with-handler*? According to the docs: > > with-handlers: > > Before any predicate or handler procedure is invoked, the continuation of > the entire with-handlers >

Re: [racket-users] Restarting loop from exception handler breaks with-handlers, Ctrl+C?

2021-10-07 Thread Sorawee Porncharoenwase
I think you want with-handler*? According to the docs: with-handlers: Before any predicate or handler procedure is invoked, the continuation of the entire with-handlers

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

2021-10-07 Thread Stephen De Gabrielle
Thank you Paulo for another great issue. I must put it *on the record* that the contributor of the 'run guile in Dr Racket' is actually Laurent Orseau. bw s. On Thu, Oct 7, 2021 at 3:55 PM Paulo Matos wrote: > Hello all, > > Issue 54 is finally here: >

Re: [racket-users] using neg-propositions in partition?

2021-10-05 Thread 'John Clements' via Racket Users
Ah! Thanks for the pointer. Should have looked in the issues. Yes, 2 filters certainly work fine. John > On Oct 5, 2021, at 4:45 PM, Ben Greenman wrote: > > There's an issue open about partition: > https://github.com/racket/typed-racket/issues/138 > > Does `my-partition` work like you'd

Re: [racket-users] using neg-propositions in partition?

2021-10-05 Thread Ben Greenman
There's an issue open about partition: https://github.com/racket/typed-racket/issues/138 Does `my-partition` work like you'd want? Based on Alex's last comment on the issue, it seems hard to give a predicate that matches the type. (Whenever I've wanted `partition` in typed code, I was always

Re: [racket-users] racket/gui/base in sandboxes in places

2021-10-03 Thread George Neuner
On 10/3/2021 4:04 PM, 'William J. Bowman' via Racket Users wrote: I'm trying to run sandboxes in places, but when the sandboxes need access to racket/gui (such as through 2htdp/universe), they get `cannot instantiate racket/gui/base' a second time`. I've tried initing racket/gui once in the

Re: [racket-users] Re: Escape continuations for fussy code

2021-10-03 Thread Laurent
Oh well, since everyone is at it, here's my version that no-one asked for. It's similar to parendown, but uses a more standard (but also specific) macro `cond/else` from https://github.com/Metaxal/bazaar/blob/master/cond-else.rkt : (*cond/else* [(*not* (foo? x)) #f] #:else (*define* y (bar x))

Re: [racket-users] Looking to trigger the end of a loop by the creation of a file.

2021-10-02 Thread George Neuner
On 10/2/2021 7:25 PM, Don Green wrote: Looking to trigger the end of a loop by the creation of a file. Is this possible? Is this advisable? Currently using: a 'for' loop with a 'for' loop guard expression to test for the existence of a file. Tried file-exists? but that does not seem

Re: [racket-users] Looking to trigger the end of a loop by the creation of a file.

2021-10-02 Thread Sorawee Porncharoenwase
What do you mean by "Tried using Racket function: filesystem-change-evt but that did not seem appropriate."? What's inappropriate about it? My first thought is to initialize a variable with `#f`. Spawn a thread before the loop that uses `filesystem-change-evt` so that when the event that you are

Re: [racket-users] Racket virtual meet-up in 50 minutes (8pm UTC) TODAY

2021-10-02 Thread Stephen De Gabrielle
Thank you to everyone who joined us today I’m looking forward to seeing more of you at the next meet-up: When: *First Saturday EVERY Month UTC: 20:00* (30 minutes but can overrun) Calendar: Google

Re: [racket-users] Re: Escape continuations for fussy code

2021-10-02 Thread jackh...@gmail.com
Here's my solution: (define/guard (f x) (guard (foo? x) else #false) (define y (bar x)) (define z (jazz x y)) (guard (loopy? z) else #false) (define a (yowza z)) (guard (string? a) else (error 'ugh)) (define b (bonkers a)) (guard (number? (hoop x b)) else (error

Re: [racket-users] Racket meeting tomorrow?

2021-10-02 Thread Stephen De Gabrielle
All welcome starts in a little over 50 minutes Where: https://gather.town/app/wH1EDG3McffLjrs0/racket-users When: *First Saturday EVERY Month UTC: 20:00* (30 minutes but can overrun) Calendar: Google

Re: [racket-users] Racket meeting tomorrow?

2021-10-01 Thread Hendrik Boom
On Fri, Oct 01, 2021 at 12:31:27PM -0700, Sam Phillips wrote: > October 2, 2021 > 1 PM PDT > 4 PM EDT > 8 PM UTC > 10 PM CEST > > Should be the same URL as previous meetups. > > https://gather.town/app/wH1EDG3McffLjrs0/racket-users I'll try to be there even though I haven't been doing much

Re: [racket-users] Re: Escape continuations for fussy code

2021-10-01 Thread Hendrik Boom
On Fri, Oct 01, 2021 at 02:32:52PM -0400, David Storrs wrote: > On Fri, Oct 1, 2021 at 11:58 AM Hendrik Boom wrote: > > > On Fri, Oct 01, 2021 at 02:22:14PM +, Jesse Alama wrote: > > > Hello, > > > > > > Have you ever wished you could do a C-style return in the middle > > > of a block of

Re: [racket-users] Racket meeting tomorrow?

2021-10-01 Thread Sam Phillips
October 2, 2021 1 PM PDT 4 PM EDT 8 PM UTC 10 PM CEST Should be the same URL as previous meetups. https://gather.town/app/wH1EDG3McffLjrs0/racket-users Cheers, Sam On Fri, Oct 1, 2021 at 9:49 AM Hendrik Boom wrote: > > Is there going to be a Racket online meeting at the gather site tomorrow >

Re: [racket-users] Re: Escape continuations for fussy code

2021-10-01 Thread David Storrs
On Fri, Oct 1, 2021 at 11:58 AM Hendrik Boom wrote: > On Fri, Oct 01, 2021 at 02:22:14PM +, Jesse Alama wrote: > > Hello, > > > > Have you ever wished you could do a C-style return in the middle > > of a block of Racket code? When you're in the heat of things with > > a complicated problem

Re: [racket-users] Racket meeting tomorrow?

2021-10-01 Thread Dominik Pantůček
I truly hope that the standard time (10pm CEST, 8pm UTC) and place (gather.town) tomorrow. Although I missed a few as I was busy with other projects over the summer, I'd like to see what others are up to again ;-) See ya there! Dominik On 01. 10. 21 18:49, Hendrik Boom wrote: Is there going

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread David Storrs
Cool, thanks. On Wed, Sep 29, 2021 at 11:23 AM Matthew Flatt wrote: > At Wed, 29 Sep 2021 11:20:47 -0400, David Storrs wrote: > > On Wed, Sep 29, 2021 at 9:57 AM Matthew Flatt > wrote: > > > > > At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > > > > I haven't tried `raco setup` to

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread Matthew Flatt
At Wed, 29 Sep 2021 11:20:47 -0400, David Storrs wrote: > On Wed, Sep 29, 2021 at 9:57 AM Matthew Flatt wrote: > > > At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > > > I haven't tried `raco setup` to look at its output, but one possible > > > improvement would be for whatever code

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread David Storrs
On Wed, Sep 29, 2021 at 9:57 AM Matthew Flatt wrote: > At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > > I haven't tried `raco setup` to look at its output, but one possible > > improvement would be for whatever code complains about the "invalid > `deps' > > specification" to always

Re: [racket-users] Having trouble getting documentation to generate

2021-09-29 Thread Matthew Flatt
At Wed, 29 Sep 2021 02:27:53 +, Philip McGrath wrote: > I haven't tried `raco setup` to look at its output, but one possible > improvement would be for whatever code complains about the "invalid `deps' > specification" to always report the invalid file's path. I've pushed that addition. --

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread Philip McGrath
On Tue, Sep 28, 2021 at 3:30 PM Ben Greenman wrote: > On 9/28/21, David Storrs wrote: > > $ raco pkg remove try-catch > > raco pkg remove: invalid `deps' specification > > specification: '("base" racket/format racket/string) > > > > That is not the deps specification from the info.rkt file so

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread Robby Findler
I'm not quite following from the thread, but it sure sounds like there is a bug in raco setup (or similar) somewhere that isn't reporting an error properly. Is that the case? Robby On Tue, Sep 28, 2021 at 4:12 PM David Storrs wrote: > > > On Tue, Sep 28, 2021 at 3:30 PM Ben Greenman > wrote:

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread David Storrs
On Tue, Sep 28, 2021 at 3:30 PM Ben Greenman wrote: > On 9/28/21, David Storrs wrote: > > > Also, any ideas on why the remove fails? > > > > $ raco pkg remove try-catch > > raco pkg remove: invalid `deps' specification > > specification: '("base" racket/format racket/string) > > > > That is

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread Ben Greenman
On 9/28/21, David Storrs wrote: > *fists of rage* > > I'm glad it worked for you, and that it works for me if I repeat your > steps. I have no idea why it wasn't working given that I was using the > local copy of the git repository that is the source of what's on github. > Argh. Weird ... glad

Re: [racket-users] [ANN] fmt: a Racket code formatter

2021-09-28 Thread David Storrs
This is very cool, Sorawee. Thank you for sharing. On Tue, Sep 28, 2021 at 2:03 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Announcing the pre-alpha version of fmt, a Racket code formatter. Code > formatter is a tool that reformats your code so that it conforms to a style >

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread David Storrs
*fists of rage* I'm glad it worked for you, and that it works for me if I repeat your steps. I have no idea why it wasn't working given that I was using the local copy of the git repository that is the source of what's on github. Argh. Regardless, thank you very much for your help. I've fixed

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread Sorawee Porncharoenwase
> > When I manually run > > $ cd try-catch/scribblings/ && scribble try-catch.scbl > > I get the try-catch.html file as expected but racket/base functions such > as with-handlers are not properly linked -- i.e. they appear in blue with a > red line under them and are not links. > - As I

Re: [racket-users] Having trouble getting documentation to generate

2021-09-28 Thread Ben Greenman
On 9/28/21, David Storrs wrote: > Summary: Documentation for a new module is not being generated when I > would expect it to be and when I do it manually it ends up not linking > basic Racket items. I've done a lot of searching to figure it out and > would appreciate some help. I cloned the

Re: [racket-users] Announcing Fission Flare, a falling block video game

2021-09-24 Thread Christine Lemmer-Webber
Looks very fun. :) Ryan Kramer writes: > I've just released v0.1 of a falling block video game: > https://github.com/default-kramer/fission-flare It draws a lot of > inspiration from Dr Mario but I don't like to advertise that since my > game has plenty of unique ideas. And although the patent

Re: [racket-users] What is the correct name for non-list parenthesized forms?

2021-09-24 Thread Robby Findler
Another approach is to give it a name in the documentation and use that name (following Jay's earlier message). Robby On Fri, Sep 24, 2021 at 1:37 PM 'John Clements' via Racket Users < racket-users@googlegroups.com> wrote: > I think I wouldn’t say “accepts”; I usually reserve this term for >

Re: [racket-users] Strange readline/racket-mode behavior

2021-09-24 Thread David Storrs
The dev team will have to answer your actual question, but I thought I might offer a more compact solution that incorporates the fix you mentioned: (define (yn #:read-one-char? [read-one-char? #f]) (display "y/n: ") (flush-output (current-output-port)) (define func (if read-one-char?

Re: [racket-users] What is the correct name for non-list parenthesized forms?

2021-09-24 Thread Jay McCarthy
On Fri, Sep 24, 2021 at 2:45 PM David Storrs wrote: > Offtopic question for someone else: Jay, are you related to > Lisp-inventory John McCarthy? > Nope, although we have the same name and nickname Jay -- Jay McCarthy Associate Professor @ CS @ UMass Lowell http://jeapostrophe.github.io

Re: [racket-users] What is the correct name for non-list parenthesized forms?

2021-09-24 Thread David Storrs
On Fri, Sep 24, 2021 at 2:37 PM John Clements wrote: > I think I wouldn’t say “accepts”; I usually reserve this term for > functions, but that’s a minor quibble. > > I think I would call these “clauses”, as in > > “With-handlers allows the user to specify exception-handling clauses. Each > one

Re: [racket-users] What is the correct name for non-list parenthesized forms?

2021-09-24 Thread 'John Clements' via Racket Users
I think I wouldn’t say “accepts”; I usually reserve this term for functions, but that’s a minor quibble. I think I would call these “clauses”, as in “With-handlers allows the user to specify exception-handling clauses. Each one includes two parts: a predicate, indicating whether blah blah

Re: [racket-users] What is the correct name for non-list parenthesized forms?

2021-09-24 Thread David Storrs
On Fri, Sep 24, 2021 at 1:49 PM Jay McCarthy wrote: > I think the word you're looking for is "syntax". Many people think that > languages like Racket "don't have syntax" or "have uniform syntax", but > this is an example of how that is incorrect. Each macro has its own unique > syntax and this

<    1   2   3   4   5   6   7   8   9   10   >