Re: [racket-users] How to learn the *core* of Racket?

2021-11-12 Thread Daniel Prager
An alternative answer to the implied question: "How do I learn the core of
the language-oriented features of Racket?"

Check out Beautiful Racket: https://beautifulracket.com

- Dan




On Fri, Nov 12, 2021 at 2:03 PM Philip McGrath 
wrote:

> On Thu, Nov 11, 2021 at 9:20 PM Yushuo Xiao  wrote:
>
>> Thank you very much! I didn't know the set is not fixed. And thinking of
>> them as an IR really helps.
>>
>> On Friday, November 12, 2021 at 12:15:39 AM UTC+8 johnbclements wrote:
>>
>>> That’s a true statement… but that set is by no means fixed.
>>>
>>
> To nitpick a little, while it's true that the set of forms allowed in
> fully expanded programs is not fixed, the last change was in Racket 6.3,
> adding `(quote-syntax datum #:local)` and removing
> `letrec-syntaxes+values`:
> https://docs.racket-lang.org/reference/syntax-model.html#%28part._fully-expanded%29
>
> So, while not fixed, they are in fact quite stable, and the list of
> identifiers is exposed through APIs like the `kernel-literals`
> 
> literal set for `syntax-parse` and, at a lower level,
> `kernel-form-identifier-list`
> 
> and the `syntax/kerncase`
> 
> module. Authors of advanced macros that use `local-expand` and friends need
> a general awareness of their shapes, e.g. to recognize definitions, splice
> `begin`s, or recur into local binding forms, so changes have to be
> unobtrusive to avoid breaking compatibility.
>
> If you're interested in the low-level internals of Racket, you may also
> want to read the manual section on Linklets and the Core Compiler
> .
>
> -Philip
>
> --
> 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/0100017d121a0121-031c9bd8-10ec-45b2-84b3-91c93d4e19bc-00%40email.amazonses.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/CAFKxZVVRy_KiT_trbN-KkrHbP5jeAm5zdAX_Jv8V-mM88t0oSg%40mail.gmail.com.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread Philip McGrath
On Thu, Nov 11, 2021 at 9:20 PM Yushuo Xiao  wrote:

> Thank you very much! I didn't know the set is not fixed. And thinking of
> them as an IR really helps.
>
> On Friday, November 12, 2021 at 12:15:39 AM UTC+8 johnbclements wrote:
>
>> That’s a true statement… but that set is by no means fixed.
>>
>
To nitpick a little, while it's true that the set of forms allowed in fully
expanded programs is not fixed, the last change was in Racket 6.3, adding
`(quote-syntax datum #:local)` and removing `letrec-syntaxes+values`:
https://docs.racket-lang.org/reference/syntax-model.html#%28part._fully-expanded%29

So, while not fixed, they are in fact quite stable, and the list of
identifiers is exposed through APIs like the `kernel-literals`

literal set for `syntax-parse` and, at a lower level,
`kernel-form-identifier-list`

and the `syntax/kerncase`

module. Authors of advanced macros that use `local-expand` and friends need
a general awareness of their shapes, e.g. to recognize definitions, splice
`begin`s, or recur into local binding forms, so changes have to be
unobtrusive to avoid breaking compatibility.

If you're interested in the low-level internals of Racket, you may also
want to read the manual section on Linklets and the Core Compiler
.

-Philip

-- 
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/0100017d121a0121-031c9bd8-10ec-45b2-84b3-91c93d4e19bc-00%40email.amazonses.com.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread Yushuo Xiao
Yes, you are right! I'm not trying to achieve anything. I just want to get 
a better understanding of how Racket works. I generally want to know how 
things work at the lowest possible level, just as learning assembly helps 
me understand C. And sometimes I have trouble learning things under a 
higher abstraction, though I know I should fix that...

On Friday, November 12, 2021 at 12:22:51 AM UTC+8 david@gmail.com wrote:

