Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-10 Thread Justin Zamora
Another, less lightweight way is to use panels for different parts of the chat windows. I put together a sample at https://gist.github.com/zamora/1cfc6480f7703735dffa3169facfbf10 On Mon, Aug 10, 2020 at 3:32 PM Christopher Lemmer Webber wrote: > > Hello, > > I'm building a little chat

[racket-users] Re: Racket GUI: text aligned to the left of other text

2020-08-10 Thread Alex Harsanyi
The simplest thing is to just use tabs. A line of text would be "\tYour Message here" and an overflowing line would be "\tOverflowing message". Yes, this will work for variable width fonts. The `text%` class has a `set-tabs` method which allows setting the tab stops in drawing units on the

Re: [racket-users] Racket GUI: text aligned to the left of other text

2020-08-10 Thread Robby Findler
That code is in the framework: https://github.com/racket/gui/blob/master/gui-lib/framework/private/text-line-numbers.rkt You might also consider having two text%s, one with the names and one with the rest. They would scroll independently in that case, but you can hide the scrollbars on one and

[racket-users] Racket GUI: text aligned to the left of other text

2020-08-10 Thread Christopher Lemmer Webber
Hello, I'm building a little chat application with Racket. Overall Racket's GUI tools are quite comfortable, and I'm just using Rakcet's text editor stuff to build the chat. But a fairly standard thing to do with chat applications is to have text like: (Beware, fixed width ascii art ahead)

Re: [racket-users] macro hiding in raco expand

2020-08-10 Thread Éric Tanter
Thanks Jens and Ryan for your answers! I’ll experiment. — Éric > On Aug 10, 2020, at 11:13 AM, Ryan Culpepper wrote: > > You can use the functions from macro-debugger/expand to do this (within > limits). Here's a very rough example program that reads one term from stdin > and shows its

Re: [racket-users] Can no longer interactively enter! module from the shell

2020-08-10 Thread Sam Tobin-Hochstadt
I tried a few more versions of Racket, and this broke between 6.12 and 7.0, probably due to the new expander at that time. I'm surprised that it works on Racket CS, though. Sam On Mon, Aug 10, 2020 at 10:36 AM Greg Rosenblatt wrote: > > Thanks, your output helped narrow down the issue. It

Re: [racket-users] Can no longer interactively enter! module from the shell

2020-08-10 Thread Greg Rosenblatt
Thanks, your output helped narrow down the issue. It looks like the problem is actually with the regular (non-Chez) variant. When running with Racket v7.8 [cs] I see the same (expected) behavior as you: > racket -ie '(enter! "example.rkt")' Welcome to Racket v7.8 [cs]. loading example

Re: [racket-users] macro hiding in raco expand

2020-08-10 Thread Ryan Culpepper
You can use the functions from macro-debugger/expand to do this (within limits). Here's a very rough example program that reads one term from stdin and shows its expansion with the given hiding policy (discarding hygiene information---beware). usage: racket expand.rkt < your-example-file.rkt

Re: [racket-users] Can no longer interactively enter! module from the shell

2020-08-10 Thread Sam Tobin-Hochstadt
This works for me the way you describe: ``` [samth@huor:/tmp cs-snap] r -ie '(enter! "x.rkt")' Welcome to Racket v7.8.0.7 [cs]. loading example "x.rkt"> example 5 "x.rkt"> ``` Perhaps there was a problem with 7.3 that you're running into? Can you try with the 7.8 release? Sam On Sun, Aug 9,

Re: [racket-users] macro hiding in raco expand

2020-08-10 Thread Jens Axel Søgaard
Hi Éric, This is a nice idea - I pondered the concept before, but today I got a little further. I am unsure whether the approach scales. You could look at nanopass too. Anyways, here is a little experiment. /Jens Axel https://racket-stories.com #lang racket (require (for-syntax syntax/parse

[racket-users] macro hiding in raco expand

2020-08-10 Thread Éric Tanter
Hi, I’d like to use the Racket macro expander to translate programs from a given source language to a target language (both scheme-ish). However, the expansion that `raco expand` does is too violent for my purposes---I would need a way to specify macro hiding (as in the macro stepper), in