chris613
2020-2-27 09:49:49

i want to do some sanity checks on a csp solver (using the csp module) to make sure that calling (solve …) isnt going to end up taking significant human time for varying search spaces would profile https://docs.racket-lang.org/profile/index.html?q=profile#%28def._%28%28lib._profile%2Fmain..rkt%29._profile-thunk%29%29 be the correct tool for that ?


chris613
2020-2-27 09:50:42

i feel like profile might be over doing it? (at this point im not worried about memory usage etc only real world time)


samth
2020-2-27 12:53:01

Profile is good, but just the time form might be enough


steveh2009
2020-2-27 13:11:56

Reddit mentioned this Racket adventures blog recently. Very well done: http://defn.io\|defn.io


gknauth
2020-2-27 14:24:58

I use DrRacket when I want the power of its ability to show me exactly where I screwed up. I use Emacs, especially in large files or large numbers of filse, when I’m making major changes but I’m confident my changes are not adventurous syntactically. I’m really an Emacs power user, I navigate many buffers sometimes and have my own Emacs functions and macros to make my life easier. I switch to DrRacket when my changes are minor or when I need DrRacket’s blessing that the things I just did are actually OK.


greg
2020-2-27 14:50:55

@robby I had to deal with some other issues — and issue 430 turned out to be about running the main submodule. Now I want to loop back and confirm whether I need to change anything about how Racket Mode handles images.

To clarify: Status quo, it changes current-print. That’s documented as

> A parameter that determines the print handler that is called by read-eval-print-loop to print the result of an evaluation (and the result is ignored). I do want to customize the output for a read-eval-print-loop. My current-print handler supports (a) a user option to pretty-print REPL values and (b) this feature of detecting convertible images.

I am not using a “port handler”.

Now that I’ve explained this probably more accurately than I did before: Do you still think it’s wrong? If so: Why? What instead ought I do, exactly? Why?


philip.mcgrath
2020-2-27 15:20:48

I’m getting a 503 error from the package server while trying to create a new package.


philip.mcgrath
2020-2-27 15:45:13

It’s working now—I think the problem may have been that GitHub seems to be having some issues, and the package server may have errored when it couldn’t connect.


massung
2020-2-27 15:45:54

I couldn’t get to one of my own repos earlier, so yeah, GH is having some issues



laurent.orseau
2020-2-27 16:18:03

I like DrRacket very much. One of the things I prefer in emacs/racket-mode is the syntax-color handling of #; comments, which DrRacket doesn’t deal with at all.


massung
2020-2-27 17:14:39

In Racket, what’s the equiv (using format if possible) of C’s printf("%0.2f", x)?


samdphillips
2020-2-27 17:16:16

(~r #:precision '(= 2) x)


samdphillips
2020-2-27 17:16:25

At least that is what I use


massung
2020-2-27 17:22:34

thanks :wink:


laurent.orseau
2020-2-27 17:38:28

You can use 2 instead of '(= 2) as a shorthand here I think


samdphillips
2020-2-27 17:53:29

> (~r #:precision 2 1) "1" > (~r #:precision '(= 2) 1) "1.00"


plragde
2020-2-27 18:58:47

Reposted from #beginners: Is there an obvious way in Scribble to make counters that know about section numbering? For example, in section 1.3, a counter for theorems that runs 1.3.1, 1.3.2, and so on. If it’s not obvious, any pointers as to how to go about it? I’m using scribble/manual and rendering to HTML. Thanks.


mflatt
2020-2-27 19:06:06

I forget the details, but you’ll probably want to create a part-relative-element.


carlosrogue
2020-2-27 20:58:17

@carlosrogue has joined the channel


tgbugs
2020-2-27 22:11:49

Question: is anyone else getting a weird 404 error on the catalogs? https://download.racket-lang.org/releases/7.6/catalog/


tgbugs
2020-2-27 22:12:26

((uncaught-exception-handler) (*(+(*)(*(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*)(*))(+(*)(*)(*)(*))))(+(*)(*)(*)(*)))) uncaught exception: 404


sorawee
2020-2-27 22:12:48

I do get 404 on that page


sorawee
2020-2-27 22:14:06

tgbugs
2020-2-27 22:14:55

hrm, who is the right person to @?


tgbugs
2020-2-27 22:23:18

dropped it on racket users list


plragde
2020-2-27 22:53:08

Is there something in the code for HtDP that might be relevant?


mflatt
2020-2-27 23:01:45

Answered on the list. There’s just nothing for directory-like paths such as https://download.racket-lang.org/releases/7.6/catalog/, but a file-like path such as https://download.racket-lang.org/releases/7.6/catalog/pkg/racket-lib does work.


mflatt
2020-2-27 23:06:58

I don’t think so. HtDP exercises are just consecutively numbered, for example.