> Out of curiosity, what is it that you're trying to achieve here?  You're 
> not going to program in the fully-expanded language, you're going to 
> program in something higher level.  Is this purely a "learning assembly 
> code is good because it gives you a better understanding of machine 
> architecture" thing?
>
> On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:
>
>> I've learned some Racket, and can comfortably program in it, but I only 
>> learned it as an ordinary language, much like Scheme. I know Racket is much 
>> more than that, for its "language-oriented" features. Languages become a 
>> first-class member in Racket, and to my understanding, even "#lang racket" 
>> is just a language built on some core. What I want to know is, what's the 
>> very core of Racket?
>>
>> I've noticed that in the Racket Reference there is a section "Fully 
>> Expanded Programs", which seems the very core of Racket. But it still takes 
>> an S-expression form, and apparently Racket allows language customization 
>> on the syntax level. I wonder if the S-expression language is the core of 
>> Racket, or the entire Racket has a different structure?
>>
>> I would really appreciate it if anyone could explain it in a simple way 
>> or could point out some good (and short) material for me to read. The 
>> Racket Reference is too long, and I believe the core Racket can be well 
>> explained in a much shorter piece of text, if I just look for a brief 
>> understanding.
>>
>> Also my question may be confusing, because I don't understand Racket well 
>> at all. Feel free to correct me or ask for clarification. Thanks in advance!
>>
>> -- 
>>
> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/63b1134b-16e4-4447-828a-1e607013bd7cn%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/6647639c-dacf-48bf-9ac6-4fab8f2e8318n%40googlegroups.com.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread James Platt
... and from there it's turtles all the way down.

On Nov 11, 2021, at 9:46 AM, David Storrs wrote:

> Sure, that's as good a definition as any.
> 
> On Thu, Nov 11, 2021, 6:04 AM Yushuo Xiao  wrote:
> Thank you for your comprehensive answer! It helps a lot. I also read more 
> about Racket after I posted the question and now I think that the few special 
> forms (as stated in "fully expanded program") are the core. All languages 
> built in Racket will parse and convert their syntax into syntax objects 
> (S-expressions) and then expand to these special forms. Am I right?
> 
> On Sunday, November 7, 2021 at 6:53:53 AM UTC+8 david@gmail.com wrote:
> Hi Yushuo,
> 
> On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:
> I've learned some Racket, and can comfortably program in it, but I only 
> learned it as an ordinary language, much like Scheme. I know Racket is much 
> more than that, for its "language-oriented" features. Languages become a 
> first-class member in Racket, and to my understanding, even "#lang racket" is 
> just a language built on some core. What I want to know is, what's the very 
> core of Racket?
> 
> It depends on where you stop measuring.  You could argue that...
> 
> ...#lang racket  is the core, because it's what comes in the installation.  
> Things like gregor, struct-plus-plus, and csv-reading are packages that you 
> install from http://pkgs.racket-lang.org/ and are therefore outside the core.
> 
> ...#lang racket/base is the core, because it's the most limited set of Racket 
> that comes by default.  It mostly consists of only the basic list 
> manipulation functions, and if you want to use other things then you need to 
> include relevant libraries such as racket/match (giving you the 'match' 
> special form) or racket/format (giving you the ~a function), or racket-string 
> (giving you the string-length function), etc.
> 
> ...Raw lambdas and a few special forms are the core, because everything 
> compiles down to those.  (Approximately speaking.)
> 
> ...Lambda calculus is the core, because it's what all LISP descendants are 
> based on.
> 
> Once you start talking about other Racket languages with different syntax and 
> semantics, well then all bets are off.
> 
> 
> Does this help?
> 
> 
> I've noticed that in the Racket Reference there is a section "Fully Expanded 
> Programs", which seems the very core of Racket. But it still takes an 
> S-expression form, and apparently Racket allows language customization on the 
> syntax level. I wonder if the S-expression language is the core of Racket, or 
> the entire Racket has a different structure?
> 
> I would really appreciate it if anyone could explain it in a simple way or 
> could point out some good (and short) material for me to read. The Racket 
> Reference is too long, and I believe the core Racket can be well explained in 
> a much shorter piece of text, if I just look for a brief understanding.
> 
> Also my question may be confusing, because I don't understand Racket well at 
> all. Feel free to correct me or ask for clarification. Thanks in advance!
> 
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/63b1134b-16e4-4447-828a-1e607013bd7cn%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/6929457c-459f-4c25-94c0-ea973b121c65n%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/CAE8gKoc-8rGaY%2BF2nDLR5BULe1tGnO5BnGAZt-DgBmhCVg_9dw%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/CEEAE11F-8185-461E-8DDF-C640330E8F91%40biomantica.com.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread David Storrs
Out of curiosity, what is it that you're trying to achieve here?  You're
not going to program in the fully-expanded language, you're going to
program in something higher level.  Is this purely a "learning assembly
code is good because it gives you a better understanding of machine
architecture" thing?

On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:

