
That’s good, but probably a little too buried. I’m thinking mainly of these two cases: 1. The newbie who just installed racket, has started DrRacket, and would like to try out this package they found on github, but doesn’t know what to do with the command line. 2. The user who’s more comfortable with the command line and just want the fast and easy way to try out the package. (I’m not worried about the more experienced users)
Also, I’m thinking of the case where the user just want to try out the package, but if the installation/run process doesn’t look entirely straightforward then it may not be worth the effort.
Hence, I’m hesitant to redirect user 1. (in particular) to a different page explaining the general process of installing packages.
But that may mean that the README of each package contains the same duplicated information, which thus won’t be amenable to enhancements, bug fixes or changes in the process (by contrast to sending to a general page).
If we do send to a general page, it would be very nice if it could depend on a url argument such as ...?package=racket-paint
so as to display the instructions for the package itself rather than a generic name like <my-package>
. I doesn’t look like this is possible with github wiki (or is it?)

Ah, maybe with this extension: https://www.mediawiki.org/wiki/Extension:UrlGetParameters

The pattern (~! _ ...)
, which is identical to the pattern (~and ~! (_ ...))
, performs the cut before even looking at the term being parsed. So the second clause is dead code. Maybe you want (~and (_ ...) ~!)
instead?

Is there some difference between what you want and pslide
? In ppict/slideshow2
I changed pslide
to act more like slide
in terms of options, default formatting, etc.

sadly github wiki doesn’t support extensions. What about pointing to the package documentation? In scribble To install @tt{raco pkg install @this}
to display > To install raco pkg install racket-paint

That would require every package to have this listed in its documentation, which is closer to the worst of both worlds

(but not necessarily an option to rule out either anyway)

done. Also please accept invite to racket-templates organisation

Is changing package generation to automatically create this sort of minimal documentation where none is present unreasonable?

(In other news I just accepted a new job today)

It’s not necessarily bad, but not as flexible as having a centralized version that’s easy to tune, that would keep all packages in sync. The scribble doc would still not be in the README.md either, so a link would need to be added (one more effort to make for the user)

The pkg server doesn’t say either how to install a package: https://pkgs.racket-lang.org/package/racket-paint I think this should be fixed

I think that would be quite straightforward to do

If there was a single place to describe this, using GET parameters, both the README.md and pkgs (and maybe even scribble doc) could link to that page.

@ben Admittedly from a work (Windows 10) computer running Cygwin bash. Haven’t tried this on my mac yet. $ raco pkg install from-template
raco pkg install: package is already installed
package: from-template
$ raco new ppict-slideshow-template .
ffi-lib: couldn't open "libedit-3.dll" (The specified module could not be found.; errid=126)

I failed in deciphering the note using the table below. What does it say?

add 040 (octal) to each number first, then look it up in that table

Ah! I see it now. :slightly_smiling_face:

Anyway, that was his picture in our yearbook. He wanted to have the last laugh.

Is the off-by-one on purpose or just a mistake?

I think it was a mistake. Maybe I’ll mention it to him gently at our 45th reunion in 2023. Or maybe it was deliberate in case the censors were actually smart: he could put it on them, “I dunno, what did you think it meant? Because that’s not what it says.”

does raco new work for other templates?

done! https://github.com/racket-templates/ppict-slideshow-template
What is a progressive pict? I’m going to follow your instructions soon so I expect I’ll find out - but I think this needs to be in the readme.
Do we need a separate slideshow template? or does this do double duty? (must mention the slideshow tutorial that I only learned about this year)
The .ss is a nice touch, but I’m not sure about linking to the old site.

I don’t get that error on macos catalina

