[racket-users] Re: No scroll ability in DrRacket v6.12

2018-04-19 Thread Stephen Smith
Installed Racket on another laptop in my home running Windows 10 and it 
scrolls without issue. Obviously an issue local to my machine. No time to 
debug this right now but if I do find the problem I'll post it here.

On Sunday, March 25, 2018 at 1:20:46 PM UTC-4, Stephen Smith wrote:
>
> Hi All,
>
> I'm not sure if it just happened after installing 6.12 but after working 
> on a program of some length I noticed I can't scroll any windows in 
> DrRacket with the scroll wheel (grabbing a scrollbar works). Even the Help 
> -> About DrRacket window won't scroll.
>
> I'm using an external Microsoft mouse with a scroll wheel. Enabled my 
> touchpad to see if it would work, but it barely works - I have to really 
> exaggerate a scroll gesture to get the screen to nudge even just a little. 
>
> All my other applications are scrolling as expected, just DrRacket not 
> working. I did an uninstall-reinstall but same behaviour. 
>
> On a Windows 10 machine.
>
> Anyone else having this issue?
>
> Stephen.
>
>

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


Re: [racket-users] Why is there a space in the path to the Racket application on MacOSX?

2018-04-02 Thread Stephen Smith
Philip, you're right, a DSL doesn't have to mean a restricted language
(like BSL). I completely missed that point in my last response to this
thread. For some reason BSL got in my head and I incorrectly equated that
concept with the embedded DSL approach suggested by Matthias as I was
writing my response. That clearly wasn't what Matthias was suggesting, and
he even mentioned the natural backdoor. Thanks for clarifying this for me,
it was actually very helpful. Call it a momentary brain malfunction on my
part.

On Sun, Apr 1, 2018 at 10:51 PM, Philip McGrath <phi...@philipmcgrath.com>
wrote:

