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:40 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > It's usually called "binding pair". See also > https://docs.racket-lang.org/syntax/stxparse-intro.html which defines a > syntax class describing the said structure. > Okay, but what about in

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

2021-09-24 Thread Robby Findler
An answer to a third question that might also have been the one that was asked :) You might call it a "sequence". Robby On Fri, Sep 24, 2021 at 12:50 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"

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

2021-09-24 Thread Jay McCarthy
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 is an example of how `let` has a unique syntax where `(` does

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

2021-09-24 Thread Sorawee Porncharoenwase
It's usually called "binding pair". See also https://docs.racket-lang.org/syntax/stxparse-intro.html which defines a syntax class describing the said structure. On Fri, Sep 24, 2021 at 10:25 AM David Storrs wrote: > Racket has a number of forms that include what look like lists of lists > but

Re: [racket-users] New module log-bracketed; should probably be something else

2021-09-23 Thread jackh...@gmail.com
This looks quite a bit like you're trying to implement tracing, which is like logging, but instead of emitting messages associated with *points* in time, you emit messages for *ranges* of time. Rust has an excellent library for tracing. Perhaps that

Re: [racket-users] [ANN] Introducing "social" contracts

2021-09-23 Thread Nathaniel W Griswold
The changes look good, i like the idea of this. > On Aug 25, 2021, at 10:59 AM, Siddhartha Kasivajhula > wrote: > > Hello again folks, > I recently migrated one of my repos to use social-contract, and thought I'd > share the before/after as an example to illustrate what the package does: > >

Re: [racket-users] Autumn Lisp Game Jam 2021

2021-09-23 Thread Stephen De Gabrielle
There is a collection of links that may be useful for games at https://github.com/racket/racket/wiki/Game-Development And don’t forget 2htdp/universe can be used from #lang racket Bw Stephen On Thu, 23 Sep 2021 at 09:16, Bruce O'Neel wrote: > > This might interest some of you... > > Autumn

Re: [racket-users] using raco to install executables

2021-09-22 Thread Sage Gerard
Yes. The keyword here is "launcher." See the gracket-launcher* and racket-launcher-* options for info.rkt files in https://docs.racket-lang.org/raco/setup-info.html These options affect `raco setup` in particular. Here's one of my info.rkt files as an example

Re: [racket-users] Help debugging handin client connection problem

2021-09-19 Thread 'William J. Bowman' via Racket Users
I think I've debugged the issue, but it's only present in our locally modified version of the client, although the root cause could affects others. In case others have minor modifications to the client, or anyone modifies the client in the future: It was a race condition between some error

Re: [racket-users] what is the limit of 2htdp/image and 2htdp/universe in terms of making games? i dont plan to make anything too huge but i do want to teach spritesheet animation for some pixel art

2021-09-19 Thread Stephen De Gabrielle
Hi There are some resources at https://github.com/racket/racket/wiki/Game-Development You might be in particular interested in the Support code for RacketCon 2019 Game Jam tutorial: https://github.com/jeapostrophe/gamejam-2019/blob/master/world.rkt (2htdp/universe) I didn’t attend the

Re: [racket-users] Help debugging handin client connection problem

2021-09-18 Thread 'William J. Bowman' via Racket Users
I've confirmed it's definitely client side, by redirecting the handin server's address to 127.0.0.1 in /etc/hosts, and listening with `nc -l`. The handin client hangs on "Making secure connection ..." and nc display nothing at all. A few restarts and `nc -l` displays a bunch of gibberish that

Re: [racket-users] Help debugging handin client connection problem

2021-09-18 Thread 'William J. Bowman' via Racket Users
Since I'm currently experiencing the issue, I've been able to get some better data. I've managed to reproduce it in 8.2.0.2 CS, which suggests it's not https://github.com/racket/racket/issues/3804. Restarting twice DrRacket hasn't helped, nor has resetting my wifi connection. After connecting

Re: [racket-users] Help debugging handin client connection problem

