Re: [racket-users] Clearer code in DrRacket?

2020-10-10 Thread Sorawee Porncharoenwase
>
> Looks interesting. Do you know any package of this type for DrRacket (or
> another program) that works semantically while you program? (not just as a
> checking tool like View Syntax)
>

I think it would be difficult.

Racket has macros, and it allows shadowing on anything. The attached image
shows how `(if 1 2 3)` is colored differently by Check Syntax due to the
interaction with macros and shadowing.

[image: Screen Shot 2020-10-10 at 10.07.00.png]

To identify which context `(if 1 2 3)` is in, you need to macro-expand the
program and then analyze the expanded program (this is exactly what the
Check Syntax button does). However, macro expansion could be very
expensive. Syntax highlighting on the other hand is supposed to be very
cheap and done immediately as you edit the program. I believe this is why
DrRacket doesn't support syntax highlighting that you described.

If you are OK with a delay (you type something and it's colored, say, 10
seconds later), I think it's possible to use the result from the online
Check Syntax, which macro-expands your program continuously in the
background, to color the program.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CADcuegsmhJdts%3DmvtAAOk%2B1uQ13o_2dTSQEKMBKt0hLrHfVDVA%40mail.gmail.com.


Re: [racket-users] Clearer code in DrRacket?

2020-10-10 Thread Adam El Mazouari
Looks interesting. Do you know any package of this type for DrRacket (or
another program) that works semantically while you program? (not just as a
checking tool like View Syntax)

--Adam.

On Fri, Oct 9, 2020 at 7:48 PM Shu-Hung You 
wrote:

