laurent.orseau
2021-11-5 11:27:32

I get a strange error when I try to raco pkg update one of my packages today: $ raco pkg update text-block Resolving "text-block" via <https://download.racket-lang.org/releases/8.2/catalog/> Resolving "text-block" via <https://pkgs.racket-lang.org> Updating: text-block Downloading repository <https://github.com/Metaxal/text-block.git> git: could not find requested reference reference: master repo: Metaxal/text-block.git context...: /usr/share/racket/collects/net/git-checkout.rkt:403:0: select-commits [repeats 1 more time] /usr/share/racket/collects/net/git-checkout.rkt:73:8 /usr/share/racket/collects/net/git-checkout.rkt:54:2: retry-loop /usr/share/racket/collects/pkg/private/download.rkt:102:2: download! while the pkgs server doesn’t show any issue with it. Is the issue somewhere on my side?


spdegabrielle
2021-11-5 11:30:40

that looks like the name of the branch. Did it get changed to main? maybe update the url on the package server?


mflatt
2021-11-5 11:33:54

The problem will go away after the pkg server catches up to the latest commit. It’s a problem with the raco pkg client that’s fixed for v8.3.


laurent.orseau
2021-11-5 11:45:17

ok great, thanks


laurent.orseau
2021-11-5 14:20:11

it’s fixed now


jesse697
2021-11-5 16:48:10

@spdegabrielle ooh, rename an identifier quickscript! Awesome! This is one of the things that I really wish DrRacket had out-of-the-box and is definitely something that I will use because I often change my mind about the name of a function. Other IDEs can do this kind of out-of-the-box.



jesse697
2021-11-5 16:49:08

Any chance of extending it to rename an identifier that is used in other modules? For example: rename an identifier across a collection.


spdegabrielle
2021-11-5 16:51:03

@jesse697 There are a number of extensions in quickscript that I believe should be included in the Racket Distribution (cc: @laurent.orseau @robby)


jesse697
2021-11-5 16:51:30

this is something I use a fair amount in PHPStorm, an IDE for PHP. You can just rename a method in a class and all uses of it get renamed, too, not just in the current file


spdegabrielle
2021-11-5 16:54:28

How does PHP storm know about the uses of the identifier?


laurent.orseau
2021-11-5 16:54:49

@jesse697 Note that it was already in DrRacket, but only in the right-click context menu. Also, it’s based on check-syntax, which means the program must compile.


laurent.orseau
2021-11-5 16:55:28

I’m not sure about multifile, because of complicated things like rename-out and such.


laurent.orseau
2021-11-5 16:56:07

PHP and friends won’t do better I guess in such situations, since their replacements are based on strings rather than syntax


laurent.orseau
2021-11-5 16:56:52

if you want string-based replacement, you always have sed -i s/old/new/g *.rkt or similar :wink:


spdegabrielle
2021-11-5 16:57:46

Does the compiler build a index of identifiers and aliases? Is this index inspectable?


jesse697
2021-11-5 16:58:43

wow, I didn’t even know about the Rename Identifier feature in DrRacket


jesse697
2021-11-5 16:59:45

right I see how the feature could be defeated by rename-out. You could pop up a giant flame out screen in such a case: “Rename defeated by rename-out! Ouch”


spdegabrielle
2021-11-5 16:59:56

(there is so much in DrRacket that 99% of racketeers never see)


samth
2021-11-5 17:00:58
  1. The compiler does not build such an index. DrRacket builds such an index as part of check syntax.

jesse697
2021-11-5 17:01:15

OTOH, you could make the feature smarter and handle rename-out (though I think the complexity is increasing rapidly now)


samth
2021-11-5 17:01:40
  1. rename-out is not a problem. The problem is that you don’t know where to look for files that might need to change.

jesse697
2021-11-5 17:04:12

right, we don’t know the whole scope, but I think the feature could make a reasonable assumption about where it might appear. I imagine using this feature only for work on a single package, and for identifiers that aren’t provided externally. In my own sandbox, so to speak


jesse697
2021-11-5 17:04:48

macros could defeat the feature too


samth
2021-11-5 17:06:19

Right, that’s the usual way this sort of feature works. DrRacket traditionally has not had a notion of “project” and has instead looked only at the files it has open. Additionally, you’d need to run a potentially expensive computation on all of the files in the project (expanding them and running check syntax). I think this would be a good feature to add but that’s why it doesn’t exist.


spdegabrielle
2021-11-5 17:10:37

I take it PHPstorm has a ‘project’ or does it replace on everything in the files folder and and subfolders?


jesse697
2021-11-5 17:15:16

yeah, it has projects


laurent.orseau
2021-11-5 17:24:40

@jesse697 You may want to take a look at other quickscripts here: https://github.com/racket/racket/wiki/Quickscript-Scripts-for-DrRacket And if you write yourself one that may be useful to others, don’t forget to share it, it’s extremely simple (gist, gitlab snippets, etc.) :wink:


spdegabrielle
2021-11-5 18:05:22

Ok. If we take the idea that if something is part of a project is should be a language feature…what would it be in this case?


samth
2021-11-5 18:10:28

@ryanc is there a way to make pslide work with widescreen slides?


samth
2021-11-5 18:12:20

Or, I should say, to default to it, so that passing the --widescreen option isn’t necessary


ryanc
2021-11-5 20:08:43

No, I think you have to run the talk with --widescreen.


samth
2021-11-5 20:09:10

It would be nice if there was some analog to slideshow/widescreen


ryanc
2021-11-5 20:12:31

I suppose one could add modules like that that just defined variants of pslide.


ryanc
2021-11-5 20:13:24

Our of curiosity, is there an obstacle to using --widescreen?


samth
2021-11-5 20:13:28

sufficient for my purposes would be to just support #:aspect as an argument to pslide


samth
2021-11-5 20:13:48

The only problem is that it isn’t what C-c C-c does in Racket Mode


ryanc
2021-11-5 20:21:29

Okay, I’ve added an #:aspect argument to pslide.


samth
2021-11-5 20:21:56

Thanks!