stamourv
2017-9-4 15:27:37

: Less than two weeks left to get your RacketCon tickets at early bird prices! http://con.racket-lang.org/#register


robkuz
2017-9-4 15:48:13

@robkuz has joined the channel


royall
2017-9-4 18:08:18

Is this the best way of getting whitespace characters into my console output? (displayln (string-append "hello" (~a #\tab) "esteemed user"))


royall
2017-9-4 18:08:49

Concatenating string parts together with converted whitespace characters


royall
2017-9-4 18:16:08

Thinking I might write a little macro to provide convenient/dangerous interpolation that I’m accustomed to from PHP: http://php.net/manual/en/language.types.string.php#language.types.string.syntax.double


cfinegan
2017-9-4 18:17:19

Normal escape characters work fine in racket literals so you could have done (displayln "hello\testeemed user") and it would be the same afaik. Using string-append is fine too. What you did is also equivalent to (displayln (format "hello~aesteemed user" #\tab")).


royall
2017-9-4 18:18:42

Oh, thanks! I made the mistake of originally building this example with writeln


cfinegan
2017-9-4 18:21:25

Yeah that can be confusing. Good rule of thumb is that display formats for output (so for example #\a prints as simply a), while write formats so the output can be read back in as racket syntax (so #\a would print back as #\a).



greg
2017-9-4 23:09:11

@royall For some things at-expressions can be handy: http://www.greghendershott.com/2015/08/at-expressions.html


joelmccracken
2017-9-5 00:25:44

I’ve been working with web-server/servlet for a little while now, and I’ve been wondering, does it matter if I reuse embed/url between requests? or should I get a new embed/url for each request?