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

2018-03-30 Thread Matthew Butterick

On Thursday, March 29, 2018 at 12:51:07 PM UTC-7, Stephen Smith wrote:
>
> Authoring a new Racket book (targeting all platforms and non-programmers) 
>
>
Great idea! Are there more details you can share about the project?

-- 
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] raco pkg downloads source code with a future timestamp

2018-03-30 Thread Greg Trzeciak
I confirm with the new snapshot build (6.90.0.24--2018-03-30(d3aa7e90e7/a) 
packages download and compile correctly and seconds->date & 
file-or-directory-modify-seconds work as expected now.

Thank you for fixing the problem so quickly!

Greg

-- 
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] Re: compile-zo: date for newly created .zo file ... is before source-file date ... which appears to be in the future

2018-03-30 Thread Greg Trzeciak
Continuation to this thread was happening 
at: https://groups.google.com/forum/#!topic/racket-users/xZCTFCBvzs0

The problem has been resolved by fixing how timestamps are read from 
filesystem.

-- 
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] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-03-30 Thread HiPhish
The benefit is that it looks nicer on the eyes in a GUI. I presume OP is 
talking about the Racket installation you get off the Racket website, and 
that installation is targeted at GUI users. I myself prefer the 
command-line and I use Racket via Homebrew, so I never even come across 
this issue.

Visual appeal is also why Lisp languages use the hyphen as a separator in 
names, it looks nicer on the eye. The reason most languages use the 
underscore is because the hyphen would be interpreted as the binary minus 
operator. Fun fact: in his original Lisp paper McCarthy allowed for spaces 
in symbols and used commas as separators, see page 9 of this PDF:
http://www-formal.stanford.edu/jmc/recursive.pdf

On Friday, March 30, 2018 at 4:44:26 PM UTC+2, David K. Storrs wrote:
>
> I look at it the other way:  there are clear benefits to NOT having 
> names containing characters that need to be quoted, so any use of such 
> characters has an opportunity cost.  What benefit does the space 
> provide that outweighs that opportunity cost? 
>

-- 
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-03-30 Thread Norman Gray


Greetings.

On 30 Mar 2018, at 15:44, David Storrs wrote:

On Thu, Mar 29, 2018 at 5:54 PM, HiPhish  
wrote:


I think you are trying to solve the wrong problem. If people want to 
use a
command-line tool they should know how to use the command line first. 
They


[...]



I look at it the other way:  there are clear benefits to NOT having
names containing characters that need to be quoted, so any use of such
characters has an opportunity cost.  What benefit does the space
provide that outweighs that opportunity cost?


I think the main benefit is simply that it looks nice.

OSX ^W macOS is primarily [1] designed for GUI users.  The Finder has no 
problem with files containing spaces, or other bash-annoying characters 
such as various brackets, dollar-signs and ampersands.  I can name a 
file 'A $/€/£ conversions (2017)' and not think twice about it.  
Spaces in the Racket installation locations represent a mild 
inconvenience only to the minority of users (including me) who use the 
command line more than the Finder, and we, to a first approximation, 
don't count.


If I find such a name inconvenient, then I can either find the tab key 
on my keyboard, or add a symlink somewhere convenient (as suggested 
above, and what I actually do), or else learn to love the bit of the 
bash manual about quoting arguments (which one should do anyway, when 
writing half-way-careful scripts).


Catering to command-line users in this way, and naming 
A-and-B_USD-EUR-GPB_conversions-2017 is frankly ugly, significantly less 
readable, unintelligibly obscure for anyone who doesn't have 
bash-expansion intuitions, and is still something I'd use the tab 
character to complete when typing.


Best wishes,

Norman


[1] ...for some value of 'primarily' which might not survive close 
examination


--
Norman Gray  :  https://nxg.me.uk

--
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] Re: Why is there a space in the path to the Racket application on MacOSX?

2018-03-30 Thread David Storrs
On Thu, Mar 29, 2018 at 5:54 PM, HiPhish  wrote:
> I think you are trying to solve the wrong problem. If people want to use a
> command-line tool they should know how to use the command line first. They
> don't have to know every arcane feature of the Bourne Shell, but knowing to
> escape spaces or quote strings is the bare minimum. Think about it like
> this: if you are trying to give someone directions you already assume they
> know how to drive a car, right? If you want to write a book on Racket, then
> focus on Racket. And if they cannot use the command-line they can still use
> the GUI tools.
>

I look at it the other way:  there are clear benefits to NOT having
names containing characters that need to be quoted, so any use of such
characters has an opportunity cost.  What benefit does the space
provide that outweighs that opportunity cost?


> On Thursday, March 29, 2018 at 9:51:07 PM UTC+2, 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.
>
> --
> 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.

-- 
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.


Re: [racket-users] Struct general question

2018-03-30 Thread Alexander McLin
As an aside, vectors are intended to be a constant-time access data 
structure. Lists aren't so it won't make sense to build vectors on top of 
lists which would make for non-constant slot access times.


On Monday, March 26, 2018 at 4:13:02 PM UTC-4, lysseus wrote:
>
>
>
> > On Mar 26, 2018, at 11:03 AM, Eric Griffis  > wrote: 
> > 
> > The `struct` form is defined in `struct.rkt` [1]. As you can see, 
> `struct` wraps `define-struct/derived` [2], which uses many things exported 
> from `struct.c` [3]. The "Inside: Racket C API" doc [5] describes some of 
> these functions -- see section 16. 
> > 
> > On the matter of structs being essentially vectors: Again in `struct.c` 
> [3], the C function `scheme_make_struct_instance` (line 2388) instantiates 
> a `Scheme_Structure`, which is declared in `schpriv.h` [4], line 1113. The 
> field values go into a `slots` array, which points directly to the 
> `Scheme_Object`s (i.e. arbitrary Racket values) supplied to 
> `scheme_make_struct_instance`. Assuming Racket vectors are essentially C 
> arrays, Racket structs are like vectors in this way. 
> > 
> > Looking at `Scheme_Struct_Type`, defined just above `Scheme_Structure` 
> in `schpriv.h` [4], it's clear there's nowhere to store field names. We can 
> confirm this by looking at `_make_struct_type` in `struct.c` [3], starting 
> at line 4778, as this is the function used (indirectly) by 
> `define-struct/derived`. 
> > 
> > Eric 
>
> Thanks, Eric! So maybe the solution for that would not be rewriting the 
> struct definition altogether, but providing that additional information in 
> something equivalent to a le over lambda, which would contain that meta 
> information? 
>
> I ran into an issue that felt similar to this when I was trying to pass 
> method names around in Racket objects. I’ve no idea, but I would think the 
> “solution” to both issues would be similar. Admittedly, I’ve not dug down 
> into either structs or objects deep enough. 
>
> Kevin 
>
>

-- 
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] Mozart's Musical dice with rsound

2018-03-30 Thread Daniel Prager
On Fri, Mar 30, 2018 at 7:18 PM, Thomas F. Burdick 
wrote:

>
>
> If you want to better understand why you need an envelope, it's a pretty
> fun part of synthesis. By clipping the sound, you square off your waveform.
> Square waves are made up of a lot of high-frequency components. To convince
> yourself of that, try to build a square wave by adding together different
> sine waves. It should give you a better intuition about the result.
>

Cool: Gibbs' phenomenon

Courtesy a previous life doing  *lot* of maths and physics I'm pretty good
of underlying theory — for me it's just a matter of understanding the tools.

Dan

-- 
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.