[racket-users] Re: [racket/racket] bc5556: raco pkg update: add `---unclone` as a kind of ali...

2018-04-25 Thread 'John Clements' via Racket Users
YAY! I can *never* remember this flag. Many thanks, John > On Apr 25, 2018, at 9:32 AM, Matthew Flatt wrote: > > Branch: refs/heads/master > Home: https://github.com/racket/racket > Commit: bc55560f8dcef2780c2b64a95c2fc89513e3f447 > > https://github.com/racket/racket/commit/bc55560

[racket-users] not worth shrinking language to ../base?

2018-04-12 Thread 'John Clements' via Racket Users
I did a mini-experiment today, and was surprised. Specifically, my guess was that changing the language of a file from #lang typed/racket to #lang typed/racket/base and adding the newly-necessary requires: (require racket/match racket/list racket/math) … would result in fa

Fwd: [racket-users] Mozart's Musical dice with rsound

2018-03-29 Thread 'John Clements' via Racket Users
Oops forgot to cc: users. Dan, if you respond, could you respond to this one rather than the one I sent only to you? Sorry. John > Begin forwarded message: > > From: John Clements > Subject: Re: [racket-users] Mozart's Musical dice with rsound > Date: March 29, 2018 at 15:24:11 PDT > To: Danie

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

2018-03-25 Thread 'John Clements' via Racket Users
> On Mar 25, 2018, at 12:25, Nadeem Abdul Hamid wrote: > > I had a student in class the other day also complaining about sluggish > scrolling in DrRacket (while all other applications work fine), but I think > he was using 6.11 on Mac OS X. > — nadeem FWIW, I think these are probably differe

[racket-users] "conflicts" badge for pkgs page?

2018-03-25 Thread 'John Clements' via Racket Users
I’m fixing problems related to documentation on the libgit2 package, and it appears there are a number of issues to fix, but the first one was that the package was written with a main scribblings file called “manual.scrbl”. It turns out this is a bad idea, and in fact this is mentioned in the ra

Re: [racket-users] "Immobile" lambdas for FFI

