Re: [racket-users] Racket for Kids in 2017

2017-05-28 Thread Neil Van Dyke
Stephen De Gabrielle wrote on 05/28/2017 09:08 AM: > But don't discount the potential of throwing a young child at a computer with > only non-child software on it, and let them figure out > how to do what they want, much on their own. That's how the early-1980s > home computer kids got started,

Re: [racket-users] making a language that can return the body of a function

2017-05-28 Thread Vityou
I just noticed that the stepper for intermediate student with lambda pretty much does what I want. I guess I can look into that. On Sunday, May 28, 2017 at 7:55:08 PM UTC-6, Matthias Felleisen wrote: > I misunderstood because of your mismatched parentheses. Without eval, you > can’t do better t

Re: [racket-users] using a created language in the repl

2017-05-28 Thread Vityou
I think what happens is that when you use the language with the repl it ignores the reader and just looks at the exports from the language (main.rkt). On Thursday, May 25, 2017 at 10:14:58 AM UTC-6, Dmitry Pavlov wrote: > Vityou, > > > > I will give you an example though I myself somet

Re: [racket-users] making a language that can return the body of a function

2017-05-28 Thread Matthias Felleisen
I misunderstood because of your mismatched parentheses. Without eval, you can’t do better than that. Parens rock. > On May 28, 2017, at 9:51 PM, Vityou wrote: > > On Sunday, May 28, 2017 at 2:01:09 PM UTC-6, Matthias Felleisen wrote: >> You need to apply the function, not just compute the su

Re: [racket-users] making a language that can return the body of a function

2017-05-28 Thread Vityou
On Sunday, May 28, 2017 at 2:01:09 PM UTC-6, Matthias Felleisen wrote: > You need to apply the function, not just compute the substitution. See > applicable struct in previous message. This should just work out, w/o much > ado. > > > > > On May 28, 2017, at 12:40 AM, Vityou wrote: > > > > O

Re: [racket-users] How to pretty print HTML?

2017-05-28 Thread Matthias Felleisen
> On May 28, 2017, at 7:37 PM, Zelphir Kaltstahl > wrote: > > did not know about `with-output-to-string` - This means I can get any output > of a procedure, which usually prints that right away, into a string, I guess. Makes for really good unit testing for I/O too. -- You received this

Re: [racket-users] How to pretty print HTML?

2017-05-28 Thread Zelphir Kaltstahl
On Sunday, May 28, 2017 at 10:20:10 PM UTC+2, Matthias Felleisen wrote: > I have the impression that you are conflating rendering as an output with > representing as a string. So the following code tries to sketch this: > > (require xml) > > ;; Xexpr -> String > (define (xexpr->xml/pretty x)

Re: [racket-users] Racket for Kids in 2017

2017-05-28 Thread ylluminate
Some really good thoughts there. I think key is to have some initial structured content to give him a springboard and then allow him to build out from there. LOL, yes, I agree wrt keeping web programmer (specifically JS) influences away to avoid brain rot! :D Even though my older son starte

Re: [racket-users] Racket for Kids in 2017

2017-05-28 Thread Matthias Felleisen
> On May 28, 2017, at 6:24 PM, ylluminate wrote: > > Matthias, thanks for that. So essentially the scripted components are > available in different focuses (e.g., HoC, Algebra, Reactive, Data Science, & > Physics) here: > http://www.wescheme.org/openEditor > > Correct? Are these to be use

Re: [racket-users] Racket for Kids in 2017

2017-05-28 Thread ylluminate
Matthias, thanks for that. So essentially the scripted components are available in different focuses (e.g., HoC, Algebra, Reactive, Data Science, & Physics) here: http://www.wescheme.org/openEditor Correct? Are these to be used in a stepwise fashion moving from HoC to Algebra to Reactive, etc?

Re: [racket-users] Racket for Kids in 2017

2017-05-28 Thread Matthias Felleisen
> On May 28, 2017, at 1:23 AM, ylluminate wrote: > > I have a older teen who's been programming for the last several years and is > remarkably talented. His younger brother is now wanting to get going (10). > > My older son started with JS, learned how to hate it, and moved on to Ruby > (spe

Re: [racket-users] How to pretty print HTML?

2017-05-28 Thread Matthias Felleisen
I have the impression that you are conflating rendering as an output with representing as a string. So the following code tries to sketch this: (require xml) ;; Xexpr -> String (define (xexpr->xml/pretty x) (with-output-to-string (lambda () (display-xml/content (xexpr->xml x)

Re: [racket-users] Question: 2D data (Arrays?) in Universe Teachpack

2017-05-28 Thread Matthias Felleisen
> On May 27, 2017, at 10:00 AM, A Mauer-Oats wrote: > > This time we used math/array, but arrays are basically mutable in nature and > that doesn't seem to work very well with way the universe is set up. My > students ended up writing a lot of code like (begin (array-set! board ...) > board)

Re: [racket-users] making a language that can return the body of a function

2017-05-28 Thread Matthias Felleisen
You need to apply the function, not just compute the substitution. See applicable struct in previous message. This should just work out, w/o much ado. > On May 28, 2017, at 12:40 AM, Vityou wrote: > > On Thursday, May 25, 2017 at 5:50:29 PM UTC-6, Matthias Felleisen wrote: >> The client mod

Re: [racket-users] Racket for Kids in 2017

2017-05-28 Thread Stephen De Gabrielle
> But don't discount the potential of throwing a young child at a computer with > only non-child software on it, and let them figure out > how to do what they want, much on their own. That's how the early-1980s > home computer kids got started, and that worked out pretty well. Survivorship bias? I

[racket-users] How to pretty print HTML?

2017-05-28 Thread Zelphir Kaltstahl
I have some HTML code, which I generate using x-expressions: (string-append DOCTYPE-HTML5 "\n" (xexpr->string `(html (body ((bgcolor "red")) "Hi!" (br) "Bye!" I don't like how the result looks in the sourc