> I've learned some Racket, and can comfortably program in it, but I only
> learned it as an ordinary language, much like Scheme. I know Racket is much
> more than that, for its "language-oriented" features. Languages become a
> first-class member in Racket, and to my understanding, even "#lang racket"
> is just a language built on some core. What I want to know is, what's the
> very core of Racket?
>
> I've noticed that in the Racket Reference there is a section "Fully
> Expanded Programs", which seems the very core of Racket. But it still takes
> an S-expression form, and apparently Racket allows language customization
> on the syntax level. I wonder if the S-expression language is the core of
> Racket, or the entire Racket has a different structure?
>
> I would really appreciate it if anyone could explain it in a simple way or
> could point out some good (and short) material for me to read. The Racket
> Reference is too long, and I believe the core Racket can be well explained
> in a much shorter piece of text, if I just look for a brief understanding.
>
> Also my question may be confusing, because I don't understand Racket well
> at all. Feel free to correct me or ask for clarification. Thanks in advance!
>
> --
> 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/63b1134b-16e4-4447-828a-1e607013bd7cn%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/CAE8gKocDJQZjJc1WBBQpFekUsJLC_HN4quDXkgPmLXDQ9PEy6A%40mail.gmail.com.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread 'John Clements' via Racket Users
> On Nov 11, 2021, at 03:04, Yushuo Xiao  wrote:
> 
> Thank you for your comprehensive answer! It helps a lot. I also read more 
> about Racket after I posted the question and now I think that the few special 
> forms (as stated in "fully expanded program") are the core. All languages 
> built in Racket will parse and convert their syntax into syntax objects 
> (S-expressions) and then expand to these special forms. Am I right?

That’s a true statement… but that set is by no means fixed. These core forms 
then get compiled into native code (in CS) or bytecode (in BC), and changing 
this core set is certainly possible. It’s probably wiser to think of these core 
forms as an intermediate representation language in a compiler. I would agree 
that it’s an important IR, in that it’s essentially a subset of the racket 
language itself, but it’s definitely not an immutable ideal.

Apologies as always if you knew all this already,

John Clements

> 
> On Sunday, November 7, 2021 at 6:53:53 AM UTC+8 david@gmail.com wrote:
> Hi Yushuo,
> 
> On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:
> I've learned some Racket, and can comfortably program in it, but I only 
> learned it as an ordinary language, much like Scheme. I know Racket is much 
> more than that, for its "language-oriented" features. Languages become a 
> first-class member in Racket, and to my understanding, even "#lang racket" is 
> just a language built on some core. What I want to know is, what's the very 
> core of Racket?
> 
> It depends on where you stop measuring.  You could argue that...
> 
> ...#lang racket  is the core, because it's what comes in the installation.  
> Things like gregor, struct-plus-plus, and csv-reading are packages that you 
> install from http://pkgs.racket-lang.org/ and are therefore outside the core.
> 
> ...#lang racket/base is the core, because it's the most limited set of Racket 
> that comes by default.  It mostly consists of only the basic list 
> manipulation functions, and if you want to use other things then you need to 
> include relevant libraries such as racket/match (giving you the 'match' 
> special form) or racket/format (giving you the ~a function), or racket-string 
> (giving you the string-length function), etc.
> 
> ...Raw lambdas and a few special forms are the core, because everything 
> compiles down to those.  (Approximately speaking.)
> 
> ...Lambda calculus is the core, because it's what all LISP descendants are 
> based on.
> 
> Once you start talking about other Racket languages with different syntax and 
> semantics, well then all bets are off.
> 
> 
> Does this help?
> 
> 
> I've noticed that in the Racket Reference there is a section "Fully Expanded 
> Programs", which seems the very core of Racket. But it still takes an 
> S-expression form, and apparently Racket allows language customization on the 
> syntax level. I wonder if the S-expression language is the core of Racket, or 
> the entire Racket has a different structure?
> 
> I would really appreciate it if anyone could explain it in a simple way or 
> could point out some good (and short) material for me to read. The Racket 
> Reference is too long, and I believe the core Racket can be well explained in 
> a much shorter piece of text, if I just look for a brief understanding.
> 
> Also my question may be confusing, because I don't understand Racket well at 
> all. Feel free to correct me or ask for clarification. Thanks in advance!
> 
> -- 
> 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...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/63b1134b-16e4-4447-828a-1e607013bd7cn%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/6929457c-459f-4c25-94c0-ea973b121c65n%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/228e0447-5d7e-4d88-870a-8aada5b31aa1%40mtasv.net.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread David Storrs
Sure, that's as good a definition as any.

On Thu, Nov 11, 2021, 6:04 AM Yushuo Xiao  wrote:

> Thank you for your comprehensive answer! It helps a lot. I also read more
> about Racket after I posted the question and now I think that the few
> special forms (as stated in "fully expanded program") are the core. All
> languages built in Racket will parse and convert their syntax into syntax
> objects (S-expressions) and then expand to these special forms. Am I right?
>
> On Sunday, November 7, 2021 at 6:53:53 AM UTC+8 david@gmail.com wrote:
>
>> Hi Yushuo,
>>
>> On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:
>>
>>> I've learned some Racket, and can comfortably program in it, but I only
>>> learned it as an ordinary language, much like Scheme. I know Racket is much
>>> more than that, for its "language-oriented" features. Languages become a
>>> first-class member in Racket, and to my understanding, even "#lang racket"
>>> is just a language built on some core. What I want to know is, what's the
>>> very core of Racket?
>>
>>
>> It depends on where you stop measuring.  You could argue that...
>>
>> ...#lang racket  is the core, because it's what comes in the
>> installation.  Things like gregor, struct-plus-plus, and csv-reading are
>> packages that you install from http://pkgs.racket-lang.org/ and are
>> therefore outside the core.
>>
>> ...#lang racket/base is the core, because it's the most limited set of
>> Racket that comes by default.  It mostly consists of only the basic list
>> manipulation functions, and if you want to use other things then you need
>> to include relevant libraries such as racket/match (giving you the 'match'
>> special form) or racket/format (giving you the ~a function), or
>> racket-string (giving you the string-length function), etc.
>>
>> ...Raw lambdas and a few special forms are the core, because everything
>> compiles down to those.  (Approximately speaking.)
>>
>> ...Lambda calculus is the core, because it's what all LISP descendants
>> are based on.
>>
>> Once you start talking about other Racket languages with different syntax
>> and semantics, well then all bets are off.
>>
>>
>> Does this help?
>>
>>
>>> I've noticed that in the Racket Reference there is a section "Fully
>>> Expanded Programs", which seems the very core of Racket. But it still takes
>>> an S-expression form, and apparently Racket allows language customization
>>> on the syntax level. I wonder if the S-expression language is the core of
>>> Racket, or the entire Racket has a different structure?
>>>
>>> I would really appreciate it if anyone could explain it in a simple way
>>> or could point out some good (and short) material for me to read. The
>>> Racket Reference is too long, and I believe the core Racket can be well
>>> explained in a much shorter piece of text, if I just look for a brief
>>> understanding.
>>>
>>> Also my question may be confusing, because I don't understand Racket
>>> well at all. Feel free to correct me or ask for clarification. Thanks in
>>> advance!
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/racket-users/63b1134b-16e4-4447-828a-1e607013bd7cn%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/6929457c-459f-4c25-94c0-ea973b121c65n%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/CAE8gKoc-8rGaY%2BF2nDLR5BULe1tGnO5BnGAZt-DgBmhCVg_9dw%40mail.gmail.com.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-11 Thread Yushuo Xiao
Thank you for your comprehensive answer! It helps a lot. I also read more 
about Racket after I posted the question and now I think that the few 
special forms (as stated in "fully expanded program") are the core. All 
languages built in Racket will parse and convert their syntax into syntax 
objects (S-expressions) and then expand to these special forms. Am I right?

On Sunday, November 7, 2021 at 6:53:53 AM UTC+8 david@gmail.com wrote:

> Hi Yushuo,
>
> On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:
>
>> I've learned some Racket, and can comfortably program in it, but I only 
>> learned it as an ordinary language, much like Scheme. I know Racket is much 
>> more than that, for its "language-oriented" features. Languages become a 
>> first-class member in Racket, and to my understanding, even "#lang racket" 
>> is just a language built on some core. What I want to know is, what's the 
>> very core of Racket?
>
>
> It depends on where you stop measuring.  You could argue that...
>
> ...#lang racket  is the core, because it's what comes in the 
> installation.  Things like gregor, struct-plus-plus, and csv-reading are 
> packages that you install from http://pkgs.racket-lang.org/ and are 
> therefore outside the core.
>
> ...#lang racket/base is the core, because it's the most limited set of 
> Racket that comes by default.  It mostly consists of only the basic list 
> manipulation functions, and if you want to use other things then you need 
> to include relevant libraries such as racket/match (giving you the 'match' 
> special form) or racket/format (giving you the ~a function), or 
> racket-string (giving you the string-length function), etc.
>
> ...Raw lambdas and a few special forms are the core, because everything 
> compiles down to those.  (Approximately speaking.)
>
> ...Lambda calculus is the core, because it's what all LISP descendants are 
> based on.
>
> Once you start talking about other Racket languages with different syntax 
> and semantics, well then all bets are off.
>
>
> Does this help?
>
>
>> I've noticed that in the Racket Reference there is a section "Fully 
>> Expanded Programs", which seems the very core of Racket. But it still takes 
>> an S-expression form, and apparently Racket allows language customization 
>> on the syntax level. I wonder if the S-expression language is the core of 
>> Racket, or the entire Racket has a different structure?
>>
>> I would really appreciate it if anyone could explain it in a simple way 
>> or could point out some good (and short) material for me to read. The 
>> Racket Reference is too long, and I believe the core Racket can be well 
>> explained in a much shorter piece of text, if I just look for a brief 
>> understanding.
>>
>> Also my question may be confusing, because I don't understand Racket well 
>> at all. Feel free to correct me or ask for clarification. Thanks in advance!
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/63b1134b-16e4-4447-828a-1e607013bd7cn%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/6929457c-459f-4c25-94c0-ea973b121c65n%40googlegroups.com.