2021-09-18 Thread 'William J. Bowman' via Racket Users
I just tried this, but I can't seem to connect. http://cs110.students.cs.ubc.ca:7979/ gives "connection reset", and https://cs110.students.cs.ubc.ca:7979/ gives "secure connection failed". There's no prompt to accept the certificate (which I wouldn't expect, because we're using a CA signed

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-18 Thread Dimaugh Silvestris
Ohhh, thank you so much, Sorawee! Now I have wealth of code to study. By the way, I tried to send my full code but apparently once again I hit the "reply" button instead of "reply all" and I only sent it to David, so here it is again in case anyone wants to play with it. I haven't implemented

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread Sorawee Porncharoenwase
> > 2) (card (line . xs)) has only one field, xs. Of course, you could also > define it as a normal field which contains a list, but there's some other > scenarios where I found it more elegant to represent it as a dotted > argument (like representing s-expressions as a struct). > Oh sorry, that

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread Dimaugh Silvestris
Thanks, I'll take a look into the code struct++! I'll probably get lost but I'm sure I'll learn something. Answering your questions: A) What exactly are you trying to do, because I think I've got it but I'm >>> still fuzzy. >>> >> Structs that allow constructors like any other function, and

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread Dimaugh Silvestris
Oops, noted, I have to use 'reply all'. In the benefit of context I'll post again my reply to Sorawee: Short summary: I'm trying to have a macro (mymacro oldname newname (fields ...)) that accesses oldname-foo, which contains a list of symbols, and then define a function that takes (cons

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread David Storrs
Additional thought and self-plug: My struct-plus-plus module creates structures with full reflection information available, including field names, contracts, and wrappers. It also supports type checking, data normalization, default values, and automatically provides both keyword constructors and

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread David Storrs
NB: You did a 'reply' to Sorawee instead of to the list as a whole, and also the same for the email I sent. Probably good to 'reply all' so that the list gets the full context. Sorawee offered some good advice on how to do the things you're asking about and asked relevant questions. I'm

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-17 Thread Sorawee Porncharoenwase
Instead of creating hola-fields which exists at run-time, you can (define-syntax hola ...) to a struct containing the field information at compile-time (it probably needs to contain other information too). The struct could have prop:procedure which in this case will be the syntax transformer that

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-16 Thread David Storrs
Sorawee answered your immediate question, but I figured I'd offer a pointer to Fear of Macros in case you haven't seen it: https://www.greghendershott.com/fear-of-macros/ It helped me a lot when I was trying to get my head around macros. Also, I got a lot of value from reading through the code

Re: [racket-users] Is it possible to capture a the value of a variable inside a macro?

2021-09-16 Thread Sorawee Porncharoenwase
In general, it would be helpful to provide an example of the macro use, so that we know what you want to do. If it doesn't work, it would be helpful to provide the buggy program and an error message so that we can help with the issue that you are encountering. >From my guess, you have a variable

Re: [racket-users] Syntax Parse Bee 2021

2021-09-15 Thread Ben Greenman
The competition is now closed. Thank you to the participants!!! We received 22 entries from 15 individuals: https://github.com/syntax-objects/Summer2021/issues The final results of these submissions cover a wide range. Some are macros that you could use in any Racket project. Others are

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-14 Thread Matthew Flatt
At Tue, 14 Sep 2021 01:54:44 -0400, George Neuner wrote: > Is there a list somewhere of which chips have successfully run Racket? > Or a definitive statement of what ISA is targeted? For Racket CS, there's a list here: https://github.com/racket/racket/tree/master/racket/src/ChezScheme Granted,

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-13 Thread George Neuner
On 9/13/2021 10:34 PM, Matthew Flatt wrote: Just to clarify: Racket runs on a number of ARM variants when running Linux and other Unix-like operating systems, but we have not yet ported to Windows on ARM. Matthew Is there a list somewhere of which chips have successfully run Racket? Or a

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-13 Thread Matthew Flatt
Just to clarify: Racket runs on a number of ARM variants when running Linux and other Unix-like operating systems, but we have not yet ported to Windows on ARM. Matthew At Mon, 13 Sep 2021 11:21:57 -0700 (PDT), Nathan Philippon wrote: > I think you're right, thanks. > > On Monday, September 13,

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-13 Thread Nathan Philippon
I think you're right, thanks. On Monday, September 13, 2021 at 2:06:03 p.m. UTC-4 gneuner2 wrote: > > On 9/13/2021 1:02 PM, Nathan Philippon wrote: > > It's a Samsung GalaxyBook > > On Monday, September 13, 2021 at 12:48:06 p.m. UTC-4 jest...@gmail.com > wrote: > >> Yeah, I don't think Racket

Re: [racket-users] Re: jest...@gmail.com Trouble installing DrRacket

2021-09-13 Thread George Neuner
On 9/13/2021 1:02 PM, Nathan Philippon wrote: It's a Samsung GalaxyBook On Monday, September 13, 2021 at 12:48:06 p.m. UTC-4 jest...@gmail.com wrote: Yeah, I don't think Racket supports windows on arm devices. I'm guessing this is a chromebook or something? HP? Dell? On Monday,

Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
On Fri, Sep 10, 2021 at 1:33 PM kamist...@gmail.com wrote: > I like the apply max instead of foldl, quite a bit easier. > > Instead of `(format "\t~a" (~a (~a k #:width width) v #:separator "\t"))` > I prefer one of these: > (~a "\t" (~a k #:width width) "\t" v) > (~a #:separator "\t" "" (~a k

Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread kamist...@gmail.com
I like the apply max instead of foldl, quite a bit easier. Instead of `(format "\t~a" (~a (~a k #:width width) v #:separator "\t"))` I prefer one of these: (~a "\t" (~a k #:width width) "\t" v) (~a #:separator "\t" "" (~a k #:width width) v) -- You received this message because you are

Re: [racket-users] Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
Thank you, Laurent. That's a cool package; I think it would work well to generate tables suitable for org-mode spreadsheets. I could even pull data from a sqlite DB, giving me power and portability without needing an internet connection or a full heavyweight spreadsheet app. On Thu, Sep 9, 2021

Re: [racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-10 Thread David Storrs
Wow, thank you Simon. That was above and beyond. I should have thought of ~a to start with. With your pointers I came up with a less flexible solution that is sufficient to the current issue: #lang racket/base (require racket/format racket/string) (define my-keys '("bacon" "eggs"

Re: [racket-users] Is there a way to format keys/values like raise-arguments-error

2021-09-09 Thread Laurent
Maybe take a look at the text-table package. On Wed, 8 Sep 2021, 14:41 David Storrs, wrote: > raise-arguments-errors produces neatly stacked key/value pairs with > whitespace arranged such that values line up even when keys are of > different lengths. Is there an easy way to get that for

Re: [racket-users] How to set up rackunit tests to test the REPL?

2021-09-09 Thread Ryan Culpepper
This is one of the few (IMO) legitimate uses of `eval`. Your test suite should create a namespace, set it up by requiring your language's module, and then eval interactions expressed as quoted S-expressions or syntax objects. Here's a basic example for testing `match`: #lang racket/base

Re: [racket-users] Why does syntax-parser work here but not syntax-parse?

2021-09-08 Thread David Storrs
*headdesk headdesk headdesk headdesk headdesk* Thank you. On Wed, Sep 8, 2021 at 2:02 PM Stephen Chang wrote: > > shouldn't the entire parenthesized expression be given to the macro > processor and then replaced with something valid before being rejected? > > That would be true if you're

Re: [racket-users] Why does syntax-parser work here but not syntax-parse?

2021-09-08 Thread Stephen Chang
> shouldn't the entire parenthesized expression be given to the macro processor > and then replaced with something valid before being rejected? That would be true if you're defining a macro, i.e. if you use `define-syntax` instead of `define`. > > -- > You received this message because you are

Re: [racket-users] Bootstrap on Racket

2021-09-05 Thread Sage Gerard
Also check koyo and Axio On 9/4/21 12:14 PM, 'John Clements' via Racket Users wrote: > I use Greg Hendershott’s excellent and trouble-free ‘frog’ library. How would > your code relate to this? > > John > >> On Aug 30, 2021, at 10:57, Dexter Lagan wrote: >> >> Hi again, >> >>I've been

Re: [racket-users] Bootstrap on Racket

2021-09-04 Thread 'John Clements' via Racket Users
I use Greg Hendershott’s excellent and trouble-free ‘frog’ library. How would your code relate to this? John > On Aug 30, 2021, at 10:57, Dexter Lagan wrote: > > Hi again, > > I've been working on porting my Newstrap Web framework from newLISP to > Racket. I got most of it done and am

Re: [racket-users] New module log-bracketed; should probably be something else

2021-09-03 Thread David Storrs
On Thu, Sep 2, 2021 at 5:32 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Thoughts: > >- Perhaps the logger should be optional. The default value would be >(current-logger). >- The event name (like on-complete) could also be optional. The >default would be the

Re: [racket-users] Is there an easy way to disable a GUI element?

2021-09-03 Thread Ryan Kramer
Perfect, thanks. I thought I explored all the relevant interfaces but I must have overlooked window<%>. On Friday, September 3, 2021 at 1:00:37 AM UTC-5 gneuner2 wrote: > > > On 9/2/2021 5:39 PM, Ryan Kramer wrote: > > I see that button% has an `enabled` field, but I'm not seeing anything for

Re: [racket-users] Is there an easy way to disable a GUI element?

2021-09-03 Thread George Neuner
On 9/2/2021 5:39 PM, Ryan Kramer wrote: I see that button% has an `enabled` field, but I'm not seeing anything for slider%, text-field%, and choice%. If I want to disable these elements, do I have to roll my own enable/disable logic? Also, is there a way to change a button's `enabled` status

Re: [racket-users] New module log-bracketed; should probably be something else

2021-09-02 Thread Sorawee Porncharoenwase
Thoughts: - Perhaps the logger should be optional. The default value would be (current-logger). - The event name (like on-complete) could also be optional. The default would be the source location of the macro invocation site - Instead of “time: ~a”, I think it would be nice to

Re: [racket-users] New module log-bracketed; should probably be something else

2021-09-02 Thread Martin DeMello
I do like the second form better, especially since the actual code being run is not obscured by simply being the last argument to a long log function. martin On Thu, Sep 2, 2021 at 1:55 PM David Storrs wrote: > I often find that for debugging I want to see a log message saying "I'm > about to

Re: [racket-users] gen:custom-write macro

2021-09-01 Thread Sorawee Porncharoenwase
There are positions that macros can’t operate. https://lexi-lambda.github.io/blog/2018/10/06/macroexpand-anywhere-with-local-apply-transformer/ explains this issue really well, so I recommend you to read it. There’s also another issue, which is that you want write-proc to be named write-proc, but

Re: [racket-users] 'compiled' binary still depending on libs?

2021-08-30 Thread Matthew Flatt
Some libraries have extra run-time files that they refer to with `define-runtime-path` and similar. I think "gregor" is in that category, where it needs files like "timezone.xml". Embedding DLLs can't embed those extra files. The intent is that you use `raco distribute` to package an executable

Re: [racket-users] Context aware macro

2021-08-30 Thread Sorawee Porncharoenwase
> > But what surprises me the most is that it only works at the top level: > assign.rkt> > assign.rkt> (assign foo 3) > assign.rkt> (assign (bar x) (assign foo 7) (* x foo)) > assign.rkt> (bar 1) > 7 > assign.rkt> global > '#hash((bar . (λ (x) (assign foo 7) (* x foo))) (foo . 3)) > Interesting.

Re: [racket-users] Obtaining the path of the application program?

2021-08-27 Thread Jeff Henrikson
On 8/26/21 8:14 AM, Matthew Flatt wrote: The analog to the first argument to main in C is (find-system-path 'run-file) I think that's probably what you want. Yes, this has the behavior I want.  Thank you. Procedure find-system-path seems well documented once one finds its section.  But

Re: [racket-users] Obtaining the path of the application program?

2021-08-26 Thread Ryan Culpepper
Usually, if you want to refer to data files etc relative to the current module's file, a good solution is to use `define-runtime-path`. It uses `#%variable-reference` as the basis for its implementation, but adds other features like cooperation with `raco exe` (see docs for `define-runtime-path`

Re: [racket-users] Obtaining the path of the application program?

2021-08-26 Thread Matthew Flatt
The analog to the first argument to main in C is (find-system-path 'run-file) I think that's probably what you want. Something closer to `get-current-source` but adapting to a run-time file is (variable-reference->module-source (#%variable-reference)) Here, `(#%variable-reference)` is

Re: [racket-users] Syntax Parse Bee 2021

2021-08-25 Thread Stephen De Gabrielle
There is only a couple more days! it's not too late! On Tuesday, August 3, 2021 at 8:55:14 PM UTC+1 Stephen De Gabrielle wrote: > The bee is still on! > Have you made a contribution yet? > > Write a macro with Racket this summer! Win stickers! > > The purpose of this event is to grow the

Re: [racket-users] [ANN] Introducing "social" contracts

2021-08-25 Thread Siddhartha Kasivajhula
Hello again folks, I recently migrated one of my repos to use social-contract, and thought I'd share the before/after as an example to illustrate what the package does:

Re: [racket-users] Fix linux (play-sound) sound output as aplay does not work, swap for something else

2021-08-24 Thread jest array
Woops so I left: (put-preferences '(GRacket:playcmd) '("mpv --no-audio-display ~a")) which changes it to use mpv instead. This fixes the issue but nonetheless we should fix this out of the box and have it not look for aplay first On Tuesday, August 24, 2021 at 12:31:27 PM UTC-7

Re: [racket-users] Fix linux (play-sound) sound output as aplay does not work, swap for something else

2021-08-24 Thread Hendrik Boom
On Tue, Aug 24, 2021 at 12:19:25PM -0700, jest array wrote: > https://github.com/racket/gui/issues/239 > > So this does not work on both Arch Linux with prebuilt racket binaries and > Debian with built from source binaries(according to a user JSGRANT on the > racket discord server >

Re: [racket-users] Can raco install old packages with a specific version?

2021-08-18 Thread Kiwan
Thank you for your help! It is working nicely. 2021년 8월 18일 수요일 오후 6시 8분 15초 UTC-4에 sorawe...@gmail.com님이 작성: > s/could/should/ > > On Wed, Aug 18, 2021 at 3:07 PM Sorawee Porncharoenwase < > sorawe...@gmail.com> wrote: > >> Oh, and to install from source, go in the project directory, which

Re: [racket-users] Can raco install old packages with a specific version?

2021-08-18 Thread Sorawee Porncharoenwase
s/could/should/ On Wed, Aug 18, 2021 at 3:07 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Oh, and to install from source, go in the project directory, which could > contain the file info.rkt. Run raco pkg install. > > > On Wed, Aug 18, 2021 at 3:05 PM Sorawee Porncharoenwase <

Re: [racket-users] Can raco install old packages with a specific version?

2021-08-18 Thread Sorawee Porncharoenwase
Oh, and to install from source, go in the project directory, which could contain the file info.rkt. Run raco pkg install. On Wed, Aug 18, 2021 at 3:05 PM Sorawee Porncharoenwase < sorawee.pw...@gmail.com> wrote: > Hi Kiwan, > > There are many possibilities that you can do. > > One is to

Re: [racket-users] Can raco install old packages with a specific version?

2021-08-18 Thread Sorawee Porncharoenwase
Hi Kiwan, There are many possibilities that you can do. One is to download the source code of a version that you want from https://github.com/emina/rosette/releases and then install from source. Another is to find a commit that you want from GitHub and use the command line like raco pkg install

Re: [racket-users] Re: Is this "inside out" macro technique common?

2021-08-18 Thread Michael Ballantyne
> I think there is a bug in the documentation (or maybe in Racket) because when I try `(syntax-local-eval #'(begin e ...) #f)` Thanks for the report, I submitted a PR with a fix (https://github.com/racket/racket/pull/3964). Referring back to your original message, > (Of course, if I had more

Re: [racket-users] Re: Is this "inside out" macro technique common?

2021-08-17 Thread Ryan Kramer
Thank you! `splice` is indeed the essential primitive here, so it's nice to see it extracted and named properly. The difference between eval-syntax and syntax-local-eval is good to know also. I think there is a bug in the documentation (or maybe in Racket) because when I try

Re: [racket-users] Doc pages search engine difficulties

2021-08-17 Thread Dexter Lagan
Thank you very much for the thorough explanation. It makes sense. I’ll be sharing the cheat sheet with my coworkers. It sure is a good starting point. Dex > On Aug 17, 2021, at 9:40 PM, Jens Axel Søgaard wrote: > >  >> Den tir. 17. aug. 2021 kl. 16.34 skrev Dexter Lagan : > >> Hello

Re: [racket-users] Doc pages search engine difficulties

2021-08-17 Thread Jens Axel Søgaard
Den tir. 17. aug. 2021 kl. 16.34 skrev Dexter Lagan : > Hello there, > > I'm trying to teach one of my coworkers how to search for function names > in the Racket manual, and I'm having serious problems finding very simple > things, such as the function to display the file browser dialog

Re: [racket-users] Doc pages search engine difficulties

2021-08-17 Thread Sorawee Porncharoenwase
But content search is also unsatisfactory in many situations. As an example, take a look at Python’s documentation, which has the content search. I searched for “list” ( https://docs.python.org/3/search.html?q=list_keywords=yes=default), hoping to find the documentation for the list function, and

Re: [racket-users] Doc pages search engine difficulties

2021-08-17 Thread Sorawee Porncharoenwase
FWIW, you can use Google to do that. The search query site:docs.racket-lang.org file browser dialog shows https://docs.racket-lang.org/mrlib/Path_Dialog.html as the first search result. The page also has a link to get-file and put-file. On Tue, Aug 17, 2021 at 7:34 AM Dexter Lagan wrote: >

Re: [racket-users] [ANN] Introducing "social" contracts

2021-08-16 Thread Siddhartha Kasivajhula
Hi David, Yes, both ->* and ->i are supported. The forms in social-contract expand to flat or arrow contracts, which, since these work within ->* and ->i there shouldn't be any issues there. The only built-in form it doesn't support yet is case->, and that's because at the moment case->

Re: [racket-users] [ANN] Introducing "social" contracts

2021-08-16 Thread David Storrs
Hi Siddhartha, Will this package handle ->* and ->i, either now or in the future? On Sat, Aug 14, 2021 at 1:40 PM Siddhartha Kasivajhula wrote: > Fellow Scheming Racketeers, > When you've written a function that takes an integer and returns another > one, you may write a contract for it as (->

Re: [racket-users] Re: Is this "inside out" macro technique common?

2021-08-16 Thread Michael Ballantyne
The essential primitive here seems to me to be: (define-syntax (splice stx) (syntax-case stx () [(_ e ...) (eval-syntax #'(begin e ...))])) With with-quasisyntax being: (define-syntax-rule (with-quasisyntax ([a b] ...) template) (splice (with-syntax ([a b] ...) (quasisyntax

Re: [racket-users] Find the source location of the syntax error in DrRacket

2021-08-14 Thread Robby Findler
I'm not 100% sure but I think that's right: the marks clobber each other so that you see the inner frame and a `let`'s body is in tail position wrt to the let itself. So in this program: #lang racket/base (define (f x) (car x)) (let () (let () (+ (let () (let () (f

Re: [racket-users] Find the source location of the syntax error in DrRacket

2021-08-14 Thread Shu-Hung You
Cool! I thought the existing syntax/loc have already put the correct source location on the output of the macro, but the inner let is taking over the stack frame. On Sat, Aug 14, 2021 at 12:49 AM Sorawee Porncharoenwase wrote: > > Isn’t that a matter of putting more syntax/loc? I tried: > >

Re: [racket-users] Find the source location of the syntax error in DrRacket

2021-08-13 Thread Sorawee Porncharoenwase
Isn’t that a matter of putting more syntax/loc? I tried: (-define-syntax let-syntaxes (lambda (stx) (syntax-case stx () [(_ ([(id ...) expr] ...) body1 body ...) (with-syntax ([((tmp ...) ...) (map generate-temporaries (syntax->list (syntax

Re: [racket-users] Re: Is this "inside out" macro technique common?

2021-08-13 Thread Ryan Kramer
The name `with-quasisyntax` is not very good, because it is not simply a quasi version of `with-syntax`. The most interesting part is that it calls `eval-syntax` up front. The result feels like a "universal macro" -- it can be used to implement both foo->assoc and assoc->foo which look like they

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread kamist...@gmail.com
> Allowing (un)docking is a good idea (if applicable), but switching > between panels and frames is unnecessarily complicated ... a frame can > be drawn floating or docked, resizeable or not, with or without borders, > system menu, captions, toolbar, menubar, etc. - so visually it can be >

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread James Platt
On Aug 12, 2021, at 3:47 PM, George Neuner wrote: > However it does suggest that he wants menubar menus. I don't use (or have > available to check) MacOS, so I'm don't know what limitations may be on 'root > menubars, or whether a child frame can have its own internal menubar (which > is

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread James Platt
On Aug 12, 2021, at 2:52 PM, Jens Axel Søgaard wrote: > Are we talking menu bar menus or contextual menus? > > On macOS the menu bar menu belongs to the application and not a window. The macOS menu bar is also contextual. It changes depending on what is selected in the application. IIRC,

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread George Neuner
On 8/12/2021 2:52 PM, Jens Axel Søgaard wrote: Den tor. 12. aug. 2021 kl. 20.44 skrev George Neuner mailto:gneun...@comcast.net>>: If I understand correctly, Don seems to want menus in his side-by-side "panels". Are we talking menu bar menus or contextual menus? On macOS the

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread Jens Axel Søgaard
Den tor. 12. aug. 2021 kl. 20.44 skrev George Neuner : > > If I understand correctly, Don seems to want menus in his side-by-side > "panels". > Are we talking menu bar menus or contextual menus? On macOS the menu bar menu belongs to the application and not a window.

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread George Neuner
On 8/12/2021 1:39 PM, kamist...@gmail.com wrote: I think instead of fidgeting around with OS dependent stuff to align frames side by side, I would take another approach (inspired by other applications): 1. per default the application is just a big window with multiple sections divided with

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread kamist...@gmail.com
I think instead of fidgeting around with OS dependent stuff to align frames side by side, I would take another approach (inspired by other applications): 1. per default the application is just a big window with multiple sections divided with panels, splits, tabs, etc. 2. some of those areas

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread George Neuner
On 8/11/2021 10:44 PM, Don Green wrote: When I specify 2 frames to be side-by-side using racket/gui, I believe I would have no problem if all my prospective client platform did not have a vertical Operating System taskbars. Since I do have such a taskbar I must use code that takes the width

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-11 Thread Andrew Beyer
On Wed, Aug 11, 2021 at 7:44 PM Don Green wrote: > I am currently of the belief that I should refrain from using side-by-side > frames. Maybe? Almost all desktop systems provide some way for users to easily arrange common setups like this... do you need to manage this from within your

Re: [racket-users] Is it true that 2 side-by-side frames must not be placed within a horizontal-pane because the a frame's parent can only be another frame?

2021-08-09 Thread Laurent
Indeed, you can't put a frame% inside a panel%, if that's what you're asking. (Though I must say I don't see what doing so would mean either, since a frame is a "top-level" widget [image: Screenshot from 2021-08-09 16-43-17.png] .) On Sun, Aug 8, 2021 at 3:11 AM Don Green wrote: > Is it true

Re: [racket-users] Pousse Player Programs

2021-08-09 Thread Jeff Sepeta
Thanks, I'll check it out. On Sat, Aug 7, 2021 at 9:47 PM Robby Findler wrote: > I see that in 8.2 but I'm not seeing it in a more recent build. Maybe try > a snapshot? https://snapshot.racket-lang.org/ > > There is information about how to make players here: >

Re: [racket-users] Pousse Player Programs

2021-08-07 Thread Robby Findler
I see that in 8.2 but I'm not seeing it in a more recent build. Maybe try a snapshot? https://snapshot.racket-lang.org/ There is information about how to make players here: https://github.com/racket/games/blob/master/pousse/robots.txt I didn't try it out, but if you do and run into problems, let

Re: [racket-users] racket/gui fn that returns width of O.S. toolbar?

2021-08-06 Thread James Platt
> In linux and I imagine on Windows and macOS, when there exists a vertical OS > toolbar the values returned by get-display-size and get-client-size are the > same and are insufficient. The macOS version, at least, is draggable so there can be different widths on different Finder windows at

Re: [racket-users] frame width and (get-display-size) ...

2021-08-06 Thread George Neuner
I have no idea what this code will do on MacOS, but it works on Windows ... at least for the limited window tilings I tried. YMMV. - #lang racket (require racket/gui) (define-values (w h) (get-display-size #:monitor 0)) (printf "screen: ~a ~a~n" w h)

Re: [racket-users] frame width and (get-display-size) ...

2021-08-05 Thread Jens Axel Søgaard
Which OS? Den tor. 5. aug. 2021 kl. 17.36 skrev Don Green : > Creating a frame width that is half of the width given by > (get-display-size), then moving the resulting window to the right and left > of the screen you can see that if you had 2 windows of the same size they > would not touch

Re: [racket-users] Equivalent of exec

2021-08-05 Thread Norman Gray
Kieron, hello. On 4 Aug 2021, at 22:04, Kieron Hardy wrote: I’m surprised no one has mentioned Rash so I will ... perhaps Rash will be a useful tool for you ... https://docs.racket-lang.org/rash/ “2 Rash Guide ... Rash is a shell language embedded in Racket. “ Thanks for pointing this

Re: [racket-users] Equivalent of exec

2021-08-04 Thread Kieron Hardy
> started as a quick experiment with scsh a number of years ago, I’m surprised no one has mentioned Rash so I will ... perhaps Rash will be a useful tool for you ... https://docs.racket-lang.org/rash/ “2 Rash Guide ... Rash is a shell language embedded in Racket. “ https://rash-lang.org/

Re: [racket-users] Equivalent of exec

2021-08-04 Thread D. Ben Knoble
Hi Norman, > It's slightly unfortunate that Racket's > start-up time make it slightly suboptimal as a command-line tool, but > raco make helps with that. With 8.0+/CS, even without make I've had a good experience. As you say, setup or make makes things even faster, though. If you weren't

Re: [racket-users] Equivalent of exec

2021-08-04 Thread Norman Gray
Ben, hello. On 4 Aug 2021, at 16:45, D. Ben Knoble wrote: On a slightly unrelated note, if this for consumption by anyone other than just you, I would use (getenv "EDITOR") (or VISUAL, if you prefer) rather than hard-code the path to vi. An excellent point. In fact this is indeed a

Re: [racket-users] Equivalent of exec

2021-08-04 Thread D. Ben Knoble
> (exit (system*/exit-code "/usr/bin/vi" "filename")) On a slightly unrelated note, if this for consumption by anyone other than just you, I would use (getenv "EDITOR") (or VISUAL, if you prefer) rather than hard-code the path to vi. Best, D. Ben Knoble -- You received this message because

Re: [racket-users] Equivalent of exec

2021-08-04 Thread Norman Gray
Many thanks for your thoughts, George and Shu-Hung. Rather embarassingly, I've found my answer in what's almost the simplest subprocess procedure: (exit (system*/exit-code "/usr/bin/vi" "filename")) exhibits the behaviour I want. That does all the required plumbing flawlessly. I'm

Re: [racket-users] Syntax Parse Bee 2021

2021-08-03 Thread Stephen De Gabrielle
The bee is still on! Have you made a contribution yet? Write a macro with Racket this summer! Win stickers! The purpose of this event is to grow the syntax-parse-example documentation and repository to grow as a resource for the Racket community. (You can also contribute directly to the syntax

Re: [racket-users] Equivalent of exec

2021-08-03 Thread Shu-Hung You
On Tue, Aug 3, 2021 at 1:13 PM George Neuner wrote: > > > On 8/3/2021 1:03 PM, Norman Gray wrote: > > On 3 Aug 2021, at 17:38, George Neuner wrote: > > > >> Racket is multi-platform and tries to present a common API for > >> dealing with underlying operating systems. Windows is an important > >>

Re: [racket-users] Equivalent of exec

2021-08-03 Thread George Neuner
On 8/3/2021 1:03 PM, Norman Gray wrote: On 3 Aug 2021, at 17:38, George Neuner wrote: Racket is multi-platform and tries to present a common API for dealing with underlying operating systems.  Windows is an important platform, but Windows does not have the concept of fork/exec ... so

Re: [racket-users] Equivalent of exec

2021-08-03 Thread Norman Gray
George, hello. On 3 Aug 2021, at 17:38, George Neuner wrote: Racket is multi-platform and tries to present a common API for dealing with underlying operating systems.  Windows is an important platform, but Windows does not have the concept of fork/exec ... so Racket doesn't offer it

Re: [racket-users] Equivalent of exec

2021-08-03 Thread George Neuner
On 8/3/2021 12:14 PM, Norman Gray wrote: Greetings. I can't find a way of doing something equivalent to exec in Racket.  Is this Hard, or am I just missing it? By 'exec', I mean the equivalent of replacing the process with a new image, as distinct from `system` (and friends) or `process`

Re: [racket-users] Re: Examples of sending HTML email w/ Racket?

2021-07-31 Thread write2mark1
made some changes removed need for axio-env.rkt, but i am still unable to send email so here follows a #warning noob email question, assuming the smtp server name password and settings are right is there any reason http://pastie.org/p/0CduaNLM67JpE7nk9I6vDx/raw does not work . Can anyone point me

Re: [racket-users] Re: Re-entrant parameterize modification isolation when using shift/reset

2021-07-31 Thread Matthew Flatt
At Fri, 30 Jul 2021 12:56:37 -0700 (PDT), Greg Rosenblatt wrote: > Is the `parameter * thread * parameterization -> box` part implemented as > something like a global weak-hash, or is it built directly into the stack > representation? A parameter holds a key and a thread cell, where the thread

Re: [racket-users] Ubuntu PPA also updated to v8.2

2021-07-31 Thread Joseph Turco
No rush! Just thought I'd let people know. Thanks for your work. Regards, Joseph Turco Jul 31, 2021 9:03:08 AM David Bremner : > Joseph Turco writes: > >> So I tried installing racket 8.2 from the experimental repos >> (downloaded it) and the dependencies (newer version of libc6) will >>

Re: [racket-users] Ubuntu PPA also updated to v8.2

2021-07-31 Thread David Bremner
Joseph Turco writes: > So I tried installing racket 8.2 from the experimental repos > (downloaded it) and the dependencies (newer version of libc6) will > break some things. So install at your own risk. I'll stick with 7.2 > for now. Yes, I should have mentioned those packages only work with a

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