2018-03-15 Thread 'John Clements' via Racket Users
> On Mar 14, 2018, at 6:22 PM, Matthew Flatt wrote: > > Would it make sense to add these two examples to the documentation? Perhaps just as links to github gists? Apologies if they’re already there; I took a quick look and didn’t see them. (I suggest this selfishly, because my ‘rsound’ pa

Re: [racket-users] "Site not secure"

2018-03-09 Thread 'John Clements' via Racket Users
> On Mar 9, 2018, at 8:25 AM, Tim Hanson wrote: > > Hi, I tried to grab the latest racket version from download.racket-lang.org > and chrome and edge tell me the certificate of the site at > mirror.racket-lang.org is not yet valid or expired. It's no problem as I > found a mirror with a vali

Re: [racket-users] any reason why slideshow is still its own executable?

2018-03-05 Thread 'John Clements' via Racket Users
ot; > #f))) > ``` > > ~Leif Andersen > > > On Mon, Mar 5, 2018 at 2:25 PM, 'John Clements' via Racket Users > wrote: > > I went looking for the standalone slideshow->pdf converter today, and was > > mystified that it

[racket-users] any reason why slideshow is still its own executable?

2018-03-05 Thread 'John Clements' via Racket Users
I went looking for the standalone slideshow->pdf converter today, and was mystified that it didn’t appear in the list of raco commands. Eventually, I realized that it’s actually its own executable, and has been since before ‘raco’ even existed. Wouldn’t it make more sense for slideshow to be a

Re: [racket-users] Re: Getting young children started with Racket

2018-03-05 Thread 'John Clements' via Racket Users
> Mathematics is fascinating. It's repetitive arithmetic practice that's > completely, totally boring and designed to inculcate hatred of the > subject. “designed” ? John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from

Re: [racket-users] Replacing nodejs with Racket... possible?

2018-02-10 Thread 'John Clements' via Racket Users
I think you might be most interested in RacketScript, available on the package server. It compiles racket into JS. https://github.com/vishesh/racketscript/blob/master/README.md Haven’t used it myself, but I probably will, the next time I need something written in JS. John > On Feb 10, 2018,

Re: [racket-users] Adding interactive overlays to racket plots

2018-02-03 Thread 'John Clements' via Racket Users
Wow. Yes please. John > On Jan 29, 2018, at 03:09, Alex Harsanyi wrote: > > The racket plot package produces interactive snip% objects which allow > zooming of the plot area. While this is a cool and sometimes useful feature, > the functionality is hard coded in the plot-snip% class inside th

Re: [racket-users] Quick regexp question

2018-02-02 Thread 'John Clements' via Racket Users
> On Feb 2, 2018, at 3:21 PM, Matthew Butterick wrote: > > >> On Feb 2, 2018, at 10:23 AM, 'John Clements' via Racket Users >> wrote: >> >> This macro gets the names in much closer to the corresponding patterns than >> matching by index,

Re: [racket-users] Quick regexp question

2018-02-02 Thread 'John Clements' via Racket Users
Not sure if this gets you as far as you want, but you could use a macro to associate names with paren-wrapped items: #lang racket (define-syntax re-match (syntax-rules () [(_ str re name ...) (match str [(regexp re (list _ name ...)) (list (list (quote name) name) ...)]

Re: [racket-users] Strange window behavior in OSX Yosemite DrRacket

2018-01-25 Thread 'John Clements' via Racket Users
> On Jan 25, 2018, at 12:17 PM, Philip McGrath wrote: > > I took the steps you described and I no longer get the doubled program > contour, but I do get results like the screenshot of my experiment with > text:inline-overview-mixin I sent > earlier (maybe that's what the contour is supposed

Re: [racket-users] Strange window behavior in OSX Yosemite DrRacket

2018-01-25 Thread 'John Clements' via Racket Users
> On Jan 25, 2018, at 8:48 AM, Jordan Johnson wrote: > > Hi all, > > One of my students is observing some strange behavior involving the Program > Contour pane of DrRacket. He’s using v6.11 on OS X Yosemite 10.10.5. > > This is the top-right corner of his DrR window, with Program Contour ope

Re: [racket-users] SIMPLE top-level binding semantics question

2018-01-23 Thread 'John Clements' via Racket Users
>>> On Jan 23, 2018, at 1:20 PM, Matthew Flatt wrote: >>> >>> At 23 Jan 2018 15:57:34 -0500, "'John Clements' via Racket Users" wrote: >>>> despite being inside of a binding of the name map >>> >>> That's the essence

Re: [racket-users] SIMPLE top-level binding semantics question

2018-01-23 Thread 'John Clements' via Racket Users
map '(1) add1) >> '(2) >>> (map '(1 2) add1) >> '(2 3) >>> (map '(1 2 3) add1) >> '(2 3 4) >>> > > > — Matthias > > > >> On Jan 23, 2018, at 3:57 PM, 'John Clements' via Racket Users

Re: [racket-users] SIMPLE top-level binding semantics question

2018-01-23 Thread 'John Clements' via Racket Users
Permission to paste this summary on Stack Exchange? > On Jan 23, 2018, at 1:20 PM, Matthew Flatt wrote: > > At 23 Jan 2018 15:57:34 -0500, "'John Clements' via Racket Users" wrote: >> despite being inside of a binding of the name map > > That's t

[racket-users] SIMPLE top-level binding semantics question

2018-01-23 Thread 'John Clements' via Racket Users
Stack overflow today led me to something … very strange. I feel like I must be missing something crushingly obvious. To reproduce: start racket at the command line or hit “run” on a definitions window containing only “#lang racket”. Then, paste: (define map (lambda (l f) (cond ((nu

Re: [racket-users] Want to send email with net/smtp. An error to fix.

2018-01-19 Thread 'John Clements' via Racket Users
I see a number of very minor issues in your code: 1) It looks like you have wrapped the keyword arguments in square brackets. These aren’t necessary. They’re used in the documentation to indicate optional elements. 2) It’s worth noting that these arguments are optional, so you can leave out,

Re: [racket-users] TR hash-ref type design decision?

2018-01-11 Thread 'John Clements' via Racket Users
ou're > thinking of, and those cases are important for cases where you > genuinely only know that you have a hash, and not something about the > key/value types. Okay, that makes sense. Many thanks for taking the time to write this up. John > > Sam > > On Thu, Jan 11,

[racket-users] TR hash-ref type design decision?

2018-01-11 Thread 'John Clements' via Racket Users
I was surprised and a wee bit dismayed this morning to see that this code, using hash-ref with the wrong key type, typechecks: #lang typed/racket (define my-hash : (HashTable String String) (make-immutable-hash '(("abc" . "def") ("ghi" . "jkl" (hash-ref my-hash 1234) So, I printe

Re: [racket-users] Byte Order Mark: alter display of symbols containing nonprinting characters?

2017-12-29 Thread 'John Clements' via Racket Users
Very well… I concede :). John > On Dec 28, 2017, at 09:51, Matthew Butterick wrote: > > >> On Dec 27, 2017, at 10:15 PM, 'John Clements' via Racket Users >> wrote: >> >> Again, there may be a reason why this is a bad idea, but I don’t think I’ve

Re: [racket-users] Byte Order Mark: alter display of symbols containing nonprinting characters?

2017-12-27 Thread 'John Clements' via Racket Users
> >> > > > > If you copy and paste these from the interactions into the definitions > > window, you can even get this: > > > > #lang racket > > > > (equal? 'hello 'hello) > > (eq? 'hello ‘hello) > > > > e

Re: [racket-users] Byte Order Mark: alter display of symbols containing nonprinting characters?

2017-12-27 Thread 'John Clements' via Racket Users
ory limit: 4096 MB. #f #f > Did you misunderstand me, or did I misunderstand you? John > > On Wed, Dec 27, 2017 at 3:54 PM, 'John Clements' via Racket Users > wrote: >> I was working with files containing a Byte Order Mark today, and in the >> process

[racket-users] Byte Order Mark: alter display of symbols containing nonprinting characters?

2017-12-27 Thread 'John Clements' via Racket Users
I was working with files containing a Byte Order Mark today, and in the process of writing a test case, I discovered that (string->symbol “\uFEFF”) produces a symbol whose printed representation is ‘hello … which seems unfortunate; I guess I would have expected something like ‘|\uFEFFhello|

[racket-users] OS X: DrRacket leaking windows?

2017-12-20 Thread 'John Clements' via Racket Users
Looks to me like DrR is leaking… windows. Specifically: On up-to-date DrR (just rebuilt from repo, version 6.11.0.5--2017-12-20), pretty much up-to-date OS X (10.13.1 (17B1003)), I notice something very strange. I’ve seen it on two computers, so I think it should be reproducible on any comput

Re: [racket-users] Re: Unit test inner procedures

2017-11-27 Thread 'John Clements' via Racket Users
+1. Totally agree. > On Nov 27, 2017, at 1:15 PM, Jack Firth wrote: > > I don't think you can directly test an inner procedure while keeping your > test code separately loadable (e.g. different file or module). It doesn't > seem like a good idea to me, personally. Inner procedures communicate

Re: [racket-users] DrRacket et al not starting in Sierra (10.12)?

2017-11-20 Thread 'John Clements' via Racket Users
> On Nov 19, 2017, at 17:04, George Plymale II > wrote: > > This issue still exists on High Sierra and with Racket 6.11. I even see it > happen on the non-nightly, stable builds. It's a bit of a hassle to have to > do the drag-n-drop dance every single time I update Racket. I'm we would all

[racket-users] Re: 3d plots "broken" some time after 6.11 release

2017-11-18 Thread 'John Clements' via Racket Users
Update on this; it definitely has nothing to do with DrRacket, I can reproduce it directly in Racket with a frame% wrapper. Also, thanks to Northwestern’s lengthier nightly snapshot trail, I’ve discovered that the regression was apparently introduced between 6.10.1.1 and 6.10.1.2, although it’s

Re: [racket-users] 3d plots "broken" some time after 6.11 release

2017-11-18 Thread 'John Clements' via Racket Users
n the gui library. John > > > Robby > > On Thu, Nov 16, 2017 at 5:55 PM, 'John Clements' via Racket Users > wrote: >> Since the release of 6.11, it appears there’s been a major major performance >> regression in the display of 3d plots in the inter

[racket-users] 3d plots "broken" some time after 6.11 release

2017-11-16 Thread 'John Clements' via Racket Users
Since the release of 6.11, it appears there’s been a major major performance regression in the display of 3d plots in the interactions window. To see this, try running this program (from the plot docs), then try to drag the image around. On a fresh download of the snapshot, dragging is unusable

Re: [racket-users] where does DrRacket get its environment variables on OS X?

2017-11-08 Thread 'John Clements' via Racket Users
> On Nov 8, 2017, at 12:42, Robby Findler wrote: > > How about "env X=Y racket -l- drracket file-to-open-in-drracket.rkt” ? +1 John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails f

Re: [racket-users] where does DrRacket get its environment variables on OS X?

2017-11-08 Thread 'John Clements' via Racket Users
> On Nov 8, 2017, at 8:31 AM, Matthew Butterick wrote: > > The `(current-environment-variables)` visible in command-line `racket` seem > to be exactly what I see when I just do `env` in the shell. Makes sense. > > But the `(current-environment-variables)` in DrRacket differ quite a bit: > som

Re: [racket-users] raco planet open tries to install?

2017-11-02 Thread 'John Clements' via Racket Users
, IIUC. Probably easiest just to dig up an older version of Racket to install this .plt file. John > On Nov 2, 2017, at 3:46 PM, 'John Clements' via Racket Users > wrote: > > I’m surprised by this interaction with raco planet: > > % raco planet open ../margr

[racket-users] raco planet open tries to install?

2017-11-02 Thread 'John Clements' via Racket Users
I’m surprised by this interaction with raco planet: % raco planet open ../margrave3-dev-0203.plt . cannot install; version (400) of collection ("mzscheme") is required, but version is installed context...: /Users/clements/racket/racket/collects/setup/unpack.rkt:408:31: loop /Users/cleme

Re: [racket-users] preferences file

2017-11-02 Thread 'John Clements' via Racket Users
> On Nov 2, 2017, at 9:35 AM, Geoffrey Knauth wrote: > > Let's suppose I want to have a preferences file, e.g., "~/.dbaccess.rkt". I > used to have a module I would import via > "../some-relative-path/dbaccess.rkt", but I thought I would try > "~/.dbaccess.rkt" as a module path. It turned o

[racket-users] trending racket repos on github

2017-10-31 Thread 'John Clements' via Racket Users
Thanks to Andreas Per Olsson’s post on the Racket Facebook group, I found out about this link https://github.com/trending/racket?since=monthly which lists the Racket repos that are “trending”. I think this has something to do with the number of stars it has. Anyhow… interesting information. Jo

Re: [racket-users] DrR compilation progress bar

2017-10-29 Thread 'John Clements' via Racket Users
> On Oct 29, 2017, at 15:35, Robby Findler wrote: > > On Sun, Oct 29, 2017 at 5:31 PM, John Clements > wrote: >> >>> On Oct 29, 2017, at 15:27, Robby Findler >>> wrote: >>> >>> I think it is a bad idea to dump output into the interactions that >>> isn't being printed by the program. >> >>

Re: [racket-users] DrR compilation progress bar

2017-10-29 Thread 'John Clements' via Racket Users
erhaps that can be used? > > Robby > > > On Sun, Oct 29, 2017 at 5:25 PM, 'John Clements' via Racket Users > wrote: >> This is a great idea: I feel like this change would deliver 80% of what I >> want, and be easy to implement. It would give a concrete and

Re: [racket-users] DrR compilation progress bar

2017-10-29 Thread 'John Clements' via Racket Users
This is a great idea: I feel like this change would deliver 80% of what I want, and be easy to implement. It would give a concrete and recognizable visual “path” of the compilation. I would not be inclined to delete it when finished. Could it ever be long? Would it make other people unhappy to s

[racket-users] DrR compilation progress bar

2017-10-28 Thread 'John Clements' via Racket Users
Okay, this is just what the world needs…another DrRacket GUI suggestion. If it makes sense, though, I’d love to help implement it. If there’s anything that the last 30 years of UI (oh… sorry… UX) design has taught us, it’s that people hate to wait, and they REALLY hate to wait when they have no

Re: [racket-users] Can anyone help me with a change?

2017-10-22 Thread 'John Clements' via Racket Users
Okay, this might now be done. You should be able to install it using raco pkg install simply-scheme OR you can use the package manager from within DrRacket. MAJOR disclaimer: I am not a user of Simply Scheme, and this package does not appear to include any tests. However, it appears that (+

Re: [racket-users] Can anyone help me with a change?

2017-10-22 Thread 'John Clements' via Racket Users
Okay, I spent half an hour on this, and I think I’m done… um, almost. Actually, it appears that my quick job of updating the drracket tool has resulted in a configuration that can reliably make DrRacket seg fault (!). Since this package does not involve FFI in any way, this is a bug in DrRacket,

[racket-users] proposed doc fix?

2017-10-22 Thread 'John Clements' via Racket Users
The documentation currently states: "When DrRacket starts up, it looks for tools by reading fields in the info.rkt file of each collection and the newest version of each PLaneT package installed on the system. (Technically, DrRacket looks in a cache of the "info.rkt" files contents created by r

Filename completion (was: Re: [racket-users] Open source projects)

2017-10-22 Thread 'John Clements' via Racket Users
> On Oct 22, 2017, at 16:05, Neil Van Dyke wrote: > > I could be missing something, but I think a filename completion procedure > (not the DrRacket integration part) might be a doable exercise for a budding > Racket programmer, so long as they already have a basic familiarity with > using the

Re: [racket-users] Beautiful Racket v1.0

2017-10-22 Thread 'John Clements' via Racket Users
> On Oct 22, 2017, at 04:30, Gour wrote: > > On Thu, 16 Mar 2017 02:04:53 -0700 (PDT) > Vincent Nys wrote: > >> Congrats! I've gone through all the chapters and it has been the most >> entertaining programming book I have ever read. It's been practical, >> too, as I have already used bits of i

Re: [racket-users] Open source projects

2017-10-22 Thread 'John Clements' via Racket Users
> wrote: > Do you want drr to open the files? If so, is cmd-shift-O followed by typing > an open double quote close enough? > > Robby > > On Fri, Oct 20, 2017 at 11:42 AM 'John Clements' via Racket Users > wrote: > > > On Oct 20, 2017, at 8:06 AM, Vince

Re: [racket-users] Open source projects

2017-10-20 Thread 'John Clements' via Racket Users
> On Oct 20, 2017, at 8:06 AM, Vincent St-Amour > wrote: > > That page is pretty out of date. > > This list is more focused on contributing to Racket itself, but is more > up to date. It was compiled for the "office hours" portion of the last > RacketCon, ~2 weeks ago. > > https://github.com

Re: [racket-users] Re: code reflection

2017-10-14 Thread 'John Clements' via Racket Users
Lovely! I was thinking along these lines, but you hit it out of the park. Sounds like you must be avoiding some really important task! John > On Oct 14, 2017, at 11:31, Ryan Culpepper wrote: > > On 10/14/2017 05:01 AM, George Neuner wrote: >> On 10/14/2017 3:00 AM, Jack Firth wrote: >>> >>>

[racket-users] RacketCon Sunday Hours?

2017-09-08 Thread 'John Clements' via Racket Users
Like many of you, I’m looking forward to attending RacketCon this year. Before I buy plane tickets, though, I’m wondering if we have some thought about what the hours of Sunday’s “Office Hours” will be. Thoughts? Can’t wait! John -- You received this message because you are subscribed to th

Re: [racket-users] Long division algorithm in HtDP way

2017-09-07 Thread 'John Clements' via Racket Users
> On Sep 7, 2017, at 9:28 AM, jaroslaw.mo...@gmail.com wrote: > > > Dear Racketeers! > > I would like to write the function divide in racket, for performing the long > division, which would print the whole computational process, as the > elementary school pupils do. For example, the call (div

[racket-users] racket s*cks

2017-08-16 Thread 'John Clements' via Racket Users
I’m amused to report that I’ve organically captured what appears to be a substantial fraction of the google search traffic for the phrase “racket sucks”. Since last December, I have about 1,200 visits to my blog post https://www.brinckerhoff.org/blog/2016/04/25/racket-sucks-don-t-try-it/ …inclu

Re: [racket-users] Typed Racket Type Annotations - Best Practices?

2017-06-29 Thread 'John Clements' via Racket Users
> On Jun 29, 2017, at 17:33, Zelphir Kaltstahl > wrote: > > A while ago I started looking at Typed Racket and today I took a look again. > > The documentation says: > >> Typed Racket provides modified versions of core Racket forms, which permit >> type annotations. Previous versions of Typed

Re: [racket-users] Asi64 - a Racket based 6502 assembler

2017-06-04 Thread 'John Clements' via Racket Users
> On Jun 2, 2017, at 14:44, 'Ross Mckinlay' via Racket Users > wrote: > > On Friday, June 2, 2017 at 10:38:35 PM UTC+1, johnbclements wrote: >>> On Jun 2, 2017, at 2:32 PM, 'Ross Mckinlay' via Racket Users >>> wrote: >>> >>> Hello Racketeers! >>> >>> I just released an early version of my f

Re: [racket-users] Asi64 - a Racket based 6502 assembler

2017-06-02 Thread 'John Clements' via Racket Users
> On Jun 2, 2017, at 2:32 PM, 'Ross Mckinlay' via Racket Users > wrote: > > Hello Racketeers! > > I just released an early version of my first real Racket project, which > extends Racket to become a 6502 assembler. Thought I would share it here: > > http://pinksquirrellabs.com/blog/2017/05/

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

2017-05-27 Thread 'John Clements' via Racket Users
> On May 27, 2017, at 07:00, A Mauer-Oats wrote: > > Does anyone use array data with the Universe teachpack? > > I thought it would be interesting to work with 2D data in an "advanced > introductory" class. At least to the extent of being able to model classic > board games like Battleship an

Re: [racket-users] immutable hash table performance

2017-05-25 Thread 'John Clements' via Racket Users
> On May 25, 2017, at 3:49 PM, Matthew Flatt wrote: > > At Thu, 25 May 2017 18:28:16 -0400, "'John Clements' via Racket Users" wrote: >>> On May 25, 2017, at 3:27 PM, Jon Zeppieri wrote: >>> Immutable hash operations are logarithmic, not constan

Re: [racket-users] immutable hash table performance

2017-05-25 Thread 'John Clements' via Racket Users
> On May 25, 2017, at 3:27 PM, Jon Zeppieri wrote: > > On Thu, May 25, 2017 at 6:16 PM, 'John Clements' via Racket Users > wrote: >> Following up on a discussion I had with another teacher here, I decided to >> briefly investigate the running time of in

Re: [racket-users] immutable hash table performance

2017-05-25 Thread 'John Clements' via Racket Users
> On May 25, 2017, at 3:20 PM, Ben Greenman wrote: > > Is the y-axis on the first plot labeled correctly? It's reporting fractions > of a millisecond, but the text talks about 7 vs. 40 seconds. Yes, I believe that’s correct: the 7 seconds is for constructing the table of 10 million elements,

[racket-users] immutable hash table performance

2017-05-25 Thread 'John Clements' via Racket Users
Following up on a discussion I had with another teacher here, I decided to briefly investigate the running time of insertion and deletion on mutable vs immutable hash tables. I was a bit disappointed to find that it turns out that insertion really doesn’t look very constant-time for insertion… o

Re: [racket-users] sharing a value between a DrRacket tool and a user program

2017-05-16 Thread 'John Clements' via Racket Users
> On May 16, 2017, at 11:26 AM, Robby Findler > wrote: > > If you have control of the language<%> class, then you can do that via > the on-execute method. If you want to do that for all languages (which > is probably not a good idea, but you could use this approach and limit > it to a known set

Re: [racket-users] sharing a value between a DrRacket tool and a user program

2017-05-16 Thread &#x27;John Clements&#x27; via Racket Users
> On May 16, 2017, at 11:23 AM, Vincent St-Amour > wrote: > > John, Austin, > > You can use loggers for this. The `data` argument to `log-message` > allows payloads to be carried along with log messages. Just have the > user program log messages with a particular topic, and have the tool > lis

[racket-users] sharing a value between a DrRacket tool and a user program

2017-05-16 Thread &#x27;John Clements&#x27; via Racket Users
Austin Sparks (cc:ed) and I are struggling with what I believe should be a pretty simple problem; how can we share a value between a DrRacket tool and a user’s program? Specifically, the value in question here is a channel (probably an asynchronous channel) on which the user’s thread can place

[racket-users] DR + light syntax layer + quickcheck

2017-04-30 Thread &#x27;John Clements&#x27; via Racket Users
If someone hasn’t already done this, I’ve got a few CS Ed papers for sure…. I’m looking at Python now, but this should be much easier in Racket: I’d like to put together a simple syntax for unenforced data definitions and signatures, then use instructor help to map these to course-specific quick

Re: [racket-users] DrRacket preferences error

2017-04-29 Thread &#x27;John Clements&#x27; via Racket Users
> On Apr 29, 2017, at 11:36, Philip McGrath wrote: > > After upgrading to 6.9, I'm getting the following "DrRacket Internal Error" > when I try to open the preferences menu on MacOS: > > preferences:get: tried to get a preference but no default set for > 'scribble-reindent-paragraph-width >

[racket-users] lovely illustration of the importance of teaching languages...

2017-04-26 Thread &#x27;John Clements&#x27; via Racket Users
This nightmarish but organic example produced by a student actually works correctly, and is a beautiful example of why we need teaching languages (or a type system that enforces boolean inputs to ‘or’): https://www.brinckerhoff.org/blog/ Note that while the actual student code is in python, it’

Re: [racket-users] Proper non-tail recursion?

2017-04-25 Thread &#x27;John Clements&#x27; via Racket Users
> On Apr 25, 2017, at 4:05 PM, brendan wrote: > > Indeed; I should have clarified that I didn't mean only recursion per se. Not > the first time I've stumbled on that misnomer. Forgive me. In that case, I’m not sure exactly what property it is you’re looking for a name for. :) John --

Re: [racket-users] Proper non-tail recursion?

2017-04-25 Thread &#x27;John Clements&#x27; via Racket Users
> On Apr 25, 2017, at 3:37 PM, brendan wrote: > > Scheme implementations are required to have proper tail recursion. Racket > goes further and lets the programmer make recursive calls from any position > without fear because, to paraphrase Dr. Flatt, it's the 21st century and > stack overflow

Re: [racket-users] Basic audio files' manipulation

2017-04-21 Thread &#x27;John Clements&#x27; via Racket Users
> On Apr 21, 2017, at 18:34, Cleverson Casarin Uliana > wrote: > > Hello, I need playing/stopping a given audio file (may be wav, ogg, etc.), > checking whether the sound is still playing, and stop it/start a new sound > upon a key press. Is there support for it, prefferably using the OS nati

Re: [racket-users] Scribbling documentation for a module beginning with _

2017-04-14 Thread &#x27;John Clements&#x27; via Racket Users
> On Apr 14, 2017, at 6:05 AM, Matthew Flatt wrote: > > I don't didn't find any other workaround. > > I think it makes no sense to treat an `_` prefix specially in > `defmodule`, `racketmodlink`, etc. (and it wasn't really a good idea > for `racket`), so I've pushed a change to Scribble to disa

[racket-users] scribble housekeeping?

2017-04-10 Thread &#x27;John Clements&#x27; via Racket Users
There are several things about the excellent scribble guide at http://docs.racket-lang.org/scribble/getting-started.html that appear not to have been edited since the pre-Butterick era. Since this is now year B3 or B4, it seems high time to edit them. Specifically, the documentation manages to

Re: [racket-users] Keyboard and Image movement

2017-04-09 Thread &#x27;John Clements&#x27; via Racket Users
> On Apr 9, 2017, at 15:14, bsdm wrote: > > Hey everyone, I"m new to the racket language and was wondering if anyone can > help me explain keyboard movement for an image I'm using for a game I'm > trying to make. And yes I know there's a documentation page for it, but I'm > having trouble fig

Re: [racket-users] Announcing Leibniz, a new language in the Racket universe

2017-04-09 Thread &#x27;John Clements&#x27; via Racket Users
> On Apr 7, 2017, at 08:33, Konrad Hinsen wrote: > > Now available for your friendly Racket installation: Leibniz, a digital > scientific notation > > What's a digital scientific notation? For those who come from a programming > language background, it's a specification language for scientifi

[racket-users] GitHub API package?

2017-04-06 Thread &#x27;John Clements&#x27; via Racket Users
It looks like pkgn.racket-lang.org has two different GitHub API repos, and neither of them has been updated since 2015. One is Sam’s, one is from a fellow named Stefan. In addition, it looks like Tony forked Sam’s repo. Can any of you comment on which of these is the most likely to be working to

Re: [racket-users] "check-random" + TR

2017-03-28 Thread &#x27;John Clements&#x27; via Racket Users
? I’m not aware of any others. (it’s true, I didn’t really answer your question….) I will say that the error message simply suggests that another typed import is needed. John > > > >> On Mar 28, 2017, at 12:38 PM, 'John Clements' via Racket Users >> wrote: >&

[racket-users] "check-random" + TR

2017-03-28 Thread &#x27;John Clements&#x27; via Racket Users
Someone on stack overflow just discovered that “check-random”—from Kathy Gray’s teaching language test framework—doesn’t work with TR. It looks like this is because no one bothered to implement it. I suggested that they change to rackunit, instead, and provided them with this quick hack version

Re: [racket-users] How to apply side effects to all elements in a list

2017-03-22 Thread &#x27;John Clements&#x27; via Racket Users
> On Mar 22, 2017, at 12:45 PM, Angus wrote: > > I am a bit stuck on rendering images in a list. > > Here is my code below. > > (require 2htdp/image) > > (define-struct bear-state (x y rotation size)) > > (define MTS (empty-scene WIDTH HEIGHT)) > > BEAR-IMAGE is just a graphic - of a bear.

Re: [racket-users] beautiful-racket, contract-violation: expected: module-path? given ('planet ....)

2017-03-21 Thread &#x27;John Clements&#x27; via Racket Users
It looks to me as though this error may have nothing to do with beautiful racket, and that beautiful racket may have installed successfully. In particular, it looks like an error occurred while building the docs for ‘unlib’, and that the ‘unlib’ library is something that you had installed previ

Re: [racket-users] change 'random' contract to allow zero in first position?

2017-03-03 Thread &#x27;John Clements&#x27; via Racket Users
> On Mar 3, 2017, at 12:02 PM, Daniel Prager wrote: > > > > On Sat, Mar 4, 2017 at 6:21 AM, John Clements > wrote: > > > On Mar 2, 2017, at 3:00 PM, Daniel Prager wrote: > > > > While we're at it, please allow negative arguments too, to allow for cases > > such as > > > > (random -100 100

Re: [racket-users] change 'random' contract to allow zero in first position?

2017-03-03 Thread &#x27;John Clements&#x27; via Racket Users
> On Mar 2, 2017, at 2:06 PM, Jay McCarthy wrote: > > I think that the contract is overly specific on the 2 argument case. > But on the 1 argument case, I don't think 0 makes sense: > > "When called with an integer argument k, returns a random exact > integer in the range 0 to k-1."[k <- 0] > =

Re: [racket-users] change 'random' contract to allow zero in first position?

2017-03-03 Thread &#x27;John Clements&#x27; via Racket Users
> On Mar 2, 2017, at 3:00 PM, Daniel Prager wrote: > > While we're at it, please allow negative arguments too, to allow for cases > such as > > (random -100 100) Well, that’s different; that’s actually changing the implementation. I’m not proposing that… John -- You received this messag

[racket-users] change 'random' contract to allow zero in first position?

2017-03-02 Thread &#x27;John Clements&#x27; via Racket Users
I have a bunch of students this quarter that are writing code like this: (- (random 1 9) 1) Why? because they tried writing (random 0 8) and got a contract error, to wit: random: contract violation expected: (integer-in 1 4294967087) given: 0 > I’m assuming that this contract was writt

Re: [racket-users] JFYI, c-level assertion failures during build

2017-02-25 Thread &#x27;John Clements&#x27; via Racket Users
did a quick grep for ‘ffi’ and ‘unsafe’, and in fact I don’t think the package has any weirdness in it at all. John > > At Fri, 24 Feb 2017 19:52:43 -0500, "'John Clements' via Racket Users" wrote: >> I’m currently in a state where calling `make` in my top-

[racket-users] JFYI, c-level assertion failures during build

2017-02-24 Thread &#x27;John Clements&#x27; via Racket Users
I’m currently in a state where calling `make` in my top-level racket directory results in output ending thusly: … raco setup: 1 making: /cldr-bcp47/cldr/bcp47/data Assertion failed: (!(used && (pre_body->count == 1) && pre_body->vars[0]->optimize.known_val && ((Scheme_Type)(scheme_once_used_type

Re: [racket-users] intensional equality and unit tests

2017-02-21 Thread &#x27;John Clements&#x27; via Racket Users
> On Feb 21, 2017, at 1:01 PM, Gustavo Massaccesi wrote: > > I'm not sure if this changed. To get a #t with equal? you can add > #:transparent . But be careful because #:transparent is more powerful > than what I expected. For example, it makes available the constructor > of the struct. I’m sor

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread &#x27;John Clements&#x27; via Racket Users
perform structural traversal. I agree; my only point is that those writing unit tests probably want to define (or have defined) two separate notions of equality; one for use in tests, and one for use by clients. And that testing frameworks should accommodate/encourage this. John > >

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread &#x27;John Clements&#x27; via Racket Users
> On Feb 20, 2017, at 11:02, Matthias Felleisen wrote: > > >> On Feb 20, 2017, at 1:53 PM, John Clements wrote: >> >> No, I don’t think you missed anything, but from the standpoint of those >> teaching early classes in either Java or Python (a standpoint that I >> understand you are general

Re: [racket-users] intensional equality and unit tests

2017-02-20 Thread &#x27;John Clements&#x27; via Racket Users
> On Feb 19, 2017, at 14:40, Matthias Felleisen wrote: > > >> On Feb 18, 2017, at 11:12 PM, 'John Clements' via Racket Users >> wrote: >> >> (cc:ak) >> >> Okay, this sounds just crushingly obvious now that I say it, but honestly, I

[racket-users] intensional equality and unit tests

2017-02-18 Thread &#x27;John Clements&#x27; via Racket Users
(cc:ak) Okay, this sounds just crushingly obvious now that I say it, but honestly, I don’t think it’s occurred to me: One reason that equality is such a nightmare in Java and Python (which turns out to be JUST AS BAD), is that those of us that actually want to write unit test cases want *inte

[racket-users] Is this a TR bug?

2017-02-16 Thread &#x27;John Clements&#x27; via Racket Users
Here’s a simple program that fails: #lang typed/racket (define (obscurinator [x : Any]) : Any x) (struct PrimV ([f : (Real Real -> Real)]) #:transparent) (define dangerval : PrimV (cast (obscurinator (PrimV +)) PrimV)) ((PrimV-f dangerval) 3 4) It type-checks fine, but it produces

Re: [racket-users] How do I find where a module is located?

2017-02-14 Thread &#x27;John Clements&#x27; via Racket Users
> On Feb 14, 2017, at 9:00 AM, David Storrs wrote: > > > > On Tue, Feb 14, 2017 at 11:41 AM, 'John Clements' via Racket Users > wrote: > > > On Feb 14, 2017, at 8:36 AM, David Storrs wrote: > > > > I have murphy/protobuf installed and I&

Re: [racket-users] How do I find where a module is located?

2017-02-14 Thread &#x27;John Clements&#x27; via Racket Users
> On Feb 14, 2017, at 8:36 AM, David Storrs wrote: > > I have murphy/protobuf installed and I'd like to look at the source code. > How do I find it? I think you’re looking for the ‘collection-file-path’ function, if you want to do it programmatically. Alternatively, If you just want to open

[racket-users] MFlatt eval blog link broken in search engines

2017-01-21 Thread &#x27;John Clements&#x27; via Racket Users
So I went looking for Matthew’s classic 2011 post on ‘eval’, today, and my friendly local search engine returned this link: https://blog.racket-lang.org/2011/10/on-eval-in-dynamic-languages-generally.html … which is now a 403 Forbidden. After some searching, I figured out that the correct link

Re: [racket-users] scribble defproc?

2017-01-16 Thread &#x27;John Clements&#x27; via Racket Users
> On Jan 16, 2017, at 00:31, Andreas Olsson wrote: > > I've never done serialisation befor. I have to learn that then. :-) Well, quoting is one form of serialization, so in some sense, you *have*… I would definitely echo others, though, in suggesting that using ‘eval’ here is a not-at-all-goo

[racket-users] race condition in handin server?

2017-01-16 Thread &#x27;John Clements&#x27; via Racket Users
It looks like there’s a race condition—actually, I think I’m abusing this term—that occurs when the handin server runs out of memory while (re-)evaluating a checker module. Specifically, it appears that following such a failure, subsequent attempts to check this assignment simply enter a stalled

Re: [racket-users] scribble defproc?

2017-01-15 Thread &#x27;John Clements&#x27; via Racket Users
> On Jan 15, 2017, at 09:23, Andreas Olsson wrote: > > I have function that demand a quoted lambda as an argument, how would you > write that in defproc? I think that—unlike the contract system, or typed racket—you can put pretty much anything you want in the “type/contract” slot of a defproc

Re: [racket-users] Path inside package?

2017-01-09 Thread &#x27;John Clements&#x27; via Racket Users
> On Jan 9, 2017, at 1:16 PM, Andreas Olsson wrote: > > > I'm having a little trouble. I have constructed a package with files that > work when tested in a directory, when installed as a package I get a path > problem. A function in one file creates places that's loaded with a separate > fil

Re: [racket-users] New website design feedback

2016-12-29 Thread &#x27;John Clements&#x27; via Racket Users
> On Dec 29, 2016, at 09:46, Matthew Butterick wrote: > > >> On Dec 23, 2016, at 6:55 AM, Greg Trzeciak wrote: >> >> 1. There is one thing that frustrates me most when I stumble upon new >> website/package/repository for the first time and I have no previous >> knowledge of its content. It

<    1   2   3   4   5   6   >