Re: [racket-users] Re: Keeping my mind sharp

2019-05-11 Thread Matthias Felleisen


> On May 11, 2019, at 8:41 PM, Josh Rubin  wrote:
> 
> 
> This is going to be easier than I thought. Nobody told me (mostly-equal? 
> Racket Scheme)
> 
> Racket seems to be a superset of the Scheme I know, with more restrictions on 
> mutation. I was conservative about mutations. My worst habit was using 
> "reverse!" and "append!". They are used in stereotypical ways or hidden 
> behind a layer of data abstraction, so they won't cause trouble. I need to 
> box some stuff. Many of the things I used macros for are now natively 
> supported. Old style macros are still there until I learn the shiny new 
> hygienic macros. 
> 
> I have to relearn the programming environment - editing, debugging, and 
> packaging. I want to know what is underneath the surface. As someone told me, 
> I really should learn git.


Josh, 

as the old guy on the Racket team, welcome to our world. I am so old, I was 
almost on the Texas Instrument Scheme team :) As you discovered Racket is a 
descendant of Scheme. I’d like to use the phrase it is Scheme’s heir but that 
would mean Scheme is daed, but the species of cockroach doesn't die out. 

As several people mentioned, you want to 

— port some sample programs from your 1980s TI Scheme days to Racket 
— .. other than the removal of mutable lists that will work. 

Let me recommend a second step. Find some of the modern features of Racket to 
make the code Racket-y. That’s what we call it when code uses the most basic 
Racket ideas: 

— https://docs.racket-lang.org/style/index.html?q=Style 
 
— use modules to split your code into comprehensive units, use nested 
defines, mingle them with expressions 
— if you touched CLOS, we have a class system with mixins 
— trade map for for/list and friends 
(https://docs.racket-lang.org/reference/for.html?q=for%2Flist 
); loops that don’t 
need set! 

The third step would be to design a language that makes your programs “just 
run”, because Racket’s major trick is “language-oriented programming”. 

One step on the way to #lang’s is to re-learn macros. Texas Instruments dabbled 
with Kohlbecker’s hygienic macros but don’t be confused about two different 
things that got conflated back then: 

— macros that get lexical scope right for you while you don’t have to 
think about most of the time 
— macros that use pattern-matching facilities to check basic properties 
of the surface 

Once you have basic macros down, you will climb the hill to macro design 
patterns. But I am sure we will hear from you before that, and as you can tell, 
people will help out 

— Matthias

 



-- 
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/07B9D909-51A0-4CE2-8690-C28A2D5AA0E2%40felleisen.org.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Keeping my mind sharp

2019-05-11 Thread Josh Rubin


This is going to be easier than I thought. Nobody told me (mostly-equal? 
Racket Scheme)


Racket seems to be a superset of the Scheme I know, with more 
restrictions on mutation. I was conservative about mutations. My worst 
habit was using "reverse!" and "append!". They are used in stereotypical 
ways or hidden behind a layer of data abstraction, so they won't cause 
trouble. I need to box some stuff. Many of the things I used macros for 
are now natively supported. Old style macros are still there until I 
learn the shiny new hygienic macros.


I have to relearn the programming environment - editing, debugging, and 
packaging. I want to know what is underneath the surface. As someone 
told me, I really should learn git.


--

Josh Rubin
jlru...@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/b53ecb25-76d1-049d-ced0-39cb1e435903%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Keeping my mind sharp

2019-05-11 Thread Greg Hendershott


Greg Hendershott  writes:
> Idea: The cool kids these days tend to create an account on GitHub or
> GitLab. That way, other folks can see the code and more easily offer
> advice. Plus, the commit history is itself a story about your journey
> doing this. The commit messages can even be sort of mini blog posts,
> draft material for real blog posts.

To expand on this. I mostly wrote Turbo Pascal and C code in the 80s.
Today I mostly write Racket. Going from C/Pascal to Racket, is a big
change. :)

