Re: [racket-users] How to convert String to Integer

2020-02-15 Thread 'John Clements' via Racket Users
?? > (string2value "-1234") - : Integer -28766 > (string2value "abcd") - : Integer 54562 > Is this your desired behavior? > On Feb 12, 2020, at 16:43, Alain De Vos wrote: > > I came to the following result as conversion function : > > #lang typed/racket > (: string2value (-> String

Re: [racket-users] resources for learning JS / React?

2020-01-26 Thread 'John Clements' via Racket Users
Many thanks! These look good. John Clements > On Jan 26, 2020, at 05:15, Darren Newton wrote: > > For learning JavaScript these two resources are very good: > > Eloquent JavaScript https://eloquentjavascript.net/ > You Don't Know JS https://github.com/getify/You-Dont-Know-JS > > The tutorial

[racket-users] style guide addition?

2020-01-20 Thread 'John Clements' via Racket Users
I’m grading code, and one of my students keeps leaving out spaces in weird places: (cond [(< x 3)(+ x 1)] [else (f(g 9))]) I took a quick look in the style guide, and it doesn’t seem to have much to say about this. Here’s what it has: 6.8 Spaces Don’t pollute your code with spaces at the

Re: [racket-users] index-of + TR ... parametricity problem?

2019-12-15 Thread 'John Clements' via Racket Users
> 3. Use `unsafe-require/typed` > 4. Use the third argument to `index-of?` > > Sam > > On Sun, Dec 15, 2019 at 9:28 PM 'John Clements' via Racket Users > wrote: >> >> It looks like my quick attempt at importing index-of into TR is running into >> a problem

[racket-users] index-of + TR ... parametricity problem?

2019-12-15 Thread 'John Clements' via Racket Users
It looks like my quick attempt at importing index-of into TR is running into a problem. Here’s the program I ran: #lang typed/racket (require/typed racket/list [index-of (All (T) ((Listof T) T -> (U False Natural)))]) (index-of '(n s e w) 'n) ;; returns... #f? In

Re: [racket-users] Playing with rsound

2019-12-07 Thread 'John Clements' via Racket Users
The problem here is that the piano notes are not all the same duration. Specifically, your chord (chord 60 64 67) is a bit longer: (rs-frames (chord 60 64 67)) -> 161634 frames (rs-frames (piano-tone 72)) -> 144000 frames There are a lot of ways of solving this, including clipping the two

Re: [racket-users] Racket 7.5 DMG file does not open on OSX 10.11

2019-12-03 Thread 'John Clements' via Racket Users
> On Dec 3, 2019, at 2:29 PM, James Platt wrote: > > > On Nov 27, 2019, at 12:42 PM, Darth Vadør wrote: > >> I am having the same problem, and I am pretty sure that this is because the >> new DMG uses the novel APFS format, which is not readable by our old HFS >> computers. >> As far as

Re: [racket-users] Racket 7.5 DMG file does not open on OSX 10.11

2019-11-27 Thread 'John Clements' via Racket Users
> > What would be the magic xattr command? > > Thanks. > > bruce > > 27 November 2019 20:26 "'John Clements' via Racket Users" > wrote: > This is 100% workaround rather than a fix, but have you considered using the > minimal racket tarball: > > https:/

Re: [racket-users] Racket 7.5 DMG file does not open on OSX 10.11

2019-11-27 Thread 'John Clements' via Racket Users
This is 100% workaround rather than a fix, but have you considered using the minimal racket tarball: https://download.racket-lang.org/releases/7.5/installers/racket-minimal-7.5-x86_64-macosx.tgz …and then manually blessing the binaries using xattr and then installing the rest of the system

[racket-users] Racket v7.5

2019-11-19 Thread 'John Clements' via Racket Users
Racket version 7.5 is now available from https://racket-lang.org/ * Almost all of Racket version 7.5 is distributed under a new, less-restrictive license: either the Apache 2.0 license or the MIT license. See

Re: [racket-users] How to install an updated version of an installation-wide package?

