buoyantair
2018-11-28 12:23:58

Is there an alternative to Dr.Racket?


nathaniel
2018-11-28 12:40:25

I’ve successfully worked on Racket in VSCode, Vim, and Emacs – but Dr. Racket is a really great out-of-the-box experience and I come back to it often. I don’t think there’s another integrated development environment that would be nearly as useful.


mark.warren
2018-11-28 12:54:41

Always, in what manner do you mean? An alternative to the IDE?


buoyantair
2018-11-28 13:47:55

@mark.warren yes


buoyantair
2018-11-28 13:48:26

Is there something that allows me to use racket without Drracket? Like I want to be able to write tests and get results and debug through


buoyantair
2018-11-28 13:48:33

Mostly because I’m a beginner


buoyantair
2018-11-28 13:48:41

Dr Racket seems to be very slow for me.


nathaniel
2018-11-28 13:53:10

There’s a section in the Racket documentation that should help:

https://docs.racket-lang.org/guide/other-editors.html

Since you’re a beginner you might want to be sure you’ve read the Racket guide as well:

https://docs.racket-lang.org/guide/intro.html


mark.warren
2018-11-28 14:30:41

I guess you can write racket code in any editor you like and use the command line tools. I think some people use emacs (or a version of it).


mark.warren
2018-11-28 14:32:01

lexi.lambda
2018-11-28 17:08:21

@buoyantair Greg Hendershott’s racket-mode for emacs is excellent, and it includes a lot of the Racket-specific functionality in DrRacket.


lexi.lambda
2018-11-28 17:09:16

Yes, most likely. It works if you launch it from the command-line using the drracket executable, which is what I do.


racketslack
2018-11-28 18:18:34

@racketslack has joined the channel


racketslack
2018-11-28 18:21:10

Hi! I’ve got a hello.rkt file containing a simple #lang web-server/insta servlet. How do I get it to run using plt-web-server? Just running it within the same directory gives me a (Powered by Racket) 404 on http://localhost:8080/servlets/hello.rkt


racketslack
2018-11-28 18:22:07

I’ve tried putting the file in ./servlets/hello.rkt and in ./htdocs/hello.rkt as well. Couldn’t find the right place in the docs. The default configuration table contains (servlet-root ".") which suggests that the working dir should be fine.


soegaard2
2018-11-28 18:22:44

Does it work if you open it in DrRacket and click run? (The server is started and the page is opened in the browser automatically)


soegaard2
2018-11-28 18:23:00

If it works there, we can get to work in the terminal too.


racketslack
2018-11-28 18:23:10

yeah works


soegaard2
2018-11-28 18:23:47

Okay. Can you put hello.rkt on http://pasterack.org\|pasterack.org ?


racketslack
2018-11-28 18:25:19

soegaard2
2018-11-28 18:26:21

Note the url when you run it in DrRacket:



soegaard2
2018-11-28 18:27:41

If you do the following in the terminal:


soegaard2
2018-11-28 18:28:27

Short: racket hello.rkt then the browser shows “Hello World”


racketslack
2018-11-28 18:37:05

Yeah it opens http://localhost:61585/servlets/standalone.rkt and that works as well


racketslack
2018-11-28 18:38:24

but I’d like to use plt-web-server instead since it offers the GET /conf/refresh-servlets call for a shorter edit-save-refresh feedback loop


racketslack
2018-11-28 18:45:45

Or would you recommend other ways to get such a quick feedback loop for developing servlets?


soegaard2
2018-11-28 18:52:24

@racketslack Then you need to pick another solution than web-server/insta. See section 1.2 Simple Single Servlet Servers


racketslack
2018-11-28 18:59:45

Ok thanks @soegaard2. Trying the first example under 1.2.1 now, and I can again run it through DrRacket or racket but not through plt-web-server. But the advantage now is that it doesn’t pick random ports, so I can do a full restart of the racket process each time I made a change. Still has some delay but it probably works better for me than the GET /conf/refresh-servlets I initially sought for.


soegaard2
2018-11-28 19:04:21

Great to hear it works. I don’t know what’s the optimal setup is. Anyone wants to share how they have things setup?


racketslack
2018-11-28 19:19:51

Seems like the full restart thing rather might be a conscious design choice, reading https://docs.racket-lang.org/drracket/Keyboard_Shortcuts.html#%28part._.Sending_.Program_.Fragments_to_the_.R.E.P.L%29


soegaard2
2018-11-28 19:22:11

Yes. That’s to avoid dependencies on spurious state.


soegaard2
2018-11-28 19:22:23

However when using a web-server, there are options.



racketslack
2018-11-28 19:24:16

Thanks will try that