spdegabrielle@Miriams-MacBook-Pro Dev % raco new ppict-slideshow-template
ppict-slideshow-template
/Users/spdegabrielle/Dev/
Cloning into 'ppict-slideshow-template'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (11/11), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 11 (delta 0), reused 11 (delta 0), pack-reused 0
Unpacking objects: 100% (11/11), done.
spdegabrielle@Miriams-MacBook-Pro Dev % cd ppict-slideshow-template
spdegabrielle@Miriams-MacBook-Pro ppict-slideshow-template % make pict
"<http://main.ss\|main.ss>":
making #<path:/Users/spdegabrielle/Dev/ppict-slideshow-template/main.ss>
standard-module-name-resolver: collection not found
for module path: pict-abbrevs
collection: "pict-abbrevs"
in collection directories:
/Users/spdegabrielle/Library/Racket/snapshot/collects
/Applications/Racket v7.8.0.10/collects/
... [180 additional linked and package directories]
compilation context...:
/Users/spdegabrielle/Dev/ppict-slideshow-template/main.ss
context...:
/Applications/Racket v7.8.0.10/collects/compiler/private/cm-minimal.rkt:608:0: compile-zo*
/Applications/Racket v7.8.0.10/collects/compiler/private/cm-minimal.rkt:407:15
/Applications/Racket v7.8.0.10/collects/compiler/private/cm-minimal.rkt:396:12: build
/Applications/Racket v7.8.0.10/collects/compiler/private/cm-minimal.rkt:372:0: maybe-compile-zo
/Applications/Racket v7.8.0.10/collects/compiler/private/cm-minimal.rkt:206:0: compile-root
/Applications/Racket v7.8.0.10/collects/compiler/private/cm-minimal.rkt:102:4
/Applications/Racket v7.8.0.10/share/pkgs/compiler-lib/compiler/commands/make.rkt:69:0
body of "/Applications/Racket v7.8.0.10/share/pkgs/compiler-lib/compiler/commands/make.rkt"
/Applications/Racket v7.8.0.10/collects/raco/raco.rkt:41:0
body of "/Applications/Racket v7.8.0.10/collects/raco/raco.rkt"
body of "/Applications/Racket v7.8.0.10/collects/raco/main.rkt"
make: *** [compile] Error 1
spdegabrielle@Miriams-MacBook-Pro ppict-slideshow-template %
Ahh, depends on pict-abbrevs
- not installed by default. I’m not sure what is going on on Windows. Maybe @andre - can you give it a go?

ok, yes, the ppict template needs an install

I’ll be honest - I’m not exactly on a clean install - raco pkg install pict-abbrevs
did it for me (well I used drracket package manager but same thing)

Hmm. A “progressive pict” is the data structure that makes ppict work, but there’s no need to think about it when using the library. It’s a nice way to make plain old picts. … I added a small note.
A slideshow template would be good. There’s overlap, but to me slideshow and ppict have very different “style” when you go to make one.
The old link is just for fun.

“In particular, it is my intention to supplement the text with programming exercises. For this I had in mind using Racket or Chicken Scheme (but Python is not impossible), inside of Juypter notebooks. That material will be written next fall.” https://gitlab.com/jim.hefferon/toc
Note: He is the author of an award winning book on Linear Algebra.

hello everyone, long time no see, it seems that it has been quite lively here, i even missed racketcon…, anyways, i have a question about the web-server
, if I make a new thread
inside a response handler, will it die after the connection is terminated? how could i bypass that in that case? it’s a stateful CRUD server.

I don’t think it will die. Generally spawned threads have lifetimes independent of the creator thread. The only case I can think of where it would die is if web-server
creates a new custodian for each incoming request and shuts the custodian down after the response handler returns. I don’t think it does that.

I think it does do exactly that

Ah, well, maybe not. I’m not sure what’s done per request, but there is a custodian per connection, and if the connection is terminated, the custodian should be shut down.

there definitely shouldn’t be one connection per request, I hope

those would be equivalent if you’re not using http 1.1 keepalive

http 1.0 should be considered dead, for most intents and purposes. we’re almost on 3.0 now.

I wasn’t talking about 1.0; rather, about using Connection: close
regularly in 1.1, which is not an uncommon thing to do. But that’s getting off-topic. After looking at some of the code, I… don’t know what the web-server normally does about custodians, and it might depend on how it’s used [?], given the difference between serve
and serve-ports
.

But @cris2000.espinoza677 if you need to escape out of the confines of a custodian that’s killing off whatever it is that you’re trying to do, you might try creating a thread (or threads) outside of the request cycle and feeding it tasks from within the request cycle. But depending on exactly what you’re trying to do, there could be a simpler way to accomplish it.

i might try to do that thanks!

Maybe you should just try doing what you originally intended. This code [https://github.com/racket/web-server/blob/master/web-server-lib/web-server/web-server-unit.rkt#L55] suggests that the current custodian gets switched back to the server’s (rather than the connection’s) custodian while the user-provided request-handling code is run. So maybe your original approach would just work. (Or did you try it and you were seeing your threads getting killed?)

i cant be for sure honestly

i have yet to test the thing, but the code requires time, because it’s for when a login token gets invalidated, so when it happens i want to get a new one, so it calls a singleton method. as you can see that’s why i need a new thread, because if a post to the service the CRUD is using fails i dont care to handle the response, i just want to relogin and wait for the next request

Well, a little experiment I just did suggests that your original approach will work, and you don’t need to worry about your threads getting killed.

oooh ok thank you!

Herbie does this and it works great

That works. Thanks! Is there a reason why it should be identical to (~and ~! (_ ...))
? My flawed understanding of (~! _ ...)
is “we are committed to being in a list form”