> Here is an example that provides different colors for some particular
> forms such as define, require, lambda etc. However, these forms
> ('keywords') are recognized literally by the lexer instead of
> semantically as in Check Syntax. Therefore it will classify
> non-keywords as keywords from time to time.
> https://github.com/shhyou/drracket-scheme-dark-green
>
> More color schemes can be found here:
> https://pkgd.racket-lang.org/pkgn/search?tags=colorscheme
>
> On Fri, Oct 9, 2020 at 9:12 AM Adam El Mazouari
>  wrote:
> >
> > An example is this:
> >
> > (define (square-all lst) (if (null? lst)
> >
> > '()
> > (cons (square (car lst))
> >
> > (square-all (cdr lst)
> >
> >
> > As you can see, you've got:
> >
> > methods included by default (define, cons)
> > booleans (null?)
> > user-introduced vars (lst)
> >
> > shown in the same color. It's really not clear. I'd like for them to be
> in different colors.
> >
> > --Adam.
> >
> > On Fri, Oct 9, 2020 at 3:35 PM Sam Tobin-Hochstadt 
> wrote:
> >>
> >> Can you give an example of which things you'd like to be different? We
> >> usually use "variable" and "identifier" for very similar meanings when
> >> discussing Racket, for example.
> >>
> >> Sam
> >>
> >> On Fri, Oct 9, 2020 at 8:16 AM Adam El Mazouari
> >>  wrote:
> >> >
> >> > Hello everyone.
> >> >
> >> > I've started using DrRacket a couple of weeks ago and I can't get
> used to the color theme. Variables, identifiers, methods, all of them are
> in blue. It's really unintuitive. Does anybody know a good plugin that
> differentiates these in a clear way for the human eye?
> >> >
> >> > Or, if you know something better than DrRacket in that regard, feel
> free to write down.
> >> >
> >> > Thanks in advance!
> >> >
> >> > Adam
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> >> > To unsubscribe from this group and stop receiving emails from it,
> send an email to racket-users+unsubscr...@googlegroups.com.
> >> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/0ddf205e-c461-40d3-857b-4b5f75e60284n%40googlegroups.com
> .
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAEGV_UybZ_m15Np%2BrJ51JWPhVkMhahESp9pRUet1%3DOTG5YOddQ%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAEGV_Uwn0giLDHLdqhbX07kMgMLOKvyukpEUBY3Dj7ZqmfqBCA%40mail.gmail.com.


Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread Shu-Hung You
Here is an example that provides different colors for some particular
forms such as define, require, lambda etc. However, these forms
('keywords') are recognized literally by the lexer instead of
semantically as in Check Syntax. Therefore it will classify
non-keywords as keywords from time to time.
https://github.com/shhyou/drracket-scheme-dark-green

More color schemes can be found here:
https://pkgd.racket-lang.org/pkgn/search?tags=colorscheme

On Fri, Oct 9, 2020 at 9:12 AM Adam El Mazouari
 wrote:
>
> An example is this:
>
> (define (square-all lst) (if (null? lst)
>
> '()
> (cons (square (car lst))
>
> (square-all (cdr lst)
>
>
> As you can see, you've got:
>
> methods included by default (define, cons)
> booleans (null?)
> user-introduced vars (lst)
>
> shown in the same color. It's really not clear. I'd like for them to be in 
> different colors.
>
> --Adam.
>
> On Fri, Oct 9, 2020 at 3:35 PM Sam Tobin-Hochstadt  
> wrote:
>>
>> Can you give an example of which things you'd like to be different? We
>> usually use "variable" and "identifier" for very similar meanings when
>> discussing Racket, for example.
>>
>> Sam
>>
>> On Fri, Oct 9, 2020 at 8:16 AM Adam El Mazouari
>>  wrote:
>> >
>> > Hello everyone.
>> >
>> > I've started using DrRacket a couple of weeks ago and I can't get used to 
>> > the color theme. Variables, identifiers, methods, all of them are in blue. 
>> > It's really unintuitive. Does anybody know a good plugin that 
>> > differentiates these in a clear way for the human eye?
>> >
>> > Or, if you know something better than DrRacket in that regard, feel free 
>> > to write down.
>> >
>> > Thanks in advance!
>> >
>> > Adam
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Racket Users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to racket-users+unsubscr...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/racket-users/0ddf205e-c461-40d3-857b-4b5f75e60284n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAEGV_UybZ_m15Np%2BrJ51JWPhVkMhahESp9pRUet1%3DOTG5YOddQ%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAMTzy%2Ba6DJR8OeqdOors%3D5HbbV7VxT%3DTmrt6U46OK8hzF2oc9w%40mail.gmail.com.


Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread George Neuner


On 10/9/2020 10:11 AM, Adam El Mazouari wrote:

An example is this:

(define (square-all lst) (if (null? lst)

'()
(cons (square (car lst))

(square-all (cdr lst)


As you can see, you've got:

  * methods included by default (define, cons)
  * booleans (null?)
  * user-introduced vars (lst)

shown in the same color. It's really not clear. I'd like for them to 
be in different colors.


--Adam.


The colors of most things in DrRacket are adjustable: see Preferences in 
the Edit menu.  There are several general color schemes and/or you can 
set colors individually for most syntax items.


Note that there are multiple (2nd level) tabs under Color [and also 
under Editing].


George






















--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/d343842b-44ee-df36-2ac9-31b3b8e3ead3%40comcast.net.


Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread Sam Tobin-Hochstadt
If you'd like to see different colors for imported identifiers, then
you can click the "Check Syntax" button in DrRacket. The attached
picture shows what it looks like.

Note that there's not a difference between `cons` and `null?` because
those are both functions.

You can adjust the particular colors chosen in the Preferences dialog,
under the Check Syntax tab.

Sam


On Fri, Oct 9, 2020 at 10:12 AM Adam El Mazouari
 wrote:
>
> An example is this:
>
> (define (square-all lst) (if (null? lst)
>
> '()
> (cons (square (car lst))
>
> (square-all (cdr lst)
>
>
> As you can see, you've got:
>
> methods included by default (define, cons)
> booleans (null?)
> user-introduced vars (lst)
>
> shown in the same color. It's really not clear. I'd like for them to be in 
> different colors.
>
> --Adam.
>
> On Fri, Oct 9, 2020 at 3:35 PM Sam Tobin-Hochstadt  
> wrote:
>>
>> Can you give an example of which things you'd like to be different? We
>> usually use "variable" and "identifier" for very similar meanings when
>> discussing Racket, for example.
>>
>> Sam
>>
>> On Fri, Oct 9, 2020 at 8:16 AM Adam El Mazouari
>>  wrote:
>> >
>> > Hello everyone.
>> >
>> > I've started using DrRacket a couple of weeks ago and I can't get used to 
>> > the color theme. Variables, identifiers, methods, all of them are in blue. 
>> > It's really unintuitive. Does anybody know a good plugin that 
>> > differentiates these in a clear way for the human eye?
>> >
>> > Or, if you know something better than DrRacket in that regard, feel free 
>> > to write down.
>> >
>> > Thanks in advance!
>> >
>> > Adam
>> >
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "Racket Users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send an 
>> > email to racket-users+unsubscr...@googlegroups.com.
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/racket-users/0ddf205e-c461-40d3-857b-4b5f75e60284n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BZdgni1PJDnUXEv38TD11AnyNoOeTA65wXBqc6YXK%2BesQ%40mail.gmail.com.


Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread Adam El Mazouari
... and what is this thing exactly?

--Adam.


On Fri, Oct 9, 2020 at 4:15 PM Jason Hemann  wrote:

> https://racket-mode.com/
>
> 
>
> ¯\_(ツ)_/¯
>
> JBH
>
> On Fri, Oct 9, 2020 at 10:12 AM Adam El Mazouari <
> adam.elmazou...@gmail.com> wrote:
>
>> An example is this:
>>
>> (define (square-all lst) (if (null? lst)
>>
>> '()
>> (cons (square (car lst))
>>
>> (square-all (cdr lst)
>>
>> As you can see, you've got:
>>
>>- methods included by default (define, cons)
>>- booleans (null?)
>>- user-introduced vars (lst)
>>
>> shown in the same color. It's really not clear. I'd like for them to be
>> in different colors.
>>
>> --Adam.
>>
>> On Fri, Oct 9, 2020 at 3:35 PM Sam Tobin-Hochstadt 
>> wrote:
>>
>>> Can you give an example of which things you'd like to be different? We
>>> usually use "variable" and "identifier" for very similar meanings when
>>> discussing Racket, for example.
>>>
>>> Sam
>>>
>>> On Fri, Oct 9, 2020 at 8:16 AM Adam El Mazouari
>>>  wrote:
>>> >
>>> > Hello everyone.
>>> >
>>> > I've started using DrRacket a couple of weeks ago and I can't get used
>>> to the color theme. Variables, identifiers, methods, all of them are in
>>> blue. It's really unintuitive. Does anybody know a good plugin that
>>> differentiates these in a clear way for the human eye?
>>> >
>>> > Or, if you know something better than DrRacket in that regard, feel
>>> free to write down.
>>> >
>>> > Thanks in advance!
>>> >
>>> > Adam
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "Racket Users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email to racket-users+unsubscr...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/racket-users/0ddf205e-c461-40d3-857b-4b5f75e60284n%40googlegroups.com
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/racket-users/CAEGV_UybZ_m15Np%2BrJ51JWPhVkMhahESp9pRUet1%3DOTG5YOddQ%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> JBH
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAEGV_Uz05Xjg6z3S_MavqZeKh2QFkH6usnF9cdFUGZ5dtRGHqA%40mail.gmail.com.


Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread Adam El Mazouari
An example is this:

(define (square-all lst) (if (null? lst)

'()
(cons (square (car lst))

(square-all (cdr lst)

As you can see, you've got:

   - methods included by default (define, cons)
   - booleans (null?)
   - user-introduced vars (lst)

shown in the same color. It's really not clear. I'd like for them to be in
different colors.

--Adam.

On Fri, Oct 9, 2020 at 3:35 PM Sam Tobin-Hochstadt 
wrote:

> Can you give an example of which things you'd like to be different? We
> usually use "variable" and "identifier" for very similar meanings when
> discussing Racket, for example.
>
> Sam
>
> On Fri, Oct 9, 2020 at 8:16 AM Adam El Mazouari
>  wrote:
> >
> > Hello everyone.
> >
> > I've started using DrRacket a couple of weeks ago and I can't get used
> to the color theme. Variables, identifiers, methods, all of them are in
> blue. It's really unintuitive. Does anybody know a good plugin that
> differentiates these in a clear way for the human eye?
> >
> > Or, if you know something better than DrRacket in that regard, feel free
> to write down.
> >
> > Thanks in advance!
> >
> > Adam
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/0ddf205e-c461-40d3-857b-4b5f75e60284n%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAEGV_UybZ_m15Np%2BrJ51JWPhVkMhahESp9pRUet1%3DOTG5YOddQ%40mail.gmail.com.


Re: [racket-users] Clearer code in DrRacket?

2020-10-09 Thread Sam Tobin-Hochstadt
Can you give an example of which things you'd like to be different? We
usually use "variable" and "identifier" for very similar meanings when
discussing Racket, for example.

Sam

On Fri, Oct 9, 2020 at 8:16 AM Adam El Mazouari
 wrote:
>
> Hello everyone.
>
> I've started using DrRacket a couple of weeks ago and I can't get used to the 
> color theme. Variables, identifiers, methods, all of them are in blue. It's 
> really unintuitive. Does anybody know a good plugin that differentiates these 
> in a clear way for the human eye?
>
> Or, if you know something better than DrRacket in that regard, feel free to 
> write down.
>
> Thanks in advance!
>
> Adam
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/0ddf205e-c461-40d3-857b-4b5f75e60284n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAK%3DHD%2BbdbpLX7Ozz8ecORr9VC-BQF3kW0izkCvjJMuia81EaMA%40mail.gmail.com.


[racket-users] Clearer code in DrRacket?

2020-10-09 Thread Adam El Mazouari
Hello everyone.

I've started using DrRacket a couple of weeks ago and I can't get used to 
the color theme. Variables, identifiers, methods, all of them are in blue. 
It's really unintuitive. Does anybody know a good plugin that 
differentiates these in a clear way for the human eye? 

Or, if you know something better than DrRacket in that regard, feel free to 
write down.

Thanks in advance!

Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/0ddf205e-c461-40d3-857b-4b5f75e60284n%40googlegroups.com.