But also important: In the 80s I mostly didn't use version control. (In
the 90s, I mostly used version control systems that mostly were awful.)

So: Git is also a change. A big change. At least for me. I commit early
and often. It's a way to leave a trail of breadcrumbs. What was I
thinking? How the heck did I get here? How can I back up and get out?
You could think of it as a kind of persistent undo system. (Plus it can
be an undo _tree_: You can quickly/cheaply make branches to explore
different approaches, in parallel.)

That change may or may not be something that you want to embrace. I just
wanted to clarify that using Git{Hub Lab} as a kind of "coding social
network" is only part of the story when it comes to Git.

-- 
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/87sgtk3gg1.fsf%40greghendershott.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Keeping my mind sharp

2019-05-11 Thread Greg Hendershott


Others will have better advice, but a few thoughts:

Josh Rubin  writes:
> I have questions.
> (1) Should I be trying to *port* old Scheme code to Racket (a big job) or
> should I be *creating a language* that mostly runs the old code as is?

As an early "warm-up" step, maybe try to port some small chunk(s) of
your old Scheme code to Racket, by hand? You'll start to learn some of
the issues -- get a feel for what might be involved if you were to port
the rest by hand, or, depend more on "adapter" code, or, even create a
full #lang.

To attempt the last of these right off the bat, might be overwhelming?
It would be, to me. But I guess it depends on your learning style. Also
it depends whether you like to work more "top down" vs. "bottom up".

People who know older Scheme dialects better than me might have
more-specific tips.

> (2) Should I record all my false starts and confusions in a blog called "An
> old man tries to learn Racket"?
> Might interest struggling racketeers, or people who try to teach them.

That would be great!

Idea: The cool kids these days tend to create an account on GitHub or
GitLab. That way, other folks can see the code and more easily offer
advice. Plus, the commit history is itself a story about your journey
doing this. The commit messages can even be sort of mini blog posts,
draft material for real blog posts.

-- 
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/87tve03hkv.fsf%40greghendershott.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Keeping my mind sharp

2019-05-11 Thread Disgruntled Kangaroo
On Sat, May 11, 2019 at 11:27:06AM -0700, Josh Rubin wrote:
> 
> 
> On Saturday, May 11, 2019 at 10:15:56 AM UTC-4, Josh Rubin wrote:
> 
> 
> I apologize for replying to myself.
> 
> They say "Hello World" is the hardest program, because you have to stumble 
> so much.
> Without reading any documentation I put some plausible stuff in a text 
> file. I now have a 13 MB executable that can be distributed and prints 
> "Hello World."
> 
> I have questions.
> (1) Should I be trying to *port* old Scheme code to Racket (a big job) or 
> should I be *creating a language* that mostly runs the old code as is?

Honestly, I think I'd try both. If your trying to get back into coding,
porting one program over and trying to write a new language for the other(s)
may well teach you things taking one approach over the other wouldn't have.
YMMV, of course.

> 
> (2) Should I record all my false starts and confusions in a blog called "An 
> old man tries to learn Racket"?
> Might interest struggling racketeers, or people who try to teach them.

I'd read it.


-- 
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/20190511192110.GA29575%40selen.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Keeping my mind sharp

2019-05-11 Thread Josh Rubin


On Saturday, May 11, 2019 at 10:15:56 AM UTC-4, Josh Rubin wrote:


I apologize for replying to myself.

They say "Hello World" is the hardest program, because you have to stumble 
so much.
Without reading any documentation I put some plausible stuff in a text 
file. I now have a 13 MB executable that can be distributed and prints 
"Hello World."

I have questions.
(1) Should I be trying to *port* old Scheme code to Racket (a big job) or 
should I be *creating a language* that mostly runs the old code as is?

(2) Should I record all my false starts and confusions in a blog called "An 
old man tries to learn Racket"?
Might interest struggling racketeers, or people who try to teach them.

-- 
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/68694625-4a0a-4b0a-8be2-39aa6fb48312%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.