2019-11-05 Thread 'John Clements' via Racket Users
It looks to me like you’re looking for “raco pkg update —clone” or “raco pkg update —link”, but I may be mistaken. Specifically, running raco pkg update —clone drracket in, say, your home directory should clone the package that includes the drracket collection (and possibly others that are

Re: [racket-users] Version number issue with snapshot 7.5.0.6

2019-11-04 Thread 'John Clements' via Racket Users
Forgive me if I’m missing something important, but I see messages like this all the time when I’m using two installations of racket simultaneously on one machine. It suggests to me that you need to recompile using a raco make, or just delete the compiled files. Again, apologies if I’m

Re: [racket-users] broken download link

2019-10-22 Thread 'John Clements' via Racket Users
hmm, I don’t see that. Perhaps it’s already been fixed? If this persists for you, maybe you can show the output of curl -v -o “/tmp/index.html” “https://download.racket-lang.org/“ ? > On Oct 22, 2019, at 2:28 PM, calvin tolman wrote: > > fyi: > > this url is broken:

Re: [racket-users] Interactive Heat Maps

2019-09-25 Thread 'John Clements' via Racket Users
Nice! Many thanks for sharing this. John > On Sep 21, 2019, at 2:06 AM, Alex Harsanyi wrote: > > A few days ago I posted about adding maps to the DrRacket REPL -- while a > nice demo, this is not why I implemented the `map-snip%` object. The reason > I implemented it is because I wanted to

Re: [racket-users] no TR support for streams?

2019-09-10 Thread 'John Clements' via Racket Users
Oh! and in fact, you already bundled it as a pkg: https://pkgs.racket-lang.org/package/typed-racket-stream Thanks! John > On Sep 7, 2019, at 2:23 PM, Alex Knauth wrote: > > >> On Sep 6, 2019, at 1:04 PM, 'John Clements' via Racket Users >> wrote: >> >&

[racket-users] no TR support for streams?

2019-09-06 Thread 'John Clements' via Racket Users
Perhaps I just don’t know how to search the racket docs correctly, but IIUC there’s no support for Streams in the current TR implementation? I just want to use stream-cons, empty-stream, stream-first, and stream-rest. I guess the easy workaround is just to use thunks to roll my own stream, but

[racket-users] gen:stream doc fix?

2019-08-26 Thread 'John Clements' via Racket Users
The gen:stream documentation has this example: (define-struct list-stream (v) #:methods gen:stream [(define (stream-empty? stream) (empty? (list-stream-v stream))) (define (stream-first stream) (first (list-stream-v stream))) (define (stream-rest stream)

Re: [racket-users] [standard-fish] A geometric design

2019-08-25 Thread 'John Clements' via Racket Users
Seriously! Magnificent! Want to play with this code, show it to students and co-workers. John > On Aug 25, 2019, at 14:52, Zachary Romero wrote: > > Hello, > > Here is a little tessellation design I made along with some helper functions > to generate them:

Re: [racket-users] running the wrong sqlite3

2019-08-20 Thread 'John Clements' via Racket Users
In that case, perhaps you can watch the calls to dlopen with strace? See https://stackoverflow.com/questions/5103443/how-to-check-what-shared-libraries-are-loaded-at-run-time-for-a-given-process for something that might be helpful. John > On Aug 20, 2019, at 11:30, James Platt wrote: > >

Re: [racket-users] [standard-fish] map of the world

2019-08-19 Thread 'John Clements' via Racket Users
agreed, very cool. Tempted to mess with projections. John > On Jul 31, 2019, at 10:45, Stephen De Gabrielle > wrote: > > Very nice! Thank you so much! > > Looks like an opportunity for some remixing :o > > S. > > On Wed, 31 Jul 2019 at 01:58, Alex Harsanyi wrote: > Here is a map of the

Re: [racket-users] acceptable drracket definitions for interaction

2019-08-19 Thread 'John Clements' via Racket Users
Are you referring to section 6.3, which defines modules as individual s-expressions? It appears to me that this code would work fine if specified in the style shown earlier in section 6.1, where each module appears in its own file, begins with a #lang declaration, and the one referred to the

Re: [racket-users] does handin-server really need racket/gui/base?

2019-08-19 Thread 'John Clements' via Racket Users
I’m not looking at the code here, but I believe the issue here is that the handin-server receives user code in a serialized-could-contain-images-format that can’t be decoded properly without importing the gui libraries. It seems not implausible to me that you could special-case all-text

Re: [racket-users] running the wrong sqlite3

2019-08-19 Thread 'John Clements' via Racket Users
Perhaps you need to configure your lib-search-dir setting? https://docs.racket-lang.org/raco/config-file.html?q=lib-search-dir#%28idx._%28gentag._65._%28lib._scribblings%2Fraco%2Fraco..scrbl%29%29%29 John > On Aug 19, 2019, at 15:42, James Platt wrote: > > I'm having an issue where I can't

Re: [racket-users] Re: Racket v7.4

2019-08-14 Thread 'John Clements' via Racket Users
What distribution and platform do you have selected? The “variant” menu will only appear for certain choices of distribution and platform. John > On Aug 9, 2019, at 12:04, 'Joel Dueck' via Racket Users > wrote: > > On Win10 / Firefox the "variant" selector does not appear for me, I'm not >

Re: [racket-users] [standard-fish] Reverse engineered quilt design

2019-08-01 Thread 'John Clements' via Racket Users
That’s a really nice example of the uses of abstraction in non-programming domains. Thanks! John > On Jul 30, 2019, at 19:04, Daniel Prager wrote: > > Here's a photo of the original quilt from Red Pepper Quilts (not my work): > > > > More images, including details, here: >

[racket-users] Racket v7.3.0.900 is available for testing

2019-07-23 Thread 'John Clements' via Racket Users
Version 7.3.0.900 is now available for testing from https://pre-release.racket-lang.org/ (Note that this is not available from the usual download site.) If all goes well, we will turn this version into a v7.4 release within a couple of weeks. This release is the first

Re: [racket-users] images for Dr Racket 7.2 (Mac)

2019-06-28 Thread 'John Clements' via Racket Users
I think the idea is that you can right-click on the image in the documentation using your browser and save it, then use the Insert Image menu in DrRacket to open the image you just saved. Does this make sense? John > On Jun 28, 2019, at 11:26, Bryan Pierce wrote: > > Hello everyone!! > >

Re: [racket-users] Jupyter Racket Kernel - iracket

2019-06-26 Thread 'John Clements' via Racket Users
It may be that ‘raco’ is not in your path. An alternative is to use the “Package Manager” that’s built into DrRacket, under “File>Package Manager…” to install libraries such as iracket. > On Jun 23, 2019, at 09:10, Arie Schlesinger > wrote: > > Hi, > I am trying to install racket for jupyter

Re: [racket-users] Some concern about ChezScheme...

2019-05-27 Thread 'John Clements' via Racket Users
I’m responding to my own message, because (thanks to Andy Keep) I’ve now discovered a big chunk of the answer. Specifically, it looks Jeremy Siek’s compilers class includes a textbook written by him and Ryan Newton whose preface appears to answer all of my questions; specifically, that they

[racket-users] Racket v7.3

2019-05-15 Thread 'John Clements' via Racket Users
-- Racket version 7.3 is now available from https://racket-lang.org/ Racket-on-Chez continues to improve. Snapshot builds are currently available at pre.racket-lang.org, and we expect that Racket-on-Chez will be included as a

Re: [racket-users] Haskell

2019-05-14 Thread 'John Clements' via Racket Users
Hmm… While I certainly agree that functional languages are good at manipulating program representations, this job (manipulating programs) is more or less *the one thing* that Racket does better than any other language. So… I guess I’d be more likely to use Racket to manipulate Haskell programs

Re: [racket-users] Keeping my mind sharp

2019-05-11 Thread 'John Clements' via Racket Users
> On May 11, 2019, at 07:15, Josh Rubin wrote: > > Some people in their 60's do crossword puzzles to keep their mind sharp. I > want to return to compiler hacking. I have experience with the ideas and code > from many old compilers - MIT MacLisp and Rabbit (the grandfather of all >

[racket-users] Idle UI thought: compiling/running indicator?

2019-05-09 Thread 'John Clements' via Racket Users
In dealing with students, it’s a constant frustration to me that students don’t realize that clicking the ‘run’ button triggers both compilation and running. Also, in my own work, I sometimes forget to compile things at the command line, and then wonder why my programs are taking forever to

Re: [racket-users] Stack trace

2019-05-02 Thread 'John Clements' via Racket Users
Well, I see two things going on here. First, this example is an interesting one, because there’s no stack trace to display; the (/ 1 n) is the only “frame” left on the “stack”, because the call to sub2 has already returned, and the body of “reciprocal” is in tail position with respect to the

Re: [racket-users] make extensions or replacements

2019-04-19 Thread 'John Clements' via Racket Users
There’s a paper at the most recent ICFP from Simon Peyton Jones (et al., I’m guessing) on make languages, IIRC. John > On Apr 16, 2019, at 2:09 PM, Greg Hendershott > wrote: > > I have a shallow understanding of GNU Make, which is only somewhat > less-shallow as a result of recently

Re: [racket-users] lists.racket-lang.org seems to be down

2019-04-17 Thread 'John Clements' via Racket Users
I haven’t checked, but my recollection is that this is/was a pointer to the dearly departed winooski. I believe that we will get this running again, we appear to have the replacement machine at least partly provisioned, but I wouldn’t expect it to be up in the next day or two. John > On Apr

Re: [racket-users] Help with pretty printing

2019-04-04 Thread 'John Clements' via Racket Users
I’m glad to hear it! I think that it may not fail in nice ways for deeply nested s-expressions, but that not be an issue for you. I do think that there should be a nicer way than using a text%. John > On Apr 4, 2019, at 11:14 AM, Stephen Foster wrote: > > Thanks, John. Actually, when you

Re: [racket-users] Is there any way to redefine printf in main.rkt ?

2019-04-01 Thread 'John Clements' via Racket Users
Oog… I don’t really think dynamic-require is the right tool here at all. Setting the current-output-port seems vastly more reasonable. John > On Apr 1, 2019, at 12:19, Chansey wrote: > > More elegant way is combining with-output-to-file with dynamic-require > > (with-output-to-file FILE >

Re: [racket-users] Re: Pretty display of tabular data?

2019-03-16 Thread 'John Clements' via Racket Users
Yep, excellent idea. I’ve added the ’tabular’ tag to csv-writing. John > On Mar 15, 2019, at 3:24 AM, jackhfi...@gmail.com wrote: > > I think we should all work towards making our existing code in this area more > discoverable, so we can get a better sense of what libraries for working with >

Re: [racket-users] Re: What is the best way to "raco make" all *.rkt files in a directory tree?

2019-03-11 Thread 'John Clements' via Racket Users
I would suggest maybe just using racket here: #lang racket (require setup/parallel-build) (define racket-files (for/list ([file (in-directory "/tmp")] #:when (regexp-match #px"\\.rkt$" file)) file)) (parallel-compile-files racket-files #:worker-count

[racket-users] TR: tighten type of "random" ? (and so much more...)

2019-02-27 Thread 'John Clements' via Racket Users
I was doing some very low-key monte carlo testing today, and I wanted to whether it would magically get faster if I used TR. The short answer is … well, wait on that. Here’s my program; it’s supposed to check the likelihood that three randomly chosen numbers in the interval 0-1 could be the

[racket-users] tree-layout, many many thanks

2019-02-26 Thread 'John Clements' via Racket Users
I wanted to format binary search trees for a data structures exam. I spent literally hours trawling through old source code to see how I’d done it before… graphviz? tikzpicture? … before giving up and doing what I should have done in the first place, looking in the racket docs. Tree-layout does

Re: [racket-users] Cannot use case+else inside match+else

2019-02-25 Thread 'John Clements' via Racket Users
I may be missing something obvious, here, but why are you using the name “else” to bind the result in the match clause? I usually use the name “other”, which might solve your problem. John > On Feb 25, 2019, at 4:32 PM, Shu-Hung You > wrote: > > When using a case expression with an else

Re: [racket-users] type annotation example

2019-02-25 Thread 'John Clements' via Racket Users
When I paste that code into a file called `foo`, it runs fine. Transcript: hardy:/tmp clements> cat foo #lang typed/racket (require typed/racket/base) (: fn (-> String Symbol)) (define (fn str) 'foo) hardy:/tmp clements> racket foo hardy:/tmp clements> I can’t honestly guess what the problem

[racket-users] big-step-stepper ==> tree-er?

2019-02-22 Thread 'John Clements' via Racket Users
Has anyone explored the idea of a “big-step stepper”? It wouldn’t be a “stepper” at all, of course, just a big tree, but you could imagine a learning tool that allows you to explore the evaluation of a term by unfolding parts of its big-step tree. Generating the raw data for this tree would be

Re: [racket-users] performance, json

2019-02-22 Thread 'John Clements' via Racket Users
I’m not that surprised :). My guess is that our json reader could be sped up quite a bit. This looks like the heart of the read-json implementation: (define (read-json* who i jsnull) ;; Follows the specification (eg, at json.org) -- no extensions. ;; (define (err fmt . args)

Re: [racket-users] How do you make students submit programming assignments online for automatic tests?

2019-02-20 Thread 'John Clements' via Racket Users
Github Classroom is trying to do this, but they’re not doing it well. I’ve used it several times, and managed to make it work, but the experience has been very me-programming-heavy, and not so great for the students. I think gradescope may have just merged with a company that’s trying to

[racket-users] mixed integer programming using glpk

2019-02-19 Thread 'John Clements' via Racket Users
I’m pleased to announce that I had a good reason to extend the glpk package to provide an interface to glpk’s mixed integer programming package; this means that if you can express your problem as a sequence of linear constraints on a set of variables where some of them need to be integers, you

pkgs still has no docs? (was: Re: [racket-users] Questions about Scribble docs)

2019-02-19 Thread 'John Clements' via Racket Users
Looks like… this is still the case? Specifically, reloading pkgs.racket-lang.org still shows that all packages are missing documentation. I thought I’d seen a message suggesting that this was resolved, but it appears I was mistaken. John > On Feb 16, 2019, at 8:08 PM, David Storrs wrote: >

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread 'John Clements' via Racket Users
I struggled with whether to send that message… I saw the name, “random access lists”, thought, “hmm, I wonder what that would like”, and clicked on the link. I wound up reading a bit about whether I should use (first impresssion) superficial or in-depth contracts, and ran out of steam pretty

Re: [racket-users] raco distribute creating too many subdirectories

2019-02-16 Thread 'John Clements' via Racket Users
Good to know; I also use define-runtime-path with abandon, and was not aware of possible consequences of casting too wide a net. Thanks! John > On Feb 10, 2019, at 09:49, Philip McGrath wrote: > > I think this is probably a consequence of the quirk of `define-runtime-path` > with

Re: [racket-users] Python's append vs Racket's append and helping novices understand the implications

2019-02-16 Thread 'John Clements' via Racket Users
The pointer to RaLists would be much more enticing if we could convince David Van Horn to begin his documentation with a couple of small examples…. John > On Feb 13, 2019, at 14:35, Stephen De Gabrielle > wrote: > > Thanks > > I should note that anyone with a GitHub account can edit >

[racket-users] issue tracker for course management?

2019-02-14 Thread 'John Clements' via Racket Users
Okay, so this is Racket Users vs. Facebook (I’m asking this question in both places). I think racket-users will win, personally. Sorry for the fairly OT topic. Here’s the question: Do any of you that run classes with multiple instructors/TAs/etc. use some kind of issue tracker to manage course

Re: [racket-users] Molis hai documentation

2019-02-10 Thread 'John Clements' via Racket Users
Yes, this should appear in the web page. FWIW, raco commands come with a standard “—help” flag: raco molis-hai --help raco molis-hai [ ... ] where is one of -b , --bits : Number of bits of entropy -n , --passwords : Number of passwords generated -o , --model-order : Order of the

Re: [racket-users] Re: Some concern about ChezScheme...

2019-02-09 Thread 'John Clements' via Racket Users
> On Feb 8, 2019, at 15:01, George Neuner wrote: > > On Fri, 8 Feb 2019 08:37:33 -0500, Matthias Felleisen > wrote: > >> >>> On Feb 6, 2019, at 3:19 PM, George Neuner wrote: > >>> >>> The idea that a compiler should be structured as multiple passes each >>> doing just one clearly

Re: [racket-users] Re: How To Design Classes text not available?

2019-02-02 Thread 'John Clements' via Racket Users
Also, if you use duckduckgo as your default search engine, it looks like you can prepend !archive or !wayback (turns out !a goes to amazon, sigh). John > On Feb 2, 2019, at 14:08, Neil Van Dyke wrote: > > Justin Zamora wrote on 2/2/19 3:39 PM: >> Thanks! I always forget about archive.org! >

Re: [racket-users] Spritely awarded Samsung Stack Zero grant

2019-01-31 Thread 'John Clements' via Racket Users
Truly excellent news! Can’t wait to hear about it at the next RacketCon. John > On Jan 31, 2019, at 14:46, Christopher Lemmer Webber > wrote: > > I've mentioned that my goal has been to advance the > federated/decentralized social web in Racket on here before. Here's > some news: > > >

Re: [racket-users] Why would a value produced by eval-ing code not satisfy its type predicate? (Particularly, a SQL statement from the sql package)

2019-01-31 Thread 'John Clements' via Racket Users
First off, many thanks for bringing to my attention the fact that Ryan has started racket-izing SQL! And thanks, Ryan, for racket-izing SQL! Maybe I can stop stapling together all of those long horrible strings now. Next, to answer your question, I believe that eval is not necessary here, and

Re: [racket-users] sxml vs xexpr frustrations

2019-01-30 Thread 'John Clements' via Racket Users
You probably already know this, but this is basically a case of parallel evolution. The sxml tools come ultimately from Oleg Kiselyov, and I believe he’s the one who formulated the data definition. Many people have worked with him on this, including many people on this mailing list. I think

Re: [racket-users] Beginning of the end for googlegroups?

2019-01-29 Thread 'John Clements' via Racket Users
For what it’s worth, I’m firmly in the “let’s wait and see” camp. I’m not worried about losing archives…I think I personally have just about all of the messages that have been posted to the google group, and I don’t think I’m alone. So: for the moment, I’m not that concerned. John > On Jan

[racket-users] handin server stress testing

2019-01-25 Thread 'John Clements' via Racket Users
As I think I mentioned to some of you earlier, I’ve been having real trouble holding together a handin server for a class of 100 students all writing typed racket code. In order to dig deeper, I set up a test machine and a repeatable test harness, and I discovered some things that really

Re: [racket-users] snake game

2019-01-23 Thread 'John Clements' via Racket Users
Interesting problem; your screenshot shows header text that should not appear in the window, which suggests to me that you copied and pasted the text from somewhere else into a buffer where the language level was already set. It looks to me like you should do the following: 1) Delete the first

Re: [racket-users] Escaping strings for the shell

2019-01-15 Thread 'John Clements' via Racket Users
Well, that sounds pretty fantastic. Looks like it’s time to take another look at Rash! John > On Jan 15, 2019, at 1:40 PM, William G Hatch wrote: > > On Tue, Jan 15, 2019 at 04:11:39PM -0500, 'John Clements' via Racket Users > wrote: >> Does rash have autocompletion of pat

Re: [racket-users] Escaping strings for the shell

2019-01-15 Thread 'John Clements' via Racket Users
Does rash have autocompletion of paths, yet? That’s my one super-super wishlist item. > On Jan 15, 2019, at 6:17 AM, 'Paulo Matos' via Racket Users > wrote: > > I am surprised nobody mentioned Rash. I have been using it for all my > shell scripting needs and it's awesome. > >

Re: [racket-users] Scribble: ugly spacing due to missing SIntrapara

2019-01-14 Thread 'John Clements' via Racket Users
I think the use of defthing here is not really correct; I would argue that if you’re going to use a defthing, you should go ahead and provide the definition of the thing. Otherwise, just put in a reference to the name, so that the user can click through to see the definition. I think that this

[racket-users] bug in data/enumerate?

2019-01-13 Thread 'John Clements' via Racket Users
I’ve been having problems with but-not/e, and I’ve been bouncing between strange things, but this one really looks ilke a bug. Unless it’s not. John #lang racket (require data/enumerate data/enumerate/lib) (define (even-mod-10? x) (= 0 (modulo x 10))) (define tens/e (map/e (λ (x)

[racket-users] pie: dancing around 'U does not have a type'

2018-12-30 Thread 'John Clements' via Racket Users
I’m having a great deal of fun working through The Little Typer. I’ve run into a problem that I’m sure has a simple solution, but I don’t know what it is. To understand my question, let me first give a simple example. Here’s a dependent type that’s uninhabited when n is zero: #lang pie (claim

Re: [racket-users] off-topic: SQLite

2018-12-15 Thread 'John Clements' via Racket Users
cf. Relevant tweet from Patrick Walton (I worked with Patrick on Rust at Mozilla): https://twitter.com/pcwalton/status/1073755208558100480 > On Dec 15, 2018, at 13:52, George Neuner wrote: > > > This hit the news yesterday: SQLite contained a remote code execution bug. > According to the

Re: [racket-users] Macro introducing definitions from list of ids

2018-12-11 Thread 'John Clements' via Racket Users
In answer to at least one of your questions, top-level “begin”s are “spliced” into their context to produce top-level bindings. So, for instance, #lang racket (begin (define a 3) (define b 4)) (+ b a) … evaluates to 7 I think this is not the only issue you’re going to run into, but it’s

Re: [racket-users] Microworlds

2018-12-06 Thread 'John Clements' via Racket Users
Sounds fascinating. As an instructor for first-quarter CS+X, I’ve been looking at alternatives to sound as a setting. I’m interested in the Fisler/Krishnamurthi/Politz/Lerner Big Data curriculum, but yours also sounds good! John > On Dec 6, 2018, at 5:16 AM, Matt Jadud wrote: > > Hi all, >

Re: [racket-users] minor doc change proposal?

2018-12-02 Thread 'John Clements' via Racket Users
LGTM, but I should note that I already accepted Philip’s earlier suggestion. If you want to make further changes, go for it! John > On Nov 30, 2018, at 06:25, Greg Hendershott wrote: > > On Fri, Nov 30, 2018 at 5:58 AM Robby Findler > wrote: >> What about using the function >> >> (lambda

Re: [racket-users] Possible Typed Racket bugs (regarding, separately, for/fold and occurrence typing)

2018-12-01 Thread 'John Clements' via Racket Users
I claim that it’s not quite as simple as that. For instance, consider this program: #lang typed/racket ;; this one type-checks as a Number: (ann (let () (define num (string->number "aoeu")) (unless num (error "Not a number")) (* num 2)) Number) ;; this one doesn't type-check

Re: [racket-users] minor doc change proposal?

2018-11-29 Thread 'John Clements' via Racket Users
%29._true~3f%29%29 > > I think that `not-false?` is easier to understand, but `true?` is more > idiomatic. > > Gustavo > > > > > On Thu, Nov 29, 2018 at 3:11 PM 'John Clements' via Racket Users > wrote: > This stack overflow post > > https://stackover

[racket-users] minor doc change proposal?

2018-11-29 Thread 'John Clements' via Racket Users
This stack overflow post https://stackoverflow.com/questions/53543191/what-is-the-different-between-filter-and-filter-map/53545115#53545115 … is written by someone confused by the documentation for `filter-map`. I went and read the documentation, and *I* was confused for about 30 seconds. I

[racket-users] handin server performance under load, possible fixes

2018-11-07 Thread 'John Clements' via Racket Users
I was complaining about the performance of the handin server under load last weekend, and I figured I should try to actually measure the behavior of the server under load. I’ve observed something somewhat surprising, and I have some ideas, though I thought I’d ask here before doing something

Re: [racket-users] distributed computation support for handin-server?

2018-10-25 Thread 'John Clements' via Racket Users
Another random thought; has anyone thought of pushing this out to the student computer, by supplying students with a hopefully-opaque executable that runs the tests on a student program and then outputs a digitally signed test result? John > On Oct 23, 2018, at 21:50, Greg Hendershott wrote:

[racket-users] distributed computation support for handin-server?

2018-10-23 Thread 'John Clements' via Racket Users
I’m currently supporting about 100 users in a PL class using the handin server and writing their programs in Typed Racket. This load is really wrecking my VPS. I upgraded to a larger VPS, and I’m still getting many users timing out. The problem is that although this is an 8-core machine, racket

[racket-users] GitHub notification-of-push service "marked for deprecation"

2018-10-16 Thread 'John Clements' via Racket Users
For many months, now, my github notifications of repository commits have been marked like this one, with “this service has been marked for deprecation.” Is there another way to get these e-mails, or are we just resigned to allowing this to disappear? Apologies if (as seems likely) I’ve missed

Re: [racket-users] Resource recommendations for a Haskeller?

2018-10-16 Thread 'John Clements' via Racket Users
See answers to (some) questions below: > On Oct 14, 2018, at 4:43 PM, theindigame...@gmail.com wrote: > > (I originally posted this to Reddit) > > I know Haskell reasonably well (but no Lisps), but I want to learn Racket to > know more about > > macro systems and language-oriented

Re: [racket-users] add set-subset?

2018-10-05 Thread 'John Clements' via Racket Users
Do we have an existing doc redirect mechanism? I’ve just spent five minutes looking at docs for defproc and the “Indexing” section, and didn’t find anything. Doesn’t mean it’s not there, but I did have a look. Then again, this thread is a living testament to my inability to find things in

Re: [racket-users] add set-subset?

2018-10-04 Thread 'John Clements' via Racket Users
D’oh! It’s just called subset? Sorry, John > On Oct 4, 2018, at 11:16 AM, 'John Clements' via Racket Users > wrote: > > It seems strange to me that we have (AFAICT) set-union, set-subtract, and > set-member?, but not set-subset?. Would it make sense for me to propose a

[racket-users] add set-subset?

2018-10-04 Thread 'John Clements' via Racket Users
It seems strange to me that we have (AFAICT) set-union, set-subtract, and set-member?, but not set-subset?. Would it make sense for me to propose a pull request for this? (it would just be (set-empty? (set-subtract b a)), I realize…) John -- You received this message because you are

[racket-users] uh oh, here comes dark mode

2018-09-24 Thread 'John Clements' via Racket Users
The new OS X will feature a “dark mode”. I suspect that lots of Mac owners will be clamoring for DrRacket “dark mode” real soon now. Ars Technica has a nice review of the OS, including a whole bunch about the new dark mode:

[racket-users] OS X DrRacket much more network-wedgeable than before?

2018-09-20 Thread 'John Clements' via Racket Users
This is not a bug report; I can investigate further if this is not already a known issue. I’ve found in the last few days that network problems can halt OS X DrRacket much more completely than I believe they used to. To give a specific example, if I run a program that tries to communicate

Re: [racket-users] difficult to package library

2018-08-06 Thread 'John Clements' via Racket Users
I believe that Ben is assuming that you’re not using (define collection ‘multi) in your top-level info.rkt file. If you *are* using multi-collection style, I believe you have some changes to make. If you’re not using the ‘multi style, you should totally ignore this email. John > On Aug 1,

Re: Parameters considered often harmful (was: Re: [racket-users] Re: A (long) question regarding parameters and scope)

2018-08-06 Thread 'John Clements' via Racket Users
ed by a new > language feature, but I can’t immediately come up with one. Perhaps > others have better ideas than I do in that department. > >> On Aug 2, 2018, at 12:24, 'John Clements' via Racket Users >> wrote: >> >> I hate to turn a little question into a

Re: [racket-users] Re: Parameters considered often harmful

2018-08-06 Thread 'John Clements' via Racket Users
ers to provide address mapping for > the emulator, I need to design a big and complex interface to do so", but > instead, you just go like "I'll do that later and let the user provide its > own code for now". > > Just my two cents about how I use parameters :) > > On Fr

Parameters considered often harmful (was: Re: [racket-users] Re: A (long) question regarding parameters and scope)

2018-08-02 Thread 'John Clements' via Racket Users
I hate to turn a little question into a big one, but… are parameters the right choice, here? It seems to me that optional parameters would be more suitable. Unfortunately, I’ve been on the other side of this fence, too: parameters are vastly more convenient for implementors than adding optional

Re: [racket-users] ssax:make-parser

2018-05-17 Thread 'John Clements' via Racket Users
Honestly, reading that snippet … suggests to me that make-parser might not actually be useful without all of the other internal ssax functions, and that perhaps make-parser really shouldn’t be exported, after all :). Is it possible to formulate productive uses of make-parser that don’t require

Re: [racket-users] ssax:make-parser

2018-05-16 Thread 'John Clements' via Racket Users
> On May 16, 2018, at 11:17 AM, N. Raghavendra wrote: > > At 2018-05-16T13:49:52-04:00, John Clements wrote: > >> It seems like make-parser should probably be provide’d. I’ve pushed a >> change to make ssax:make-parser a top-level provide. > > Thank you very much. In

Re: [racket-users] ssax:make-parser

2018-05-16 Thread 'John Clements' via Racket Users
It seems like make-parser should probably be provide’d. I’ve pushed a change to make ssax:make-parser a top-level provide. Would you (N. Raghavendra) be interested in taking the raw pseudo-documentation currently provided for ssax:make-parser and reformatting it into something useful, perhaps

Re: [racket-users] ssax:make-parser

2018-05-15 Thread 'John Clements' via Racket Users
Interestingly, it looks like this change is a deliberate one, made by Ryan Culpepper back in 2011. Here’s the relevant commit: commit 738bf41d106f4ecd9111bbefabfd78bec8dc2202 Author: Ryan Culpepper Date: Tue Nov 22 02:46:32 2011 -0700 bypass ssax/ssax module

Re: [racket-users] sxml:document

2018-05-14 Thread 'John Clements' via Racket Users
> On May 13, 2018, at 11:42 PM, Neil Van Dyke wrote: > > John, thank you for your past work on the SXML stuff. Two comments: > >> enforcing the “file://“ prefix. > > Sounds like the following doesn't matter in this case, but another way to > support both a given URL or

Re: [racket-users] sxml:document

2018-05-14 Thread 'John Clements' via Racket Users
> On May 13, 2018, at 21:55, N. Raghavendra wrote: > > At 2018-05-14T00:33:45-04:00, John Clements wrote: > >> It turns out that the “sxml:document” function looks for local files >> *without* a file: prefix. So, you can just call >> >> (sxml:docmuent “/tmp/test.xml”)

Re: [racket-users] sxml:document

2018-05-13 Thread 'John Clements' via Racket Users
Well, I’m the maintainer of this package, but not it’s author, and I have an answer for you, but … you’re going to be surprised. It’s pretty gross. It turns out that the “sxml:document” function looks for local files *without* a file: prefix. So, you can just call (sxml:docmuent

Re: [racket-users] what do people use for number formatting?

2018-05-07 Thread 'John Clements' via Racket Users
Well, that was easy! As usual, can’t believe I didn’t know that was there. Many thanks to all, John > On May 7, 2018, at 5:00 PM, Daniel Prager wrote: > > ~r works nicely: > > > (~r 1.237472387 #:precision 2) > "1.24" -- You received this message because you

[racket-users] what do people use for number formatting?

2018-05-07 Thread 'John Clements' via Racket Users
Okay, how many times have I written the function that accepts 1.237472387 and returns “1.24” ? What do you folks use? I see that SRFI 54 covers this use case, and a lot of others besides. Is this the most commonly used package for formatting numbers? John -- You received this message

Re: [racket-users] Jupyter Racket Kernel - iracket

2018-05-01 Thread 'John Clements' via Racket Users
Yes! You should! Many thanks for your work, John Clements > On Apr 30, 2018, at 12:28 PM, Graham Dean wrote: > > > I’ve been looking to use Racket in a Jupyter notebook and I came across Ryan > Culpepper’s iracket (https://github.com/rmculpepper/iracket). > >

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

[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

<    1   2   3   4   5   >