Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Greg Hendershott
I agree. Although I appreciate it helps in some classroom situations,
I don't think the status quo is best for programmers in general.

Also, speaking of Choose Language, I remember being very confused
early on because some options were "doubly hidden":

1. They're not under Preferences, they're under Choose Language.

2. Even when you do Choose Language, they're hidden until you click
Show Details.

Even after I discovered it, I forgot a few times; I remember hunting
for an option through all the Preferences "tabs", thinking, "geez, I
know I saw it _somewhere_ before...where the heck...?"

> On this topic (which is about the "Choose a language" language that
> DrRacket starts in when newly installed), I think we should just
> delete all of this code, and start in "the Racket language".
>
> Advantages:
> - eliminating something that trips up everyone who starts using DrRacket
> - reducing the number of people who end up in teaching languages by mistake
> - removing code (code that doesn't exist has no bugs :)
>
> Disadvantages:
> - Somewhat more teachers (of all kinds) will have to deal with
> students who use the full language
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Sam Tobin-Hochstadt
On Sat, Apr 26, 2014 at 8:16 PM, Neil Van Dyke  wrote:
> Sam Tobin-Hochstadt wrote at 04/26/2014 08:13 PM:
>
>> I'm confused about what you're suggesting, then. Is there a difference,
>> under your suggestion, between opening DrRacket for the first time, entering
>> `1` in the definitions window, and hitting run, and doing that same thing in
>> an existing DrRacket where we've already selected "the Racket language"?
>
>
> No difference.  No default/preference setting for language.  People will
> learn what they want and either type the "#lang" line, or click the button.
> Until people know what they want, they'll keep getting the explanatory
> dialog popup.

Ok, I think we agree then. What I'm proposing is that new DrRacket
installations should start in a mode where `#lang racket (+ 3 4)`
works, which is not currently the case.

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Neil Van Dyke

Sam Tobin-Hochstadt wrote at 04/26/2014 08:13 PM:
I'm confused about what you're suggesting, then. Is there a 
difference, under your suggestion, between opening DrRacket for the 
first time, entering `1` in the definitions window, and hitting run, 
and doing that same thing in an existing DrRacket where we've already 
selected "the Racket language"?


No difference.  No default/preference setting for language.  People will 
learn what they want and either type the "#lang" line, or click the 
button.  Until people know what they want, they'll keep getting the 
explanatory dialog popup.


Neil V.

_
 Racket Developers list:
 http://lists.racket-lang.org/dev


Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Sam Tobin-Hochstadt
On Sat, Apr 26, 2014 at 8:09 PM, Neil Van Dyke  wrote:
> Sam Tobin-Hochstadt wrote at 04/26/2014 08:06 PM:
>
>> On Sat, Apr 26, 2014 at 7:58 PM, Neil Van Dyke 
>> wrote:
>>>
>>> Sam Tobin-Hochstadt wrote at 04/26/2014 07:26 PM:
>>>
 On this topic (which is about the "Choose a language" language that
 DrRacket starts in when newly installed), I think we should just
 delete all of this code, and start in "the Racket language".
>>>
>>>
>>> How about make Run and other very language-specific DrRacket operations
>>> require a "#lang" line?
>>>
>>> When the operation is invoked and there isn't a "#lang" line, pop up an
>>> explanatory dialog box that lets user click on button for desired
>>> language.
>>> Button inserts "#lang" at top of file before continuing with operation.
>>>
>>> (I like this better than having a default "#lang" line, because you'll
>>> get
>>> people accepting the wrong default, different people with different
>>> defaults, etc.)
>>
>> This isn't quite about the issue I'm talking about, although I think
>> this is a good idea for helping people deal with (some) problems with
>> having the wrong language.
>>
>> What I'm referring to is that when you download DrRacket for the first
>> time, and open it, it puts you in a situation where nothing works,
>> until you choose a language. I think we should get rid of that, and
>> switch to defaulting to the current "Racket language".
>
>
> Yes, but I thought what I described addresses that problem as well. (And
> avoids making a new default from the first run, which I think is
> problematic.)

I'm confused about what you're suggesting, then. Is there a
difference, under your suggestion, between opening DrRacket for the
first time, entering `1` in the definitions window, and hitting run,
and doing that same thing in an existing DrRacket where we've already
selected "the Racket language"?

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Neil Van Dyke

Sam Tobin-Hochstadt wrote at 04/26/2014 08:06 PM:

On Sat, Apr 26, 2014 at 7:58 PM, Neil Van Dyke  wrote:

Sam Tobin-Hochstadt wrote at 04/26/2014 07:26 PM:


On this topic (which is about the "Choose a language" language that
DrRacket starts in when newly installed), I think we should just
delete all of this code, and start in "the Racket language".


How about make Run and other very language-specific DrRacket operations
require a "#lang" line?

When the operation is invoked and there isn't a "#lang" line, pop up an
explanatory dialog box that lets user click on button for desired language.
Button inserts "#lang" at top of file before continuing with operation.

(I like this better than having a default "#lang" line, because you'll get
people accepting the wrong default, different people with different
defaults, etc.)

This isn't quite about the issue I'm talking about, although I think
this is a good idea for helping people deal with (some) problems with
having the wrong language.

What I'm referring to is that when you download DrRacket for the first
time, and open it, it puts you in a situation where nothing works,
until you choose a language. I think we should get rid of that, and
switch to defaulting to the current "Racket language".


Yes, but I thought what I described addresses that problem as well. (And 
avoids making a new default from the first run, which I think is 
problematic.)


Neil V.

_
 Racket Developers list:
 http://lists.racket-lang.org/dev


Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Sam Tobin-Hochstadt
On Sat, Apr 26, 2014 at 7:58 PM, Neil Van Dyke  wrote:
> Sam Tobin-Hochstadt wrote at 04/26/2014 07:26 PM:
>
>> On this topic (which is about the "Choose a language" language that
>> DrRacket starts in when newly installed), I think we should just
>> delete all of this code, and start in "the Racket language".
>
>
> How about make Run and other very language-specific DrRacket operations
> require a "#lang" line?
>
> When the operation is invoked and there isn't a "#lang" line, pop up an
> explanatory dialog box that lets user click on button for desired language.
> Button inserts "#lang" at top of file before continuing with operation.
>
> (I like this better than having a default "#lang" line, because you'll get
> people accepting the wrong default, different people with different
> defaults, etc.)

This isn't quite about the issue I'm talking about, although I think
this is a good idea for helping people deal with (some) problems with
having the wrong language.

What I'm referring to is that when you download DrRacket for the first
time, and open it, it puts you in a situation where nothing works,
until you choose a language. I think we should get rid of that, and
switch to defaulting to the current "Racket language".

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Neil Van Dyke

Sam Tobin-Hochstadt wrote at 04/26/2014 07:26 PM:

On this topic (which is about the "Choose a language" language that
DrRacket starts in when newly installed), I think we should just
delete all of this code, and start in "the Racket language".


How about make Run and other very language-specific DrRacket operations 
require a "#lang" line?


When the operation is invoked and there isn't a "#lang" line, pop up an 
explanatory dialog box that lets user click on button for desired 
language.  Button inserts "#lang" at top of file before continuing with 
operation.


(I like this better than having a default "#lang" line, because you'll 
get people accepting the wrong default, different people with different 
defaults, etc.)


Neil V.

_
 Racket Developers list:
 http://lists.racket-lang.org/dev


Re: [racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Sam Tobin-Hochstadt
On Sat, Apr 26, 2014 at 7:09 PM, Matthias Felleisen
 wrote:
>
> ;; 
> -
> ** What does it mean to say ", or get guidance"?
>
> Where should people get guidance? What about?
> Avoid useless words.


On this topic (which is about the "Choose a language" language that
DrRacket starts in when newly installed), I think we should just
delete all of this code, and start in "the Racket language".

Advantages:
- eliminating something that trips up everyone who starts using DrRacket
- reducing the number of people who end up in teaching languages by mistake
- removing code (code that doesn't exist has no bugs :)

Disadvantages:
- Somewhat more teachers (of all kinds) will have to deal with
students who use the full language

Sam
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] comments on "comments on learning Racket"

2014-04-26 Thread Matthias Felleisen

I have been re-reading the notes on Artyom.me's site, taking notes. Few 
question his comments, some suggest reactions that should come from us, others 
are personal musings. 

I know this is a bit of a brain dump but I find this person's thoughts 
worthwhile for us (devs). 


Notes on "Learning Racket" by Artyom 
How to get a Haskellian like Artyom to fall in love with Racket at first sight.

;; -
** What does it mean to say ", or get guidance"? 

Where should people get guidance? What about? 
Avoid useless words. 

** The REPL section in the Guide must open with (+ 1 1) 

** tab completion must be faster 

** can we force the help corner[1] to show up for "beginners"? 
   (the first five hours of using a raw DrRacket or you pay us 50 bucks.) 

   The WOW #2 should come right away. 
   
** can we get the help corner to show up for things at the DrRacket repl? 

** How can we get the help corner show anything about module-locally defined
   identifiers ("defined in this module" would be a good start) or imported
   identifiers ("imported from module X") and if it goes thru a contract-out,
   the help corner may even say something ("with contract (-> integer? 
integer?)")
 
?? I don't get the "Uniform syntax is harder to read" comment. More
   highlighting, hmph? 

** do we need to get across racket/base more quickly?
   (so that a hello world program executable looks smaller.)

[:~/Tmp] matthias% du helloworld
1664helloworld

** "This chapter [1 of Guide] was small and boring. Next, please!"
   We need to spice up the first chapter of 

!! HAH! The Undefined value shows up in his blog, not even half way down. 

** Should we provide a 'where' form? 

** He wants an Arc-style lambda function. Hmph. 

?? How did the kid get (apply and ...) to work? Was I asleep? 

(( He doesn't know what type safety is. I understand that C++ers don't get
   it. Why do Haskellians don't get it? ))

** People want overloading. (< "hello" "hello world") should work. Hmph. 

** When we introduce for/list we should explain it directly, in words. 

** I do get jealous when I see 

 [(i, j, k) | i <- [1..10], j <- [i..10], k <- [j..10], i^2 + j^2 == k^2]

vs

(for*/list ([i (range 1 20)] [j (range i 20)] [k (range j 20)] #:when (= (+ 
(sqr i) (sqr j)) (sqr k)))
(list i j k))

(using full width according to Racket style)

** The time-is-not-a-procedure thing is two misunderstandings in one: 
   -- we are in a by-value world 
   -- by the time were to reach the calls to factorial, it's evaluated
   Show 

   (for ((f (list f1 f2 f3 f4)))
(time (f 1))) 

  early? 

** Do we need to add these to our library? 

;; (X ... -> Y ...) X *-> [List-of Y]
(define (gather-return-values f . s)
  (call-with-values (lambda () (apply f s)) list))

;; Nat (X ... -> Y ...) X *-> Y
(define (nth-return-value i f . s)
  (call-with-values (lambda () (apply f s)) (lambda l (list-ref l i

** Printing is brutally expensive in DrRacket. Is there a way to make it
   cheaper? 

** Why does he think "Performance sucks"? 

** What is this about: 

   "Support for functional paradigm is somewhere in the middle. Everything
   needed is there, but it's not very convenient to use. (I expect to stumble
   upon goodies/fp or haskell-racket module one day, but for now I won't be
   looking for it – I need to understand Racket's main paradigm before
   allowing myself to consciously deviate from it.)"
   
   I am thinking of Racket as FP. 

** This 

   "Given that reading every chapter of TRG raises lots of questions and
   provokes endless tinkering with not-quite-related concepts, I'll be
   happy if I manage to read as much as chapter 2.4." 

   means the Guide is the wrong kind of introduction for a functional
   Haskellian. 

** quote and friends should not show up in whatever replaces Guide for
   Functionalists 
   
;; -

[1] What do we call the thing that shows up at the top right? 


;; =
PART II 

** "I see." 

   Some of our error messages are, well, real-world error messages. Like all
   compilers, they assume complete knowledge of the languages so when a novice
   makes a mistake, he gets, well, nothing out of it.

   Should we try our hands on a staged approach to learning the API for our
   world of syntax and compilation? (Old people would use the word 'macro'
   here.) 

** "Why, why must everything be Inferior By Default?"

   We obviously need a 'syntax story' that takes readers directly from
   define-syntax-rule to syntax-parse, bringing in hygiene only late, when it
   truly matters to raise expressiveness 

   Further down he writes "But, but... It's wrong to spend a day hopping around
   only to write this. It's unsatisfactory. Things like this turn people into
   Hulks, y'know." Boy is he corr