laurent.orseau
2020-10-27 09:23:06

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?)


laurent.orseau
2020-10-27 09:26:02

ryanc
2020-10-27 11:08:09

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?


ryanc
2020-10-27 11:18:32

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.


spdegabrielle
2020-10-27 11:33:57

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


laurent.orseau
2020-10-27 11:35:43

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


laurent.orseau
2020-10-27 11:36:01

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


spdegabrielle
2020-10-27 11:36:26

done. Also please accept invite to racket-templates organisation


spdegabrielle
2020-10-27 11:53:22

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


spdegabrielle
2020-10-27 11:53:51

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


laurent.orseau
2020-10-27 11:55:26

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)


laurent.orseau
2020-10-27 12:01:53

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


spdegabrielle
2020-10-27 12:03:40

I think that would be quite straightforward to do


laurent.orseau
2020-10-27 12:05:56

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.


gknauth
2020-10-27 13:09:39

@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)


soegaard2
2020-10-27 13:32:22

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


gknauth
2020-10-27 13:37:03

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


soegaard2
2020-10-27 13:38:09

Ah! I see it now. :slightly_smiling_face:


gknauth
2020-10-27 13:40:20

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


laurent.orseau
2020-10-27 14:01:37

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


gknauth
2020-10-27 14:51:06

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


ben
2020-10-27 15:26:13

does raco new work for other templates?


spdegabrielle
2020-10-27 16:28:39

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.


spdegabrielle
2020-10-27 16:30:52

I don’t get that error on macos catalina


spdegabrielle
2020-10-27 17:28:46

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 #&lt;path:/Users/spdegabrielle/Dev/ppict-slideshow-template/main.ss&gt; 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?


ben
2020-10-27 17:30:30

ok, yes, the ppict template needs an install


spdegabrielle
2020-10-27 17:31:57

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)


ben
2020-10-27 18:10:02

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.


soegaard2
2020-10-27 21:35:10

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


cris2000.espinoza677
2020-10-27 21:39:42

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.


notjack
2020-10-27 21:47:43

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.


jaz
2020-10-27 21:49:39

I think it does do exactly that


jaz
2020-10-27 21:56:58

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.


notjack
2020-10-27 21:59:13

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


jaz
2020-10-27 22:00:11

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


notjack
2020-10-27 22:03:25

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


jaz
2020-10-27 22:12:00

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.


jaz
2020-10-27 22:18:12

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.


cris2000.espinoza677
2020-10-27 22:19:22

i might try to do that thanks!


jaz
2020-10-27 22:33:02

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?)


cris2000.espinoza677
2020-10-27 22:34:27

i cant be for sure honestly


cris2000.espinoza677
2020-10-27 22:37:26

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


jaz
2020-10-27 23:15:54

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.


cris2000.espinoza677
2020-10-27 23:16:10

oooh ok thank you!


pavpanchekha
2020-10-28 04:37:56

Herbie does this and it works great


sorawee
2020-10-28 06:37:46

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”