> One way the student languages from HtDP are different from most Racket
> DSLs and langs is that, in the service of regularity and nice error
> messages, they take away many convenient and powerful features of the full
> Racket language. There is not really an "escape hatch" into full Racket,
> other than importing libraries.
>
> In contrast, most Racket language extensions either simply add new
> language constructs to racket/base—think of the contract system, or the
> class-based object system—or provide forms very similar to the racket/base
> form, but with some refinement: #lang web-server transforms modules to make
> continuations serializable at interaction points, or Typed Racket adds
> syntax for specifying types. So starting your readers with a DSL doesn't
> have to mean that they have a heavily-restricted language overall (or you
> could be really ambitious and provide both a (require railroad) library and
> a #lang railroad/beginner).
>
> My first experience with Racket was through HtDP, which I loved, but,
> while I understand the good reasons for the teaching languages (especially
> the great error messages for beginners), I also have mixed feelings about
> them. For students like me who already had some (imperative,
> non-parenthesized) coding experience, there was a lot of complaining about
> conveniences of other languages that seemed to be missing from *SL (e.g. I
> believe BSL doesn't even have a mechanism for giving temporary names to
> values). When I tell other people who've been through HtDP that Racket is
> now my language of choice, I often get reactions like "Why would you want
> to use that for a real project?" and have to explain that Racket is not the
> language we learned in class. I think the text of the second edition may do
> a better job at making that distinction: we mostly used the first edition
> with little bits of the second, and certainly it was more confusing when
> everything was just called "Scheme."
>
> -Philip
>
> On Mon, Apr 2, 2018 at 1:30 AM, Stephen Smith <stephen1965sm...@gmail.com>
> wrote:
>
>> Railroad-simulation language, absolutely! One of the key reasons that
>> Racket is on the top of the list. But what I didn't think of was to have
>> the reader use the DSL first. I was initially planning to develop the DSL
>> as a later part of the book - doing it the hard way perhaps.
>>
>> That has always been the one thing I wasn't crazy about with htdp,
>> starting with the Beginning Student language, but that's just me
>> personally. I understand the reasons for the approach. I look at it as, "I
>> don't want training wheels - let me take the real thing for a ride!", and
>> deal with the consequences later - an 
>> I-wanna-know-what's-under-the-hood-right-now
>> type of guy. For that reason, I never considered something like that for my
>> book, but the more I think of it now, it kind of makes a lot of sense for
>> my audience? I've always looked at it from an experienced programmer's
>> point of view - which doesn't necessarily fit best here.
>>
>> Thanks Matthias for giving me this suggestion to think about. I might
>> have a lot more work to do to get started using that approach, but in the
>> long run, as you say, it might get them more interested in the programming
>> part. Much appreciated food for thought.
>>
>>
>>
>> On Sunday, April 1, 2018 at 8:23:32 PM UTC-4, Matthias Felleisen wrote:
>>>
>>>
>>> On Apr 1, 2018, at 12:57 PM, Stephen Smith <stephen1...@gmail.com>
>>> wrote:
>>>
>>> my (book) project is for model railroad hobbyists (many if not most who
>>> have never programmed before).
>>>
>>>
>>>
>>> Have you considered the development of a railroad-simulation language
>>> within Racket that fits your domain? If you can provide people with a
>>> language that fits their problem area, they might be more interested in
>>> learning more about programming per se. Since embedded DSLs usually have a
>>> natural backdoor, this m

Re: [racket-users] Why is there a space in the path to the Racket application on MacOSX?

2018-04-01 Thread Stephen Smith
Railroad-simulation language, absolutely! One of the key reasons that 
Racket is on the top of the list. But what I didn't think of was to have 
the reader use the DSL first. I was initially planning to develop the DSL 
as a later part of the book - doing it the hard way perhaps.

That has always been the one thing I wasn't crazy about with htdp, starting 
with the Beginning Student language, but that's just me personally. I 
understand the reasons for the approach. I look at it as, "I don't want 
training wheels - let me take the real thing for a ride!", and deal with 
the consequences later - an I-wanna-know-what's-under-the-hood-right-now 
type of guy. For that reason, I never considered something like that for my 
book, but the more I think of it now, it kind of makes a lot of sense for 
my audience? I've always looked at it from an experienced programmer's 
point of view - which doesn't necessarily fit best here.

Thanks Matthias for giving me this suggestion to think about. I might have 
a lot more work to do to get started using that approach, but in the long 
run, as you say, it might get them more interested in the programming part. 
Much appreciated food for thought.



On Sunday, April 1, 2018 at 8:23:32 PM UTC-4, Matthias Felleisen wrote:
>
>
> On Apr 1, 2018, at 12:57 PM, Stephen Smith <stephen1...@gmail.com 
> > wrote:
>
> my (book) project is for model railroad hobbyists (many if not most who 
> have never programmed before).
>
>
>
> Have you considered the development of a railroad-simulation language 
> within Racket that fits your domain? If you can provide people with a 
> language that fits their problem area, they might be more interested in 
> learning more about programming per se. Since embedded DSLs usually have a 
> natural backdoor, this might be an approach that works well. 
>
> In my current “hack your own language” course, some kids have gone a step 
> further. They are interested in music theory. So they implemented a 
> language for specifying languages in which students can then create 
> compositions of choral music and the composition is statically checked 
> before they even turn it in. The teacher can create a language per weekly 
> homework and teh students get to see the progression. At the same time, 
> there are several ways to dive into Racket from each level. 
>
> — 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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-04-01 Thread Stephen Smith
Hmm, you've got me thinking more now - maybe leave the command-line until 
later. I certainly don't want to scare them off in the first chapter. I'm 
so used to installing packages via raco I didn't even think of using 
DrRacket.

On Sunday, April 1, 2018 at 7:18:33 PM UTC-4, HiPhish wrote:
>
> I don't know where you are going with your book, but are you sure forcing 
> people to use the command-line interface is a good idea? Racket can be 
> fully used through the GUI (even managing packages can be done through 
> DrRacket). I agree with explaining both DrRacket and raco, but why can't 
> users just pick the one they are more comfortable with and ignore the other 
> (and maybe come back later to it)?
>
> I think the biggest problem is that so many people have very low computer 
> literacy. You will never see a book or web tutorial explaining concepts 
> like clicking, right-clicking, drag or double-clicking because those 
> are so essential to using a computer. However, few people know how to use 
> the CLI, even though it allows you to automate and combine things in a way 
> a GUI cannot. You don't even have to be a programmer to find the CLI useful.
>
> On Sunday, April 1, 2018 at 6:57:46 PM UTC+2, Stephen Smith wrote:
>>
>> 2. @HiPhish: "Users should learn the command-line first". Although I 
>> agree with this in almost any other context, my book is for people who have 
>> never programmed before. So they will be learning the command-line and GUI 
>> at the same time (they have no choice in the matter ;-). In my opinion 
>> though, raco is an essential command line tool to teach new Racketeers so 
>> at least in my case the GUI alone will not suffice. And my book is not 
>> really a "Racket" book per se - Racket is just a tool to achieve the end 
>> goal. Which probably requires further explanation ...
>>
>

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


[racket-users] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-04-01 Thread Stephen Smith
You've gone above my pay-grade. :-)

On Sunday, April 1, 2018 at 1:05:17 PM UTC-4, Geoffrey Knauth wrote:
>
> On Sunday, April 1, 2018 at 12:57:46 PM UTC-4, Stephen Smith wrote:
>>
>> It's been a long tough road as to which implementation language to choose 
>> for it. I'm down to two now after much experimenting - Racket of course, 
>> and Smalltalk.
>>
>
> Now you have me wondering which is harder, implementing Smalltalk in 
> Racket, or the other way around. 
>

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


[racket-users] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-04-01 Thread Stephen Smith
Lots of good advice and opinions here. Thanks everyone. I'll try to respond 
to all of them in some way ...

1. @David K. Storrs and @Eric Eide: Renaming the folder. This works for 
sure but _my_ preference is to use a symlink (as Eric also mentioned) as it 
doesn't touch the original folder layout. On a Mac I simply use 'ln -s 
/Applications/Racket\ v6.12/ /usr/local/racket' and then add 
'/usr/local/racket/bin' to my path (via one of the .bash* files or 
/etc/paths for a system-wide setting). /Applications/Racket as a symlink 
also works. This is the approach I will likely take in the book as I 
believe that maintaining the original folder layout is a good practice to 
teach newcomers (and that's what symlinks were invented for, right? :-). 
Though for experienced users, renaming the folder is certainly just as 
effective as you'll probably know how to handle problems that can arise 
from taking that approach.

2. @HiPhish: "Users should learn the command-line first". Although I agree 
with this in almost any other context, my book is for people who have never 
programmed before. So they will be learning the command-line and GUI at the 
same time (they have no choice in the matter ;-). In my opinion though, 
raco is an essential command line tool to teach new Racketeers so at least 
in my case the GUI alone will not suffice. And my book is not really a 
"Racket" book per se - Racket is just a tool to achieve the end goal. Which 
probably requires further explanation ...

3. @Matthew Butterick: my (book) project is for model railroad hobbyists 
(many if not most who have never programmed before). I want to teach them 
to build a computer-based model railroad. I'm currently helping to maintain 
www.railwayoperationsimulator.com (a C++ project) which is a signalling 
simulator. I stumbled on that project while looking for ideas on how to 
model track and decided to hang around for awhile :-). My book will focus 
on a couple of different types of simulation though. 

I've had the project in the works for several years now. I've only just 
recently had the opportunity to work on it in any serious capacity. It's 
been a long tough road as to which implementation language to choose 
for it. I'm down to two now after much experimenting - Racket of course, 
and Smalltalk. Heavily inspired by htdp and I've just started to look at 
Beautiful Racket. Former contenders were C++ (wxWidgets), Rust, Ada, 
Eiffel, Tcl/Tk and Pascal (using FreePascal and Lazarus). I've taken the 
approach to writing the first chapter in both Racket and Squeak Smalltalk. 
I'll post those up when they are complete, and see what kind of response I 
get from potential readers as to which language is more likely to work 
best. If I get ambitious enough I may try to write two books simultaneously 
though I'm sure most would discourage me from doing that (and rightfully 
so). I just find both approaches have so many advantages - it's very 
difficult to choose just one.