Re: [racket-users] How to learn the *core* of Racket?

2021-11-06 Thread David Storrs
Hi Yushuo,

On Sat, Nov 6, 2021 at 5:33 AM Yushuo Xiao  wrote:

> I've learned some Racket, and can comfortably program in it, but I only
> learned it as an ordinary language, much like Scheme. I know Racket is much
> more than that, for its "language-oriented" features. Languages become a
> first-class member in Racket, and to my understanding, even "#lang racket"
> is just a language built on some core. What I want to know is, what's the
> very core of Racket?


It depends on where you stop measuring.  You could argue that...

...#lang racket  is the core, because it's what comes in the installation.
Things like gregor, struct-plus-plus, and csv-reading are packages that you
install from http://pkgs.racket-lang.org/ and are therefore outside the
core.

...#lang racket/base is the core, because it's the most limited set of
Racket that comes by default.  It mostly consists of only the basic list
manipulation functions, and if you want to use other things then you need
to include relevant libraries such as racket/match (giving you the 'match'
special form) or racket/format (giving you the ~a function), or
racket-string (giving you the string-length function), etc.

...Raw lambdas and a few special forms are the core, because everything
compiles down to those.  (Approximately speaking.)

...Lambda calculus is the core, because it's what all LISP descendants are
based on.

Once you start talking about other Racket languages with different syntax
and semantics, well then all bets are off.


Does this help?


> I've noticed that in the Racket Reference there is a section "Fully
> Expanded Programs", which seems the very core of Racket. But it still takes
> an S-expression form, and apparently Racket allows language customization
> on the syntax level. I wonder if the S-expression language is the core of
> Racket, or the entire Racket has a different structure?
>
> I would really appreciate it if anyone could explain it in a simple way or
> could point out some good (and short) material for me to read. The Racket
> Reference is too long, and I believe the core Racket can be well explained
> in a much shorter piece of text, if I just look for a brief understanding.
>
> Also my question may be confusing, because I don't understand Racket well
> at all. Feel free to correct me or ask for clarification. Thanks in advance!
>
> --
> 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/63b1134b-16e4-4447-828a-1e607013bd7cn%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/CAE8gKodVp3XKRnQc165F%2Bav001L86BOvTE_sPvdrpkx5FY4VdQ%40mail.gmail.com.


[racket-users] How to learn the *core* of Racket?

2021-11-06 Thread Yushuo Xiao
I've learned some Racket, and can comfortably program in it, but I only 
learned it as an ordinary language, much like Scheme. I know Racket is much 
more than that, for its "language-oriented" features. Languages become a 
first-class member in Racket, and to my understanding, even "#lang racket" 
is just a language built on some core. What I want to know is, what's the 
very core of Racket?

I've noticed that in the Racket Reference there is a section "Fully 
Expanded Programs", which seems the very core of Racket. But it still takes 
an S-expression form, and apparently Racket allows language customization 
on the syntax level. I wonder if the S-expression language is the core of 
Racket, or the entire Racket has a different structure?

I would really appreciate it if anyone could explain it in a simple way or 
could point out some good (and short) material for me to read. The Racket 
Reference is too long, and I believe the core Racket can be well explained 
in a much shorter piece of text, if I just look for a brief understanding.

Also my question may be confusing, because I don't understand Racket well 
at all. Feel free to correct me or ask for clarification. Thanks in advance!

-- 
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/63b1134b-16e4-4447-828a-1e607013bd7cn%40googlegroups.com.