Cheers,
Stephen Smith.

On Thursday, March 29, 2018 at 3:51:07 PM UTC-4, Stephen Smith wrote:
>
> Authoring a new Racket book (targeting all platforms and non-programmers) 
> and having to tell users to quote paths with spaces to be able to use the 
> command-line tools seems distracting and an unnecessary complexity to 
> impose on them.
>
> Reference this post: 
> https://groups.google.com/d/msg/racket-users/2-ASoQ03x9Q/AXQyV4MTx0EJ by 
> Matthew Johnson.
>
> From a *nix perspective, it just seems like 'bad practice' to have folder 
> names with spaces? Though, devil's advocate, I get that underscores or 
> combined words can be unsightly, especially on a Mac where there are 
> hard-core design people to contend with (I can hear them now, "It doesn't 
> look nice in Finder" :-) but for Mac apps that have command-line tools it 
> seems more common to not have spaces in the folder name leading to a bin 
> folder.
>
> Is there a particular reason why Racket uses a space in its folder name?
>
> Cheers,
> Stephen
>
>
>
>

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


[racket-users] Re: [racket] running racket from the command line

2018-03-30 Thread Stephen Smith
Or you could do this (on a Mac but similar for Linux):

sudo ln -s /Applications/Racket\ v6.12/ /usr/local/racket

which would allow you to simply add /usr/local/racket/bin to your path. I 
use this method a lot.


On Monday, October 21, 2013 at 2:20:53 PM UTC-4, Greg Hendershott wrote:
>
> Early on using Racket, like you I had some trouble or other quoting. I 
> adopted the perhaps dubious habit of, right after installing a new 
> version, renaming to e.g. /Applications/Racket_v5.3.6" -- i.e. " " -> 
> "_". 
>
> On Mon, Oct 21, 2013 at 4:50 AM, Matthew Johnson  > wrote: 
> > Thanks very much. Working well now. 
> > 
> > For those that find this, a trap for young players is that you must 
> > quote paths with spaces in them, else you will lose everything you 
> > depend upon (even the command 'ls'). 
> > 
> > So it is 
> > 
> > Export PATH="/Applications/Racket v5.3.6/bin":$PATH 
> > 
> > mj 
> > 
> > On 21/10/2013, at 7:30 PM, Norman Gray  > wrote: 
> > 
> >> 
> >> Matt, hello. 
> >> 
> >> On 2013 Oct 21, at 08:59, Matthew Johnson  > wrote: 
> >> 
> >>> I just downloaded the Racket binaries and installed them. 
> >> 
> >> Ah, but where have you installed them? 
> >> 
> >>> I have been able 
> >>> to fire up DrRacket, however given that i prefer vim i was hoping to 
> run 
> >>> racket from the command line. 
> >>> 
> >>> I've tried 
> >>> 
> >>> $ racket  and $ which racket 
> >> 
> >> I take it, then, that you're on a unix.  On OS X for example, the 
> relevant bin/ directory is located in the same directory as DrRacket.app, 
> and so that's the directory (.../Racket\ v5.3.6/bin) that has to be 
> (explicitly) added to your path.  I don't know the layout of the various 
> Linux distributions, but I imagine there's a broadly similar layout there. 
> >> 
> >> Best wishes, 
> >> 
> >> Norman 
> >> 
> >> 
> >> -- 
> >> Norman Gray  :  http://nxg.me.uk 
> >> SUPA School of Physics and Astronomy, University of Glasgow, UK 
> >> 
> > 
> >  
> >   Racket Users list: 
> >   http://lists.racket-lang.org/users 
>
>  
>   Racket Users list: 
>   http://lists.racket-lang.org/users 
>

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


[racket-users] No scroll ability in DrRacket v6.12

2018-03-25 Thread Stephen Smith
Hi All,

I'm not sure if it just happened after installing 6.12 but after working on 
a program of some length I noticed I can't scroll any windows in DrRacket 
with the scroll wheel (grabbing a scrollbar works). Even the Help -> About 
DrRacket window won't scroll.

I'm using an external Microsoft mouse with a scroll wheel. Enabled my 
touchpad to see if it would work, but it barely works - I have to really 
exaggerate a scroll gesture to get the screen to nudge even just a little. 

All my other applications are scrolling as expected, just DrRacket not 
working. I did an uninstall-reinstall but same behaviour. 

On a Windows 10 machine.

Anyone else having this issue?

Stephen.

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


[racket-users] The Nitty Gritty of Pixels, Pens, and Lines example output

2018-03-24 Thread Stephen Smith
Hi Everyone,

When running the following example from the Racket docs section titled 'The 
Nitty Gritty of Pixels, Pens, and Lines':

(define p1 (make-pen "black" 1 "solid" "round" "round"))

(rectangle 20 20 "outline" p1)

instead of a rectangle with all four sides drawn with equal thickness as 
shown in the example output, I get the top and left sides drawn with 1 
pixel and the right and bottom sides are drawn as gray lines. I'm running 
it in DrRacket (v6.12). 

I suspected that DrRacket was cropping the image in the interactions area 
so I did this:

(overlay/align "middle" "middle" (rectangle 20 20 "outline" p1) (rectangle 
40 40 "outline" p1))

and sure enough, the inner rectangle appeared with all four sides having 
equal thickness, as shown in the example.

The cropping of the image in DrRacket might not be obvious to the reader 
working along with the examples (even though that is, in essence, the 
subject of this section :-). Should something be put in the docs to clarify 
this? Perhaps add a snippet similar to what I created with the 
overlay/align function and mention that DrRacket will crop the outer 
rectangle in the interactions area? I know this seems to go against the 
'writing style' used in the docs but I believe most users will be following 
along with DrRacket. Maybe a sidebar mention would be worthwhile to avoid 
initial confusion?

Regards,
Stephen.


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